Merge "Add key layout and device file for Reference RCU"
diff --git a/Android.bp b/Android.bp
index 26e7165..36c2fa8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -314,6 +314,7 @@
         ":framework-telecomm-sources",
         ":framework-telephony-common-sources",
         ":framework-telephony-sources",
+        ":framework-vcn-util-sources",
         ":framework-wifi-annotations",
         ":framework-wifi-non-updatable-sources",
         ":PacProcessor-aidl-sources",
@@ -1238,6 +1239,7 @@
     visibility: [
         "//frameworks/base/wifi",
         "//frameworks/base/services/net",
+        "//packages/modules/Wifi/framework",
     ],
 }
 
@@ -1262,12 +1264,14 @@
         "core/java/com/android/internal/util/StateMachine.java",
         "core/java/com/android/internal/util/WakeupMessage.java",
     ],
-    visibility: ["//frameworks/opt/net/wifi/service"],
+    visibility: [
+        "//frameworks/opt/net/wifi/service",
+        "//packages/modules/Wifi/service",
+    ],
 }
 
 // TODO(b/145644363): move this to under StubLibraries.bp or ApiDocs.bp
 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 " +
diff --git a/ApiDocs.bp b/ApiDocs.bp
index d630209..ada80bb 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",
     ],
@@ -91,7 +91,9 @@
     arg_files: [
         "core/res/AndroidManifest.xml",
     ],
-    args: metalava_framework_docs_args,
+    args: metalava_framework_docs_args +
+        // Needed for hidden libcore annotations for now.
+        " --ignore-classes-on-classpath ",
     write_sdk_values: true,
 }
 
@@ -101,7 +103,10 @@
     arg_files: [
         "core/res/AndroidManifest.xml",
     ],
-    args: metalava_framework_docs_args + " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ",
+    args: metalava_framework_docs_args +
+        // Needed for hidden libcore annotations for now.
+        " --ignore-classes-on-classpath " +
+        " --show-annotation android.annotation.SystemApi\\(client=android.annotation.SystemApi.Client.PRIVILEGED_APPS\\) ",
     write_sdk_values: true,
 }
 
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 2f3945f..ed8781e 100644
--- a/StubLibraries.bp
+++ b/StubLibraries.bp
@@ -47,11 +47,11 @@
         "core/java/**/*.logtags",
         ":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",
+    sdk_version: "none",
+    system_modules: "none",
+    java_version: "1.8",
     arg_files: ["core/res/AndroidManifest.xml"],
     // TODO(b/147699819): remove below aidl includes.
     aidl: {
@@ -78,6 +78,7 @@
         "android.hardware.usb.gadget-V1.0-java",
         "android.hardware.vibrator-V1.3-java",
         "framework-protos",
+        "stable.core.platform.api.stubs",
         // There are a few classes from modules used as type arguments that
         // need to be resolved by metalava. For now, we can use a previously
         // finalized stub library to resolve them. If a new class gets added,
@@ -238,6 +239,7 @@
     name: "android_stubs_current",
     srcs: [ ":api-stubs-docs-non-updatable" ],
     static_libs: [
+        "art.module.public.api.stubs",
         "conscrypt.module.public.api.stubs",
         "framework-media.stubs",
         "framework-mediaprovider.stubs",
@@ -246,6 +248,7 @@
         "framework-statsd.stubs",
         "framework-tethering.stubs",
         "framework-wifi.stubs",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: ["android_defaults_stubs_current"],
@@ -255,6 +258,7 @@
     name: "android_system_stubs_current",
     srcs: [ ":system-api-stubs-docs-non-updatable" ],
     static_libs: [
+        "art.module.public.api.stubs",
         "conscrypt.module.public.api.stubs",
         "framework-media.stubs.system",
         "framework-mediaprovider.stubs.system",
@@ -263,6 +267,7 @@
         "framework-statsd.stubs.system",
         "framework-tethering.stubs.system",
         "framework-wifi.stubs.system",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: [
@@ -288,6 +293,7 @@
     static_libs: [
         // Modules do not have test APIs, but we want to include their SystemApis, like we include
         // the SystemApi of framework-non-updatable-sources.
+        "art.module.public.api.stubs",
         "conscrypt.module.public.api.stubs",
         "framework-media.stubs.system",
         "framework-mediaprovider.stubs.system",
@@ -296,6 +302,7 @@
         "framework-statsd.stubs.system",
         "framework-tethering.stubs.system",
         "framework-wifi.stubs.system",
+        "i18n.module.public.api.stubs",
         "private-stub-annotations-jar",
     ],
     defaults: [
@@ -323,25 +330,12 @@
         "android_stubs_dists_default",
     ],
     libs: ["sdk_system_29_android"],
+    static_libs: ["art.module.public.api.stubs"],
     dist: {
         dir: "apistubs/android/module-lib",
     },
 }
 
-java_library_static {
-    name: "android_non_updatable_stubs_current",
-    srcs: [":api-stubs-docs-non-updatable"],
-    defaults: ["android_defaults_stubs_current"],
-    libs: ["sdk_system_29_android"],
-}
-
-java_library_static {
-    name: "android_system_non_updatable_stubs_current",
-    srcs: [":system-api-stubs-docs-non-updatable"],
-    defaults: ["android_defaults_stubs_current"],
-    libs: ["sdk_system_29_android"],
-}
-
 /////////////////////////////////////////////////////////////////////
 // hwbinder.stubs provides APIs required for building HIDL Java
 // libraries.
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/OWNERS b/apex/blobstore/OWNERS
index 8e04399..a53bbea 100644
--- a/apex/blobstore/OWNERS
+++ b/apex/blobstore/OWNERS
@@ -1,4 +1,2 @@
-set noparent
-
 sudheersai@google.com
 yamasani@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/OWNERS b/apex/jobscheduler/OWNERS
index d004eed..c77ea33 100644
--- a/apex/jobscheduler/OWNERS
+++ b/apex/jobscheduler/OWNERS
@@ -1,6 +1,7 @@
-yamasani@google.com
-omakoto@google.com
 ctate@android.com
 ctate@google.com
+dplotnikov@google.com
 kwekua@google.com
-suprabh@google.com
\ No newline at end of file
+omakoto@google.com
+suprabh@google.com
+yamasani@google.com
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/permission/service/Android.bp b/apex/permission/service/Android.bp
index b7d8433..6e04edf 100644
--- a/apex/permission/service/Android.bp
+++ b/apex/permission/service/Android.bp
@@ -39,4 +39,6 @@
         "test_com.android.permission",
     ],
     installable: true,
+    // We don't have last-api tracking files for the public part of this jar's API.
+    unsafe_ignore_missing_latest_api: true,
 }
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 e4299f5..0000000
--- a/apex/statsd/framework/Android.bp
+++ /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 {
-    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__",
-        "//packages/modules/StatsD/apex:__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__",
-        "//packages/modules/StatsD/apex/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..9a157b8 100644
--- a/api/Android.bp
+++ b/api/Android.bp
@@ -28,6 +28,7 @@
 genrule {
     name: "frameworks-base-api-current.txt",
     srcs: [
+        ":art.module.public.api{.public.api.txt}",
         ":conscrypt.module.public.api{.public.api.txt}",
         ":framework-media{.public.api.txt}",
         ":framework-mediaprovider{.public.api.txt}",
@@ -36,6 +37,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 +50,10 @@
             dest: "current.txt",
         },
         {
-            targets: ["sdk", "win_sdk"],
+            targets: [
+                "sdk",
+                "win_sdk",
+            ],
             dir: "apistubs/android/public/api",
             dest: "android.txt",
         },
@@ -60,6 +65,7 @@
     name: "frameworks-base-api-current.srcjar",
     srcs: [
         ":api-stubs-docs-non-updatable",
+        ":art.module.public.api{.public.stubs.source}",
         ":conscrypt.module.public.api{.public.stubs.source}",
         ":framework-media{.public.stubs.source}",
         ":framework-mediaprovider{.public.stubs.source}",
@@ -68,6 +74,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"],
@@ -78,6 +85,7 @@
 genrule {
     name: "frameworks-base-api-removed.txt",
     srcs: [
+        ":art.module.public.api{.public.removed-api.txt}",
         ":conscrypt.module.public.api{.public.removed-api.txt}",
         ":framework-media{.public.removed-api.txt}",
         ":framework-mediaprovider{.public.removed-api.txt}",
@@ -86,6 +94,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 +131,10 @@
             dest: "system-current.txt",
         },
         {
-            targets: ["sdk", "win_sdk"],
+            targets: [
+                "sdk",
+                "win_sdk",
+            ],
             dir: "apistubs/android/system/api",
             dest: "android.txt",
         },
@@ -177,7 +189,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/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/idmap2/Android.bp b/cmds/idmap2/Android.bp
index 878cef9..e21a6b2 100644
--- a/cmds/idmap2/Android.bp
+++ b/cmds/idmap2/Android.bp
@@ -181,7 +181,6 @@
         "idmap2/Dump.cpp",
         "idmap2/Lookup.cpp",
         "idmap2/Main.cpp",
-        "idmap2/Scan.cpp",
     ],
     target: {
         android: {
diff --git a/cmds/idmap2/idmap2/Commands.h b/cmds/idmap2/idmap2/Commands.h
index 69eea8d..4099671 100644
--- a/cmds/idmap2/idmap2/Commands.h
+++ b/cmds/idmap2/idmap2/Commands.h
@@ -26,6 +26,5 @@
 android::idmap2::Result<android::idmap2::Unit> CreateMultiple(const std::vector<std::string>& args);
 android::idmap2::Result<android::idmap2::Unit> Dump(const std::vector<std::string>& args);
 android::idmap2::Result<android::idmap2::Unit> Lookup(const std::vector<std::string>& args);
-android::idmap2::Result<android::idmap2::Unit> Scan(const std::vector<std::string>& args);
 
 #endif  // IDMAP2_IDMAP2_COMMANDS_H_
diff --git a/cmds/idmap2/idmap2/Lookup.cpp b/cmds/idmap2/idmap2/Lookup.cpp
index c441709..437180d 100644
--- a/cmds/idmap2/idmap2/Lookup.cpp
+++ b/cmds/idmap2/idmap2/Lookup.cpp
@@ -45,11 +45,8 @@
 using android::ApkAssetsCookie;
 using android::AssetManager2;
 using android::ConfigDescription;
-using android::is_valid_resid;
-using android::kInvalidCookie;
 using android::Res_value;
 using android::ResStringPool;
-using android::ResTable_config;
 using android::StringPiece16;
 using android::base::StringPrintf;
 using android::idmap2::CommandLineOptions;
@@ -59,7 +56,6 @@
 using android::idmap2::Result;
 using android::idmap2::Unit;
 using android::idmap2::utils::ExtractOverlayManifestInfo;
-using android::util::Utf16ToUtf8;
 
 namespace {
 
@@ -69,25 +65,23 @@
 
   // first, try to parse as a hex number
   char* endptr = nullptr;
-  ResourceId resid;
-  resid = strtol(res.c_str(), &endptr, kBaseHex);
+  const ResourceId parsed_resid = strtol(res.c_str(), &endptr, kBaseHex);
   if (*endptr == '\0') {
-    return resid;
+    return parsed_resid;
   }
 
   // next, try to parse as a package:type/name string
-  resid = am.GetResourceId(res, "", fallback_package);
-  if (is_valid_resid(resid)) {
-    return resid;
+  if (auto resid = am.GetResourceId(res, "", fallback_package); resid.ok()) {
+    return *resid;
   }
 
   // end of the road: res could not be parsed
   return Error("failed to obtain resource id for %s", res.c_str());
 }
 
-void PrintValue(AssetManager2* const am, const Res_value& value, const ApkAssetsCookie& cookie,
+void PrintValue(AssetManager2* const am, const AssetManager2::SelectedValue& value,
                 std::string* const out) {
-  switch (value.dataType) {
+  switch (value.type) {
     case Res_value::TYPE_INT_DEC:
       out->append(StringPrintf("%d", value.data));
       break;
@@ -98,30 +92,21 @@
       out->append(value.data != 0 ? "true" : "false");
       break;
     case Res_value::TYPE_STRING: {
-      const ResStringPool* pool = am->GetStringPoolForCookie(cookie);
+      const ResStringPool* pool = am->GetStringPoolForCookie(value.cookie);
       out->append("\"");
-      size_t len;
-      if (pool->isUTF8()) {
-        const char* str = pool->string8At(value.data, &len);
-        out->append(str, len);
-      } else {
-        const char16_t* str16 = pool->stringAt(value.data, &len);
-        out->append(Utf16ToUtf8(StringPiece16(str16, len)));
+      if (auto str = pool->string8ObjectAt(value.data); str.ok()) {
+        out->append(*str);
       }
-      out->append("\"");
     } break;
     default:
-      out->append(StringPrintf("dataType=0x%02x data=0x%08x", value.dataType, value.data));
+      out->append(StringPrintf("dataType=0x%02x data=0x%08x", value.type, value.data));
       break;
   }
 }
 
 Result<std::string> WARN_UNUSED GetValue(AssetManager2* const am, ResourceId resid) {
-  Res_value value;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = am->GetResource(resid, true, 0, &value, &config, &flags);
-  if (cookie == kInvalidCookie) {
+  auto value = am->GetResource(resid);
+  if (!value.has_value()) {
     return Error("no resource 0x%08x in asset manager", resid);
   }
 
@@ -129,41 +114,35 @@
 
   // TODO(martenkongstad): use optional parameter GetResource(..., std::string*
   // stacktrace = NULL) instead
-  out.append(StringPrintf("cookie=%d ", cookie));
+  out.append(StringPrintf("cookie=%d ", value->cookie));
 
   out.append("config='");
-  out.append(config.toString().c_str());
+  out.append(value->config.toString().c_str());
   out.append("' value=");
 
-  if (value.dataType == Res_value::TYPE_REFERENCE) {
-    const android::ResolvedBag* bag = am->GetBag(static_cast<uint32_t>(value.data));
-    if (bag == nullptr) {
-      out.append(StringPrintf("dataType=0x%02x data=0x%08x", value.dataType, value.data));
+  if (value->type == Res_value::TYPE_REFERENCE) {
+    auto bag_result = am->GetBag(static_cast<uint32_t>(value->data));
+    if (!bag_result.has_value()) {
+      out.append(StringPrintf("dataType=0x%02x data=0x%08x", value->type, value->data));
       return out;
     }
+
     out.append("[");
-    Res_value bag_val;
-    ResTable_config selected_config;
-    uint32_t flags;
-    uint32_t ref;
-    ApkAssetsCookie bag_cookie;
+    const android::ResolvedBag* bag = bag_result.value();
     for (size_t i = 0; i < bag->entry_count; ++i) {
-      const android::ResolvedBag::Entry& entry = bag->entries[i];
-      bag_val = entry.value;
-      bag_cookie = am->ResolveReference(entry.cookie, &bag_val, &selected_config, &flags, &ref);
-      if (bag_cookie == kInvalidCookie) {
-        out.append(
-            StringPrintf("Error: dataType=0x%02x data=0x%08x", bag_val.dataType, bag_val.data));
+      AssetManager2::SelectedValue entry(bag, bag->entries[i]);
+      if (am->ResolveReference(entry).has_value()) {
+        out.append(StringPrintf("Error: dataType=0x%02x data=0x%08x", entry.type, entry.data));
         continue;
       }
-      PrintValue(am, bag_val, bag_cookie, &out);
+      PrintValue(am, entry, &out);
       if (i != bag->entry_count - 1) {
         out.append(", ");
       }
     }
     out.append("]");
   } else {
-    PrintValue(am, value, cookie, &out);
+    PrintValue(am, *value, &out);
   }
 
   return out;
diff --git a/cmds/idmap2/idmap2/Main.cpp b/cmds/idmap2/idmap2/Main.cpp
index fb093f0..aa6d0e7 100644
--- a/cmds/idmap2/idmap2/Main.cpp
+++ b/cmds/idmap2/idmap2/Main.cpp
@@ -53,8 +53,10 @@
 int main(int argc, char** argv) {
   SYSTRACE << "main";
   const NameToFunctionMap commands = {
-      {"create", Create}, {"create-multiple", CreateMultiple}, {"dump", Dump}, {"lookup", Lookup},
-      {"scan", Scan},
+      {"create", Create},
+      {"create-multiple", CreateMultiple},
+      {"dump", Dump},
+      {"lookup", Lookup},
   };
   if (argc <= 1) {
     PrintUsage(commands, std::cerr);
diff --git a/cmds/idmap2/idmap2/Scan.cpp b/cmds/idmap2/idmap2/Scan.cpp
deleted file mode 100644
index 3625045..0000000
--- a/cmds/idmap2/idmap2/Scan.cpp
+++ /dev/null
@@ -1,257 +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 <dirent.h>
-
-#include <fstream>
-#include <memory>
-#include <ostream>
-#include <set>
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "Commands.h"
-#include "android-base/properties.h"
-#include "idmap2/CommandLineOptions.h"
-#include "idmap2/CommandUtils.h"
-#include "idmap2/FileUtils.h"
-#include "idmap2/Idmap.h"
-#include "idmap2/Policies.h"
-#include "idmap2/PolicyUtils.h"
-#include "idmap2/ResourceUtils.h"
-#include "idmap2/Result.h"
-#include "idmap2/SysTrace.h"
-#include "idmap2/XmlParser.h"
-
-using android::idmap2::CommandLineOptions;
-using android::idmap2::Error;
-using android::idmap2::Idmap;
-using android::idmap2::Result;
-using android::idmap2::Unit;
-using android::idmap2::policy::kPolicyOdm;
-using android::idmap2::policy::kPolicyOem;
-using android::idmap2::policy::kPolicyProduct;
-using android::idmap2::policy::kPolicyPublic;
-using android::idmap2::policy::kPolicySystem;
-using android::idmap2::policy::kPolicyVendor;
-using android::idmap2::utils::ExtractOverlayManifestInfo;
-using android::idmap2::utils::FindFiles;
-using android::idmap2::utils::OverlayManifestInfo;
-using android::idmap2::utils::PoliciesToBitmaskResult;
-
-using PolicyBitmask = android::ResTable_overlayable_policy_header::PolicyBitmask;
-
-namespace {
-
-struct InputOverlay {
-  bool operator<(InputOverlay const& rhs) const {
-    return priority < rhs.priority || (priority == rhs.priority && apk_path < rhs.apk_path);
-  }
-
-  std::string apk_path;               // NOLINT(misc-non-private-member-variables-in-classes)
-  std::string idmap_path;             // NOLINT(misc-non-private-member-variables-in-classes)
-  int priority;                       // NOLINT(misc-non-private-member-variables-in-classes)
-  std::vector<std::string> policies;  // NOLINT(misc-non-private-member-variables-in-classes)
-  bool ignore_overlayable;            // NOLINT(misc-non-private-member-variables-in-classes)
-};
-
-bool VendorIsQOrLater() {
-  constexpr int kQSdkVersion = 29;
-  constexpr int kBase = 10;
-  std::string version_prop = android::base::GetProperty("ro.vndk.version", "29");
-  int version = strtol(version_prop.data(), nullptr, kBase);
-
-  // If the string cannot be parsed, it is a development sdk codename.
-  return version >= kQSdkVersion || version == 0;
-}
-
-Result<std::unique_ptr<std::vector<std::string>>> FindApkFiles(const std::vector<std::string>& dirs,
-                                                               bool recursive) {
-  SYSTRACE << "FindApkFiles " << dirs << " " << recursive;
-  const auto predicate = [](unsigned char type, const std::string& path) -> bool {
-    static constexpr size_t kExtLen = 4;  // strlen(".apk")
-    return type == DT_REG && path.size() > kExtLen &&
-           path.compare(path.size() - kExtLen, kExtLen, ".apk") == 0;
-  };
-  // pass apk paths through a set to filter out duplicates
-  std::set<std::string> paths;
-  for (const auto& dir : dirs) {
-    const auto apk_paths = FindFiles(dir, recursive, predicate);
-    if (!apk_paths) {
-      return Error("failed to open directory %s", dir.c_str());
-    }
-    paths.insert(apk_paths->cbegin(), apk_paths->cend());
-  }
-  return std::make_unique<std::vector<std::string>>(paths.cbegin(), paths.cend());
-}
-
-std::vector<std::string> PoliciesForPath(const std::string& apk_path) {
-  // clang-format off
-  static const std::vector<std::pair<std::string, std::string>> values = {
-      {"/odm/", kPolicyOdm},
-      {"/oem/", kPolicyOem},
-      {"/product/", kPolicyProduct},
-      {"/system/", kPolicySystem},
-      {"/system_ext/", kPolicySystem},
-      {"/vendor/", kPolicyVendor},
-  };
-  // clang-format on
-
-  std::vector<std::string> fulfilled_policies = {kPolicyPublic};
-  for (auto const& pair : values) {
-    if (apk_path.compare(0, pair.first.size(), pair.first) == 0) {
-      fulfilled_policies.emplace_back(pair.second);
-      break;
-    }
-  }
-
-  return fulfilled_policies;
-}
-
-}  // namespace
-
-Result<Unit> Scan(const std::vector<std::string>& args) {
-  SYSTRACE << "Scan " << args;
-  std::vector<std::string> input_directories;
-  std::string target_package_name;
-  std::string target_apk_path;
-  std::string output_directory;
-  std::vector<std::string> override_policies;
-  bool recursive = false;
-
-  const CommandLineOptions opts =
-      CommandLineOptions("idmap2 scan")
-          .MandatoryOption("--input-directory", "directory containing overlay apks to scan",
-                           &input_directories)
-          .OptionalFlag("--recursive", "also scan subfolders of overlay-directory", &recursive)
-          .MandatoryOption("--target-package-name", "package name of target package",
-                           &target_package_name)
-          .MandatoryOption("--target-apk-path", "path to target apk", &target_apk_path)
-          .MandatoryOption("--output-directory",
-                           "directory in which to write artifacts (idmap files and overlays.list)",
-                           &output_directory)
-          .OptionalOption(
-              "--override-policy",
-              "input: an overlayable policy this overlay fulfills "
-              "(if none or supplied, the overlays will not have their policies overriden",
-              &override_policies);
-  const auto opts_ok = opts.Parse(args);
-  if (!opts_ok) {
-    return opts_ok.GetError();
-  }
-
-  const auto apk_paths = FindApkFiles(input_directories, recursive);
-  if (!apk_paths) {
-    return Error(apk_paths.GetError(), "failed to find apk files");
-  }
-
-  std::vector<InputOverlay> interesting_apks;
-  for (const std::string& path : **apk_paths) {
-    Result<OverlayManifestInfo> overlay_info =
-        ExtractOverlayManifestInfo(path, /* assert_overlay */ false);
-    if (!overlay_info) {
-      return overlay_info.GetError();
-    }
-
-    if (!overlay_info->is_static) {
-      continue;
-    }
-
-    if (overlay_info->target_package.empty() ||
-        overlay_info->target_package != target_package_name) {
-      continue;
-    }
-
-    if (overlay_info->priority < 0) {
-      continue;
-    }
-
-    // Note that conditional property enablement/exclusion only applies if
-    // the attribute is present. In its absence, all overlays are presumed enabled.
-    if (!overlay_info->requiredSystemPropertyName.empty() &&
-        !overlay_info->requiredSystemPropertyValue.empty()) {
-      // if property set & equal to value, then include overlay - otherwise skip
-      if (android::base::GetProperty(overlay_info->requiredSystemPropertyName, "") !=
-          overlay_info->requiredSystemPropertyValue) {
-        continue;
-      }
-    }
-
-    std::vector<std::string> fulfilled_policies;
-    if (!override_policies.empty()) {
-      fulfilled_policies = override_policies;
-    } else {
-      fulfilled_policies = PoliciesForPath(path);
-    }
-
-    bool ignore_overlayable = false;
-    if (std::find(fulfilled_policies.begin(), fulfilled_policies.end(), kPolicyVendor) !=
-            fulfilled_policies.end() &&
-        !VendorIsQOrLater()) {
-      // If the overlay is on a pre-Q vendor partition, do not enforce overlayable
-      // restrictions on this overlay because the pre-Q platform has no understanding of
-      // overlayable.
-      ignore_overlayable = true;
-    }
-
-    std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, path);
-
-    // Sort the static overlays in ascending priority order
-    InputOverlay input{path, idmap_path, overlay_info->priority, fulfilled_policies,
-                       ignore_overlayable};
-    interesting_apks.insert(
-        std::lower_bound(interesting_apks.begin(), interesting_apks.end(), input), input);
-  }
-
-  std::stringstream stream;
-  for (const auto& overlay : interesting_apks) {
-    const auto policy_bitmask = PoliciesToBitmaskResult(overlay.policies);
-    if (!policy_bitmask) {
-      LOG(WARNING) << "failed to create idmap for overlay apk path \"" << overlay.apk_path
-                   << "\": " << policy_bitmask.GetErrorMessage();
-      continue;
-    }
-
-    if (!Verify(overlay.idmap_path, target_apk_path, overlay.apk_path, *policy_bitmask,
-                !overlay.ignore_overlayable)) {
-      std::vector<std::string> create_args = {"--target-apk-path",  target_apk_path,
-                                              "--overlay-apk-path", overlay.apk_path,
-                                              "--idmap-path",       overlay.idmap_path};
-      if (overlay.ignore_overlayable) {
-        create_args.emplace_back("--ignore-overlayable");
-      }
-
-      for (const std::string& policy : overlay.policies) {
-        create_args.emplace_back("--policy");
-        create_args.emplace_back(policy);
-      }
-
-      const auto create_ok = Create(create_args);
-      if (!create_ok) {
-        LOG(WARNING) << "failed to create idmap for overlay apk path \"" << overlay.apk_path
-                     << "\": " << create_ok.GetError().GetMessage();
-        continue;
-      }
-    }
-
-    stream << overlay.idmap_path << std::endl;
-  }
-
-  std::cout << stream.str();
-
-  return Unit{};
-}
diff --git a/cmds/idmap2/include/idmap2/FileUtils.h b/cmds/idmap2/include/idmap2/FileUtils.h
index 3f03236..c4e0e1f 100644
--- a/cmds/idmap2/include/idmap2/FileUtils.h
+++ b/cmds/idmap2/include/idmap2/FileUtils.h
@@ -17,27 +17,13 @@
 #ifndef IDMAP2_INCLUDE_IDMAP2_FILEUTILS_H_
 #define IDMAP2_INCLUDE_IDMAP2_FILEUTILS_H_
 
-#include <sys/types.h>
-
-#include <functional>
-#include <memory>
 #include <string>
-#include <vector>
 
 namespace android::idmap2::utils {
 
 constexpr const char* kIdmapCacheDir = "/data/resource-cache";
 constexpr const mode_t kIdmapFilePermissionMask = 0133;  // u=rw,g=r,o=r
 
-typedef std::function<bool(unsigned char type /* DT_* from dirent.h */, const std::string& path)>
-    FindFilesPredicate;
-std::unique_ptr<std::vector<std::string>> FindFiles(const std::string& root, bool recurse,
-                                                    const FindFilesPredicate& predicate);
-
-std::unique_ptr<std::string> ReadFile(int fd);
-
-std::unique_ptr<std::string> ReadFile(const std::string& path);
-
 bool UidHasWriteAccessToPath(uid_t uid, const std::string& path);
 
 }  // namespace android::idmap2::utils
diff --git a/cmds/idmap2/include/idmap2/ResourceMapping.h b/cmds/idmap2/include/idmap2/ResourceMapping.h
index 0a58ec4..f66916c 100644
--- a/cmds/idmap2/include/idmap2/ResourceMapping.h
+++ b/cmds/idmap2/include/idmap2/ResourceMapping.h
@@ -117,7 +117,8 @@
   static Result<ResourceMapping> CreateResourceMappingLegacy(const AssetManager2* target_am,
                                                              const AssetManager2* overlay_am,
                                                              const LoadedPackage* target_package,
-                                                             const LoadedPackage* overlay_package);
+                                                             const LoadedPackage* overlay_package,
+                                                             LogInfo& log_info);
 
   // Removes resources that do not pass policy or overlayable checks of the target package.
   void FilterOverlayableResources(const AssetManager2* target_am,
diff --git a/cmds/idmap2/libidmap2/FileUtils.cpp b/cmds/idmap2/libidmap2/FileUtils.cpp
index 3e8e329..3af1f70 100644
--- a/cmds/idmap2/libidmap2/FileUtils.cpp
+++ b/cmds/idmap2/libidmap2/FileUtils.cpp
@@ -16,19 +16,7 @@
 
 #include "idmap2/FileUtils.h"
 
-#include <dirent.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <cerrno>
-#include <climits>
-#include <cstdlib>
-#include <cstring>
-#include <fstream>
-#include <memory>
 #include <string>
-#include <utility>
-#include <vector>
 
 #include "android-base/file.h"
 #include "android-base/macros.h"
@@ -37,54 +25,6 @@
 
 namespace android::idmap2::utils {
 
-std::unique_ptr<std::vector<std::string>> FindFiles(const std::string& root, bool recurse,
-                                                    const FindFilesPredicate& predicate) {
-  DIR* dir = opendir(root.c_str());
-  if (dir == nullptr) {
-    return nullptr;
-  }
-  std::unique_ptr<std::vector<std::string>> vector(new std::vector<std::string>());
-  struct dirent* dirent;
-  while ((dirent = readdir(dir)) != nullptr) {
-    const std::string path = root + "/" + dirent->d_name;
-    if (predicate(dirent->d_type, path)) {
-      vector->push_back(path);
-    }
-    if (recurse && dirent->d_type == DT_DIR && strcmp(dirent->d_name, ".") != 0 &&
-        strcmp(dirent->d_name, "..") != 0) {
-      auto sub_vector = FindFiles(path, recurse, predicate);
-      if (!sub_vector) {
-        closedir(dir);
-        return nullptr;
-      }
-      vector->insert(vector->end(), sub_vector->begin(), sub_vector->end());
-    }
-  }
-  closedir(dir);
-
-  return vector;
-}
-
-std::unique_ptr<std::string> ReadFile(const std::string& path) {
-  std::unique_ptr<std::string> str(new std::string());
-  std::ifstream fin(path);
-  str->append({std::istreambuf_iterator<char>(fin), std::istreambuf_iterator<char>()});
-  fin.close();
-  return str;
-}
-
-std::unique_ptr<std::string> ReadFile(int fd) {
-  static constexpr const size_t kBufSize = 1024;
-
-  std::unique_ptr<std::string> str(new std::string());
-  char buf[kBufSize];
-  ssize_t r;
-  while ((r = read(fd, buf, sizeof(buf))) > 0) {
-    str->append(buf, r);
-  }
-  return r == 0 ? std::move(str) : nullptr;
-}
-
 #ifdef __ANDROID__
 bool UidHasWriteAccessToPath(uid_t uid, const std::string& path) {
   // resolve symlinks and relative paths; the directories must exist
diff --git a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
index a93202a..3037a79 100644
--- a/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
+++ b/cmds/idmap2/libidmap2/PrettyPrintVisitor.cpp
@@ -100,10 +100,9 @@
     stream_ << TAB << base::StringPrintf("0x%08x -> ", target_entry.target_id)
             << utils::DataTypeToString(target_entry.value.data_type);
 
-    size_t unused;
     if (target_entry.value.data_type == Res_value::TYPE_STRING) {
-      auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset, &unused);
-      stream_ << " \"" << StringPiece16(str) << "\"";
+      auto str = string_pool.stringAt(target_entry.value.data_value - string_pool_offset);
+      stream_ << " \"" << str.value_or(StringPiece16(u"")) << "\"";
     } else {
       stream_ << " " << base::StringPrintf("0x%08x", target_entry.value.data_value);
     }
diff --git a/cmds/idmap2/libidmap2/ResourceMapping.cpp b/cmds/idmap2/libidmap2/ResourceMapping.cpp
index 31f1c16..d777cbf 100644
--- a/cmds/idmap2/libidmap2/ResourceMapping.cpp
+++ b/cmds/idmap2/libidmap2/ResourceMapping.cpp
@@ -71,9 +71,10 @@
   if (!target_package.DefinesOverlayable()) {
     return (sDefaultPolicies & fulfilled_policies) != 0
                ? Result<Unit>({})
-               : Error("overlay must be preinstalled, signed with the same signature as the target,"
-                       " or signed with the same signature as the package referenced through"
-                       " <overlay-config-signature>.");
+               : Error(
+                     "overlay must be preinstalled, signed with the same signature as the target,"
+                     " or signed with the same signature as the package referenced through"
+                     " <overlay-config-signature>.");
   }
 
   const OverlayableInfo* overlayable_info = target_package.GetOverlayableInfo(target_resource);
@@ -119,32 +120,25 @@
 
 Result<std::unique_ptr<Asset>> OpenNonAssetFromResource(const ResourceId& resource_id,
                                                         const AssetManager2& asset_manager) {
-  Res_value value{};
-  ResTable_config selected_config{};
-  uint32_t flags;
-  auto cookie =
-      asset_manager.GetResource(resource_id, /* may_be_bag */ false,
-                                /* density_override */ 0U, &value, &selected_config, &flags);
-  if (cookie == kInvalidCookie) {
+  auto value = asset_manager.GetResource(resource_id);
+  if (!value.has_value()) {
     return Error("failed to find resource for id 0x%08x", resource_id);
   }
 
-  if (value.dataType != Res_value::TYPE_STRING) {
+  if (value->type != Res_value::TYPE_STRING) {
     return Error("resource for is 0x%08x is not a file", resource_id);
   }
 
-  auto string_pool = asset_manager.GetStringPoolForCookie(cookie);
-  size_t len;
-  auto file_path16 = string_pool->stringAt(value.data, &len);
-  if (file_path16 == nullptr) {
-    return Error("failed to find string for index %d", value.data);
+  auto string_pool = asset_manager.GetStringPoolForCookie(value->cookie);
+  auto file = string_pool->string8ObjectAt(value->data);
+  if (!file.has_value()) {
+    return Error("failed to find string for index %d", value->data);
   }
 
   // Load the overlay resource mappings from the file specified using android:resourcesMap.
-  auto file_path = String8(String16(file_path16));
-  auto asset = asset_manager.OpenNonAsset(file_path.c_str(), Asset::AccessMode::ACCESS_BUFFER);
+  auto asset = asset_manager.OpenNonAsset(file->c_str(), Asset::AccessMode::ACCESS_BUFFER);
   if (asset == nullptr) {
-    return Error("file \"%s\" not found", file_path.c_str());
+    return Error("file \"%s\" not found", file->c_str());
   }
 
   return asset;
@@ -190,16 +184,16 @@
       return Error(R"(<item> tag missing expected attribute "value")");
     }
 
-    ResourceId target_id =
+    auto target_id_result =
         target_am->GetResourceId(*target_resource, "", target_package->GetPackageName());
-    if (target_id == 0U) {
+    if (!target_id_result.has_value()) {
       log_info.Warning(LogMessage() << "failed to find resource \"" << *target_resource
                                     << "\" in target resources");
       continue;
     }
 
     // Retrieve the compile-time resource id of the target resource.
-    target_id = REWRITE_PACKAGE(target_id, target_package_id);
+    uint32_t target_id = REWRITE_PACKAGE(*target_id_result, target_package_id);
 
     if (overlay_resource->dataType == Res_value::TYPE_STRING) {
       overlay_resource->data += string_pool_offset;
@@ -220,7 +214,7 @@
 
 Result<ResourceMapping> ResourceMapping::CreateResourceMappingLegacy(
     const AssetManager2* target_am, const AssetManager2* overlay_am,
-    const LoadedPackage* target_package, const LoadedPackage* overlay_package) {
+    const LoadedPackage* target_package, const LoadedPackage* overlay_package, LogInfo& log_info) {
   ResourceMapping resource_mapping;
   const uint8_t target_package_id = target_package->GetPackageId();
   const auto end = overlay_package->end();
@@ -234,13 +228,15 @@
     // Find the resource with the same type and entry name within the target package.
     const std::string full_name =
         base::StringPrintf("%s:%s", target_package->GetPackageName().c_str(), name->c_str());
-    ResourceId target_resource = target_am->GetResourceId(full_name);
-    if (target_resource == 0U) {
+    auto target_resource_result = target_am->GetResourceId(full_name);
+    if (!target_resource_result.has_value()) {
+      log_info.Warning(LogMessage() << "failed to find resource \"" << full_name
+                                    << "\" in target resources");
       continue;
     }
 
     // Retrieve the compile-time resource id of the target resource.
-    target_resource = REWRITE_PACKAGE(target_resource, target_package_id);
+    ResourceId target_resource = REWRITE_PACKAGE(*target_resource_result, target_package_id);
     resource_mapping.AddMapping(target_resource, overlay_resid,
                                 false /* rewrite_overlay_reference */);
   }
@@ -347,7 +343,9 @@
     auto& string_pool = (*parser)->get_strings();
     string_pool_data_length = string_pool.bytes();
     string_pool_data.reset(new uint8_t[string_pool_data_length]);
-    memcpy(string_pool_data.get(), string_pool.data(), string_pool_data_length);
+
+    // Overlays should not be incrementally installed, so calling unsafe_ptr is fine here.
+    memcpy(string_pool_data.get(), string_pool.data().unsafe_ptr(), string_pool_data_length);
 
     // Offset string indices by the size of the overlay resource table string pool.
     string_pool_offset = overlay_arsc->GetStringPool()->size();
@@ -358,7 +356,7 @@
     // If no file is specified using android:resourcesMap, it is assumed that the overlay only
     // defines resources intended to override target resources of the same type and name.
     resource_mapping = CreateResourceMappingLegacy(&target_asset_manager, &overlay_asset_manager,
-                                                   target_pkg, overlay_pkg);
+                                                   target_pkg, overlay_pkg, log_info);
   }
 
   if (!resource_mapping) {
diff --git a/cmds/idmap2/libidmap2/ResourceUtils.cpp b/cmds/idmap2/libidmap2/ResourceUtils.cpp
index 98d026b..e817140 100644
--- a/cmds/idmap2/libidmap2/ResourceUtils.cpp
+++ b/cmds/idmap2/libidmap2/ResourceUtils.cpp
@@ -72,21 +72,21 @@
 }
 
 Result<std::string> ResToTypeEntryName(const AssetManager2& am, uint32_t resid) {
-  AssetManager2::ResourceName name;
-  if (!am.GetResourceName(resid, &name)) {
+  const auto name = am.GetResourceName(resid);
+  if (!name.has_value()) {
     return Error("no resource 0x%08x in asset manager", resid);
   }
   std::string out;
-  if (name.type != nullptr) {
-    out.append(name.type, name.type_len);
+  if (name->type != nullptr) {
+    out.append(name->type, name->type_len);
   } else {
-    out += Utf16ToUtf8(StringPiece16(name.type16, name.type_len));
+    out += Utf16ToUtf8(StringPiece16(name->type16, name->type_len));
   }
   out.append("/");
-  if (name.entry != nullptr) {
-    out.append(name.entry, name.entry_len);
+  if (name->entry != nullptr) {
+    out.append(name->entry, name->entry_len);
   } else {
-    out += Utf16ToUtf8(StringPiece16(name.entry16, name.entry_len));
+    out += Utf16ToUtf8(StringPiece16(name->entry16, name->entry_len));
   }
   return out;
 }
diff --git a/cmds/idmap2/libidmap2/XmlParser.cpp b/cmds/idmap2/libidmap2/XmlParser.cpp
index 526a560..4030b83 100644
--- a/cmds/idmap2/libidmap2/XmlParser.cpp
+++ b/cmds/idmap2/libidmap2/XmlParser.cpp
@@ -98,18 +98,19 @@
 
   switch ((*value).dataType) {
     case Res_value::TYPE_STRING: {
-      size_t len;
-      const String16 value16(parser_.getStrings().stringAt((*value).data, &len));
-      return std::string(String8(value16).c_str());
+      if (auto str = parser_.getStrings().string8ObjectAt((*value).data); str.ok()) {
+        return std::string(str->string());
+      }
+      break;
     }
     case Res_value::TYPE_INT_DEC:
     case Res_value::TYPE_INT_HEX:
     case Res_value::TYPE_INT_BOOLEAN: {
       return std::to_string((*value).data);
     }
-    default:
-      return Error(R"(Failed to convert attribute "%s" value to a string)", name.c_str());
   }
+
+  return Error(R"(Failed to convert attribute "%s" value to a string)", name.c_str());
 }
 
 Result<Res_value> XmlParser::Node::GetAttributeValue(const std::string& name) const {
diff --git a/cmds/idmap2/tests/FileUtilsTests.cpp b/cmds/idmap2/tests/FileUtilsTests.cpp
index 8af4037..5750ca1 100644
--- a/cmds/idmap2/tests/FileUtilsTests.cpp
+++ b/cmds/idmap2/tests/FileUtilsTests.cpp
@@ -14,73 +14,16 @@
  * limitations under the License.
  */
 
-#include <dirent.h>
-#include <fcntl.h>
-
-#include <set>
 #include <string>
 
 #include "TestHelpers.h"
-#include "android-base/macros.h"
 #include "android-base/stringprintf.h"
-#include "gmock/gmock.h"
 #include "gtest/gtest.h"
 #include "idmap2/FileUtils.h"
 #include "private/android_filesystem_config.h"
 
-using ::testing::NotNull;
-
 namespace android::idmap2::utils {
 
-TEST(FileUtilsTests, FindFilesFindEverythingNonRecursive) {
-  const auto& root = GetTestDataPath();
-  auto v = utils::FindFiles(root, false,
-                            [](unsigned char type ATTRIBUTE_UNUSED,
-                               const std::string& path ATTRIBUTE_UNUSED) -> bool { return true; });
-  ASSERT_THAT(v, NotNull());
-  ASSERT_EQ(v->size(), 7U);
-  ASSERT_EQ(std::set<std::string>(v->begin(), v->end()), std::set<std::string>({
-                                                             root + "/.",
-                                                             root + "/..",
-                                                             root + "/overlay",
-                                                             root + "/target",
-                                                             root + "/signature-overlay",
-                                                             root + "/system-overlay",
-                                                             root + "/system-overlay-invalid",
-                                                         }));
-}
-
-TEST(FileUtilsTests, FindFilesFindApkFilesRecursive) {
-  const auto& root = GetTestDataPath();
-  auto v = utils::FindFiles(root, true, [](unsigned char type, const std::string& path) -> bool {
-    return type == DT_REG && path.size() > 4 && path.compare(path.size() - 4, 4, ".apk") == 0;
-  });
-  ASSERT_THAT(v, NotNull());
-  ASSERT_EQ(v->size(), 11U);
-  ASSERT_EQ(std::set<std::string>(v->begin(), v->end()),
-            std::set<std::string>(
-                {root + "/target/target.apk", root + "/target/target-no-overlayable.apk",
-                 root + "/overlay/overlay.apk", root + "/overlay/overlay-no-name.apk",
-                 root + "/overlay/overlay-no-name-static.apk", root + "/overlay/overlay-shared.apk",
-                 root + "/overlay/overlay-static-1.apk", root + "/overlay/overlay-static-2.apk",
-                 root + "/signature-overlay/signature-overlay.apk",
-                 root + "/system-overlay/system-overlay.apk",
-                 root + "/system-overlay-invalid/system-overlay-invalid.apk"}));
-}
-
-TEST(FileUtilsTests, ReadFile) {
-  int pipefd[2];
-  ASSERT_EQ(pipe2(pipefd, O_CLOEXEC), 0);
-
-  ASSERT_EQ(write(pipefd[1], "foobar", 6), 6);
-  close(pipefd[1]);
-
-  auto data = ReadFile(pipefd[0]);
-  ASSERT_THAT(data, NotNull());
-  ASSERT_EQ(*data, "foobar");
-  close(pipefd[0]);
-}
-
 #ifdef __ANDROID__
 TEST(FileUtilsTests, UidHasWriteAccessToPath) {
   constexpr const char* tmp_path = "/data/local/tmp/test@idmap";
diff --git a/cmds/idmap2/tests/Idmap2BinaryTests.cpp b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
index eba102da..e7e9e4c 100644
--- a/cmds/idmap2/tests/Idmap2BinaryTests.cpp
+++ b/cmds/idmap2/tests/Idmap2BinaryTests.cpp
@@ -159,131 +159,6 @@
   unlink(GetIdmapPath().c_str());
 }
 
-TEST_F(Idmap2BinaryTests, Scan) {
-  SKIP_TEST_IF_CANT_EXEC_IDMAP2;
-
-  const std::string overlay_static_no_name_apk_path =
-      GetTestDataPath() + "/overlay/overlay-no-name-static.apk";
-  const std::string overlay_static_1_apk_path = GetTestDataPath() + "/overlay/overlay-static-1.apk";
-  const std::string overlay_static_2_apk_path = GetTestDataPath() + "/overlay/overlay-static-2.apk";
-  const std::string idmap_static_no_name_path =
-      Idmap::CanonicalIdmapPathFor(GetTempDirPath(), overlay_static_no_name_apk_path);
-  const std::string idmap_static_1_path =
-      Idmap::CanonicalIdmapPathFor(GetTempDirPath(), overlay_static_1_apk_path);
-  const std::string idmap_static_2_path =
-      Idmap::CanonicalIdmapPathFor(GetTempDirPath(), overlay_static_2_apk_path);
-
-  // single input directory, recursive
-  // clang-format off
-  auto result = ExecuteBinary({"idmap2",
-                               "scan",
-                               "--input-directory", GetTestDataPath(),
-                               "--recursive",
-                               "--target-package-name", "test.target",
-                               "--target-apk-path", GetTargetApkPath(),
-                               "--output-directory", GetTempDirPath(),
-                               "--override-policy", "public"});
-  // clang-format on
-  ASSERT_THAT(result, NotNull());
-  ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
-  std::stringstream expected;
-  expected << idmap_static_no_name_path << std::endl;
-  expected << idmap_static_1_path << std::endl;
-  expected << idmap_static_2_path << std::endl;
-  ASSERT_EQ(result->stdout, expected.str());
-
-  auto idmap_static_no_name_raw_string = utils::ReadFile(idmap_static_no_name_path);
-  auto idmap_static_no_name_raw_stream = std::istringstream(*idmap_static_no_name_raw_string);
-  auto idmap_static_no_name = Idmap::FromBinaryStream(idmap_static_no_name_raw_stream);
-  ASSERT_TRUE(idmap_static_no_name);
-  ASSERT_IDMAP(**idmap_static_no_name, GetTargetApkPath(), overlay_static_no_name_apk_path);
-
-  auto idmap_static_1_raw_string = utils::ReadFile(idmap_static_1_path);
-  auto idmap_static_1_raw_stream = std::istringstream(*idmap_static_1_raw_string);
-  auto idmap_static_1 = Idmap::FromBinaryStream(idmap_static_1_raw_stream);
-  ASSERT_TRUE(idmap_static_1);
-  ASSERT_IDMAP(**idmap_static_1, GetTargetApkPath(), overlay_static_1_apk_path);
-
-  auto idmap_static_2_raw_string = utils::ReadFile(idmap_static_2_path);
-  auto idmap_static_2_raw_stream = std::istringstream(*idmap_static_2_raw_string);
-  auto idmap_static_2 = Idmap::FromBinaryStream(idmap_static_2_raw_stream);
-  ASSERT_TRUE(idmap_static_2);
-  ASSERT_IDMAP(**idmap_static_2, GetTargetApkPath(), overlay_static_2_apk_path);
-
-  unlink(idmap_static_no_name_path.c_str());
-  unlink(idmap_static_2_path.c_str());
-  unlink(idmap_static_1_path.c_str());
-
-  // multiple input directories, non-recursive
-  // clang-format off
-  result = ExecuteBinary({"idmap2",
-                          "scan",
-                          "--input-directory", GetTestDataPath() + "/target",
-                          "--input-directory", GetTestDataPath() + "/overlay",
-                          "--target-package-name", "test.target",
-                          "--target-apk-path", GetTargetApkPath(),
-                          "--output-directory", GetTempDirPath(),
-                          "--override-policy", "public"});
-  // clang-format on
-  ASSERT_THAT(result, NotNull());
-  ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
-  ASSERT_EQ(result->stdout, expected.str());
-  unlink(idmap_static_no_name_path.c_str());
-  unlink(idmap_static_2_path.c_str());
-  unlink(idmap_static_1_path.c_str());
-
-  // the same input directory given twice, but no duplicate entries
-  // clang-format off
-  result = ExecuteBinary({"idmap2",
-                          "scan",
-                          "--input-directory", GetTestDataPath(),
-                          "--input-directory", GetTestDataPath(),
-                          "--recursive",
-                          "--target-package-name", "test.target",
-                          "--target-apk-path", GetTargetApkPath(),
-                          "--output-directory", GetTempDirPath(),
-                          "--override-policy", "public"});
-  // clang-format on
-  ASSERT_THAT(result, NotNull());
-  ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
-  ASSERT_EQ(result->stdout, expected.str());
-  unlink(idmap_static_no_name_path.c_str());
-  unlink(idmap_static_2_path.c_str());
-  unlink(idmap_static_1_path.c_str());
-
-  // no APKs in input-directory: ok, but no output
-  // clang-format off
-  result = ExecuteBinary({"idmap2",
-                          "scan",
-                          "--input-directory", GetTempDirPath(),
-                          "--target-package-name", "test.target",
-                          "--target-apk-path", GetTargetApkPath(),
-                          "--output-directory", GetTempDirPath(),
-                          "--override-policy", "public"});
-  // clang-format on
-  ASSERT_THAT(result, NotNull());
-  ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
-  ASSERT_EQ(result->stdout, "");
-
-  // the signature idmap failing to generate should not cause scanning to fail
-  // clang-format off
-  result = ExecuteBinary({"idmap2",
-                          "scan",
-                          "--input-directory", GetTestDataPath(),
-                          "--recursive",
-                          "--target-package-name", "test.target",
-                          "--target-apk-path", GetTargetApkPath(),
-                          "--output-directory", GetTempDirPath(),
-                          "--override-policy", "public"});
-  // clang-format on
-  ASSERT_THAT(result, NotNull());
-  ASSERT_EQ(result->status, EXIT_SUCCESS) << result->stderr;
-  ASSERT_EQ(result->stdout, expected.str());
-  unlink(idmap_static_no_name_path.c_str());
-  unlink(idmap_static_2_path.c_str());
-  unlink(idmap_static_1_path.c_str());
-}
-
 TEST_F(Idmap2BinaryTests, Lookup) {
   SKIP_TEST_IF_CANT_EXEC_IDMAP2;
 
diff --git a/cmds/idmap2/valgrind.sh b/cmds/idmap2/valgrind.sh
index b4ebab0..84daeec 100755
--- a/cmds/idmap2/valgrind.sh
+++ b/cmds/idmap2/valgrind.sh
@@ -53,7 +53,5 @@
 _eval "idmap2 create" "$valgrind idmap2 create --policy public --target-apk-path $target_path --overlay-apk-path $overlay_path --idmap-path $idmap_path"
 _eval "idmap2 dump" "$valgrind idmap2 dump --idmap-path $idmap_path"
 _eval "idmap2 lookup" "$valgrind idmap2 lookup --idmap-path $idmap_path --config '' --resid test.target:string/str1"
-_eval "idmap2 scan" "$valgrind idmap2 scan --input-directory ${prefix}/tests/data/overlay --recursive --target-package-name test.target --target-apk-path $target_path --output-directory /tmp --override-policy public"
-_eval "idmap2 verify" "$valgrind idmap2 verify --idmap-path $idmap_path"
 _eval "idmap2_tests" "$valgrind $ANDROID_HOST_OUT/nativetest64/idmap2_tests/idmap2_tests"
 exit $errors
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/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/config/preloaded-classes b/config/preloaded-classes
index d56fc77..5e88d97d 100644
--- a/config/preloaded-classes
+++ b/config/preloaded-classes
@@ -3716,9 +3716,9 @@
 android.media.IRingtonePlayer$Stub$Proxy
 android.media.IRingtonePlayer$Stub
 android.media.IRingtonePlayer
-android.media.IStrategyPreferredDeviceDispatcher$Stub$Proxy
-android.media.IStrategyPreferredDeviceDispatcher$Stub
-android.media.IStrategyPreferredDeviceDispatcher
+android.media.IStrategyPreferredDevicesDispatcher$Stub$Proxy
+android.media.IStrategyPreferredDevicesDispatcher$Stub
+android.media.IStrategyPreferredDevicesDispatcher
 android.media.IVolumeController$Stub$Proxy
 android.media.IVolumeController$Stub
 android.media.IVolumeController
@@ -11759,7 +11759,6 @@
 libcore.util.ZoneInfo$CheckedArithmeticException
 libcore.util.ZoneInfo$WallTime
 libcore.util.ZoneInfo
-org.apache.harmony.dalvik.NativeTestTarget
 org.apache.harmony.dalvik.ddmc.Chunk
 org.apache.harmony.dalvik.ddmc.ChunkHandler
 org.apache.harmony.dalvik.ddmc.DdmServer
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 3ac8c9a..8681d41 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -12142,6 +12142,7 @@
     field public static final String FEATURE_NFC_HOST_CARD_EMULATION_NFCF = "android.hardware.nfc.hcef";
     field public static final String FEATURE_NFC_OFF_HOST_CARD_EMULATION_ESE = "android.hardware.nfc.ese";
     field public static final String FEATURE_NFC_OFF_HOST_CARD_EMULATION_UICC = "android.hardware.nfc.uicc";
+    field public static final String FEATURE_OPENGLES_DEQP_LEVEL = "android.software.opengles.deqp.level";
     field public static final String FEATURE_OPENGLES_EXTENSION_PACK = "android.hardware.opengles.aep";
     field public static final String FEATURE_PC = "android.hardware.type.pc";
     field public static final String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
@@ -18319,4812 +18320,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 {
@@ -24178,14 +19373,17 @@
   public class AudioManager {
     method @Deprecated public int abandonAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener);
     method public int abandonAudioFocusRequest(@NonNull android.media.AudioFocusRequest);
+    method public void addOnCommunicationDeviceChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnCommunicationDeviceChangedListener);
     method public void adjustStreamVolume(int, int, int);
     method public void adjustSuggestedStreamVolume(int, int, int);
     method public void adjustVolume(int, int);
+    method public void clearDeviceForCommunication();
     method public void dispatchMediaKeyEvent(android.view.KeyEvent);
     method public int generateAudioSessionId();
     method @NonNull public java.util.List<android.media.AudioPlaybackConfiguration> getActivePlaybackConfigurations();
     method @NonNull public java.util.List<android.media.AudioRecordingConfiguration> getActiveRecordingConfigurations();
     method public int getAllowedCapturePolicy();
+    method @Nullable public android.media.AudioDeviceInfo getDeviceForCommunication();
     method public android.media.AudioDeviceInfo[] getDevices(int);
     method public java.util.List<android.media.MicrophoneInfo> getMicrophones() throws java.io.IOException;
     method public int getMode();
@@ -24220,11 +19418,13 @@
     method @Deprecated public void registerMediaButtonEventReceiver(android.app.PendingIntent);
     method @Deprecated public void registerRemoteControlClient(android.media.RemoteControlClient);
     method @Deprecated public boolean registerRemoteController(android.media.RemoteController);
+    method public void removeOnCommunicationDeviceChangedListener(@NonNull android.media.AudioManager.OnCommunicationDeviceChangedListener);
     method @Deprecated public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, int, int);
     method public int requestAudioFocus(@NonNull android.media.AudioFocusRequest);
     method public void setAllowedCapturePolicy(int);
     method @Deprecated public void setBluetoothA2dpOn(boolean);
     method public void setBluetoothScoOn(boolean);
+    method public boolean setDeviceForCommunication(@NonNull android.media.AudioDeviceInfo);
     method public void setMicrophoneMute(boolean);
     method public void setMode(int);
     method public void setParameters(String);
@@ -24359,6 +19559,10 @@
     method public void onAudioFocusChange(int);
   }
 
+  public static interface AudioManager.OnCommunicationDeviceChangedListener {
+    method public void onCommunicationDeviceChanged(@Nullable android.media.AudioDeviceInfo);
+  }
+
   public final class AudioMetadata {
     method @NonNull public static android.media.AudioMetadataMap createMap();
   }
@@ -34394,6 +29598,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;
@@ -38029,8 +33234,8 @@
   }
 
   protected static interface ContactsContract.DataColumns {
-    field public static final String CARRIER_PRESENCE = "carrier_presence";
-    field public static final int CARRIER_PRESENCE_VT_CAPABLE = 1; // 0x1
+    field @Deprecated public static final String CARRIER_PRESENCE = "carrier_presence";
+    field @Deprecated public static final int CARRIER_PRESENCE_VT_CAPABLE = 1; // 0x1
     field public static final String DATA1 = "data1";
     field public static final String DATA10 = "data10";
     field public static final String DATA11 = "data11";
@@ -42913,708 +38118,6 @@
 
 }
 
-package android.system {
-
-  public final class ErrnoException extends java.lang.Exception {
-    ctor public ErrnoException(String, int);
-    ctor public ErrnoException(String, int, Throwable);
-    method @NonNull public java.io.IOException rethrowAsIOException() throws java.io.IOException;
-    method @NonNull public java.net.SocketException rethrowAsSocketException() throws java.net.SocketException;
-    field public final int errno;
-  }
-
-  public class Int64Ref {
-    ctor public Int64Ref(long);
-    field public long value;
-  }
-
-  public final class Os {
-    method public static java.io.FileDescriptor accept(java.io.FileDescriptor, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static boolean access(String, int) throws android.system.ErrnoException;
-    method public static void bind(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
-    method public static void bind(@NonNull java.io.FileDescriptor, @NonNull java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static void chmod(String, int) throws android.system.ErrnoException;
-    method public static void chown(String, int, int) throws android.system.ErrnoException;
-    method public static void close(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static void connect(java.io.FileDescriptor, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
-    method public static void connect(@NonNull java.io.FileDescriptor, @NonNull java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static java.io.FileDescriptor dup(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static java.io.FileDescriptor dup2(java.io.FileDescriptor, int) throws android.system.ErrnoException;
-    method public static String[] environ();
-    method public static void execv(String, String[]) throws android.system.ErrnoException;
-    method public static void execve(String, String[], String[]) throws android.system.ErrnoException;
-    method public static void fchmod(java.io.FileDescriptor, int) throws android.system.ErrnoException;
-    method public static void fchown(java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static int fcntlInt(@NonNull java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static void fdatasync(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static android.system.StructStat fstat(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static android.system.StructStatVfs fstatvfs(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static void fsync(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static void ftruncate(java.io.FileDescriptor, long) throws android.system.ErrnoException;
-    method public static String gai_strerror(int);
-    method public static int getegid();
-    method public static String getenv(String);
-    method public static int geteuid();
-    method public static int getgid();
-    method public static java.net.SocketAddress getpeername(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static int getpid();
-    method public static int getppid();
-    method public static java.net.SocketAddress getsockname(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method @NonNull public static android.system.StructTimeval getsockoptTimeval(@NonNull java.io.FileDescriptor, int, int) throws android.system.ErrnoException;
-    method public static int gettid();
-    method public static int getuid();
-    method public static byte[] getxattr(String, String) throws android.system.ErrnoException;
-    method public static String if_indextoname(int);
-    method public static int if_nametoindex(String);
-    method public static java.net.InetAddress inet_pton(int, String);
-    method public static boolean isatty(java.io.FileDescriptor);
-    method public static void kill(int, int) throws android.system.ErrnoException;
-    method public static void lchown(String, int, int) throws android.system.ErrnoException;
-    method public static void link(String, String) throws android.system.ErrnoException;
-    method public static void listen(java.io.FileDescriptor, int) throws android.system.ErrnoException;
-    method public static String[] listxattr(String) throws android.system.ErrnoException;
-    method public static long lseek(java.io.FileDescriptor, long, int) throws android.system.ErrnoException;
-    method public static android.system.StructStat lstat(String) throws android.system.ErrnoException;
-    method @NonNull public static java.io.FileDescriptor memfd_create(@NonNull String, int) throws android.system.ErrnoException;
-    method public static void mincore(long, long, byte[]) throws android.system.ErrnoException;
-    method public static void mkdir(String, int) throws android.system.ErrnoException;
-    method public static void mkfifo(String, int) throws android.system.ErrnoException;
-    method public static void mlock(long, long) throws android.system.ErrnoException;
-    method public static long mmap(long, long, int, int, java.io.FileDescriptor, long) throws android.system.ErrnoException;
-    method public static void msync(long, long, int) throws android.system.ErrnoException;
-    method public static void munlock(long, long) throws android.system.ErrnoException;
-    method public static void munmap(long, long) throws android.system.ErrnoException;
-    method public static java.io.FileDescriptor open(String, int, int) throws android.system.ErrnoException;
-    method public static java.io.FileDescriptor[] pipe() throws android.system.ErrnoException;
-    method public static int poll(android.system.StructPollfd[], int) throws android.system.ErrnoException;
-    method public static void posix_fallocate(java.io.FileDescriptor, long, long) throws android.system.ErrnoException;
-    method public static int prctl(int, long, long, long, long) throws android.system.ErrnoException;
-    method public static int pread(java.io.FileDescriptor, java.nio.ByteBuffer, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int pread(java.io.FileDescriptor, byte[], int, int, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int pwrite(java.io.FileDescriptor, java.nio.ByteBuffer, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int pwrite(java.io.FileDescriptor, byte[], int, int, long) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int read(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int read(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static String readlink(String) throws android.system.ErrnoException;
-    method public static int readv(java.io.FileDescriptor, Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int recvfrom(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static int recvfrom(java.io.FileDescriptor, byte[], int, int, int, java.net.InetSocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method public static void remove(String) throws android.system.ErrnoException;
-    method public static void removexattr(String, String) throws android.system.ErrnoException;
-    method public static void rename(String, String) throws android.system.ErrnoException;
-    method public static long sendfile(java.io.FileDescriptor, java.io.FileDescriptor, android.system.Int64Ref, long) throws android.system.ErrnoException;
-    method public static int sendto(java.io.FileDescriptor, java.nio.ByteBuffer, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
-    method public static int sendto(java.io.FileDescriptor, byte[], int, int, int, java.net.InetAddress, int) throws android.system.ErrnoException, java.net.SocketException;
-    method public static int sendto(@NonNull java.io.FileDescriptor, @NonNull byte[], int, int, int, @Nullable java.net.SocketAddress) throws android.system.ErrnoException, java.net.SocketException;
-    method @Deprecated public static void setegid(int) throws android.system.ErrnoException;
-    method public static void setenv(String, String, boolean) throws android.system.ErrnoException;
-    method @Deprecated public static void seteuid(int) throws android.system.ErrnoException;
-    method @Deprecated public static void setgid(int) throws android.system.ErrnoException;
-    method public static int setsid() throws android.system.ErrnoException;
-    method public static void setsockoptInt(java.io.FileDescriptor, int, int, int) throws android.system.ErrnoException;
-    method public static void setsockoptTimeval(@NonNull java.io.FileDescriptor, int, int, @NonNull android.system.StructTimeval) throws android.system.ErrnoException;
-    method @Deprecated public static void setuid(int) throws android.system.ErrnoException;
-    method public static void setxattr(String, String, byte[], int) throws android.system.ErrnoException;
-    method public static void shutdown(java.io.FileDescriptor, int) throws android.system.ErrnoException;
-    method public static java.io.FileDescriptor socket(int, int, int) throws android.system.ErrnoException;
-    method public static void socketpair(int, int, int, java.io.FileDescriptor, java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static android.system.StructStat stat(String) throws android.system.ErrnoException;
-    method public static android.system.StructStatVfs statvfs(String) throws android.system.ErrnoException;
-    method public static String strerror(int);
-    method public static String strsignal(int);
-    method public static void symlink(String, String) throws android.system.ErrnoException;
-    method public static long sysconf(int);
-    method public static void tcdrain(java.io.FileDescriptor) throws android.system.ErrnoException;
-    method public static void tcsendbreak(java.io.FileDescriptor, int) throws android.system.ErrnoException;
-    method public static int umask(int);
-    method public static android.system.StructUtsname uname();
-    method public static void unsetenv(String) throws android.system.ErrnoException;
-    method public static int write(java.io.FileDescriptor, java.nio.ByteBuffer) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int write(java.io.FileDescriptor, byte[], int, int) throws android.system.ErrnoException, java.io.InterruptedIOException;
-    method public static int writev(java.io.FileDescriptor, Object[], int[], int[]) throws android.system.ErrnoException, java.io.InterruptedIOException;
-  }
-
-  public final class OsConstants {
-    method public static boolean S_ISBLK(int);
-    method public static boolean S_ISCHR(int);
-    method public static boolean S_ISDIR(int);
-    method public static boolean S_ISFIFO(int);
-    method public static boolean S_ISLNK(int);
-    method public static boolean S_ISREG(int);
-    method public static boolean S_ISSOCK(int);
-    method public static boolean WCOREDUMP(int);
-    method public static int WEXITSTATUS(int);
-    method public static boolean WIFEXITED(int);
-    method public static boolean WIFSIGNALED(int);
-    method public static boolean WIFSTOPPED(int);
-    method public static int WSTOPSIG(int);
-    method public static int WTERMSIG(int);
-    method public static String errnoName(int);
-    method public static String gaiName(int);
-    field public static final int AF_INET;
-    field public static final int AF_INET6;
-    field public static final int AF_NETLINK;
-    field public static final int AF_PACKET;
-    field public static final int AF_UNIX;
-    field public static final int AF_UNSPEC;
-    field public static final int AI_ADDRCONFIG;
-    field public static final int AI_ALL;
-    field public static final int AI_CANONNAME;
-    field public static final int AI_NUMERICHOST;
-    field public static final int AI_NUMERICSERV;
-    field public static final int AI_PASSIVE;
-    field public static final int AI_V4MAPPED;
-    field public static final int ARPHRD_ETHER;
-    field public static final int CAP_AUDIT_CONTROL;
-    field public static final int CAP_AUDIT_WRITE;
-    field public static final int CAP_BLOCK_SUSPEND;
-    field public static final int CAP_CHOWN;
-    field public static final int CAP_DAC_OVERRIDE;
-    field public static final int CAP_DAC_READ_SEARCH;
-    field public static final int CAP_FOWNER;
-    field public static final int CAP_FSETID;
-    field public static final int CAP_IPC_LOCK;
-    field public static final int CAP_IPC_OWNER;
-    field public static final int CAP_KILL;
-    field public static final int CAP_LAST_CAP;
-    field public static final int CAP_LEASE;
-    field public static final int CAP_LINUX_IMMUTABLE;
-    field public static final int CAP_MAC_ADMIN;
-    field public static final int CAP_MAC_OVERRIDE;
-    field public static final int CAP_MKNOD;
-    field public static final int CAP_NET_ADMIN;
-    field public static final int CAP_NET_BIND_SERVICE;
-    field public static final int CAP_NET_BROADCAST;
-    field public static final int CAP_NET_RAW;
-    field public static final int CAP_SETFCAP;
-    field public static final int CAP_SETGID;
-    field public static final int CAP_SETPCAP;
-    field public static final int CAP_SETUID;
-    field public static final int CAP_SYSLOG;
-    field public static final int CAP_SYS_ADMIN;
-    field public static final int CAP_SYS_BOOT;
-    field public static final int CAP_SYS_CHROOT;
-    field public static final int CAP_SYS_MODULE;
-    field public static final int CAP_SYS_NICE;
-    field public static final int CAP_SYS_PACCT;
-    field public static final int CAP_SYS_PTRACE;
-    field public static final int CAP_SYS_RAWIO;
-    field public static final int CAP_SYS_RESOURCE;
-    field public static final int CAP_SYS_TIME;
-    field public static final int CAP_SYS_TTY_CONFIG;
-    field public static final int CAP_WAKE_ALARM;
-    field public static final int E2BIG;
-    field public static final int EACCES;
-    field public static final int EADDRINUSE;
-    field public static final int EADDRNOTAVAIL;
-    field public static final int EAFNOSUPPORT;
-    field public static final int EAGAIN;
-    field public static final int EAI_AGAIN;
-    field public static final int EAI_BADFLAGS;
-    field public static final int EAI_FAIL;
-    field public static final int EAI_FAMILY;
-    field public static final int EAI_MEMORY;
-    field public static final int EAI_NODATA;
-    field public static final int EAI_NONAME;
-    field public static final int EAI_OVERFLOW;
-    field public static final int EAI_SERVICE;
-    field public static final int EAI_SOCKTYPE;
-    field public static final int EAI_SYSTEM;
-    field public static final int EALREADY;
-    field public static final int EBADF;
-    field public static final int EBADMSG;
-    field public static final int EBUSY;
-    field public static final int ECANCELED;
-    field public static final int ECHILD;
-    field public static final int ECONNABORTED;
-    field public static final int ECONNREFUSED;
-    field public static final int ECONNRESET;
-    field public static final int EDEADLK;
-    field public static final int EDESTADDRREQ;
-    field public static final int EDOM;
-    field public static final int EDQUOT;
-    field public static final int EEXIST;
-    field public static final int EFAULT;
-    field public static final int EFBIG;
-    field public static final int EHOSTUNREACH;
-    field public static final int EIDRM;
-    field public static final int EILSEQ;
-    field public static final int EINPROGRESS;
-    field public static final int EINTR;
-    field public static final int EINVAL;
-    field public static final int EIO;
-    field public static final int EISCONN;
-    field public static final int EISDIR;
-    field public static final int ELOOP;
-    field public static final int EMFILE;
-    field public static final int EMLINK;
-    field public static final int EMSGSIZE;
-    field public static final int EMULTIHOP;
-    field public static final int ENAMETOOLONG;
-    field public static final int ENETDOWN;
-    field public static final int ENETRESET;
-    field public static final int ENETUNREACH;
-    field public static final int ENFILE;
-    field public static final int ENOBUFS;
-    field public static final int ENODATA;
-    field public static final int ENODEV;
-    field public static final int ENOENT;
-    field public static final int ENOEXEC;
-    field public static final int ENOLCK;
-    field public static final int ENOLINK;
-    field public static final int ENOMEM;
-    field public static final int ENOMSG;
-    field public static final int ENOPROTOOPT;
-    field public static final int ENOSPC;
-    field public static final int ENOSR;
-    field public static final int ENOSTR;
-    field public static final int ENOSYS;
-    field public static final int ENOTCONN;
-    field public static final int ENOTDIR;
-    field public static final int ENOTEMPTY;
-    field public static final int ENOTSOCK;
-    field public static final int ENOTSUP;
-    field public static final int ENOTTY;
-    field public static final int ENXIO;
-    field public static final int EOPNOTSUPP;
-    field public static final int EOVERFLOW;
-    field public static final int EPERM;
-    field public static final int EPIPE;
-    field public static final int EPROTO;
-    field public static final int EPROTONOSUPPORT;
-    field public static final int EPROTOTYPE;
-    field public static final int ERANGE;
-    field public static final int EROFS;
-    field public static final int ESPIPE;
-    field public static final int ESRCH;
-    field public static final int ESTALE;
-    field public static final int ETH_P_ALL;
-    field public static final int ETH_P_ARP;
-    field public static final int ETH_P_IP;
-    field public static final int ETH_P_IPV6;
-    field public static final int ETIME;
-    field public static final int ETIMEDOUT;
-    field public static final int ETXTBSY;
-    field public static final int EXDEV;
-    field public static final int EXIT_FAILURE;
-    field public static final int EXIT_SUCCESS;
-    field public static final int FD_CLOEXEC;
-    field public static final int FIONREAD;
-    field public static final int F_DUPFD;
-    field public static final int F_DUPFD_CLOEXEC;
-    field public static final int F_GETFD;
-    field public static final int F_GETFL;
-    field public static final int F_GETLK;
-    field public static final int F_GETLK64;
-    field public static final int F_GETOWN;
-    field public static final int F_OK;
-    field public static final int F_RDLCK;
-    field public static final int F_SETFD;
-    field public static final int F_SETFL;
-    field public static final int F_SETLK;
-    field public static final int F_SETLK64;
-    field public static final int F_SETLKW;
-    field public static final int F_SETLKW64;
-    field public static final int F_SETOWN;
-    field public static final int F_UNLCK;
-    field public static final int F_WRLCK;
-    field public static final int ICMP6_ECHO_REPLY;
-    field public static final int ICMP6_ECHO_REQUEST;
-    field public static final int ICMP_ECHO;
-    field public static final int ICMP_ECHOREPLY;
-    field public static final int IFA_F_DADFAILED;
-    field public static final int IFA_F_DEPRECATED;
-    field public static final int IFA_F_HOMEADDRESS;
-    field public static final int IFA_F_NODAD;
-    field public static final int IFA_F_OPTIMISTIC;
-    field public static final int IFA_F_PERMANENT;
-    field public static final int IFA_F_SECONDARY;
-    field public static final int IFA_F_TEMPORARY;
-    field public static final int IFA_F_TENTATIVE;
-    field public static final int IFF_ALLMULTI;
-    field public static final int IFF_AUTOMEDIA;
-    field public static final int IFF_BROADCAST;
-    field public static final int IFF_DEBUG;
-    field public static final int IFF_DYNAMIC;
-    field public static final int IFF_LOOPBACK;
-    field public static final int IFF_MASTER;
-    field public static final int IFF_MULTICAST;
-    field public static final int IFF_NOARP;
-    field public static final int IFF_NOTRAILERS;
-    field public static final int IFF_POINTOPOINT;
-    field public static final int IFF_PORTSEL;
-    field public static final int IFF_PROMISC;
-    field public static final int IFF_RUNNING;
-    field public static final int IFF_SLAVE;
-    field public static final int IFF_UP;
-    field public static final int IPPROTO_ICMP;
-    field public static final int IPPROTO_ICMPV6;
-    field public static final int IPPROTO_IP;
-    field public static final int IPPROTO_IPV6;
-    field public static final int IPPROTO_RAW;
-    field public static final int IPPROTO_TCP;
-    field public static final int IPPROTO_UDP;
-    field public static final int IPV6_CHECKSUM;
-    field public static final int IPV6_MULTICAST_HOPS;
-    field public static final int IPV6_MULTICAST_IF;
-    field public static final int IPV6_MULTICAST_LOOP;
-    field public static final int IPV6_RECVDSTOPTS;
-    field public static final int IPV6_RECVHOPLIMIT;
-    field public static final int IPV6_RECVHOPOPTS;
-    field public static final int IPV6_RECVPKTINFO;
-    field public static final int IPV6_RECVRTHDR;
-    field public static final int IPV6_RECVTCLASS;
-    field public static final int IPV6_TCLASS;
-    field public static final int IPV6_UNICAST_HOPS;
-    field public static final int IPV6_V6ONLY;
-    field public static final int IP_MULTICAST_IF;
-    field public static final int IP_MULTICAST_LOOP;
-    field public static final int IP_MULTICAST_TTL;
-    field public static final int IP_TOS;
-    field public static final int IP_TTL;
-    field public static final int MAP_ANONYMOUS;
-    field public static final int MAP_FIXED;
-    field public static final int MAP_PRIVATE;
-    field public static final int MAP_SHARED;
-    field public static final int MCAST_BLOCK_SOURCE;
-    field public static final int MCAST_JOIN_GROUP;
-    field public static final int MCAST_JOIN_SOURCE_GROUP;
-    field public static final int MCAST_LEAVE_GROUP;
-    field public static final int MCAST_LEAVE_SOURCE_GROUP;
-    field public static final int MCAST_UNBLOCK_SOURCE;
-    field public static final int MCL_CURRENT;
-    field public static final int MCL_FUTURE;
-    field public static final int MFD_CLOEXEC;
-    field public static final int MSG_CTRUNC;
-    field public static final int MSG_DONTROUTE;
-    field public static final int MSG_EOR;
-    field public static final int MSG_OOB;
-    field public static final int MSG_PEEK;
-    field public static final int MSG_TRUNC;
-    field public static final int MSG_WAITALL;
-    field public static final int MS_ASYNC;
-    field public static final int MS_INVALIDATE;
-    field public static final int MS_SYNC;
-    field public static final int NETLINK_INET_DIAG;
-    field public static final int NETLINK_NETFILTER;
-    field public static final int NETLINK_ROUTE;
-    field public static final int NI_DGRAM;
-    field public static final int NI_NAMEREQD;
-    field public static final int NI_NOFQDN;
-    field public static final int NI_NUMERICHOST;
-    field public static final int NI_NUMERICSERV;
-    field public static final int O_ACCMODE;
-    field public static final int O_APPEND;
-    field public static final int O_CLOEXEC;
-    field public static final int O_CREAT;
-    field public static final int O_DSYNC;
-    field public static final int O_EXCL;
-    field public static final int O_NOCTTY;
-    field public static final int O_NOFOLLOW;
-    field public static final int O_NONBLOCK;
-    field public static final int O_RDONLY;
-    field public static final int O_RDWR;
-    field public static final int O_SYNC;
-    field public static final int O_TRUNC;
-    field public static final int O_WRONLY;
-    field public static final int POLLERR;
-    field public static final int POLLHUP;
-    field public static final int POLLIN;
-    field public static final int POLLNVAL;
-    field public static final int POLLOUT;
-    field public static final int POLLPRI;
-    field public static final int POLLRDBAND;
-    field public static final int POLLRDNORM;
-    field public static final int POLLWRBAND;
-    field public static final int POLLWRNORM;
-    field public static final int PROT_EXEC;
-    field public static final int PROT_NONE;
-    field public static final int PROT_READ;
-    field public static final int PROT_WRITE;
-    field public static final int PR_GET_DUMPABLE;
-    field public static final int PR_SET_DUMPABLE;
-    field public static final int PR_SET_NO_NEW_PRIVS;
-    field public static final int RTMGRP_NEIGH;
-    field public static final int RT_SCOPE_HOST;
-    field public static final int RT_SCOPE_LINK;
-    field public static final int RT_SCOPE_NOWHERE;
-    field public static final int RT_SCOPE_SITE;
-    field public static final int RT_SCOPE_UNIVERSE;
-    field public static final int R_OK;
-    field public static final int SEEK_CUR;
-    field public static final int SEEK_END;
-    field public static final int SEEK_SET;
-    field public static final int SHUT_RD;
-    field public static final int SHUT_RDWR;
-    field public static final int SHUT_WR;
-    field public static final int SIGABRT;
-    field public static final int SIGALRM;
-    field public static final int SIGBUS;
-    field public static final int SIGCHLD;
-    field public static final int SIGCONT;
-    field public static final int SIGFPE;
-    field public static final int SIGHUP;
-    field public static final int SIGILL;
-    field public static final int SIGINT;
-    field public static final int SIGIO;
-    field public static final int SIGKILL;
-    field public static final int SIGPIPE;
-    field public static final int SIGPROF;
-    field public static final int SIGPWR;
-    field public static final int SIGQUIT;
-    field public static final int SIGRTMAX;
-    field public static final int SIGRTMIN;
-    field public static final int SIGSEGV;
-    field public static final int SIGSTKFLT;
-    field public static final int SIGSTOP;
-    field public static final int SIGSYS;
-    field public static final int SIGTERM;
-    field public static final int SIGTRAP;
-    field public static final int SIGTSTP;
-    field public static final int SIGTTIN;
-    field public static final int SIGTTOU;
-    field public static final int SIGURG;
-    field public static final int SIGUSR1;
-    field public static final int SIGUSR2;
-    field public static final int SIGVTALRM;
-    field public static final int SIGWINCH;
-    field public static final int SIGXCPU;
-    field public static final int SIGXFSZ;
-    field public static final int SIOCGIFADDR;
-    field public static final int SIOCGIFBRDADDR;
-    field public static final int SIOCGIFDSTADDR;
-    field public static final int SIOCGIFNETMASK;
-    field public static final int SOCK_CLOEXEC;
-    field public static final int SOCK_DGRAM;
-    field public static final int SOCK_NONBLOCK;
-    field public static final int SOCK_RAW;
-    field public static final int SOCK_SEQPACKET;
-    field public static final int SOCK_STREAM;
-    field public static final int SOL_SOCKET;
-    field public static final int SO_BINDTODEVICE;
-    field public static final int SO_BROADCAST;
-    field public static final int SO_DEBUG;
-    field public static final int SO_DONTROUTE;
-    field public static final int SO_ERROR;
-    field public static final int SO_KEEPALIVE;
-    field public static final int SO_LINGER;
-    field public static final int SO_OOBINLINE;
-    field public static final int SO_PASSCRED;
-    field public static final int SO_PEERCRED;
-    field public static final int SO_RCVBUF;
-    field public static final int SO_RCVLOWAT;
-    field public static final int SO_RCVTIMEO;
-    field public static final int SO_REUSEADDR;
-    field public static final int SO_SNDBUF;
-    field public static final int SO_SNDLOWAT;
-    field public static final int SO_SNDTIMEO;
-    field public static final int SO_TYPE;
-    field public static final int STDERR_FILENO;
-    field public static final int STDIN_FILENO;
-    field public static final int STDOUT_FILENO;
-    field public static final int ST_MANDLOCK;
-    field public static final int ST_NOATIME;
-    field public static final int ST_NODEV;
-    field public static final int ST_NODIRATIME;
-    field public static final int ST_NOEXEC;
-    field public static final int ST_NOSUID;
-    field public static final int ST_RDONLY;
-    field public static final int ST_RELATIME;
-    field public static final int ST_SYNCHRONOUS;
-    field public static final int S_IFBLK;
-    field public static final int S_IFCHR;
-    field public static final int S_IFDIR;
-    field public static final int S_IFIFO;
-    field public static final int S_IFLNK;
-    field public static final int S_IFMT;
-    field public static final int S_IFREG;
-    field public static final int S_IFSOCK;
-    field public static final int S_IRGRP;
-    field public static final int S_IROTH;
-    field public static final int S_IRUSR;
-    field public static final int S_IRWXG;
-    field public static final int S_IRWXO;
-    field public static final int S_IRWXU;
-    field public static final int S_ISGID;
-    field public static final int S_ISUID;
-    field public static final int S_ISVTX;
-    field public static final int S_IWGRP;
-    field public static final int S_IWOTH;
-    field public static final int S_IWUSR;
-    field public static final int S_IXGRP;
-    field public static final int S_IXOTH;
-    field public static final int S_IXUSR;
-    field public static final int TCP_NODELAY;
-    field public static final int TCP_USER_TIMEOUT;
-    field public static final int WCONTINUED;
-    field public static final int WEXITED;
-    field public static final int WNOHANG;
-    field public static final int WNOWAIT;
-    field public static final int WSTOPPED;
-    field public static final int WUNTRACED;
-    field public static final int W_OK;
-    field public static final int X_OK;
-    field public static final int _SC_2_CHAR_TERM;
-    field public static final int _SC_2_C_BIND;
-    field public static final int _SC_2_C_DEV;
-    field public static final int _SC_2_C_VERSION;
-    field public static final int _SC_2_FORT_DEV;
-    field public static final int _SC_2_FORT_RUN;
-    field public static final int _SC_2_LOCALEDEF;
-    field public static final int _SC_2_SW_DEV;
-    field public static final int _SC_2_UPE;
-    field public static final int _SC_2_VERSION;
-    field public static final int _SC_AIO_LISTIO_MAX;
-    field public static final int _SC_AIO_MAX;
-    field public static final int _SC_AIO_PRIO_DELTA_MAX;
-    field public static final int _SC_ARG_MAX;
-    field public static final int _SC_ASYNCHRONOUS_IO;
-    field public static final int _SC_ATEXIT_MAX;
-    field public static final int _SC_AVPHYS_PAGES;
-    field public static final int _SC_BC_BASE_MAX;
-    field public static final int _SC_BC_DIM_MAX;
-    field public static final int _SC_BC_SCALE_MAX;
-    field public static final int _SC_BC_STRING_MAX;
-    field public static final int _SC_CHILD_MAX;
-    field public static final int _SC_CLK_TCK;
-    field public static final int _SC_COLL_WEIGHTS_MAX;
-    field public static final int _SC_DELAYTIMER_MAX;
-    field public static final int _SC_EXPR_NEST_MAX;
-    field public static final int _SC_FSYNC;
-    field public static final int _SC_GETGR_R_SIZE_MAX;
-    field public static final int _SC_GETPW_R_SIZE_MAX;
-    field public static final int _SC_IOV_MAX;
-    field public static final int _SC_JOB_CONTROL;
-    field public static final int _SC_LINE_MAX;
-    field public static final int _SC_LOGIN_NAME_MAX;
-    field public static final int _SC_MAPPED_FILES;
-    field public static final int _SC_MEMLOCK;
-    field public static final int _SC_MEMLOCK_RANGE;
-    field public static final int _SC_MEMORY_PROTECTION;
-    field public static final int _SC_MESSAGE_PASSING;
-    field public static final int _SC_MQ_OPEN_MAX;
-    field public static final int _SC_MQ_PRIO_MAX;
-    field public static final int _SC_NGROUPS_MAX;
-    field public static final int _SC_NPROCESSORS_CONF;
-    field public static final int _SC_NPROCESSORS_ONLN;
-    field public static final int _SC_OPEN_MAX;
-    field public static final int _SC_PAGESIZE;
-    field public static final int _SC_PAGE_SIZE;
-    field public static final int _SC_PASS_MAX;
-    field public static final int _SC_PHYS_PAGES;
-    field public static final int _SC_PRIORITIZED_IO;
-    field public static final int _SC_PRIORITY_SCHEDULING;
-    field public static final int _SC_REALTIME_SIGNALS;
-    field public static final int _SC_RE_DUP_MAX;
-    field public static final int _SC_RTSIG_MAX;
-    field public static final int _SC_SAVED_IDS;
-    field public static final int _SC_SEMAPHORES;
-    field public static final int _SC_SEM_NSEMS_MAX;
-    field public static final int _SC_SEM_VALUE_MAX;
-    field public static final int _SC_SHARED_MEMORY_OBJECTS;
-    field public static final int _SC_SIGQUEUE_MAX;
-    field public static final int _SC_STREAM_MAX;
-    field public static final int _SC_SYNCHRONIZED_IO;
-    field public static final int _SC_THREADS;
-    field public static final int _SC_THREAD_ATTR_STACKADDR;
-    field public static final int _SC_THREAD_ATTR_STACKSIZE;
-    field public static final int _SC_THREAD_DESTRUCTOR_ITERATIONS;
-    field public static final int _SC_THREAD_KEYS_MAX;
-    field public static final int _SC_THREAD_PRIORITY_SCHEDULING;
-    field public static final int _SC_THREAD_PRIO_INHERIT;
-    field public static final int _SC_THREAD_PRIO_PROTECT;
-    field public static final int _SC_THREAD_SAFE_FUNCTIONS;
-    field public static final int _SC_THREAD_STACK_MIN;
-    field public static final int _SC_THREAD_THREADS_MAX;
-    field public static final int _SC_TIMERS;
-    field public static final int _SC_TIMER_MAX;
-    field public static final int _SC_TTY_NAME_MAX;
-    field public static final int _SC_TZNAME_MAX;
-    field public static final int _SC_VERSION;
-    field public static final int _SC_XBS5_ILP32_OFF32;
-    field public static final int _SC_XBS5_ILP32_OFFBIG;
-    field public static final int _SC_XBS5_LP64_OFF64;
-    field public static final int _SC_XBS5_LPBIG_OFFBIG;
-    field public static final int _SC_XOPEN_CRYPT;
-    field public static final int _SC_XOPEN_ENH_I18N;
-    field public static final int _SC_XOPEN_LEGACY;
-    field public static final int _SC_XOPEN_REALTIME;
-    field public static final int _SC_XOPEN_REALTIME_THREADS;
-    field public static final int _SC_XOPEN_SHM;
-    field public static final int _SC_XOPEN_UNIX;
-    field public static final int _SC_XOPEN_VERSION;
-    field public static final int _SC_XOPEN_XCU_VERSION;
-  }
-
-  public final class StructPollfd {
-    ctor public StructPollfd();
-    field public short events;
-    field public java.io.FileDescriptor fd;
-    field public short revents;
-    field public Object userData;
-  }
-
-  public final class StructStat {
-    ctor public StructStat(long, long, int, long, int, int, long, long, long, long, long, long, long);
-    ctor public StructStat(long, long, int, long, int, int, long, long, android.system.StructTimespec, android.system.StructTimespec, android.system.StructTimespec, long, long);
-    field public final android.system.StructTimespec st_atim;
-    field public final long st_atime;
-    field public final long st_blksize;
-    field public final long st_blocks;
-    field public final android.system.StructTimespec st_ctim;
-    field public final long st_ctime;
-    field public final long st_dev;
-    field public final int st_gid;
-    field public final long st_ino;
-    field public final int st_mode;
-    field public final android.system.StructTimespec st_mtim;
-    field public final long st_mtime;
-    field public final long st_nlink;
-    field public final long st_rdev;
-    field public final long st_size;
-    field public final int st_uid;
-  }
-
-  public final class StructStatVfs {
-    ctor public StructStatVfs(long, long, long, long, long, long, long, long, long, long, long);
-    field public final long f_bavail;
-    field public final long f_bfree;
-    field public final long f_blocks;
-    field public final long f_bsize;
-    field public final long f_favail;
-    field public final long f_ffree;
-    field public final long f_files;
-    field public final long f_flag;
-    field public final long f_frsize;
-    field public final long f_fsid;
-    field public final long f_namemax;
-  }
-
-  public final class StructTimespec implements java.lang.Comparable<android.system.StructTimespec> {
-    ctor public StructTimespec(long, long);
-    method public int compareTo(android.system.StructTimespec);
-    field public final long tv_nsec;
-    field public final long tv_sec;
-  }
-
-  public final class StructTimeval {
-    method @NonNull public static android.system.StructTimeval fromMillis(long);
-    method public long toMillis();
-    field public final long tv_sec;
-    field public final long tv_usec;
-  }
-
-  public final class StructUtsname {
-    ctor public StructUtsname(String, String, String, String, String);
-    field public final String machine;
-    field public final String nodename;
-    field public final String release;
-    field public final String sysname;
-    field public final String version;
-  }
-
-}
-
 package android.telecom {
 
   public final class Call {
@@ -45058,9 +39561,10 @@
     field public static final String KEY_TREAT_DOWNGRADED_VIDEO_CALLS_AS_VIDEO_CALLS_BOOL = "treat_downgraded_video_calls_as_video_calls_bool";
     field public static final String KEY_TTY_SUPPORTED_BOOL = "tty_supported_bool";
     field public static final String KEY_UNLOGGABLE_NUMBERS_STRING_ARRAY = "unloggable_numbers_string_array";
+    field public static final String KEY_USE_ACS_FOR_RCS_BOOL = "use_acs_for_rcs_bool";
     field public static final String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
     field public static final String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
-    field public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
+    field @Deprecated public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
     field public static final String KEY_USE_RCS_SIP_OPTIONS_BOOL = "use_rcs_sip_options_bool";
     field public static final String KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL = "use_wfc_home_network_mode_in_roaming_network_bool";
     field public static final String KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL = "voicemail_notification_persistent_bool";
@@ -45101,9 +39605,12 @@
   }
 
   public static final class CarrierConfigManager.Ims {
+    field public static final String KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL = "ims.enable_presence_capability_exchange_bool";
+    field public static final String KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL = "ims.enable_presence_group_subscribe_bool";
     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_RCS_BULK_CAPABILITY_EXCHANGE_BOOL = "ims.rcs_bulk_capability_exchange_bool";
     field public static final String KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT = "ims.wifi_off_deferring_time_millis_int";
   }
 
@@ -45167,7 +39674,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;
   }
@@ -45311,7 +39818,8 @@
   public final class CellSignalStrengthLte extends android.telephony.CellSignalStrength implements android.os.Parcelable {
     method public int describeContents();
     method public int getAsuLevel();
-    method public int getCqi();
+    method @IntRange(from=0, to=15) public int getCqi();
+    method @IntRange(from=1, to=6) public int getCqiTableIndex();
     method public int getDbm();
     method @IntRange(from=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN, to=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_GREAT) public int getLevel();
     method public int getRsrp();
@@ -45326,6 +39834,8 @@
   public final class CellSignalStrengthNr extends android.telephony.CellSignalStrength implements android.os.Parcelable {
     method public int describeContents();
     method public int getAsuLevel();
+    method @IntRange(from=0, to=15) @NonNull public java.util.List<java.lang.Integer> getCsiCqiReport();
+    method @IntRange(from=1, to=3) public int getCsiCqiTableIndex();
     method public int getCsiRsrp();
     method public int getCsiRsrq();
     method public int getCsiSinr();
@@ -45493,6 +40003,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
@@ -46592,6 +41124,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
@@ -47311,6 +41844,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
   }
@@ -59965,16951 +54499,6 @@
 
 }
 
-package dalvik.annotation {
-
-  @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.ANNOTATION_TYPE}) public @interface TestTarget {
-    method @Deprecated public abstract String conceptName() default "";
-    method @Deprecated public abstract Class<?>[] methodArgs() default {};
-    method @Deprecated public abstract String methodName() default "";
-  }
-
-  @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE}) public @interface TestTargetClass {
-    method @Deprecated public abstract Class<?> value();
-  }
-
-}
-
-package dalvik.bytecode {
-
-  public final class OpcodeInfo {
-    field public static final int MAXIMUM_PACKED_VALUE;
-    field public static final int MAXIMUM_VALUE;
-  }
-
-  public interface Opcodes {
-    field public static final int OP_ADD_DOUBLE = 171; // 0xab
-    field public static final int OP_ADD_DOUBLE_2ADDR = 203; // 0xcb
-    field public static final int OP_ADD_FLOAT = 166; // 0xa6
-    field public static final int OP_ADD_FLOAT_2ADDR = 198; // 0xc6
-    field public static final int OP_ADD_INT = 144; // 0x90
-    field public static final int OP_ADD_INT_2ADDR = 176; // 0xb0
-    field public static final int OP_ADD_INT_LIT16 = 208; // 0xd0
-    field public static final int OP_ADD_INT_LIT8 = 216; // 0xd8
-    field public static final int OP_ADD_LONG = 155; // 0x9b
-    field public static final int OP_ADD_LONG_2ADDR = 187; // 0xbb
-    field public static final int OP_AGET = 68; // 0x44
-    field public static final int OP_AGET_BOOLEAN = 71; // 0x47
-    field public static final int OP_AGET_BYTE = 72; // 0x48
-    field public static final int OP_AGET_CHAR = 73; // 0x49
-    field public static final int OP_AGET_OBJECT = 70; // 0x46
-    field public static final int OP_AGET_SHORT = 74; // 0x4a
-    field public static final int OP_AGET_WIDE = 69; // 0x45
-    field public static final int OP_AND_INT = 149; // 0x95
-    field public static final int OP_AND_INT_2ADDR = 181; // 0xb5
-    field public static final int OP_AND_INT_LIT16 = 213; // 0xd5
-    field public static final int OP_AND_INT_LIT8 = 221; // 0xdd
-    field public static final int OP_AND_LONG = 160; // 0xa0
-    field public static final int OP_AND_LONG_2ADDR = 192; // 0xc0
-    field public static final int OP_APUT = 75; // 0x4b
-    field public static final int OP_APUT_BOOLEAN = 78; // 0x4e
-    field public static final int OP_APUT_BYTE = 79; // 0x4f
-    field public static final int OP_APUT_CHAR = 80; // 0x50
-    field public static final int OP_APUT_OBJECT = 77; // 0x4d
-    field public static final int OP_APUT_SHORT = 81; // 0x51
-    field public static final int OP_APUT_WIDE = 76; // 0x4c
-    field public static final int OP_ARRAY_LENGTH = 33; // 0x21
-    field @Deprecated public static final int OP_BREAKPOINT = 236; // 0xec
-    field public static final int OP_CHECK_CAST = 31; // 0x1f
-    field public static final int OP_CHECK_CAST_JUMBO = 511; // 0x1ff
-    field public static final int OP_CMPG_DOUBLE = 48; // 0x30
-    field public static final int OP_CMPG_FLOAT = 46; // 0x2e
-    field public static final int OP_CMPL_DOUBLE = 47; // 0x2f
-    field public static final int OP_CMPL_FLOAT = 45; // 0x2d
-    field public static final int OP_CMP_LONG = 49; // 0x31
-    field public static final int OP_CONST = 20; // 0x14
-    field public static final int OP_CONST_16 = 19; // 0x13
-    field public static final int OP_CONST_4 = 18; // 0x12
-    field public static final int OP_CONST_CLASS = 28; // 0x1c
-    field public static final int OP_CONST_CLASS_JUMBO = 255; // 0xff
-    field public static final int OP_CONST_HIGH16 = 21; // 0x15
-    field public static final int OP_CONST_METHOD_HANDLE = 254; // 0xfe
-    field public static final int OP_CONST_METHOD_TYPE = 255; // 0xff
-    field public static final int OP_CONST_STRING = 26; // 0x1a
-    field public static final int OP_CONST_STRING_JUMBO = 27; // 0x1b
-    field public static final int OP_CONST_WIDE = 24; // 0x18
-    field public static final int OP_CONST_WIDE_16 = 22; // 0x16
-    field public static final int OP_CONST_WIDE_32 = 23; // 0x17
-    field public static final int OP_CONST_WIDE_HIGH16 = 25; // 0x19
-    field public static final int OP_DIV_DOUBLE = 174; // 0xae
-    field public static final int OP_DIV_DOUBLE_2ADDR = 206; // 0xce
-    field public static final int OP_DIV_FLOAT = 169; // 0xa9
-    field public static final int OP_DIV_FLOAT_2ADDR = 201; // 0xc9
-    field public static final int OP_DIV_INT = 147; // 0x93
-    field public static final int OP_DIV_INT_2ADDR = 179; // 0xb3
-    field public static final int OP_DIV_INT_LIT16 = 211; // 0xd3
-    field public static final int OP_DIV_INT_LIT8 = 219; // 0xdb
-    field public static final int OP_DIV_LONG = 158; // 0x9e
-    field public static final int OP_DIV_LONG_2ADDR = 190; // 0xbe
-    field public static final int OP_DOUBLE_TO_FLOAT = 140; // 0x8c
-    field public static final int OP_DOUBLE_TO_INT = 138; // 0x8a
-    field public static final int OP_DOUBLE_TO_LONG = 139; // 0x8b
-    field @Deprecated public static final int OP_EXECUTE_INLINE = 238; // 0xee
-    field @Deprecated public static final int OP_EXECUTE_INLINE_RANGE = 239; // 0xef
-    field public static final int OP_FILLED_NEW_ARRAY = 36; // 0x24
-    field public static final int OP_FILLED_NEW_ARRAY_JUMBO = 1535; // 0x5ff
-    field public static final int OP_FILLED_NEW_ARRAY_RANGE = 37; // 0x25
-    field public static final int OP_FILL_ARRAY_DATA = 38; // 0x26
-    field public static final int OP_FLOAT_TO_DOUBLE = 137; // 0x89
-    field public static final int OP_FLOAT_TO_INT = 135; // 0x87
-    field public static final int OP_FLOAT_TO_LONG = 136; // 0x88
-    field public static final int OP_GOTO = 40; // 0x28
-    field public static final int OP_GOTO_16 = 41; // 0x29
-    field public static final int OP_GOTO_32 = 42; // 0x2a
-    field public static final int OP_IF_EQ = 50; // 0x32
-    field public static final int OP_IF_EQZ = 56; // 0x38
-    field public static final int OP_IF_GE = 53; // 0x35
-    field public static final int OP_IF_GEZ = 59; // 0x3b
-    field public static final int OP_IF_GT = 54; // 0x36
-    field public static final int OP_IF_GTZ = 60; // 0x3c
-    field public static final int OP_IF_LE = 55; // 0x37
-    field public static final int OP_IF_LEZ = 61; // 0x3d
-    field public static final int OP_IF_LT = 52; // 0x34
-    field public static final int OP_IF_LTZ = 58; // 0x3a
-    field public static final int OP_IF_NE = 51; // 0x33
-    field public static final int OP_IF_NEZ = 57; // 0x39
-    field public static final int OP_IGET = 82; // 0x52
-    field public static final int OP_IGET_BOOLEAN = 85; // 0x55
-    field public static final int OP_IGET_BOOLEAN_JUMBO = 2559; // 0x9ff
-    field public static final int OP_IGET_BYTE = 86; // 0x56
-    field public static final int OP_IGET_BYTE_JUMBO = 2815; // 0xaff
-    field public static final int OP_IGET_CHAR = 87; // 0x57
-    field public static final int OP_IGET_CHAR_JUMBO = 3071; // 0xbff
-    field public static final int OP_IGET_JUMBO = 1791; // 0x6ff
-    field public static final int OP_IGET_OBJECT = 84; // 0x54
-    field public static final int OP_IGET_OBJECT_JUMBO = 2303; // 0x8ff
-    field @Deprecated public static final int OP_IGET_OBJECT_QUICK = 244; // 0xf4
-    field @Deprecated public static final int OP_IGET_QUICK = 242; // 0xf2
-    field public static final int OP_IGET_SHORT = 88; // 0x58
-    field public static final int OP_IGET_SHORT_JUMBO = 3327; // 0xcff
-    field public static final int OP_IGET_WIDE = 83; // 0x53
-    field public static final int OP_IGET_WIDE_JUMBO = 2047; // 0x7ff
-    field @Deprecated public static final int OP_IGET_WIDE_QUICK = 243; // 0xf3
-    field @Deprecated public static final int OP_IGET_WIDE_VOLATILE = 232; // 0xe8
-    field public static final int OP_INSTANCE_OF = 32; // 0x20
-    field public static final int OP_INSTANCE_OF_JUMBO = 767; // 0x2ff
-    field public static final int OP_INT_TO_BYTE = 141; // 0x8d
-    field public static final int OP_INT_TO_CHAR = 142; // 0x8e
-    field public static final int OP_INT_TO_DOUBLE = 131; // 0x83
-    field public static final int OP_INT_TO_FLOAT = 130; // 0x82
-    field public static final int OP_INT_TO_LONG = 129; // 0x81
-    field public static final int OP_INT_TO_SHORT = 143; // 0x8f
-    field public static final int OP_INVOKE_CUSTOM = 252; // 0xfc
-    field public static final int OP_INVOKE_CUSTOM_RANGE = 253; // 0xfd
-    field public static final int OP_INVOKE_DIRECT = 112; // 0x70
-    field @Deprecated public static final int OP_INVOKE_DIRECT_EMPTY = 240; // 0xf0
-    field public static final int OP_INVOKE_DIRECT_JUMBO = 9471; // 0x24ff
-    field public static final int OP_INVOKE_DIRECT_RANGE = 118; // 0x76
-    field public static final int OP_INVOKE_INTERFACE = 114; // 0x72
-    field public static final int OP_INVOKE_INTERFACE_JUMBO = 9983; // 0x26ff
-    field public static final int OP_INVOKE_INTERFACE_RANGE = 120; // 0x78
-    field public static final int OP_INVOKE_POLYMORPHIC = 250; // 0xfa
-    field public static final int OP_INVOKE_POLYMORPHIC_RANGE = 251; // 0xfb
-    field public static final int OP_INVOKE_STATIC = 113; // 0x71
-    field public static final int OP_INVOKE_STATIC_JUMBO = 9727; // 0x25ff
-    field public static final int OP_INVOKE_STATIC_RANGE = 119; // 0x77
-    field public static final int OP_INVOKE_SUPER = 111; // 0x6f
-    field public static final int OP_INVOKE_SUPER_JUMBO = 9215; // 0x23ff
-    field @Deprecated public static final int OP_INVOKE_SUPER_QUICK = 250; // 0xfa
-    field @Deprecated public static final int OP_INVOKE_SUPER_QUICK_RANGE = 251; // 0xfb
-    field public static final int OP_INVOKE_SUPER_RANGE = 117; // 0x75
-    field public static final int OP_INVOKE_VIRTUAL = 110; // 0x6e
-    field public static final int OP_INVOKE_VIRTUAL_JUMBO = 8959; // 0x22ff
-    field @Deprecated public static final int OP_INVOKE_VIRTUAL_QUICK = 248; // 0xf8
-    field @Deprecated public static final int OP_INVOKE_VIRTUAL_QUICK_RANGE = 249; // 0xf9
-    field public static final int OP_INVOKE_VIRTUAL_RANGE = 116; // 0x74
-    field public static final int OP_IPUT = 89; // 0x59
-    field public static final int OP_IPUT_BOOLEAN = 92; // 0x5c
-    field public static final int OP_IPUT_BOOLEAN_JUMBO = 4351; // 0x10ff
-    field public static final int OP_IPUT_BYTE = 93; // 0x5d
-    field public static final int OP_IPUT_BYTE_JUMBO = 4607; // 0x11ff
-    field public static final int OP_IPUT_CHAR = 94; // 0x5e
-    field public static final int OP_IPUT_CHAR_JUMBO = 4863; // 0x12ff
-    field public static final int OP_IPUT_JUMBO = 3583; // 0xdff
-    field public static final int OP_IPUT_OBJECT = 91; // 0x5b
-    field public static final int OP_IPUT_OBJECT_JUMBO = 4095; // 0xfff
-    field @Deprecated public static final int OP_IPUT_OBJECT_QUICK = 247; // 0xf7
-    field @Deprecated public static final int OP_IPUT_QUICK = 245; // 0xf5
-    field public static final int OP_IPUT_SHORT = 95; // 0x5f
-    field public static final int OP_IPUT_SHORT_JUMBO = 5119; // 0x13ff
-    field public static final int OP_IPUT_WIDE = 90; // 0x5a
-    field public static final int OP_IPUT_WIDE_JUMBO = 3839; // 0xeff
-    field @Deprecated public static final int OP_IPUT_WIDE_QUICK = 246; // 0xf6
-    field @Deprecated public static final int OP_IPUT_WIDE_VOLATILE = 233; // 0xe9
-    field public static final int OP_LONG_TO_DOUBLE = 134; // 0x86
-    field public static final int OP_LONG_TO_FLOAT = 133; // 0x85
-    field public static final int OP_LONG_TO_INT = 132; // 0x84
-    field public static final int OP_MONITOR_ENTER = 29; // 0x1d
-    field public static final int OP_MONITOR_EXIT = 30; // 0x1e
-    field public static final int OP_MOVE = 1; // 0x1
-    field public static final int OP_MOVE_16 = 3; // 0x3
-    field public static final int OP_MOVE_EXCEPTION = 13; // 0xd
-    field public static final int OP_MOVE_FROM16 = 2; // 0x2
-    field public static final int OP_MOVE_OBJECT = 7; // 0x7
-    field public static final int OP_MOVE_OBJECT_16 = 9; // 0x9
-    field public static final int OP_MOVE_OBJECT_FROM16 = 8; // 0x8
-    field public static final int OP_MOVE_RESULT = 10; // 0xa
-    field public static final int OP_MOVE_RESULT_OBJECT = 12; // 0xc
-    field public static final int OP_MOVE_RESULT_WIDE = 11; // 0xb
-    field public static final int OP_MOVE_WIDE = 4; // 0x4
-    field public static final int OP_MOVE_WIDE_16 = 6; // 0x6
-    field public static final int OP_MOVE_WIDE_FROM16 = 5; // 0x5
-    field public static final int OP_MUL_DOUBLE = 173; // 0xad
-    field public static final int OP_MUL_DOUBLE_2ADDR = 205; // 0xcd
-    field public static final int OP_MUL_FLOAT = 168; // 0xa8
-    field public static final int OP_MUL_FLOAT_2ADDR = 200; // 0xc8
-    field public static final int OP_MUL_INT = 146; // 0x92
-    field public static final int OP_MUL_INT_2ADDR = 178; // 0xb2
-    field public static final int OP_MUL_INT_LIT16 = 210; // 0xd2
-    field public static final int OP_MUL_INT_LIT8 = 218; // 0xda
-    field public static final int OP_MUL_LONG = 157; // 0x9d
-    field public static final int OP_MUL_LONG_2ADDR = 189; // 0xbd
-    field public static final int OP_NEG_DOUBLE = 128; // 0x80
-    field public static final int OP_NEG_FLOAT = 127; // 0x7f
-    field public static final int OP_NEG_INT = 123; // 0x7b
-    field public static final int OP_NEG_LONG = 125; // 0x7d
-    field public static final int OP_NEW_ARRAY = 35; // 0x23
-    field public static final int OP_NEW_ARRAY_JUMBO = 1279; // 0x4ff
-    field public static final int OP_NEW_INSTANCE = 34; // 0x22
-    field public static final int OP_NEW_INSTANCE_JUMBO = 1023; // 0x3ff
-    field public static final int OP_NOP = 0; // 0x0
-    field public static final int OP_NOT_INT = 124; // 0x7c
-    field public static final int OP_NOT_LONG = 126; // 0x7e
-    field public static final int OP_OR_INT = 150; // 0x96
-    field public static final int OP_OR_INT_2ADDR = 182; // 0xb6
-    field public static final int OP_OR_INT_LIT16 = 214; // 0xd6
-    field public static final int OP_OR_INT_LIT8 = 222; // 0xde
-    field public static final int OP_OR_LONG = 161; // 0xa1
-    field public static final int OP_OR_LONG_2ADDR = 193; // 0xc1
-    field public static final int OP_PACKED_SWITCH = 43; // 0x2b
-    field public static final int OP_REM_DOUBLE = 175; // 0xaf
-    field public static final int OP_REM_DOUBLE_2ADDR = 207; // 0xcf
-    field public static final int OP_REM_FLOAT = 170; // 0xaa
-    field public static final int OP_REM_FLOAT_2ADDR = 202; // 0xca
-    field public static final int OP_REM_INT = 148; // 0x94
-    field public static final int OP_REM_INT_2ADDR = 180; // 0xb4
-    field public static final int OP_REM_INT_LIT16 = 212; // 0xd4
-    field public static final int OP_REM_INT_LIT8 = 220; // 0xdc
-    field public static final int OP_REM_LONG = 159; // 0x9f
-    field public static final int OP_REM_LONG_2ADDR = 191; // 0xbf
-    field public static final int OP_RETURN = 15; // 0xf
-    field public static final int OP_RETURN_OBJECT = 17; // 0x11
-    field public static final int OP_RETURN_VOID = 14; // 0xe
-    field public static final int OP_RETURN_WIDE = 16; // 0x10
-    field public static final int OP_RSUB_INT = 209; // 0xd1
-    field public static final int OP_RSUB_INT_LIT8 = 217; // 0xd9
-    field public static final int OP_SGET = 96; // 0x60
-    field public static final int OP_SGET_BOOLEAN = 99; // 0x63
-    field public static final int OP_SGET_BOOLEAN_JUMBO = 6143; // 0x17ff
-    field public static final int OP_SGET_BYTE = 100; // 0x64
-    field public static final int OP_SGET_BYTE_JUMBO = 6399; // 0x18ff
-    field public static final int OP_SGET_CHAR = 101; // 0x65
-    field public static final int OP_SGET_CHAR_JUMBO = 6655; // 0x19ff
-    field public static final int OP_SGET_JUMBO = 5375; // 0x14ff
-    field public static final int OP_SGET_OBJECT = 98; // 0x62
-    field public static final int OP_SGET_OBJECT_JUMBO = 5887; // 0x16ff
-    field public static final int OP_SGET_SHORT = 102; // 0x66
-    field public static final int OP_SGET_SHORT_JUMBO = 6911; // 0x1aff
-    field public static final int OP_SGET_WIDE = 97; // 0x61
-    field public static final int OP_SGET_WIDE_JUMBO = 5631; // 0x15ff
-    field @Deprecated public static final int OP_SGET_WIDE_VOLATILE = 234; // 0xea
-    field public static final int OP_SHL_INT = 152; // 0x98
-    field public static final int OP_SHL_INT_2ADDR = 184; // 0xb8
-    field public static final int OP_SHL_INT_LIT8 = 224; // 0xe0
-    field public static final int OP_SHL_LONG = 163; // 0xa3
-    field public static final int OP_SHL_LONG_2ADDR = 195; // 0xc3
-    field public static final int OP_SHR_INT = 153; // 0x99
-    field public static final int OP_SHR_INT_2ADDR = 185; // 0xb9
-    field public static final int OP_SHR_INT_LIT8 = 225; // 0xe1
-    field public static final int OP_SHR_LONG = 164; // 0xa4
-    field public static final int OP_SHR_LONG_2ADDR = 196; // 0xc4
-    field public static final int OP_SPARSE_SWITCH = 44; // 0x2c
-    field public static final int OP_SPUT = 103; // 0x67
-    field public static final int OP_SPUT_BOOLEAN = 106; // 0x6a
-    field public static final int OP_SPUT_BOOLEAN_JUMBO = 7935; // 0x1eff
-    field public static final int OP_SPUT_BYTE = 107; // 0x6b
-    field public static final int OP_SPUT_BYTE_JUMBO = 8191; // 0x1fff
-    field public static final int OP_SPUT_CHAR = 108; // 0x6c
-    field public static final int OP_SPUT_CHAR_JUMBO = 8447; // 0x20ff
-    field public static final int OP_SPUT_JUMBO = 7167; // 0x1bff
-    field public static final int OP_SPUT_OBJECT = 105; // 0x69
-    field public static final int OP_SPUT_OBJECT_JUMBO = 7679; // 0x1dff
-    field public static final int OP_SPUT_SHORT = 109; // 0x6d
-    field public static final int OP_SPUT_SHORT_JUMBO = 8703; // 0x21ff
-    field public static final int OP_SPUT_WIDE = 104; // 0x68
-    field public static final int OP_SPUT_WIDE_JUMBO = 7423; // 0x1cff
-    field @Deprecated public static final int OP_SPUT_WIDE_VOLATILE = 235; // 0xeb
-    field public static final int OP_SUB_DOUBLE = 172; // 0xac
-    field public static final int OP_SUB_DOUBLE_2ADDR = 204; // 0xcc
-    field public static final int OP_SUB_FLOAT = 167; // 0xa7
-    field public static final int OP_SUB_FLOAT_2ADDR = 199; // 0xc7
-    field public static final int OP_SUB_INT = 145; // 0x91
-    field public static final int OP_SUB_INT_2ADDR = 177; // 0xb1
-    field public static final int OP_SUB_LONG = 156; // 0x9c
-    field public static final int OP_SUB_LONG_2ADDR = 188; // 0xbc
-    field public static final int OP_THROW = 39; // 0x27
-    field @Deprecated public static final int OP_THROW_VERIFICATION_ERROR = 237; // 0xed
-    field public static final int OP_USHR_INT = 154; // 0x9a
-    field public static final int OP_USHR_INT_2ADDR = 186; // 0xba
-    field public static final int OP_USHR_INT_LIT8 = 226; // 0xe2
-    field public static final int OP_USHR_LONG = 165; // 0xa5
-    field public static final int OP_USHR_LONG_2ADDR = 197; // 0xc5
-    field public static final int OP_XOR_INT = 151; // 0x97
-    field public static final int OP_XOR_INT_2ADDR = 183; // 0xb7
-    field public static final int OP_XOR_INT_LIT16 = 215; // 0xd7
-    field public static final int OP_XOR_INT_LIT8 = 223; // 0xdf
-    field public static final int OP_XOR_LONG = 162; // 0xa2
-    field public static final int OP_XOR_LONG_2ADDR = 194; // 0xc2
-  }
-
-}
-
-package dalvik.system {
-
-  public class BaseDexClassLoader extends java.lang.ClassLoader {
-    ctor public BaseDexClassLoader(String, java.io.File, String, ClassLoader);
-    method public String findLibrary(String);
-    method protected java.util.Enumeration<java.net.URL> findResources(String);
-  }
-
-  public final class DelegateLastClassLoader extends dalvik.system.PathClassLoader {
-    ctor public DelegateLastClassLoader(String, ClassLoader);
-    ctor public DelegateLastClassLoader(String, String, ClassLoader);
-    ctor public DelegateLastClassLoader(@NonNull String, @Nullable String, @Nullable ClassLoader, boolean);
-  }
-
-  public class DexClassLoader extends dalvik.system.BaseDexClassLoader {
-    ctor public DexClassLoader(String, String, String, ClassLoader);
-  }
-
-  @Deprecated public final class DexFile {
-    ctor @Deprecated public DexFile(java.io.File) throws java.io.IOException;
-    ctor @Deprecated public DexFile(String) throws java.io.IOException;
-    method @Deprecated public void close() throws java.io.IOException;
-    method @Deprecated public java.util.Enumeration<java.lang.String> entries();
-    method @Deprecated public String getName();
-    method @Deprecated public static boolean isDexOptNeeded(String) throws java.io.FileNotFoundException, java.io.IOException;
-    method @Deprecated public Class loadClass(String, ClassLoader);
-    method @Deprecated public static dalvik.system.DexFile loadDex(String, String, int) throws java.io.IOException;
-  }
-
-  public final class InMemoryDexClassLoader extends dalvik.system.BaseDexClassLoader {
-    ctor public InMemoryDexClassLoader(@NonNull java.nio.ByteBuffer[], @Nullable String, @Nullable ClassLoader);
-    ctor public InMemoryDexClassLoader(@NonNull java.nio.ByteBuffer[], @Nullable ClassLoader);
-    ctor public InMemoryDexClassLoader(@NonNull java.nio.ByteBuffer, @Nullable ClassLoader);
-  }
-
-  public class PathClassLoader extends dalvik.system.BaseDexClassLoader {
-    ctor public PathClassLoader(String, ClassLoader);
-    ctor public PathClassLoader(String, String, ClassLoader);
-  }
-
-}
-
-package java.awt.font {
-
-  public final class NumericShaper implements java.io.Serializable {
-    method public static java.awt.font.NumericShaper getContextualShaper(int);
-    method public static java.awt.font.NumericShaper getContextualShaper(java.util.Set<java.awt.font.NumericShaper.Range>);
-    method public static java.awt.font.NumericShaper getContextualShaper(int, int);
-    method public static java.awt.font.NumericShaper getContextualShaper(java.util.Set<java.awt.font.NumericShaper.Range>, java.awt.font.NumericShaper.Range);
-    method public java.util.Set<java.awt.font.NumericShaper.Range> getRangeSet();
-    method public int getRanges();
-    method public static java.awt.font.NumericShaper getShaper(int);
-    method public static java.awt.font.NumericShaper getShaper(java.awt.font.NumericShaper.Range);
-    method public boolean isContextual();
-    method public void shape(char[], int, int);
-    method public void shape(char[], int, int, int);
-    method public void shape(char[], int, int, java.awt.font.NumericShaper.Range);
-    field public static final int ALL_RANGES = 524287; // 0x7ffff
-    field public static final int ARABIC = 2; // 0x2
-    field public static final int BENGALI = 16; // 0x10
-    field public static final int DEVANAGARI = 8; // 0x8
-    field public static final int EASTERN_ARABIC = 4; // 0x4
-    field public static final int ETHIOPIC = 65536; // 0x10000
-    field public static final int EUROPEAN = 1; // 0x1
-    field public static final int GUJARATI = 64; // 0x40
-    field public static final int GURMUKHI = 32; // 0x20
-    field public static final int KANNADA = 1024; // 0x400
-    field public static final int KHMER = 131072; // 0x20000
-    field public static final int LAO = 8192; // 0x2000
-    field public static final int MALAYALAM = 2048; // 0x800
-    field public static final int MONGOLIAN = 262144; // 0x40000
-    field public static final int MYANMAR = 32768; // 0x8000
-    field public static final int ORIYA = 128; // 0x80
-    field public static final int TAMIL = 256; // 0x100
-    field public static final int TELUGU = 512; // 0x200
-    field public static final int THAI = 4096; // 0x1000
-    field public static final int TIBETAN = 16384; // 0x4000
-  }
-
-  public enum NumericShaper.Range {
-    enum_constant public static final java.awt.font.NumericShaper.Range ARABIC;
-    enum_constant public static final java.awt.font.NumericShaper.Range BALINESE;
-    enum_constant public static final java.awt.font.NumericShaper.Range BENGALI;
-    enum_constant public static final java.awt.font.NumericShaper.Range CHAM;
-    enum_constant public static final java.awt.font.NumericShaper.Range DEVANAGARI;
-    enum_constant public static final java.awt.font.NumericShaper.Range EASTERN_ARABIC;
-    enum_constant public static final java.awt.font.NumericShaper.Range ETHIOPIC;
-    enum_constant public static final java.awt.font.NumericShaper.Range EUROPEAN;
-    enum_constant public static final java.awt.font.NumericShaper.Range GUJARATI;
-    enum_constant public static final java.awt.font.NumericShaper.Range GURMUKHI;
-    enum_constant public static final java.awt.font.NumericShaper.Range JAVANESE;
-    enum_constant public static final java.awt.font.NumericShaper.Range KANNADA;
-    enum_constant public static final java.awt.font.NumericShaper.Range KAYAH_LI;
-    enum_constant public static final java.awt.font.NumericShaper.Range KHMER;
-    enum_constant public static final java.awt.font.NumericShaper.Range LAO;
-    enum_constant public static final java.awt.font.NumericShaper.Range LEPCHA;
-    enum_constant public static final java.awt.font.NumericShaper.Range LIMBU;
-    enum_constant public static final java.awt.font.NumericShaper.Range MALAYALAM;
-    enum_constant public static final java.awt.font.NumericShaper.Range MEETEI_MAYEK;
-    enum_constant public static final java.awt.font.NumericShaper.Range MONGOLIAN;
-    enum_constant public static final java.awt.font.NumericShaper.Range MYANMAR;
-    enum_constant public static final java.awt.font.NumericShaper.Range MYANMAR_SHAN;
-    enum_constant public static final java.awt.font.NumericShaper.Range NEW_TAI_LUE;
-    enum_constant public static final java.awt.font.NumericShaper.Range NKO;
-    enum_constant public static final java.awt.font.NumericShaper.Range OL_CHIKI;
-    enum_constant public static final java.awt.font.NumericShaper.Range ORIYA;
-    enum_constant public static final java.awt.font.NumericShaper.Range SAURASHTRA;
-    enum_constant public static final java.awt.font.NumericShaper.Range SUNDANESE;
-    enum_constant public static final java.awt.font.NumericShaper.Range TAI_THAM_HORA;
-    enum_constant public static final java.awt.font.NumericShaper.Range TAI_THAM_THAM;
-    enum_constant public static final java.awt.font.NumericShaper.Range TAMIL;
-    enum_constant public static final java.awt.font.NumericShaper.Range TELUGU;
-    enum_constant public static final java.awt.font.NumericShaper.Range THAI;
-    enum_constant public static final java.awt.font.NumericShaper.Range TIBETAN;
-    enum_constant public static final java.awt.font.NumericShaper.Range VAI;
-  }
-
-  public final class TextAttribute extends java.text.AttributedCharacterIterator.Attribute {
-    ctor protected TextAttribute(String);
-    field public static final java.awt.font.TextAttribute BACKGROUND;
-    field public static final java.awt.font.TextAttribute BIDI_EMBEDDING;
-    field public static final java.awt.font.TextAttribute CHAR_REPLACEMENT;
-    field public static final java.awt.font.TextAttribute FAMILY;
-    field public static final java.awt.font.TextAttribute FONT;
-    field public static final java.awt.font.TextAttribute FOREGROUND;
-    field public static final java.awt.font.TextAttribute INPUT_METHOD_HIGHLIGHT;
-    field public static final java.awt.font.TextAttribute INPUT_METHOD_UNDERLINE;
-    field public static final java.awt.font.TextAttribute JUSTIFICATION;
-    field public static final Float JUSTIFICATION_FULL;
-    field public static final Float JUSTIFICATION_NONE;
-    field public static final java.awt.font.TextAttribute KERNING;
-    field public static final Integer KERNING_ON;
-    field public static final java.awt.font.TextAttribute LIGATURES;
-    field public static final Integer LIGATURES_ON;
-    field public static final java.awt.font.TextAttribute NUMERIC_SHAPING;
-    field public static final java.awt.font.TextAttribute POSTURE;
-    field public static final Float POSTURE_OBLIQUE;
-    field public static final Float POSTURE_REGULAR;
-    field public static final java.awt.font.TextAttribute RUN_DIRECTION;
-    field public static final Boolean RUN_DIRECTION_LTR;
-    field public static final Boolean RUN_DIRECTION_RTL;
-    field public static final java.awt.font.TextAttribute SIZE;
-    field public static final java.awt.font.TextAttribute STRIKETHROUGH;
-    field public static final Boolean STRIKETHROUGH_ON;
-    field public static final java.awt.font.TextAttribute SUPERSCRIPT;
-    field public static final Integer SUPERSCRIPT_SUB;
-    field public static final Integer SUPERSCRIPT_SUPER;
-    field public static final java.awt.font.TextAttribute SWAP_COLORS;
-    field public static final Boolean SWAP_COLORS_ON;
-    field public static final java.awt.font.TextAttribute TRACKING;
-    field public static final Float TRACKING_LOOSE;
-    field public static final Float TRACKING_TIGHT;
-    field public static final java.awt.font.TextAttribute TRANSFORM;
-    field public static final java.awt.font.TextAttribute UNDERLINE;
-    field public static final Integer UNDERLINE_LOW_DASHED;
-    field public static final Integer UNDERLINE_LOW_DOTTED;
-    field public static final Integer UNDERLINE_LOW_GRAY;
-    field public static final Integer UNDERLINE_LOW_ONE_PIXEL;
-    field public static final Integer UNDERLINE_LOW_TWO_PIXEL;
-    field public static final Integer UNDERLINE_ON;
-    field public static final java.awt.font.TextAttribute WEIGHT;
-    field public static final Float WEIGHT_BOLD;
-    field public static final Float WEIGHT_DEMIBOLD;
-    field public static final Float WEIGHT_DEMILIGHT;
-    field public static final Float WEIGHT_EXTRABOLD;
-    field public static final Float WEIGHT_EXTRA_LIGHT;
-    field public static final Float WEIGHT_HEAVY;
-    field public static final Float WEIGHT_LIGHT;
-    field public static final Float WEIGHT_MEDIUM;
-    field public static final Float WEIGHT_REGULAR;
-    field public static final Float WEIGHT_SEMIBOLD;
-    field public static final Float WEIGHT_ULTRABOLD;
-    field public static final java.awt.font.TextAttribute WIDTH;
-    field public static final Float WIDTH_CONDENSED;
-    field public static final Float WIDTH_EXTENDED;
-    field public static final Float WIDTH_REGULAR;
-    field public static final Float WIDTH_SEMI_CONDENSED;
-    field public static final Float WIDTH_SEMI_EXTENDED;
-  }
-
-}
-
-package java.beans {
-
-  public class IndexedPropertyChangeEvent extends java.beans.PropertyChangeEvent {
-    ctor public IndexedPropertyChangeEvent(Object, String, Object, Object, int);
-    method public int getIndex();
-  }
-
-  public class PropertyChangeEvent extends java.util.EventObject {
-    ctor public PropertyChangeEvent(Object, String, Object, Object);
-    method public Object getNewValue();
-    method public Object getOldValue();
-    method public Object getPropagationId();
-    method public String getPropertyName();
-    method public void setPropagationId(Object);
-  }
-
-  public interface PropertyChangeListener extends java.util.EventListener {
-    method public void propertyChange(java.beans.PropertyChangeEvent);
-  }
-
-  public class PropertyChangeListenerProxy extends java.util.EventListenerProxy<java.beans.PropertyChangeListener> implements java.beans.PropertyChangeListener {
-    ctor public PropertyChangeListenerProxy(String, java.beans.PropertyChangeListener);
-    method public String getPropertyName();
-    method public void propertyChange(java.beans.PropertyChangeEvent);
-  }
-
-  public class PropertyChangeSupport implements java.io.Serializable {
-    ctor public PropertyChangeSupport(Object);
-    method public void addPropertyChangeListener(java.beans.PropertyChangeListener);
-    method public void addPropertyChangeListener(String, java.beans.PropertyChangeListener);
-    method public void fireIndexedPropertyChange(String, int, Object, Object);
-    method public void fireIndexedPropertyChange(String, int, int, int);
-    method public void fireIndexedPropertyChange(String, int, boolean, boolean);
-    method public void firePropertyChange(String, Object, Object);
-    method public void firePropertyChange(String, int, int);
-    method public void firePropertyChange(String, boolean, boolean);
-    method public void firePropertyChange(java.beans.PropertyChangeEvent);
-    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners();
-    method public java.beans.PropertyChangeListener[] getPropertyChangeListeners(String);
-    method public boolean hasListeners(String);
-    method public void removePropertyChangeListener(java.beans.PropertyChangeListener);
-    method public void removePropertyChangeListener(String, java.beans.PropertyChangeListener);
-  }
-
-}
-
-package java.io {
-
-  public class BufferedInputStream extends java.io.FilterInputStream {
-    ctor public BufferedInputStream(java.io.InputStream);
-    ctor public BufferedInputStream(java.io.InputStream, int);
-    field protected volatile byte[] buf;
-    field protected int count;
-    field protected int marklimit;
-    field protected int markpos;
-    field protected int pos;
-  }
-
-  public class BufferedOutputStream extends java.io.FilterOutputStream {
-    ctor public BufferedOutputStream(java.io.OutputStream);
-    ctor public BufferedOutputStream(java.io.OutputStream, int);
-    field protected byte[] buf;
-    field protected int count;
-  }
-
-  public class BufferedReader extends java.io.Reader {
-    ctor public BufferedReader(java.io.Reader, int);
-    ctor public BufferedReader(java.io.Reader);
-    method public void close() throws java.io.IOException;
-    method public java.util.stream.Stream<java.lang.String> lines();
-    method public int read(char[], int, int) throws java.io.IOException;
-    method public String readLine() throws java.io.IOException;
-  }
-
-  public class BufferedWriter extends java.io.Writer {
-    ctor public BufferedWriter(java.io.Writer);
-    ctor public BufferedWriter(java.io.Writer, int);
-    method public void close() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public void newLine() throws java.io.IOException;
-    method public void write(char[], int, int) throws java.io.IOException;
-  }
-
-  public class ByteArrayInputStream extends java.io.InputStream {
-    ctor public ByteArrayInputStream(byte[]);
-    ctor public ByteArrayInputStream(byte[], int, int);
-    method public int available();
-    method public int read();
-    method public int read(byte[], int, int);
-    method public void reset();
-    method public long skip(long);
-    field protected byte[] buf;
-    field protected int count;
-    field protected int mark;
-    field protected int pos;
-  }
-
-  public class ByteArrayOutputStream extends java.io.OutputStream {
-    ctor public ByteArrayOutputStream();
-    ctor public ByteArrayOutputStream(int);
-    method public void reset();
-    method public int size();
-    method @NonNull public byte[] toByteArray();
-    method @NonNull public String toString(@NonNull String) throws java.io.UnsupportedEncodingException;
-    method @Deprecated @NonNull public String toString(int);
-    method public void write(int);
-    method public void write(@NonNull byte[], int, int);
-    method public void writeTo(@NonNull java.io.OutputStream) throws java.io.IOException;
-    field @NonNull protected byte[] buf;
-    field protected int count;
-  }
-
-  public class CharArrayReader extends java.io.Reader {
-    ctor public CharArrayReader(char[]);
-    ctor public CharArrayReader(char[], int, int);
-    method public void close();
-    method public int read(char[], int, int) throws java.io.IOException;
-    field protected char[] buf;
-    field protected int count;
-    field protected int markedPos;
-    field protected int pos;
-  }
-
-  public class CharArrayWriter extends java.io.Writer {
-    ctor public CharArrayWriter();
-    ctor public CharArrayWriter(int);
-    method public java.io.CharArrayWriter append(CharSequence);
-    method public java.io.CharArrayWriter append(CharSequence, int, int);
-    method public java.io.CharArrayWriter append(char);
-    method public void close();
-    method public void flush();
-    method public void reset();
-    method public int size();
-    method public char[] toCharArray();
-    method public void write(int);
-    method public void write(char[], int, int);
-    method public void write(String, int, int);
-    method public void writeTo(java.io.Writer) throws java.io.IOException;
-    field protected char[] buf;
-    field protected int count;
-  }
-
-  public class CharConversionException extends java.io.IOException {
-    ctor public CharConversionException();
-    ctor public CharConversionException(String);
-  }
-
-  public interface Closeable extends java.lang.AutoCloseable {
-    method public void close() throws java.io.IOException;
-  }
-
-  public final class Console implements java.io.Flushable {
-    method public void flush();
-    method public java.io.Console format(String, java.lang.Object...);
-    method public java.io.Console printf(String, java.lang.Object...);
-    method public String readLine(String, java.lang.Object...);
-    method public String readLine();
-    method public char[] readPassword(String, java.lang.Object...);
-    method public char[] readPassword();
-    method public java.io.Reader reader();
-    method public java.io.PrintWriter writer();
-  }
-
-  public interface DataInput {
-    method public boolean readBoolean() throws java.io.IOException;
-    method public byte readByte() throws java.io.IOException;
-    method public char readChar() throws java.io.IOException;
-    method public double readDouble() throws java.io.IOException;
-    method public float readFloat() throws java.io.IOException;
-    method public void readFully(byte[]) throws java.io.IOException;
-    method public void readFully(byte[], int, int) throws java.io.IOException;
-    method public int readInt() throws java.io.IOException;
-    method public String readLine() throws java.io.IOException;
-    method public long readLong() throws java.io.IOException;
-    method public short readShort() throws java.io.IOException;
-    method public String readUTF() throws java.io.IOException;
-    method public int readUnsignedByte() throws java.io.IOException;
-    method public int readUnsignedShort() throws java.io.IOException;
-    method public int skipBytes(int) throws java.io.IOException;
-  }
-
-  public class DataInputStream extends java.io.FilterInputStream implements java.io.DataInput {
-    ctor public DataInputStream(java.io.InputStream);
-    method public final int read(byte[]) throws java.io.IOException;
-    method public final int read(byte[], int, int) throws java.io.IOException;
-    method public final boolean readBoolean() throws java.io.IOException;
-    method public final byte readByte() throws java.io.IOException;
-    method public final char readChar() throws java.io.IOException;
-    method public final double readDouble() throws java.io.IOException;
-    method public final float readFloat() throws java.io.IOException;
-    method public final void readFully(byte[]) throws java.io.IOException;
-    method public final void readFully(byte[], int, int) throws java.io.IOException;
-    method public final int readInt() throws java.io.IOException;
-    method @Deprecated public final String readLine() throws java.io.IOException;
-    method public final long readLong() throws java.io.IOException;
-    method public final short readShort() throws java.io.IOException;
-    method public final String readUTF() throws java.io.IOException;
-    method public static final String readUTF(java.io.DataInput) throws java.io.IOException;
-    method public final int readUnsignedByte() throws java.io.IOException;
-    method public final int readUnsignedShort() throws java.io.IOException;
-    method public final int skipBytes(int) throws java.io.IOException;
-  }
-
-  public interface DataOutput {
-    method public void write(int) throws java.io.IOException;
-    method public void write(byte[]) throws java.io.IOException;
-    method public void write(byte[], int, int) throws java.io.IOException;
-    method public void writeBoolean(boolean) throws java.io.IOException;
-    method public void writeByte(int) throws java.io.IOException;
-    method public void writeBytes(String) throws java.io.IOException;
-    method public void writeChar(int) throws java.io.IOException;
-    method public void writeChars(String) throws java.io.IOException;
-    method public void writeDouble(double) throws java.io.IOException;
-    method public void writeFloat(float) throws java.io.IOException;
-    method public void writeInt(int) throws java.io.IOException;
-    method public void writeLong(long) throws java.io.IOException;
-    method public void writeShort(int) throws java.io.IOException;
-    method public void writeUTF(String) throws java.io.IOException;
-  }
-
-  public class DataOutputStream extends java.io.FilterOutputStream implements java.io.DataOutput {
-    ctor public DataOutputStream(java.io.OutputStream);
-    method public final int size();
-    method public final void writeBoolean(boolean) throws java.io.IOException;
-    method public final void writeByte(int) throws java.io.IOException;
-    method public final void writeBytes(String) throws java.io.IOException;
-    method public final void writeChar(int) throws java.io.IOException;
-    method public final void writeChars(String) throws java.io.IOException;
-    method public final void writeDouble(double) throws java.io.IOException;
-    method public final void writeFloat(float) throws java.io.IOException;
-    method public final void writeInt(int) throws java.io.IOException;
-    method public final void writeLong(long) throws java.io.IOException;
-    method public final void writeShort(int) throws java.io.IOException;
-    method public final void writeUTF(String) throws java.io.IOException;
-    field protected int written;
-  }
-
-  public class EOFException extends java.io.IOException {
-    ctor public EOFException();
-    ctor public EOFException(String);
-  }
-
-  public interface Externalizable extends java.io.Serializable {
-    method public void readExternal(java.io.ObjectInput) throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public void writeExternal(java.io.ObjectOutput) throws java.io.IOException;
-  }
-
-  public class File implements java.lang.Comparable<java.io.File> java.io.Serializable {
-    ctor public File(@NonNull String);
-    ctor public File(@Nullable String, @NonNull String);
-    ctor public File(@Nullable java.io.File, @NonNull String);
-    ctor public File(@NonNull java.net.URI);
-    method public boolean canExecute();
-    method public boolean canRead();
-    method public boolean canWrite();
-    method public int compareTo(@NonNull java.io.File);
-    method public boolean createNewFile() throws java.io.IOException;
-    method @NonNull public static java.io.File createTempFile(@NonNull String, @Nullable String, @Nullable java.io.File) throws java.io.IOException;
-    method @NonNull public static java.io.File createTempFile(@NonNull String, @Nullable String) throws java.io.IOException;
-    method public boolean delete();
-    method public void deleteOnExit();
-    method public boolean exists();
-    method @NonNull public java.io.File getAbsoluteFile();
-    method @NonNull public String getAbsolutePath();
-    method @NonNull public java.io.File getCanonicalFile() throws java.io.IOException;
-    method @NonNull public String getCanonicalPath() throws java.io.IOException;
-    method public long getFreeSpace();
-    method @NonNull public String getName();
-    method @Nullable public String getParent();
-    method @Nullable public java.io.File getParentFile();
-    method @NonNull public String getPath();
-    method public long getTotalSpace();
-    method public long getUsableSpace();
-    method public boolean isAbsolute();
-    method public boolean isDirectory();
-    method public boolean isFile();
-    method public boolean isHidden();
-    method public long lastModified();
-    method public long length();
-    method @Nullable public String[] list();
-    method @Nullable public String[] list(@Nullable java.io.FilenameFilter);
-    method @Nullable public java.io.File[] listFiles();
-    method @Nullable public java.io.File[] listFiles(@Nullable java.io.FilenameFilter);
-    method @Nullable public java.io.File[] listFiles(@Nullable java.io.FileFilter);
-    method @NonNull public static java.io.File[] listRoots();
-    method public boolean mkdir();
-    method public boolean mkdirs();
-    method public boolean renameTo(@NonNull java.io.File);
-    method public boolean setExecutable(boolean, boolean);
-    method public boolean setExecutable(boolean);
-    method public boolean setLastModified(long);
-    method public boolean setReadOnly();
-    method public boolean setReadable(boolean, boolean);
-    method public boolean setReadable(boolean);
-    method public boolean setWritable(boolean, boolean);
-    method public boolean setWritable(boolean);
-    method @NonNull public java.nio.file.Path toPath();
-    method @NonNull public java.net.URI toURI();
-    method @Deprecated @NonNull public java.net.URL toURL() throws java.net.MalformedURLException;
-    field @NonNull public static final String pathSeparator;
-    field public static final char pathSeparatorChar;
-    field @NonNull public static final String separator;
-    field public static final char separatorChar;
-  }
-
-  public final class FileDescriptor {
-    ctor public FileDescriptor();
-    method public void sync() throws java.io.SyncFailedException;
-    method public boolean valid();
-    field public static final java.io.FileDescriptor err;
-    field public static final java.io.FileDescriptor in;
-    field public static final java.io.FileDescriptor out;
-  }
-
-  @java.lang.FunctionalInterface public interface FileFilter {
-    method public boolean accept(java.io.File);
-  }
-
-  public class FileInputStream extends java.io.InputStream {
-    ctor public FileInputStream(String) throws java.io.FileNotFoundException;
-    ctor public FileInputStream(java.io.File) throws java.io.FileNotFoundException;
-    ctor public FileInputStream(java.io.FileDescriptor);
-    method protected void finalize() throws java.io.IOException;
-    method public java.nio.channels.FileChannel getChannel();
-    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
-    method public int read() throws java.io.IOException;
-  }
-
-  public class FileNotFoundException extends java.io.IOException {
-    ctor public FileNotFoundException();
-    ctor public FileNotFoundException(String);
-  }
-
-  public class FileOutputStream extends java.io.OutputStream {
-    ctor public FileOutputStream(String) throws java.io.FileNotFoundException;
-    ctor public FileOutputStream(String, boolean) throws java.io.FileNotFoundException;
-    ctor public FileOutputStream(java.io.File) throws java.io.FileNotFoundException;
-    ctor public FileOutputStream(java.io.File, boolean) throws java.io.FileNotFoundException;
-    ctor public FileOutputStream(java.io.FileDescriptor);
-    method protected void finalize() throws java.io.IOException;
-    method public java.nio.channels.FileChannel getChannel();
-    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
-    method public void write(int) throws java.io.IOException;
-  }
-
-  public final class FilePermission extends java.security.Permission implements java.io.Serializable {
-    ctor public FilePermission(String, String);
-    method public String getActions();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public class FileReader extends java.io.InputStreamReader {
-    ctor public FileReader(String) throws java.io.FileNotFoundException;
-    ctor public FileReader(java.io.File) throws java.io.FileNotFoundException;
-    ctor public FileReader(java.io.FileDescriptor);
-  }
-
-  public class FileWriter extends java.io.OutputStreamWriter {
-    ctor public FileWriter(String) throws java.io.IOException;
-    ctor public FileWriter(String, boolean) throws java.io.IOException;
-    ctor public FileWriter(java.io.File) throws java.io.IOException;
-    ctor public FileWriter(java.io.File, boolean) throws java.io.IOException;
-    ctor public FileWriter(java.io.FileDescriptor);
-  }
-
-  @java.lang.FunctionalInterface public interface FilenameFilter {
-    method public boolean accept(java.io.File, String);
-  }
-
-  public class FilterInputStream extends java.io.InputStream {
-    ctor protected FilterInputStream(java.io.InputStream);
-    method public int read() throws java.io.IOException;
-    field protected volatile java.io.InputStream in;
-  }
-
-  public class FilterOutputStream extends java.io.OutputStream {
-    ctor public FilterOutputStream(java.io.OutputStream);
-    method public void write(int) throws java.io.IOException;
-    field protected java.io.OutputStream out;
-  }
-
-  public abstract class FilterReader extends java.io.Reader {
-    ctor protected FilterReader(java.io.Reader);
-    method public void close() throws java.io.IOException;
-    method public int read(char[], int, int) throws java.io.IOException;
-    field protected java.io.Reader in;
-  }
-
-  public abstract class FilterWriter extends java.io.Writer {
-    ctor protected FilterWriter(java.io.Writer);
-    method public void close() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public void write(char[], int, int) throws java.io.IOException;
-    field protected java.io.Writer out;
-  }
-
-  public interface Flushable {
-    method public void flush() throws java.io.IOException;
-  }
-
-  public class IOError extends java.lang.Error {
-    ctor public IOError(Throwable);
-  }
-
-  public class IOException extends java.lang.Exception {
-    ctor public IOException();
-    ctor public IOException(String);
-    ctor public IOException(String, Throwable);
-    ctor public IOException(Throwable);
-  }
-
-  public abstract class InputStream implements java.io.Closeable {
-    ctor public InputStream();
-    method public int available() throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public void mark(int);
-    method public boolean markSupported();
-    method public abstract int read() throws java.io.IOException;
-    method public int read(byte[]) throws java.io.IOException;
-    method public int read(byte[], int, int) throws java.io.IOException;
-    method public void reset() throws java.io.IOException;
-    method public long skip(long) throws java.io.IOException;
-  }
-
-  public class InputStreamReader extends java.io.Reader {
-    ctor public InputStreamReader(java.io.InputStream);
-    ctor public InputStreamReader(java.io.InputStream, String) throws java.io.UnsupportedEncodingException;
-    ctor public InputStreamReader(java.io.InputStream, java.nio.charset.Charset);
-    ctor public InputStreamReader(java.io.InputStream, java.nio.charset.CharsetDecoder);
-    method public void close() throws java.io.IOException;
-    method public String getEncoding();
-    method public int read(char[], int, int) throws java.io.IOException;
-  }
-
-  public class InterruptedIOException extends java.io.IOException {
-    ctor public InterruptedIOException();
-    ctor public InterruptedIOException(String);
-    field public int bytesTransferred;
-  }
-
-  public class InvalidClassException extends java.io.ObjectStreamException {
-    ctor public InvalidClassException(String);
-    ctor public InvalidClassException(String, String);
-    field public String classname;
-  }
-
-  public class InvalidObjectException extends java.io.ObjectStreamException {
-    ctor public InvalidObjectException(String);
-  }
-
-  @Deprecated public class LineNumberInputStream extends java.io.FilterInputStream {
-    ctor @Deprecated public LineNumberInputStream(java.io.InputStream);
-    method @Deprecated public int getLineNumber();
-    method @Deprecated public void setLineNumber(int);
-  }
-
-  public class LineNumberReader extends java.io.BufferedReader {
-    ctor public LineNumberReader(java.io.Reader);
-    ctor public LineNumberReader(java.io.Reader, int);
-    method public int getLineNumber();
-    method public void setLineNumber(int);
-  }
-
-  public class NotActiveException extends java.io.ObjectStreamException {
-    ctor public NotActiveException(String);
-    ctor public NotActiveException();
-  }
-
-  public class NotSerializableException extends java.io.ObjectStreamException {
-    ctor public NotSerializableException(String);
-    ctor public NotSerializableException();
-  }
-
-  public interface ObjectInput extends java.io.DataInput java.lang.AutoCloseable {
-    method public int available() throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public int read() throws java.io.IOException;
-    method public int read(byte[]) throws java.io.IOException;
-    method public int read(byte[], int, int) throws java.io.IOException;
-    method public Object readObject() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public long skip(long) throws java.io.IOException;
-  }
-
-  public class ObjectInputStream extends java.io.InputStream implements java.io.ObjectInput java.io.ObjectStreamConstants {
-    ctor public ObjectInputStream(java.io.InputStream) throws java.io.IOException;
-    ctor protected ObjectInputStream() throws java.io.IOException, java.lang.SecurityException;
-    method public void defaultReadObject() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method protected boolean enableResolveObject(boolean) throws java.lang.SecurityException;
-    method public int read() throws java.io.IOException;
-    method public boolean readBoolean() throws java.io.IOException;
-    method public byte readByte() throws java.io.IOException;
-    method public char readChar() throws java.io.IOException;
-    method protected java.io.ObjectStreamClass readClassDescriptor() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public double readDouble() throws java.io.IOException;
-    method public java.io.ObjectInputStream.GetField readFields() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public float readFloat() throws java.io.IOException;
-    method public void readFully(byte[]) throws java.io.IOException;
-    method public void readFully(byte[], int, int) throws java.io.IOException;
-    method public int readInt() throws java.io.IOException;
-    method @Deprecated public String readLine() throws java.io.IOException;
-    method public long readLong() throws java.io.IOException;
-    method public final Object readObject() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method protected Object readObjectOverride() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public short readShort() throws java.io.IOException;
-    method protected void readStreamHeader() throws java.io.IOException, java.io.StreamCorruptedException;
-    method public String readUTF() throws java.io.IOException;
-    method public Object readUnshared() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public int readUnsignedByte() throws java.io.IOException;
-    method public int readUnsignedShort() throws java.io.IOException;
-    method public void registerValidation(java.io.ObjectInputValidation, int) throws java.io.InvalidObjectException, java.io.NotActiveException;
-    method protected Class<?> resolveClass(java.io.ObjectStreamClass) throws java.lang.ClassNotFoundException, java.io.IOException;
-    method protected Object resolveObject(Object) throws java.io.IOException;
-    method protected Class<?> resolveProxyClass(String[]) throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public int skipBytes(int) throws java.io.IOException;
-  }
-
-  public abstract static class ObjectInputStream.GetField {
-    ctor public ObjectInputStream.GetField();
-    method public abstract boolean defaulted(String) throws java.io.IOException;
-    method public abstract boolean get(String, boolean) throws java.io.IOException;
-    method public abstract byte get(String, byte) throws java.io.IOException;
-    method public abstract char get(String, char) throws java.io.IOException;
-    method public abstract short get(String, short) throws java.io.IOException;
-    method public abstract int get(String, int) throws java.io.IOException;
-    method public abstract long get(String, long) throws java.io.IOException;
-    method public abstract float get(String, float) throws java.io.IOException;
-    method public abstract double get(String, double) throws java.io.IOException;
-    method public abstract Object get(String, Object) throws java.io.IOException;
-    method public abstract java.io.ObjectStreamClass getObjectStreamClass();
-  }
-
-  public interface ObjectInputValidation {
-    method public void validateObject() throws java.io.InvalidObjectException;
-  }
-
-  public interface ObjectOutput extends java.io.DataOutput java.lang.AutoCloseable {
-    method public void close() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public void writeObject(Object) throws java.io.IOException;
-  }
-
-  public class ObjectOutputStream extends java.io.OutputStream implements java.io.ObjectOutput java.io.ObjectStreamConstants {
-    ctor public ObjectOutputStream(java.io.OutputStream) throws java.io.IOException;
-    ctor protected ObjectOutputStream() throws java.io.IOException, java.lang.SecurityException;
-    method protected void annotateClass(Class<?>) throws java.io.IOException;
-    method protected void annotateProxyClass(Class<?>) throws java.io.IOException;
-    method public void defaultWriteObject() throws java.io.IOException;
-    method protected void drain() throws java.io.IOException;
-    method protected boolean enableReplaceObject(boolean) throws java.lang.SecurityException;
-    method public java.io.ObjectOutputStream.PutField putFields() throws java.io.IOException;
-    method protected Object replaceObject(Object) throws java.io.IOException;
-    method public void reset() throws java.io.IOException;
-    method public void useProtocolVersion(int) throws java.io.IOException;
-    method public void write(int) throws java.io.IOException;
-    method public void writeBoolean(boolean) throws java.io.IOException;
-    method public void writeByte(int) throws java.io.IOException;
-    method public void writeBytes(String) throws java.io.IOException;
-    method public void writeChar(int) throws java.io.IOException;
-    method public void writeChars(String) throws java.io.IOException;
-    method protected void writeClassDescriptor(java.io.ObjectStreamClass) throws java.io.IOException;
-    method public void writeDouble(double) throws java.io.IOException;
-    method public void writeFields() throws java.io.IOException;
-    method public void writeFloat(float) throws java.io.IOException;
-    method public void writeInt(int) throws java.io.IOException;
-    method public void writeLong(long) throws java.io.IOException;
-    method public final void writeObject(Object) throws java.io.IOException;
-    method protected void writeObjectOverride(Object) throws java.io.IOException;
-    method public void writeShort(int) throws java.io.IOException;
-    method protected void writeStreamHeader() throws java.io.IOException;
-    method public void writeUTF(String) throws java.io.IOException;
-    method public void writeUnshared(Object) throws java.io.IOException;
-  }
-
-  public abstract static class ObjectOutputStream.PutField {
-    ctor public ObjectOutputStream.PutField();
-    method public abstract void put(String, boolean);
-    method public abstract void put(String, byte);
-    method public abstract void put(String, char);
-    method public abstract void put(String, short);
-    method public abstract void put(String, int);
-    method public abstract void put(String, long);
-    method public abstract void put(String, float);
-    method public abstract void put(String, double);
-    method public abstract void put(String, Object);
-    method @Deprecated public abstract void write(java.io.ObjectOutput) throws java.io.IOException;
-  }
-
-  public class ObjectStreamClass implements java.io.Serializable {
-    method public Class<?> forClass();
-    method public java.io.ObjectStreamField getField(String);
-    method public java.io.ObjectStreamField[] getFields();
-    method public String getName();
-    method public long getSerialVersionUID();
-    method public static java.io.ObjectStreamClass lookup(Class<?>);
-    method public static java.io.ObjectStreamClass lookupAny(Class<?>);
-    field public static final java.io.ObjectStreamField[] NO_FIELDS;
-  }
-
-  public interface ObjectStreamConstants {
-    field public static final int PROTOCOL_VERSION_1 = 1; // 0x1
-    field public static final int PROTOCOL_VERSION_2 = 2; // 0x2
-    field public static final byte SC_BLOCK_DATA = 8; // 0x8
-    field public static final byte SC_ENUM = 16; // 0x10
-    field public static final byte SC_EXTERNALIZABLE = 4; // 0x4
-    field public static final byte SC_SERIALIZABLE = 2; // 0x2
-    field public static final byte SC_WRITE_METHOD = 1; // 0x1
-    field public static final short STREAM_MAGIC = -21267; // 0xffffaced
-    field public static final short STREAM_VERSION = 5; // 0x5
-    field public static final java.io.SerializablePermission SUBCLASS_IMPLEMENTATION_PERMISSION;
-    field public static final java.io.SerializablePermission SUBSTITUTION_PERMISSION;
-    field public static final byte TC_ARRAY = 117; // 0x75
-    field public static final byte TC_BASE = 112; // 0x70
-    field public static final byte TC_BLOCKDATA = 119; // 0x77
-    field public static final byte TC_BLOCKDATALONG = 122; // 0x7a
-    field public static final byte TC_CLASS = 118; // 0x76
-    field public static final byte TC_CLASSDESC = 114; // 0x72
-    field public static final byte TC_ENDBLOCKDATA = 120; // 0x78
-    field public static final byte TC_ENUM = 126; // 0x7e
-    field public static final byte TC_EXCEPTION = 123; // 0x7b
-    field public static final byte TC_LONGSTRING = 124; // 0x7c
-    field public static final byte TC_MAX = 126; // 0x7e
-    field public static final byte TC_NULL = 112; // 0x70
-    field public static final byte TC_OBJECT = 115; // 0x73
-    field public static final byte TC_PROXYCLASSDESC = 125; // 0x7d
-    field public static final byte TC_REFERENCE = 113; // 0x71
-    field public static final byte TC_RESET = 121; // 0x79
-    field public static final byte TC_STRING = 116; // 0x74
-    field public static final int baseWireHandle = 8257536; // 0x7e0000
-  }
-
-  public abstract class ObjectStreamException extends java.io.IOException {
-    ctor protected ObjectStreamException(String);
-    ctor protected ObjectStreamException();
-  }
-
-  public class ObjectStreamField implements java.lang.Comparable<java.lang.Object> {
-    ctor public ObjectStreamField(String, Class<?>);
-    ctor public ObjectStreamField(String, Class<?>, boolean);
-    method public int compareTo(Object);
-    method public String getName();
-    method public int getOffset();
-    method public Class<?> getType();
-    method public char getTypeCode();
-    method public String getTypeString();
-    method public boolean isPrimitive();
-    method public boolean isUnshared();
-    method protected void setOffset(int);
-  }
-
-  public class OptionalDataException extends java.io.ObjectStreamException {
-    field public boolean eof;
-    field public int length;
-  }
-
-  public abstract class OutputStream implements java.io.Closeable java.io.Flushable {
-    ctor public OutputStream();
-    method public void close() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public abstract void write(int) throws java.io.IOException;
-    method public void write(byte[]) throws java.io.IOException;
-    method public void write(byte[], int, int) throws java.io.IOException;
-  }
-
-  public class OutputStreamWriter extends java.io.Writer {
-    ctor public OutputStreamWriter(java.io.OutputStream, String) throws java.io.UnsupportedEncodingException;
-    ctor public OutputStreamWriter(java.io.OutputStream);
-    ctor public OutputStreamWriter(java.io.OutputStream, java.nio.charset.Charset);
-    ctor public OutputStreamWriter(java.io.OutputStream, java.nio.charset.CharsetEncoder);
-    method public void close() throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public String getEncoding();
-    method public void write(char[], int, int) throws java.io.IOException;
-  }
-
-  public class PipedInputStream extends java.io.InputStream {
-    ctor public PipedInputStream(java.io.PipedOutputStream) throws java.io.IOException;
-    ctor public PipedInputStream(java.io.PipedOutputStream, int) throws java.io.IOException;
-    ctor public PipedInputStream();
-    ctor public PipedInputStream(int);
-    method public void connect(java.io.PipedOutputStream) throws java.io.IOException;
-    method public int read() throws java.io.IOException;
-    method protected void receive(int) throws java.io.IOException;
-    field protected static final int PIPE_SIZE = 1024; // 0x400
-    field protected byte[] buffer;
-    field protected int in;
-    field protected int out;
-  }
-
-  public class PipedOutputStream extends java.io.OutputStream {
-    ctor public PipedOutputStream(java.io.PipedInputStream) throws java.io.IOException;
-    ctor public PipedOutputStream();
-    method public void connect(java.io.PipedInputStream) throws java.io.IOException;
-    method public void write(int) throws java.io.IOException;
-  }
-
-  public class PipedReader extends java.io.Reader {
-    ctor public PipedReader(java.io.PipedWriter) throws java.io.IOException;
-    ctor public PipedReader(java.io.PipedWriter, int) throws java.io.IOException;
-    ctor public PipedReader();
-    ctor public PipedReader(int);
-    method public void close() throws java.io.IOException;
-    method public void connect(java.io.PipedWriter) throws java.io.IOException;
-    method public int read(char[], int, int) throws java.io.IOException;
-  }
-
-  public class PipedWriter extends java.io.Writer {
-    ctor public PipedWriter(java.io.PipedReader) throws java.io.IOException;
-    ctor public PipedWriter();
-    method public void close() throws java.io.IOException;
-    method public void connect(java.io.PipedReader) throws java.io.IOException;
-    method public void flush() throws java.io.IOException;
-    method public void write(char[], int, int) throws java.io.IOException;
-  }
-
-  public class PrintStream extends java.io.FilterOutputStream implements java.lang.Appendable java.io.Closeable {
-    ctor public PrintStream(java.io.OutputStream);
-    ctor public PrintStream(java.io.OutputStream, boolean);
-    ctor public PrintStream(java.io.OutputStream, boolean, String) throws java.io.UnsupportedEncodingException;
-    ctor public PrintStream(String) throws java.io.FileNotFoundException;
-    ctor public PrintStream(String, String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public PrintStream(java.io.File) throws java.io.FileNotFoundException;
-    ctor public PrintStream(java.io.File, String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    method public java.io.PrintStream append(CharSequence);
-    method public java.io.PrintStream append(CharSequence, int, int);
-    method public java.io.PrintStream append(char);
-    method public boolean checkError();
-    method protected void clearError();
-    method public void close();
-    method public void flush();
-    method public java.io.PrintStream format(String, java.lang.Object...);
-    method public java.io.PrintStream format(java.util.Locale, String, java.lang.Object...);
-    method public void print(boolean);
-    method public void print(char);
-    method public void print(int);
-    method public void print(long);
-    method public void print(float);
-    method public void print(double);
-    method public void print(char[]);
-    method public void print(String);
-    method public void print(Object);
-    method public java.io.PrintStream printf(String, java.lang.Object...);
-    method public java.io.PrintStream printf(java.util.Locale, String, java.lang.Object...);
-    method public void println();
-    method public void println(boolean);
-    method public void println(char);
-    method public void println(int);
-    method public void println(long);
-    method public void println(float);
-    method public void println(double);
-    method public void println(char[]);
-    method public void println(String);
-    method public void println(Object);
-    method protected void setError();
-    method public void write(int);
-    method public void write(byte[], int, int);
-  }
-
-  public class PrintWriter extends java.io.Writer {
-    ctor public PrintWriter(@NonNull java.io.Writer);
-    ctor public PrintWriter(@NonNull java.io.Writer, boolean);
-    ctor public PrintWriter(@NonNull java.io.OutputStream);
-    ctor public PrintWriter(@NonNull java.io.OutputStream, boolean);
-    ctor public PrintWriter(@NonNull String) throws java.io.FileNotFoundException;
-    ctor public PrintWriter(@NonNull String, @NonNull String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public PrintWriter(@NonNull java.io.File) throws java.io.FileNotFoundException;
-    ctor public PrintWriter(@NonNull java.io.File, @NonNull String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    method @NonNull public java.io.PrintWriter append(@Nullable CharSequence);
-    method @NonNull public java.io.PrintWriter append(@Nullable CharSequence, int, int);
-    method @NonNull public java.io.PrintWriter append(char);
-    method public boolean checkError();
-    method protected void clearError();
-    method public void close();
-    method public void flush();
-    method @NonNull public java.io.PrintWriter format(@NonNull String, @NonNull java.lang.Object...);
-    method @NonNull public java.io.PrintWriter format(@Nullable java.util.Locale, @NonNull String, @NonNull java.lang.Object...);
-    method public void print(boolean);
-    method public void print(char);
-    method public void print(int);
-    method public void print(long);
-    method public void print(float);
-    method public void print(double);
-    method public void print(char[]);
-    method public void print(@Nullable String);
-    method public void print(@Nullable Object);
-    method @NonNull public java.io.PrintWriter printf(@NonNull String, @NonNull java.lang.Object...);
-    method @NonNull public java.io.PrintWriter printf(@Nullable java.util.Locale, @NonNull String, @NonNull java.lang.Object...);
-    method public void println();
-    method public void println(boolean);
-    method public void println(char);
-    method public void println(int);
-    method public void println(long);
-    method public void println(float);
-    method public void println(double);
-    method public void println(char[]);
-    method public void println(@Nullable String);
-    method public void println(@Nullable Object);
-    method protected void setError();
-    method public void write(int);
-    method public void write(char[], int, int);
-    method public void write(char[]);
-    method public void write(@NonNull String, int, int);
-    method public void write(@NonNull String);
-    field protected java.io.Writer out;
-  }
-
-  public class PushbackInputStream extends java.io.FilterInputStream {
-    ctor public PushbackInputStream(java.io.InputStream, int);
-    ctor public PushbackInputStream(java.io.InputStream);
-    method public void unread(int) throws java.io.IOException;
-    method public void unread(byte[], int, int) throws java.io.IOException;
-    method public void unread(byte[]) throws java.io.IOException;
-    field protected byte[] buf;
-    field protected int pos;
-  }
-
-  public class PushbackReader extends java.io.FilterReader {
-    ctor public PushbackReader(java.io.Reader, int);
-    ctor public PushbackReader(java.io.Reader);
-    method public void unread(int) throws java.io.IOException;
-    method public void unread(char[], int, int) throws java.io.IOException;
-    method public void unread(char[]) throws java.io.IOException;
-  }
-
-  public class RandomAccessFile implements java.io.Closeable java.io.DataInput java.io.DataOutput {
-    ctor public RandomAccessFile(String, String) throws java.io.FileNotFoundException;
-    ctor public RandomAccessFile(java.io.File, String) throws java.io.FileNotFoundException;
-    method public void close() throws java.io.IOException;
-    method public final java.nio.channels.FileChannel getChannel();
-    method public final java.io.FileDescriptor getFD() throws java.io.IOException;
-    method public long getFilePointer() throws java.io.IOException;
-    method public long length() throws java.io.IOException;
-    method public int read() throws java.io.IOException;
-    method public int read(byte[], int, int) throws java.io.IOException;
-    method public int read(byte[]) throws java.io.IOException;
-    method public final boolean readBoolean() throws java.io.IOException;
-    method public final byte readByte() throws java.io.IOException;
-    method public final char readChar() throws java.io.IOException;
-    method public final double readDouble() throws java.io.IOException;
-    method public final float readFloat() throws java.io.IOException;
-    method public final void readFully(byte[]) throws java.io.IOException;
-    method public final void readFully(byte[], int, int) throws java.io.IOException;
-    method public final int readInt() throws java.io.IOException;
-    method public final String readLine() throws java.io.IOException;
-    method public final long readLong() throws java.io.IOException;
-    method public final short readShort() throws java.io.IOException;
-    method public final String readUTF() throws java.io.IOException;
-    method public final int readUnsignedByte() throws java.io.IOException;
-    method public final int readUnsignedShort() throws java.io.IOException;
-    method public void seek(long) throws java.io.IOException;
-    method public void setLength(long) throws java.io.IOException;
-    method public int skipBytes(int) throws java.io.IOException;
-    method public void write(int) throws java.io.IOException;
-    method public void write(byte[]) throws java.io.IOException;
-    method public void write(byte[], int, int) throws java.io.IOException;
-    method public final void writeBoolean(boolean) throws java.io.IOException;
-    method public final void writeByte(int) throws java.io.IOException;
-    method public final void writeBytes(String) throws java.io.IOException;
-    method public final void writeChar(int) throws java.io.IOException;
-    method public final void writeChars(String) throws java.io.IOException;
-    method public final void writeDouble(double) throws java.io.IOException;
-    method public final void writeFloat(float) throws java.io.IOException;
-    method public final void writeInt(int) throws java.io.IOException;
-    method public final void writeLong(long) throws java.io.IOException;
-    method public final void writeShort(int) throws java.io.IOException;
-    method public final void writeUTF(String) throws java.io.IOException;
-  }
-
-  public abstract class Reader implements java.io.Closeable java.lang.Readable {
-    ctor protected Reader();
-    ctor protected Reader(Object);
-    method public void mark(int) throws java.io.IOException;
-    method public boolean markSupported();
-    method public int read(java.nio.CharBuffer) throws java.io.IOException;
-    method public int read() throws java.io.IOException;
-    method public int read(char[]) throws java.io.IOException;
-    method public abstract int read(char[], int, int) throws java.io.IOException;
-    method public boolean ready() throws java.io.IOException;
-    method public void reset() throws java.io.IOException;
-    method public long skip(long) throws java.io.IOException;
-    field protected Object lock;
-  }
-
-  public class SequenceInputStream extends java.io.InputStream {
-    ctor public SequenceInputStream(java.util.Enumeration<? extends java.io.InputStream>);
-    ctor public SequenceInputStream(java.io.InputStream, java.io.InputStream);
-    method public int read() throws java.io.IOException;
-  }
-
-  public interface Serializable {
-  }
-
-  public final class SerializablePermission extends java.security.BasicPermission {
-    ctor public SerializablePermission(String);
-    ctor public SerializablePermission(String, String);
-  }
-
-  public class StreamCorruptedException extends java.io.ObjectStreamException {
-    ctor public StreamCorruptedException(String);
-    ctor public StreamCorruptedException();
-  }
-
-  public class StreamTokenizer {
-    ctor @Deprecated public StreamTokenizer(java.io.InputStream);
-    ctor public StreamTokenizer(java.io.Reader);
-    method public void commentChar(int);
-    method public void eolIsSignificant(boolean);
-    method public int lineno();
-    method public void lowerCaseMode(boolean);
-    method public int nextToken() throws java.io.IOException;
-    method public void ordinaryChar(int);
-    method public void ordinaryChars(int, int);
-    method public void parseNumbers();
-    method public void pushBack();
-    method public void quoteChar(int);
-    method public void resetSyntax();
-    method public void slashSlashComments(boolean);
-    method public void slashStarComments(boolean);
-    method public void whitespaceChars(int, int);
-    method public void wordChars(int, int);
-    field public static final int TT_EOF = -1; // 0xffffffff
-    field public static final int TT_EOL = 10; // 0xa
-    field public static final int TT_NUMBER = -2; // 0xfffffffe
-    field public static final int TT_WORD = -3; // 0xfffffffd
-    field public double nval;
-    field public String sval;
-    field public int ttype;
-  }
-
-  @Deprecated public class StringBufferInputStream extends java.io.InputStream {
-    ctor @Deprecated public StringBufferInputStream(String);
-    method @Deprecated public int available();
-    method @Deprecated public int read();
-    method @Deprecated public int read(byte[], int, int);
-    method @Deprecated public void reset();
-    method @Deprecated public long skip(long);
-    field @Deprecated protected String buffer;
-    field @Deprecated protected int count;
-    field @Deprecated protected int pos;
-  }
-
-  public class StringReader extends java.io.Reader {
-    ctor public StringReader(String);
-    method public void close();
-    method public int read(char[], int, int) throws java.io.IOException;
-  }
-
-  public class StringWriter extends java.io.Writer {
-    ctor public StringWriter();
-    ctor public StringWriter(int);
-    method public java.io.StringWriter append(CharSequence);
-    method public java.io.StringWriter append(CharSequence, int, int);
-    method public java.io.StringWriter append(char);
-    method public void close() throws java.io.IOException;
-    method public void flush();
-    method public StringBuffer getBuffer();
-    method public void write(int);
-    method public void write(char[], int, int);
-    method public void write(String);
-    method public void write(String, int, int);
-  }
-
-  public class SyncFailedException extends java.io.IOException {
-    ctor public SyncFailedException(String);
-  }
-
-  public class UTFDataFormatException extends java.io.IOException {
-    ctor public UTFDataFormatException();
-    ctor public UTFDataFormatException(String);
-  }
-
-  public class UncheckedIOException extends java.lang.RuntimeException {
-    ctor public UncheckedIOException(String, java.io.IOException);
-    ctor public UncheckedIOException(java.io.IOException);
-    method public java.io.IOException getCause();
-  }
-
-  public class UnsupportedEncodingException extends java.io.IOException {
-    ctor public UnsupportedEncodingException();
-    ctor public UnsupportedEncodingException(String);
-  }
-
-  public class WriteAbortedException extends java.io.ObjectStreamException {
-    ctor public WriteAbortedException(String, Exception);
-    field public Exception detail;
-  }
-
-  public abstract class Writer implements java.lang.Appendable java.io.Closeable java.io.Flushable {
-    ctor protected Writer();
-    ctor protected Writer(Object);
-    method public java.io.Writer append(CharSequence) throws java.io.IOException;
-    method public java.io.Writer append(CharSequence, int, int) throws java.io.IOException;
-    method public java.io.Writer append(char) throws java.io.IOException;
-    method public void write(int) throws java.io.IOException;
-    method public void write(char[]) throws java.io.IOException;
-    method public abstract void write(char[], int, int) throws java.io.IOException;
-    method public void write(String) throws java.io.IOException;
-    method public void write(String, int, int) throws java.io.IOException;
-    field protected Object lock;
-  }
-
-}
-
-package java.lang {
-
-  public class AbstractMethodError extends java.lang.IncompatibleClassChangeError {
-    ctor public AbstractMethodError();
-    ctor public AbstractMethodError(String);
-  }
-
-  public interface Appendable {
-    method @NonNull public Appendable append(@Nullable CharSequence) throws java.io.IOException;
-    method @NonNull public Appendable append(@Nullable CharSequence, int, int) throws java.io.IOException;
-    method @NonNull public Appendable append(char) throws java.io.IOException;
-  }
-
-  public class ArithmeticException extends java.lang.RuntimeException {
-    ctor public ArithmeticException();
-    ctor public ArithmeticException(String);
-  }
-
-  public class ArrayIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
-    ctor public ArrayIndexOutOfBoundsException();
-    ctor public ArrayIndexOutOfBoundsException(int);
-    ctor public ArrayIndexOutOfBoundsException(String);
-  }
-
-  public class ArrayStoreException extends java.lang.RuntimeException {
-    ctor public ArrayStoreException();
-    ctor public ArrayStoreException(String);
-  }
-
-  public class AssertionError extends java.lang.Error {
-    ctor public AssertionError();
-    ctor public AssertionError(Object);
-    ctor public AssertionError(boolean);
-    ctor public AssertionError(char);
-    ctor public AssertionError(int);
-    ctor public AssertionError(long);
-    ctor public AssertionError(float);
-    ctor public AssertionError(double);
-    ctor public AssertionError(String, Throwable);
-  }
-
-  public interface AutoCloseable {
-    method public void close() throws java.lang.Exception;
-  }
-
-  public final class Boolean implements java.lang.Comparable<java.lang.Boolean> java.io.Serializable {
-    ctor public Boolean(boolean);
-    ctor public Boolean(@Nullable String);
-    method public boolean booleanValue();
-    method public static int compare(boolean, boolean);
-    method public int compareTo(@NonNull Boolean);
-    method public static boolean getBoolean(@NonNull String);
-    method public static int hashCode(boolean);
-    method public static boolean logicalAnd(boolean, boolean);
-    method public static boolean logicalOr(boolean, boolean);
-    method public static boolean logicalXor(boolean, boolean);
-    method public static boolean parseBoolean(@Nullable String);
-    method @NonNull public static String toString(boolean);
-    method @NonNull public static Boolean valueOf(boolean);
-    method @NonNull public static Boolean valueOf(@Nullable String);
-    field public static final Boolean FALSE;
-    field public static final Boolean TRUE;
-    field public static final Class<java.lang.Boolean> TYPE;
-  }
-
-  public class BootstrapMethodError extends java.lang.LinkageError {
-    ctor public BootstrapMethodError();
-    ctor public BootstrapMethodError(String);
-    ctor public BootstrapMethodError(String, Throwable);
-    ctor public BootstrapMethodError(Throwable);
-  }
-
-  public final class Byte extends java.lang.Number implements java.lang.Comparable<java.lang.Byte> {
-    ctor public Byte(byte);
-    ctor public Byte(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int compare(byte, byte);
-    method public int compareTo(@NonNull Byte);
-    method @NonNull public static Byte decode(@NonNull String) throws java.lang.NumberFormatException;
-    method public double doubleValue();
-    method public float floatValue();
-    method public static int hashCode(byte);
-    method public int intValue();
-    method public long longValue();
-    method public static byte parseByte(@NonNull String, int) throws java.lang.NumberFormatException;
-    method public static byte parseByte(@NonNull String) throws java.lang.NumberFormatException;
-    method @NonNull public static String toString(byte);
-    method public static int toUnsignedInt(byte);
-    method public static long toUnsignedLong(byte);
-    method @NonNull public static Byte valueOf(byte);
-    method @NonNull public static Byte valueOf(@NonNull String, int) throws java.lang.NumberFormatException;
-    method @NonNull public static Byte valueOf(@NonNull String) throws java.lang.NumberFormatException;
-    field public static final int BYTES = 1; // 0x1
-    field public static final byte MAX_VALUE = 127; // 0x7f
-    field public static final byte MIN_VALUE = -128; // 0xffffff80
-    field public static final int SIZE = 8; // 0x8
-    field public static final Class<java.lang.Byte> TYPE;
-  }
-
-  public interface CharSequence {
-    method public char charAt(int);
-    method @NonNull public default java.util.stream.IntStream chars();
-    method @NonNull public default java.util.stream.IntStream codePoints();
-    method public int length();
-    method @NonNull public CharSequence subSequence(int, int);
-    method @NonNull public String toString();
-  }
-
-  public final class Character implements java.lang.Comparable<java.lang.Character> java.io.Serializable {
-    ctor public Character(char);
-    method public static int charCount(int);
-    method public char charValue();
-    method public static int codePointAt(@NonNull CharSequence, int);
-    method public static int codePointAt(char[], int);
-    method public static int codePointAt(char[], int, int);
-    method public static int codePointBefore(@NonNull CharSequence, int);
-    method public static int codePointBefore(char[], int);
-    method public static int codePointBefore(char[], int, int);
-    method public static int codePointCount(@NonNull CharSequence, int, int);
-    method public static int codePointCount(char[], int, int);
-    method public static int compare(char, char);
-    method public int compareTo(@NonNull Character);
-    method public static int digit(char, int);
-    method public static int digit(int, int);
-    method public static char forDigit(int, int);
-    method public static byte getDirectionality(char);
-    method public static byte getDirectionality(int);
-    method @Nullable public static String getName(int);
-    method public static int getNumericValue(char);
-    method public static int getNumericValue(int);
-    method public static int getType(char);
-    method public static int getType(int);
-    method public static int hashCode(char);
-    method public static char highSurrogate(int);
-    method public static boolean isAlphabetic(int);
-    method public static boolean isBmpCodePoint(int);
-    method public static boolean isDefined(char);
-    method public static boolean isDefined(int);
-    method public static boolean isDigit(char);
-    method public static boolean isDigit(int);
-    method public static boolean isHighSurrogate(char);
-    method public static boolean isISOControl(char);
-    method public static boolean isISOControl(int);
-    method public static boolean isIdentifierIgnorable(char);
-    method public static boolean isIdentifierIgnorable(int);
-    method public static boolean isIdeographic(int);
-    method public static boolean isJavaIdentifierPart(char);
-    method public static boolean isJavaIdentifierPart(int);
-    method public static boolean isJavaIdentifierStart(char);
-    method public static boolean isJavaIdentifierStart(int);
-    method @Deprecated public static boolean isJavaLetter(char);
-    method @Deprecated public static boolean isJavaLetterOrDigit(char);
-    method public static boolean isLetter(char);
-    method public static boolean isLetter(int);
-    method public static boolean isLetterOrDigit(char);
-    method public static boolean isLetterOrDigit(int);
-    method public static boolean isLowSurrogate(char);
-    method public static boolean isLowerCase(char);
-    method public static boolean isLowerCase(int);
-    method public static boolean isMirrored(char);
-    method public static boolean isMirrored(int);
-    method @Deprecated public static boolean isSpace(char);
-    method public static boolean isSpaceChar(char);
-    method public static boolean isSpaceChar(int);
-    method public static boolean isSupplementaryCodePoint(int);
-    method public static boolean isSurrogate(char);
-    method public static boolean isSurrogatePair(char, char);
-    method public static boolean isTitleCase(char);
-    method public static boolean isTitleCase(int);
-    method public static boolean isUnicodeIdentifierPart(char);
-    method public static boolean isUnicodeIdentifierPart(int);
-    method public static boolean isUnicodeIdentifierStart(char);
-    method public static boolean isUnicodeIdentifierStart(int);
-    method public static boolean isUpperCase(char);
-    method public static boolean isUpperCase(int);
-    method public static boolean isValidCodePoint(int);
-    method public static boolean isWhitespace(char);
-    method public static boolean isWhitespace(int);
-    method public static char lowSurrogate(int);
-    method public static int offsetByCodePoints(@NonNull CharSequence, int, int);
-    method public static int offsetByCodePoints(char[], int, int, int, int);
-    method public static char reverseBytes(char);
-    method public static int toChars(int, char[], int);
-    method public static char[] toChars(int);
-    method public static int toCodePoint(char, char);
-    method public static char toLowerCase(char);
-    method public static int toLowerCase(int);
-    method @NonNull public static String toString(char);
-    method public static char toTitleCase(char);
-    method public static int toTitleCase(int);
-    method public static char toUpperCase(char);
-    method public static int toUpperCase(int);
-    method @NonNull public static Character valueOf(char);
-    field public static final int BYTES = 2; // 0x2
-    field public static final byte COMBINING_SPACING_MARK = 8; // 0x8
-    field public static final byte CONNECTOR_PUNCTUATION = 23; // 0x17
-    field public static final byte CONTROL = 15; // 0xf
-    field public static final byte CURRENCY_SYMBOL = 26; // 0x1a
-    field public static final byte DASH_PUNCTUATION = 20; // 0x14
-    field public static final byte DECIMAL_DIGIT_NUMBER = 9; // 0x9
-    field public static final byte DIRECTIONALITY_ARABIC_NUMBER = 6; // 0x6
-    field public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9; // 0x9
-    field public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7; // 0x7
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 3; // 0x3
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4; // 0x4
-    field public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5; // 0x5
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0; // 0x0
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14; // 0xe
-    field public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15; // 0xf
-    field public static final byte DIRECTIONALITY_NONSPACING_MARK = 8; // 0x8
-    field public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 13; // 0xd
-    field public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10; // 0xa
-    field public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18; // 0x12
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1; // 0x1
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2; // 0x2
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16; // 0x10
-    field public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17; // 0x11
-    field public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 11; // 0xb
-    field public static final byte DIRECTIONALITY_UNDEFINED = -1; // 0xffffffff
-    field public static final byte DIRECTIONALITY_WHITESPACE = 12; // 0xc
-    field public static final byte ENCLOSING_MARK = 7; // 0x7
-    field public static final byte END_PUNCTUATION = 22; // 0x16
-    field public static final byte FINAL_QUOTE_PUNCTUATION = 30; // 0x1e
-    field public static final byte FORMAT = 16; // 0x10
-    field public static final byte INITIAL_QUOTE_PUNCTUATION = 29; // 0x1d
-    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 = 25; // 0x19
-    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 char MAX_VALUE = 65535; // 0xffff '\uffff'
-    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 char MIN_VALUE = 0; // 0x0000 '\u0000'
-    field public static final byte MODIFIER_LETTER = 4; // 0x4
-    field public static final byte MODIFIER_SYMBOL = 27; // 0x1b
-    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 = 24; // 0x18
-    field public static final byte OTHER_SYMBOL = 28; // 0x1c
-    field public static final byte PARAGRAPH_SEPARATOR = 14; // 0xe
-    field public static final byte PRIVATE_USE = 18; // 0x12
-    field public static final int SIZE = 16; // 0x10
-    field public static final byte SPACE_SEPARATOR = 12; // 0xc
-    field public static final byte START_PUNCTUATION = 21; // 0x15
-    field public static final byte SURROGATE = 19; // 0x13
-    field public static final byte TITLECASE_LETTER = 3; // 0x3
-    field public static final Class<java.lang.Character> TYPE;
-    field public static final byte UNASSIGNED = 0; // 0x0
-    field public static final byte UPPERCASE_LETTER = 1; // 0x1
-  }
-
-  public static class Character.Subset {
-    ctor protected Character.Subset(@NonNull String);
-    method public final boolean equals(@Nullable Object);
-    method public final int hashCode();
-    method @NonNull public final String toString();
-  }
-
-  public static final class Character.UnicodeBlock extends java.lang.Character.Subset {
-    method @NonNull public static java.lang.Character.UnicodeBlock forName(@NonNull String);
-    method @Nullable public static java.lang.Character.UnicodeBlock of(char);
-    method @Nullable public static java.lang.Character.UnicodeBlock of(int);
-    field public static final java.lang.Character.UnicodeBlock AEGEAN_NUMBERS;
-    field public static final java.lang.Character.UnicodeBlock ALCHEMICAL_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS;
-    field public static final java.lang.Character.UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION;
-    field public static final java.lang.Character.UnicodeBlock ANCIENT_GREEK_NUMBERS;
-    field public static final java.lang.Character.UnicodeBlock ANCIENT_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock ARABIC;
-    field public static final java.lang.Character.UnicodeBlock ARABIC_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_A;
-    field public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_B;
-    field public static final java.lang.Character.UnicodeBlock ARABIC_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock ARMENIAN;
-    field public static final java.lang.Character.UnicodeBlock ARROWS;
-    field public static final java.lang.Character.UnicodeBlock AVESTAN;
-    field public static final java.lang.Character.UnicodeBlock BALINESE;
-    field public static final java.lang.Character.UnicodeBlock BAMUM;
-    field public static final java.lang.Character.UnicodeBlock BAMUM_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock BASIC_LATIN;
-    field public static final java.lang.Character.UnicodeBlock BATAK;
-    field public static final java.lang.Character.UnicodeBlock BENGALI;
-    field public static final java.lang.Character.UnicodeBlock BLOCK_ELEMENTS;
-    field public static final java.lang.Character.UnicodeBlock BOPOMOFO;
-    field public static final java.lang.Character.UnicodeBlock BOPOMOFO_EXTENDED;
-    field public static final java.lang.Character.UnicodeBlock BOX_DRAWING;
-    field public static final java.lang.Character.UnicodeBlock BRAHMI;
-    field public static final java.lang.Character.UnicodeBlock BRAILLE_PATTERNS;
-    field public static final java.lang.Character.UnicodeBlock BUGINESE;
-    field public static final java.lang.Character.UnicodeBlock BUHID;
-    field public static final java.lang.Character.UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock CARIAN;
-    field public static final java.lang.Character.UnicodeBlock CHAKMA;
-    field public static final java.lang.Character.UnicodeBlock CHAM;
-    field public static final java.lang.Character.UnicodeBlock CHEROKEE;
-    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY;
-    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_FORMS;
-    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS;
-    field public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock CJK_RADICALS_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock CJK_STROKES;
-    field public static final java.lang.Character.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION;
-    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS;
-    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A;
-    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B;
-    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C;
-    field public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D;
-    field public static final java.lang.Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS;
-    field public static final java.lang.Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock COMBINING_HALF_MARKS;
-    field public static final java.lang.Character.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock COMMON_INDIC_NUMBER_FORMS;
-    field public static final java.lang.Character.UnicodeBlock CONTROL_PICTURES;
-    field public static final java.lang.Character.UnicodeBlock COPTIC;
-    field public static final java.lang.Character.UnicodeBlock COUNTING_ROD_NUMERALS;
-    field public static final java.lang.Character.UnicodeBlock CUNEIFORM;
-    field public static final java.lang.Character.UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION;
-    field public static final java.lang.Character.UnicodeBlock CURRENCY_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock CYPRIOT_SYLLABARY;
-    field public static final java.lang.Character.UnicodeBlock CYRILLIC;
-    field public static final java.lang.Character.UnicodeBlock CYRILLIC_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock CYRILLIC_EXTENDED_B;
-    field public static final java.lang.Character.UnicodeBlock CYRILLIC_SUPPLEMENTARY;
-    field public static final java.lang.Character.UnicodeBlock DESERET;
-    field public static final java.lang.Character.UnicodeBlock DEVANAGARI;
-    field public static final java.lang.Character.UnicodeBlock DEVANAGARI_EXTENDED;
-    field public static final java.lang.Character.UnicodeBlock DINGBATS;
-    field public static final java.lang.Character.UnicodeBlock DOMINO_TILES;
-    field public static final java.lang.Character.UnicodeBlock EGYPTIAN_HIEROGLYPHS;
-    field public static final java.lang.Character.UnicodeBlock EMOTICONS;
-    field public static final java.lang.Character.UnicodeBlock ENCLOSED_ALPHANUMERICS;
-    field public static final java.lang.Character.UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS;
-    field public static final java.lang.Character.UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock ETHIOPIC;
-    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_EXTENDED;
-    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock ETHIOPIC_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock GENERAL_PUNCTUATION;
-    field public static final java.lang.Character.UnicodeBlock GEOMETRIC_SHAPES;
-    field public static final java.lang.Character.UnicodeBlock GEORGIAN;
-    field public static final java.lang.Character.UnicodeBlock GEORGIAN_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock GLAGOLITIC;
-    field public static final java.lang.Character.UnicodeBlock GOTHIC;
-    field public static final java.lang.Character.UnicodeBlock GREEK;
-    field public static final java.lang.Character.UnicodeBlock GREEK_EXTENDED;
-    field public static final java.lang.Character.UnicodeBlock GUJARATI;
-    field public static final java.lang.Character.UnicodeBlock GURMUKHI;
-    field public static final java.lang.Character.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS;
-    field public static final java.lang.Character.UnicodeBlock HANGUL_COMPATIBILITY_JAMO;
-    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO;
-    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock HANGUL_JAMO_EXTENDED_B;
-    field public static final java.lang.Character.UnicodeBlock HANGUL_SYLLABLES;
-    field public static final java.lang.Character.UnicodeBlock HANUNOO;
-    field public static final java.lang.Character.UnicodeBlock HEBREW;
-    field public static final java.lang.Character.UnicodeBlock HIGH_PRIVATE_USE_SURROGATES;
-    field public static final java.lang.Character.UnicodeBlock HIGH_SURROGATES;
-    field public static final java.lang.Character.UnicodeBlock HIRAGANA;
-    field public static final java.lang.Character.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS;
-    field public static final java.lang.Character.UnicodeBlock IMPERIAL_ARAMAIC;
-    field public static final java.lang.Character.UnicodeBlock INSCRIPTIONAL_PAHLAVI;
-    field public static final java.lang.Character.UnicodeBlock INSCRIPTIONAL_PARTHIAN;
-    field public static final java.lang.Character.UnicodeBlock IPA_EXTENSIONS;
-    field public static final java.lang.Character.UnicodeBlock JAVANESE;
-    field public static final java.lang.Character.UnicodeBlock KAITHI;
-    field public static final java.lang.Character.UnicodeBlock KANA_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock KANBUN;
-    field public static final java.lang.Character.UnicodeBlock KANGXI_RADICALS;
-    field public static final java.lang.Character.UnicodeBlock KANNADA;
-    field public static final java.lang.Character.UnicodeBlock KATAKANA;
-    field public static final java.lang.Character.UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS;
-    field public static final java.lang.Character.UnicodeBlock KAYAH_LI;
-    field public static final java.lang.Character.UnicodeBlock KHAROSHTHI;
-    field public static final java.lang.Character.UnicodeBlock KHMER;
-    field public static final java.lang.Character.UnicodeBlock KHMER_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock LAO;
-    field public static final java.lang.Character.UnicodeBlock LATIN_1_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_ADDITIONAL;
-    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_B;
-    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_C;
-    field public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_D;
-    field public static final java.lang.Character.UnicodeBlock LEPCHA;
-    field public static final java.lang.Character.UnicodeBlock LETTERLIKE_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock LIMBU;
-    field public static final java.lang.Character.UnicodeBlock LINEAR_B_IDEOGRAMS;
-    field public static final java.lang.Character.UnicodeBlock LINEAR_B_SYLLABARY;
-    field public static final java.lang.Character.UnicodeBlock LISU;
-    field public static final java.lang.Character.UnicodeBlock LOW_SURROGATES;
-    field public static final java.lang.Character.UnicodeBlock LYCIAN;
-    field public static final java.lang.Character.UnicodeBlock LYDIAN;
-    field public static final java.lang.Character.UnicodeBlock MAHJONG_TILES;
-    field public static final java.lang.Character.UnicodeBlock MALAYALAM;
-    field public static final java.lang.Character.UnicodeBlock MANDAIC;
-    field public static final java.lang.Character.UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock MATHEMATICAL_OPERATORS;
-    field public static final java.lang.Character.UnicodeBlock MEETEI_MAYEK;
-    field public static final java.lang.Character.UnicodeBlock MEETEI_MAYEK_EXTENSIONS;
-    field public static final java.lang.Character.UnicodeBlock MEROITIC_CURSIVE;
-    field public static final java.lang.Character.UnicodeBlock MEROITIC_HIEROGLYPHS;
-    field public static final java.lang.Character.UnicodeBlock MIAO;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS;
-    field public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_TECHNICAL;
-    field public static final java.lang.Character.UnicodeBlock MODIFIER_TONE_LETTERS;
-    field public static final java.lang.Character.UnicodeBlock MONGOLIAN;
-    field public static final java.lang.Character.UnicodeBlock MUSICAL_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock MYANMAR;
-    field public static final java.lang.Character.UnicodeBlock MYANMAR_EXTENDED_A;
-    field public static final java.lang.Character.UnicodeBlock NEW_TAI_LUE;
-    field public static final java.lang.Character.UnicodeBlock NKO;
-    field public static final java.lang.Character.UnicodeBlock NUMBER_FORMS;
-    field public static final java.lang.Character.UnicodeBlock OGHAM;
-    field public static final java.lang.Character.UnicodeBlock OLD_ITALIC;
-    field public static final java.lang.Character.UnicodeBlock OLD_PERSIAN;
-    field public static final java.lang.Character.UnicodeBlock OLD_SOUTH_ARABIAN;
-    field public static final java.lang.Character.UnicodeBlock OLD_TURKIC;
-    field public static final java.lang.Character.UnicodeBlock OL_CHIKI;
-    field public static final java.lang.Character.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION;
-    field public static final java.lang.Character.UnicodeBlock ORIYA;
-    field public static final java.lang.Character.UnicodeBlock OSMANYA;
-    field public static final java.lang.Character.UnicodeBlock PHAGS_PA;
-    field public static final java.lang.Character.UnicodeBlock PHAISTOS_DISC;
-    field public static final java.lang.Character.UnicodeBlock PHOENICIAN;
-    field public static final java.lang.Character.UnicodeBlock PHONETIC_EXTENSIONS;
-    field public static final java.lang.Character.UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock PLAYING_CARDS;
-    field public static final java.lang.Character.UnicodeBlock PRIVATE_USE_AREA;
-    field public static final java.lang.Character.UnicodeBlock REJANG;
-    field public static final java.lang.Character.UnicodeBlock RUMI_NUMERAL_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock RUNIC;
-    field public static final java.lang.Character.UnicodeBlock SAMARITAN;
-    field public static final java.lang.Character.UnicodeBlock SAURASHTRA;
-    field public static final java.lang.Character.UnicodeBlock SHARADA;
-    field public static final java.lang.Character.UnicodeBlock SHAVIAN;
-    field public static final java.lang.Character.UnicodeBlock SINHALA;
-    field public static final java.lang.Character.UnicodeBlock SMALL_FORM_VARIANTS;
-    field public static final java.lang.Character.UnicodeBlock SORA_SOMPENG;
-    field public static final java.lang.Character.UnicodeBlock SPACING_MODIFIER_LETTERS;
-    field public static final java.lang.Character.UnicodeBlock SPECIALS;
-    field public static final java.lang.Character.UnicodeBlock SUNDANESE;
-    field public static final java.lang.Character.UnicodeBlock SUNDANESE_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_ARROWS_A;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_ARROWS_B;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTAL_PUNCTUATION;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A;
-    field public static final java.lang.Character.UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B;
-    field @Deprecated public static final java.lang.Character.UnicodeBlock SURROGATES_AREA;
-    field public static final java.lang.Character.UnicodeBlock SYLOTI_NAGRI;
-    field public static final java.lang.Character.UnicodeBlock SYRIAC;
-    field public static final java.lang.Character.UnicodeBlock TAGALOG;
-    field public static final java.lang.Character.UnicodeBlock TAGBANWA;
-    field public static final java.lang.Character.UnicodeBlock TAGS;
-    field public static final java.lang.Character.UnicodeBlock TAI_LE;
-    field public static final java.lang.Character.UnicodeBlock TAI_THAM;
-    field public static final java.lang.Character.UnicodeBlock TAI_VIET;
-    field public static final java.lang.Character.UnicodeBlock TAI_XUAN_JING_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock TAKRI;
-    field public static final java.lang.Character.UnicodeBlock TAMIL;
-    field public static final java.lang.Character.UnicodeBlock TELUGU;
-    field public static final java.lang.Character.UnicodeBlock THAANA;
-    field public static final java.lang.Character.UnicodeBlock THAI;
-    field public static final java.lang.Character.UnicodeBlock TIBETAN;
-    field public static final java.lang.Character.UnicodeBlock TIFINAGH;
-    field public static final java.lang.Character.UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock UGARITIC;
-    field public static final java.lang.Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS;
-    field public static final java.lang.Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED;
-    field public static final java.lang.Character.UnicodeBlock VAI;
-    field public static final java.lang.Character.UnicodeBlock VARIATION_SELECTORS;
-    field public static final java.lang.Character.UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT;
-    field public static final java.lang.Character.UnicodeBlock VEDIC_EXTENSIONS;
-    field public static final java.lang.Character.UnicodeBlock VERTICAL_FORMS;
-    field public static final java.lang.Character.UnicodeBlock YIJING_HEXAGRAM_SYMBOLS;
-    field public static final java.lang.Character.UnicodeBlock YI_RADICALS;
-    field public static final java.lang.Character.UnicodeBlock YI_SYLLABLES;
-  }
-
-  public enum Character.UnicodeScript {
-    method @NonNull public static java.lang.Character.UnicodeScript forName(@NonNull String);
-    method @NonNull public static java.lang.Character.UnicodeScript of(int);
-    enum_constant public static final java.lang.Character.UnicodeScript ARABIC;
-    enum_constant public static final java.lang.Character.UnicodeScript ARMENIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript AVESTAN;
-    enum_constant public static final java.lang.Character.UnicodeScript BALINESE;
-    enum_constant public static final java.lang.Character.UnicodeScript BAMUM;
-    enum_constant public static final java.lang.Character.UnicodeScript BATAK;
-    enum_constant public static final java.lang.Character.UnicodeScript BENGALI;
-    enum_constant public static final java.lang.Character.UnicodeScript BOPOMOFO;
-    enum_constant public static final java.lang.Character.UnicodeScript BRAHMI;
-    enum_constant public static final java.lang.Character.UnicodeScript BRAILLE;
-    enum_constant public static final java.lang.Character.UnicodeScript BUGINESE;
-    enum_constant public static final java.lang.Character.UnicodeScript BUHID;
-    enum_constant public static final java.lang.Character.UnicodeScript CANADIAN_ABORIGINAL;
-    enum_constant public static final java.lang.Character.UnicodeScript CARIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript CHAKMA;
-    enum_constant public static final java.lang.Character.UnicodeScript CHAM;
-    enum_constant public static final java.lang.Character.UnicodeScript CHEROKEE;
-    enum_constant public static final java.lang.Character.UnicodeScript COMMON;
-    enum_constant public static final java.lang.Character.UnicodeScript COPTIC;
-    enum_constant public static final java.lang.Character.UnicodeScript CUNEIFORM;
-    enum_constant public static final java.lang.Character.UnicodeScript CYPRIOT;
-    enum_constant public static final java.lang.Character.UnicodeScript CYRILLIC;
-    enum_constant public static final java.lang.Character.UnicodeScript DESERET;
-    enum_constant public static final java.lang.Character.UnicodeScript DEVANAGARI;
-    enum_constant public static final java.lang.Character.UnicodeScript EGYPTIAN_HIEROGLYPHS;
-    enum_constant public static final java.lang.Character.UnicodeScript ETHIOPIC;
-    enum_constant public static final java.lang.Character.UnicodeScript GEORGIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript GLAGOLITIC;
-    enum_constant public static final java.lang.Character.UnicodeScript GOTHIC;
-    enum_constant public static final java.lang.Character.UnicodeScript GREEK;
-    enum_constant public static final java.lang.Character.UnicodeScript GUJARATI;
-    enum_constant public static final java.lang.Character.UnicodeScript GURMUKHI;
-    enum_constant public static final java.lang.Character.UnicodeScript HAN;
-    enum_constant public static final java.lang.Character.UnicodeScript HANGUL;
-    enum_constant public static final java.lang.Character.UnicodeScript HANUNOO;
-    enum_constant public static final java.lang.Character.UnicodeScript HEBREW;
-    enum_constant public static final java.lang.Character.UnicodeScript HIRAGANA;
-    enum_constant public static final java.lang.Character.UnicodeScript IMPERIAL_ARAMAIC;
-    enum_constant public static final java.lang.Character.UnicodeScript INHERITED;
-    enum_constant public static final java.lang.Character.UnicodeScript INSCRIPTIONAL_PAHLAVI;
-    enum_constant public static final java.lang.Character.UnicodeScript INSCRIPTIONAL_PARTHIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript JAVANESE;
-    enum_constant public static final java.lang.Character.UnicodeScript KAITHI;
-    enum_constant public static final java.lang.Character.UnicodeScript KANNADA;
-    enum_constant public static final java.lang.Character.UnicodeScript KATAKANA;
-    enum_constant public static final java.lang.Character.UnicodeScript KAYAH_LI;
-    enum_constant public static final java.lang.Character.UnicodeScript KHAROSHTHI;
-    enum_constant public static final java.lang.Character.UnicodeScript KHMER;
-    enum_constant public static final java.lang.Character.UnicodeScript LAO;
-    enum_constant public static final java.lang.Character.UnicodeScript LATIN;
-    enum_constant public static final java.lang.Character.UnicodeScript LEPCHA;
-    enum_constant public static final java.lang.Character.UnicodeScript LIMBU;
-    enum_constant public static final java.lang.Character.UnicodeScript LINEAR_B;
-    enum_constant public static final java.lang.Character.UnicodeScript LISU;
-    enum_constant public static final java.lang.Character.UnicodeScript LYCIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript LYDIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript MALAYALAM;
-    enum_constant public static final java.lang.Character.UnicodeScript MANDAIC;
-    enum_constant public static final java.lang.Character.UnicodeScript MEETEI_MAYEK;
-    enum_constant public static final java.lang.Character.UnicodeScript MEROITIC_CURSIVE;
-    enum_constant public static final java.lang.Character.UnicodeScript MEROITIC_HIEROGLYPHS;
-    enum_constant public static final java.lang.Character.UnicodeScript MIAO;
-    enum_constant public static final java.lang.Character.UnicodeScript MONGOLIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript MYANMAR;
-    enum_constant public static final java.lang.Character.UnicodeScript NEW_TAI_LUE;
-    enum_constant public static final java.lang.Character.UnicodeScript NKO;
-    enum_constant public static final java.lang.Character.UnicodeScript OGHAM;
-    enum_constant public static final java.lang.Character.UnicodeScript OLD_ITALIC;
-    enum_constant public static final java.lang.Character.UnicodeScript OLD_PERSIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript OLD_SOUTH_ARABIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript OLD_TURKIC;
-    enum_constant public static final java.lang.Character.UnicodeScript OL_CHIKI;
-    enum_constant public static final java.lang.Character.UnicodeScript ORIYA;
-    enum_constant public static final java.lang.Character.UnicodeScript OSMANYA;
-    enum_constant public static final java.lang.Character.UnicodeScript PHAGS_PA;
-    enum_constant public static final java.lang.Character.UnicodeScript PHOENICIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript REJANG;
-    enum_constant public static final java.lang.Character.UnicodeScript RUNIC;
-    enum_constant public static final java.lang.Character.UnicodeScript SAMARITAN;
-    enum_constant public static final java.lang.Character.UnicodeScript SAURASHTRA;
-    enum_constant public static final java.lang.Character.UnicodeScript SHARADA;
-    enum_constant public static final java.lang.Character.UnicodeScript SHAVIAN;
-    enum_constant public static final java.lang.Character.UnicodeScript SINHALA;
-    enum_constant public static final java.lang.Character.UnicodeScript SORA_SOMPENG;
-    enum_constant public static final java.lang.Character.UnicodeScript SUNDANESE;
-    enum_constant public static final java.lang.Character.UnicodeScript SYLOTI_NAGRI;
-    enum_constant public static final java.lang.Character.UnicodeScript SYRIAC;
-    enum_constant public static final java.lang.Character.UnicodeScript TAGALOG;
-    enum_constant public static final java.lang.Character.UnicodeScript TAGBANWA;
-    enum_constant public static final java.lang.Character.UnicodeScript TAI_LE;
-    enum_constant public static final java.lang.Character.UnicodeScript TAI_THAM;
-    enum_constant public static final java.lang.Character.UnicodeScript TAI_VIET;
-    enum_constant public static final java.lang.Character.UnicodeScript TAKRI;
-    enum_constant public static final java.lang.Character.UnicodeScript TAMIL;
-    enum_constant public static final java.lang.Character.UnicodeScript TELUGU;
-    enum_constant public static final java.lang.Character.UnicodeScript THAANA;
-    enum_constant public static final java.lang.Character.UnicodeScript THAI;
-    enum_constant public static final java.lang.Character.UnicodeScript TIBETAN;
-    enum_constant public static final java.lang.Character.UnicodeScript TIFINAGH;
-    enum_constant public static final java.lang.Character.UnicodeScript UGARITIC;
-    enum_constant public static final java.lang.Character.UnicodeScript UNKNOWN;
-    enum_constant public static final java.lang.Character.UnicodeScript VAI;
-    enum_constant public static final java.lang.Character.UnicodeScript YI;
-  }
-
-  public final class Class<T> implements java.lang.reflect.AnnotatedElement java.lang.reflect.GenericDeclaration java.io.Serializable java.lang.reflect.Type {
-    method @NonNull public <U> Class<? extends U> asSubclass(@NonNull Class<U>);
-    method @Nullable public T cast(@Nullable Object);
-    method public boolean desiredAssertionStatus();
-    method @NonNull public static Class<?> forName(@NonNull String) throws java.lang.ClassNotFoundException;
-    method @NonNull public static Class<?> forName(@NonNull String, boolean, @Nullable ClassLoader) throws java.lang.ClassNotFoundException;
-    method @Nullable public <A extends java.lang.annotation.Annotation> A getAnnotation(@NonNull Class<A>);
-    method @NonNull public java.lang.annotation.Annotation[] getAnnotations();
-    method @NonNull public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(@NonNull Class<A>);
-    method @Nullable public String getCanonicalName();
-    method @Nullable public ClassLoader getClassLoader();
-    method @NonNull public Class<?>[] getClasses();
-    method @Nullable public Class<?> getComponentType();
-    method @NonNull public java.lang.reflect.Constructor<T> getConstructor(@Nullable Class<?>...) throws java.lang.NoSuchMethodException, java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Constructor<?>[] getConstructors() throws java.lang.SecurityException;
-    method @Nullable public <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(@NonNull Class<A>);
-    method @NonNull public java.lang.annotation.Annotation[] getDeclaredAnnotations();
-    method @NonNull public Class<?>[] getDeclaredClasses();
-    method @NonNull public java.lang.reflect.Constructor<T> getDeclaredConstructor(@Nullable Class<?>...) throws java.lang.NoSuchMethodException, java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Constructor<?>[] getDeclaredConstructors() throws java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Field getDeclaredField(@NonNull String) throws java.lang.NoSuchFieldException;
-    method @NonNull public java.lang.reflect.Field[] getDeclaredFields();
-    method @NonNull public java.lang.reflect.Method getDeclaredMethod(@NonNull String, @Nullable Class<?>...) throws java.lang.NoSuchMethodException, java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Method[] getDeclaredMethods() throws java.lang.SecurityException;
-    method @Nullable public Class<?> getDeclaringClass();
-    method @Nullable public Class<?> getEnclosingClass();
-    method @Nullable public java.lang.reflect.Constructor<?> getEnclosingConstructor();
-    method @Nullable public java.lang.reflect.Method getEnclosingMethod();
-    method @Nullable public T[] getEnumConstants();
-    method @NonNull public java.lang.reflect.Field getField(@NonNull String) throws java.lang.NoSuchFieldException;
-    method @NonNull public java.lang.reflect.Field[] getFields() throws java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Type[] getGenericInterfaces();
-    method @Nullable public java.lang.reflect.Type getGenericSuperclass();
-    method @NonNull public Class<?>[] getInterfaces();
-    method @NonNull public java.lang.reflect.Method getMethod(@NonNull String, @Nullable Class<?>...) throws java.lang.NoSuchMethodException, java.lang.SecurityException;
-    method @NonNull public java.lang.reflect.Method[] getMethods() throws java.lang.SecurityException;
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method @Nullable public Package getPackage();
-    method @Nullable public java.security.ProtectionDomain getProtectionDomain();
-    method @Nullable public java.net.URL getResource(@NonNull String);
-    method @Nullable public java.io.InputStream getResourceAsStream(@NonNull String);
-    method @Nullable public Object[] getSigners();
-    method @NonNull public String getSimpleName();
-    method @Nullable public Class<? super T> getSuperclass();
-    method @NonNull public java.lang.reflect.TypeVariable<java.lang.Class<T>>[] getTypeParameters();
-    method public boolean isAnnotation();
-    method public boolean isAnonymousClass();
-    method public boolean isArray();
-    method public boolean isAssignableFrom(@NonNull Class<?>);
-    method public boolean isEnum();
-    method public boolean isInstance(@Nullable Object);
-    method public boolean isInterface();
-    method public boolean isLocalClass();
-    method public boolean isMemberClass();
-    method public boolean isPrimitive();
-    method public boolean isSynthetic();
-    method @NonNull public T newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException;
-    method @NonNull public String toGenericString();
-  }
-
-  public class ClassCastException extends java.lang.RuntimeException {
-    ctor public ClassCastException();
-    ctor public ClassCastException(String);
-  }
-
-  public class ClassCircularityError extends java.lang.LinkageError {
-    ctor public ClassCircularityError();
-    ctor public ClassCircularityError(String);
-  }
-
-  public class ClassFormatError extends java.lang.LinkageError {
-    ctor public ClassFormatError();
-    ctor public ClassFormatError(String);
-  }
-
-  public abstract class ClassLoader {
-    ctor protected ClassLoader(ClassLoader);
-    ctor protected ClassLoader();
-    method public void clearAssertionStatus();
-    method @Deprecated protected final Class<?> defineClass(byte[], int, int) throws java.lang.ClassFormatError;
-    method protected final Class<?> defineClass(String, byte[], int, int) throws java.lang.ClassFormatError;
-    method protected final Class<?> defineClass(String, byte[], int, int, java.security.ProtectionDomain) throws java.lang.ClassFormatError;
-    method protected final Class<?> defineClass(String, java.nio.ByteBuffer, java.security.ProtectionDomain) throws java.lang.ClassFormatError;
-    method protected Package definePackage(String, String, String, String, String, String, String, java.net.URL) throws java.lang.IllegalArgumentException;
-    method protected Class<?> findClass(String) throws java.lang.ClassNotFoundException;
-    method protected String findLibrary(String);
-    method protected final Class<?> findLoadedClass(String);
-    method protected java.net.URL findResource(String);
-    method protected java.util.Enumeration<java.net.URL> findResources(String) throws java.io.IOException;
-    method protected final Class<?> findSystemClass(String) throws java.lang.ClassNotFoundException;
-    method protected Package getPackage(String);
-    method protected Package[] getPackages();
-    method public final ClassLoader getParent();
-    method public java.net.URL getResource(String);
-    method public java.io.InputStream getResourceAsStream(String);
-    method public java.util.Enumeration<java.net.URL> getResources(String) throws java.io.IOException;
-    method public static ClassLoader getSystemClassLoader();
-    method public static java.net.URL getSystemResource(String);
-    method public static java.io.InputStream getSystemResourceAsStream(String);
-    method public static java.util.Enumeration<java.net.URL> getSystemResources(String) throws java.io.IOException;
-    method public Class<?> loadClass(String) throws java.lang.ClassNotFoundException;
-    method protected Class<?> loadClass(String, boolean) throws java.lang.ClassNotFoundException;
-    method protected static boolean registerAsParallelCapable();
-    method protected final void resolveClass(Class<?>);
-    method public void setClassAssertionStatus(String, boolean);
-    method public void setDefaultAssertionStatus(boolean);
-    method public void setPackageAssertionStatus(String, boolean);
-    method protected final void setSigners(Class<?>, Object[]);
-  }
-
-  public class ClassNotFoundException extends java.lang.ReflectiveOperationException {
-    ctor public ClassNotFoundException();
-    ctor public ClassNotFoundException(String);
-    ctor public ClassNotFoundException(String, Throwable);
-    method public Throwable getException();
-  }
-
-  public class CloneNotSupportedException extends java.lang.Exception {
-    ctor public CloneNotSupportedException();
-    ctor public CloneNotSupportedException(String);
-  }
-
-  public interface Cloneable {
-  }
-
-  public interface Comparable<T> {
-    method public int compareTo(T);
-  }
-
-  public final class Compiler {
-    method public static Object command(Object);
-    method public static boolean compileClass(Class<?>);
-    method public static boolean compileClasses(String);
-    method public static void disable();
-    method public static void enable();
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.LOCAL_VARIABLE, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PACKAGE, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.TYPE}) public @interface Deprecated {
-  }
-
-  public final class Double extends java.lang.Number implements java.lang.Comparable<java.lang.Double> {
-    ctor public Double(double);
-    ctor public Double(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int compare(double, double);
-    method public int compareTo(@NonNull Double);
-    method public static long doubleToLongBits(double);
-    method public static long doubleToRawLongBits(double);
-    method public double doubleValue();
-    method public float floatValue();
-    method public static int hashCode(double);
-    method public int intValue();
-    method public static boolean isFinite(double);
-    method public static boolean isInfinite(double);
-    method public boolean isInfinite();
-    method public static boolean isNaN(double);
-    method public boolean isNaN();
-    method public static double longBitsToDouble(long);
-    method public long longValue();
-    method public static double max(double, double);
-    method public static double min(double, double);
-    method public static double parseDouble(@NonNull String) throws java.lang.NumberFormatException;
-    method public static double sum(double, double);
-    method @NonNull public static String toHexString(double);
-    method @NonNull public static String toString(double);
-    method @NonNull public static Double valueOf(@NonNull String) throws java.lang.NumberFormatException;
-    method @NonNull public static Double valueOf(double);
-    field public static final int BYTES = 8; // 0x8
-    field public static final int MAX_EXPONENT = 1023; // 0x3ff
-    field public static final double MAX_VALUE = 1.7976931348623157E308;
-    field public static final int MIN_EXPONENT = -1022; // 0xfffffc02
-    field public static final double MIN_NORMAL = 2.2250738585072014E-308;
-    field public static final double MIN_VALUE = 4.9E-324;
-    field public static final double NEGATIVE_INFINITY = (-1.0/0.0);
-    field public static final double NaN = (0.0/0.0);
-    field public static final double POSITIVE_INFINITY = (1.0/0.0);
-    field public static final int SIZE = 64; // 0x40
-    field public static final Class<java.lang.Double> TYPE;
-  }
-
-  public abstract class Enum<E extends java.lang.Enum<E>> implements java.lang.Comparable<E> java.io.Serializable {
-    ctor protected Enum(@NonNull String, int);
-    method @NonNull protected final Object clone() throws java.lang.CloneNotSupportedException;
-    method public final int compareTo(E);
-    method public final boolean equals(@Nullable Object);
-    method protected final void finalize();
-    method @NonNull public final Class<E> getDeclaringClass();
-    method public final int hashCode();
-    method @NonNull public final String name();
-    method public final int ordinal();
-    method @NonNull public static <T extends java.lang.Enum<T>> T valueOf(@NonNull Class<T>, @NonNull String);
-  }
-
-  public class EnumConstantNotPresentException extends java.lang.RuntimeException {
-    ctor public EnumConstantNotPresentException(Class<? extends java.lang.Enum>, String);
-    method public String constantName();
-    method public Class<? extends java.lang.Enum> enumType();
-  }
-
-  public class Error extends java.lang.Throwable {
-    ctor public Error();
-    ctor public Error(String);
-    ctor public Error(String, Throwable);
-    ctor public Error(Throwable);
-    ctor protected Error(String, Throwable, boolean, boolean);
-  }
-
-  public class Exception extends java.lang.Throwable {
-    ctor public Exception();
-    ctor public Exception(String);
-    ctor public Exception(String, Throwable);
-    ctor public Exception(Throwable);
-    ctor protected Exception(String, Throwable, boolean, boolean);
-  }
-
-  public class ExceptionInInitializerError extends java.lang.LinkageError {
-    ctor public ExceptionInInitializerError();
-    ctor public ExceptionInInitializerError(Throwable);
-    ctor public ExceptionInInitializerError(String);
-    method public Throwable getException();
-  }
-
-  public final class Float extends java.lang.Number implements java.lang.Comparable<java.lang.Float> {
-    ctor public Float(float);
-    ctor public Float(double);
-    ctor public Float(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int compare(float, float);
-    method public int compareTo(@NonNull Float);
-    method public double doubleValue();
-    method public static int floatToIntBits(float);
-    method public static int floatToRawIntBits(float);
-    method public float floatValue();
-    method public static int hashCode(float);
-    method public static float intBitsToFloat(int);
-    method public int intValue();
-    method public static boolean isFinite(float);
-    method public static boolean isInfinite(float);
-    method public boolean isInfinite();
-    method public static boolean isNaN(float);
-    method public boolean isNaN();
-    method public long longValue();
-    method public static float max(float, float);
-    method public static float min(float, float);
-    method public static float parseFloat(@NonNull String) throws java.lang.NumberFormatException;
-    method public static float sum(float, float);
-    method @NonNull public static String toHexString(float);
-    method @NonNull public static String toString(float);
-    method @NonNull public static Float valueOf(@NonNull String) throws java.lang.NumberFormatException;
-    method @NonNull public static Float valueOf(float);
-    field public static final int BYTES = 4; // 0x4
-    field public static final int MAX_EXPONENT = 127; // 0x7f
-    field public static final float MAX_VALUE = 3.4028235E38f;
-    field public static final int MIN_EXPONENT = -126; // 0xffffff82
-    field public static final float MIN_NORMAL = 1.17549435E-38f;
-    field public static final float MIN_VALUE = 1.4E-45f;
-    field public static final float NEGATIVE_INFINITY = (-1.0f/0.0f);
-    field public static final float NaN = (0.0f/0.0f);
-    field public static final float POSITIVE_INFINITY = (1.0f/0.0f);
-    field public static final int SIZE = 32; // 0x20
-    field public static final Class<java.lang.Float> TYPE;
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE) public @interface FunctionalInterface {
-  }
-
-  public class IllegalAccessError extends java.lang.IncompatibleClassChangeError {
-    ctor public IllegalAccessError();
-    ctor public IllegalAccessError(String);
-  }
-
-  public class IllegalAccessException extends java.lang.ReflectiveOperationException {
-    ctor public IllegalAccessException();
-    ctor public IllegalAccessException(String);
-  }
-
-  public class IllegalArgumentException extends java.lang.RuntimeException {
-    ctor public IllegalArgumentException();
-    ctor public IllegalArgumentException(String);
-    ctor public IllegalArgumentException(String, Throwable);
-    ctor public IllegalArgumentException(Throwable);
-  }
-
-  public class IllegalMonitorStateException extends java.lang.RuntimeException {
-    ctor public IllegalMonitorStateException();
-    ctor public IllegalMonitorStateException(String);
-  }
-
-  public class IllegalStateException extends java.lang.RuntimeException {
-    ctor public IllegalStateException();
-    ctor public IllegalStateException(String);
-    ctor public IllegalStateException(String, Throwable);
-    ctor public IllegalStateException(Throwable);
-  }
-
-  public class IllegalThreadStateException extends java.lang.IllegalArgumentException {
-    ctor public IllegalThreadStateException();
-    ctor public IllegalThreadStateException(String);
-  }
-
-  public class IncompatibleClassChangeError extends java.lang.LinkageError {
-    ctor public IncompatibleClassChangeError();
-    ctor public IncompatibleClassChangeError(String);
-  }
-
-  public class IndexOutOfBoundsException extends java.lang.RuntimeException {
-    ctor public IndexOutOfBoundsException();
-    ctor public IndexOutOfBoundsException(String);
-  }
-
-  public class InheritableThreadLocal<T> extends java.lang.ThreadLocal<T> {
-    ctor public InheritableThreadLocal();
-    method protected T childValue(T);
-  }
-
-  public class InstantiationError extends java.lang.IncompatibleClassChangeError {
-    ctor public InstantiationError();
-    ctor public InstantiationError(String);
-  }
-
-  public class InstantiationException extends java.lang.ReflectiveOperationException {
-    ctor public InstantiationException();
-    ctor public InstantiationException(String);
-  }
-
-  public final class Integer extends java.lang.Number implements java.lang.Comparable<java.lang.Integer> {
-    ctor public Integer(int);
-    ctor public Integer(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int bitCount(int);
-    method public static int compare(int, int);
-    method public int compareTo(@NonNull Integer);
-    method public static int compareUnsigned(int, int);
-    method @NonNull public static Integer decode(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int divideUnsigned(int, int);
-    method public double doubleValue();
-    method public float floatValue();
-    method @Nullable public static Integer getInteger(@NonNull String);
-    method @Nullable public static Integer getInteger(@NonNull String, int);
-    method @Nullable public static Integer getInteger(@NonNull String, @Nullable Integer);
-    method public static int hashCode(int);
-    method public static int highestOneBit(int);
-    method public int intValue();
-    method public long longValue();
-    method public static int lowestOneBit(int);
-    method public static int max(int, int);
-    method public static int min(int, int);
-    method public static int numberOfLeadingZeros(int);
-    method public static int numberOfTrailingZeros(int);
-    method public static int parseInt(@NonNull String, int) throws java.lang.NumberFormatException;
-    method public static int parseInt(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int parseUnsignedInt(@NonNull String, int) throws java.lang.NumberFormatException;
-    method public static int parseUnsignedInt(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int remainderUnsigned(int, int);
-    method public static int reverse(int);
-    method public static int reverseBytes(int);
-    method public static int rotateLeft(int, int);
-    method public static int rotateRight(int, int);
-    method public static int signum(int);
-    method public static int sum(int, int);
-    method @NonNull public static String toBinaryString(int);
-    method @NonNull public static String toHexString(int);
-    method @NonNull public static String toOctalString(int);
-    method @NonNull public static String toString(int, int);
-    method @NonNull public static String toString(int);
-    method public static long toUnsignedLong(int);
-    method @NonNull public static String toUnsignedString(int, int);
-    method @NonNull public static String toUnsignedString(int);
-    method @NonNull public static Integer valueOf(@NonNull String, int) throws java.lang.NumberFormatException;
-    method @NonNull public static Integer valueOf(@NonNull String) throws java.lang.NumberFormatException;
-    method @NonNull public static Integer valueOf(int);
-    field public static final int BYTES = 4; // 0x4
-    field public static final int MAX_VALUE = 2147483647; // 0x7fffffff
-    field public static final int MIN_VALUE = -2147483648; // 0x80000000
-    field public static final int SIZE = 32; // 0x20
-    field public static final Class<java.lang.Integer> TYPE;
-  }
-
-  public class InternalError extends java.lang.VirtualMachineError {
-    ctor public InternalError();
-    ctor public InternalError(String);
-    ctor public InternalError(String, Throwable);
-    ctor public InternalError(Throwable);
-  }
-
-  public class InterruptedException extends java.lang.Exception {
-    ctor public InterruptedException();
-    ctor public InterruptedException(String);
-  }
-
-  public interface Iterable<T> {
-    method public default void forEach(@NonNull java.util.function.Consumer<? super T>);
-    method @NonNull public java.util.Iterator<T> iterator();
-    method @NonNull public default java.util.Spliterator<T> spliterator();
-  }
-
-  public class LinkageError extends java.lang.Error {
-    ctor public LinkageError();
-    ctor public LinkageError(String);
-    ctor public LinkageError(String, Throwable);
-  }
-
-  public final class Long extends java.lang.Number implements java.lang.Comparable<java.lang.Long> {
-    ctor public Long(long);
-    ctor public Long(@NonNull String) throws java.lang.NumberFormatException;
-    method public static int bitCount(long);
-    method public static int compare(long, long);
-    method public int compareTo(@NonNull Long);
-    method public static int compareUnsigned(long, long);
-    method @NonNull public static Long decode(@NonNull String) throws java.lang.NumberFormatException;
-    method public static long divideUnsigned(long, long);
-    method public double doubleValue();
-    method public float floatValue();
-    method @Nullable public static Long getLong(@NonNull String);
-    method @Nullable public static Long getLong(@NonNull String, long);
-    method @Nullable public static Long getLong(@NonNull String, @Nullable Long);
-    method public static int hashCode(long);
-    method public static long highestOneBit(long);
-    method public int intValue();
-    method public long longValue();
-    method public static long lowestOneBit(long);
-    method public static long max(long, long);
-    method public static long min(long, long);
-    method public static int numberOfLeadingZeros(long);
-    method public static int numberOfTrailingZeros(long);
-    method public static long parseLong(@NonNull String, int) throws java.lang.NumberFormatException;
-    method public static long parseLong(@NonNull String) throws java.lang.NumberFormatException;
-    method public static long parseUnsignedLong(@NonNull String, int) throws java.lang.NumberFormatException;
-    method public static long parseUnsignedLong(@NonNull String) throws java.lang.NumberFormatException;
-    method public static long remainderUnsigned(long, long);
-    method public static long reverse(long);
-    method public static long reverseBytes(long);
-    method public static long rotateLeft(long, int);
-    method public static long rotateRight(long, int);
-    method public static int signum(long);
-    method public static long sum(long, long);
-    method @NonNull public static String toBinaryString(long);
-    method @NonNull public static String toHexString(long);
-    method @NonNull public static String toOctalString(long);
-    method @NonNull public static String toString(long, int);
-    method @NonNull public static String toString(long);
-    method @NonNull public static String toUnsignedString(long, int);
-    method @NonNull public static String toUnsignedString(long);
-    method @NonNull public static Long valueOf(@NonNull String, int) throws java.lang.NumberFormatException;
-    method @NonNull public static Long valueOf(@NonNull String) throws java.lang.NumberFormatException;
-    method @NonNull public static Long valueOf(long);
-    field public static final int BYTES = 8; // 0x8
-    field public static final long MAX_VALUE = 9223372036854775807L; // 0x7fffffffffffffffL
-    field public static final long MIN_VALUE = -9223372036854775808L; // 0x8000000000000000L
-    field public static final int SIZE = 64; // 0x40
-    field public static final Class<java.lang.Long> TYPE;
-  }
-
-  public final class Math {
-    method public static double IEEEremainder(double, double);
-    method public static int abs(int);
-    method public static long abs(long);
-    method public static float abs(float);
-    method public static double abs(double);
-    method public static double acos(double);
-    method public static int addExact(int, int);
-    method public static long addExact(long, long);
-    method public static double asin(double);
-    method public static double atan(double);
-    method public static double atan2(double, double);
-    method public static double cbrt(double);
-    method public static double ceil(double);
-    method public static double copySign(double, double);
-    method public static float copySign(float, float);
-    method public static double cos(double);
-    method public static double cosh(double);
-    method public static int decrementExact(int);
-    method public static long decrementExact(long);
-    method public static double exp(double);
-    method public static double expm1(double);
-    method public static double floor(double);
-    method public static int floorDiv(int, int);
-    method public static long floorDiv(long, long);
-    method public static int floorMod(int, int);
-    method public static long floorMod(long, long);
-    method public static int getExponent(float);
-    method public static int getExponent(double);
-    method public static double hypot(double, double);
-    method public static int incrementExact(int);
-    method public static long incrementExact(long);
-    method public static double log(double);
-    method public static double log10(double);
-    method public static double log1p(double);
-    method public static int max(int, int);
-    method public static long max(long, long);
-    method public static float max(float, float);
-    method public static double max(double, double);
-    method public static int min(int, int);
-    method public static long min(long, long);
-    method public static float min(float, float);
-    method public static double min(double, double);
-    method public static int multiplyExact(int, int);
-    method public static long multiplyExact(long, long);
-    method public static int negateExact(int);
-    method public static long negateExact(long);
-    method public static double nextAfter(double, double);
-    method public static float nextAfter(float, double);
-    method public static double nextDown(double);
-    method public static float nextDown(float);
-    method public static double nextUp(double);
-    method public static float nextUp(float);
-    method public static double pow(double, double);
-    method public static double random();
-    method public static double rint(double);
-    method public static int round(float);
-    method public static long round(double);
-    method public static double scalb(double, int);
-    method public static float scalb(float, int);
-    method public static double signum(double);
-    method public static float signum(float);
-    method public static double sin(double);
-    method public static double sinh(double);
-    method public static double sqrt(double);
-    method public static int subtractExact(int, int);
-    method public static long subtractExact(long, long);
-    method public static double tan(double);
-    method public static double tanh(double);
-    method public static double toDegrees(double);
-    method public static int toIntExact(long);
-    method public static double toRadians(double);
-    method public static double ulp(double);
-    method public static float ulp(float);
-    field public static final double E = 2.718281828459045;
-    field public static final double PI = 3.141592653589793;
-  }
-
-  public class NegativeArraySizeException extends java.lang.RuntimeException {
-    ctor public NegativeArraySizeException();
-    ctor public NegativeArraySizeException(String);
-  }
-
-  public class NoClassDefFoundError extends java.lang.LinkageError {
-    ctor public NoClassDefFoundError();
-    ctor public NoClassDefFoundError(String);
-  }
-
-  public class NoSuchFieldError extends java.lang.IncompatibleClassChangeError {
-    ctor public NoSuchFieldError();
-    ctor public NoSuchFieldError(String);
-  }
-
-  public class NoSuchFieldException extends java.lang.ReflectiveOperationException {
-    ctor public NoSuchFieldException();
-    ctor public NoSuchFieldException(String);
-  }
-
-  public class NoSuchMethodError extends java.lang.IncompatibleClassChangeError {
-    ctor public NoSuchMethodError();
-    ctor public NoSuchMethodError(String);
-  }
-
-  public class NoSuchMethodException extends java.lang.ReflectiveOperationException {
-    ctor public NoSuchMethodException();
-    ctor public NoSuchMethodException(String);
-  }
-
-  public class NullPointerException extends java.lang.RuntimeException {
-    ctor public NullPointerException();
-    ctor public NullPointerException(String);
-  }
-
-  public abstract class Number implements java.io.Serializable {
-    ctor public Number();
-    method public byte byteValue();
-    method public abstract double doubleValue();
-    method public abstract float floatValue();
-    method public abstract int intValue();
-    method public abstract long longValue();
-    method public short shortValue();
-  }
-
-  public class NumberFormatException extends java.lang.IllegalArgumentException {
-    ctor public NumberFormatException();
-    ctor public NumberFormatException(String);
-  }
-
-  public class Object {
-    ctor public Object();
-    method @NonNull protected Object clone() throws java.lang.CloneNotSupportedException;
-    method public boolean equals(@Nullable Object);
-    method protected void finalize() throws java.lang.Throwable;
-    method @NonNull public final Class<?> getClass();
-    method public int hashCode();
-    method public final void notify();
-    method public final void notifyAll();
-    method @NonNull public String toString();
-    method public final void wait(long) throws java.lang.InterruptedException;
-    method public final void wait(long, int) throws java.lang.InterruptedException;
-    method public final void wait() throws java.lang.InterruptedException;
-  }
-
-  public class OutOfMemoryError extends java.lang.VirtualMachineError {
-    ctor public OutOfMemoryError();
-    ctor public OutOfMemoryError(String);
-  }
-
-  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface Override {
-  }
-
-  public class Package implements java.lang.reflect.AnnotatedElement {
-    method public <A extends java.lang.annotation.Annotation> A getAnnotation(Class<A>);
-    method public java.lang.annotation.Annotation[] getAnnotations();
-    method public <A extends java.lang.annotation.Annotation> A[] getAnnotationsByType(Class<A>);
-    method public <A extends java.lang.annotation.Annotation> A getDeclaredAnnotation(Class<A>);
-    method public java.lang.annotation.Annotation[] getDeclaredAnnotations();
-    method public <A extends java.lang.annotation.Annotation> A[] getDeclaredAnnotationsByType(Class<A>);
-    method public String getImplementationTitle();
-    method public String getImplementationVendor();
-    method public String getImplementationVersion();
-    method public String getName();
-    method public static Package getPackage(String);
-    method public static Package[] getPackages();
-    method public String getSpecificationTitle();
-    method public String getSpecificationVendor();
-    method public String getSpecificationVersion();
-    method public boolean isCompatibleWith(String) throws java.lang.NumberFormatException;
-    method public boolean isSealed();
-    method public boolean isSealed(java.net.URL);
-  }
-
-  public abstract class Process {
-    ctor public Process();
-    method public abstract void destroy();
-    method public Process destroyForcibly();
-    method public abstract int exitValue();
-    method public abstract java.io.InputStream getErrorStream();
-    method public abstract java.io.InputStream getInputStream();
-    method public abstract java.io.OutputStream getOutputStream();
-    method public boolean isAlive();
-    method public abstract int waitFor() throws java.lang.InterruptedException;
-    method public boolean waitFor(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-  }
-
-  public final class ProcessBuilder {
-    ctor public ProcessBuilder(java.util.List<java.lang.String>);
-    ctor public ProcessBuilder(java.lang.String...);
-    method public ProcessBuilder command(java.util.List<java.lang.String>);
-    method public ProcessBuilder command(java.lang.String...);
-    method public java.util.List<java.lang.String> command();
-    method public java.io.File directory();
-    method public ProcessBuilder directory(java.io.File);
-    method public java.util.Map<java.lang.String,java.lang.String> environment();
-    method public ProcessBuilder inheritIO();
-    method public ProcessBuilder redirectError(java.lang.ProcessBuilder.Redirect);
-    method public ProcessBuilder redirectError(java.io.File);
-    method public java.lang.ProcessBuilder.Redirect redirectError();
-    method public boolean redirectErrorStream();
-    method public ProcessBuilder redirectErrorStream(boolean);
-    method public ProcessBuilder redirectInput(java.lang.ProcessBuilder.Redirect);
-    method public ProcessBuilder redirectInput(java.io.File);
-    method public java.lang.ProcessBuilder.Redirect redirectInput();
-    method public ProcessBuilder redirectOutput(java.lang.ProcessBuilder.Redirect);
-    method public ProcessBuilder redirectOutput(java.io.File);
-    method public java.lang.ProcessBuilder.Redirect redirectOutput();
-    method public Process start() throws java.io.IOException;
-  }
-
-  public abstract static class ProcessBuilder.Redirect {
-    method public static java.lang.ProcessBuilder.Redirect appendTo(java.io.File);
-    method public java.io.File file();
-    method public static java.lang.ProcessBuilder.Redirect from(java.io.File);
-    method public static java.lang.ProcessBuilder.Redirect to(java.io.File);
-    method public abstract java.lang.ProcessBuilder.Redirect.Type type();
-    field public static final java.lang.ProcessBuilder.Redirect INHERIT;
-    field public static final java.lang.ProcessBuilder.Redirect PIPE;
-  }
-
-  public enum ProcessBuilder.Redirect.Type {
-    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type APPEND;
-    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type INHERIT;
-    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type PIPE;
-    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type READ;
-    enum_constant public static final java.lang.ProcessBuilder.Redirect.Type WRITE;
-  }
-
-  public interface Readable {
-    method public int read(java.nio.CharBuffer) throws java.io.IOException;
-  }
-
-  public class ReflectiveOperationException extends java.lang.Exception {
-    ctor public ReflectiveOperationException();
-    ctor public ReflectiveOperationException(String);
-    ctor public ReflectiveOperationException(String, Throwable);
-    ctor public ReflectiveOperationException(Throwable);
-  }
-
-  @java.lang.FunctionalInterface public interface Runnable {
-    method public void run();
-  }
-
-  public class Runtime {
-    method public void addShutdownHook(Thread);
-    method public int availableProcessors();
-    method public Process exec(String) throws java.io.IOException;
-    method public Process exec(String, String[]) throws java.io.IOException;
-    method public Process exec(String, String[], java.io.File) throws java.io.IOException;
-    method public Process exec(String[]) throws java.io.IOException;
-    method public Process exec(String[], String[]) throws java.io.IOException;
-    method public Process exec(String[], String[], java.io.File) throws java.io.IOException;
-    method public void exit(int);
-    method public long freeMemory();
-    method public void gc();
-    method @Deprecated public java.io.InputStream getLocalizedInputStream(java.io.InputStream);
-    method @Deprecated public java.io.OutputStream getLocalizedOutputStream(java.io.OutputStream);
-    method public static Runtime getRuntime();
-    method public void halt(int);
-    method public void load(String);
-    method public void loadLibrary(String);
-    method public long maxMemory();
-    method public boolean removeShutdownHook(Thread);
-    method public void runFinalization();
-    method @Deprecated public static void runFinalizersOnExit(boolean);
-    method public long totalMemory();
-    method public void traceInstructions(boolean);
-    method public void traceMethodCalls(boolean);
-  }
-
-  public class RuntimeException extends java.lang.Exception {
-    ctor public RuntimeException();
-    ctor public RuntimeException(String);
-    ctor public RuntimeException(String, Throwable);
-    ctor public RuntimeException(Throwable);
-    ctor protected RuntimeException(String, Throwable, boolean, boolean);
-  }
-
-  public final class RuntimePermission extends java.security.BasicPermission {
-    ctor public RuntimePermission(String);
-    ctor public RuntimePermission(String, String);
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.METHOD}) public @interface SafeVarargs {
-  }
-
-  public class SecurityException extends java.lang.RuntimeException {
-    ctor public SecurityException();
-    ctor public SecurityException(String);
-    ctor public SecurityException(String, Throwable);
-    ctor public SecurityException(Throwable);
-  }
-
-  public class SecurityManager {
-    ctor public SecurityManager();
-    method public void checkAccept(String, int);
-    method public void checkAccess(Thread);
-    method public void checkAccess(ThreadGroup);
-    method public void checkAwtEventQueueAccess();
-    method public void checkConnect(String, int);
-    method public void checkConnect(String, int, Object);
-    method public void checkCreateClassLoader();
-    method public void checkDelete(String);
-    method public void checkExec(String);
-    method public void checkExit(int);
-    method public void checkLink(String);
-    method public void checkListen(int);
-    method public void checkMemberAccess(Class<?>, int);
-    method public void checkMulticast(java.net.InetAddress);
-    method @Deprecated public void checkMulticast(java.net.InetAddress, byte);
-    method public void checkPackageAccess(String);
-    method public void checkPackageDefinition(String);
-    method public void checkPermission(java.security.Permission);
-    method public void checkPermission(java.security.Permission, Object);
-    method public void checkPrintJobAccess();
-    method public void checkPropertiesAccess();
-    method public void checkPropertyAccess(String);
-    method public void checkRead(java.io.FileDescriptor);
-    method public void checkRead(String);
-    method public void checkRead(String, Object);
-    method public void checkSecurityAccess(String);
-    method public void checkSetFactory();
-    method public void checkSystemClipboardAccess();
-    method public boolean checkTopLevelWindow(Object);
-    method public void checkWrite(java.io.FileDescriptor);
-    method public void checkWrite(String);
-    method @Deprecated protected int classDepth(String);
-    method @Deprecated protected int classLoaderDepth();
-    method @Deprecated protected ClassLoader currentClassLoader();
-    method @Deprecated protected Class<?> currentLoadedClass();
-    method protected Class[] getClassContext();
-    method @Deprecated public boolean getInCheck();
-    method public Object getSecurityContext();
-    method public ThreadGroup getThreadGroup();
-    method @Deprecated protected boolean inClass(String);
-    method @Deprecated protected boolean inClassLoader();
-    field @Deprecated protected boolean inCheck;
-  }
-
-  public final class Short extends java.lang.Number implements java.lang.Comparable<java.lang.Short> {
-    ctor public Short(short);
-    ctor public Short(String) throws java.lang.NumberFormatException;
-    method public static int compare(short, short);
-    method public int compareTo(Short);
-    method public static Short decode(String) throws java.lang.NumberFormatException;
-    method public double doubleValue();
-    method public float floatValue();
-    method public static int hashCode(short);
-    method public int intValue();
-    method public long longValue();
-    method public static short parseShort(String, int) throws java.lang.NumberFormatException;
-    method public static short parseShort(String) throws java.lang.NumberFormatException;
-    method public static short reverseBytes(short);
-    method public static String toString(short);
-    method public static int toUnsignedInt(short);
-    method public static long toUnsignedLong(short);
-    method public static Short valueOf(String, int) throws java.lang.NumberFormatException;
-    method public static Short valueOf(String) throws java.lang.NumberFormatException;
-    method public static Short valueOf(short);
-    field public static final int BYTES = 2; // 0x2
-    field public static final short MAX_VALUE = 32767; // 0x7fff
-    field public static final short MIN_VALUE = -32768; // 0xffff8000
-    field public static final int SIZE = 16; // 0x10
-    field public static final Class<java.lang.Short> TYPE;
-  }
-
-  public class StackOverflowError extends java.lang.VirtualMachineError {
-    ctor public StackOverflowError();
-    ctor public StackOverflowError(String);
-  }
-
-  public final class StackTraceElement implements java.io.Serializable {
-    ctor public StackTraceElement(String, String, String, int);
-    method public String getClassName();
-    method public String getFileName();
-    method public int getLineNumber();
-    method public String getMethodName();
-    method public boolean isNativeMethod();
-  }
-
-  public final class StrictMath {
-    method public static double IEEEremainder(double, double);
-    method public static int abs(int);
-    method public static long abs(long);
-    method public static float abs(float);
-    method public static double abs(double);
-    method public static double acos(double);
-    method public static int addExact(int, int);
-    method public static long addExact(long, long);
-    method public static double asin(double);
-    method public static double atan(double);
-    method public static double atan2(double, double);
-    method public static double cbrt(double);
-    method public static double ceil(double);
-    method public static double copySign(double, double);
-    method public static float copySign(float, float);
-    method public static double cos(double);
-    method public static double cosh(double);
-    method public static double exp(double);
-    method public static double expm1(double);
-    method public static double floor(double);
-    method public static int floorDiv(int, int);
-    method public static long floorDiv(long, long);
-    method public static int floorMod(int, int);
-    method public static long floorMod(long, long);
-    method public static int getExponent(float);
-    method public static int getExponent(double);
-    method public static double hypot(double, double);
-    method public static double log(double);
-    method public static double log10(double);
-    method public static double log1p(double);
-    method public static int max(int, int);
-    method public static long max(long, long);
-    method public static float max(float, float);
-    method public static double max(double, double);
-    method public static int min(int, int);
-    method public static long min(long, long);
-    method public static float min(float, float);
-    method public static double min(double, double);
-    method public static int multiplyExact(int, int);
-    method public static long multiplyExact(long, long);
-    method public static double nextAfter(double, double);
-    method public static float nextAfter(float, double);
-    method public static double nextDown(double);
-    method public static float nextDown(float);
-    method public static double nextUp(double);
-    method public static float nextUp(float);
-    method public static double pow(double, double);
-    method public static double random();
-    method public static double rint(double);
-    method public static int round(float);
-    method public static long round(double);
-    method public static double scalb(double, int);
-    method public static float scalb(float, int);
-    method public static double signum(double);
-    method public static float signum(float);
-    method public static double sin(double);
-    method public static double sinh(double);
-    method public static double sqrt(double);
-    method public static int subtractExact(int, int);
-    method public static long subtractExact(long, long);
-    method public static double tan(double);
-    method public static double tanh(double);
-    method public static double toDegrees(double);
-    method public static int toIntExact(long);
-    method public static double toRadians(double);
-    method public static double ulp(double);
-    method public static float ulp(float);
-    field public static final double E = 2.718281828459045;
-    field public static final double PI = 3.141592653589793;
-  }
-
-  public final class String implements java.lang.CharSequence java.lang.Comparable<java.lang.String> java.io.Serializable {
-    ctor public String();
-    ctor public String(@NonNull String);
-    ctor public String(char[]);
-    ctor public String(char[], int, int);
-    ctor public String(int[], int, int);
-    ctor @Deprecated public String(byte[], int, int, int);
-    ctor @Deprecated public String(byte[], int);
-    ctor public String(byte[], int, int, @NonNull String) throws java.io.UnsupportedEncodingException;
-    ctor public String(byte[], int, int, @NonNull java.nio.charset.Charset);
-    ctor public String(byte[], @NonNull String) throws java.io.UnsupportedEncodingException;
-    ctor public String(byte[], @NonNull java.nio.charset.Charset);
-    ctor public String(byte[], int, int);
-    ctor public String(byte[]);
-    ctor public String(@NonNull StringBuffer);
-    ctor public String(@NonNull StringBuilder);
-    method public char charAt(int);
-    method public int codePointAt(int);
-    method public int codePointBefore(int);
-    method public int codePointCount(int, int);
-    method public int compareTo(@NonNull String);
-    method public int compareToIgnoreCase(@NonNull String);
-    method @NonNull public String concat(@NonNull String);
-    method public boolean contains(@NonNull CharSequence);
-    method public boolean contentEquals(@NonNull StringBuffer);
-    method public boolean contentEquals(@NonNull CharSequence);
-    method @NonNull public static String copyValueOf(char[], int, int);
-    method @NonNull public static String copyValueOf(char[]);
-    method public boolean endsWith(@NonNull String);
-    method public boolean equalsIgnoreCase(@Nullable String);
-    method @NonNull public static String format(@NonNull String, @NonNull java.lang.Object...);
-    method @NonNull public static String format(@NonNull java.util.Locale, @NonNull String, @NonNull java.lang.Object...);
-    method @Deprecated public void getBytes(int, int, byte[], int);
-    method public byte[] getBytes(@NonNull String) throws java.io.UnsupportedEncodingException;
-    method public byte[] getBytes(@NonNull java.nio.charset.Charset);
-    method public byte[] getBytes();
-    method public void getChars(int, int, char[], int);
-    method public int indexOf(int);
-    method public int indexOf(int, int);
-    method public int indexOf(@NonNull String);
-    method public int indexOf(@NonNull String, int);
-    method @NonNull public String intern();
-    method public boolean isEmpty();
-    method @NonNull public static String join(@NonNull CharSequence, @Nullable java.lang.CharSequence...);
-    method @NonNull public static String join(@NonNull CharSequence, @NonNull Iterable<? extends java.lang.CharSequence>);
-    method public int lastIndexOf(int);
-    method public int lastIndexOf(int, int);
-    method public int lastIndexOf(@NonNull String);
-    method public int lastIndexOf(@NonNull String, int);
-    method public int length();
-    method public boolean matches(@NonNull String);
-    method public int offsetByCodePoints(int, int);
-    method public boolean regionMatches(int, @NonNull String, int, int);
-    method public boolean regionMatches(boolean, int, @NonNull String, int, int);
-    method @NonNull public String replace(char, char);
-    method @NonNull public String replace(@NonNull CharSequence, @NonNull CharSequence);
-    method @NonNull public String replaceAll(@NonNull String, @NonNull String);
-    method @NonNull public String replaceFirst(@NonNull String, @NonNull String);
-    method @NonNull public String[] split(@NonNull String, int);
-    method @NonNull public String[] split(@NonNull String);
-    method public boolean startsWith(@NonNull String, int);
-    method public boolean startsWith(@NonNull String);
-    method @NonNull public CharSequence subSequence(int, int);
-    method @NonNull public String substring(int);
-    method @NonNull public String substring(int, int);
-    method public char[] toCharArray();
-    method @NonNull public String toLowerCase(@NonNull java.util.Locale);
-    method @NonNull public String toLowerCase();
-    method @NonNull public String toUpperCase(@NonNull java.util.Locale);
-    method @NonNull public String toUpperCase();
-    method @NonNull public String trim();
-    method @NonNull public static String valueOf(@Nullable Object);
-    method @NonNull public static String valueOf(char[]);
-    method @NonNull public static String valueOf(char[], int, int);
-    method @NonNull public static String valueOf(boolean);
-    method @NonNull public static String valueOf(char);
-    method @NonNull public static String valueOf(int);
-    method @NonNull public static String valueOf(long);
-    method @NonNull public static String valueOf(float);
-    method @NonNull public static String valueOf(double);
-    field public static final java.util.Comparator<java.lang.String> CASE_INSENSITIVE_ORDER;
-  }
-
-  public final class StringBuffer implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
-    ctor public StringBuffer();
-    ctor public StringBuffer(int);
-    ctor public StringBuffer(@NonNull String);
-    ctor public StringBuffer(@NonNull CharSequence);
-    method @NonNull public StringBuffer append(@Nullable Object);
-    method @NonNull public StringBuffer append(@Nullable String);
-    method @NonNull public StringBuffer append(@Nullable StringBuffer);
-    method @NonNull public StringBuffer append(@Nullable CharSequence);
-    method @NonNull public StringBuffer append(@Nullable CharSequence, int, int);
-    method @NonNull public StringBuffer append(char[]);
-    method @NonNull public StringBuffer append(char[], int, int);
-    method @NonNull public StringBuffer append(boolean);
-    method @NonNull public StringBuffer append(char);
-    method @NonNull public StringBuffer append(int);
-    method @NonNull public StringBuffer append(long);
-    method @NonNull public StringBuffer append(float);
-    method @NonNull public StringBuffer append(double);
-    method @NonNull public StringBuffer appendCodePoint(int);
-    method public int capacity();
-    method public char charAt(int);
-    method public int codePointAt(int);
-    method public int codePointBefore(int);
-    method public int codePointCount(int, int);
-    method @NonNull public StringBuffer delete(int, int);
-    method @NonNull public StringBuffer deleteCharAt(int);
-    method public void ensureCapacity(int);
-    method public void getChars(int, int, char[], int);
-    method public int indexOf(@NonNull String);
-    method public int indexOf(@NonNull String, int);
-    method @NonNull public StringBuffer insert(int, char[], int, int);
-    method @NonNull public StringBuffer insert(int, @Nullable Object);
-    method @NonNull public StringBuffer insert(int, @Nullable String);
-    method @NonNull public StringBuffer insert(int, char[]);
-    method @NonNull public StringBuffer insert(int, @Nullable CharSequence);
-    method @NonNull public StringBuffer insert(int, @Nullable CharSequence, int, int);
-    method @NonNull public StringBuffer insert(int, boolean);
-    method @NonNull public StringBuffer insert(int, char);
-    method @NonNull public StringBuffer insert(int, int);
-    method @NonNull public StringBuffer insert(int, long);
-    method @NonNull public StringBuffer insert(int, float);
-    method @NonNull public StringBuffer insert(int, double);
-    method public int lastIndexOf(@NonNull String);
-    method public int lastIndexOf(@NonNull String, int);
-    method public int length();
-    method public int offsetByCodePoints(int, int);
-    method @NonNull public StringBuffer replace(int, int, @NonNull String);
-    method @NonNull public StringBuffer reverse();
-    method public void setCharAt(int, char);
-    method public void setLength(int);
-    method @NonNull public CharSequence subSequence(int, int);
-    method @NonNull public String substring(int);
-    method @NonNull public String substring(int, int);
-    method public void trimToSize();
-  }
-
-  public final class StringBuilder implements java.lang.Appendable java.lang.CharSequence java.io.Serializable {
-    ctor public StringBuilder();
-    ctor public StringBuilder(int);
-    ctor public StringBuilder(@NonNull String);
-    ctor public StringBuilder(@NonNull CharSequence);
-    method @NonNull public StringBuilder append(@Nullable Object);
-    method @NonNull public StringBuilder append(@Nullable String);
-    method @NonNull public StringBuilder append(@Nullable StringBuffer);
-    method @NonNull public StringBuilder append(@Nullable CharSequence);
-    method @NonNull public StringBuilder append(@Nullable CharSequence, int, int);
-    method @NonNull public StringBuilder append(char[]);
-    method @NonNull public StringBuilder append(char[], int, int);
-    method @NonNull public StringBuilder append(boolean);
-    method @NonNull public StringBuilder append(char);
-    method @NonNull public StringBuilder append(int);
-    method @NonNull public StringBuilder append(long);
-    method @NonNull public StringBuilder append(float);
-    method @NonNull public StringBuilder append(double);
-    method @NonNull public StringBuilder appendCodePoint(int);
-    method public int capacity();
-    method public char charAt(int);
-    method public int codePointAt(int);
-    method public int codePointBefore(int);
-    method public int codePointCount(int, int);
-    method @NonNull public StringBuilder delete(int, int);
-    method @NonNull public StringBuilder deleteCharAt(int);
-    method public void ensureCapacity(int);
-    method public void getChars(int, int, char[], int);
-    method public int indexOf(@NonNull String);
-    method public int indexOf(@NonNull String, int);
-    method @NonNull public StringBuilder insert(int, char[], int, int);
-    method @NonNull public StringBuilder insert(int, @Nullable Object);
-    method @NonNull public StringBuilder insert(int, @Nullable String);
-    method @NonNull public StringBuilder insert(int, char[]);
-    method @NonNull public StringBuilder insert(int, @Nullable CharSequence);
-    method @NonNull public StringBuilder insert(int, @Nullable CharSequence, int, int);
-    method @NonNull public StringBuilder insert(int, boolean);
-    method @NonNull public StringBuilder insert(int, char);
-    method @NonNull public StringBuilder insert(int, int);
-    method @NonNull public StringBuilder insert(int, long);
-    method @NonNull public StringBuilder insert(int, float);
-    method @NonNull public StringBuilder insert(int, double);
-    method public int lastIndexOf(@NonNull String);
-    method public int lastIndexOf(@NonNull String, int);
-    method public int length();
-    method public int offsetByCodePoints(int, int);
-    method @NonNull public StringBuilder replace(int, int, @NonNull String);
-    method @NonNull public StringBuilder reverse();
-    method public void setCharAt(int, char);
-    method public void setLength(int);
-    method @NonNull public CharSequence subSequence(int, int);
-    method @NonNull public String substring(int);
-    method @NonNull public String substring(int, int);
-    method public void trimToSize();
-  }
-
-  public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException {
-    ctor public StringIndexOutOfBoundsException();
-    ctor public StringIndexOutOfBoundsException(String);
-    ctor public StringIndexOutOfBoundsException(int);
-  }
-
-  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE, java.lang.annotation.ElementType.FIELD, java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.PARAMETER, java.lang.annotation.ElementType.CONSTRUCTOR, java.lang.annotation.ElementType.LOCAL_VARIABLE}) public @interface SuppressWarnings {
-    method public abstract String[] value();
-  }
-
-  public final class System {
-    method public static void arraycopy(@NonNull Object, int, @NonNull Object, int, int);
-    method @Nullable public static String clearProperty(@NonNull String);
-    method @Nullable public static java.io.Console console();
-    method public static long currentTimeMillis();
-    method public static void exit(int);
-    method public static void gc();
-    method @NonNull public static java.util.Properties getProperties();
-    method @Nullable public static String getProperty(@NonNull String);
-    method @Nullable public static String getProperty(@NonNull String, @Nullable String);
-    method @Nullable public static SecurityManager getSecurityManager();
-    method @Nullable public static String getenv(@NonNull String);
-    method @NonNull public static java.util.Map<java.lang.String,java.lang.String> getenv();
-    method public static int identityHashCode(@Nullable Object);
-    method @Nullable public static java.nio.channels.Channel inheritedChannel() throws java.io.IOException;
-    method @NonNull public static String lineSeparator();
-    method public static void load(@NonNull String);
-    method public static void loadLibrary(@NonNull String);
-    method @NonNull public static String mapLibraryName(@NonNull String);
-    method public static long nanoTime();
-    method public static void runFinalization();
-    method @Deprecated public static void runFinalizersOnExit(boolean);
-    method public static void setErr(@Nullable java.io.PrintStream);
-    method public static void setIn(@Nullable java.io.InputStream);
-    method public static void setOut(@Nullable java.io.PrintStream);
-    method public static void setProperties(@Nullable java.util.Properties);
-    method @Nullable public static String setProperty(@NonNull String, @Nullable String);
-    method public static void setSecurityManager(@Nullable SecurityManager);
-    field public static final java.io.PrintStream err;
-    field public static final java.io.InputStream in;
-    field public static final java.io.PrintStream out;
-  }
-
-  public class Thread implements java.lang.Runnable {
-    ctor public Thread();
-    ctor public Thread(@Nullable Runnable);
-    ctor public Thread(@Nullable ThreadGroup, @Nullable Runnable);
-    ctor public Thread(@NonNull String);
-    ctor public Thread(@Nullable ThreadGroup, @NonNull String);
-    ctor public Thread(@Nullable Runnable, @NonNull String);
-    ctor public Thread(@Nullable ThreadGroup, @Nullable Runnable, @NonNull String);
-    ctor public Thread(@Nullable ThreadGroup, @Nullable Runnable, @NonNull String, long);
-    method public static int activeCount();
-    method public final void checkAccess();
-    method @Deprecated public int countStackFrames();
-    method @NonNull public static Thread currentThread();
-    method @Deprecated public void destroy();
-    method public static void dumpStack();
-    method public static int enumerate(Thread[]);
-    method @NonNull public static java.util.Map<java.lang.Thread,java.lang.StackTraceElement[]> getAllStackTraces();
-    method @Nullable public ClassLoader getContextClassLoader();
-    method @Nullable public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler();
-    method public long getId();
-    method @NonNull public final String getName();
-    method public final int getPriority();
-    method @NonNull public StackTraceElement[] getStackTrace();
-    method @NonNull public java.lang.Thread.State getState();
-    method @Nullable public final ThreadGroup getThreadGroup();
-    method @Nullable public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();
-    method public static boolean holdsLock(@NonNull Object);
-    method public void interrupt();
-    method public static boolean interrupted();
-    method public final boolean isAlive();
-    method public final boolean isDaemon();
-    method public boolean isInterrupted();
-    method public final void join(long) throws java.lang.InterruptedException;
-    method public final void join(long, int) throws java.lang.InterruptedException;
-    method public final void join() throws java.lang.InterruptedException;
-    method @Deprecated public final void resume();
-    method public void run();
-    method public void setContextClassLoader(@Nullable ClassLoader);
-    method public final void setDaemon(boolean);
-    method public static void setDefaultUncaughtExceptionHandler(@Nullable java.lang.Thread.UncaughtExceptionHandler);
-    method public final void setName(@NonNull String);
-    method public final void setPriority(int);
-    method public void setUncaughtExceptionHandler(@Nullable java.lang.Thread.UncaughtExceptionHandler);
-    method public static void sleep(long) throws java.lang.InterruptedException;
-    method public static void sleep(long, int) throws java.lang.InterruptedException;
-    method public void start();
-    method @Deprecated public final void stop();
-    method @Deprecated public final void stop(@Nullable Throwable);
-    method @Deprecated public final void suspend();
-    method public static void yield();
-    field public static final int MAX_PRIORITY = 10; // 0xa
-    field public static final int MIN_PRIORITY = 1; // 0x1
-    field public static final int NORM_PRIORITY = 5; // 0x5
-  }
-
-  public enum Thread.State {
-    enum_constant public static final java.lang.Thread.State BLOCKED;
-    enum_constant public static final java.lang.Thread.State NEW;
-    enum_constant public static final java.lang.Thread.State RUNNABLE;
-    enum_constant public static final java.lang.Thread.State TERMINATED;
-    enum_constant public static final java.lang.Thread.State TIMED_WAITING;
-    enum_constant public static final java.lang.Thread.State WAITING;
-  }
-
-  @java.lang.FunctionalInterface public static interface Thread.UncaughtExceptionHandler {
-    method public void uncaughtException(@NonNull Thread, @NonNull Throwable);
-  }
-
-  public class ThreadDeath extends java.lang.Error {
-    ctor public ThreadDeath();
-  }
-
-  public class ThreadGroup implements java.lang.Thread.UncaughtExceptionHandler {
-    ctor public ThreadGroup(String);
-    ctor public ThreadGroup(ThreadGroup, String);
-    method public int activeCount();
-    method public int activeGroupCount();
-    method @Deprecated public boolean allowThreadSuspension(boolean);
-    method public final void checkAccess();
-    method public final void destroy();
-    method public int enumerate(Thread[]);
-    method public int enumerate(Thread[], boolean);
-    method public int enumerate(ThreadGroup[]);
-    method public int enumerate(ThreadGroup[], boolean);
-    method public final int getMaxPriority();
-    method public final String getName();
-    method public final ThreadGroup getParent();
-    method public final void interrupt();
-    method public final boolean isDaemon();
-    method public boolean isDestroyed();
-    method public void list();
-    method public final boolean parentOf(ThreadGroup);
-    method @Deprecated public final void resume();
-    method public final void setDaemon(boolean);
-    method public final void setMaxPriority(int);
-    method @Deprecated public final void stop();
-    method @Deprecated public final void suspend();
-    method public void uncaughtException(Thread, Throwable);
-  }
-
-  public class ThreadLocal<T> {
-    ctor public ThreadLocal();
-    method @Nullable public T get();
-    method @Nullable protected T initialValue();
-    method public void remove();
-    method public void set(T);
-    method @NonNull public static <S> ThreadLocal<S> withInitial(@NonNull java.util.function.Supplier<? extends S>);
-  }
-
-  public class Throwable implements java.io.Serializable {
-    ctor public Throwable();
-    ctor public Throwable(@Nullable String);
-    ctor public Throwable(@Nullable String, @Nullable Throwable);
-    ctor public Throwable(@Nullable Throwable);
-    ctor protected Throwable(@Nullable String, @Nullable Throwable, boolean, boolean);
-    method public final void addSuppressed(@NonNull Throwable);
-    method @NonNull public Throwable fillInStackTrace();
-    method @Nullable public Throwable getCause();
-    method @Nullable public String getLocalizedMessage();
-    method @Nullable public String getMessage();
-    method @NonNull public StackTraceElement[] getStackTrace();
-    method @NonNull public final Throwable[] getSuppressed();
-    method @NonNull public Throwable initCause(@Nullable Throwable);
-    method public void printStackTrace();
-    method public void printStackTrace(@NonNull java.io.PrintStream);
-    method public void printStackTrace(@NonNull java.io.PrintWriter);
-    method public void setStackTrace(@NonNull StackTraceElement[]);
-  }
-
-  public class TypeNotPresentException extends java.lang.RuntimeException {
-    ctor public TypeNotPresentException(String, Throwable);
-    method public String typeName();
-  }
-
-  public class UnknownError extends java.lang.VirtualMachineError {
-    ctor public UnknownError();
-    ctor public UnknownError(String);
-  }
-
-  public class UnsatisfiedLinkError extends java.lang.LinkageError {
-    ctor public UnsatisfiedLinkError();
-    ctor public UnsatisfiedLinkError(String);
-  }
-
-  public class UnsupportedClassVersionError extends java.lang.ClassFormatError {
-    ctor public UnsupportedClassVersionError();
-    ctor public UnsupportedClassVersionError(String);
-  }
-
-  public class UnsupportedOperationException extends java.lang.RuntimeException {
-    ctor public UnsupportedOperationException();
-    ctor public UnsupportedOperationException(String);
-    ctor public UnsupportedOperationException(String, Throwable);
-    ctor public UnsupportedOperationException(Throwable);
-  }
-
-  public class VerifyError extends java.lang.LinkageError {
-    ctor public VerifyError();
-    ctor public VerifyError(String);
-  }
-
-  public abstract class VirtualMachineError extends java.lang.Error {
-    ctor public VirtualMachineError();
-    ctor public VirtualMachineError(String);
-    ctor public VirtualMachineError(String, Throwable);
-    ctor public VirtualMachineError(Throwable);
-  }
-
-  public final class Void {
-    field public static final Class<java.lang.Void> TYPE;
-  }
-
-}
-
-package java.lang.annotation {
-
-  public interface Annotation {
-    method public Class<? extends java.lang.annotation.Annotation> annotationType();
-    method public boolean equals(Object);
-    method public int hashCode();
-    method public String toString();
-  }
-
-  public class AnnotationFormatError extends java.lang.Error {
-    ctor public AnnotationFormatError(String);
-    ctor public AnnotationFormatError(String, Throwable);
-    ctor public AnnotationFormatError(Throwable);
-  }
-
-  public class AnnotationTypeMismatchException extends java.lang.RuntimeException {
-    ctor public AnnotationTypeMismatchException(java.lang.reflect.Method, String);
-    method public java.lang.reflect.Method element();
-    method public String foundType();
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.ANNOTATION_TYPE) public @interface Documented {
-  }
-
-  public enum ElementType {
-    enum_constant public static final java.lang.annotation.ElementType ANNOTATION_TYPE;
-    enum_constant public static final java.lang.annotation.ElementType CONSTRUCTOR;
-    enum_constant public static final java.lang.annotation.ElementType FIELD;
-    enum_constant public static final java.lang.annotation.ElementType LOCAL_VARIABLE;
-    enum_constant public static final java.lang.annotation.ElementType METHOD;
-    enum_constant public static final java.lang.annotation.ElementType PACKAGE;
-    enum_constant public static final java.lang.annotation.ElementType PARAMETER;
-    enum_constant public static final java.lang.annotation.ElementType TYPE;
-    enum_constant public static final java.lang.annotation.ElementType TYPE_PARAMETER;
-    enum_constant public static final java.lang.annotation.ElementType TYPE_USE;
-  }
-
-  public class IncompleteAnnotationException extends java.lang.RuntimeException {
-    ctor public IncompleteAnnotationException(Class<? extends java.lang.annotation.Annotation>, String);
-    method public Class<? extends java.lang.annotation.Annotation> annotationType();
-    method public String elementName();
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.ANNOTATION_TYPE) public @interface Inherited {
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @java.lang.annotation.Target(java.lang.annotation.ElementType.FIELD) public @interface Native {
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.ANNOTATION_TYPE) public @interface Repeatable {
-    method public abstract Class<? extends java.lang.annotation.Annotation> value();
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.ANNOTATION_TYPE) public @interface Retention {
-    method public abstract java.lang.annotation.RetentionPolicy value();
-  }
-
-  public enum RetentionPolicy {
-    enum_constant public static final java.lang.annotation.RetentionPolicy CLASS;
-    enum_constant public static final java.lang.annotation.RetentionPolicy RUNTIME;
-    enum_constant public static final java.lang.annotation.RetentionPolicy SOURCE;
-  }
-
-  @java.lang.annotation.Documented @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.ANNOTATION_TYPE) public @interface Target {
-    method public abstract java.lang.annotation.ElementType[] value();
-  }
-
-}
-
-package java.lang.invoke {
-
-  public abstract class CallSite {
-    method public abstract java.lang.invoke.MethodHandle dynamicInvoker();
-    method public abstract java.lang.invoke.MethodHandle getTarget();
-    method public abstract void setTarget(java.lang.invoke.MethodHandle);
-    method public java.lang.invoke.MethodType type();
-  }
-
-  public class ConstantCallSite extends java.lang.invoke.CallSite {
-    ctor public ConstantCallSite(java.lang.invoke.MethodHandle);
-    ctor protected ConstantCallSite(java.lang.invoke.MethodType, java.lang.invoke.MethodHandle) throws java.lang.Throwable;
-    method public final java.lang.invoke.MethodHandle dynamicInvoker();
-    method public final java.lang.invoke.MethodHandle getTarget();
-    method public final void setTarget(java.lang.invoke.MethodHandle);
-  }
-
-  public class LambdaConversionException extends java.lang.Exception {
-    ctor public LambdaConversionException();
-    ctor public LambdaConversionException(String);
-    ctor public LambdaConversionException(String, Throwable);
-    ctor public LambdaConversionException(Throwable);
-    ctor public LambdaConversionException(String, Throwable, boolean, boolean);
-  }
-
-  public abstract class MethodHandle {
-    method public java.lang.invoke.MethodHandle asCollector(Class<?>, int);
-    method public java.lang.invoke.MethodHandle asFixedArity();
-    method public java.lang.invoke.MethodHandle asSpreader(Class<?>, int);
-    method public java.lang.invoke.MethodHandle asType(java.lang.invoke.MethodType);
-    method public java.lang.invoke.MethodHandle asVarargsCollector(Class<?>);
-    method public java.lang.invoke.MethodHandle bindTo(Object);
-    method public final Object invoke(java.lang.Object...) throws java.lang.Throwable;
-    method public final Object invokeExact(java.lang.Object...) throws java.lang.Throwable;
-    method public Object invokeWithArguments(java.lang.Object...) throws java.lang.Throwable;
-    method public Object invokeWithArguments(java.util.List<?>) throws java.lang.Throwable;
-    method public boolean isVarargsCollector();
-    method public java.lang.invoke.MethodType type();
-  }
-
-  public interface MethodHandleInfo {
-    method public Class<?> getDeclaringClass();
-    method public java.lang.invoke.MethodType getMethodType();
-    method public int getModifiers();
-    method public String getName();
-    method public int getReferenceKind();
-    method public default boolean isVarArgs();
-    method @Deprecated public static boolean refKindIsField(int);
-    method @Deprecated public static boolean refKindIsValid(int);
-    method @Deprecated public static String refKindName(int);
-    method public static String referenceKindToString(int);
-    method public <T extends java.lang.reflect.Member> T reflectAs(Class<T>, java.lang.invoke.MethodHandles.Lookup);
-    method public static String toString(int, Class<?>, String, java.lang.invoke.MethodType);
-    field public static final int REF_getField = 1; // 0x1
-    field public static final int REF_getStatic = 2; // 0x2
-    field public static final int REF_invokeInterface = 9; // 0x9
-    field public static final int REF_invokeSpecial = 7; // 0x7
-    field public static final int REF_invokeStatic = 6; // 0x6
-    field public static final int REF_invokeVirtual = 5; // 0x5
-    field public static final int REF_newInvokeSpecial = 8; // 0x8
-    field public static final int REF_putField = 3; // 0x3
-    field public static final int REF_putStatic = 4; // 0x4
-  }
-
-  public class MethodHandles {
-    method public static java.lang.invoke.MethodHandle arrayElementGetter(Class<?>) throws java.lang.IllegalArgumentException;
-    method public static java.lang.invoke.MethodHandle arrayElementSetter(Class<?>) throws java.lang.IllegalArgumentException;
-    method public static java.lang.invoke.MethodHandle catchException(java.lang.invoke.MethodHandle, Class<? extends java.lang.Throwable>, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle collectArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle constant(Class<?>, Object);
-    method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, java.util.List<java.lang.Class<?>>);
-    method public static java.lang.invoke.MethodHandle dropArguments(java.lang.invoke.MethodHandle, int, Class<?>...);
-    method public static java.lang.invoke.MethodHandle exactInvoker(java.lang.invoke.MethodType);
-    method public static java.lang.invoke.MethodHandle explicitCastArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType);
-    method public static java.lang.invoke.MethodHandle filterArguments(java.lang.invoke.MethodHandle, int, java.lang.invoke.MethodHandle...);
-    method public static java.lang.invoke.MethodHandle filterReturnValue(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle foldArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle guardWithTest(java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle identity(Class<?>);
-    method public static java.lang.invoke.MethodHandle insertArguments(java.lang.invoke.MethodHandle, int, java.lang.Object...);
-    method public static java.lang.invoke.MethodHandle invoker(java.lang.invoke.MethodType);
-    method public static java.lang.invoke.MethodHandles.Lookup lookup();
-    method public static java.lang.invoke.MethodHandle permuteArguments(java.lang.invoke.MethodHandle, java.lang.invoke.MethodType, int...);
-    method public static java.lang.invoke.MethodHandles.Lookup publicLookup();
-    method public static <T extends java.lang.reflect.Member> T reflectAs(Class<T>, java.lang.invoke.MethodHandle);
-    method public static java.lang.invoke.MethodHandle spreadInvoker(java.lang.invoke.MethodType, int);
-    method public static java.lang.invoke.MethodHandle throwException(Class<?>, Class<? extends java.lang.Throwable>);
-  }
-
-  public static final class MethodHandles.Lookup {
-    method public java.lang.invoke.MethodHandle bind(Object, String, java.lang.invoke.MethodType) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException;
-    method public java.lang.invoke.MethodHandle findConstructor(Class<?>, java.lang.invoke.MethodType) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException;
-    method public java.lang.invoke.MethodHandle findGetter(Class<?>, String, Class<?>) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException;
-    method public java.lang.invoke.MethodHandle findSetter(Class<?>, String, Class<?>) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException;
-    method public java.lang.invoke.MethodHandle findSpecial(Class<?>, String, java.lang.invoke.MethodType, Class<?>) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException;
-    method public java.lang.invoke.MethodHandle findStatic(Class<?>, String, java.lang.invoke.MethodType) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException;
-    method public java.lang.invoke.MethodHandle findStaticGetter(Class<?>, String, Class<?>) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException;
-    method public java.lang.invoke.MethodHandle findStaticSetter(Class<?>, String, Class<?>) throws java.lang.IllegalAccessException, java.lang.NoSuchFieldException;
-    method public java.lang.invoke.MethodHandle findVirtual(Class<?>, String, java.lang.invoke.MethodType) throws java.lang.IllegalAccessException, java.lang.NoSuchMethodException;
-    method public java.lang.invoke.MethodHandles.Lookup in(Class<?>);
-    method public Class<?> lookupClass();
-    method public int lookupModes();
-    method public java.lang.invoke.MethodHandleInfo revealDirect(java.lang.invoke.MethodHandle);
-    method public java.lang.invoke.MethodHandle unreflect(java.lang.reflect.Method) throws java.lang.IllegalAccessException;
-    method public java.lang.invoke.MethodHandle unreflectConstructor(java.lang.reflect.Constructor<?>) throws java.lang.IllegalAccessException;
-    method public java.lang.invoke.MethodHandle unreflectGetter(java.lang.reflect.Field) throws java.lang.IllegalAccessException;
-    method public java.lang.invoke.MethodHandle unreflectSetter(java.lang.reflect.Field) throws java.lang.IllegalAccessException;
-    method public java.lang.invoke.MethodHandle unreflectSpecial(java.lang.reflect.Method, Class<?>) throws java.lang.IllegalAccessException;
-    field public static final int PACKAGE = 8; // 0x8
-    field public static final int PRIVATE = 2; // 0x2
-    field public static final int PROTECTED = 4; // 0x4
-    field public static final int PUBLIC = 1; // 0x1
-  }
-
-  public final class MethodType implements java.io.Serializable {
-    method public java.lang.invoke.MethodType appendParameterTypes(Class<?>...);
-    method public java.lang.invoke.MethodType appendParameterTypes(java.util.List<java.lang.Class<?>>);
-    method public java.lang.invoke.MethodType changeParameterType(int, Class<?>);
-    method public java.lang.invoke.MethodType changeReturnType(Class<?>);
-    method public java.lang.invoke.MethodType dropParameterTypes(int, int);
-    method public java.lang.invoke.MethodType erase();
-    method public static java.lang.invoke.MethodType fromMethodDescriptorString(String, ClassLoader) throws java.lang.IllegalArgumentException, java.lang.TypeNotPresentException;
-    method public java.lang.invoke.MethodType generic();
-    method public static java.lang.invoke.MethodType genericMethodType(int, boolean);
-    method public static java.lang.invoke.MethodType genericMethodType(int);
-    method public boolean hasPrimitives();
-    method public boolean hasWrappers();
-    method public java.lang.invoke.MethodType insertParameterTypes(int, Class<?>...);
-    method public java.lang.invoke.MethodType insertParameterTypes(int, java.util.List<java.lang.Class<?>>);
-    method public static java.lang.invoke.MethodType methodType(Class<?>, Class<?>[]);
-    method public static java.lang.invoke.MethodType methodType(Class<?>, java.util.List<java.lang.Class<?>>);
-    method public static java.lang.invoke.MethodType methodType(Class<?>, Class<?>, Class<?>...);
-    method public static java.lang.invoke.MethodType methodType(Class<?>);
-    method public static java.lang.invoke.MethodType methodType(Class<?>, Class<?>);
-    method public static java.lang.invoke.MethodType methodType(Class<?>, java.lang.invoke.MethodType);
-    method public Class<?>[] parameterArray();
-    method public int parameterCount();
-    method public java.util.List<java.lang.Class<?>> parameterList();
-    method public Class<?> parameterType(int);
-    method public Class<?> returnType();
-    method public String toMethodDescriptorString();
-    method public java.lang.invoke.MethodType unwrap();
-    method public java.lang.invoke.MethodType wrap();
-  }
-
-  public class MutableCallSite extends java.lang.invoke.CallSite {
-    ctor public MutableCallSite(java.lang.invoke.MethodType);
-    ctor public MutableCallSite(java.lang.invoke.MethodHandle);
-    method public final java.lang.invoke.MethodHandle dynamicInvoker();
-    method public final java.lang.invoke.MethodHandle getTarget();
-    method public void setTarget(java.lang.invoke.MethodHandle);
-  }
-
-  public class VolatileCallSite extends java.lang.invoke.CallSite {
-    ctor public VolatileCallSite(java.lang.invoke.MethodType);
-    ctor public VolatileCallSite(java.lang.invoke.MethodHandle);
-    method public final java.lang.invoke.MethodHandle dynamicInvoker();
-    method public final java.lang.invoke.MethodHandle getTarget();
-    method public void setTarget(java.lang.invoke.MethodHandle);
-  }
-
-  public class WrongMethodTypeException extends java.lang.RuntimeException {
-    ctor public WrongMethodTypeException();
-    ctor public WrongMethodTypeException(String);
-  }
-
-}
-
-package java.lang.ref {
-
-  public class PhantomReference<T> extends java.lang.ref.Reference<T> {
-    ctor public PhantomReference(T, java.lang.ref.ReferenceQueue<? super T>);
-  }
-
-  public abstract class Reference<T> {
-    method public void clear();
-    method public boolean enqueue();
-    method public T get();
-    method public boolean isEnqueued();
-    method public static void reachabilityFence(Object);
-  }
-
-  public class ReferenceQueue<T> {
-    ctor public ReferenceQueue();
-    method public java.lang.ref.Reference<? extends T> poll();
-    method public java.lang.ref.Reference<? extends T> remove(long) throws java.lang.IllegalArgumentException, java.lang.InterruptedException;
-    method public java.lang.ref.Reference<? extends T> remove() throws java.lang.InterruptedException;
-  }
-
-  public class SoftReference<T> extends java.lang.ref.Reference<T> {
-    ctor public SoftReference(T);
-    ctor public SoftReference(T, java.lang.ref.ReferenceQueue<? super T>);
-  }
-
-  public class WeakReference<T> extends java.lang.ref.Reference<T> {
-    ctor public WeakReference(T);
-    ctor public WeakReference(T, java.lang.ref.ReferenceQueue<? super T>);
-  }
-
-}
-
-package java.lang.reflect {
-
-  public class AccessibleObject implements java.lang.reflect.AnnotatedElement {
-    ctor protected AccessibleObject();
-    method @Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@NonNull Class<T>);
-    method @NonNull public java.lang.annotation.Annotation[] getAnnotations();
-    method @NonNull public java.lang.annotation.Annotation[] getDeclaredAnnotations();
-    method public boolean isAccessible();
-    method public static void setAccessible(java.lang.reflect.AccessibleObject[], boolean) throws java.lang.SecurityException;
-    method public void setAccessible(boolean) throws java.lang.SecurityException;
-  }
-
-  public interface AnnotatedElement {
-    method @Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@NonNull Class<T>);
-    method @NonNull public java.lang.annotation.Annotation[] getAnnotations();
-    method public default <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(@NonNull Class<T>);
-    method @Nullable public default <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(@NonNull Class<T>);
-    method @NonNull public java.lang.annotation.Annotation[] getDeclaredAnnotations();
-    method public default <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(@NonNull Class<T>);
-    method public default boolean isAnnotationPresent(@NonNull Class<? extends java.lang.annotation.Annotation>);
-  }
-
-  public final class Array {
-    method @Nullable public static Object get(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static boolean getBoolean(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static byte getByte(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static char getChar(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static double getDouble(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static float getFloat(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static int getInt(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static int getLength(@NonNull Object);
-    method public static long getLong(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static short getShort(@NonNull Object, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method @NonNull public static Object newInstance(@NonNull Class<?>, int) throws java.lang.NegativeArraySizeException;
-    method @NonNull public static Object newInstance(@NonNull Class<?>, int...) throws java.lang.IllegalArgumentException, java.lang.NegativeArraySizeException;
-    method public static void set(@NonNull Object, int, @Nullable Object) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setBoolean(@NonNull Object, int, boolean);
-    method public static void setByte(@NonNull Object, int, byte) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setChar(@NonNull Object, int, char) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setDouble(@NonNull Object, int, double) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setFloat(@NonNull Object, int, float) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setInt(@NonNull Object, int, int) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setLong(@NonNull Object, int, long) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-    method public static void setShort(@NonNull Object, int, short) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException;
-  }
-
-  public final class Constructor<T> extends java.lang.reflect.Executable {
-    method @NonNull public Class<T> getDeclaringClass();
-    method public Class<?>[] getExceptionTypes();
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method public java.lang.annotation.Annotation[][] getParameterAnnotations();
-    method @NonNull public Class<?>[] getParameterTypes();
-    method public java.lang.reflect.TypeVariable<java.lang.reflect.Constructor<T>>[] getTypeParameters();
-    method @NonNull public T newInstance(java.lang.Object...) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.reflect.InvocationTargetException;
-    method @NonNull public String toGenericString();
-  }
-
-  public abstract class Executable extends java.lang.reflect.AccessibleObject implements java.lang.reflect.GenericDeclaration java.lang.reflect.Member {
-    method @NonNull public abstract Class<?>[] getExceptionTypes();
-    method @NonNull public java.lang.reflect.Type[] getGenericExceptionTypes();
-    method @NonNull public java.lang.reflect.Type[] getGenericParameterTypes();
-    method @NonNull public abstract java.lang.annotation.Annotation[][] getParameterAnnotations();
-    method public int getParameterCount();
-    method @NonNull public abstract Class<?>[] getParameterTypes();
-    method @NonNull public java.lang.reflect.Parameter[] getParameters();
-    method public final boolean isAnnotationPresent(@NonNull Class<? extends java.lang.annotation.Annotation>);
-    method public boolean isSynthetic();
-    method public boolean isVarArgs();
-    method @NonNull public abstract String toGenericString();
-  }
-
-  public final class Field extends java.lang.reflect.AccessibleObject implements java.lang.reflect.Member {
-    method @Nullable public Object get(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public boolean getBoolean(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public byte getByte(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public char getChar(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method @NonNull public Class<?> getDeclaringClass();
-    method public double getDouble(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public float getFloat(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method @NonNull public java.lang.reflect.Type getGenericType();
-    method public int getInt(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public long getLong(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method public short getShort(@Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method @NonNull public Class<?> getType();
-    method public boolean isEnumConstant();
-    method public boolean isSynthetic();
-    method public void set(@Nullable Object, @Nullable Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setBoolean(@Nullable Object, boolean) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setByte(@Nullable Object, byte) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setChar(@Nullable Object, char) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setDouble(@Nullable Object, double) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setFloat(@Nullable Object, float) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setInt(@Nullable Object, int) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setLong(@Nullable Object, long) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method public void setShort(@Nullable Object, short) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException;
-    method @NonNull public String toGenericString();
-  }
-
-  public interface GenericArrayType extends java.lang.reflect.Type {
-    method @NonNull public java.lang.reflect.Type getGenericComponentType();
-  }
-
-  public interface GenericDeclaration extends java.lang.reflect.AnnotatedElement {
-    method @NonNull public java.lang.reflect.TypeVariable<?>[] getTypeParameters();
-  }
-
-  public class GenericSignatureFormatError extends java.lang.ClassFormatError {
-    ctor public GenericSignatureFormatError();
-    ctor public GenericSignatureFormatError(String);
-  }
-
-  public interface InvocationHandler {
-    method public Object invoke(Object, java.lang.reflect.Method, Object[]) throws java.lang.Throwable;
-  }
-
-  public class InvocationTargetException extends java.lang.ReflectiveOperationException {
-    ctor protected InvocationTargetException();
-    ctor public InvocationTargetException(Throwable);
-    ctor public InvocationTargetException(Throwable, String);
-    method public Throwable getTargetException();
-  }
-
-  public class MalformedParameterizedTypeException extends java.lang.RuntimeException {
-    ctor public MalformedParameterizedTypeException();
-  }
-
-  public class MalformedParametersException extends java.lang.RuntimeException {
-    ctor public MalformedParametersException();
-    ctor public MalformedParametersException(String);
-  }
-
-  public interface Member {
-    method @NonNull public Class<?> getDeclaringClass();
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method public boolean isSynthetic();
-    field public static final int DECLARED = 1; // 0x1
-    field public static final int PUBLIC = 0; // 0x0
-  }
-
-  public final class Method extends java.lang.reflect.Executable {
-    method @NonNull public Class<?> getDeclaringClass();
-    method @Nullable public Object getDefaultValue();
-    method @NonNull public Class<?>[] getExceptionTypes();
-    method @NonNull public java.lang.reflect.Type getGenericReturnType();
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method @NonNull public java.lang.annotation.Annotation[][] getParameterAnnotations();
-    method @NonNull public Class<?>[] getParameterTypes();
-    method @NonNull public Class<?> getReturnType();
-    method @NonNull public java.lang.reflect.TypeVariable<java.lang.reflect.Method>[] getTypeParameters();
-    method @Nullable public Object invoke(@Nullable Object, @Nullable java.lang.Object...) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException, java.lang.reflect.InvocationTargetException;
-    method public boolean isBridge();
-    method public boolean isDefault();
-    method @NonNull public String toGenericString();
-  }
-
-  public class Modifier {
-    ctor public Modifier();
-    method public static int classModifiers();
-    method public static int constructorModifiers();
-    method public static int fieldModifiers();
-    method public static int interfaceModifiers();
-    method public static boolean isAbstract(int);
-    method public static boolean isFinal(int);
-    method public static boolean isInterface(int);
-    method public static boolean isNative(int);
-    method public static boolean isPrivate(int);
-    method public static boolean isProtected(int);
-    method public static boolean isPublic(int);
-    method public static boolean isStatic(int);
-    method public static boolean isStrict(int);
-    method public static boolean isSynchronized(int);
-    method public static boolean isTransient(int);
-    method public static boolean isVolatile(int);
-    method public static int methodModifiers();
-    method public static int parameterModifiers();
-    method public static String toString(int);
-    field public static final int ABSTRACT = 1024; // 0x400
-    field public static final int FINAL = 16; // 0x10
-    field public static final int INTERFACE = 512; // 0x200
-    field public static final int NATIVE = 256; // 0x100
-    field public static final int PRIVATE = 2; // 0x2
-    field public static final int PROTECTED = 4; // 0x4
-    field public static final int PUBLIC = 1; // 0x1
-    field public static final int STATIC = 8; // 0x8
-    field public static final int STRICT = 2048; // 0x800
-    field public static final int SYNCHRONIZED = 32; // 0x20
-    field public static final int TRANSIENT = 128; // 0x80
-    field public static final int VOLATILE = 64; // 0x40
-  }
-
-  public final class Parameter implements java.lang.reflect.AnnotatedElement {
-    method @Nullable public <T extends java.lang.annotation.Annotation> T getAnnotation(@NonNull Class<T>);
-    method @NonNull public java.lang.annotation.Annotation[] getAnnotations();
-    method @NonNull public java.lang.annotation.Annotation[] getDeclaredAnnotations();
-    method @NonNull public java.lang.reflect.Executable getDeclaringExecutable();
-    method public int getModifiers();
-    method @NonNull public String getName();
-    method @NonNull public java.lang.reflect.Type getParameterizedType();
-    method @NonNull public Class<?> getType();
-    method public boolean isImplicit();
-    method public boolean isNamePresent();
-    method public boolean isSynthetic();
-    method public boolean isVarArgs();
-  }
-
-  public interface ParameterizedType extends java.lang.reflect.Type {
-    method @NonNull public java.lang.reflect.Type[] getActualTypeArguments();
-    method @Nullable public java.lang.reflect.Type getOwnerType();
-    method @NonNull public java.lang.reflect.Type getRawType();
-  }
-
-  public class Proxy implements java.io.Serializable {
-    ctor protected Proxy(@NonNull java.lang.reflect.InvocationHandler);
-    method @NonNull public static java.lang.reflect.InvocationHandler getInvocationHandler(@NonNull Object) throws java.lang.IllegalArgumentException;
-    method @NonNull public static Class<?> getProxyClass(@Nullable ClassLoader, @NonNull Class<?>...) throws java.lang.IllegalArgumentException;
-    method public static boolean isProxyClass(@NonNull Class<?>);
-    method @NonNull public static Object newProxyInstance(@Nullable ClassLoader, @NonNull Class<?>[], @NonNull java.lang.reflect.InvocationHandler) throws java.lang.IllegalArgumentException;
-    field protected java.lang.reflect.InvocationHandler h;
-  }
-
-  public final class ReflectPermission extends java.security.BasicPermission {
-    ctor public ReflectPermission(String);
-    ctor public ReflectPermission(String, String);
-  }
-
-  public interface Type {
-    method @NonNull public default String getTypeName();
-  }
-
-  public interface TypeVariable<D extends java.lang.reflect.GenericDeclaration> extends java.lang.reflect.Type {
-    method @NonNull public java.lang.reflect.Type[] getBounds();
-    method @NonNull public D getGenericDeclaration();
-    method @NonNull public String getName();
-  }
-
-  public class UndeclaredThrowableException extends java.lang.RuntimeException {
-    ctor public UndeclaredThrowableException(Throwable);
-    ctor public UndeclaredThrowableException(Throwable, String);
-    method public Throwable getUndeclaredThrowable();
-  }
-
-  public interface WildcardType extends java.lang.reflect.Type {
-    method @NonNull public java.lang.reflect.Type[] getLowerBounds();
-    method @NonNull public java.lang.reflect.Type[] getUpperBounds();
-  }
-
-}
-
-package java.math {
-
-  public class BigDecimal extends java.lang.Number implements java.lang.Comparable<java.math.BigDecimal> {
-    ctor public BigDecimal(char[], int, int);
-    ctor public BigDecimal(char[], int, int, java.math.MathContext);
-    ctor public BigDecimal(char[]);
-    ctor public BigDecimal(char[], java.math.MathContext);
-    ctor public BigDecimal(String);
-    ctor public BigDecimal(String, java.math.MathContext);
-    ctor public BigDecimal(double);
-    ctor public BigDecimal(double, java.math.MathContext);
-    ctor public BigDecimal(java.math.BigInteger);
-    ctor public BigDecimal(java.math.BigInteger, java.math.MathContext);
-    ctor public BigDecimal(java.math.BigInteger, int);
-    ctor public BigDecimal(java.math.BigInteger, int, java.math.MathContext);
-    ctor public BigDecimal(int);
-    ctor public BigDecimal(int, java.math.MathContext);
-    ctor public BigDecimal(long);
-    ctor public BigDecimal(long, java.math.MathContext);
-    method public java.math.BigDecimal abs();
-    method public java.math.BigDecimal abs(java.math.MathContext);
-    method public java.math.BigDecimal add(java.math.BigDecimal);
-    method public java.math.BigDecimal add(java.math.BigDecimal, java.math.MathContext);
-    method public byte byteValueExact();
-    method public int compareTo(java.math.BigDecimal);
-    method public java.math.BigDecimal divide(java.math.BigDecimal, int, int);
-    method public java.math.BigDecimal divide(java.math.BigDecimal, int, java.math.RoundingMode);
-    method public java.math.BigDecimal divide(java.math.BigDecimal, int);
-    method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.RoundingMode);
-    method public java.math.BigDecimal divide(java.math.BigDecimal);
-    method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.MathContext);
-    method public java.math.BigDecimal[] divideAndRemainder(java.math.BigDecimal);
-    method public java.math.BigDecimal[] divideAndRemainder(java.math.BigDecimal, java.math.MathContext);
-    method public java.math.BigDecimal divideToIntegralValue(java.math.BigDecimal);
-    method public java.math.BigDecimal divideToIntegralValue(java.math.BigDecimal, java.math.MathContext);
-    method public double doubleValue();
-    method public float floatValue();
-    method public int intValue();
-    method public int intValueExact();
-    method public long longValue();
-    method public long longValueExact();
-    method public java.math.BigDecimal max(java.math.BigDecimal);
-    method public java.math.BigDecimal min(java.math.BigDecimal);
-    method public java.math.BigDecimal movePointLeft(int);
-    method public java.math.BigDecimal movePointRight(int);
-    method public java.math.BigDecimal multiply(java.math.BigDecimal);
-    method public java.math.BigDecimal multiply(java.math.BigDecimal, java.math.MathContext);
-    method public java.math.BigDecimal negate();
-    method public java.math.BigDecimal negate(java.math.MathContext);
-    method public java.math.BigDecimal plus();
-    method public java.math.BigDecimal plus(java.math.MathContext);
-    method public java.math.BigDecimal pow(int);
-    method public java.math.BigDecimal pow(int, java.math.MathContext);
-    method public int precision();
-    method public java.math.BigDecimal remainder(java.math.BigDecimal);
-    method public java.math.BigDecimal remainder(java.math.BigDecimal, java.math.MathContext);
-    method public java.math.BigDecimal round(java.math.MathContext);
-    method public int scale();
-    method public java.math.BigDecimal scaleByPowerOfTen(int);
-    method public java.math.BigDecimal setScale(int, java.math.RoundingMode);
-    method public java.math.BigDecimal setScale(int, int);
-    method public java.math.BigDecimal setScale(int);
-    method public short shortValueExact();
-    method public int signum();
-    method public java.math.BigDecimal stripTrailingZeros();
-    method public java.math.BigDecimal subtract(java.math.BigDecimal);
-    method public java.math.BigDecimal subtract(java.math.BigDecimal, java.math.MathContext);
-    method public java.math.BigInteger toBigInteger();
-    method public java.math.BigInteger toBigIntegerExact();
-    method public String toEngineeringString();
-    method public String toPlainString();
-    method public java.math.BigDecimal ulp();
-    method public java.math.BigInteger unscaledValue();
-    method public static java.math.BigDecimal valueOf(long, int);
-    method public static java.math.BigDecimal valueOf(long);
-    method public static java.math.BigDecimal valueOf(double);
-    field public static final java.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 java.math.BigDecimal TEN;
-    field public static final java.math.BigDecimal ZERO;
-  }
-
-  public class BigInteger extends java.lang.Number implements java.lang.Comparable<java.math.BigInteger> {
-    ctor public BigInteger(byte[]);
-    ctor public BigInteger(int, byte[]);
-    ctor public BigInteger(@NonNull String, int);
-    ctor public BigInteger(@NonNull String);
-    ctor public BigInteger(int, @NonNull java.util.Random);
-    ctor public BigInteger(int, int, @NonNull java.util.Random);
-    method @NonNull public java.math.BigInteger abs();
-    method @NonNull public java.math.BigInteger add(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger and(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger andNot(@NonNull java.math.BigInteger);
-    method public int bitCount();
-    method public int bitLength();
-    method public byte byteValueExact();
-    method @NonNull public java.math.BigInteger clearBit(int);
-    method public int compareTo(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger divide(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger[] divideAndRemainder(@NonNull java.math.BigInteger);
-    method public double doubleValue();
-    method @NonNull public java.math.BigInteger flipBit(int);
-    method public float floatValue();
-    method @NonNull public java.math.BigInteger gcd(@NonNull java.math.BigInteger);
-    method public int getLowestSetBit();
-    method public int intValue();
-    method public int intValueExact();
-    method public boolean isProbablePrime(int);
-    method public long longValue();
-    method public long longValueExact();
-    method @NonNull public java.math.BigInteger max(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger min(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger mod(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger modInverse(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger modPow(@NonNull java.math.BigInteger, @NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger multiply(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger negate();
-    method @NonNull public java.math.BigInteger nextProbablePrime();
-    method @NonNull public java.math.BigInteger not();
-    method @NonNull public java.math.BigInteger or(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger pow(int);
-    method @NonNull public static java.math.BigInteger probablePrime(int, @NonNull java.util.Random);
-    method @NonNull public java.math.BigInteger remainder(@NonNull java.math.BigInteger);
-    method @NonNull public java.math.BigInteger setBit(int);
-    method @NonNull public java.math.BigInteger shiftLeft(int);
-    method @NonNull public java.math.BigInteger shiftRight(int);
-    method public short shortValueExact();
-    method public int signum();
-    method @NonNull public java.math.BigInteger subtract(@NonNull java.math.BigInteger);
-    method public boolean testBit(int);
-    method public byte[] toByteArray();
-    method @NonNull public String toString(int);
-    method @NonNull public static java.math.BigInteger valueOf(long);
-    method @NonNull public java.math.BigInteger xor(@NonNull java.math.BigInteger);
-    field @NonNull public static final java.math.BigInteger ONE;
-    field @NonNull public static final java.math.BigInteger TEN;
-    field @NonNull public static final java.math.BigInteger ZERO;
-  }
-
-  public final class MathContext implements java.io.Serializable {
-    ctor public MathContext(int);
-    ctor public MathContext(int, java.math.RoundingMode);
-    ctor public MathContext(String);
-    method public int getPrecision();
-    method public java.math.RoundingMode getRoundingMode();
-    field public static final java.math.MathContext DECIMAL128;
-    field public static final java.math.MathContext DECIMAL32;
-    field public static final java.math.MathContext DECIMAL64;
-    field public static final java.math.MathContext UNLIMITED;
-  }
-
-  public enum RoundingMode {
-    method public static java.math.RoundingMode valueOf(int);
-    enum_constant public static final java.math.RoundingMode CEILING;
-    enum_constant public static final java.math.RoundingMode DOWN;
-    enum_constant public static final java.math.RoundingMode FLOOR;
-    enum_constant public static final java.math.RoundingMode HALF_DOWN;
-    enum_constant public static final java.math.RoundingMode HALF_EVEN;
-    enum_constant public static final java.math.RoundingMode HALF_UP;
-    enum_constant public static final java.math.RoundingMode UNNECESSARY;
-    enum_constant public static final java.math.RoundingMode UP;
-  }
-
-}
-
-package java.net {
-
-  public abstract class Authenticator {
-    ctor public Authenticator();
-    method protected java.net.PasswordAuthentication getPasswordAuthentication();
-    method protected final String getRequestingHost();
-    method protected final int getRequestingPort();
-    method protected final String getRequestingPrompt();
-    method protected final String getRequestingProtocol();
-    method protected final String getRequestingScheme();
-    method protected final java.net.InetAddress getRequestingSite();
-    method protected java.net.URL getRequestingURL();
-    method protected java.net.Authenticator.RequestorType getRequestorType();
-    method public static java.net.PasswordAuthentication requestPasswordAuthentication(java.net.InetAddress, int, String, String, String);
-    method public static java.net.PasswordAuthentication requestPasswordAuthentication(String, java.net.InetAddress, int, String, String, String);
-    method public static java.net.PasswordAuthentication requestPasswordAuthentication(String, java.net.InetAddress, int, String, String, String, java.net.URL, java.net.Authenticator.RequestorType);
-    method public static void setDefault(java.net.Authenticator);
-  }
-
-  public enum Authenticator.RequestorType {
-    enum_constant public static final java.net.Authenticator.RequestorType PROXY;
-    enum_constant public static final java.net.Authenticator.RequestorType SERVER;
-  }
-
-  public class BindException extends java.net.SocketException {
-    ctor public BindException(String);
-    ctor public BindException();
-  }
-
-  public abstract class CacheRequest {
-    ctor public CacheRequest();
-    method public abstract void abort();
-    method public abstract java.io.OutputStream getBody() throws java.io.IOException;
-  }
-
-  public abstract class CacheResponse {
-    ctor public CacheResponse();
-    method public abstract java.io.InputStream getBody() throws java.io.IOException;
-    method public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders() throws java.io.IOException;
-  }
-
-  public class ConnectException extends java.net.SocketException {
-    ctor public ConnectException(String);
-    ctor public ConnectException();
-  }
-
-  public abstract class ContentHandler {
-    ctor public ContentHandler();
-    method public abstract Object getContent(java.net.URLConnection) throws java.io.IOException;
-    method public Object getContent(java.net.URLConnection, Class[]) throws java.io.IOException;
-  }
-
-  public interface ContentHandlerFactory {
-    method public java.net.ContentHandler createContentHandler(String);
-  }
-
-  public abstract class CookieHandler {
-    ctor public CookieHandler();
-    method public abstract java.util.Map<java.lang.String,java.util.List<java.lang.String>> get(java.net.URI, java.util.Map<java.lang.String,java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public static java.net.CookieHandler getDefault();
-    method public abstract void put(java.net.URI, java.util.Map<java.lang.String,java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public static void setDefault(java.net.CookieHandler);
-  }
-
-  public class CookieManager extends java.net.CookieHandler {
-    ctor public CookieManager();
-    ctor public CookieManager(java.net.CookieStore, java.net.CookiePolicy);
-    method public java.util.Map<java.lang.String,java.util.List<java.lang.String>> get(java.net.URI, java.util.Map<java.lang.String,java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public java.net.CookieStore getCookieStore();
-    method public void put(java.net.URI, java.util.Map<java.lang.String,java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public void setCookiePolicy(java.net.CookiePolicy);
-  }
-
-  public interface CookiePolicy {
-    method public boolean shouldAccept(java.net.URI, java.net.HttpCookie);
-    field public static final java.net.CookiePolicy ACCEPT_ALL;
-    field public static final java.net.CookiePolicy ACCEPT_NONE;
-    field public static final java.net.CookiePolicy ACCEPT_ORIGINAL_SERVER;
-  }
-
-  public interface CookieStore {
-    method public void add(java.net.URI, java.net.HttpCookie);
-    method public java.util.List<java.net.HttpCookie> get(java.net.URI);
-    method public java.util.List<java.net.HttpCookie> getCookies();
-    method public java.util.List<java.net.URI> getURIs();
-    method public boolean remove(java.net.URI, java.net.HttpCookie);
-    method public boolean removeAll();
-  }
-
-  public final class DatagramPacket {
-    ctor public DatagramPacket(byte[], int, int);
-    ctor public DatagramPacket(byte[], int);
-    ctor public DatagramPacket(byte[], int, int, java.net.InetAddress, int);
-    ctor public DatagramPacket(byte[], int, int, java.net.SocketAddress);
-    ctor public DatagramPacket(byte[], int, java.net.InetAddress, int);
-    ctor public DatagramPacket(byte[], int, java.net.SocketAddress);
-    method public java.net.InetAddress getAddress();
-    method public byte[] getData();
-    method public int getLength();
-    method public int getOffset();
-    method public int getPort();
-    method public java.net.SocketAddress getSocketAddress();
-    method public void setAddress(java.net.InetAddress);
-    method public void setData(byte[], int, int);
-    method public void setData(byte[]);
-    method public void setLength(int);
-    method public void setPort(int);
-    method public void setSocketAddress(java.net.SocketAddress);
-  }
-
-  public class DatagramSocket implements java.io.Closeable {
-    ctor public DatagramSocket() throws java.net.SocketException;
-    ctor protected DatagramSocket(java.net.DatagramSocketImpl);
-    ctor public DatagramSocket(java.net.SocketAddress) throws java.net.SocketException;
-    ctor public DatagramSocket(int) throws java.net.SocketException;
-    ctor public DatagramSocket(int, java.net.InetAddress) throws java.net.SocketException;
-    method public void bind(java.net.SocketAddress) throws java.net.SocketException;
-    method public void close();
-    method public void connect(java.net.InetAddress, int);
-    method public void connect(java.net.SocketAddress) throws java.net.SocketException;
-    method public void disconnect();
-    method public boolean getBroadcast() throws java.net.SocketException;
-    method public java.nio.channels.DatagramChannel getChannel();
-    method public java.net.InetAddress getInetAddress();
-    method public java.net.InetAddress getLocalAddress();
-    method public int getLocalPort();
-    method public java.net.SocketAddress getLocalSocketAddress();
-    method public int getPort();
-    method public int getReceiveBufferSize() throws java.net.SocketException;
-    method public java.net.SocketAddress getRemoteSocketAddress();
-    method public boolean getReuseAddress() throws java.net.SocketException;
-    method public int getSendBufferSize() throws java.net.SocketException;
-    method public int getSoTimeout() throws java.net.SocketException;
-    method public int getTrafficClass() throws java.net.SocketException;
-    method public boolean isBound();
-    method public boolean isClosed();
-    method public boolean isConnected();
-    method public void receive(java.net.DatagramPacket) throws java.io.IOException;
-    method public void send(java.net.DatagramPacket) throws java.io.IOException;
-    method public void setBroadcast(boolean) throws java.net.SocketException;
-    method public static void setDatagramSocketImplFactory(java.net.DatagramSocketImplFactory) throws java.io.IOException;
-    method public void setReceiveBufferSize(int) throws java.net.SocketException;
-    method public void setReuseAddress(boolean) throws java.net.SocketException;
-    method public void setSendBufferSize(int) throws java.net.SocketException;
-    method public void setSoTimeout(int) throws java.net.SocketException;
-    method public void setTrafficClass(int) throws java.net.SocketException;
-  }
-
-  public abstract class DatagramSocketImpl implements java.net.SocketOptions {
-    ctor public DatagramSocketImpl();
-    method protected abstract void bind(int, java.net.InetAddress) throws java.net.SocketException;
-    method protected abstract void close();
-    method protected void connect(java.net.InetAddress, int) throws java.net.SocketException;
-    method protected abstract void create() throws java.net.SocketException;
-    method protected void disconnect();
-    method protected java.io.FileDescriptor getFileDescriptor();
-    method protected int getLocalPort();
-    method @Deprecated protected abstract byte getTTL() throws java.io.IOException;
-    method protected abstract int getTimeToLive() throws java.io.IOException;
-    method protected abstract void join(java.net.InetAddress) throws java.io.IOException;
-    method protected abstract void joinGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
-    method protected abstract void leave(java.net.InetAddress) throws java.io.IOException;
-    method protected abstract void leaveGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
-    method protected abstract int peek(java.net.InetAddress) throws java.io.IOException;
-    method protected abstract int peekData(java.net.DatagramPacket) throws java.io.IOException;
-    method protected abstract void receive(java.net.DatagramPacket) throws java.io.IOException;
-    method protected abstract void send(java.net.DatagramPacket) throws java.io.IOException;
-    method @Deprecated protected abstract void setTTL(byte) throws java.io.IOException;
-    method protected abstract void setTimeToLive(int) throws java.io.IOException;
-    field protected java.io.FileDescriptor fd;
-    field protected int localPort;
-  }
-
-  public interface DatagramSocketImplFactory {
-    method public java.net.DatagramSocketImpl createDatagramSocketImpl();
-  }
-
-  public interface FileNameMap {
-    method public String getContentTypeFor(String);
-  }
-
-  public final class HttpCookie implements java.lang.Cloneable {
-    ctor public HttpCookie(String, String);
-    method public Object clone();
-    method public static boolean domainMatches(String, String);
-    method public String getComment();
-    method public String getCommentURL();
-    method public boolean getDiscard();
-    method public String getDomain();
-    method public long getMaxAge();
-    method public String getName();
-    method public String getPath();
-    method public String getPortlist();
-    method public boolean getSecure();
-    method public String getValue();
-    method public int getVersion();
-    method public boolean hasExpired();
-    method public boolean isHttpOnly();
-    method public static java.util.List<java.net.HttpCookie> parse(String);
-    method public void setComment(String);
-    method public void setCommentURL(String);
-    method public void setDiscard(boolean);
-    method public void setDomain(String);
-    method public void setHttpOnly(boolean);
-    method public void setMaxAge(long);
-    method public void setPath(String);
-    method public void setPortlist(String);
-    method public void setSecure(boolean);
-    method public void setValue(String);
-    method public void setVersion(int);
-  }
-
-  public class HttpRetryException extends java.io.IOException {
-    ctor public HttpRetryException(String, int);
-    ctor public HttpRetryException(String, int, String);
-    method public String getLocation();
-    method public String getReason();
-    method public int responseCode();
-  }
-
-  public abstract class HttpURLConnection extends java.net.URLConnection {
-    ctor protected HttpURLConnection(java.net.URL);
-    method public abstract void disconnect();
-    method public java.io.InputStream getErrorStream();
-    method public static boolean getFollowRedirects();
-    method public boolean getInstanceFollowRedirects();
-    method public String getRequestMethod();
-    method public int getResponseCode() throws java.io.IOException;
-    method public String getResponseMessage() throws java.io.IOException;
-    method public void setChunkedStreamingMode(int);
-    method public void setFixedLengthStreamingMode(int);
-    method public void setFixedLengthStreamingMode(long);
-    method public static void setFollowRedirects(boolean);
-    method public void setInstanceFollowRedirects(boolean);
-    method public void setRequestMethod(String) throws java.net.ProtocolException;
-    method public abstract boolean usingProxy();
-    field public static final int HTTP_ACCEPTED = 202; // 0xca
-    field public static final int HTTP_BAD_GATEWAY = 502; // 0x1f6
-    field public static final int HTTP_BAD_METHOD = 405; // 0x195
-    field public static final int HTTP_BAD_REQUEST = 400; // 0x190
-    field public static final int HTTP_CLIENT_TIMEOUT = 408; // 0x198
-    field public static final int HTTP_CONFLICT = 409; // 0x199
-    field public static final int HTTP_CREATED = 201; // 0xc9
-    field public static final int HTTP_ENTITY_TOO_LARGE = 413; // 0x19d
-    field public static final int HTTP_FORBIDDEN = 403; // 0x193
-    field public static final int HTTP_GATEWAY_TIMEOUT = 504; // 0x1f8
-    field public static final int HTTP_GONE = 410; // 0x19a
-    field public static final int HTTP_INTERNAL_ERROR = 500; // 0x1f4
-    field public static final int HTTP_LENGTH_REQUIRED = 411; // 0x19b
-    field public static final int HTTP_MOVED_PERM = 301; // 0x12d
-    field public static final int HTTP_MOVED_TEMP = 302; // 0x12e
-    field public static final int HTTP_MULT_CHOICE = 300; // 0x12c
-    field public static final int HTTP_NOT_ACCEPTABLE = 406; // 0x196
-    field public static final int HTTP_NOT_AUTHORITATIVE = 203; // 0xcb
-    field public static final int HTTP_NOT_FOUND = 404; // 0x194
-    field public static final int HTTP_NOT_IMPLEMENTED = 501; // 0x1f5
-    field public static final int HTTP_NOT_MODIFIED = 304; // 0x130
-    field public static final int HTTP_NO_CONTENT = 204; // 0xcc
-    field public static final int HTTP_OK = 200; // 0xc8
-    field public static final int HTTP_PARTIAL = 206; // 0xce
-    field public static final int HTTP_PAYMENT_REQUIRED = 402; // 0x192
-    field public static final int HTTP_PRECON_FAILED = 412; // 0x19c
-    field public static final int HTTP_PROXY_AUTH = 407; // 0x197
-    field public static final int HTTP_REQ_TOO_LONG = 414; // 0x19e
-    field public static final int HTTP_RESET = 205; // 0xcd
-    field public static final int HTTP_SEE_OTHER = 303; // 0x12f
-    field @Deprecated public static final int HTTP_SERVER_ERROR = 500; // 0x1f4
-    field public static final int HTTP_UNAUTHORIZED = 401; // 0x191
-    field public static final int HTTP_UNAVAILABLE = 503; // 0x1f7
-    field public static final int HTTP_UNSUPPORTED_TYPE = 415; // 0x19f
-    field public static final int HTTP_USE_PROXY = 305; // 0x131
-    field public static final int HTTP_VERSION = 505; // 0x1f9
-    field protected int chunkLength;
-    field protected int fixedContentLength;
-    field protected long fixedContentLengthLong;
-    field protected boolean instanceFollowRedirects;
-    field protected String method;
-    field protected int responseCode;
-    field protected String responseMessage;
-  }
-
-  public final class IDN {
-    method public static String toASCII(String, int);
-    method public static String toASCII(String);
-    method public static String toUnicode(String, int);
-    method public static String toUnicode(String);
-    field public static final int ALLOW_UNASSIGNED = 1; // 0x1
-    field public static final int USE_STD3_ASCII_RULES = 2; // 0x2
-  }
-
-  public final class Inet4Address extends java.net.InetAddress {
-  }
-
-  public final class Inet6Address extends java.net.InetAddress {
-    method public static java.net.Inet6Address getByAddress(String, byte[], java.net.NetworkInterface) throws java.net.UnknownHostException;
-    method public static java.net.Inet6Address getByAddress(String, byte[], int) throws java.net.UnknownHostException;
-    method public int getScopeId();
-    method public java.net.NetworkInterface getScopedInterface();
-    method public boolean isIPv4CompatibleAddress();
-  }
-
-  public class InetAddress implements java.io.Serializable {
-    method public byte[] getAddress();
-    method public static java.net.InetAddress[] getAllByName(String) throws java.net.UnknownHostException;
-    method public static java.net.InetAddress getByAddress(String, byte[]) throws java.net.UnknownHostException;
-    method public static java.net.InetAddress getByAddress(byte[]) throws java.net.UnknownHostException;
-    method public static java.net.InetAddress getByName(String) throws java.net.UnknownHostException;
-    method public String getCanonicalHostName();
-    method public String getHostAddress();
-    method public String getHostName();
-    method public static java.net.InetAddress getLocalHost() throws java.net.UnknownHostException;
-    method public static java.net.InetAddress getLoopbackAddress();
-    method public boolean isAnyLocalAddress();
-    method public boolean isLinkLocalAddress();
-    method public boolean isLoopbackAddress();
-    method public boolean isMCGlobal();
-    method public boolean isMCLinkLocal();
-    method public boolean isMCNodeLocal();
-    method public boolean isMCOrgLocal();
-    method public boolean isMCSiteLocal();
-    method public boolean isMulticastAddress();
-    method public boolean isReachable(int) throws java.io.IOException;
-    method public boolean isReachable(java.net.NetworkInterface, int, int) throws java.io.IOException;
-    method public boolean isSiteLocalAddress();
-  }
-
-  public class InetSocketAddress extends java.net.SocketAddress {
-    ctor public InetSocketAddress(int);
-    ctor public InetSocketAddress(java.net.InetAddress, int);
-    ctor public InetSocketAddress(String, int);
-    method public static java.net.InetSocketAddress createUnresolved(String, int);
-    method public final boolean equals(Object);
-    method public final java.net.InetAddress getAddress();
-    method public final String getHostName();
-    method public final String getHostString();
-    method public final int getPort();
-    method public final int hashCode();
-    method public final boolean isUnresolved();
-  }
-
-  public class InterfaceAddress {
-    method public java.net.InetAddress getAddress();
-    method public java.net.InetAddress getBroadcast();
-    method public short getNetworkPrefixLength();
-  }
-
-  public abstract class JarURLConnection extends java.net.URLConnection {
-    ctor protected JarURLConnection(java.net.URL) throws java.net.MalformedURLException;
-    method public java.util.jar.Attributes getAttributes() throws java.io.IOException;
-    method public java.security.cert.Certificate[] getCertificates() throws java.io.IOException;
-    method public String getEntryName();
-    method public java.util.jar.JarEntry getJarEntry() throws java.io.IOException;
-    method public abstract java.util.jar.JarFile getJarFile() throws java.io.IOException;
-    method public java.net.URL getJarFileURL();
-    method public java.util.jar.Attributes getMainAttributes() throws java.io.IOException;
-    method public java.util.jar.Manifest getManifest() throws java.io.IOException;
-    field protected java.net.URLConnection jarFileURLConnection;
-  }
-
-  public class MalformedURLException extends java.io.IOException {
-    ctor public MalformedURLException();
-    ctor public MalformedURLException(String);
-  }
-
-  public class MulticastSocket extends java.net.DatagramSocket {
-    ctor public MulticastSocket() throws java.io.IOException;
-    ctor public MulticastSocket(int) throws java.io.IOException;
-    ctor public MulticastSocket(java.net.SocketAddress) throws java.io.IOException;
-    method public java.net.InetAddress getInterface() throws java.net.SocketException;
-    method public boolean getLoopbackMode() throws java.net.SocketException;
-    method public java.net.NetworkInterface getNetworkInterface() throws java.net.SocketException;
-    method @Deprecated public byte getTTL() throws java.io.IOException;
-    method public int getTimeToLive() throws java.io.IOException;
-    method public void joinGroup(java.net.InetAddress) throws java.io.IOException;
-    method public void joinGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
-    method public void leaveGroup(java.net.InetAddress) throws java.io.IOException;
-    method public void leaveGroup(java.net.SocketAddress, java.net.NetworkInterface) throws java.io.IOException;
-    method @Deprecated public void send(java.net.DatagramPacket, byte) throws java.io.IOException;
-    method public void setInterface(java.net.InetAddress) throws java.net.SocketException;
-    method public void setLoopbackMode(boolean) throws java.net.SocketException;
-    method public void setNetworkInterface(java.net.NetworkInterface) throws java.net.SocketException;
-    method @Deprecated public void setTTL(byte) throws java.io.IOException;
-    method public void setTimeToLive(int) throws java.io.IOException;
-  }
-
-  public final class NetPermission extends java.security.BasicPermission {
-    ctor public NetPermission(String);
-    ctor public NetPermission(String, String);
-  }
-
-  public final class NetworkInterface {
-    method public static java.net.NetworkInterface getByIndex(int) throws java.net.SocketException;
-    method public static java.net.NetworkInterface getByInetAddress(java.net.InetAddress) throws java.net.SocketException;
-    method public static java.net.NetworkInterface getByName(String) throws java.net.SocketException;
-    method public String getDisplayName();
-    method public byte[] getHardwareAddress() throws java.net.SocketException;
-    method public int getIndex();
-    method public java.util.Enumeration<java.net.InetAddress> getInetAddresses();
-    method public java.util.List<java.net.InterfaceAddress> getInterfaceAddresses();
-    method public int getMTU() throws java.net.SocketException;
-    method public String getName();
-    method public static java.util.Enumeration<java.net.NetworkInterface> getNetworkInterfaces() throws java.net.SocketException;
-    method public java.net.NetworkInterface getParent();
-    method public java.util.Enumeration<java.net.NetworkInterface> getSubInterfaces();
-    method public boolean isLoopback() throws java.net.SocketException;
-    method public boolean isPointToPoint() throws java.net.SocketException;
-    method public boolean isUp() throws java.net.SocketException;
-    method public boolean isVirtual();
-    method public boolean supportsMulticast() throws java.net.SocketException;
-  }
-
-  public class NoRouteToHostException extends java.net.SocketException {
-    ctor public NoRouteToHostException(String);
-    ctor public NoRouteToHostException();
-  }
-
-  public final class PasswordAuthentication {
-    ctor public PasswordAuthentication(String, char[]);
-    method public char[] getPassword();
-    method public String getUserName();
-  }
-
-  public class PortUnreachableException extends java.net.SocketException {
-    ctor public PortUnreachableException(String);
-    ctor public PortUnreachableException();
-  }
-
-  public class ProtocolException extends java.io.IOException {
-    ctor public ProtocolException(String);
-    ctor public ProtocolException();
-  }
-
-  public interface ProtocolFamily {
-    method public String name();
-  }
-
-  public class Proxy {
-    ctor public Proxy(java.net.Proxy.Type, java.net.SocketAddress);
-    method public java.net.SocketAddress address();
-    method public final boolean equals(Object);
-    method public final int hashCode();
-    method public java.net.Proxy.Type type();
-    field public static final java.net.Proxy NO_PROXY;
-  }
-
-  public enum Proxy.Type {
-    enum_constant public static final java.net.Proxy.Type DIRECT;
-    enum_constant public static final java.net.Proxy.Type HTTP;
-    enum_constant public static final java.net.Proxy.Type SOCKS;
-  }
-
-  public abstract class ProxySelector {
-    ctor public ProxySelector();
-    method public abstract void connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException);
-    method public static java.net.ProxySelector getDefault();
-    method public abstract java.util.List<java.net.Proxy> select(java.net.URI);
-    method public static void setDefault(java.net.ProxySelector);
-  }
-
-  public abstract class ResponseCache {
-    ctor public ResponseCache();
-    method public abstract java.net.CacheResponse get(java.net.URI, String, java.util.Map<java.lang.String,java.util.List<java.lang.String>>) throws java.io.IOException;
-    method public static java.net.ResponseCache getDefault();
-    method public abstract java.net.CacheRequest put(java.net.URI, java.net.URLConnection) throws java.io.IOException;
-    method public static void setDefault(java.net.ResponseCache);
-  }
-
-  public abstract class SecureCacheResponse extends java.net.CacheResponse {
-    ctor public SecureCacheResponse();
-    method public abstract String getCipherSuite();
-    method public abstract java.util.List<java.security.cert.Certificate> getLocalCertificateChain();
-    method public abstract java.security.Principal getLocalPrincipal();
-    method public abstract java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public abstract java.util.List<java.security.cert.Certificate> getServerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
-  }
-
-  public class ServerSocket implements java.io.Closeable {
-    ctor public ServerSocket() throws java.io.IOException;
-    ctor public ServerSocket(int) throws java.io.IOException;
-    ctor public ServerSocket(int, int) throws java.io.IOException;
-    ctor public ServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
-    method public java.net.Socket accept() throws java.io.IOException;
-    method public void bind(java.net.SocketAddress) throws java.io.IOException;
-    method public void bind(java.net.SocketAddress, int) throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public java.nio.channels.ServerSocketChannel getChannel();
-    method public java.net.InetAddress getInetAddress();
-    method public int getLocalPort();
-    method public java.net.SocketAddress getLocalSocketAddress();
-    method public int getReceiveBufferSize() throws java.net.SocketException;
-    method public boolean getReuseAddress() throws java.net.SocketException;
-    method public int getSoTimeout() throws java.io.IOException;
-    method protected final void implAccept(java.net.Socket) throws java.io.IOException;
-    method public boolean isBound();
-    method public boolean isClosed();
-    method public void setPerformancePreferences(int, int, int);
-    method public void setReceiveBufferSize(int) throws java.net.SocketException;
-    method public void setReuseAddress(boolean) throws java.net.SocketException;
-    method public void setSoTimeout(int) throws java.net.SocketException;
-    method public static void setSocketFactory(java.net.SocketImplFactory) throws java.io.IOException;
-  }
-
-  public class Socket implements java.io.Closeable {
-    ctor public Socket();
-    ctor public Socket(java.net.Proxy);
-    ctor protected Socket(java.net.SocketImpl) throws java.net.SocketException;
-    ctor public Socket(String, int) throws java.io.IOException, java.net.UnknownHostException;
-    ctor public Socket(java.net.InetAddress, int) throws java.io.IOException;
-    ctor public Socket(String, int, java.net.InetAddress, int) throws java.io.IOException;
-    ctor public Socket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
-    ctor @Deprecated public Socket(String, int, boolean) throws java.io.IOException;
-    ctor @Deprecated public Socket(java.net.InetAddress, int, boolean) throws java.io.IOException;
-    method public void bind(java.net.SocketAddress) throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public void connect(java.net.SocketAddress) throws java.io.IOException;
-    method public void connect(java.net.SocketAddress, int) throws java.io.IOException;
-    method public java.nio.channels.SocketChannel getChannel();
-    method public java.net.InetAddress getInetAddress();
-    method public java.io.InputStream getInputStream() throws java.io.IOException;
-    method public boolean getKeepAlive() throws java.net.SocketException;
-    method public java.net.InetAddress getLocalAddress();
-    method public int getLocalPort();
-    method public java.net.SocketAddress getLocalSocketAddress();
-    method public boolean getOOBInline() throws java.net.SocketException;
-    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
-    method public int getPort();
-    method public int getReceiveBufferSize() throws java.net.SocketException;
-    method public java.net.SocketAddress getRemoteSocketAddress();
-    method public boolean getReuseAddress() throws java.net.SocketException;
-    method public int getSendBufferSize() throws java.net.SocketException;
-    method public int getSoLinger() throws java.net.SocketException;
-    method public int getSoTimeout() throws java.net.SocketException;
-    method public boolean getTcpNoDelay() throws java.net.SocketException;
-    method public int getTrafficClass() throws java.net.SocketException;
-    method public boolean isBound();
-    method public boolean isClosed();
-    method public boolean isConnected();
-    method public boolean isInputShutdown();
-    method public boolean isOutputShutdown();
-    method public void sendUrgentData(int) throws java.io.IOException;
-    method public void setKeepAlive(boolean) throws java.net.SocketException;
-    method public void setOOBInline(boolean) throws java.net.SocketException;
-    method public void setPerformancePreferences(int, int, int);
-    method public void setReceiveBufferSize(int) throws java.net.SocketException;
-    method public void setReuseAddress(boolean) throws java.net.SocketException;
-    method public void setSendBufferSize(int) throws java.net.SocketException;
-    method public void setSoLinger(boolean, int) throws java.net.SocketException;
-    method public void setSoTimeout(int) throws java.net.SocketException;
-    method public static void setSocketImplFactory(java.net.SocketImplFactory) throws java.io.IOException;
-    method public void setTcpNoDelay(boolean) throws java.net.SocketException;
-    method public void setTrafficClass(int) throws java.net.SocketException;
-    method public void shutdownInput() throws java.io.IOException;
-    method public void shutdownOutput() throws java.io.IOException;
-  }
-
-  public abstract class SocketAddress implements java.io.Serializable {
-    ctor public SocketAddress();
-  }
-
-  public class SocketException extends java.io.IOException {
-    ctor public SocketException(String);
-    ctor public SocketException();
-  }
-
-  public abstract class SocketImpl implements java.net.SocketOptions {
-    ctor public SocketImpl();
-    method protected abstract void accept(java.net.SocketImpl) throws java.io.IOException;
-    method protected abstract int available() throws java.io.IOException;
-    method protected abstract void bind(java.net.InetAddress, int) throws java.io.IOException;
-    method protected abstract void close() throws java.io.IOException;
-    method protected abstract void connect(String, int) throws java.io.IOException;
-    method protected abstract void connect(java.net.InetAddress, int) throws java.io.IOException;
-    method protected abstract void connect(java.net.SocketAddress, int) throws java.io.IOException;
-    method protected abstract void create(boolean) throws java.io.IOException;
-    method protected java.io.FileDescriptor getFileDescriptor();
-    method protected java.net.InetAddress getInetAddress();
-    method protected abstract java.io.InputStream getInputStream() throws java.io.IOException;
-    method protected int getLocalPort();
-    method protected abstract java.io.OutputStream getOutputStream() throws java.io.IOException;
-    method protected int getPort();
-    method protected abstract void listen(int) throws java.io.IOException;
-    method protected abstract void sendUrgentData(int) throws java.io.IOException;
-    method protected void setPerformancePreferences(int, int, int);
-    method protected void shutdownInput() throws java.io.IOException;
-    method protected void shutdownOutput() throws java.io.IOException;
-    method protected boolean supportsUrgentData();
-    field protected java.net.InetAddress address;
-    field protected java.io.FileDescriptor fd;
-    field protected int localport;
-    field protected int port;
-  }
-
-  public interface SocketImplFactory {
-    method public java.net.SocketImpl createSocketImpl();
-  }
-
-  public interface SocketOption<T> {
-    method public String name();
-    method public Class<T> type();
-  }
-
-  public interface SocketOptions {
-    method public Object getOption(int) throws java.net.SocketException;
-    method public void setOption(int, Object) throws java.net.SocketException;
-    field public static final int IP_MULTICAST_IF = 16; // 0x10
-    field public static final int IP_MULTICAST_IF2 = 31; // 0x1f
-    field public static final int IP_MULTICAST_LOOP = 18; // 0x12
-    field public static final int IP_TOS = 3; // 0x3
-    field public static final int SO_BINDADDR = 15; // 0xf
-    field public static final int SO_BROADCAST = 32; // 0x20
-    field public static final int SO_KEEPALIVE = 8; // 0x8
-    field public static final int SO_LINGER = 128; // 0x80
-    field public static final int SO_OOBINLINE = 4099; // 0x1003
-    field public static final int SO_RCVBUF = 4098; // 0x1002
-    field public static final int SO_REUSEADDR = 4; // 0x4
-    field public static final int SO_SNDBUF = 4097; // 0x1001
-    field public static final int SO_TIMEOUT = 4102; // 0x1006
-    field public static final int TCP_NODELAY = 1; // 0x1
-  }
-
-  public final class SocketPermission extends java.security.Permission implements java.io.Serializable {
-    ctor public SocketPermission(String, String);
-    method public String getActions();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public class SocketTimeoutException extends java.io.InterruptedIOException {
-    ctor public SocketTimeoutException(String);
-    ctor public SocketTimeoutException();
-  }
-
-  public enum StandardProtocolFamily implements java.net.ProtocolFamily {
-    enum_constant public static final java.net.StandardProtocolFamily INET;
-    enum_constant public static final java.net.StandardProtocolFamily INET6;
-  }
-
-  public final class StandardSocketOptions {
-    field public static final java.net.SocketOption<java.net.NetworkInterface> IP_MULTICAST_IF;
-    field public static final java.net.SocketOption<java.lang.Boolean> IP_MULTICAST_LOOP;
-    field public static final java.net.SocketOption<java.lang.Integer> IP_MULTICAST_TTL;
-    field public static final java.net.SocketOption<java.lang.Integer> IP_TOS;
-    field public static final java.net.SocketOption<java.lang.Boolean> SO_BROADCAST;
-    field public static final java.net.SocketOption<java.lang.Boolean> SO_KEEPALIVE;
-    field public static final java.net.SocketOption<java.lang.Integer> SO_LINGER;
-    field public static final java.net.SocketOption<java.lang.Integer> SO_RCVBUF;
-    field public static final java.net.SocketOption<java.lang.Boolean> SO_REUSEADDR;
-    field public static final java.net.SocketOption<java.lang.Integer> SO_SNDBUF;
-    field public static final java.net.SocketOption<java.lang.Boolean> TCP_NODELAY;
-  }
-
-  public final class URI implements java.lang.Comparable<java.net.URI> java.io.Serializable {
-    ctor public URI(String) throws java.net.URISyntaxException;
-    ctor public URI(String, String, String, int, String, String, String) throws java.net.URISyntaxException;
-    ctor public URI(String, String, String, String, String) throws java.net.URISyntaxException;
-    ctor public URI(String, String, String, String) throws java.net.URISyntaxException;
-    ctor public URI(String, String, String) throws java.net.URISyntaxException;
-    method public int compareTo(java.net.URI);
-    method public static java.net.URI create(String);
-    method public String getAuthority();
-    method public String getFragment();
-    method public String getHost();
-    method public String getPath();
-    method public int getPort();
-    method public String getQuery();
-    method public String getRawAuthority();
-    method public String getRawFragment();
-    method public String getRawPath();
-    method public String getRawQuery();
-    method public String getRawSchemeSpecificPart();
-    method public String getRawUserInfo();
-    method public String getScheme();
-    method public String getSchemeSpecificPart();
-    method public String getUserInfo();
-    method public boolean isAbsolute();
-    method public boolean isOpaque();
-    method public java.net.URI normalize();
-    method public java.net.URI parseServerAuthority() throws java.net.URISyntaxException;
-    method public java.net.URI relativize(java.net.URI);
-    method public java.net.URI resolve(java.net.URI);
-    method public java.net.URI resolve(String);
-    method public String toASCIIString();
-    method public java.net.URL toURL() throws java.net.MalformedURLException;
-  }
-
-  public class URISyntaxException extends java.lang.Exception {
-    ctor public URISyntaxException(String, String, int);
-    ctor public URISyntaxException(String, String);
-    method public int getIndex();
-    method public String getInput();
-    method public String getReason();
-  }
-
-  public final class URL implements java.io.Serializable {
-    ctor public URL(String, String, int, String) throws java.net.MalformedURLException;
-    ctor public URL(String, String, String) throws java.net.MalformedURLException;
-    ctor public URL(String, String, int, String, java.net.URLStreamHandler) throws java.net.MalformedURLException;
-    ctor public URL(String) throws java.net.MalformedURLException;
-    ctor public URL(java.net.URL, String) throws java.net.MalformedURLException;
-    ctor public URL(java.net.URL, String, java.net.URLStreamHandler) throws java.net.MalformedURLException;
-    method public String getAuthority();
-    method public Object getContent() throws java.io.IOException;
-    method public Object getContent(Class[]) throws java.io.IOException;
-    method public int getDefaultPort();
-    method public String getFile();
-    method public String getHost();
-    method public String getPath();
-    method public int getPort();
-    method public String getProtocol();
-    method public String getQuery();
-    method public String getRef();
-    method public String getUserInfo();
-    method public java.net.URLConnection openConnection() throws java.io.IOException;
-    method public java.net.URLConnection openConnection(java.net.Proxy) throws java.io.IOException;
-    method public java.io.InputStream openStream() throws java.io.IOException;
-    method public boolean sameFile(java.net.URL);
-    method public static void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory);
-    method public String toExternalForm();
-    method public java.net.URI toURI() throws java.net.URISyntaxException;
-  }
-
-  public class URLClassLoader extends java.security.SecureClassLoader implements java.io.Closeable {
-    ctor public URLClassLoader(java.net.URL[], ClassLoader);
-    ctor public URLClassLoader(java.net.URL[]);
-    ctor public URLClassLoader(java.net.URL[], ClassLoader, java.net.URLStreamHandlerFactory);
-    method protected void addURL(java.net.URL);
-    method public void close() throws java.io.IOException;
-    method protected Package definePackage(String, java.util.jar.Manifest, java.net.URL) throws java.lang.IllegalArgumentException;
-    method public java.net.URL findResource(String);
-    method public java.util.Enumeration<java.net.URL> findResources(String) throws java.io.IOException;
-    method public java.net.URL[] getURLs();
-    method public static java.net.URLClassLoader newInstance(java.net.URL[], ClassLoader);
-    method public static java.net.URLClassLoader newInstance(java.net.URL[]);
-  }
-
-  public abstract class URLConnection {
-    ctor protected URLConnection(java.net.URL);
-    method public void addRequestProperty(String, String);
-    method public abstract void connect() throws java.io.IOException;
-    method public boolean getAllowUserInteraction();
-    method public int getConnectTimeout();
-    method public Object getContent() throws java.io.IOException;
-    method public Object getContent(Class[]) throws java.io.IOException;
-    method public String getContentEncoding();
-    method public int getContentLength();
-    method public long getContentLengthLong();
-    method public String getContentType();
-    method public long getDate();
-    method public static boolean getDefaultAllowUserInteraction();
-    method @Deprecated public static String getDefaultRequestProperty(String);
-    method public boolean getDefaultUseCaches();
-    method public boolean getDoInput();
-    method public boolean getDoOutput();
-    method public long getExpiration();
-    method public static java.net.FileNameMap getFileNameMap();
-    method public String getHeaderField(String);
-    method public String getHeaderField(int);
-    method public long getHeaderFieldDate(String, long);
-    method public int getHeaderFieldInt(String, int);
-    method public String getHeaderFieldKey(int);
-    method public long getHeaderFieldLong(String, long);
-    method public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaderFields();
-    method public long getIfModifiedSince();
-    method public java.io.InputStream getInputStream() throws java.io.IOException;
-    method public long getLastModified();
-    method public java.io.OutputStream getOutputStream() throws java.io.IOException;
-    method public java.security.Permission getPermission() throws java.io.IOException;
-    method public int getReadTimeout();
-    method public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getRequestProperties();
-    method public String getRequestProperty(String);
-    method public java.net.URL getURL();
-    method public boolean getUseCaches();
-    method public static String guessContentTypeFromName(String);
-    method public static String guessContentTypeFromStream(java.io.InputStream) throws java.io.IOException;
-    method public void setAllowUserInteraction(boolean);
-    method public void setConnectTimeout(int);
-    method public static void setContentHandlerFactory(java.net.ContentHandlerFactory);
-    method public static void setDefaultAllowUserInteraction(boolean);
-    method @Deprecated public static void setDefaultRequestProperty(String, String);
-    method public void setDefaultUseCaches(boolean);
-    method public void setDoInput(boolean);
-    method public void setDoOutput(boolean);
-    method public static void setFileNameMap(java.net.FileNameMap);
-    method public void setIfModifiedSince(long);
-    method public void setReadTimeout(int);
-    method public void setRequestProperty(String, String);
-    method public void setUseCaches(boolean);
-    field protected boolean allowUserInteraction;
-    field protected boolean connected;
-    field protected boolean doInput;
-    field protected boolean doOutput;
-    field protected long ifModifiedSince;
-    field protected java.net.URL url;
-    field protected boolean useCaches;
-  }
-
-  public class URLDecoder {
-    ctor public URLDecoder();
-    method @Deprecated public static String decode(String);
-    method public static String decode(String, String) throws java.io.UnsupportedEncodingException;
-  }
-
-  public class URLEncoder {
-    method @Deprecated public static String encode(String);
-    method public static String encode(String, String) throws java.io.UnsupportedEncodingException;
-  }
-
-  public abstract class URLStreamHandler {
-    ctor public URLStreamHandler();
-    method protected boolean equals(java.net.URL, java.net.URL);
-    method protected int getDefaultPort();
-    method protected java.net.InetAddress getHostAddress(java.net.URL);
-    method protected int hashCode(java.net.URL);
-    method protected boolean hostsEqual(java.net.URL, java.net.URL);
-    method protected abstract java.net.URLConnection openConnection(java.net.URL) throws java.io.IOException;
-    method protected java.net.URLConnection openConnection(java.net.URL, java.net.Proxy) throws java.io.IOException;
-    method protected void parseURL(java.net.URL, String, int, int);
-    method protected boolean sameFile(java.net.URL, java.net.URL);
-    method protected void setURL(java.net.URL, String, String, int, String, String, String, String, String);
-    method @Deprecated protected void setURL(java.net.URL, String, String, int, String, String);
-    method protected String toExternalForm(java.net.URL);
-  }
-
-  public interface URLStreamHandlerFactory {
-    method public java.net.URLStreamHandler createURLStreamHandler(String);
-  }
-
-  public class UnknownHostException extends java.io.IOException {
-    ctor public UnknownHostException(String);
-    ctor public UnknownHostException();
-  }
-
-  public class UnknownServiceException extends java.io.IOException {
-    ctor public UnknownServiceException();
-    ctor public UnknownServiceException(String);
-  }
-
-}
-
-package java.nio {
-
-  public abstract class Buffer {
-    method public abstract Object array();
-    method public abstract int arrayOffset();
-    method public final int capacity();
-    method public java.nio.Buffer clear();
-    method public java.nio.Buffer flip();
-    method public abstract boolean hasArray();
-    method public final boolean hasRemaining();
-    method public abstract boolean isDirect();
-    method public abstract boolean isReadOnly();
-    method public final int limit();
-    method public java.nio.Buffer limit(int);
-    method public java.nio.Buffer mark();
-    method public final int position();
-    method public java.nio.Buffer position(int);
-    method public final int remaining();
-    method public java.nio.Buffer reset();
-    method public java.nio.Buffer rewind();
-  }
-
-  public class BufferOverflowException extends java.lang.RuntimeException {
-    ctor public BufferOverflowException();
-  }
-
-  public class BufferUnderflowException extends java.lang.RuntimeException {
-    ctor public BufferUnderflowException();
-  }
-
-  public abstract class ByteBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.ByteBuffer> {
-    method @NonNull public static java.nio.ByteBuffer allocate(int);
-    method @NonNull public static java.nio.ByteBuffer allocateDirect(int);
-    method @NonNull public final byte[] array();
-    method public final int arrayOffset();
-    method @NonNull public abstract java.nio.CharBuffer asCharBuffer();
-    method @NonNull public abstract java.nio.DoubleBuffer asDoubleBuffer();
-    method @NonNull public abstract java.nio.FloatBuffer asFloatBuffer();
-    method @NonNull public abstract java.nio.IntBuffer asIntBuffer();
-    method @NonNull public abstract java.nio.LongBuffer asLongBuffer();
-    method @NonNull public abstract java.nio.ByteBuffer asReadOnlyBuffer();
-    method @NonNull public abstract java.nio.ShortBuffer asShortBuffer();
-    method @NonNull public abstract java.nio.ByteBuffer compact();
-    method public int compareTo(@NonNull java.nio.ByteBuffer);
-    method @NonNull public abstract java.nio.ByteBuffer duplicate();
-    method public abstract byte get();
-    method public abstract byte get(int);
-    method @NonNull public java.nio.ByteBuffer get(@NonNull byte[], int, int);
-    method @NonNull public java.nio.ByteBuffer get(@NonNull byte[]);
-    method public abstract char getChar();
-    method public abstract char getChar(int);
-    method public abstract double getDouble();
-    method public abstract double getDouble(int);
-    method public abstract float getFloat();
-    method public abstract float getFloat(int);
-    method public abstract int getInt();
-    method public abstract int getInt(int);
-    method public abstract long getLong();
-    method public abstract long getLong(int);
-    method public abstract short getShort();
-    method public abstract short getShort(int);
-    method public final boolean hasArray();
-    method @NonNull public final java.nio.ByteOrder order();
-    method @NonNull public final java.nio.ByteBuffer order(@NonNull java.nio.ByteOrder);
-    method @NonNull public abstract java.nio.ByteBuffer put(byte);
-    method @NonNull public abstract java.nio.ByteBuffer put(int, byte);
-    method @NonNull public java.nio.ByteBuffer put(@NonNull java.nio.ByteBuffer);
-    method @NonNull public java.nio.ByteBuffer put(@NonNull byte[], int, int);
-    method @NonNull public final java.nio.ByteBuffer put(@NonNull byte[]);
-    method @NonNull public abstract java.nio.ByteBuffer putChar(char);
-    method @NonNull public abstract java.nio.ByteBuffer putChar(int, char);
-    method @NonNull public abstract java.nio.ByteBuffer putDouble(double);
-    method @NonNull public abstract java.nio.ByteBuffer putDouble(int, double);
-    method @NonNull public abstract java.nio.ByteBuffer putFloat(float);
-    method @NonNull public abstract java.nio.ByteBuffer putFloat(int, float);
-    method @NonNull public abstract java.nio.ByteBuffer putInt(int);
-    method @NonNull public abstract java.nio.ByteBuffer putInt(int, int);
-    method @NonNull public abstract java.nio.ByteBuffer putLong(long);
-    method @NonNull public abstract java.nio.ByteBuffer putLong(int, long);
-    method @NonNull public abstract java.nio.ByteBuffer putShort(short);
-    method @NonNull public abstract java.nio.ByteBuffer putShort(int, short);
-    method @NonNull public abstract java.nio.ByteBuffer slice();
-    method @NonNull public static java.nio.ByteBuffer wrap(@NonNull byte[], int, int);
-    method @NonNull public static java.nio.ByteBuffer wrap(@NonNull byte[]);
-  }
-
-  public final class ByteOrder {
-    method public static java.nio.ByteOrder nativeOrder();
-    field public static final java.nio.ByteOrder BIG_ENDIAN;
-    field public static final java.nio.ByteOrder LITTLE_ENDIAN;
-  }
-
-  public abstract class CharBuffer extends java.nio.Buffer implements java.lang.Appendable java.lang.CharSequence java.lang.Comparable<java.nio.CharBuffer> java.lang.Readable {
-    method public static java.nio.CharBuffer allocate(int);
-    method public java.nio.CharBuffer append(CharSequence);
-    method public java.nio.CharBuffer append(CharSequence, int, int);
-    method public java.nio.CharBuffer append(char);
-    method public final char[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.CharBuffer asReadOnlyBuffer();
-    method public final char charAt(int);
-    method public abstract java.nio.CharBuffer compact();
-    method public int compareTo(java.nio.CharBuffer);
-    method public abstract java.nio.CharBuffer duplicate();
-    method public abstract char get();
-    method public abstract char get(int);
-    method public java.nio.CharBuffer get(char[], int, int);
-    method public java.nio.CharBuffer get(char[]);
-    method public final boolean hasArray();
-    method public final int length();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.CharBuffer put(char);
-    method public abstract java.nio.CharBuffer put(int, char);
-    method public java.nio.CharBuffer put(java.nio.CharBuffer);
-    method public java.nio.CharBuffer put(char[], int, int);
-    method public final java.nio.CharBuffer put(char[]);
-    method public java.nio.CharBuffer put(String, int, int);
-    method public final java.nio.CharBuffer put(String);
-    method public int read(java.nio.CharBuffer) throws java.io.IOException;
-    method public abstract java.nio.CharBuffer slice();
-    method public abstract java.nio.CharBuffer subSequence(int, int);
-    method public static java.nio.CharBuffer wrap(char[], int, int);
-    method public static java.nio.CharBuffer wrap(char[]);
-    method public static java.nio.CharBuffer wrap(CharSequence, int, int);
-    method public static java.nio.CharBuffer wrap(CharSequence);
-  }
-
-  public abstract class DoubleBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.DoubleBuffer> {
-    method public static java.nio.DoubleBuffer allocate(int);
-    method public final double[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.DoubleBuffer asReadOnlyBuffer();
-    method public abstract java.nio.DoubleBuffer compact();
-    method public int compareTo(java.nio.DoubleBuffer);
-    method public abstract java.nio.DoubleBuffer duplicate();
-    method public abstract double get();
-    method public abstract double get(int);
-    method public java.nio.DoubleBuffer get(double[], int, int);
-    method public java.nio.DoubleBuffer get(double[]);
-    method public final boolean hasArray();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.DoubleBuffer put(double);
-    method public abstract java.nio.DoubleBuffer put(int, double);
-    method public java.nio.DoubleBuffer put(java.nio.DoubleBuffer);
-    method public java.nio.DoubleBuffer put(double[], int, int);
-    method public final java.nio.DoubleBuffer put(double[]);
-    method public abstract java.nio.DoubleBuffer slice();
-    method public static java.nio.DoubleBuffer wrap(double[], int, int);
-    method public static java.nio.DoubleBuffer wrap(double[]);
-  }
-
-  public abstract class FloatBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.FloatBuffer> {
-    method public static java.nio.FloatBuffer allocate(int);
-    method public final float[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.FloatBuffer asReadOnlyBuffer();
-    method public abstract java.nio.FloatBuffer compact();
-    method public int compareTo(java.nio.FloatBuffer);
-    method public abstract java.nio.FloatBuffer duplicate();
-    method public abstract float get();
-    method public abstract float get(int);
-    method public java.nio.FloatBuffer get(float[], int, int);
-    method public java.nio.FloatBuffer get(float[]);
-    method public final boolean hasArray();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.FloatBuffer put(float);
-    method public abstract java.nio.FloatBuffer put(int, float);
-    method public java.nio.FloatBuffer put(java.nio.FloatBuffer);
-    method public java.nio.FloatBuffer put(float[], int, int);
-    method public final java.nio.FloatBuffer put(float[]);
-    method public abstract java.nio.FloatBuffer slice();
-    method public static java.nio.FloatBuffer wrap(float[], int, int);
-    method public static java.nio.FloatBuffer wrap(float[]);
-  }
-
-  public abstract class IntBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.IntBuffer> {
-    method public static java.nio.IntBuffer allocate(int);
-    method public final int[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.IntBuffer asReadOnlyBuffer();
-    method public abstract java.nio.IntBuffer compact();
-    method public int compareTo(java.nio.IntBuffer);
-    method public abstract java.nio.IntBuffer duplicate();
-    method public abstract int get();
-    method public abstract int get(int);
-    method public java.nio.IntBuffer get(int[], int, int);
-    method public java.nio.IntBuffer get(int[]);
-    method public final boolean hasArray();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.IntBuffer put(int);
-    method public abstract java.nio.IntBuffer put(int, int);
-    method public java.nio.IntBuffer put(java.nio.IntBuffer);
-    method public java.nio.IntBuffer put(int[], int, int);
-    method public final java.nio.IntBuffer put(int[]);
-    method public abstract java.nio.IntBuffer slice();
-    method public static java.nio.IntBuffer wrap(int[], int, int);
-    method public static java.nio.IntBuffer wrap(int[]);
-  }
-
-  public class InvalidMarkException extends java.lang.IllegalStateException {
-    ctor public InvalidMarkException();
-  }
-
-  public abstract class LongBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.LongBuffer> {
-    method public static java.nio.LongBuffer allocate(int);
-    method public final long[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.LongBuffer asReadOnlyBuffer();
-    method public abstract java.nio.LongBuffer compact();
-    method public int compareTo(java.nio.LongBuffer);
-    method public abstract java.nio.LongBuffer duplicate();
-    method public abstract long get();
-    method public abstract long get(int);
-    method public java.nio.LongBuffer get(long[], int, int);
-    method public java.nio.LongBuffer get(long[]);
-    method public final boolean hasArray();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.LongBuffer put(long);
-    method public abstract java.nio.LongBuffer put(int, long);
-    method public java.nio.LongBuffer put(java.nio.LongBuffer);
-    method public java.nio.LongBuffer put(long[], int, int);
-    method public final java.nio.LongBuffer put(long[]);
-    method public abstract java.nio.LongBuffer slice();
-    method public static java.nio.LongBuffer wrap(long[], int, int);
-    method public static java.nio.LongBuffer wrap(long[]);
-  }
-
-  public abstract class MappedByteBuffer extends java.nio.ByteBuffer {
-    method public final java.nio.MappedByteBuffer force();
-    method public final boolean isLoaded();
-    method public final java.nio.MappedByteBuffer load();
-  }
-
-  public class ReadOnlyBufferException extends java.lang.UnsupportedOperationException {
-    ctor public ReadOnlyBufferException();
-  }
-
-  public abstract class ShortBuffer extends java.nio.Buffer implements java.lang.Comparable<java.nio.ShortBuffer> {
-    method public static java.nio.ShortBuffer allocate(int);
-    method public final short[] array();
-    method public final int arrayOffset();
-    method public abstract java.nio.ShortBuffer asReadOnlyBuffer();
-    method public abstract java.nio.ShortBuffer compact();
-    method public int compareTo(java.nio.ShortBuffer);
-    method public abstract java.nio.ShortBuffer duplicate();
-    method public abstract short get();
-    method public abstract short get(int);
-    method public java.nio.ShortBuffer get(short[], int, int);
-    method public java.nio.ShortBuffer get(short[]);
-    method public final boolean hasArray();
-    method public abstract java.nio.ByteOrder order();
-    method public abstract java.nio.ShortBuffer put(short);
-    method public abstract java.nio.ShortBuffer put(int, short);
-    method public java.nio.ShortBuffer put(java.nio.ShortBuffer);
-    method public java.nio.ShortBuffer put(short[], int, int);
-    method public final java.nio.ShortBuffer put(short[]);
-    method public abstract java.nio.ShortBuffer slice();
-    method public static java.nio.ShortBuffer wrap(short[], int, int);
-    method public static java.nio.ShortBuffer wrap(short[]);
-  }
-
-}
-
-package java.nio.channels {
-
-  public class AcceptPendingException extends java.lang.IllegalStateException {
-    ctor public AcceptPendingException();
-  }
-
-  public class AlreadyBoundException extends java.lang.IllegalStateException {
-    ctor public AlreadyBoundException();
-  }
-
-  public class AlreadyConnectedException extends java.lang.IllegalStateException {
-    ctor public AlreadyConnectedException();
-  }
-
-  public interface AsynchronousByteChannel extends java.nio.channels.AsynchronousChannel {
-    method public <A> void read(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public java.util.concurrent.Future<java.lang.Integer> read(java.nio.ByteBuffer);
-    method public <A> void write(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public java.util.concurrent.Future<java.lang.Integer> write(java.nio.ByteBuffer);
-  }
-
-  public interface AsynchronousChannel extends java.nio.channels.Channel {
-  }
-
-  public abstract class AsynchronousChannelGroup {
-    ctor protected AsynchronousChannelGroup(java.nio.channels.spi.AsynchronousChannelProvider);
-    method public abstract boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public abstract boolean isShutdown();
-    method public abstract boolean isTerminated();
-    method public final java.nio.channels.spi.AsynchronousChannelProvider provider();
-    method public abstract void shutdown();
-    method public abstract void shutdownNow() throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousChannelGroup withCachedThreadPool(java.util.concurrent.ExecutorService, int) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousChannelGroup withFixedThreadPool(int, java.util.concurrent.ThreadFactory) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousChannelGroup withThreadPool(java.util.concurrent.ExecutorService) throws java.io.IOException;
-  }
-
-  public class AsynchronousCloseException extends java.nio.channels.ClosedChannelException {
-    ctor public AsynchronousCloseException();
-  }
-
-  public abstract class AsynchronousFileChannel implements java.nio.channels.AsynchronousChannel {
-    ctor protected AsynchronousFileChannel();
-    method public abstract void force(boolean) throws java.io.IOException;
-    method public abstract <A> void lock(long, long, boolean, A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
-    method public final <A> void lock(A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
-    method public abstract java.util.concurrent.Future<java.nio.channels.FileLock> lock(long, long, boolean);
-    method public final java.util.concurrent.Future<java.nio.channels.FileLock> lock();
-    method public static java.nio.channels.AsynchronousFileChannel open(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.util.concurrent.ExecutorService, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousFileChannel open(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public abstract <A> void read(java.nio.ByteBuffer, long, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public abstract java.util.concurrent.Future<java.lang.Integer> read(java.nio.ByteBuffer, long);
-    method public abstract long size() throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousFileChannel truncate(long) throws java.io.IOException;
-    method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOException;
-    method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
-    method public abstract <A> void write(java.nio.ByteBuffer, long, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public abstract java.util.concurrent.Future<java.lang.Integer> write(java.nio.ByteBuffer, long);
-  }
-
-  public abstract class AsynchronousServerSocketChannel implements java.nio.channels.AsynchronousChannel java.nio.channels.NetworkChannel {
-    ctor protected AsynchronousServerSocketChannel(java.nio.channels.spi.AsynchronousChannelProvider);
-    method public abstract <A> void accept(A, java.nio.channels.CompletionHandler<java.nio.channels.AsynchronousSocketChannel,? super A>);
-    method public abstract java.util.concurrent.Future<java.nio.channels.AsynchronousSocketChannel> accept();
-    method public final java.nio.channels.AsynchronousServerSocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousServerSocketChannel bind(java.net.SocketAddress, int) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousServerSocketChannel open(java.nio.channels.AsynchronousChannelGroup) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousServerSocketChannel open() throws java.io.IOException;
-    method public final java.nio.channels.spi.AsynchronousChannelProvider provider();
-    method public abstract <T> java.nio.channels.AsynchronousServerSocketChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-  }
-
-  public abstract class AsynchronousSocketChannel implements java.nio.channels.AsynchronousByteChannel java.nio.channels.NetworkChannel {
-    ctor protected AsynchronousSocketChannel(java.nio.channels.spi.AsynchronousChannelProvider);
-    method public abstract java.nio.channels.AsynchronousSocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract <A> void connect(java.net.SocketAddress, A, java.nio.channels.CompletionHandler<java.lang.Void,? super A>);
-    method public abstract java.util.concurrent.Future<java.lang.Void> connect(java.net.SocketAddress);
-    method public abstract java.net.SocketAddress getRemoteAddress() throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousSocketChannel open(java.nio.channels.AsynchronousChannelGroup) throws java.io.IOException;
-    method public static java.nio.channels.AsynchronousSocketChannel open() throws java.io.IOException;
-    method public final java.nio.channels.spi.AsynchronousChannelProvider provider();
-    method public abstract <A> void read(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public final <A> void read(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public abstract <A> void read(java.nio.ByteBuffer[], int, int, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler<java.lang.Long,? super A>);
-    method public abstract <T> java.nio.channels.AsynchronousSocketChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousSocketChannel shutdownInput() throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousSocketChannel shutdownOutput() throws java.io.IOException;
-    method public abstract <A> void write(java.nio.ByteBuffer, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public final <A> void write(java.nio.ByteBuffer, A, java.nio.channels.CompletionHandler<java.lang.Integer,? super A>);
-    method public abstract <A> void write(java.nio.ByteBuffer[], int, int, long, java.util.concurrent.TimeUnit, A, java.nio.channels.CompletionHandler<java.lang.Long,? super A>);
-  }
-
-  public interface ByteChannel extends java.nio.channels.ReadableByteChannel java.nio.channels.WritableByteChannel {
-  }
-
-  public class CancelledKeyException extends java.lang.IllegalStateException {
-    ctor public CancelledKeyException();
-  }
-
-  public interface Channel extends java.io.Closeable {
-    method public boolean isOpen();
-  }
-
-  public final class Channels {
-    method public static java.nio.channels.ReadableByteChannel newChannel(java.io.InputStream);
-    method public static java.nio.channels.WritableByteChannel newChannel(java.io.OutputStream);
-    method public static java.io.InputStream newInputStream(java.nio.channels.ReadableByteChannel);
-    method public static java.io.InputStream newInputStream(java.nio.channels.AsynchronousByteChannel);
-    method public static java.io.OutputStream newOutputStream(java.nio.channels.WritableByteChannel);
-    method public static java.io.OutputStream newOutputStream(java.nio.channels.AsynchronousByteChannel);
-    method public static java.io.Reader newReader(java.nio.channels.ReadableByteChannel, java.nio.charset.CharsetDecoder, int);
-    method public static java.io.Reader newReader(java.nio.channels.ReadableByteChannel, String);
-    method public static java.io.Writer newWriter(java.nio.channels.WritableByteChannel, java.nio.charset.CharsetEncoder, int);
-    method public static java.io.Writer newWriter(java.nio.channels.WritableByteChannel, String);
-  }
-
-  public class ClosedByInterruptException extends java.nio.channels.AsynchronousCloseException {
-    ctor public ClosedByInterruptException();
-  }
-
-  public class ClosedChannelException extends java.io.IOException {
-    ctor public ClosedChannelException();
-  }
-
-  public class ClosedSelectorException extends java.lang.IllegalStateException {
-    ctor public ClosedSelectorException();
-  }
-
-  public interface CompletionHandler<V, A> {
-    method public void completed(V, A);
-    method public void failed(Throwable, A);
-  }
-
-  public class ConnectionPendingException extends java.lang.IllegalStateException {
-    ctor public ConnectionPendingException();
-  }
-
-  public abstract class DatagramChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel java.nio.channels.GatheringByteChannel java.nio.channels.MulticastChannel java.nio.channels.ScatteringByteChannel {
-    ctor protected DatagramChannel(java.nio.channels.spi.SelectorProvider);
-    method public abstract java.nio.channels.DatagramChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract java.nio.channels.DatagramChannel connect(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract java.nio.channels.DatagramChannel disconnect() throws java.io.IOException;
-    method public abstract java.net.SocketAddress getRemoteAddress() throws java.io.IOException;
-    method public abstract boolean isConnected();
-    method public static java.nio.channels.DatagramChannel open() throws java.io.IOException;
-    method public static java.nio.channels.DatagramChannel open(java.net.ProtocolFamily) throws java.io.IOException;
-    method public final long read(java.nio.ByteBuffer[]) throws java.io.IOException;
-    method public abstract java.net.SocketAddress receive(java.nio.ByteBuffer) throws java.io.IOException;
-    method public abstract int send(java.nio.ByteBuffer, java.net.SocketAddress) throws java.io.IOException;
-    method public abstract <T> java.nio.channels.DatagramChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-    method public abstract java.net.DatagramSocket socket();
-    method public final int validOps();
-    method public final long write(java.nio.ByteBuffer[]) throws java.io.IOException;
-  }
-
-  public abstract class FileChannel extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.GatheringByteChannel java.nio.channels.ScatteringByteChannel java.nio.channels.SeekableByteChannel {
-    ctor protected FileChannel();
-    method public abstract void force(boolean) throws java.io.IOException;
-    method public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOException;
-    method public final java.nio.channels.FileLock lock() throws java.io.IOException;
-    method public abstract java.nio.MappedByteBuffer map(java.nio.channels.FileChannel.MapMode, long, long) throws java.io.IOException;
-    method public static java.nio.channels.FileChannel open(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.channels.FileChannel open(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public abstract java.nio.channels.FileChannel position(long) throws java.io.IOException;
-    method public final long read(java.nio.ByteBuffer[]) throws java.io.IOException;
-    method public abstract int read(java.nio.ByteBuffer, long) throws java.io.IOException;
-    method public abstract long transferFrom(java.nio.channels.ReadableByteChannel, long, long) throws java.io.IOException;
-    method public abstract long transferTo(long, long, java.nio.channels.WritableByteChannel) throws java.io.IOException;
-    method public abstract java.nio.channels.FileChannel truncate(long) throws java.io.IOException;
-    method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOException;
-    method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
-    method public final long write(java.nio.ByteBuffer[]) throws java.io.IOException;
-    method public abstract int write(java.nio.ByteBuffer, long) throws java.io.IOException;
-  }
-
-  public static class FileChannel.MapMode {
-    field public static final java.nio.channels.FileChannel.MapMode PRIVATE;
-    field public static final java.nio.channels.FileChannel.MapMode READ_ONLY;
-    field public static final java.nio.channels.FileChannel.MapMode READ_WRITE;
-  }
-
-  public abstract class FileLock implements java.lang.AutoCloseable {
-    ctor protected FileLock(java.nio.channels.FileChannel, long, long, boolean);
-    ctor protected FileLock(java.nio.channels.AsynchronousFileChannel, long, long, boolean);
-    method public java.nio.channels.Channel acquiredBy();
-    method public final java.nio.channels.FileChannel channel();
-    method public final void close() throws java.io.IOException;
-    method public final boolean isShared();
-    method public abstract boolean isValid();
-    method public final boolean overlaps(long, long);
-    method public final long position();
-    method public abstract void release() throws java.io.IOException;
-    method public final long size();
-    method public final String toString();
-  }
-
-  public class FileLockInterruptionException extends java.io.IOException {
-    ctor public FileLockInterruptionException();
-  }
-
-  public interface GatheringByteChannel extends java.nio.channels.WritableByteChannel {
-    method public long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
-    method public long write(java.nio.ByteBuffer[]) throws java.io.IOException;
-  }
-
-  public class IllegalBlockingModeException extends java.lang.IllegalStateException {
-    ctor public IllegalBlockingModeException();
-  }
-
-  public class IllegalChannelGroupException extends java.lang.IllegalArgumentException {
-    ctor public IllegalChannelGroupException();
-  }
-
-  public class IllegalSelectorException extends java.lang.IllegalArgumentException {
-    ctor public IllegalSelectorException();
-  }
-
-  public class InterruptedByTimeoutException extends java.io.IOException {
-    ctor public InterruptedByTimeoutException();
-  }
-
-  public interface InterruptibleChannel extends java.nio.channels.Channel {
-  }
-
-  public abstract class MembershipKey {
-    ctor protected MembershipKey();
-    method public abstract java.nio.channels.MembershipKey block(java.net.InetAddress) throws java.io.IOException;
-    method public abstract java.nio.channels.MulticastChannel channel();
-    method public abstract void drop();
-    method public abstract java.net.InetAddress group();
-    method public abstract boolean isValid();
-    method public abstract java.net.NetworkInterface networkInterface();
-    method public abstract java.net.InetAddress sourceAddress();
-    method public abstract java.nio.channels.MembershipKey unblock(java.net.InetAddress);
-  }
-
-  public interface MulticastChannel extends java.nio.channels.NetworkChannel {
-    method public java.nio.channels.MembershipKey join(java.net.InetAddress, java.net.NetworkInterface) throws java.io.IOException;
-    method public java.nio.channels.MembershipKey join(java.net.InetAddress, java.net.NetworkInterface, java.net.InetAddress) throws java.io.IOException;
-  }
-
-  public interface NetworkChannel extends java.nio.channels.Channel {
-    method public java.nio.channels.NetworkChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public java.net.SocketAddress getLocalAddress() throws java.io.IOException;
-    method public <T> T getOption(java.net.SocketOption<T>) throws java.io.IOException;
-    method public <T> java.nio.channels.NetworkChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-    method public java.util.Set<java.net.SocketOption<?>> supportedOptions();
-  }
-
-  public class NoConnectionPendingException extends java.lang.IllegalStateException {
-    ctor public NoConnectionPendingException();
-  }
-
-  public class NonReadableChannelException extends java.lang.IllegalStateException {
-    ctor public NonReadableChannelException();
-  }
-
-  public class NonWritableChannelException extends java.lang.IllegalStateException {
-    ctor public NonWritableChannelException();
-  }
-
-  public class NotYetBoundException extends java.lang.IllegalStateException {
-    ctor public NotYetBoundException();
-  }
-
-  public class NotYetConnectedException extends java.lang.IllegalStateException {
-    ctor public NotYetConnectedException();
-  }
-
-  public class OverlappingFileLockException extends java.lang.IllegalStateException {
-    ctor public OverlappingFileLockException();
-  }
-
-  public abstract class Pipe {
-    ctor protected Pipe();
-    method public static java.nio.channels.Pipe open() throws java.io.IOException;
-    method public abstract java.nio.channels.Pipe.SinkChannel sink();
-    method public abstract java.nio.channels.Pipe.SourceChannel source();
-  }
-
-  public abstract static class Pipe.SinkChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.GatheringByteChannel java.nio.channels.WritableByteChannel {
-    ctor protected Pipe.SinkChannel(java.nio.channels.spi.SelectorProvider);
-    method public final int validOps();
-  }
-
-  public abstract static class Pipe.SourceChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ReadableByteChannel java.nio.channels.ScatteringByteChannel {
-    ctor protected Pipe.SourceChannel(java.nio.channels.spi.SelectorProvider);
-    method public final int validOps();
-  }
-
-  public class ReadPendingException extends java.lang.IllegalStateException {
-    ctor public ReadPendingException();
-  }
-
-  public interface ReadableByteChannel extends java.nio.channels.Channel {
-    method public int read(java.nio.ByteBuffer) throws java.io.IOException;
-  }
-
-  public interface ScatteringByteChannel extends java.nio.channels.ReadableByteChannel {
-    method public long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException;
-    method public long read(java.nio.ByteBuffer[]) throws java.io.IOException;
-  }
-
-  public interface SeekableByteChannel extends java.nio.channels.ByteChannel {
-    method public long position() throws java.io.IOException;
-    method public java.nio.channels.SeekableByteChannel position(long) throws java.io.IOException;
-    method public long size() throws java.io.IOException;
-    method public java.nio.channels.SeekableByteChannel truncate(long) throws java.io.IOException;
-  }
-
-  public abstract class SelectableChannel extends java.nio.channels.spi.AbstractInterruptibleChannel implements java.nio.channels.Channel {
-    ctor protected SelectableChannel();
-    method public abstract Object blockingLock();
-    method public abstract java.nio.channels.SelectableChannel configureBlocking(boolean) throws java.io.IOException;
-    method public abstract boolean isBlocking();
-    method public abstract boolean isRegistered();
-    method public abstract java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector);
-    method public abstract java.nio.channels.spi.SelectorProvider provider();
-    method public abstract java.nio.channels.SelectionKey register(java.nio.channels.Selector, int, Object) throws java.nio.channels.ClosedChannelException;
-    method public final java.nio.channels.SelectionKey register(java.nio.channels.Selector, int) throws java.nio.channels.ClosedChannelException;
-    method public abstract int validOps();
-  }
-
-  public abstract class SelectionKey {
-    ctor protected SelectionKey();
-    method public final Object attach(Object);
-    method public final Object attachment();
-    method public abstract void cancel();
-    method public abstract java.nio.channels.SelectableChannel channel();
-    method public abstract int interestOps();
-    method public abstract java.nio.channels.SelectionKey interestOps(int);
-    method public final boolean isAcceptable();
-    method public final boolean isConnectable();
-    method public final boolean isReadable();
-    method public abstract boolean isValid();
-    method public final boolean isWritable();
-    method public abstract int readyOps();
-    method public abstract java.nio.channels.Selector selector();
-    field public static final int OP_ACCEPT = 16; // 0x10
-    field public static final int OP_CONNECT = 8; // 0x8
-    field public static final int OP_READ = 1; // 0x1
-    field public static final int OP_WRITE = 4; // 0x4
-  }
-
-  public abstract class Selector implements java.io.Closeable {
-    ctor protected Selector();
-    method public abstract boolean isOpen();
-    method public abstract java.util.Set<java.nio.channels.SelectionKey> keys();
-    method public static java.nio.channels.Selector open() throws java.io.IOException;
-    method public abstract java.nio.channels.spi.SelectorProvider provider();
-    method public abstract int select(long) throws java.io.IOException;
-    method public abstract int select() throws java.io.IOException;
-    method public abstract int selectNow() throws java.io.IOException;
-    method public abstract java.util.Set<java.nio.channels.SelectionKey> selectedKeys();
-    method public abstract java.nio.channels.Selector wakeup();
-  }
-
-  public abstract class ServerSocketChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.NetworkChannel {
-    ctor protected ServerSocketChannel(java.nio.channels.spi.SelectorProvider);
-    method public abstract java.nio.channels.SocketChannel accept() throws java.io.IOException;
-    method public final java.nio.channels.ServerSocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract java.nio.channels.ServerSocketChannel bind(java.net.SocketAddress, int) throws java.io.IOException;
-    method public static java.nio.channels.ServerSocketChannel open() throws java.io.IOException;
-    method public abstract <T> java.nio.channels.ServerSocketChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-    method public abstract java.net.ServerSocket socket();
-    method public final int validOps();
-  }
-
-  public class ShutdownChannelGroupException extends java.lang.IllegalStateException {
-    ctor public ShutdownChannelGroupException();
-  }
-
-  public abstract class SocketChannel extends java.nio.channels.spi.AbstractSelectableChannel implements java.nio.channels.ByteChannel java.nio.channels.GatheringByteChannel java.nio.channels.NetworkChannel java.nio.channels.ScatteringByteChannel {
-    ctor protected SocketChannel(java.nio.channels.spi.SelectorProvider);
-    method public abstract java.nio.channels.SocketChannel bind(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract boolean connect(java.net.SocketAddress) throws java.io.IOException;
-    method public abstract boolean finishConnect() throws java.io.IOException;
-    method public abstract java.net.SocketAddress getRemoteAddress() throws java.io.IOException;
-    method public abstract boolean isConnected();
-    method public abstract boolean isConnectionPending();
-    method public static java.nio.channels.SocketChannel open() throws java.io.IOException;
-    method public static java.nio.channels.SocketChannel open(java.net.SocketAddress) throws java.io.IOException;
-    method public final long read(java.nio.ByteBuffer[]) throws java.io.IOException;
-    method public abstract <T> java.nio.channels.SocketChannel setOption(java.net.SocketOption<T>, T) throws java.io.IOException;
-    method public abstract java.nio.channels.SocketChannel shutdownInput() throws java.io.IOException;
-    method public abstract java.nio.channels.SocketChannel shutdownOutput() throws java.io.IOException;
-    method public abstract java.net.Socket socket();
-    method public final int validOps();
-    method public final long write(java.nio.ByteBuffer[]) throws java.io.IOException;
-  }
-
-  public class UnresolvedAddressException extends java.lang.IllegalArgumentException {
-    ctor public UnresolvedAddressException();
-  }
-
-  public class UnsupportedAddressTypeException extends java.lang.IllegalArgumentException {
-    ctor public UnsupportedAddressTypeException();
-  }
-
-  public interface WritableByteChannel extends java.nio.channels.Channel {
-    method public int write(java.nio.ByteBuffer) throws java.io.IOException;
-  }
-
-  public class WritePendingException extends java.lang.IllegalStateException {
-    ctor public WritePendingException();
-  }
-
-}
-
-package java.nio.channels.spi {
-
-  public abstract class AbstractInterruptibleChannel implements java.nio.channels.Channel java.nio.channels.InterruptibleChannel {
-    ctor protected AbstractInterruptibleChannel();
-    method protected final void begin();
-    method public final void close() throws java.io.IOException;
-    method protected final void end(boolean) throws java.nio.channels.AsynchronousCloseException;
-    method protected abstract void implCloseChannel() throws java.io.IOException;
-    method public final boolean isOpen();
-  }
-
-  public abstract class AbstractSelectableChannel extends java.nio.channels.SelectableChannel {
-    ctor protected AbstractSelectableChannel(java.nio.channels.spi.SelectorProvider);
-    method public final Object blockingLock();
-    method public final java.nio.channels.SelectableChannel configureBlocking(boolean) throws java.io.IOException;
-    method protected final void implCloseChannel() throws java.io.IOException;
-    method protected abstract void implCloseSelectableChannel() throws java.io.IOException;
-    method protected abstract void implConfigureBlocking(boolean) throws java.io.IOException;
-    method public final boolean isBlocking();
-    method public final boolean isRegistered();
-    method public final java.nio.channels.SelectionKey keyFor(java.nio.channels.Selector);
-    method public final java.nio.channels.spi.SelectorProvider provider();
-    method public final java.nio.channels.SelectionKey register(java.nio.channels.Selector, int, Object) throws java.nio.channels.ClosedChannelException;
-  }
-
-  public abstract class AbstractSelectionKey extends java.nio.channels.SelectionKey {
-    ctor protected AbstractSelectionKey();
-    method public final void cancel();
-    method public final boolean isValid();
-  }
-
-  public abstract class AbstractSelector extends java.nio.channels.Selector {
-    ctor protected AbstractSelector(java.nio.channels.spi.SelectorProvider);
-    method protected final void begin();
-    method protected final java.util.Set<java.nio.channels.SelectionKey> cancelledKeys();
-    method public final void close() throws java.io.IOException;
-    method protected final void deregister(java.nio.channels.spi.AbstractSelectionKey);
-    method protected final void end();
-    method protected abstract void implCloseSelector() throws java.io.IOException;
-    method public final boolean isOpen();
-    method public final java.nio.channels.spi.SelectorProvider provider();
-    method protected abstract java.nio.channels.SelectionKey register(java.nio.channels.spi.AbstractSelectableChannel, int, Object);
-  }
-
-  public abstract class AsynchronousChannelProvider {
-    ctor protected AsynchronousChannelProvider();
-    method public abstract java.nio.channels.AsynchronousChannelGroup openAsynchronousChannelGroup(int, java.util.concurrent.ThreadFactory) throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousChannelGroup openAsynchronousChannelGroup(java.util.concurrent.ExecutorService, int) throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousServerSocketChannel openAsynchronousServerSocketChannel(java.nio.channels.AsynchronousChannelGroup) throws java.io.IOException;
-    method public abstract java.nio.channels.AsynchronousSocketChannel openAsynchronousSocketChannel(java.nio.channels.AsynchronousChannelGroup) throws java.io.IOException;
-    method public static java.nio.channels.spi.AsynchronousChannelProvider provider();
-  }
-
-  public abstract class SelectorProvider {
-    ctor protected SelectorProvider();
-    method public java.nio.channels.Channel inheritedChannel() throws java.io.IOException;
-    method public abstract java.nio.channels.DatagramChannel openDatagramChannel() throws java.io.IOException;
-    method public abstract java.nio.channels.DatagramChannel openDatagramChannel(java.net.ProtocolFamily) throws java.io.IOException;
-    method public abstract java.nio.channels.Pipe openPipe() throws java.io.IOException;
-    method public abstract java.nio.channels.spi.AbstractSelector openSelector() throws java.io.IOException;
-    method public abstract java.nio.channels.ServerSocketChannel openServerSocketChannel() throws java.io.IOException;
-    method public abstract java.nio.channels.SocketChannel openSocketChannel() throws java.io.IOException;
-    method public static java.nio.channels.spi.SelectorProvider provider();
-  }
-
-}
-
-package java.nio.charset {
-
-  public class CharacterCodingException extends java.io.IOException {
-    ctor public CharacterCodingException();
-  }
-
-  public abstract class Charset implements java.lang.Comparable<java.nio.charset.Charset> {
-    ctor protected Charset(String, String[]);
-    method public final java.util.Set<java.lang.String> aliases();
-    method public static java.util.SortedMap<java.lang.String,java.nio.charset.Charset> availableCharsets();
-    method public boolean canEncode();
-    method public final int compareTo(java.nio.charset.Charset);
-    method public abstract boolean contains(java.nio.charset.Charset);
-    method public final java.nio.CharBuffer decode(java.nio.ByteBuffer);
-    method public static java.nio.charset.Charset defaultCharset();
-    method public String displayName();
-    method public String displayName(java.util.Locale);
-    method public final java.nio.ByteBuffer encode(java.nio.CharBuffer);
-    method public final java.nio.ByteBuffer encode(String);
-    method public final boolean equals(Object);
-    method public static java.nio.charset.Charset forName(String);
-    method public final int hashCode();
-    method public final boolean isRegistered();
-    method public static boolean isSupported(String);
-    method public final String name();
-    method public abstract java.nio.charset.CharsetDecoder newDecoder();
-    method public abstract java.nio.charset.CharsetEncoder newEncoder();
-    method public final String toString();
-  }
-
-  public abstract class CharsetDecoder {
-    ctor protected CharsetDecoder(java.nio.charset.Charset, float, float);
-    method public final float averageCharsPerByte();
-    method public final java.nio.charset.Charset charset();
-    method public final java.nio.charset.CoderResult decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean);
-    method public final java.nio.CharBuffer decode(java.nio.ByteBuffer) throws java.nio.charset.CharacterCodingException;
-    method protected abstract java.nio.charset.CoderResult decodeLoop(java.nio.ByteBuffer, java.nio.CharBuffer);
-    method public java.nio.charset.Charset detectedCharset();
-    method public final java.nio.charset.CoderResult flush(java.nio.CharBuffer);
-    method protected java.nio.charset.CoderResult implFlush(java.nio.CharBuffer);
-    method protected void implOnMalformedInput(java.nio.charset.CodingErrorAction);
-    method protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction);
-    method protected void implReplaceWith(String);
-    method protected void implReset();
-    method public boolean isAutoDetecting();
-    method public boolean isCharsetDetected();
-    method public java.nio.charset.CodingErrorAction malformedInputAction();
-    method public final float maxCharsPerByte();
-    method public final java.nio.charset.CharsetDecoder onMalformedInput(java.nio.charset.CodingErrorAction);
-    method public final java.nio.charset.CharsetDecoder onUnmappableCharacter(java.nio.charset.CodingErrorAction);
-    method public final java.nio.charset.CharsetDecoder replaceWith(String);
-    method public final String replacement();
-    method public final java.nio.charset.CharsetDecoder reset();
-    method public java.nio.charset.CodingErrorAction unmappableCharacterAction();
-  }
-
-  public abstract class CharsetEncoder {
-    ctor protected CharsetEncoder(java.nio.charset.Charset, float, float, byte[]);
-    ctor protected CharsetEncoder(java.nio.charset.Charset, float, float);
-    method public final float averageBytesPerChar();
-    method public boolean canEncode(char);
-    method public boolean canEncode(CharSequence);
-    method public final java.nio.charset.Charset charset();
-    method public final java.nio.charset.CoderResult encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean);
-    method public final java.nio.ByteBuffer encode(java.nio.CharBuffer) throws java.nio.charset.CharacterCodingException;
-    method protected abstract java.nio.charset.CoderResult encodeLoop(java.nio.CharBuffer, java.nio.ByteBuffer);
-    method public final java.nio.charset.CoderResult flush(java.nio.ByteBuffer);
-    method protected java.nio.charset.CoderResult implFlush(java.nio.ByteBuffer);
-    method protected void implOnMalformedInput(java.nio.charset.CodingErrorAction);
-    method protected void implOnUnmappableCharacter(java.nio.charset.CodingErrorAction);
-    method protected void implReplaceWith(byte[]);
-    method protected void implReset();
-    method public boolean isLegalReplacement(byte[]);
-    method public java.nio.charset.CodingErrorAction malformedInputAction();
-    method public final float maxBytesPerChar();
-    method public final java.nio.charset.CharsetEncoder onMalformedInput(java.nio.charset.CodingErrorAction);
-    method public final java.nio.charset.CharsetEncoder onUnmappableCharacter(java.nio.charset.CodingErrorAction);
-    method public final java.nio.charset.CharsetEncoder replaceWith(byte[]);
-    method public final byte[] replacement();
-    method public final java.nio.charset.CharsetEncoder reset();
-    method public java.nio.charset.CodingErrorAction unmappableCharacterAction();
-  }
-
-  public class CoderMalfunctionError extends java.lang.Error {
-    ctor public CoderMalfunctionError(Exception);
-  }
-
-  public class CoderResult {
-    method public boolean isError();
-    method public boolean isMalformed();
-    method public boolean isOverflow();
-    method public boolean isUnderflow();
-    method public boolean isUnmappable();
-    method public int length();
-    method public static java.nio.charset.CoderResult malformedForLength(int);
-    method public void throwException() throws java.nio.charset.CharacterCodingException;
-    method public static java.nio.charset.CoderResult unmappableForLength(int);
-    field public static final java.nio.charset.CoderResult OVERFLOW;
-    field public static final java.nio.charset.CoderResult UNDERFLOW;
-  }
-
-  public class CodingErrorAction {
-    field public static final java.nio.charset.CodingErrorAction IGNORE;
-    field public static final java.nio.charset.CodingErrorAction REPLACE;
-    field public static final java.nio.charset.CodingErrorAction REPORT;
-  }
-
-  public class IllegalCharsetNameException extends java.lang.IllegalArgumentException {
-    ctor public IllegalCharsetNameException(String);
-    method public String getCharsetName();
-  }
-
-  public class MalformedInputException extends java.nio.charset.CharacterCodingException {
-    ctor public MalformedInputException(int);
-    method public int getInputLength();
-  }
-
-  public final class StandardCharsets {
-    field public static final java.nio.charset.Charset ISO_8859_1;
-    field public static final java.nio.charset.Charset US_ASCII;
-    field public static final java.nio.charset.Charset UTF_16;
-    field public static final java.nio.charset.Charset UTF_16BE;
-    field public static final java.nio.charset.Charset UTF_16LE;
-    field public static final java.nio.charset.Charset UTF_8;
-  }
-
-  public class UnmappableCharacterException extends java.nio.charset.CharacterCodingException {
-    ctor public UnmappableCharacterException(int);
-    method public int getInputLength();
-  }
-
-  public class UnsupportedCharsetException extends java.lang.IllegalArgumentException {
-    ctor public UnsupportedCharsetException(String);
-    method public String getCharsetName();
-  }
-
-}
-
-package java.nio.charset.spi {
-
-  public abstract class CharsetProvider {
-    ctor protected CharsetProvider();
-    method public abstract java.nio.charset.Charset charsetForName(String);
-    method public abstract java.util.Iterator<java.nio.charset.Charset> charsets();
-  }
-
-}
-
-package java.nio.file {
-
-  public class AccessDeniedException extends java.nio.file.FileSystemException {
-    ctor public AccessDeniedException(String);
-    ctor public AccessDeniedException(String, String, String);
-  }
-
-  public enum AccessMode {
-    enum_constant public static final java.nio.file.AccessMode EXECUTE;
-    enum_constant public static final java.nio.file.AccessMode READ;
-    enum_constant public static final java.nio.file.AccessMode WRITE;
-  }
-
-  public class AtomicMoveNotSupportedException extends java.nio.file.FileSystemException {
-    ctor public AtomicMoveNotSupportedException(String, String, String);
-  }
-
-  public class ClosedDirectoryStreamException extends java.lang.IllegalStateException {
-    ctor public ClosedDirectoryStreamException();
-  }
-
-  public class ClosedFileSystemException extends java.lang.IllegalStateException {
-    ctor public ClosedFileSystemException();
-  }
-
-  public class ClosedWatchServiceException extends java.lang.IllegalStateException {
-    ctor public ClosedWatchServiceException();
-  }
-
-  public interface CopyOption {
-  }
-
-  public final class DirectoryIteratorException extends java.util.ConcurrentModificationException {
-    ctor public DirectoryIteratorException(java.io.IOException);
-    method public java.io.IOException getCause();
-  }
-
-  public class DirectoryNotEmptyException extends java.nio.file.FileSystemException {
-    ctor public DirectoryNotEmptyException(String);
-  }
-
-  public interface DirectoryStream<T> extends java.io.Closeable java.lang.Iterable<T> {
-  }
-
-  @java.lang.FunctionalInterface public static interface DirectoryStream.Filter<T> {
-    method public boolean accept(T) throws java.io.IOException;
-  }
-
-  public class FileAlreadyExistsException extends java.nio.file.FileSystemException {
-    ctor public FileAlreadyExistsException(String);
-    ctor public FileAlreadyExistsException(String, String, String);
-  }
-
-  public abstract class FileStore {
-    ctor protected FileStore();
-    method public abstract Object getAttribute(String) throws java.io.IOException;
-    method public abstract <V extends java.nio.file.attribute.FileStoreAttributeView> V getFileStoreAttributeView(Class<V>);
-    method public abstract long getTotalSpace() throws java.io.IOException;
-    method public abstract long getUnallocatedSpace() throws java.io.IOException;
-    method public abstract long getUsableSpace() throws java.io.IOException;
-    method public abstract boolean isReadOnly();
-    method public abstract String name();
-    method public abstract boolean supportsFileAttributeView(Class<? extends java.nio.file.attribute.FileAttributeView>);
-    method public abstract boolean supportsFileAttributeView(String);
-    method public abstract String type();
-  }
-
-  public abstract class FileSystem implements java.io.Closeable {
-    ctor protected FileSystem();
-    method public abstract Iterable<java.nio.file.FileStore> getFileStores();
-    method public abstract java.nio.file.Path getPath(String, java.lang.String...);
-    method public abstract java.nio.file.PathMatcher getPathMatcher(String);
-    method public abstract Iterable<java.nio.file.Path> getRootDirectories();
-    method public abstract String getSeparator();
-    method public abstract java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService();
-    method public abstract boolean isOpen();
-    method public abstract boolean isReadOnly();
-    method public abstract java.nio.file.WatchService newWatchService() throws java.io.IOException;
-    method public abstract java.nio.file.spi.FileSystemProvider provider();
-    method public abstract java.util.Set<java.lang.String> supportedFileAttributeViews();
-  }
-
-  public class FileSystemAlreadyExistsException extends java.lang.RuntimeException {
-    ctor public FileSystemAlreadyExistsException();
-    ctor public FileSystemAlreadyExistsException(String);
-  }
-
-  public class FileSystemException extends java.io.IOException {
-    ctor public FileSystemException(String);
-    ctor public FileSystemException(String, String, String);
-    method public String getFile();
-    method public String getOtherFile();
-    method public String getReason();
-  }
-
-  public class FileSystemLoopException extends java.nio.file.FileSystemException {
-    ctor public FileSystemLoopException(String);
-  }
-
-  public class FileSystemNotFoundException extends java.lang.RuntimeException {
-    ctor public FileSystemNotFoundException();
-    ctor public FileSystemNotFoundException(String);
-  }
-
-  public final class FileSystems {
-    method public static java.nio.file.FileSystem getDefault();
-    method public static java.nio.file.FileSystem getFileSystem(java.net.URI);
-    method public static java.nio.file.FileSystem newFileSystem(java.net.URI, java.util.Map<java.lang.String,?>) throws java.io.IOException;
-    method public static java.nio.file.FileSystem newFileSystem(java.net.URI, java.util.Map<java.lang.String,?>, ClassLoader) throws java.io.IOException;
-    method public static java.nio.file.FileSystem newFileSystem(java.nio.file.Path, ClassLoader) throws java.io.IOException;
-  }
-
-  public enum FileVisitOption {
-    enum_constant public static final java.nio.file.FileVisitOption FOLLOW_LINKS;
-  }
-
-  public enum FileVisitResult {
-    enum_constant public static final java.nio.file.FileVisitResult CONTINUE;
-    enum_constant public static final java.nio.file.FileVisitResult SKIP_SIBLINGS;
-    enum_constant public static final java.nio.file.FileVisitResult SKIP_SUBTREE;
-    enum_constant public static final java.nio.file.FileVisitResult TERMINATE;
-  }
-
-  public interface FileVisitor<T> {
-    method public java.nio.file.FileVisitResult postVisitDirectory(T, java.io.IOException) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult preVisitDirectory(T, java.nio.file.attribute.BasicFileAttributes) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult visitFile(T, java.nio.file.attribute.BasicFileAttributes) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult visitFileFailed(T, java.io.IOException) throws java.io.IOException;
-  }
-
-  public final class Files {
-    method public static java.nio.file.Path copy(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
-    method public static long copy(java.io.InputStream, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
-    method public static long copy(java.nio.file.Path, java.io.OutputStream) throws java.io.IOException;
-    method public static java.nio.file.Path createDirectories(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createFile(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createLink(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
-    method public static java.nio.file.Path createSymbolicLink(java.nio.file.Path, java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createTempDirectory(java.nio.file.Path, String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createTempDirectory(String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createTempFile(java.nio.file.Path, String, String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.file.Path createTempFile(String, String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static void delete(java.nio.file.Path) throws java.io.IOException;
-    method public static boolean deleteIfExists(java.nio.file.Path) throws java.io.IOException;
-    method public static boolean exists(java.nio.file.Path, java.nio.file.LinkOption...);
-    method public static java.util.stream.Stream<java.nio.file.Path> find(java.nio.file.Path, int, java.util.function.BiPredicate<java.nio.file.Path,java.nio.file.attribute.BasicFileAttributes>, java.nio.file.FileVisitOption...) throws java.io.IOException;
-    method public static Object getAttribute(java.nio.file.Path, String, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(java.nio.file.Path, Class<V>, java.nio.file.LinkOption...);
-    method public static java.nio.file.FileStore getFileStore(java.nio.file.Path) throws java.io.IOException;
-    method public static java.nio.file.attribute.FileTime getLastModifiedTime(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static java.nio.file.attribute.UserPrincipal getOwner(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPosixFilePermissions(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static boolean isDirectory(java.nio.file.Path, java.nio.file.LinkOption...);
-    method public static boolean isExecutable(java.nio.file.Path);
-    method public static boolean isHidden(java.nio.file.Path) throws java.io.IOException;
-    method public static boolean isReadable(java.nio.file.Path);
-    method public static boolean isRegularFile(java.nio.file.Path, java.nio.file.LinkOption...);
-    method public static boolean isSameFile(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
-    method public static boolean isSymbolicLink(java.nio.file.Path);
-    method public static boolean isWritable(java.nio.file.Path);
-    method public static java.util.stream.Stream<java.lang.String> lines(java.nio.file.Path, java.nio.charset.Charset) throws java.io.IOException;
-    method public static java.util.stream.Stream<java.lang.String> lines(java.nio.file.Path) throws java.io.IOException;
-    method public static java.util.stream.Stream<java.nio.file.Path> list(java.nio.file.Path) throws java.io.IOException;
-    method public static java.nio.file.Path move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
-    method public static java.io.BufferedReader newBufferedReader(java.nio.file.Path, java.nio.charset.Charset) throws java.io.IOException;
-    method public static java.io.BufferedReader newBufferedReader(java.nio.file.Path) throws java.io.IOException;
-    method public static java.io.BufferedWriter newBufferedWriter(java.nio.file.Path, java.nio.charset.Charset, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.io.BufferedWriter newBufferedWriter(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path) throws java.io.IOException;
-    method public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path, String) throws java.io.IOException;
-    method public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path>) throws java.io.IOException;
-    method public static java.io.InputStream newInputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.io.OutputStream newOutputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static boolean notExists(java.nio.file.Path, java.nio.file.LinkOption...);
-    method public static String probeContentType(java.nio.file.Path) throws java.io.IOException;
-    method public static byte[] readAllBytes(java.nio.file.Path) throws java.io.IOException;
-    method public static java.util.List<java.lang.String> readAllLines(java.nio.file.Path, java.nio.charset.Charset) throws java.io.IOException;
-    method public static java.util.List<java.lang.String> readAllLines(java.nio.file.Path) throws java.io.IOException;
-    method public static <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(java.nio.file.Path, Class<A>, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static java.util.Map<java.lang.String,java.lang.Object> readAttributes(java.nio.file.Path, String, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static java.nio.file.Path readSymbolicLink(java.nio.file.Path) throws java.io.IOException;
-    method public static java.nio.file.Path setAttribute(java.nio.file.Path, String, Object, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public static java.nio.file.Path setLastModifiedTime(java.nio.file.Path, java.nio.file.attribute.FileTime) throws java.io.IOException;
-    method public static java.nio.file.Path setOwner(java.nio.file.Path, java.nio.file.attribute.UserPrincipal) throws java.io.IOException;
-    method public static java.nio.file.Path setPosixFilePermissions(java.nio.file.Path, java.util.Set<java.nio.file.attribute.PosixFilePermission>) throws java.io.IOException;
-    method public static long size(java.nio.file.Path) throws java.io.IOException;
-    method public static java.util.stream.Stream<java.nio.file.Path> walk(java.nio.file.Path, int, java.nio.file.FileVisitOption...) throws java.io.IOException;
-    method public static java.util.stream.Stream<java.nio.file.Path> walk(java.nio.file.Path, java.nio.file.FileVisitOption...) throws java.io.IOException;
-    method public static java.nio.file.Path walkFileTree(java.nio.file.Path, java.util.Set<java.nio.file.FileVisitOption>, int, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
-    method public static java.nio.file.Path walkFileTree(java.nio.file.Path, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
-    method public static java.nio.file.Path write(java.nio.file.Path, byte[], java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.nio.file.Path write(java.nio.file.Path, Iterable<? extends java.lang.CharSequence>, java.nio.charset.Charset, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public static java.nio.file.Path write(java.nio.file.Path, Iterable<? extends java.lang.CharSequence>, java.nio.file.OpenOption...) throws java.io.IOException;
-  }
-
-  public class InvalidPathException extends java.lang.IllegalArgumentException {
-    ctor public InvalidPathException(String, String, int);
-    ctor public InvalidPathException(String, String);
-    method public int getIndex();
-    method public String getInput();
-    method public String getReason();
-  }
-
-  public enum LinkOption implements java.nio.file.CopyOption java.nio.file.OpenOption {
-    enum_constant public static final java.nio.file.LinkOption NOFOLLOW_LINKS;
-  }
-
-  public final class LinkPermission extends java.security.BasicPermission {
-    ctor public LinkPermission(String);
-    ctor public LinkPermission(String, String);
-  }
-
-  public class NoSuchFileException extends java.nio.file.FileSystemException {
-    ctor public NoSuchFileException(String);
-    ctor public NoSuchFileException(String, String, String);
-  }
-
-  public class NotDirectoryException extends java.nio.file.FileSystemException {
-    ctor public NotDirectoryException(String);
-  }
-
-  public class NotLinkException extends java.nio.file.FileSystemException {
-    ctor public NotLinkException(String);
-    ctor public NotLinkException(String, String, String);
-  }
-
-  public interface OpenOption {
-  }
-
-  public interface Path extends java.lang.Comparable<java.nio.file.Path> java.lang.Iterable<java.nio.file.Path> java.nio.file.Watchable {
-    method public int compareTo(java.nio.file.Path);
-    method public boolean endsWith(java.nio.file.Path);
-    method public boolean endsWith(String);
-    method public boolean equals(Object);
-    method public java.nio.file.Path getFileName();
-    method public java.nio.file.FileSystem getFileSystem();
-    method public java.nio.file.Path getName(int);
-    method public int getNameCount();
-    method public java.nio.file.Path getParent();
-    method public java.nio.file.Path getRoot();
-    method public int hashCode();
-    method public boolean isAbsolute();
-    method public java.util.Iterator<java.nio.file.Path> iterator();
-    method public java.nio.file.Path normalize();
-    method public java.nio.file.Path relativize(java.nio.file.Path);
-    method public java.nio.file.Path resolve(java.nio.file.Path);
-    method public java.nio.file.Path resolve(String);
-    method public java.nio.file.Path resolveSibling(java.nio.file.Path);
-    method public java.nio.file.Path resolveSibling(String);
-    method public boolean startsWith(java.nio.file.Path);
-    method public boolean startsWith(String);
-    method public java.nio.file.Path subpath(int, int);
-    method public java.nio.file.Path toAbsolutePath();
-    method public java.io.File toFile();
-    method public java.nio.file.Path toRealPath(java.nio.file.LinkOption...) throws java.io.IOException;
-    method public String toString();
-    method public java.net.URI toUri();
-  }
-
-  @java.lang.FunctionalInterface public interface PathMatcher {
-    method public boolean matches(java.nio.file.Path);
-  }
-
-  public final class Paths {
-    method public static java.nio.file.Path get(String, java.lang.String...);
-    method public static java.nio.file.Path get(java.net.URI);
-  }
-
-  public class ProviderMismatchException extends java.lang.IllegalArgumentException {
-    ctor public ProviderMismatchException();
-    ctor public ProviderMismatchException(String);
-  }
-
-  public class ProviderNotFoundException extends java.lang.RuntimeException {
-    ctor public ProviderNotFoundException();
-    ctor public ProviderNotFoundException(String);
-  }
-
-  public class ReadOnlyFileSystemException extends java.lang.UnsupportedOperationException {
-    ctor public ReadOnlyFileSystemException();
-  }
-
-  public interface SecureDirectoryStream<T> extends java.nio.file.DirectoryStream<T> {
-    method public void deleteDirectory(T) throws java.io.IOException;
-    method public void deleteFile(T) throws java.io.IOException;
-    method public <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(Class<V>);
-    method public <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(T, Class<V>, java.nio.file.LinkOption...);
-    method public void move(T, java.nio.file.SecureDirectoryStream<T>, T) throws java.io.IOException;
-    method public java.nio.channels.SeekableByteChannel newByteChannel(T, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public java.nio.file.SecureDirectoryStream<T> newDirectoryStream(T, java.nio.file.LinkOption...) throws java.io.IOException;
-  }
-
-  public class SimpleFileVisitor<T> implements java.nio.file.FileVisitor<T> {
-    ctor protected SimpleFileVisitor();
-    method public java.nio.file.FileVisitResult postVisitDirectory(T, java.io.IOException) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult preVisitDirectory(T, java.nio.file.attribute.BasicFileAttributes) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult visitFile(T, java.nio.file.attribute.BasicFileAttributes) throws java.io.IOException;
-    method public java.nio.file.FileVisitResult visitFileFailed(T, java.io.IOException) throws java.io.IOException;
-  }
-
-  public enum StandardCopyOption implements java.nio.file.CopyOption {
-    enum_constant public static final java.nio.file.StandardCopyOption ATOMIC_MOVE;
-    enum_constant public static final java.nio.file.StandardCopyOption COPY_ATTRIBUTES;
-    enum_constant public static final java.nio.file.StandardCopyOption REPLACE_EXISTING;
-  }
-
-  public enum StandardOpenOption implements java.nio.file.OpenOption {
-    enum_constant public static final java.nio.file.StandardOpenOption APPEND;
-    enum_constant public static final java.nio.file.StandardOpenOption CREATE;
-    enum_constant public static final java.nio.file.StandardOpenOption CREATE_NEW;
-    enum_constant public static final java.nio.file.StandardOpenOption DELETE_ON_CLOSE;
-    enum_constant public static final java.nio.file.StandardOpenOption DSYNC;
-    enum_constant public static final java.nio.file.StandardOpenOption READ;
-    enum_constant public static final java.nio.file.StandardOpenOption SPARSE;
-    enum_constant public static final java.nio.file.StandardOpenOption SYNC;
-    enum_constant public static final java.nio.file.StandardOpenOption TRUNCATE_EXISTING;
-    enum_constant public static final java.nio.file.StandardOpenOption WRITE;
-  }
-
-  public final class StandardWatchEventKinds {
-    field public static final java.nio.file.WatchEvent.Kind<java.nio.file.Path> ENTRY_CREATE;
-    field public static final java.nio.file.WatchEvent.Kind<java.nio.file.Path> ENTRY_DELETE;
-    field public static final java.nio.file.WatchEvent.Kind<java.nio.file.Path> ENTRY_MODIFY;
-    field public static final java.nio.file.WatchEvent.Kind<java.lang.Object> OVERFLOW;
-  }
-
-  public interface WatchEvent<T> {
-    method public T context();
-    method public int count();
-    method public java.nio.file.WatchEvent.Kind<T> kind();
-  }
-
-  public static interface WatchEvent.Kind<T> {
-    method public String name();
-    method public Class<T> type();
-  }
-
-  public static interface WatchEvent.Modifier {
-    method public String name();
-  }
-
-  public interface WatchKey {
-    method public void cancel();
-    method public boolean isValid();
-    method public java.util.List<java.nio.file.WatchEvent<?>> pollEvents();
-    method public boolean reset();
-    method public java.nio.file.Watchable watchable();
-  }
-
-  public interface WatchService extends java.io.Closeable {
-    method public java.nio.file.WatchKey poll();
-    method public java.nio.file.WatchKey poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public java.nio.file.WatchKey take() throws java.lang.InterruptedException;
-  }
-
-  public interface Watchable {
-    method public java.nio.file.WatchKey register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind<?>[], java.nio.file.WatchEvent.Modifier...) throws java.io.IOException;
-    method public java.nio.file.WatchKey register(java.nio.file.WatchService, java.nio.file.WatchEvent.Kind<?>...) throws java.io.IOException;
-  }
-
-}
-
-package java.nio.file.attribute {
-
-  public final class AclEntry {
-    method public java.util.Set<java.nio.file.attribute.AclEntryFlag> flags();
-    method public static java.nio.file.attribute.AclEntry.Builder newBuilder();
-    method public static java.nio.file.attribute.AclEntry.Builder newBuilder(java.nio.file.attribute.AclEntry);
-    method public java.util.Set<java.nio.file.attribute.AclEntryPermission> permissions();
-    method public java.nio.file.attribute.UserPrincipal principal();
-    method public java.nio.file.attribute.AclEntryType type();
-  }
-
-  public static final class AclEntry.Builder {
-    method public java.nio.file.attribute.AclEntry build();
-    method public java.nio.file.attribute.AclEntry.Builder setFlags(java.util.Set<java.nio.file.attribute.AclEntryFlag>);
-    method public java.nio.file.attribute.AclEntry.Builder setFlags(java.nio.file.attribute.AclEntryFlag...);
-    method public java.nio.file.attribute.AclEntry.Builder setPermissions(java.util.Set<java.nio.file.attribute.AclEntryPermission>);
-    method public java.nio.file.attribute.AclEntry.Builder setPermissions(java.nio.file.attribute.AclEntryPermission...);
-    method public java.nio.file.attribute.AclEntry.Builder setPrincipal(java.nio.file.attribute.UserPrincipal);
-    method public java.nio.file.attribute.AclEntry.Builder setType(java.nio.file.attribute.AclEntryType);
-  }
-
-  public enum AclEntryFlag {
-    enum_constant public static final java.nio.file.attribute.AclEntryFlag DIRECTORY_INHERIT;
-    enum_constant public static final java.nio.file.attribute.AclEntryFlag FILE_INHERIT;
-    enum_constant public static final java.nio.file.attribute.AclEntryFlag INHERIT_ONLY;
-    enum_constant public static final java.nio.file.attribute.AclEntryFlag NO_PROPAGATE_INHERIT;
-  }
-
-  public enum AclEntryPermission {
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission APPEND_DATA;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission DELETE;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission DELETE_CHILD;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission EXECUTE;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission READ_ACL;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission READ_ATTRIBUTES;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission READ_DATA;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission READ_NAMED_ATTRS;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission SYNCHRONIZE;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission WRITE_ACL;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission WRITE_ATTRIBUTES;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission WRITE_DATA;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission WRITE_NAMED_ATTRS;
-    enum_constant public static final java.nio.file.attribute.AclEntryPermission WRITE_OWNER;
-    field public static final java.nio.file.attribute.AclEntryPermission ADD_FILE;
-    field public static final java.nio.file.attribute.AclEntryPermission ADD_SUBDIRECTORY;
-    field public static final java.nio.file.attribute.AclEntryPermission LIST_DIRECTORY;
-  }
-
-  public enum AclEntryType {
-    enum_constant public static final java.nio.file.attribute.AclEntryType ALARM;
-    enum_constant public static final java.nio.file.attribute.AclEntryType ALLOW;
-    enum_constant public static final java.nio.file.attribute.AclEntryType AUDIT;
-    enum_constant public static final java.nio.file.attribute.AclEntryType DENY;
-  }
-
-  public interface AclFileAttributeView extends java.nio.file.attribute.FileOwnerAttributeView {
-    method public java.util.List<java.nio.file.attribute.AclEntry> getAcl() throws java.io.IOException;
-    method public void setAcl(java.util.List<java.nio.file.attribute.AclEntry>) throws java.io.IOException;
-  }
-
-  public interface AttributeView {
-    method public String name();
-  }
-
-  public interface BasicFileAttributeView extends java.nio.file.attribute.FileAttributeView {
-    method public java.nio.file.attribute.BasicFileAttributes readAttributes() throws java.io.IOException;
-    method public void setTimes(java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime, java.nio.file.attribute.FileTime) throws java.io.IOException;
-  }
-
-  public interface BasicFileAttributes {
-    method public java.nio.file.attribute.FileTime creationTime();
-    method public Object fileKey();
-    method public boolean isDirectory();
-    method public boolean isOther();
-    method public boolean isRegularFile();
-    method public boolean isSymbolicLink();
-    method public java.nio.file.attribute.FileTime lastAccessTime();
-    method public java.nio.file.attribute.FileTime lastModifiedTime();
-    method public long size();
-  }
-
-  public interface DosFileAttributeView extends java.nio.file.attribute.BasicFileAttributeView {
-    method public java.nio.file.attribute.DosFileAttributes readAttributes() throws java.io.IOException;
-    method public void setArchive(boolean) throws java.io.IOException;
-    method public void setHidden(boolean) throws java.io.IOException;
-    method public void setReadOnly(boolean) throws java.io.IOException;
-    method public void setSystem(boolean) throws java.io.IOException;
-  }
-
-  public interface DosFileAttributes extends java.nio.file.attribute.BasicFileAttributes {
-    method public boolean isArchive();
-    method public boolean isHidden();
-    method public boolean isReadOnly();
-    method public boolean isSystem();
-  }
-
-  public interface FileAttribute<T> {
-    method public String name();
-    method public T value();
-  }
-
-  public interface FileAttributeView extends java.nio.file.attribute.AttributeView {
-  }
-
-  public interface FileOwnerAttributeView extends java.nio.file.attribute.FileAttributeView {
-    method public java.nio.file.attribute.UserPrincipal getOwner() throws java.io.IOException;
-    method public void setOwner(java.nio.file.attribute.UserPrincipal) throws java.io.IOException;
-  }
-
-  public interface FileStoreAttributeView extends java.nio.file.attribute.AttributeView {
-  }
-
-  public final class FileTime implements java.lang.Comparable<java.nio.file.attribute.FileTime> {
-    method public int compareTo(java.nio.file.attribute.FileTime);
-    method public static java.nio.file.attribute.FileTime from(long, java.util.concurrent.TimeUnit);
-    method public static java.nio.file.attribute.FileTime from(java.time.Instant);
-    method public static java.nio.file.attribute.FileTime fromMillis(long);
-    method public long to(java.util.concurrent.TimeUnit);
-    method public java.time.Instant toInstant();
-    method public long toMillis();
-  }
-
-  public interface GroupPrincipal extends java.nio.file.attribute.UserPrincipal {
-  }
-
-  public interface PosixFileAttributeView extends java.nio.file.attribute.BasicFileAttributeView java.nio.file.attribute.FileOwnerAttributeView {
-    method public java.nio.file.attribute.PosixFileAttributes readAttributes() throws java.io.IOException;
-    method public void setGroup(java.nio.file.attribute.GroupPrincipal) throws java.io.IOException;
-    method public void setPermissions(java.util.Set<java.nio.file.attribute.PosixFilePermission>) throws java.io.IOException;
-  }
-
-  public interface PosixFileAttributes extends java.nio.file.attribute.BasicFileAttributes {
-    method public java.nio.file.attribute.GroupPrincipal group();
-    method public java.nio.file.attribute.UserPrincipal owner();
-    method public java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions();
-  }
-
-  public enum PosixFilePermission {
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission GROUP_EXECUTE;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission GROUP_READ;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission GROUP_WRITE;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OTHERS_EXECUTE;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OTHERS_READ;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OTHERS_WRITE;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OWNER_EXECUTE;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OWNER_READ;
-    enum_constant public static final java.nio.file.attribute.PosixFilePermission OWNER_WRITE;
-  }
-
-  public final class PosixFilePermissions {
-    method public static java.nio.file.attribute.FileAttribute<java.util.Set<java.nio.file.attribute.PosixFilePermission>> asFileAttribute(java.util.Set<java.nio.file.attribute.PosixFilePermission>);
-    method public static java.util.Set<java.nio.file.attribute.PosixFilePermission> fromString(String);
-    method public static String toString(java.util.Set<java.nio.file.attribute.PosixFilePermission>);
-  }
-
-  public interface UserDefinedFileAttributeView extends java.nio.file.attribute.FileAttributeView {
-    method public void delete(String) throws java.io.IOException;
-    method public java.util.List<java.lang.String> list() throws java.io.IOException;
-    method public int read(String, java.nio.ByteBuffer) throws java.io.IOException;
-    method public int size(String) throws java.io.IOException;
-    method public int write(String, java.nio.ByteBuffer) throws java.io.IOException;
-  }
-
-  public interface UserPrincipal extends java.security.Principal {
-  }
-
-  public abstract class UserPrincipalLookupService {
-    ctor protected UserPrincipalLookupService();
-    method public abstract java.nio.file.attribute.GroupPrincipal lookupPrincipalByGroupName(String) throws java.io.IOException;
-    method public abstract java.nio.file.attribute.UserPrincipal lookupPrincipalByName(String) throws java.io.IOException;
-  }
-
-  public class UserPrincipalNotFoundException extends java.io.IOException {
-    ctor public UserPrincipalNotFoundException(String);
-    method public String getName();
-  }
-
-}
-
-package java.nio.file.spi {
-
-  public abstract class FileSystemProvider {
-    ctor protected FileSystemProvider();
-    method public abstract void checkAccess(java.nio.file.Path, java.nio.file.AccessMode...) throws java.io.IOException;
-    method public abstract void copy(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
-    method public abstract void createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public void createLink(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
-    method public void createSymbolicLink(java.nio.file.Path, java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public abstract void delete(java.nio.file.Path) throws java.io.IOException;
-    method public boolean deleteIfExists(java.nio.file.Path) throws java.io.IOException;
-    method public abstract <V extends java.nio.file.attribute.FileAttributeView> V getFileAttributeView(java.nio.file.Path, Class<V>, java.nio.file.LinkOption...);
-    method public abstract java.nio.file.FileStore getFileStore(java.nio.file.Path) throws java.io.IOException;
-    method public abstract java.nio.file.FileSystem getFileSystem(java.net.URI);
-    method public abstract java.nio.file.Path getPath(java.net.URI);
-    method public abstract String getScheme();
-    method public static java.util.List<java.nio.file.spi.FileSystemProvider> installedProviders();
-    method public abstract boolean isHidden(java.nio.file.Path) throws java.io.IOException;
-    method public abstract boolean isSameFile(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
-    method public abstract void move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
-    method public java.nio.channels.AsynchronousFileChannel newAsynchronousFileChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.util.concurrent.ExecutorService, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public abstract java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public abstract java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path, java.nio.file.DirectoryStream.Filter<? super java.nio.file.Path>) throws java.io.IOException;
-    method public java.nio.channels.FileChannel newFileChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
-    method public abstract java.nio.file.FileSystem newFileSystem(java.net.URI, java.util.Map<java.lang.String,?>) throws java.io.IOException;
-    method public java.nio.file.FileSystem newFileSystem(java.nio.file.Path, java.util.Map<java.lang.String,?>) throws java.io.IOException;
-    method public java.io.InputStream newInputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public java.io.OutputStream newOutputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
-    method public abstract <A extends java.nio.file.attribute.BasicFileAttributes> A readAttributes(java.nio.file.Path, Class<A>, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public abstract java.util.Map<java.lang.String,java.lang.Object> readAttributes(java.nio.file.Path, String, java.nio.file.LinkOption...) throws java.io.IOException;
-    method public java.nio.file.Path readSymbolicLink(java.nio.file.Path) throws java.io.IOException;
-    method public abstract void setAttribute(java.nio.file.Path, String, Object, java.nio.file.LinkOption...) throws java.io.IOException;
-  }
-
-  public abstract class FileTypeDetector {
-    ctor protected FileTypeDetector();
-    method public abstract String probeContentType(java.nio.file.Path) throws java.io.IOException;
-  }
-
-}
-
-package java.security {
-
-  public final class AccessControlContext {
-    ctor public AccessControlContext(java.security.ProtectionDomain[]);
-    ctor public AccessControlContext(java.security.AccessControlContext, java.security.DomainCombiner);
-    method public void checkPermission(java.security.Permission) throws java.security.AccessControlException;
-    method public java.security.DomainCombiner getDomainCombiner();
-  }
-
-  public class AccessControlException extends java.lang.SecurityException {
-    ctor public AccessControlException(String);
-    ctor public AccessControlException(String, java.security.Permission);
-    method public java.security.Permission getPermission();
-  }
-
-  public final class AccessController {
-    method public static void checkPermission(java.security.Permission) throws java.security.AccessControlException;
-    method public static <T> T doPrivileged(java.security.PrivilegedAction<T>);
-    method public static <T> T doPrivileged(java.security.PrivilegedAction<T>, java.security.AccessControlContext);
-    method public static <T> T doPrivileged(java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
-    method public static <T> T doPrivileged(java.security.PrivilegedExceptionAction<T>, java.security.AccessControlContext) throws java.security.PrivilegedActionException;
-    method public static <T> T doPrivilegedWithCombiner(java.security.PrivilegedAction<T>);
-    method public static <T> T doPrivilegedWithCombiner(java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
-    method public static java.security.AccessControlContext getContext();
-  }
-
-  public interface AlgorithmConstraints {
-    method public boolean permits(java.util.Set<java.security.CryptoPrimitive>, String, java.security.AlgorithmParameters);
-    method public boolean permits(java.util.Set<java.security.CryptoPrimitive>, java.security.Key);
-    method public boolean permits(java.util.Set<java.security.CryptoPrimitive>, String, java.security.Key, java.security.AlgorithmParameters);
-  }
-
-  public class AlgorithmParameterGenerator {
-    ctor protected AlgorithmParameterGenerator(java.security.AlgorithmParameterGeneratorSpi, java.security.Provider, String);
-    method public final java.security.AlgorithmParameters generateParameters();
-    method public final String getAlgorithm();
-    method public static java.security.AlgorithmParameterGenerator getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.AlgorithmParameterGenerator getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.AlgorithmParameterGenerator getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final void init(int);
-    method public final void init(int, java.security.SecureRandom);
-    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
-    method public final void init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public abstract class AlgorithmParameterGeneratorSpi {
-    ctor public AlgorithmParameterGeneratorSpi();
-    method protected abstract java.security.AlgorithmParameters engineGenerateParameters();
-    method protected abstract void engineInit(int, java.security.SecureRandom);
-    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public class AlgorithmParameters {
-    ctor protected AlgorithmParameters(java.security.AlgorithmParametersSpi, java.security.Provider, String);
-    method public final String getAlgorithm();
-    method public final byte[] getEncoded() throws java.io.IOException;
-    method public final byte[] getEncoded(String) throws java.io.IOException;
-    method public static java.security.AlgorithmParameters getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.AlgorithmParameters getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.AlgorithmParameters getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final <T extends java.security.spec.AlgorithmParameterSpec> T getParameterSpec(Class<T>) throws java.security.spec.InvalidParameterSpecException;
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.spec.InvalidParameterSpecException;
-    method public final void init(byte[]) throws java.io.IOException;
-    method public final void init(byte[], String) throws java.io.IOException;
-    method public final String toString();
-  }
-
-  public abstract class AlgorithmParametersSpi {
-    ctor public AlgorithmParametersSpi();
-    method protected abstract byte[] engineGetEncoded() throws java.io.IOException;
-    method protected abstract byte[] engineGetEncoded(String) throws java.io.IOException;
-    method protected abstract <T extends java.security.spec.AlgorithmParameterSpec> T engineGetParameterSpec(Class<T>) throws java.security.spec.InvalidParameterSpecException;
-    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec) throws java.security.spec.InvalidParameterSpecException;
-    method protected abstract void engineInit(byte[]) throws java.io.IOException;
-    method protected abstract void engineInit(byte[], String) throws java.io.IOException;
-    method protected abstract String engineToString();
-  }
-
-  public final class AllPermission extends java.security.Permission {
-    ctor public AllPermission();
-    ctor public AllPermission(String, String);
-    method public String getActions();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public abstract class AuthProvider extends java.security.Provider {
-    ctor protected AuthProvider(String, double, String);
-    method public abstract void login(javax.security.auth.Subject, javax.security.auth.callback.CallbackHandler) throws javax.security.auth.login.LoginException;
-    method public abstract void logout() throws javax.security.auth.login.LoginException;
-    method public abstract void setCallbackHandler(javax.security.auth.callback.CallbackHandler);
-  }
-
-  public abstract class BasicPermission extends java.security.Permission implements java.io.Serializable {
-    ctor public BasicPermission(String);
-    ctor public BasicPermission(String, String);
-    method public String getActions();
-    method public boolean implies(java.security.Permission);
-  }
-
-  @Deprecated public interface Certificate {
-    method @Deprecated public void decode(java.io.InputStream) throws java.io.IOException, java.security.KeyException;
-    method @Deprecated public void encode(java.io.OutputStream) throws java.io.IOException, java.security.KeyException;
-    method @Deprecated public String getFormat();
-    method @Deprecated public java.security.Principal getGuarantor();
-    method @Deprecated public java.security.Principal getPrincipal();
-    method @Deprecated public java.security.PublicKey getPublicKey();
-    method @Deprecated public String toString(boolean);
-  }
-
-  public final class CodeSigner implements java.io.Serializable {
-    ctor public CodeSigner(java.security.cert.CertPath, java.security.Timestamp);
-    method public java.security.cert.CertPath getSignerCertPath();
-    method public java.security.Timestamp getTimestamp();
-  }
-
-  public class CodeSource implements java.io.Serializable {
-    ctor public CodeSource(java.net.URL, java.security.cert.Certificate[]);
-    ctor public CodeSource(java.net.URL, java.security.CodeSigner[]);
-    method public final java.security.cert.Certificate[] getCertificates();
-    method public final java.security.CodeSigner[] getCodeSigners();
-    method public final java.net.URL getLocation();
-    method public boolean implies(java.security.CodeSource);
-  }
-
-  public enum CryptoPrimitive {
-    enum_constant public static final java.security.CryptoPrimitive BLOCK_CIPHER;
-    enum_constant public static final java.security.CryptoPrimitive KEY_AGREEMENT;
-    enum_constant public static final java.security.CryptoPrimitive KEY_ENCAPSULATION;
-    enum_constant public static final java.security.CryptoPrimitive KEY_WRAP;
-    enum_constant public static final java.security.CryptoPrimitive MAC;
-    enum_constant public static final java.security.CryptoPrimitive MESSAGE_DIGEST;
-    enum_constant public static final java.security.CryptoPrimitive PUBLIC_KEY_ENCRYPTION;
-    enum_constant public static final java.security.CryptoPrimitive SECURE_RANDOM;
-    enum_constant public static final java.security.CryptoPrimitive SIGNATURE;
-    enum_constant public static final java.security.CryptoPrimitive STREAM_CIPHER;
-  }
-
-  public class DigestException extends java.security.GeneralSecurityException {
-    ctor public DigestException();
-    ctor public DigestException(String);
-    ctor public DigestException(String, Throwable);
-    ctor public DigestException(Throwable);
-  }
-
-  public class DigestInputStream extends java.io.FilterInputStream {
-    ctor public DigestInputStream(java.io.InputStream, java.security.MessageDigest);
-    method public java.security.MessageDigest getMessageDigest();
-    method public void on(boolean);
-    method public void setMessageDigest(java.security.MessageDigest);
-    field protected java.security.MessageDigest digest;
-  }
-
-  public class DigestOutputStream extends java.io.FilterOutputStream {
-    ctor public DigestOutputStream(java.io.OutputStream, java.security.MessageDigest);
-    method public java.security.MessageDigest getMessageDigest();
-    method public void on(boolean);
-    method public void setMessageDigest(java.security.MessageDigest);
-    field protected java.security.MessageDigest digest;
-  }
-
-  public interface DomainCombiner {
-    method public java.security.ProtectionDomain[] combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[]);
-  }
-
-  public final class DomainLoadStoreParameter implements java.security.KeyStore.LoadStoreParameter {
-    ctor public DomainLoadStoreParameter(java.net.URI, java.util.Map<java.lang.String,java.security.KeyStore.ProtectionParameter>);
-    method public java.net.URI getConfiguration();
-    method public java.security.KeyStore.ProtectionParameter getProtectionParameter();
-    method public java.util.Map<java.lang.String,java.security.KeyStore.ProtectionParameter> getProtectionParams();
-  }
-
-  public class GeneralSecurityException extends java.lang.Exception {
-    ctor public GeneralSecurityException();
-    ctor public GeneralSecurityException(String);
-    ctor public GeneralSecurityException(String, Throwable);
-    ctor public GeneralSecurityException(Throwable);
-  }
-
-  public interface Guard {
-    method public void checkGuard(Object) throws java.lang.SecurityException;
-  }
-
-  public class GuardedObject implements java.io.Serializable {
-    ctor public GuardedObject(Object, java.security.Guard);
-    method public Object getObject() throws java.lang.SecurityException;
-  }
-
-  @Deprecated public abstract class Identity implements java.security.Principal java.io.Serializable {
-    ctor @Deprecated protected Identity();
-    ctor @Deprecated public Identity(String, java.security.IdentityScope) throws java.security.KeyManagementException;
-    ctor @Deprecated public Identity(String);
-    method @Deprecated public void addCertificate(java.security.Certificate) throws java.security.KeyManagementException;
-    method @Deprecated public java.security.Certificate[] certificates();
-    method @Deprecated public final boolean equals(Object);
-    method @Deprecated public String getInfo();
-    method @Deprecated public final String getName();
-    method @Deprecated public java.security.PublicKey getPublicKey();
-    method @Deprecated public final java.security.IdentityScope getScope();
-    method @Deprecated protected boolean identityEquals(java.security.Identity);
-    method @Deprecated public void removeCertificate(java.security.Certificate) throws java.security.KeyManagementException;
-    method @Deprecated public void setInfo(String);
-    method @Deprecated public void setPublicKey(java.security.PublicKey) throws java.security.KeyManagementException;
-    method @Deprecated public String toString(boolean);
-  }
-
-  @Deprecated public abstract class IdentityScope extends java.security.Identity {
-    ctor @Deprecated protected IdentityScope();
-    ctor @Deprecated public IdentityScope(String);
-    ctor @Deprecated public IdentityScope(String, java.security.IdentityScope) throws java.security.KeyManagementException;
-    method @Deprecated public abstract void addIdentity(java.security.Identity) throws java.security.KeyManagementException;
-    method @Deprecated public abstract java.security.Identity getIdentity(String);
-    method @Deprecated public java.security.Identity getIdentity(java.security.Principal);
-    method @Deprecated public abstract java.security.Identity getIdentity(java.security.PublicKey);
-    method @Deprecated public static java.security.IdentityScope getSystemScope();
-    method @Deprecated public abstract java.util.Enumeration<java.security.Identity> identities();
-    method @Deprecated public abstract void removeIdentity(java.security.Identity) throws java.security.KeyManagementException;
-    method @Deprecated protected static void setSystemScope(java.security.IdentityScope);
-    method @Deprecated public abstract int size();
-  }
-
-  public class InvalidAlgorithmParameterException extends java.security.GeneralSecurityException {
-    ctor public InvalidAlgorithmParameterException();
-    ctor public InvalidAlgorithmParameterException(String);
-    ctor public InvalidAlgorithmParameterException(String, Throwable);
-    ctor public InvalidAlgorithmParameterException(Throwable);
-  }
-
-  public class InvalidKeyException extends java.security.KeyException {
-    ctor public InvalidKeyException();
-    ctor public InvalidKeyException(String);
-    ctor public InvalidKeyException(String, Throwable);
-    ctor public InvalidKeyException(Throwable);
-  }
-
-  public class InvalidParameterException extends java.lang.IllegalArgumentException {
-    ctor public InvalidParameterException();
-    ctor public InvalidParameterException(String);
-  }
-
-  public interface Key extends java.io.Serializable {
-    method public String getAlgorithm();
-    method public byte[] getEncoded();
-    method public String getFormat();
-    field public static final long serialVersionUID = 6603384152749567654L; // 0x5ba3eee69414eea6L
-  }
-
-  public class KeyException extends java.security.GeneralSecurityException {
-    ctor public KeyException();
-    ctor public KeyException(String);
-    ctor public KeyException(String, Throwable);
-    ctor public KeyException(Throwable);
-  }
-
-  public class KeyFactory {
-    ctor protected KeyFactory(java.security.KeyFactorySpi, java.security.Provider, String);
-    method public final java.security.PrivateKey generatePrivate(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method public final java.security.PublicKey generatePublic(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method public final String getAlgorithm();
-    method public static java.security.KeyFactory getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.KeyFactory getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.KeyFactory getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final <T extends java.security.spec.KeySpec> T getKeySpec(java.security.Key, Class<T>) throws java.security.spec.InvalidKeySpecException;
-    method public final java.security.Provider getProvider();
-    method public final java.security.Key translateKey(java.security.Key) throws java.security.InvalidKeyException;
-  }
-
-  public abstract class KeyFactorySpi {
-    ctor public KeyFactorySpi();
-    method protected abstract java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method protected abstract java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method protected abstract <T extends java.security.spec.KeySpec> T engineGetKeySpec(java.security.Key, Class<T>) throws java.security.spec.InvalidKeySpecException;
-    method protected abstract java.security.Key engineTranslateKey(java.security.Key) throws java.security.InvalidKeyException;
-  }
-
-  public class KeyManagementException extends java.security.KeyException {
-    ctor public KeyManagementException();
-    ctor public KeyManagementException(String);
-    ctor public KeyManagementException(String, Throwable);
-    ctor public KeyManagementException(Throwable);
-  }
-
-  public final class KeyPair implements java.io.Serializable {
-    ctor public KeyPair(java.security.PublicKey, java.security.PrivateKey);
-    method public java.security.PrivateKey getPrivate();
-    method public java.security.PublicKey getPublic();
-  }
-
-  public abstract class KeyPairGenerator extends java.security.KeyPairGeneratorSpi {
-    ctor protected KeyPairGenerator(String);
-    method public final java.security.KeyPair genKeyPair();
-    method public java.security.KeyPair generateKeyPair();
-    method public String getAlgorithm();
-    method public static java.security.KeyPairGenerator getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.KeyPairGenerator getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.KeyPairGenerator getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public void initialize(int);
-    method public void initialize(int, java.security.SecureRandom);
-    method public void initialize(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public abstract class KeyPairGeneratorSpi {
-    ctor public KeyPairGeneratorSpi();
-    method public abstract java.security.KeyPair generateKeyPair();
-    method public abstract void initialize(int, java.security.SecureRandom);
-    method public void initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public class KeyRep implements java.io.Serializable {
-    ctor public KeyRep(java.security.KeyRep.Type, String, String, byte[]);
-    method protected Object readResolve() throws java.io.ObjectStreamException;
-  }
-
-  public enum KeyRep.Type {
-    enum_constant public static final java.security.KeyRep.Type PRIVATE;
-    enum_constant public static final java.security.KeyRep.Type PUBLIC;
-    enum_constant public static final java.security.KeyRep.Type SECRET;
-  }
-
-  public class KeyStore {
-    ctor protected KeyStore(java.security.KeyStoreSpi, java.security.Provider, String);
-    method public final java.util.Enumeration<java.lang.String> aliases() throws java.security.KeyStoreException;
-    method public final boolean containsAlias(String) throws java.security.KeyStoreException;
-    method public final void deleteEntry(String) throws java.security.KeyStoreException;
-    method public final boolean entryInstanceOf(String, Class<? extends java.security.KeyStore.Entry>) throws java.security.KeyStoreException;
-    method public final java.security.cert.Certificate getCertificate(String) throws java.security.KeyStoreException;
-    method public final String getCertificateAlias(java.security.cert.Certificate) throws java.security.KeyStoreException;
-    method public final java.security.cert.Certificate[] getCertificateChain(String) throws java.security.KeyStoreException;
-    method public final java.util.Date getCreationDate(String) throws java.security.KeyStoreException;
-    method public static final String getDefaultType();
-    method public final java.security.KeyStore.Entry getEntry(String, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableEntryException;
-    method public static java.security.KeyStore getInstance(String) throws java.security.KeyStoreException;
-    method public static java.security.KeyStore getInstance(String, String) throws java.security.KeyStoreException, java.security.NoSuchProviderException;
-    method public static java.security.KeyStore getInstance(String, java.security.Provider) throws java.security.KeyStoreException;
-    method public final java.security.Key getKey(String, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    method public final java.security.Provider getProvider();
-    method public final String getType();
-    method public final boolean isCertificateEntry(String) throws java.security.KeyStoreException;
-    method public final boolean isKeyEntry(String) throws java.security.KeyStoreException;
-    method public final void load(java.io.InputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-    method public final void load(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-    method public final void setCertificateEntry(String, java.security.cert.Certificate) throws java.security.KeyStoreException;
-    method public final void setEntry(String, java.security.KeyStore.Entry, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException;
-    method public final void setKeyEntry(String, java.security.Key, char[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
-    method public final void setKeyEntry(String, byte[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
-    method public final int size() throws java.security.KeyStoreException;
-    method public final void store(java.io.OutputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException;
-    method public final void store(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.KeyStoreException, java.security.NoSuchAlgorithmException;
-  }
-
-  public abstract static class KeyStore.Builder {
-    ctor protected KeyStore.Builder();
-    method public abstract java.security.KeyStore getKeyStore() throws java.security.KeyStoreException;
-    method public abstract java.security.KeyStore.ProtectionParameter getProtectionParameter(String) throws java.security.KeyStoreException;
-    method public static java.security.KeyStore.Builder newInstance(java.security.KeyStore, java.security.KeyStore.ProtectionParameter);
-    method public static java.security.KeyStore.Builder newInstance(String, java.security.Provider, java.io.File, java.security.KeyStore.ProtectionParameter);
-    method public static java.security.KeyStore.Builder newInstance(String, java.security.Provider, java.security.KeyStore.ProtectionParameter);
-  }
-
-  public static class KeyStore.CallbackHandlerProtection implements java.security.KeyStore.ProtectionParameter {
-    ctor public KeyStore.CallbackHandlerProtection(javax.security.auth.callback.CallbackHandler);
-    method public javax.security.auth.callback.CallbackHandler getCallbackHandler();
-  }
-
-  public static interface KeyStore.Entry {
-    method public default java.util.Set<java.security.KeyStore.Entry.Attribute> getAttributes();
-  }
-
-  public static interface KeyStore.Entry.Attribute {
-    method public String getName();
-    method public String getValue();
-  }
-
-  public static interface KeyStore.LoadStoreParameter {
-    method public java.security.KeyStore.ProtectionParameter getProtectionParameter();
-  }
-
-  public static class KeyStore.PasswordProtection implements javax.security.auth.Destroyable java.security.KeyStore.ProtectionParameter {
-    ctor public KeyStore.PasswordProtection(char[]);
-    ctor public KeyStore.PasswordProtection(char[], String, java.security.spec.AlgorithmParameterSpec);
-    method public char[] getPassword();
-    method public String getProtectionAlgorithm();
-    method public java.security.spec.AlgorithmParameterSpec getProtectionParameters();
-  }
-
-  public static final class KeyStore.PrivateKeyEntry implements java.security.KeyStore.Entry {
-    ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[]);
-    ctor public KeyStore.PrivateKeyEntry(java.security.PrivateKey, java.security.cert.Certificate[], java.util.Set<java.security.KeyStore.Entry.Attribute>);
-    method public java.security.cert.Certificate getCertificate();
-    method public java.security.cert.Certificate[] getCertificateChain();
-    method public java.security.PrivateKey getPrivateKey();
-  }
-
-  public static interface KeyStore.ProtectionParameter {
-  }
-
-  public static final class KeyStore.SecretKeyEntry implements java.security.KeyStore.Entry {
-    ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey);
-    ctor public KeyStore.SecretKeyEntry(javax.crypto.SecretKey, java.util.Set<java.security.KeyStore.Entry.Attribute>);
-    method public javax.crypto.SecretKey getSecretKey();
-  }
-
-  public static final class KeyStore.TrustedCertificateEntry implements java.security.KeyStore.Entry {
-    ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate);
-    ctor public KeyStore.TrustedCertificateEntry(java.security.cert.Certificate, java.util.Set<java.security.KeyStore.Entry.Attribute>);
-    method public java.security.cert.Certificate getTrustedCertificate();
-  }
-
-  public class KeyStoreException extends java.security.GeneralSecurityException {
-    ctor public KeyStoreException();
-    ctor public KeyStoreException(String);
-    ctor public KeyStoreException(String, Throwable);
-    ctor public KeyStoreException(Throwable);
-  }
-
-  public abstract class KeyStoreSpi {
-    ctor public KeyStoreSpi();
-    method public abstract java.util.Enumeration<java.lang.String> engineAliases();
-    method public abstract boolean engineContainsAlias(String);
-    method public abstract void engineDeleteEntry(String) throws java.security.KeyStoreException;
-    method public boolean engineEntryInstanceOf(String, Class<? extends java.security.KeyStore.Entry>);
-    method public abstract java.security.cert.Certificate engineGetCertificate(String);
-    method public abstract String engineGetCertificateAlias(java.security.cert.Certificate);
-    method public abstract java.security.cert.Certificate[] engineGetCertificateChain(String);
-    method public abstract java.util.Date engineGetCreationDate(String);
-    method public java.security.KeyStore.Entry engineGetEntry(String, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableEntryException;
-    method public abstract java.security.Key engineGetKey(String, char[]) throws java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    method public abstract boolean engineIsCertificateEntry(String);
-    method public abstract boolean engineIsKeyEntry(String);
-    method public abstract void engineLoad(java.io.InputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-    method public void engineLoad(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-    method public abstract void engineSetCertificateEntry(String, java.security.cert.Certificate) throws java.security.KeyStoreException;
-    method public void engineSetEntry(String, java.security.KeyStore.Entry, java.security.KeyStore.ProtectionParameter) throws java.security.KeyStoreException;
-    method public abstract void engineSetKeyEntry(String, java.security.Key, char[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
-    method public abstract void engineSetKeyEntry(String, byte[], java.security.cert.Certificate[]) throws java.security.KeyStoreException;
-    method public abstract int engineSize();
-    method public abstract void engineStore(java.io.OutputStream, char[]) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-    method public void engineStore(java.security.KeyStore.LoadStoreParameter) throws java.security.cert.CertificateException, java.io.IOException, java.security.NoSuchAlgorithmException;
-  }
-
-  public abstract class MessageDigest extends java.security.MessageDigestSpi {
-    ctor protected MessageDigest(@NonNull String);
-    method @NonNull public byte[] digest();
-    method public int digest(@NonNull byte[], int, int) throws java.security.DigestException;
-    method @NonNull public byte[] digest(@NonNull byte[]);
-    method @NonNull public final String getAlgorithm();
-    method public final int getDigestLength();
-    method @NonNull public static java.security.MessageDigest getInstance(@NonNull String) throws java.security.NoSuchAlgorithmException;
-    method @NonNull public static java.security.MessageDigest getInstance(@NonNull String, @NonNull String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method @NonNull public static java.security.MessageDigest getInstance(@NonNull String, @NonNull java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method @NonNull public final java.security.Provider getProvider();
-    method public static boolean isEqual(@Nullable byte[], @Nullable byte[]);
-    method public void reset();
-    method public void update(byte);
-    method public void update(@NonNull byte[], int, int);
-    method public void update(@NonNull byte[]);
-    method public final void update(@NonNull java.nio.ByteBuffer);
-  }
-
-  public abstract class MessageDigestSpi {
-    ctor public MessageDigestSpi();
-    method public Object clone() throws java.lang.CloneNotSupportedException;
-    method protected abstract byte[] engineDigest();
-    method protected int engineDigest(byte[], int, int) throws java.security.DigestException;
-    method protected int engineGetDigestLength();
-    method protected abstract void engineReset();
-    method protected abstract void engineUpdate(byte);
-    method protected abstract void engineUpdate(byte[], int, int);
-    method protected void engineUpdate(java.nio.ByteBuffer);
-  }
-
-  public class NoSuchAlgorithmException extends java.security.GeneralSecurityException {
-    ctor public NoSuchAlgorithmException();
-    ctor public NoSuchAlgorithmException(String);
-    ctor public NoSuchAlgorithmException(String, Throwable);
-    ctor public NoSuchAlgorithmException(Throwable);
-  }
-
-  public class NoSuchProviderException extends java.security.GeneralSecurityException {
-    ctor public NoSuchProviderException();
-    ctor public NoSuchProviderException(String);
-  }
-
-  public final class PKCS12Attribute implements java.security.KeyStore.Entry.Attribute {
-    ctor public PKCS12Attribute(String, String);
-    ctor public PKCS12Attribute(byte[]);
-    method public byte[] getEncoded();
-    method public String getName();
-    method public String getValue();
-  }
-
-  public abstract class Permission implements java.security.Guard java.io.Serializable {
-    ctor public Permission(String);
-    method public void checkGuard(Object) throws java.lang.SecurityException;
-    method public abstract String getActions();
-    method public final String getName();
-    method public abstract boolean implies(java.security.Permission);
-    method public java.security.PermissionCollection newPermissionCollection();
-  }
-
-  public abstract class PermissionCollection implements java.io.Serializable {
-    ctor public PermissionCollection();
-    method public abstract void add(java.security.Permission);
-    method public abstract java.util.Enumeration<java.security.Permission> elements();
-    method public abstract boolean implies(java.security.Permission);
-    method public boolean isReadOnly();
-    method public void setReadOnly();
-  }
-
-  public final class Permissions extends java.security.PermissionCollection implements java.io.Serializable {
-    ctor public Permissions();
-    method public void add(java.security.Permission);
-    method public java.util.Enumeration<java.security.Permission> elements();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public abstract class Policy {
-    ctor public Policy();
-    method public static java.security.Policy getInstance(String, java.security.Policy.Parameters) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.Policy getInstance(String, java.security.Policy.Parameters, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.Policy getInstance(String, java.security.Policy.Parameters, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public java.security.Policy.Parameters getParameters();
-    method public java.security.PermissionCollection getPermissions(java.security.CodeSource);
-    method public java.security.PermissionCollection getPermissions(java.security.ProtectionDomain);
-    method public static java.security.Policy getPolicy();
-    method public java.security.Provider getProvider();
-    method public String getType();
-    method public boolean implies(java.security.ProtectionDomain, java.security.Permission);
-    method public void refresh();
-    method public static void setPolicy(java.security.Policy);
-    field public static final java.security.PermissionCollection UNSUPPORTED_EMPTY_COLLECTION;
-  }
-
-  public static interface Policy.Parameters {
-  }
-
-  public abstract class PolicySpi {
-    ctor public PolicySpi();
-    method protected java.security.PermissionCollection engineGetPermissions(java.security.CodeSource);
-    method protected java.security.PermissionCollection engineGetPermissions(java.security.ProtectionDomain);
-    method protected abstract boolean engineImplies(java.security.ProtectionDomain, java.security.Permission);
-    method protected void engineRefresh();
-  }
-
-  public interface Principal {
-    method public boolean equals(Object);
-    method public String getName();
-    method public int hashCode();
-    method public default boolean implies(javax.security.auth.Subject);
-    method public String toString();
-  }
-
-  public interface PrivateKey extends java.security.Key javax.security.auth.Destroyable {
-    field public static final long serialVersionUID = 6034044314589513430L; // 0x53bd3b559a12c6d6L
-  }
-
-  public interface PrivilegedAction<T> {
-    method public T run();
-  }
-
-  public class PrivilegedActionException extends java.lang.Exception {
-    ctor public PrivilegedActionException(Exception);
-    method public Exception getException();
-  }
-
-  public interface PrivilegedExceptionAction<T> {
-    method public T run() throws java.lang.Exception;
-  }
-
-  public class ProtectionDomain {
-    ctor public ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection);
-    ctor public ProtectionDomain(java.security.CodeSource, java.security.PermissionCollection, ClassLoader, java.security.Principal[]);
-    method public final ClassLoader getClassLoader();
-    method public final java.security.CodeSource getCodeSource();
-    method public final java.security.PermissionCollection getPermissions();
-    method public final java.security.Principal[] getPrincipals();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public abstract class Provider extends java.util.Properties {
-    ctor protected Provider(String, double, String);
-    method public Object compute(Object, java.util.function.BiFunction<? super java.lang.Object,? super java.lang.Object,?>);
-    method public Object computeIfAbsent(Object, java.util.function.Function<? super java.lang.Object,?>);
-    method public Object computeIfPresent(Object, java.util.function.BiFunction<? super java.lang.Object,? super java.lang.Object,?>);
-    method public java.util.Enumeration<java.lang.Object> elements();
-    method public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet();
-    method public void forEach(java.util.function.BiConsumer<? super java.lang.Object,? super java.lang.Object>);
-    method public Object get(Object);
-    method public String getInfo();
-    method public String getName();
-    method public Object getOrDefault(Object, Object);
-    method public java.security.Provider.Service getService(String, String);
-    method public java.util.Set<java.security.Provider.Service> getServices();
-    method public double getVersion();
-    method public java.util.Set<java.lang.Object> keySet();
-    method public java.util.Enumeration<java.lang.Object> keys();
-    method public Object merge(Object, Object, java.util.function.BiFunction<? super java.lang.Object,? super java.lang.Object,?>);
-    method public Object put(Object, Object);
-    method public void putAll(java.util.Map<?,?>);
-    method public Object putIfAbsent(Object, Object);
-    method protected void putService(java.security.Provider.Service);
-    method public Object remove(Object);
-    method protected void removeService(java.security.Provider.Service);
-    method public boolean replace(Object, Object, Object);
-    method public Object replace(Object, Object);
-    method public void replaceAll(java.util.function.BiFunction<? super java.lang.Object,? super java.lang.Object,?>);
-    method public java.util.Collection<java.lang.Object> values();
-  }
-
-  public static class Provider.Service {
-    ctor public Provider.Service(java.security.Provider, String, String, String, java.util.List<java.lang.String>, java.util.Map<java.lang.String,java.lang.String>);
-    method public final String getAlgorithm();
-    method public final String getAttribute(String);
-    method public final String getClassName();
-    method public final java.security.Provider getProvider();
-    method public final String getType();
-    method public Object newInstance(Object) throws java.security.NoSuchAlgorithmException;
-    method public boolean supportsParameter(Object);
-  }
-
-  public class ProviderException extends java.lang.RuntimeException {
-    ctor public ProviderException();
-    ctor public ProviderException(String);
-    ctor public ProviderException(String, Throwable);
-    ctor public ProviderException(Throwable);
-  }
-
-  public interface PublicKey extends java.security.Key {
-    field public static final long serialVersionUID = 7187392471159151072L; // 0x63bebf5f40c219e0L
-  }
-
-  public class SecureClassLoader extends java.lang.ClassLoader {
-    ctor protected SecureClassLoader(ClassLoader);
-    ctor protected SecureClassLoader();
-    method protected final Class<?> defineClass(String, byte[], int, int, java.security.CodeSource);
-    method protected final Class<?> defineClass(String, java.nio.ByteBuffer, java.security.CodeSource);
-    method protected java.security.PermissionCollection getPermissions(java.security.CodeSource);
-  }
-
-  public class SecureRandom extends java.util.Random {
-    ctor public SecureRandom();
-    ctor public SecureRandom(byte[]);
-    ctor protected SecureRandom(java.security.SecureRandomSpi, java.security.Provider);
-    method public byte[] generateSeed(int);
-    method public String getAlgorithm();
-    method public static java.security.SecureRandom getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.SecureRandom getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.SecureRandom getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.SecureRandom getInstanceStrong() throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public static byte[] getSeed(int);
-    method protected final int next(int);
-    method public void setSeed(byte[]);
-  }
-
-  public abstract class SecureRandomSpi implements java.io.Serializable {
-    ctor public SecureRandomSpi();
-    method protected abstract byte[] engineGenerateSeed(int);
-    method protected abstract void engineNextBytes(byte[]);
-    method protected abstract void engineSetSeed(byte[]);
-  }
-
-  public final class Security {
-    method public static int addProvider(java.security.Provider);
-    method @Deprecated public static String getAlgorithmProperty(String, String);
-    method public static java.util.Set<java.lang.String> getAlgorithms(String);
-    method public static String getProperty(String);
-    method public static java.security.Provider getProvider(String);
-    method public static java.security.Provider[] getProviders();
-    method public static java.security.Provider[] getProviders(String);
-    method public static java.security.Provider[] getProviders(java.util.Map<java.lang.String,java.lang.String>);
-    method public static int insertProviderAt(java.security.Provider, int);
-    method public static void removeProvider(String);
-    method public static void setProperty(String, String);
-  }
-
-  public final class SecurityPermission extends java.security.BasicPermission {
-    ctor public SecurityPermission(String);
-    ctor public SecurityPermission(String, String);
-  }
-
-  public abstract class Signature extends java.security.SignatureSpi {
-    ctor protected Signature(String);
-    method public final String getAlgorithm();
-    method public static java.security.Signature getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.Signature getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.Signature getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method @Deprecated public final Object getParameter(String) throws java.security.InvalidParameterException;
-    method public final java.security.AlgorithmParameters getParameters();
-    method public final java.security.Provider getProvider();
-    method public final void initSign(java.security.PrivateKey) throws java.security.InvalidKeyException;
-    method public final void initSign(java.security.PrivateKey, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method public final void initVerify(java.security.PublicKey) throws java.security.InvalidKeyException;
-    method public final void initVerify(java.security.cert.Certificate) throws java.security.InvalidKeyException;
-    method @Deprecated public final void setParameter(String, Object) throws java.security.InvalidParameterException;
-    method public final void setParameter(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
-    method public final byte[] sign() throws java.security.SignatureException;
-    method public final int sign(byte[], int, int) throws java.security.SignatureException;
-    method public final void update(byte) throws java.security.SignatureException;
-    method public final void update(byte[]) throws java.security.SignatureException;
-    method public final void update(byte[], int, int) throws java.security.SignatureException;
-    method public final void update(java.nio.ByteBuffer) throws java.security.SignatureException;
-    method public final boolean verify(byte[]) throws java.security.SignatureException;
-    method public final boolean verify(byte[], int, int) throws java.security.SignatureException;
-    field protected static final int SIGN = 2; // 0x2
-    field protected static final int UNINITIALIZED = 0; // 0x0
-    field protected static final int VERIFY = 3; // 0x3
-    field protected int state;
-  }
-
-  public class SignatureException extends java.security.GeneralSecurityException {
-    ctor public SignatureException();
-    ctor public SignatureException(String);
-    ctor public SignatureException(String, Throwable);
-    ctor public SignatureException(Throwable);
-  }
-
-  public abstract class SignatureSpi {
-    ctor public SignatureSpi();
-    method public Object clone() throws java.lang.CloneNotSupportedException;
-    method @Deprecated protected abstract Object engineGetParameter(String) throws java.security.InvalidParameterException;
-    method protected java.security.AlgorithmParameters engineGetParameters();
-    method protected abstract void engineInitSign(java.security.PrivateKey) throws java.security.InvalidKeyException;
-    method protected void engineInitSign(java.security.PrivateKey, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method protected abstract void engineInitVerify(java.security.PublicKey) throws java.security.InvalidKeyException;
-    method @Deprecated protected abstract void engineSetParameter(String, Object) throws java.security.InvalidParameterException;
-    method protected void engineSetParameter(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
-    method protected abstract byte[] engineSign() throws java.security.SignatureException;
-    method protected int engineSign(byte[], int, int) throws java.security.SignatureException;
-    method protected abstract void engineUpdate(byte) throws java.security.SignatureException;
-    method protected abstract void engineUpdate(byte[], int, int) throws java.security.SignatureException;
-    method protected void engineUpdate(java.nio.ByteBuffer);
-    method protected abstract boolean engineVerify(byte[]) throws java.security.SignatureException;
-    method protected boolean engineVerify(byte[], int, int) throws java.security.SignatureException;
-    field protected java.security.SecureRandom appRandom;
-  }
-
-  public final class SignedObject implements java.io.Serializable {
-    ctor public SignedObject(java.io.Serializable, java.security.PrivateKey, java.security.Signature) throws java.io.IOException, java.security.InvalidKeyException, java.security.SignatureException;
-    method public String getAlgorithm();
-    method public Object getObject() throws java.lang.ClassNotFoundException, java.io.IOException;
-    method public byte[] getSignature();
-    method public boolean verify(java.security.PublicKey, java.security.Signature) throws java.security.InvalidKeyException, java.security.SignatureException;
-  }
-
-  @Deprecated public abstract class Signer extends java.security.Identity {
-    ctor @Deprecated protected Signer();
-    ctor @Deprecated public Signer(String);
-    ctor @Deprecated public Signer(String, java.security.IdentityScope) throws java.security.KeyManagementException;
-    method @Deprecated public java.security.PrivateKey getPrivateKey();
-    method @Deprecated public final void setKeyPair(java.security.KeyPair) throws java.security.InvalidParameterException, java.security.KeyException;
-  }
-
-  public final class Timestamp implements java.io.Serializable {
-    ctor public Timestamp(java.util.Date, java.security.cert.CertPath);
-    method public java.security.cert.CertPath getSignerCertPath();
-    method public java.util.Date getTimestamp();
-  }
-
-  public class UnrecoverableEntryException extends java.security.GeneralSecurityException {
-    ctor public UnrecoverableEntryException();
-    ctor public UnrecoverableEntryException(String);
-  }
-
-  public class UnrecoverableKeyException extends java.security.UnrecoverableEntryException {
-    ctor public UnrecoverableKeyException();
-    ctor public UnrecoverableKeyException(String);
-  }
-
-  public final class UnresolvedPermission extends java.security.Permission implements java.io.Serializable {
-    ctor public UnresolvedPermission(String, String, String, java.security.cert.Certificate[]);
-    method public String getActions();
-    method public String getUnresolvedActions();
-    method public java.security.cert.Certificate[] getUnresolvedCerts();
-    method public String getUnresolvedName();
-    method public String getUnresolvedType();
-    method public boolean implies(java.security.Permission);
-  }
-
-}
-
-package java.security.acl {
-
-  public interface Acl extends java.security.acl.Owner {
-    method public boolean addEntry(java.security.Principal, java.security.acl.AclEntry) throws java.security.acl.NotOwnerException;
-    method public boolean checkPermission(java.security.Principal, java.security.acl.Permission);
-    method public java.util.Enumeration<java.security.acl.AclEntry> entries();
-    method public String getName();
-    method public java.util.Enumeration<java.security.acl.Permission> getPermissions(java.security.Principal);
-    method public boolean removeEntry(java.security.Principal, java.security.acl.AclEntry) throws java.security.acl.NotOwnerException;
-    method public void setName(java.security.Principal, String) throws java.security.acl.NotOwnerException;
-    method public String toString();
-  }
-
-  public interface AclEntry extends java.lang.Cloneable {
-    method public boolean addPermission(java.security.acl.Permission);
-    method public boolean checkPermission(java.security.acl.Permission);
-    method public Object clone();
-    method public java.security.Principal getPrincipal();
-    method public boolean isNegative();
-    method public java.util.Enumeration<java.security.acl.Permission> permissions();
-    method public boolean removePermission(java.security.acl.Permission);
-    method public void setNegativePermissions();
-    method public boolean setPrincipal(java.security.Principal);
-    method public String toString();
-  }
-
-  public class AclNotFoundException extends java.lang.Exception {
-    ctor public AclNotFoundException();
-  }
-
-  public interface Group extends java.security.Principal {
-    method public boolean addMember(java.security.Principal);
-    method public boolean isMember(java.security.Principal);
-    method public java.util.Enumeration<? extends java.security.Principal> members();
-    method public boolean removeMember(java.security.Principal);
-  }
-
-  public class LastOwnerException extends java.lang.Exception {
-    ctor public LastOwnerException();
-  }
-
-  public class NotOwnerException extends java.lang.Exception {
-    ctor public NotOwnerException();
-  }
-
-  public interface Owner {
-    method public boolean addOwner(java.security.Principal, java.security.Principal) throws java.security.acl.NotOwnerException;
-    method public boolean deleteOwner(java.security.Principal, java.security.Principal) throws java.security.acl.LastOwnerException, java.security.acl.NotOwnerException;
-    method public boolean isOwner(java.security.Principal);
-  }
-
-  public interface Permission {
-  }
-
-}
-
-package java.security.cert {
-
-  public abstract class CRL {
-    ctor protected CRL(String);
-    method public final String getType();
-    method public abstract boolean isRevoked(java.security.cert.Certificate);
-    method public abstract String toString();
-  }
-
-  public class CRLException extends java.security.GeneralSecurityException {
-    ctor public CRLException();
-    ctor public CRLException(String);
-    ctor public CRLException(String, Throwable);
-    ctor public CRLException(Throwable);
-  }
-
-  public enum CRLReason {
-    enum_constant public static final java.security.cert.CRLReason AA_COMPROMISE;
-    enum_constant public static final java.security.cert.CRLReason AFFILIATION_CHANGED;
-    enum_constant public static final java.security.cert.CRLReason CA_COMPROMISE;
-    enum_constant public static final java.security.cert.CRLReason CERTIFICATE_HOLD;
-    enum_constant public static final java.security.cert.CRLReason CESSATION_OF_OPERATION;
-    enum_constant public static final java.security.cert.CRLReason KEY_COMPROMISE;
-    enum_constant public static final java.security.cert.CRLReason PRIVILEGE_WITHDRAWN;
-    enum_constant public static final java.security.cert.CRLReason REMOVE_FROM_CRL;
-    enum_constant public static final java.security.cert.CRLReason SUPERSEDED;
-    enum_constant public static final java.security.cert.CRLReason UNSPECIFIED;
-    enum_constant public static final java.security.cert.CRLReason UNUSED;
-  }
-
-  public interface CRLSelector extends java.lang.Cloneable {
-    method public Object clone();
-    method public boolean match(java.security.cert.CRL);
-  }
-
-  public abstract class CertPath implements java.io.Serializable {
-    ctor protected CertPath(String);
-    method public abstract java.util.List<? extends java.security.cert.Certificate> getCertificates();
-    method public abstract byte[] getEncoded() throws java.security.cert.CertificateEncodingException;
-    method public abstract byte[] getEncoded(String) throws java.security.cert.CertificateEncodingException;
-    method public abstract java.util.Iterator<java.lang.String> getEncodings();
-    method public String getType();
-    method protected Object writeReplace() throws java.io.ObjectStreamException;
-  }
-
-  protected static class CertPath.CertPathRep implements java.io.Serializable {
-    ctor protected CertPath.CertPathRep(String, byte[]);
-    method protected Object readResolve() throws java.io.ObjectStreamException;
-  }
-
-  public class CertPathBuilder {
-    ctor protected CertPathBuilder(java.security.cert.CertPathBuilderSpi, java.security.Provider, String);
-    method public final java.security.cert.CertPathBuilderResult build(java.security.cert.CertPathParameters) throws java.security.cert.CertPathBuilderException, java.security.InvalidAlgorithmParameterException;
-    method public final String getAlgorithm();
-    method public static final String getDefaultType();
-    method public static java.security.cert.CertPathBuilder getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.cert.CertPathBuilder getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.cert.CertPathBuilder getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final java.security.cert.CertPathChecker getRevocationChecker();
-  }
-
-  public class CertPathBuilderException extends java.security.GeneralSecurityException {
-    ctor public CertPathBuilderException();
-    ctor public CertPathBuilderException(String);
-    ctor public CertPathBuilderException(Throwable);
-    ctor public CertPathBuilderException(String, Throwable);
-  }
-
-  public interface CertPathBuilderResult extends java.lang.Cloneable {
-    method public Object clone();
-    method public java.security.cert.CertPath getCertPath();
-  }
-
-  public abstract class CertPathBuilderSpi {
-    ctor public CertPathBuilderSpi();
-    method public abstract java.security.cert.CertPathBuilderResult engineBuild(java.security.cert.CertPathParameters) throws java.security.cert.CertPathBuilderException, java.security.InvalidAlgorithmParameterException;
-    method public java.security.cert.CertPathChecker engineGetRevocationChecker();
-  }
-
-  public interface CertPathChecker {
-    method public void check(java.security.cert.Certificate) throws java.security.cert.CertPathValidatorException;
-    method public void init(boolean) throws java.security.cert.CertPathValidatorException;
-    method public boolean isForwardCheckingSupported();
-  }
-
-  public interface CertPathParameters extends java.lang.Cloneable {
-    method public Object clone();
-  }
-
-  public class CertPathValidator {
-    ctor protected CertPathValidator(java.security.cert.CertPathValidatorSpi, java.security.Provider, String);
-    method public final String getAlgorithm();
-    method public static final String getDefaultType();
-    method public static java.security.cert.CertPathValidator getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static java.security.cert.CertPathValidator getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.cert.CertPathValidator getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final java.security.cert.CertPathChecker getRevocationChecker();
-    method public final java.security.cert.CertPathValidatorResult validate(java.security.cert.CertPath, java.security.cert.CertPathParameters) throws java.security.cert.CertPathValidatorException, java.security.InvalidAlgorithmParameterException;
-  }
-
-  public class CertPathValidatorException extends java.security.GeneralSecurityException {
-    ctor public CertPathValidatorException();
-    ctor public CertPathValidatorException(String);
-    ctor public CertPathValidatorException(Throwable);
-    ctor public CertPathValidatorException(String, Throwable);
-    ctor public CertPathValidatorException(String, Throwable, java.security.cert.CertPath, int);
-    ctor public CertPathValidatorException(String, Throwable, java.security.cert.CertPath, int, java.security.cert.CertPathValidatorException.Reason);
-    method public java.security.cert.CertPath getCertPath();
-    method public int getIndex();
-    method public java.security.cert.CertPathValidatorException.Reason getReason();
-  }
-
-  public enum CertPathValidatorException.BasicReason implements java.security.cert.CertPathValidatorException.Reason {
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason ALGORITHM_CONSTRAINED;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason EXPIRED;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason INVALID_SIGNATURE;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason NOT_YET_VALID;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason REVOKED;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason UNDETERMINED_REVOCATION_STATUS;
-    enum_constant public static final java.security.cert.CertPathValidatorException.BasicReason UNSPECIFIED;
-  }
-
-  public static interface CertPathValidatorException.Reason extends java.io.Serializable {
-  }
-
-  public interface CertPathValidatorResult extends java.lang.Cloneable {
-    method public Object clone();
-  }
-
-  public abstract class CertPathValidatorSpi {
-    ctor public CertPathValidatorSpi();
-    method public java.security.cert.CertPathChecker engineGetRevocationChecker();
-    method public abstract java.security.cert.CertPathValidatorResult engineValidate(java.security.cert.CertPath, java.security.cert.CertPathParameters) throws java.security.cert.CertPathValidatorException, java.security.InvalidAlgorithmParameterException;
-  }
-
-  public interface CertSelector extends java.lang.Cloneable {
-    method public Object clone();
-    method public boolean match(java.security.cert.Certificate);
-  }
-
-  public class CertStore {
-    ctor protected CertStore(java.security.cert.CertStoreSpi, java.security.Provider, String, java.security.cert.CertStoreParameters);
-    method public final java.util.Collection<? extends java.security.cert.CRL> getCRLs(java.security.cert.CRLSelector) throws java.security.cert.CertStoreException;
-    method public final java.security.cert.CertStoreParameters getCertStoreParameters();
-    method public final java.util.Collection<? extends java.security.cert.Certificate> getCertificates(java.security.cert.CertSelector) throws java.security.cert.CertStoreException;
-    method public static final String getDefaultType();
-    method public static java.security.cert.CertStore getInstance(String, java.security.cert.CertStoreParameters) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException;
-    method public static java.security.cert.CertStore getInstance(String, java.security.cert.CertStoreParameters, String) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static java.security.cert.CertStore getInstance(String, java.security.cert.CertStoreParameters, java.security.Provider) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final String getType();
-  }
-
-  public class CertStoreException extends java.security.GeneralSecurityException {
-    ctor public CertStoreException();
-    ctor public CertStoreException(String);
-    ctor public CertStoreException(Throwable);
-    ctor public CertStoreException(String, Throwable);
-  }
-
-  public interface CertStoreParameters extends java.lang.Cloneable {
-    method public Object clone();
-  }
-
-  public abstract class CertStoreSpi {
-    ctor public CertStoreSpi(java.security.cert.CertStoreParameters) throws java.security.InvalidAlgorithmParameterException;
-    method public abstract java.util.Collection<? extends java.security.cert.CRL> engineGetCRLs(java.security.cert.CRLSelector) throws java.security.cert.CertStoreException;
-    method public abstract java.util.Collection<? extends java.security.cert.Certificate> engineGetCertificates(java.security.cert.CertSelector) throws java.security.cert.CertStoreException;
-  }
-
-  public abstract class Certificate implements java.io.Serializable {
-    ctor protected Certificate(String);
-    method public abstract byte[] getEncoded() throws java.security.cert.CertificateEncodingException;
-    method public abstract java.security.PublicKey getPublicKey();
-    method public final String getType();
-    method public abstract String toString();
-    method public abstract void verify(java.security.PublicKey) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-    method public abstract void verify(java.security.PublicKey, String) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-    method public void verify(java.security.PublicKey, java.security.Provider) throws java.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
-    method protected Object writeReplace() throws java.io.ObjectStreamException;
-  }
-
-  protected static class Certificate.CertificateRep implements java.io.Serializable {
-    ctor protected Certificate.CertificateRep(String, byte[]);
-    method protected Object readResolve() throws java.io.ObjectStreamException;
-  }
-
-  public class CertificateEncodingException extends java.security.cert.CertificateException {
-    ctor public CertificateEncodingException();
-    ctor public CertificateEncodingException(String);
-    ctor public CertificateEncodingException(String, Throwable);
-    ctor public CertificateEncodingException(Throwable);
-  }
-
-  public class CertificateException extends java.security.GeneralSecurityException {
-    ctor public CertificateException();
-    ctor public CertificateException(String);
-    ctor public CertificateException(String, Throwable);
-    ctor public CertificateException(Throwable);
-  }
-
-  public class CertificateExpiredException extends java.security.cert.CertificateException {
-    ctor public CertificateExpiredException();
-    ctor public CertificateExpiredException(String);
-  }
-
-  public class CertificateFactory {
-    ctor protected CertificateFactory(java.security.cert.CertificateFactorySpi, java.security.Provider, String);
-    method public final java.security.cert.CRL generateCRL(java.io.InputStream) throws java.security.cert.CRLException;
-    method public final java.util.Collection<? extends java.security.cert.CRL> generateCRLs(java.io.InputStream) throws java.security.cert.CRLException;
-    method public final java.security.cert.CertPath generateCertPath(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public final java.security.cert.CertPath generateCertPath(java.io.InputStream, String) throws java.security.cert.CertificateException;
-    method public final java.security.cert.CertPath generateCertPath(java.util.List<? extends java.security.cert.Certificate>) throws java.security.cert.CertificateException;
-    method public final java.security.cert.Certificate generateCertificate(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public final java.util.Collection<? extends java.security.cert.Certificate> generateCertificates(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public final java.util.Iterator<java.lang.String> getCertPathEncodings();
-    method public static final java.security.cert.CertificateFactory getInstance(String) throws java.security.cert.CertificateException;
-    method public static final java.security.cert.CertificateFactory getInstance(String, String) throws java.security.cert.CertificateException, java.security.NoSuchProviderException;
-    method public static final java.security.cert.CertificateFactory getInstance(String, java.security.Provider) throws java.security.cert.CertificateException;
-    method public final java.security.Provider getProvider();
-    method public final String getType();
-  }
-
-  public abstract class CertificateFactorySpi {
-    ctor public CertificateFactorySpi();
-    method public abstract java.security.cert.CRL engineGenerateCRL(java.io.InputStream) throws java.security.cert.CRLException;
-    method public abstract java.util.Collection<? extends java.security.cert.CRL> engineGenerateCRLs(java.io.InputStream) throws java.security.cert.CRLException;
-    method public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public java.security.cert.CertPath engineGenerateCertPath(java.io.InputStream, String) throws java.security.cert.CertificateException;
-    method public java.security.cert.CertPath engineGenerateCertPath(java.util.List<? extends java.security.cert.Certificate>) throws java.security.cert.CertificateException;
-    method public abstract java.security.cert.Certificate engineGenerateCertificate(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public abstract java.util.Collection<? extends java.security.cert.Certificate> engineGenerateCertificates(java.io.InputStream) throws java.security.cert.CertificateException;
-    method public java.util.Iterator<java.lang.String> engineGetCertPathEncodings();
-  }
-
-  public class CertificateNotYetValidException extends java.security.cert.CertificateException {
-    ctor public CertificateNotYetValidException();
-    ctor public CertificateNotYetValidException(String);
-  }
-
-  public class CertificateParsingException extends java.security.cert.CertificateException {
-    ctor public CertificateParsingException();
-    ctor public CertificateParsingException(String);
-    ctor public CertificateParsingException(String, Throwable);
-    ctor public CertificateParsingException(Throwable);
-  }
-
-  public class CertificateRevokedException extends java.security.cert.CertificateException {
-    ctor public CertificateRevokedException(java.util.Date, java.security.cert.CRLReason, javax.security.auth.x500.X500Principal, java.util.Map<java.lang.String,java.security.cert.Extension>);
-    method public javax.security.auth.x500.X500Principal getAuthorityName();
-    method public java.util.Map<java.lang.String,java.security.cert.Extension> getExtensions();
-    method public java.util.Date getInvalidityDate();
-    method public java.util.Date getRevocationDate();
-    method public java.security.cert.CRLReason getRevocationReason();
-  }
-
-  public class CollectionCertStoreParameters implements java.security.cert.CertStoreParameters {
-    ctor public CollectionCertStoreParameters(java.util.Collection<?>);
-    ctor public CollectionCertStoreParameters();
-    method public Object clone();
-    method public java.util.Collection<?> getCollection();
-  }
-
-  public interface Extension {
-    method public void encode(java.io.OutputStream) throws java.io.IOException;
-    method public String getId();
-    method public byte[] getValue();
-    method public boolean isCritical();
-  }
-
-  public class LDAPCertStoreParameters implements java.security.cert.CertStoreParameters {
-    ctor public LDAPCertStoreParameters(String, int);
-    ctor public LDAPCertStoreParameters(String);
-    ctor public LDAPCertStoreParameters();
-    method public Object clone();
-    method public int getPort();
-    method public String getServerName();
-  }
-
-  public class PKIXBuilderParameters extends java.security.cert.PKIXParameters {
-    ctor public PKIXBuilderParameters(java.util.Set<java.security.cert.TrustAnchor>, java.security.cert.CertSelector) throws java.security.InvalidAlgorithmParameterException;
-    ctor public PKIXBuilderParameters(java.security.KeyStore, java.security.cert.CertSelector) throws java.security.InvalidAlgorithmParameterException, java.security.KeyStoreException;
-    method public int getMaxPathLength();
-    method public void setMaxPathLength(int);
-  }
-
-  public class PKIXCertPathBuilderResult extends java.security.cert.PKIXCertPathValidatorResult implements java.security.cert.CertPathBuilderResult {
-    ctor public PKIXCertPathBuilderResult(java.security.cert.CertPath, java.security.cert.TrustAnchor, java.security.cert.PolicyNode, java.security.PublicKey);
-    method public java.security.cert.CertPath getCertPath();
-  }
-
-  public abstract class PKIXCertPathChecker implements java.security.cert.CertPathChecker java.lang.Cloneable {
-    ctor protected PKIXCertPathChecker();
-    method public abstract void check(java.security.cert.Certificate, java.util.Collection<java.lang.String>) throws java.security.cert.CertPathValidatorException;
-    method public void check(java.security.cert.Certificate) throws java.security.cert.CertPathValidatorException;
-    method public Object clone();
-    method public abstract java.util.Set<java.lang.String> getSupportedExtensions();
-  }
-
-  public class PKIXCertPathValidatorResult implements java.security.cert.CertPathValidatorResult {
-    ctor public PKIXCertPathValidatorResult(java.security.cert.TrustAnchor, java.security.cert.PolicyNode, java.security.PublicKey);
-    method public Object clone();
-    method public java.security.cert.PolicyNode getPolicyTree();
-    method public java.security.PublicKey getPublicKey();
-    method public java.security.cert.TrustAnchor getTrustAnchor();
-  }
-
-  public class PKIXParameters implements java.security.cert.CertPathParameters {
-    ctor public PKIXParameters(java.util.Set<java.security.cert.TrustAnchor>) throws java.security.InvalidAlgorithmParameterException;
-    ctor public PKIXParameters(java.security.KeyStore) throws java.security.InvalidAlgorithmParameterException, java.security.KeyStoreException;
-    method public void addCertPathChecker(java.security.cert.PKIXCertPathChecker);
-    method public void addCertStore(java.security.cert.CertStore);
-    method public Object clone();
-    method public java.util.List<java.security.cert.PKIXCertPathChecker> getCertPathCheckers();
-    method public java.util.List<java.security.cert.CertStore> getCertStores();
-    method public java.util.Date getDate();
-    method public java.util.Set<java.lang.String> getInitialPolicies();
-    method public boolean getPolicyQualifiersRejected();
-    method public String getSigProvider();
-    method public java.security.cert.CertSelector getTargetCertConstraints();
-    method public java.util.Set<java.security.cert.TrustAnchor> getTrustAnchors();
-    method public boolean isAnyPolicyInhibited();
-    method public boolean isExplicitPolicyRequired();
-    method public boolean isPolicyMappingInhibited();
-    method public boolean isRevocationEnabled();
-    method public void setAnyPolicyInhibited(boolean);
-    method public void setCertPathCheckers(java.util.List<java.security.cert.PKIXCertPathChecker>);
-    method public void setCertStores(java.util.List<java.security.cert.CertStore>);
-    method public void setDate(java.util.Date);
-    method public void setExplicitPolicyRequired(boolean);
-    method public void setInitialPolicies(java.util.Set<java.lang.String>);
-    method public void setPolicyMappingInhibited(boolean);
-    method public void setPolicyQualifiersRejected(boolean);
-    method public void setRevocationEnabled(boolean);
-    method public void setSigProvider(String);
-    method public void setTargetCertConstraints(java.security.cert.CertSelector);
-    method public void setTrustAnchors(java.util.Set<java.security.cert.TrustAnchor>) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public enum PKIXReason implements java.security.cert.CertPathValidatorException.Reason {
-    enum_constant public static final java.security.cert.PKIXReason INVALID_KEY_USAGE;
-    enum_constant public static final java.security.cert.PKIXReason INVALID_NAME;
-    enum_constant public static final java.security.cert.PKIXReason INVALID_POLICY;
-    enum_constant public static final java.security.cert.PKIXReason NAME_CHAINING;
-    enum_constant public static final java.security.cert.PKIXReason NOT_CA_CERT;
-    enum_constant public static final java.security.cert.PKIXReason NO_TRUST_ANCHOR;
-    enum_constant public static final java.security.cert.PKIXReason PATH_TOO_LONG;
-    enum_constant public static final java.security.cert.PKIXReason UNRECOGNIZED_CRIT_EXT;
-  }
-
-  public abstract class PKIXRevocationChecker extends java.security.cert.PKIXCertPathChecker {
-    ctor protected PKIXRevocationChecker();
-    method public java.security.cert.PKIXRevocationChecker clone();
-    method public java.util.List<java.security.cert.Extension> getOcspExtensions();
-    method public java.net.URI getOcspResponder();
-    method public java.security.cert.X509Certificate getOcspResponderCert();
-    method public java.util.Map<java.security.cert.X509Certificate,byte[]> getOcspResponses();
-    method public java.util.Set<java.security.cert.PKIXRevocationChecker.Option> getOptions();
-    method public abstract java.util.List<java.security.cert.CertPathValidatorException> getSoftFailExceptions();
-    method public void setOcspExtensions(java.util.List<java.security.cert.Extension>);
-    method public void setOcspResponder(java.net.URI);
-    method public void setOcspResponderCert(java.security.cert.X509Certificate);
-    method public void setOcspResponses(java.util.Map<java.security.cert.X509Certificate,byte[]>);
-    method public void setOptions(java.util.Set<java.security.cert.PKIXRevocationChecker.Option>);
-  }
-
-  public enum PKIXRevocationChecker.Option {
-    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option NO_FALLBACK;
-    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option ONLY_END_ENTITY;
-    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option PREFER_CRLS;
-    enum_constant public static final java.security.cert.PKIXRevocationChecker.Option SOFT_FAIL;
-  }
-
-  public interface PolicyNode {
-    method public java.util.Iterator<? extends java.security.cert.PolicyNode> getChildren();
-    method public int getDepth();
-    method public java.util.Set<java.lang.String> getExpectedPolicies();
-    method public java.security.cert.PolicyNode getParent();
-    method public java.util.Set<? extends java.security.cert.PolicyQualifierInfo> getPolicyQualifiers();
-    method public String getValidPolicy();
-    method public boolean isCritical();
-  }
-
-  public class PolicyQualifierInfo {
-    ctor public PolicyQualifierInfo(byte[]) throws java.io.IOException;
-    method public final byte[] getEncoded();
-    method public final byte[] getPolicyQualifier();
-    method public final String getPolicyQualifierId();
-  }
-
-  public class TrustAnchor {
-    ctor public TrustAnchor(java.security.cert.X509Certificate, byte[]);
-    ctor public TrustAnchor(javax.security.auth.x500.X500Principal, java.security.PublicKey, byte[]);
-    ctor public TrustAnchor(String, java.security.PublicKey, byte[]);
-    method public final javax.security.auth.x500.X500Principal getCA();
-    method public final String getCAName();
-    method public final java.security.PublicKey getCAPublicKey();
-    method public final byte[] getNameConstraints();
-    method public final java.security.cert.X509Certificate getTrustedCert();
-  }
-
-  public abstract class X509CRL extends java.security.cert.CRL implements java.security.cert.X509Extension {
-    ctor protected X509CRL();
-    method public abstract byte[] getEncoded() throws java.security.cert.CRLException;
-    method public abstract java.security.Principal getIssuerDN();
-    method public javax.security.auth.x500.X500Principal getIssuerX500Principal();
-    method public abstract java.util.Date getNextUpdate();
-    method public abstract java.security.cert.X509CRLEntry getRevokedCertificate(java.math.BigInteger);
-    method public java.security.cert.X509CRLEntry getRevokedCertificate(java.security.cert.X509Certificate);
-    method public abstract java.util.Set<? extends java.security.cert.X509CRLEntry> getRevokedCertificates();
-    method public abstract String getSigAlgName();
-    method public abstract String getSigAlgOID();
-    method public abstract byte[] getSigAlgParams();
-    method public abstract byte[] getSignature();
-    method public abstract byte[] getTBSCertList() throws java.security.cert.CRLException;
-    method public abstract java.util.Date getThisUpdate();
-    method public abstract int getVersion();
-    method public abstract void verify(java.security.PublicKey) throws java.security.cert.CRLException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-    method public abstract void verify(java.security.PublicKey, String) throws java.security.cert.CRLException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-    method public void verify(java.security.PublicKey, java.security.Provider) throws java.security.cert.CRLException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.SignatureException;
-  }
-
-  public abstract class X509CRLEntry implements java.security.cert.X509Extension {
-    ctor public X509CRLEntry();
-    method public javax.security.auth.x500.X500Principal getCertificateIssuer();
-    method public abstract byte[] getEncoded() throws java.security.cert.CRLException;
-    method public abstract java.util.Date getRevocationDate();
-    method public java.security.cert.CRLReason getRevocationReason();
-    method public abstract java.math.BigInteger getSerialNumber();
-    method public abstract boolean hasExtensions();
-    method public abstract String toString();
-  }
-
-  public class X509CRLSelector implements java.security.cert.CRLSelector {
-    ctor public X509CRLSelector();
-    method public void addIssuer(javax.security.auth.x500.X500Principal);
-    method public void addIssuerName(String) throws java.io.IOException;
-    method public void addIssuerName(byte[]) throws java.io.IOException;
-    method public Object clone();
-    method public java.security.cert.X509Certificate getCertificateChecking();
-    method public java.util.Date getDateAndTime();
-    method public java.util.Collection<java.lang.Object> getIssuerNames();
-    method public java.util.Collection<javax.security.auth.x500.X500Principal> getIssuers();
-    method public java.math.BigInteger getMaxCRL();
-    method public java.math.BigInteger getMinCRL();
-    method public boolean match(java.security.cert.CRL);
-    method public void setCertificateChecking(java.security.cert.X509Certificate);
-    method public void setDateAndTime(java.util.Date);
-    method public void setIssuerNames(java.util.Collection<?>) throws java.io.IOException;
-    method public void setIssuers(java.util.Collection<javax.security.auth.x500.X500Principal>);
-    method public void setMaxCRLNumber(java.math.BigInteger);
-    method public void setMinCRLNumber(java.math.BigInteger);
-  }
-
-  public class X509CertSelector implements java.security.cert.CertSelector {
-    ctor public X509CertSelector();
-    method public void addPathToName(int, String) throws java.io.IOException;
-    method public void addPathToName(int, byte[]) throws java.io.IOException;
-    method public void addSubjectAlternativeName(int, String) throws java.io.IOException;
-    method public void addSubjectAlternativeName(int, byte[]) throws java.io.IOException;
-    method public Object clone();
-    method public byte[] getAuthorityKeyIdentifier();
-    method public int getBasicConstraints();
-    method public java.security.cert.X509Certificate getCertificate();
-    method public java.util.Date getCertificateValid();
-    method public java.util.Set<java.lang.String> getExtendedKeyUsage();
-    method public javax.security.auth.x500.X500Principal getIssuer();
-    method public byte[] getIssuerAsBytes() throws java.io.IOException;
-    method public String getIssuerAsString();
-    method public boolean[] getKeyUsage();
-    method public boolean getMatchAllSubjectAltNames();
-    method public byte[] getNameConstraints();
-    method public java.util.Collection<java.util.List<?>> getPathToNames();
-    method public java.util.Set<java.lang.String> getPolicy();
-    method public java.util.Date getPrivateKeyValid();
-    method public java.math.BigInteger getSerialNumber();
-    method public javax.security.auth.x500.X500Principal getSubject();
-    method public java.util.Collection<java.util.List<?>> getSubjectAlternativeNames();
-    method public byte[] getSubjectAsBytes() throws java.io.IOException;
-    method public String getSubjectAsString();
-    method public byte[] getSubjectKeyIdentifier();
-    method public java.security.PublicKey getSubjectPublicKey();
-    method public String getSubjectPublicKeyAlgID();
-    method public boolean match(java.security.cert.Certificate);
-    method public void setAuthorityKeyIdentifier(byte[]);
-    method public void setBasicConstraints(int);
-    method public void setCertificate(java.security.cert.X509Certificate);
-    method public void setCertificateValid(java.util.Date);
-    method public void setExtendedKeyUsage(java.util.Set<java.lang.String>) throws java.io.IOException;
-    method public void setIssuer(javax.security.auth.x500.X500Principal);
-    method public void setIssuer(String) throws java.io.IOException;
-    method public void setIssuer(byte[]) throws java.io.IOException;
-    method public void setKeyUsage(boolean[]);
-    method public void setMatchAllSubjectAltNames(boolean);
-    method public void setNameConstraints(byte[]) throws java.io.IOException;
-    method public void setPathToNames(java.util.Collection<java.util.List<?>>) throws java.io.IOException;
-    method public void setPolicy(java.util.Set<java.lang.String>) throws java.io.IOException;
-    method public void setPrivateKeyValid(java.util.Date);
-    method public void setSerialNumber(java.math.BigInteger);
-    method public void setSubject(javax.security.auth.x500.X500Principal);
-    method public void setSubject(String) throws java.io.IOException;
-    method public void setSubject(byte[]) throws java.io.IOException;
-    method public void setSubjectAlternativeNames(java.util.Collection<java.util.List<?>>) throws java.io.IOException;
-    method public void setSubjectKeyIdentifier(byte[]);
-    method public void setSubjectPublicKey(java.security.PublicKey);
-    method public void setSubjectPublicKey(byte[]) throws java.io.IOException;
-    method public void setSubjectPublicKeyAlgID(String) throws java.io.IOException;
-  }
-
-  public abstract class X509Certificate extends java.security.cert.Certificate implements java.security.cert.X509Extension {
-    ctor protected X509Certificate();
-    method public abstract void checkValidity() throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException;
-    method public abstract void checkValidity(java.util.Date) throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException;
-    method public abstract int getBasicConstraints();
-    method public java.util.List<java.lang.String> getExtendedKeyUsage() throws java.security.cert.CertificateParsingException;
-    method public java.util.Collection<java.util.List<?>> getIssuerAlternativeNames() throws java.security.cert.CertificateParsingException;
-    method public abstract java.security.Principal getIssuerDN();
-    method public abstract boolean[] getIssuerUniqueID();
-    method public javax.security.auth.x500.X500Principal getIssuerX500Principal();
-    method public abstract boolean[] getKeyUsage();
-    method public abstract java.util.Date getNotAfter();
-    method public abstract java.util.Date getNotBefore();
-    method public abstract java.math.BigInteger getSerialNumber();
-    method public abstract String getSigAlgName();
-    method public abstract String getSigAlgOID();
-    method public abstract byte[] getSigAlgParams();
-    method public abstract byte[] getSignature();
-    method public java.util.Collection<java.util.List<?>> getSubjectAlternativeNames() throws java.security.cert.CertificateParsingException;
-    method public abstract java.security.Principal getSubjectDN();
-    method public abstract boolean[] getSubjectUniqueID();
-    method public javax.security.auth.x500.X500Principal getSubjectX500Principal();
-    method public abstract byte[] getTBSCertificate() throws java.security.cert.CertificateEncodingException;
-    method public abstract int getVersion();
-  }
-
-  public interface X509Extension {
-    method public java.util.Set<java.lang.String> getCriticalExtensionOIDs();
-    method public byte[] getExtensionValue(String);
-    method public java.util.Set<java.lang.String> getNonCriticalExtensionOIDs();
-    method public boolean hasUnsupportedCriticalExtension();
-  }
-
-}
-
-package java.security.interfaces {
-
-  public interface DSAKey {
-    method public java.security.interfaces.DSAParams getParams();
-  }
-
-  public interface DSAKeyPairGenerator {
-    method public void initialize(java.security.interfaces.DSAParams, java.security.SecureRandom) throws java.security.InvalidParameterException;
-    method public void initialize(int, boolean, java.security.SecureRandom) throws java.security.InvalidParameterException;
-  }
-
-  public interface DSAParams {
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getQ();
-  }
-
-  public interface DSAPrivateKey extends java.security.interfaces.DSAKey java.security.PrivateKey {
-    method public java.math.BigInteger getX();
-    field public static final long serialVersionUID = 7776497482533790279L; // 0x6bebab423b256247L
-  }
-
-  public interface DSAPublicKey extends java.security.interfaces.DSAKey java.security.PublicKey {
-    method public java.math.BigInteger getY();
-    field public static final long serialVersionUID = 1234526332779022332L; // 0x1121eb28ab28c7fcL
-  }
-
-  public interface ECKey {
-    method public java.security.spec.ECParameterSpec getParams();
-  }
-
-  public interface ECPrivateKey extends java.security.PrivateKey java.security.interfaces.ECKey {
-    method public java.math.BigInteger getS();
-    field public static final long serialVersionUID = -7896394956925609184L; // 0x926a5e9fa2435b20L
-  }
-
-  public interface ECPublicKey extends java.security.PublicKey java.security.interfaces.ECKey {
-    method public java.security.spec.ECPoint getW();
-    field public static final long serialVersionUID = -3314988629879632826L; // 0xd1fecb679990cc46L
-  }
-
-  public interface RSAKey {
-    method public java.math.BigInteger getModulus();
-  }
-
-  public interface RSAMultiPrimePrivateCrtKey extends java.security.interfaces.RSAPrivateKey {
-    method public java.math.BigInteger getCrtCoefficient();
-    method public java.security.spec.RSAOtherPrimeInfo[] getOtherPrimeInfo();
-    method public java.math.BigInteger getPrimeExponentP();
-    method public java.math.BigInteger getPrimeExponentQ();
-    method public java.math.BigInteger getPrimeP();
-    method public java.math.BigInteger getPrimeQ();
-    method public java.math.BigInteger getPublicExponent();
-    field public static final long serialVersionUID = 618058533534628008L; // 0x893c8f62dbaf8a8L
-  }
-
-  public interface RSAPrivateCrtKey extends java.security.interfaces.RSAPrivateKey {
-    method public java.math.BigInteger getCrtCoefficient();
-    method public java.math.BigInteger getPrimeExponentP();
-    method public java.math.BigInteger getPrimeExponentQ();
-    method public java.math.BigInteger getPrimeP();
-    method public java.math.BigInteger getPrimeQ();
-    method public java.math.BigInteger getPublicExponent();
-    field public static final long serialVersionUID = -5682214253527700368L; // 0xb124b83df8d1ec70L
-  }
-
-  public interface RSAPrivateKey extends java.security.PrivateKey java.security.interfaces.RSAKey {
-    method public java.math.BigInteger getPrivateExponent();
-    field public static final long serialVersionUID = 5187144804936595022L; // 0x47fc70b7a8c2364eL
-  }
-
-  public interface RSAPublicKey extends java.security.PublicKey java.security.interfaces.RSAKey {
-    method public java.math.BigInteger getPublicExponent();
-    field public static final long serialVersionUID = -8727434096241101194L; // 0x86e1ecedeceab676L
-  }
-
-}
-
-package java.security.spec {
-
-  public interface AlgorithmParameterSpec {
-  }
-
-  public class DSAParameterSpec implements java.security.spec.AlgorithmParameterSpec java.security.interfaces.DSAParams {
-    ctor public DSAParameterSpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getQ();
-  }
-
-  public class DSAPrivateKeySpec implements java.security.spec.KeySpec {
-    ctor public DSAPrivateKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getQ();
-    method public java.math.BigInteger getX();
-  }
-
-  public class DSAPublicKeySpec implements java.security.spec.KeySpec {
-    ctor public DSAPublicKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getQ();
-    method public java.math.BigInteger getY();
-  }
-
-  public interface ECField {
-    method public int getFieldSize();
-  }
-
-  public class ECFieldF2m implements java.security.spec.ECField {
-    ctor public ECFieldF2m(int);
-    ctor public ECFieldF2m(int, java.math.BigInteger);
-    ctor public ECFieldF2m(int, int[]);
-    method public int getFieldSize();
-    method public int getM();
-    method public int[] getMidTermsOfReductionPolynomial();
-    method public java.math.BigInteger getReductionPolynomial();
-  }
-
-  public class ECFieldFp implements java.security.spec.ECField {
-    ctor public ECFieldFp(java.math.BigInteger);
-    method public int getFieldSize();
-    method public java.math.BigInteger getP();
-  }
-
-  public class ECGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public ECGenParameterSpec(String);
-    method public String getName();
-  }
-
-  public class ECParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public ECParameterSpec(java.security.spec.EllipticCurve, java.security.spec.ECPoint, java.math.BigInteger, int);
-    method public int getCofactor();
-    method public java.security.spec.EllipticCurve getCurve();
-    method public java.security.spec.ECPoint getGenerator();
-    method public java.math.BigInteger getOrder();
-  }
-
-  public class ECPoint {
-    ctor public ECPoint(java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getAffineX();
-    method public java.math.BigInteger getAffineY();
-    field public static final java.security.spec.ECPoint POINT_INFINITY;
-  }
-
-  public class ECPrivateKeySpec implements java.security.spec.KeySpec {
-    ctor public ECPrivateKeySpec(java.math.BigInteger, java.security.spec.ECParameterSpec);
-    method public java.security.spec.ECParameterSpec getParams();
-    method public java.math.BigInteger getS();
-  }
-
-  public class ECPublicKeySpec implements java.security.spec.KeySpec {
-    ctor public ECPublicKeySpec(java.security.spec.ECPoint, java.security.spec.ECParameterSpec);
-    method public java.security.spec.ECParameterSpec getParams();
-    method public java.security.spec.ECPoint getW();
-  }
-
-  public class EllipticCurve {
-    ctor public EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger);
-    ctor public EllipticCurve(java.security.spec.ECField, java.math.BigInteger, java.math.BigInteger, byte[]);
-    method public java.math.BigInteger getA();
-    method public java.math.BigInteger getB();
-    method public java.security.spec.ECField getField();
-    method public byte[] getSeed();
-  }
-
-  public abstract class EncodedKeySpec implements java.security.spec.KeySpec {
-    ctor public EncodedKeySpec(byte[]);
-    method public byte[] getEncoded();
-    method public abstract String getFormat();
-  }
-
-  public class InvalidKeySpecException extends java.security.GeneralSecurityException {
-    ctor public InvalidKeySpecException();
-    ctor public InvalidKeySpecException(String);
-    ctor public InvalidKeySpecException(String, Throwable);
-    ctor public InvalidKeySpecException(Throwable);
-  }
-
-  public class InvalidParameterSpecException extends java.security.GeneralSecurityException {
-    ctor public InvalidParameterSpecException();
-    ctor public InvalidParameterSpecException(String);
-  }
-
-  public interface KeySpec {
-  }
-
-  public class MGF1ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public MGF1ParameterSpec(String);
-    method public String getDigestAlgorithm();
-    field public static final java.security.spec.MGF1ParameterSpec SHA1;
-    field public static final java.security.spec.MGF1ParameterSpec SHA224;
-    field public static final java.security.spec.MGF1ParameterSpec SHA256;
-    field public static final java.security.spec.MGF1ParameterSpec SHA384;
-    field public static final java.security.spec.MGF1ParameterSpec SHA512;
-  }
-
-  public class PKCS8EncodedKeySpec extends java.security.spec.EncodedKeySpec {
-    ctor public PKCS8EncodedKeySpec(byte[]);
-    method public final String getFormat();
-  }
-
-  public class PSSParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public PSSParameterSpec(String, String, java.security.spec.AlgorithmParameterSpec, int, int);
-    ctor public PSSParameterSpec(int);
-    method public String getDigestAlgorithm();
-    method public String getMGFAlgorithm();
-    method public java.security.spec.AlgorithmParameterSpec getMGFParameters();
-    method public int getSaltLength();
-    method public int getTrailerField();
-    field public static final java.security.spec.PSSParameterSpec DEFAULT;
-  }
-
-  public class RSAKeyGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public RSAKeyGenParameterSpec(int, java.math.BigInteger);
-    method public int getKeysize();
-    method public java.math.BigInteger getPublicExponent();
-    field public static final java.math.BigInteger F0;
-    field public static final java.math.BigInteger F4;
-  }
-
-  public class RSAMultiPrimePrivateCrtKeySpec extends java.security.spec.RSAPrivateKeySpec {
-    ctor public RSAMultiPrimePrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.security.spec.RSAOtherPrimeInfo[]);
-    method public java.math.BigInteger getCrtCoefficient();
-    method public java.security.spec.RSAOtherPrimeInfo[] getOtherPrimeInfo();
-    method public java.math.BigInteger getPrimeExponentP();
-    method public java.math.BigInteger getPrimeExponentQ();
-    method public java.math.BigInteger getPrimeP();
-    method public java.math.BigInteger getPrimeQ();
-    method public java.math.BigInteger getPublicExponent();
-  }
-
-  public class RSAOtherPrimeInfo {
-    ctor public RSAOtherPrimeInfo(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public final java.math.BigInteger getCrtCoefficient();
-    method public final java.math.BigInteger getExponent();
-    method public final java.math.BigInteger getPrime();
-  }
-
-  public class RSAPrivateCrtKeySpec extends java.security.spec.RSAPrivateKeySpec {
-    ctor public RSAPrivateCrtKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getCrtCoefficient();
-    method public java.math.BigInteger getPrimeExponentP();
-    method public java.math.BigInteger getPrimeExponentQ();
-    method public java.math.BigInteger getPrimeP();
-    method public java.math.BigInteger getPrimeQ();
-    method public java.math.BigInteger getPublicExponent();
-  }
-
-  public class RSAPrivateKeySpec implements java.security.spec.KeySpec {
-    ctor public RSAPrivateKeySpec(java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getModulus();
-    method public java.math.BigInteger getPrivateExponent();
-  }
-
-  public class RSAPublicKeySpec implements java.security.spec.KeySpec {
-    ctor public RSAPublicKeySpec(java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getModulus();
-    method public java.math.BigInteger getPublicExponent();
-  }
-
-  public class X509EncodedKeySpec extends java.security.spec.EncodedKeySpec {
-    ctor public X509EncodedKeySpec(byte[]);
-    method public final String getFormat();
-  }
-
-}
-
-package java.sql {
-
-  public interface Array {
-    method public void free() throws java.sql.SQLException;
-    method public Object getArray() throws java.sql.SQLException;
-    method public Object getArray(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public Object getArray(long, int) throws java.sql.SQLException;
-    method public Object getArray(long, int, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public int getBaseType() throws java.sql.SQLException;
-    method public String getBaseTypeName() throws java.sql.SQLException;
-    method public java.sql.ResultSet getResultSet() throws java.sql.SQLException;
-    method public java.sql.ResultSet getResultSet(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public java.sql.ResultSet getResultSet(long, int) throws java.sql.SQLException;
-    method public java.sql.ResultSet getResultSet(long, int, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-  }
-
-  public class BatchUpdateException extends java.sql.SQLException {
-    ctor public BatchUpdateException(String, String, int, int[]);
-    ctor public BatchUpdateException(String, String, int[]);
-    ctor public BatchUpdateException(String, int[]);
-    ctor public BatchUpdateException(int[]);
-    ctor public BatchUpdateException();
-    ctor public BatchUpdateException(Throwable);
-    ctor public BatchUpdateException(int[], Throwable);
-    ctor public BatchUpdateException(String, int[], Throwable);
-    ctor public BatchUpdateException(String, String, int[], Throwable);
-    ctor public BatchUpdateException(String, String, int, int[], Throwable);
-    method public int[] getUpdateCounts();
-  }
-
-  public interface Blob {
-    method public void free() throws java.sql.SQLException;
-    method public java.io.InputStream getBinaryStream() throws java.sql.SQLException;
-    method public java.io.InputStream getBinaryStream(long, long) throws java.sql.SQLException;
-    method public byte[] getBytes(long, int) throws java.sql.SQLException;
-    method public long length() throws java.sql.SQLException;
-    method public long position(byte[], long) throws java.sql.SQLException;
-    method public long position(java.sql.Blob, long) throws java.sql.SQLException;
-    method public java.io.OutputStream setBinaryStream(long) throws java.sql.SQLException;
-    method public int setBytes(long, byte[]) throws java.sql.SQLException;
-    method public int setBytes(long, byte[], int, int) throws java.sql.SQLException;
-    method public void truncate(long) throws java.sql.SQLException;
-  }
-
-  public interface CallableStatement extends java.sql.PreparedStatement {
-    method public java.sql.Array getArray(int) throws java.sql.SQLException;
-    method public java.sql.Array getArray(String) throws java.sql.SQLException;
-    method @Deprecated public java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
-    method public java.math.BigDecimal getBigDecimal(int) throws java.sql.SQLException;
-    method public java.math.BigDecimal getBigDecimal(String) throws java.sql.SQLException;
-    method public java.sql.Blob getBlob(int) throws java.sql.SQLException;
-    method public java.sql.Blob getBlob(String) throws java.sql.SQLException;
-    method public boolean getBoolean(int) throws java.sql.SQLException;
-    method public boolean getBoolean(String) throws java.sql.SQLException;
-    method public byte getByte(int) throws java.sql.SQLException;
-    method public byte getByte(String) throws java.sql.SQLException;
-    method public byte[] getBytes(int) throws java.sql.SQLException;
-    method public byte[] getBytes(String) throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream(int) throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream(String) throws java.sql.SQLException;
-    method public java.sql.Clob getClob(int) throws java.sql.SQLException;
-    method public java.sql.Clob getClob(String) throws java.sql.SQLException;
-    method public java.sql.Date getDate(int) throws java.sql.SQLException;
-    method public java.sql.Date getDate(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Date getDate(String) throws java.sql.SQLException;
-    method public java.sql.Date getDate(String, java.util.Calendar) throws java.sql.SQLException;
-    method public double getDouble(int) throws java.sql.SQLException;
-    method public double getDouble(String) throws java.sql.SQLException;
-    method public float getFloat(int) throws java.sql.SQLException;
-    method public float getFloat(String) throws java.sql.SQLException;
-    method public int getInt(int) throws java.sql.SQLException;
-    method public int getInt(String) throws java.sql.SQLException;
-    method public long getLong(int) throws java.sql.SQLException;
-    method public long getLong(String) throws java.sql.SQLException;
-    method public java.io.Reader getNCharacterStream(int) throws java.sql.SQLException;
-    method public java.io.Reader getNCharacterStream(String) throws java.sql.SQLException;
-    method public java.sql.NClob getNClob(int) throws java.sql.SQLException;
-    method public java.sql.NClob getNClob(String) throws java.sql.SQLException;
-    method public String getNString(int) throws java.sql.SQLException;
-    method public String getNString(String) throws java.sql.SQLException;
-    method public Object getObject(int) throws java.sql.SQLException;
-    method public Object getObject(int, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public Object getObject(String) throws java.sql.SQLException;
-    method public Object getObject(String, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public java.sql.Ref getRef(int) throws java.sql.SQLException;
-    method public java.sql.Ref getRef(String) throws java.sql.SQLException;
-    method public java.sql.RowId getRowId(int) throws java.sql.SQLException;
-    method public java.sql.RowId getRowId(String) throws java.sql.SQLException;
-    method public java.sql.SQLXML getSQLXML(int) throws java.sql.SQLException;
-    method public java.sql.SQLXML getSQLXML(String) throws java.sql.SQLException;
-    method public short getShort(int) throws java.sql.SQLException;
-    method public short getShort(String) throws java.sql.SQLException;
-    method public String getString(int) throws java.sql.SQLException;
-    method public String getString(String) throws java.sql.SQLException;
-    method public java.sql.Time getTime(int) throws java.sql.SQLException;
-    method public java.sql.Time getTime(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Time getTime(String) throws java.sql.SQLException;
-    method public java.sql.Time getTime(String, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(int) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(String) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(String, java.util.Calendar) throws java.sql.SQLException;
-    method public java.net.URL getURL(int) throws java.sql.SQLException;
-    method public java.net.URL getURL(String) throws java.sql.SQLException;
-    method public void registerOutParameter(int, int) throws java.sql.SQLException;
-    method public void registerOutParameter(int, int, int) throws java.sql.SQLException;
-    method public void registerOutParameter(int, int, String) throws java.sql.SQLException;
-    method public void registerOutParameter(String, int) throws java.sql.SQLException;
-    method public void registerOutParameter(String, int, int) throws java.sql.SQLException;
-    method public void registerOutParameter(String, int, String) throws java.sql.SQLException;
-    method public void setAsciiStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setAsciiStream(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setAsciiStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBigDecimal(String, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void setBinaryStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setBinaryStream(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBinaryStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBlob(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBlob(String, java.sql.Blob) throws java.sql.SQLException;
-    method public void setBlob(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBoolean(String, boolean) throws java.sql.SQLException;
-    method public void setByte(String, byte) throws java.sql.SQLException;
-    method public void setBytes(String, byte[]) throws java.sql.SQLException;
-    method public void setCharacterStream(String, java.io.Reader, int) throws java.sql.SQLException;
-    method public void setCharacterStream(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setClob(String, java.sql.Clob) throws java.sql.SQLException;
-    method public void setClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setDate(String, java.sql.Date) throws java.sql.SQLException;
-    method public void setDate(String, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
-    method public void setDouble(String, double) throws java.sql.SQLException;
-    method public void setFloat(String, float) throws java.sql.SQLException;
-    method public void setInt(String, int) throws java.sql.SQLException;
-    method public void setLong(String, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setNClob(String, java.sql.NClob) throws java.sql.SQLException;
-    method public void setNClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setNString(String, String) throws java.sql.SQLException;
-    method public void setNull(String, int) throws java.sql.SQLException;
-    method public void setNull(String, int, String) throws java.sql.SQLException;
-    method public void setObject(String, Object, int, int) throws java.sql.SQLException;
-    method public void setObject(String, Object, int) throws java.sql.SQLException;
-    method public void setObject(String, Object) throws java.sql.SQLException;
-    method public void setRowId(String, java.sql.RowId) throws java.sql.SQLException;
-    method public void setSQLXML(String, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void setShort(String, short) throws java.sql.SQLException;
-    method public void setString(String, String) throws java.sql.SQLException;
-    method public void setTime(String, java.sql.Time) throws java.sql.SQLException;
-    method public void setTime(String, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTimestamp(String, java.sql.Timestamp) throws java.sql.SQLException;
-    method public void setTimestamp(String, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
-    method public void setURL(String, java.net.URL) throws java.sql.SQLException;
-    method public boolean wasNull() throws java.sql.SQLException;
-  }
-
-  public enum ClientInfoStatus {
-    enum_constant public static final java.sql.ClientInfoStatus REASON_UNKNOWN;
-    enum_constant public static final java.sql.ClientInfoStatus REASON_UNKNOWN_PROPERTY;
-    enum_constant public static final java.sql.ClientInfoStatus REASON_VALUE_INVALID;
-    enum_constant public static final java.sql.ClientInfoStatus REASON_VALUE_TRUNCATED;
-  }
-
-  public interface Clob {
-    method public void free() throws java.sql.SQLException;
-    method public java.io.InputStream getAsciiStream() throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream() throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream(long, long) throws java.sql.SQLException;
-    method public String getSubString(long, int) throws java.sql.SQLException;
-    method public long length() throws java.sql.SQLException;
-    method public long position(String, long) throws java.sql.SQLException;
-    method public long position(java.sql.Clob, long) throws java.sql.SQLException;
-    method public java.io.OutputStream setAsciiStream(long) throws java.sql.SQLException;
-    method public java.io.Writer setCharacterStream(long) throws java.sql.SQLException;
-    method public int setString(long, String) throws java.sql.SQLException;
-    method public int setString(long, String, int, int) throws java.sql.SQLException;
-    method public void truncate(long) throws java.sql.SQLException;
-  }
-
-  public interface Connection extends java.sql.Wrapper java.lang.AutoCloseable {
-    method public void clearWarnings() throws java.sql.SQLException;
-    method public void close() throws java.sql.SQLException;
-    method public void commit() throws java.sql.SQLException;
-    method public java.sql.Array createArrayOf(String, Object[]) throws java.sql.SQLException;
-    method public java.sql.Blob createBlob() throws java.sql.SQLException;
-    method public java.sql.Clob createClob() throws java.sql.SQLException;
-    method public java.sql.NClob createNClob() throws java.sql.SQLException;
-    method public java.sql.SQLXML createSQLXML() throws java.sql.SQLException;
-    method public java.sql.Statement createStatement() throws java.sql.SQLException;
-    method public java.sql.Statement createStatement(int, int) throws java.sql.SQLException;
-    method public java.sql.Statement createStatement(int, int, int) throws java.sql.SQLException;
-    method public java.sql.Struct createStruct(String, Object[]) throws java.sql.SQLException;
-    method public boolean getAutoCommit() throws java.sql.SQLException;
-    method public String getCatalog() throws java.sql.SQLException;
-    method public String getClientInfo(String) throws java.sql.SQLException;
-    method public java.util.Properties getClientInfo() throws java.sql.SQLException;
-    method public int getHoldability() throws java.sql.SQLException;
-    method public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException;
-    method public int getTransactionIsolation() throws java.sql.SQLException;
-    method public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap() throws java.sql.SQLException;
-    method public java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
-    method public boolean isClosed() throws java.sql.SQLException;
-    method public boolean isReadOnly() throws java.sql.SQLException;
-    method public boolean isValid(int) throws java.sql.SQLException;
-    method public String nativeSQL(String) throws java.sql.SQLException;
-    method public java.sql.CallableStatement prepareCall(String) throws java.sql.SQLException;
-    method public java.sql.CallableStatement prepareCall(String, int, int) throws java.sql.SQLException;
-    method public java.sql.CallableStatement prepareCall(String, int, int, int) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String, int, int) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String, int, int, int) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String, int) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String, int[]) throws java.sql.SQLException;
-    method public java.sql.PreparedStatement prepareStatement(String, String[]) throws java.sql.SQLException;
-    method public void releaseSavepoint(java.sql.Savepoint) throws java.sql.SQLException;
-    method public void rollback() throws java.sql.SQLException;
-    method public void rollback(java.sql.Savepoint) throws java.sql.SQLException;
-    method public void setAutoCommit(boolean) throws java.sql.SQLException;
-    method public void setCatalog(String) throws java.sql.SQLException;
-    method public void setClientInfo(String, String) throws java.sql.SQLClientInfoException;
-    method public void setClientInfo(java.util.Properties) throws java.sql.SQLClientInfoException;
-    method public void setHoldability(int) throws java.sql.SQLException;
-    method public void setReadOnly(boolean) throws java.sql.SQLException;
-    method public java.sql.Savepoint setSavepoint() throws java.sql.SQLException;
-    method public java.sql.Savepoint setSavepoint(String) throws java.sql.SQLException;
-    method public void setTransactionIsolation(int) throws java.sql.SQLException;
-    method public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    field public static final int TRANSACTION_NONE = 0; // 0x0
-    field public static final int TRANSACTION_READ_COMMITTED = 2; // 0x2
-    field public static final int TRANSACTION_READ_UNCOMMITTED = 1; // 0x1
-    field public static final int TRANSACTION_REPEATABLE_READ = 4; // 0x4
-    field public static final int TRANSACTION_SERIALIZABLE = 8; // 0x8
-  }
-
-  public class DataTruncation extends java.sql.SQLWarning {
-    ctor public DataTruncation(int, boolean, boolean, int, int);
-    ctor public DataTruncation(int, boolean, boolean, int, int, Throwable);
-    method public int getDataSize();
-    method public int getIndex();
-    method public boolean getParameter();
-    method public boolean getRead();
-    method public int getTransferSize();
-  }
-
-  public interface DatabaseMetaData extends java.sql.Wrapper {
-    method public boolean allProceduresAreCallable() throws java.sql.SQLException;
-    method public boolean allTablesAreSelectable() throws java.sql.SQLException;
-    method public boolean autoCommitFailureClosesAllResultSets() throws java.sql.SQLException;
-    method public boolean dataDefinitionCausesTransactionCommit() throws java.sql.SQLException;
-    method public boolean dataDefinitionIgnoredInTransactions() throws java.sql.SQLException;
-    method public boolean deletesAreDetected(int) throws java.sql.SQLException;
-    method public boolean doesMaxRowSizeIncludeBlobs() throws java.sql.SQLException;
-    method public java.sql.ResultSet getAttributes(String, String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getBestRowIdentifier(String, String, String, int, boolean) throws java.sql.SQLException;
-    method public String getCatalogSeparator() throws java.sql.SQLException;
-    method public String getCatalogTerm() throws java.sql.SQLException;
-    method public java.sql.ResultSet getCatalogs() throws java.sql.SQLException;
-    method public java.sql.ResultSet getClientInfoProperties() throws java.sql.SQLException;
-    method public java.sql.ResultSet getColumnPrivileges(String, String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getColumns(String, String, String, String) throws java.sql.SQLException;
-    method public java.sql.Connection getConnection() throws java.sql.SQLException;
-    method public java.sql.ResultSet getCrossReference(String, String, String, String, String, String) throws java.sql.SQLException;
-    method public int getDatabaseMajorVersion() throws java.sql.SQLException;
-    method public int getDatabaseMinorVersion() throws java.sql.SQLException;
-    method public String getDatabaseProductName() throws java.sql.SQLException;
-    method public String getDatabaseProductVersion() throws java.sql.SQLException;
-    method public int getDefaultTransactionIsolation() throws java.sql.SQLException;
-    method public int getDriverMajorVersion();
-    method public int getDriverMinorVersion();
-    method public String getDriverName() throws java.sql.SQLException;
-    method public String getDriverVersion() throws java.sql.SQLException;
-    method public java.sql.ResultSet getExportedKeys(String, String, String) throws java.sql.SQLException;
-    method public String getExtraNameCharacters() throws java.sql.SQLException;
-    method public java.sql.ResultSet getFunctionColumns(String, String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getFunctions(String, String, String) throws java.sql.SQLException;
-    method public String getIdentifierQuoteString() throws java.sql.SQLException;
-    method public java.sql.ResultSet getImportedKeys(String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getIndexInfo(String, String, String, boolean, boolean) throws java.sql.SQLException;
-    method public int getJDBCMajorVersion() throws java.sql.SQLException;
-    method public int getJDBCMinorVersion() throws java.sql.SQLException;
-    method public int getMaxBinaryLiteralLength() throws java.sql.SQLException;
-    method public int getMaxCatalogNameLength() throws java.sql.SQLException;
-    method public int getMaxCharLiteralLength() throws java.sql.SQLException;
-    method public int getMaxColumnNameLength() throws java.sql.SQLException;
-    method public int getMaxColumnsInGroupBy() throws java.sql.SQLException;
-    method public int getMaxColumnsInIndex() throws java.sql.SQLException;
-    method public int getMaxColumnsInOrderBy() throws java.sql.SQLException;
-    method public int getMaxColumnsInSelect() throws java.sql.SQLException;
-    method public int getMaxColumnsInTable() throws java.sql.SQLException;
-    method public int getMaxConnections() throws java.sql.SQLException;
-    method public int getMaxCursorNameLength() throws java.sql.SQLException;
-    method public int getMaxIndexLength() throws java.sql.SQLException;
-    method public int getMaxProcedureNameLength() throws java.sql.SQLException;
-    method public int getMaxRowSize() throws java.sql.SQLException;
-    method public int getMaxSchemaNameLength() throws java.sql.SQLException;
-    method public int getMaxStatementLength() throws java.sql.SQLException;
-    method public int getMaxStatements() throws java.sql.SQLException;
-    method public int getMaxTableNameLength() throws java.sql.SQLException;
-    method public int getMaxTablesInSelect() throws java.sql.SQLException;
-    method public int getMaxUserNameLength() throws java.sql.SQLException;
-    method public String getNumericFunctions() throws java.sql.SQLException;
-    method public java.sql.ResultSet getPrimaryKeys(String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getProcedureColumns(String, String, String, String) throws java.sql.SQLException;
-    method public String getProcedureTerm() throws java.sql.SQLException;
-    method public java.sql.ResultSet getProcedures(String, String, String) throws java.sql.SQLException;
-    method public int getResultSetHoldability() throws java.sql.SQLException;
-    method public java.sql.RowIdLifetime getRowIdLifetime() throws java.sql.SQLException;
-    method public String getSQLKeywords() throws java.sql.SQLException;
-    method public int getSQLStateType() throws java.sql.SQLException;
-    method public String getSchemaTerm() throws java.sql.SQLException;
-    method public java.sql.ResultSet getSchemas() throws java.sql.SQLException;
-    method public java.sql.ResultSet getSchemas(String, String) throws java.sql.SQLException;
-    method public String getSearchStringEscape() throws java.sql.SQLException;
-    method public String getStringFunctions() throws java.sql.SQLException;
-    method public java.sql.ResultSet getSuperTables(String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getSuperTypes(String, String, String) throws java.sql.SQLException;
-    method public String getSystemFunctions() throws java.sql.SQLException;
-    method public java.sql.ResultSet getTablePrivileges(String, String, String) throws java.sql.SQLException;
-    method public java.sql.ResultSet getTableTypes() throws java.sql.SQLException;
-    method public java.sql.ResultSet getTables(String, String, String, String[]) throws java.sql.SQLException;
-    method public String getTimeDateFunctions() throws java.sql.SQLException;
-    method public java.sql.ResultSet getTypeInfo() throws java.sql.SQLException;
-    method public java.sql.ResultSet getUDTs(String, String, String, int[]) throws java.sql.SQLException;
-    method public String getURL() throws java.sql.SQLException;
-    method public String getUserName() throws java.sql.SQLException;
-    method public java.sql.ResultSet getVersionColumns(String, String, String) throws java.sql.SQLException;
-    method public boolean insertsAreDetected(int) throws java.sql.SQLException;
-    method public boolean isCatalogAtStart() throws java.sql.SQLException;
-    method public boolean isReadOnly() throws java.sql.SQLException;
-    method public boolean locatorsUpdateCopy() throws java.sql.SQLException;
-    method public boolean nullPlusNonNullIsNull() throws java.sql.SQLException;
-    method public boolean nullsAreSortedAtEnd() throws java.sql.SQLException;
-    method public boolean nullsAreSortedAtStart() throws java.sql.SQLException;
-    method public boolean nullsAreSortedHigh() throws java.sql.SQLException;
-    method public boolean nullsAreSortedLow() throws java.sql.SQLException;
-    method public boolean othersDeletesAreVisible(int) throws java.sql.SQLException;
-    method public boolean othersInsertsAreVisible(int) throws java.sql.SQLException;
-    method public boolean othersUpdatesAreVisible(int) throws java.sql.SQLException;
-    method public boolean ownDeletesAreVisible(int) throws java.sql.SQLException;
-    method public boolean ownInsertsAreVisible(int) throws java.sql.SQLException;
-    method public boolean ownUpdatesAreVisible(int) throws java.sql.SQLException;
-    method public boolean storesLowerCaseIdentifiers() throws java.sql.SQLException;
-    method public boolean storesLowerCaseQuotedIdentifiers() throws java.sql.SQLException;
-    method public boolean storesMixedCaseIdentifiers() throws java.sql.SQLException;
-    method public boolean storesMixedCaseQuotedIdentifiers() throws java.sql.SQLException;
-    method public boolean storesUpperCaseIdentifiers() throws java.sql.SQLException;
-    method public boolean storesUpperCaseQuotedIdentifiers() throws java.sql.SQLException;
-    method public boolean supportsANSI92EntryLevelSQL() throws java.sql.SQLException;
-    method public boolean supportsANSI92FullSQL() throws java.sql.SQLException;
-    method public boolean supportsANSI92IntermediateSQL() throws java.sql.SQLException;
-    method public boolean supportsAlterTableWithAddColumn() throws java.sql.SQLException;
-    method public boolean supportsAlterTableWithDropColumn() throws java.sql.SQLException;
-    method public boolean supportsBatchUpdates() throws java.sql.SQLException;
-    method public boolean supportsCatalogsInDataManipulation() throws java.sql.SQLException;
-    method public boolean supportsCatalogsInIndexDefinitions() throws java.sql.SQLException;
-    method public boolean supportsCatalogsInPrivilegeDefinitions() throws java.sql.SQLException;
-    method public boolean supportsCatalogsInProcedureCalls() throws java.sql.SQLException;
-    method public boolean supportsCatalogsInTableDefinitions() throws java.sql.SQLException;
-    method public boolean supportsColumnAliasing() throws java.sql.SQLException;
-    method public boolean supportsConvert() throws java.sql.SQLException;
-    method public boolean supportsConvert(int, int) throws java.sql.SQLException;
-    method public boolean supportsCoreSQLGrammar() throws java.sql.SQLException;
-    method public boolean supportsCorrelatedSubqueries() throws java.sql.SQLException;
-    method public boolean supportsDataDefinitionAndDataManipulationTransactions() throws java.sql.SQLException;
-    method public boolean supportsDataManipulationTransactionsOnly() throws java.sql.SQLException;
-    method public boolean supportsDifferentTableCorrelationNames() throws java.sql.SQLException;
-    method public boolean supportsExpressionsInOrderBy() throws java.sql.SQLException;
-    method public boolean supportsExtendedSQLGrammar() throws java.sql.SQLException;
-    method public boolean supportsFullOuterJoins() throws java.sql.SQLException;
-    method public boolean supportsGetGeneratedKeys() throws java.sql.SQLException;
-    method public boolean supportsGroupBy() throws java.sql.SQLException;
-    method public boolean supportsGroupByBeyondSelect() throws java.sql.SQLException;
-    method public boolean supportsGroupByUnrelated() throws java.sql.SQLException;
-    method public boolean supportsIntegrityEnhancementFacility() throws java.sql.SQLException;
-    method public boolean supportsLikeEscapeClause() throws java.sql.SQLException;
-    method public boolean supportsLimitedOuterJoins() throws java.sql.SQLException;
-    method public boolean supportsMinimumSQLGrammar() throws java.sql.SQLException;
-    method public boolean supportsMixedCaseIdentifiers() throws java.sql.SQLException;
-    method public boolean supportsMixedCaseQuotedIdentifiers() throws java.sql.SQLException;
-    method public boolean supportsMultipleOpenResults() throws java.sql.SQLException;
-    method public boolean supportsMultipleResultSets() throws java.sql.SQLException;
-    method public boolean supportsMultipleTransactions() throws java.sql.SQLException;
-    method public boolean supportsNamedParameters() throws java.sql.SQLException;
-    method public boolean supportsNonNullableColumns() throws java.sql.SQLException;
-    method public boolean supportsOpenCursorsAcrossCommit() throws java.sql.SQLException;
-    method public boolean supportsOpenCursorsAcrossRollback() throws java.sql.SQLException;
-    method public boolean supportsOpenStatementsAcrossCommit() throws java.sql.SQLException;
-    method public boolean supportsOpenStatementsAcrossRollback() throws java.sql.SQLException;
-    method public boolean supportsOrderByUnrelated() throws java.sql.SQLException;
-    method public boolean supportsOuterJoins() throws java.sql.SQLException;
-    method public boolean supportsPositionedDelete() throws java.sql.SQLException;
-    method public boolean supportsPositionedUpdate() throws java.sql.SQLException;
-    method public boolean supportsResultSetConcurrency(int, int) throws java.sql.SQLException;
-    method public boolean supportsResultSetHoldability(int) throws java.sql.SQLException;
-    method public boolean supportsResultSetType(int) throws java.sql.SQLException;
-    method public boolean supportsSavepoints() throws java.sql.SQLException;
-    method public boolean supportsSchemasInDataManipulation() throws java.sql.SQLException;
-    method public boolean supportsSchemasInIndexDefinitions() throws java.sql.SQLException;
-    method public boolean supportsSchemasInPrivilegeDefinitions() throws java.sql.SQLException;
-    method public boolean supportsSchemasInProcedureCalls() throws java.sql.SQLException;
-    method public boolean supportsSchemasInTableDefinitions() throws java.sql.SQLException;
-    method public boolean supportsSelectForUpdate() throws java.sql.SQLException;
-    method public boolean supportsStatementPooling() throws java.sql.SQLException;
-    method public boolean supportsStoredFunctionsUsingCallSyntax() throws java.sql.SQLException;
-    method public boolean supportsStoredProcedures() throws java.sql.SQLException;
-    method public boolean supportsSubqueriesInComparisons() throws java.sql.SQLException;
-    method public boolean supportsSubqueriesInExists() throws java.sql.SQLException;
-    method public boolean supportsSubqueriesInIns() throws java.sql.SQLException;
-    method public boolean supportsSubqueriesInQuantifieds() throws java.sql.SQLException;
-    method public boolean supportsTableCorrelationNames() throws java.sql.SQLException;
-    method public boolean supportsTransactionIsolationLevel(int) throws java.sql.SQLException;
-    method public boolean supportsTransactions() throws java.sql.SQLException;
-    method public boolean supportsUnion() throws java.sql.SQLException;
-    method public boolean supportsUnionAll() throws java.sql.SQLException;
-    method public boolean updatesAreDetected(int) throws java.sql.SQLException;
-    method public boolean usesLocalFilePerTable() throws java.sql.SQLException;
-    method public boolean usesLocalFiles() throws java.sql.SQLException;
-    field public static final short attributeNoNulls = 0; // 0x0
-    field public static final short attributeNullable = 1; // 0x1
-    field public static final short attributeNullableUnknown = 2; // 0x2
-    field public static final int bestRowNotPseudo = 1; // 0x1
-    field public static final int bestRowPseudo = 2; // 0x2
-    field public static final int bestRowSession = 2; // 0x2
-    field public static final int bestRowTemporary = 0; // 0x0
-    field public static final int bestRowTransaction = 1; // 0x1
-    field public static final int bestRowUnknown = 0; // 0x0
-    field public static final int columnNoNulls = 0; // 0x0
-    field public static final int columnNullable = 1; // 0x1
-    field public static final int columnNullableUnknown = 2; // 0x2
-    field public static final int functionColumnIn = 1; // 0x1
-    field public static final int functionColumnInOut = 2; // 0x2
-    field public static final int functionColumnOut = 3; // 0x3
-    field public static final int functionColumnResult = 5; // 0x5
-    field public static final int functionColumnUnknown = 0; // 0x0
-    field public static final int functionNoNulls = 0; // 0x0
-    field public static final int functionNoTable = 1; // 0x1
-    field public static final int functionNullable = 1; // 0x1
-    field public static final int functionNullableUnknown = 2; // 0x2
-    field public static final int functionResultUnknown = 0; // 0x0
-    field public static final int functionReturn = 4; // 0x4
-    field public static final int functionReturnsTable = 2; // 0x2
-    field public static final int importedKeyCascade = 0; // 0x0
-    field public static final int importedKeyInitiallyDeferred = 5; // 0x5
-    field public static final int importedKeyInitiallyImmediate = 6; // 0x6
-    field public static final int importedKeyNoAction = 3; // 0x3
-    field public static final int importedKeyNotDeferrable = 7; // 0x7
-    field public static final int importedKeyRestrict = 1; // 0x1
-    field public static final int importedKeySetDefault = 4; // 0x4
-    field public static final int importedKeySetNull = 2; // 0x2
-    field public static final int procedureColumnIn = 1; // 0x1
-    field public static final int procedureColumnInOut = 2; // 0x2
-    field public static final int procedureColumnOut = 4; // 0x4
-    field public static final int procedureColumnResult = 3; // 0x3
-    field public static final int procedureColumnReturn = 5; // 0x5
-    field public static final int procedureColumnUnknown = 0; // 0x0
-    field public static final int procedureNoNulls = 0; // 0x0
-    field public static final int procedureNoResult = 1; // 0x1
-    field public static final int procedureNullable = 1; // 0x1
-    field public static final int procedureNullableUnknown = 2; // 0x2
-    field public static final int procedureResultUnknown = 0; // 0x0
-    field public static final int procedureReturnsResult = 2; // 0x2
-    field public static final int sqlStateSQL = 2; // 0x2
-    field public static final int sqlStateSQL99 = 2; // 0x2
-    field public static final int sqlStateXOpen = 1; // 0x1
-    field public static final short tableIndexClustered = 1; // 0x1
-    field public static final short tableIndexHashed = 2; // 0x2
-    field public static final short tableIndexOther = 3; // 0x3
-    field public static final short tableIndexStatistic = 0; // 0x0
-    field public static final int typeNoNulls = 0; // 0x0
-    field public static final int typeNullable = 1; // 0x1
-    field public static final int typeNullableUnknown = 2; // 0x2
-    field public static final int typePredBasic = 2; // 0x2
-    field public static final int typePredChar = 1; // 0x1
-    field public static final int typePredNone = 0; // 0x0
-    field public static final int typeSearchable = 3; // 0x3
-    field public static final int versionColumnNotPseudo = 1; // 0x1
-    field public static final int versionColumnPseudo = 2; // 0x2
-    field public static final int versionColumnUnknown = 0; // 0x0
-  }
-
-  public class Date extends java.util.Date {
-    ctor @Deprecated public Date(int, int, int);
-    ctor public Date(long);
-    method public static java.sql.Date valueOf(String);
-  }
-
-  public interface Driver {
-    method public boolean acceptsURL(String) throws java.sql.SQLException;
-    method public java.sql.Connection connect(String, java.util.Properties) throws java.sql.SQLException;
-    method public int getMajorVersion();
-    method public int getMinorVersion();
-    method public java.sql.DriverPropertyInfo[] getPropertyInfo(String, java.util.Properties) throws java.sql.SQLException;
-    method public boolean jdbcCompliant();
-  }
-
-  public class DriverManager {
-    method public static void deregisterDriver(java.sql.Driver) throws java.sql.SQLException;
-    method public static java.sql.Connection getConnection(String, java.util.Properties) throws java.sql.SQLException;
-    method public static java.sql.Connection getConnection(String, String, String) throws java.sql.SQLException;
-    method public static java.sql.Connection getConnection(String) throws java.sql.SQLException;
-    method public static java.sql.Driver getDriver(String) throws java.sql.SQLException;
-    method public static java.util.Enumeration<java.sql.Driver> getDrivers();
-    method @Deprecated public static java.io.PrintStream getLogStream();
-    method public static java.io.PrintWriter getLogWriter();
-    method public static int getLoginTimeout();
-    method public static void println(String);
-    method public static void registerDriver(java.sql.Driver) throws java.sql.SQLException;
-    method @Deprecated public static void setLogStream(java.io.PrintStream);
-    method public static void setLogWriter(java.io.PrintWriter);
-    method public static void setLoginTimeout(int);
-  }
-
-  public class DriverPropertyInfo {
-    ctor public DriverPropertyInfo(String, String);
-    field public String[] choices;
-    field public String description;
-    field public String name;
-    field public boolean required;
-    field public String value;
-  }
-
-  public interface NClob extends java.sql.Clob {
-  }
-
-  public interface ParameterMetaData extends java.sql.Wrapper {
-    method public String getParameterClassName(int) throws java.sql.SQLException;
-    method public int getParameterCount() throws java.sql.SQLException;
-    method public int getParameterMode(int) throws java.sql.SQLException;
-    method public int getParameterType(int) throws java.sql.SQLException;
-    method public String getParameterTypeName(int) throws java.sql.SQLException;
-    method public int getPrecision(int) throws java.sql.SQLException;
-    method public int getScale(int) throws java.sql.SQLException;
-    method public int isNullable(int) throws java.sql.SQLException;
-    method public boolean isSigned(int) throws java.sql.SQLException;
-    field public static final int parameterModeIn = 1; // 0x1
-    field public static final int parameterModeInOut = 2; // 0x2
-    field public static final int parameterModeOut = 4; // 0x4
-    field public static final int parameterModeUnknown = 0; // 0x0
-    field public static final int parameterNoNulls = 0; // 0x0
-    field public static final int parameterNullable = 1; // 0x1
-    field public static final int parameterNullableUnknown = 2; // 0x2
-  }
-
-  public interface PreparedStatement extends java.sql.Statement {
-    method public void addBatch() throws java.sql.SQLException;
-    method public void clearParameters() throws java.sql.SQLException;
-    method public boolean execute() throws java.sql.SQLException;
-    method public java.sql.ResultSet executeQuery() throws java.sql.SQLException;
-    method public int executeUpdate() throws java.sql.SQLException;
-    method public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException;
-    method public java.sql.ParameterMetaData getParameterMetaData() throws java.sql.SQLException;
-    method public void setArray(int, java.sql.Array) throws java.sql.SQLException;
-    method public void setAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setAsciiStream(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void setBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setBinaryStream(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBlob(int, java.sql.Blob) throws java.sql.SQLException;
-    method public void setBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBlob(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBoolean(int, boolean) throws java.sql.SQLException;
-    method public void setByte(int, byte) throws java.sql.SQLException;
-    method public void setBytes(int, byte[]) throws java.sql.SQLException;
-    method public void setCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
-    method public void setCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setClob(int, java.sql.Clob) throws java.sql.SQLException;
-    method public void setClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setDate(int, java.sql.Date) throws java.sql.SQLException;
-    method public void setDate(int, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
-    method public void setDouble(int, double) throws java.sql.SQLException;
-    method public void setFloat(int, float) throws java.sql.SQLException;
-    method public void setInt(int, int) throws java.sql.SQLException;
-    method public void setLong(int, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setNClob(int, java.sql.NClob) throws java.sql.SQLException;
-    method public void setNClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setNString(int, String) throws java.sql.SQLException;
-    method public void setNull(int, int) throws java.sql.SQLException;
-    method public void setNull(int, int, String) throws java.sql.SQLException;
-    method public void setObject(int, Object, int) throws java.sql.SQLException;
-    method public void setObject(int, Object) throws java.sql.SQLException;
-    method public void setObject(int, Object, int, int) throws java.sql.SQLException;
-    method public void setRef(int, java.sql.Ref) throws java.sql.SQLException;
-    method public void setRowId(int, java.sql.RowId) throws java.sql.SQLException;
-    method public void setSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void setShort(int, short) throws java.sql.SQLException;
-    method public void setString(int, String) throws java.sql.SQLException;
-    method public void setTime(int, java.sql.Time) throws java.sql.SQLException;
-    method public void setTime(int, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
-    method public void setTimestamp(int, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
-    method public void setURL(int, java.net.URL) throws java.sql.SQLException;
-    method @Deprecated public void setUnicodeStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-  }
-
-  public interface Ref {
-    method public String getBaseTypeName() throws java.sql.SQLException;
-    method public Object getObject(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public Object getObject() throws java.sql.SQLException;
-    method public void setObject(Object) throws java.sql.SQLException;
-  }
-
-  public interface ResultSet extends java.sql.Wrapper java.lang.AutoCloseable {
-    method public boolean absolute(int) throws java.sql.SQLException;
-    method public void afterLast() throws java.sql.SQLException;
-    method public void beforeFirst() throws java.sql.SQLException;
-    method public void cancelRowUpdates() throws java.sql.SQLException;
-    method public void clearWarnings() throws java.sql.SQLException;
-    method public void close() throws java.sql.SQLException;
-    method public void deleteRow() throws java.sql.SQLException;
-    method public int findColumn(String) throws java.sql.SQLException;
-    method public boolean first() throws java.sql.SQLException;
-    method public java.sql.Array getArray(int) throws java.sql.SQLException;
-    method public java.sql.Array getArray(String) throws java.sql.SQLException;
-    method public java.io.InputStream getAsciiStream(int) throws java.sql.SQLException;
-    method public java.io.InputStream getAsciiStream(String) throws java.sql.SQLException;
-    method @Deprecated public java.math.BigDecimal getBigDecimal(int, int) throws java.sql.SQLException;
-    method @Deprecated public java.math.BigDecimal getBigDecimal(String, int) throws java.sql.SQLException;
-    method public java.math.BigDecimal getBigDecimal(int) throws java.sql.SQLException;
-    method public java.math.BigDecimal getBigDecimal(String) throws java.sql.SQLException;
-    method public java.io.InputStream getBinaryStream(int) throws java.sql.SQLException;
-    method public java.io.InputStream getBinaryStream(String) throws java.sql.SQLException;
-    method public java.sql.Blob getBlob(int) throws java.sql.SQLException;
-    method public java.sql.Blob getBlob(String) throws java.sql.SQLException;
-    method public boolean getBoolean(int) throws java.sql.SQLException;
-    method public boolean getBoolean(String) throws java.sql.SQLException;
-    method public byte getByte(int) throws java.sql.SQLException;
-    method public byte getByte(String) throws java.sql.SQLException;
-    method public byte[] getBytes(int) throws java.sql.SQLException;
-    method public byte[] getBytes(String) throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream(int) throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream(String) throws java.sql.SQLException;
-    method public java.sql.Clob getClob(int) throws java.sql.SQLException;
-    method public java.sql.Clob getClob(String) throws java.sql.SQLException;
-    method public int getConcurrency() throws java.sql.SQLException;
-    method public String getCursorName() throws java.sql.SQLException;
-    method public java.sql.Date getDate(int) throws java.sql.SQLException;
-    method public java.sql.Date getDate(String) throws java.sql.SQLException;
-    method public java.sql.Date getDate(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Date getDate(String, java.util.Calendar) throws java.sql.SQLException;
-    method public double getDouble(int) throws java.sql.SQLException;
-    method public double getDouble(String) throws java.sql.SQLException;
-    method public int getFetchDirection() throws java.sql.SQLException;
-    method public int getFetchSize() throws java.sql.SQLException;
-    method public float getFloat(int) throws java.sql.SQLException;
-    method public float getFloat(String) throws java.sql.SQLException;
-    method public int getHoldability() throws java.sql.SQLException;
-    method public int getInt(int) throws java.sql.SQLException;
-    method public int getInt(String) throws java.sql.SQLException;
-    method public long getLong(int) throws java.sql.SQLException;
-    method public long getLong(String) throws java.sql.SQLException;
-    method public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException;
-    method public java.io.Reader getNCharacterStream(int) throws java.sql.SQLException;
-    method public java.io.Reader getNCharacterStream(String) throws java.sql.SQLException;
-    method public java.sql.NClob getNClob(int) throws java.sql.SQLException;
-    method public java.sql.NClob getNClob(String) throws java.sql.SQLException;
-    method public String getNString(int) throws java.sql.SQLException;
-    method public String getNString(String) throws java.sql.SQLException;
-    method public Object getObject(int) throws java.sql.SQLException;
-    method public Object getObject(String) throws java.sql.SQLException;
-    method public Object getObject(int, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public Object getObject(String, java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public java.sql.Ref getRef(int) throws java.sql.SQLException;
-    method public java.sql.Ref getRef(String) throws java.sql.SQLException;
-    method public int getRow() throws java.sql.SQLException;
-    method public java.sql.RowId getRowId(int) throws java.sql.SQLException;
-    method public java.sql.RowId getRowId(String) throws java.sql.SQLException;
-    method public java.sql.SQLXML getSQLXML(int) throws java.sql.SQLException;
-    method public java.sql.SQLXML getSQLXML(String) throws java.sql.SQLException;
-    method public short getShort(int) throws java.sql.SQLException;
-    method public short getShort(String) throws java.sql.SQLException;
-    method public java.sql.Statement getStatement() throws java.sql.SQLException;
-    method public String getString(int) throws java.sql.SQLException;
-    method public String getString(String) throws java.sql.SQLException;
-    method public java.sql.Time getTime(int) throws java.sql.SQLException;
-    method public java.sql.Time getTime(String) throws java.sql.SQLException;
-    method public java.sql.Time getTime(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Time getTime(String, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(int) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(String) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(int, java.util.Calendar) throws java.sql.SQLException;
-    method public java.sql.Timestamp getTimestamp(String, java.util.Calendar) throws java.sql.SQLException;
-    method public int getType() throws java.sql.SQLException;
-    method public java.net.URL getURL(int) throws java.sql.SQLException;
-    method public java.net.URL getURL(String) throws java.sql.SQLException;
-    method @Deprecated public java.io.InputStream getUnicodeStream(int) throws java.sql.SQLException;
-    method @Deprecated public java.io.InputStream getUnicodeStream(String) throws java.sql.SQLException;
-    method public java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
-    method public void insertRow() throws java.sql.SQLException;
-    method public boolean isAfterLast() throws java.sql.SQLException;
-    method public boolean isBeforeFirst() throws java.sql.SQLException;
-    method public boolean isClosed() throws java.sql.SQLException;
-    method public boolean isFirst() throws java.sql.SQLException;
-    method public boolean isLast() throws java.sql.SQLException;
-    method public boolean last() throws java.sql.SQLException;
-    method public void moveToCurrentRow() throws java.sql.SQLException;
-    method public void moveToInsertRow() throws java.sql.SQLException;
-    method public boolean next() throws java.sql.SQLException;
-    method public boolean previous() throws java.sql.SQLException;
-    method public void refreshRow() throws java.sql.SQLException;
-    method public boolean relative(int) throws java.sql.SQLException;
-    method public boolean rowDeleted() throws java.sql.SQLException;
-    method public boolean rowInserted() throws java.sql.SQLException;
-    method public boolean rowUpdated() throws java.sql.SQLException;
-    method public void setFetchDirection(int) throws java.sql.SQLException;
-    method public void setFetchSize(int) throws java.sql.SQLException;
-    method public void updateArray(int, java.sql.Array) throws java.sql.SQLException;
-    method public void updateArray(String, java.sql.Array) throws java.sql.SQLException;
-    method public void updateAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void updateAsciiStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void updateAsciiStream(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateAsciiStream(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateAsciiStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void updateBigDecimal(String, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void updateBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void updateBinaryStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void updateBinaryStream(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateBinaryStream(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateBinaryStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateBlob(int, java.sql.Blob) throws java.sql.SQLException;
-    method public void updateBlob(String, java.sql.Blob) throws java.sql.SQLException;
-    method public void updateBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateBlob(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void updateBlob(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateBlob(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void updateBoolean(int, boolean) throws java.sql.SQLException;
-    method public void updateBoolean(String, boolean) throws java.sql.SQLException;
-    method public void updateByte(int, byte) throws java.sql.SQLException;
-    method public void updateByte(String, byte) throws java.sql.SQLException;
-    method public void updateBytes(int, byte[]) throws java.sql.SQLException;
-    method public void updateBytes(String, byte[]) throws java.sql.SQLException;
-    method public void updateCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
-    method public void updateCharacterStream(String, java.io.Reader, int) throws java.sql.SQLException;
-    method public void updateCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateCharacterStream(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void updateCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void updateClob(int, java.sql.Clob) throws java.sql.SQLException;
-    method public void updateClob(String, java.sql.Clob) throws java.sql.SQLException;
-    method public void updateClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void updateClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void updateDate(int, java.sql.Date) throws java.sql.SQLException;
-    method public void updateDate(String, java.sql.Date) throws java.sql.SQLException;
-    method public void updateDouble(int, double) throws java.sql.SQLException;
-    method public void updateDouble(String, double) throws java.sql.SQLException;
-    method public void updateFloat(int, float) throws java.sql.SQLException;
-    method public void updateFloat(String, float) throws java.sql.SQLException;
-    method public void updateInt(int, int) throws java.sql.SQLException;
-    method public void updateInt(String, int) throws java.sql.SQLException;
-    method public void updateLong(int, long) throws java.sql.SQLException;
-    method public void updateLong(String, long) throws java.sql.SQLException;
-    method public void updateNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateNCharacterStream(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void updateNCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void updateNClob(int, java.sql.NClob) throws java.sql.SQLException;
-    method public void updateNClob(String, java.sql.NClob) throws java.sql.SQLException;
-    method public void updateNClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateNClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void updateNClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void updateNClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void updateNString(int, String) throws java.sql.SQLException;
-    method public void updateNString(String, String) throws java.sql.SQLException;
-    method public void updateNull(int) throws java.sql.SQLException;
-    method public void updateNull(String) throws java.sql.SQLException;
-    method public void updateObject(int, Object, int) throws java.sql.SQLException;
-    method public void updateObject(int, Object) throws java.sql.SQLException;
-    method public void updateObject(String, Object, int) throws java.sql.SQLException;
-    method public void updateObject(String, Object) throws java.sql.SQLException;
-    method public void updateRef(int, java.sql.Ref) throws java.sql.SQLException;
-    method public void updateRef(String, java.sql.Ref) throws java.sql.SQLException;
-    method public void updateRow() throws java.sql.SQLException;
-    method public void updateRowId(int, java.sql.RowId) throws java.sql.SQLException;
-    method public void updateRowId(String, java.sql.RowId) throws java.sql.SQLException;
-    method public void updateSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void updateSQLXML(String, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void updateShort(int, short) throws java.sql.SQLException;
-    method public void updateShort(String, short) throws java.sql.SQLException;
-    method public void updateString(int, String) throws java.sql.SQLException;
-    method public void updateString(String, String) throws java.sql.SQLException;
-    method public void updateTime(int, java.sql.Time) throws java.sql.SQLException;
-    method public void updateTime(String, java.sql.Time) throws java.sql.SQLException;
-    method public void updateTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
-    method public void updateTimestamp(String, java.sql.Timestamp) throws java.sql.SQLException;
-    method public boolean wasNull() throws java.sql.SQLException;
-    field public static final int CLOSE_CURSORS_AT_COMMIT = 2; // 0x2
-    field public static final int CONCUR_READ_ONLY = 1007; // 0x3ef
-    field public static final int CONCUR_UPDATABLE = 1008; // 0x3f0
-    field public static final int FETCH_FORWARD = 1000; // 0x3e8
-    field public static final int FETCH_REVERSE = 1001; // 0x3e9
-    field public static final int FETCH_UNKNOWN = 1002; // 0x3ea
-    field public static final int HOLD_CURSORS_OVER_COMMIT = 1; // 0x1
-    field public static final int TYPE_FORWARD_ONLY = 1003; // 0x3eb
-    field public static final int TYPE_SCROLL_INSENSITIVE = 1004; // 0x3ec
-    field public static final int TYPE_SCROLL_SENSITIVE = 1005; // 0x3ed
-  }
-
-  public interface ResultSetMetaData extends java.sql.Wrapper {
-    method public String getCatalogName(int) throws java.sql.SQLException;
-    method public String getColumnClassName(int) throws java.sql.SQLException;
-    method public int getColumnCount() throws java.sql.SQLException;
-    method public int getColumnDisplaySize(int) throws java.sql.SQLException;
-    method public String getColumnLabel(int) throws java.sql.SQLException;
-    method public String getColumnName(int) throws java.sql.SQLException;
-    method public int getColumnType(int) throws java.sql.SQLException;
-    method public String getColumnTypeName(int) throws java.sql.SQLException;
-    method public int getPrecision(int) throws java.sql.SQLException;
-    method public int getScale(int) throws java.sql.SQLException;
-    method public String getSchemaName(int) throws java.sql.SQLException;
-    method public String getTableName(int) throws java.sql.SQLException;
-    method public boolean isAutoIncrement(int) throws java.sql.SQLException;
-    method public boolean isCaseSensitive(int) throws java.sql.SQLException;
-    method public boolean isCurrency(int) throws java.sql.SQLException;
-    method public boolean isDefinitelyWritable(int) throws java.sql.SQLException;
-    method public int isNullable(int) throws java.sql.SQLException;
-    method public boolean isReadOnly(int) throws java.sql.SQLException;
-    method public boolean isSearchable(int) throws java.sql.SQLException;
-    method public boolean isSigned(int) throws java.sql.SQLException;
-    method public boolean isWritable(int) throws java.sql.SQLException;
-    field public static final int columnNoNulls = 0; // 0x0
-    field public static final int columnNullable = 1; // 0x1
-    field public static final int columnNullableUnknown = 2; // 0x2
-  }
-
-  public interface RowId {
-    method public boolean equals(Object);
-    method public byte[] getBytes();
-    method public int hashCode();
-    method public String toString();
-  }
-
-  public enum RowIdLifetime {
-    enum_constant public static final java.sql.RowIdLifetime ROWID_UNSUPPORTED;
-    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_FOREVER;
-    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_OTHER;
-    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_SESSION;
-    enum_constant public static final java.sql.RowIdLifetime ROWID_VALID_TRANSACTION;
-  }
-
-  public class SQLClientInfoException extends java.sql.SQLException {
-    ctor public SQLClientInfoException();
-    ctor public SQLClientInfoException(java.util.Map<java.lang.String,java.sql.ClientInfoStatus>);
-    ctor public SQLClientInfoException(java.util.Map<java.lang.String,java.sql.ClientInfoStatus>, Throwable);
-    ctor public SQLClientInfoException(String, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>);
-    ctor public SQLClientInfoException(String, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>, Throwable);
-    ctor public SQLClientInfoException(String, String, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>);
-    ctor public SQLClientInfoException(String, String, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>, Throwable);
-    ctor public SQLClientInfoException(String, String, int, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>);
-    ctor public SQLClientInfoException(String, String, int, java.util.Map<java.lang.String,java.sql.ClientInfoStatus>, Throwable);
-    method public java.util.Map<java.lang.String,java.sql.ClientInfoStatus> getFailedProperties();
-  }
-
-  public interface SQLData {
-    method public String getSQLTypeName() throws java.sql.SQLException;
-    method public void readSQL(java.sql.SQLInput, String) throws java.sql.SQLException;
-    method public void writeSQL(java.sql.SQLOutput) throws java.sql.SQLException;
-  }
-
-  public class SQLDataException extends java.sql.SQLNonTransientException {
-    ctor public SQLDataException();
-    ctor public SQLDataException(String);
-    ctor public SQLDataException(String, String);
-    ctor public SQLDataException(String, String, int);
-    ctor public SQLDataException(Throwable);
-    ctor public SQLDataException(String, Throwable);
-    ctor public SQLDataException(String, String, Throwable);
-    ctor public SQLDataException(String, String, int, Throwable);
-  }
-
-  public class SQLException extends java.lang.Exception implements java.lang.Iterable<java.lang.Throwable> {
-    ctor public SQLException(String, String, int);
-    ctor public SQLException(String, String);
-    ctor public SQLException(String);
-    ctor public SQLException();
-    ctor public SQLException(Throwable);
-    ctor public SQLException(String, Throwable);
-    ctor public SQLException(String, String, Throwable);
-    ctor public SQLException(String, String, int, Throwable);
-    method public int getErrorCode();
-    method public java.sql.SQLException getNextException();
-    method public String getSQLState();
-    method public java.util.Iterator<java.lang.Throwable> iterator();
-    method public void setNextException(java.sql.SQLException);
-  }
-
-  public class SQLFeatureNotSupportedException extends java.sql.SQLNonTransientException {
-    ctor public SQLFeatureNotSupportedException();
-    ctor public SQLFeatureNotSupportedException(String);
-    ctor public SQLFeatureNotSupportedException(String, String);
-    ctor public SQLFeatureNotSupportedException(String, String, int);
-    ctor public SQLFeatureNotSupportedException(Throwable);
-    ctor public SQLFeatureNotSupportedException(String, Throwable);
-    ctor public SQLFeatureNotSupportedException(String, String, Throwable);
-    ctor public SQLFeatureNotSupportedException(String, String, int, Throwable);
-  }
-
-  public interface SQLInput {
-    method public java.sql.Array readArray() throws java.sql.SQLException;
-    method public java.io.InputStream readAsciiStream() throws java.sql.SQLException;
-    method public java.math.BigDecimal readBigDecimal() throws java.sql.SQLException;
-    method public java.io.InputStream readBinaryStream() throws java.sql.SQLException;
-    method public java.sql.Blob readBlob() throws java.sql.SQLException;
-    method public boolean readBoolean() throws java.sql.SQLException;
-    method public byte readByte() throws java.sql.SQLException;
-    method public byte[] readBytes() throws java.sql.SQLException;
-    method public java.io.Reader readCharacterStream() throws java.sql.SQLException;
-    method public java.sql.Clob readClob() throws java.sql.SQLException;
-    method public java.sql.Date readDate() throws java.sql.SQLException;
-    method public double readDouble() throws java.sql.SQLException;
-    method public float readFloat() throws java.sql.SQLException;
-    method public int readInt() throws java.sql.SQLException;
-    method public long readLong() throws java.sql.SQLException;
-    method public java.sql.NClob readNClob() throws java.sql.SQLException;
-    method public String readNString() throws java.sql.SQLException;
-    method public Object readObject() throws java.sql.SQLException;
-    method public java.sql.Ref readRef() throws java.sql.SQLException;
-    method public java.sql.RowId readRowId() throws java.sql.SQLException;
-    method public java.sql.SQLXML readSQLXML() throws java.sql.SQLException;
-    method public short readShort() throws java.sql.SQLException;
-    method public String readString() throws java.sql.SQLException;
-    method public java.sql.Time readTime() throws java.sql.SQLException;
-    method public java.sql.Timestamp readTimestamp() throws java.sql.SQLException;
-    method public java.net.URL readURL() throws java.sql.SQLException;
-    method public boolean wasNull() throws java.sql.SQLException;
-  }
-
-  public class SQLIntegrityConstraintViolationException extends java.sql.SQLNonTransientException {
-    ctor public SQLIntegrityConstraintViolationException();
-    ctor public SQLIntegrityConstraintViolationException(String);
-    ctor public SQLIntegrityConstraintViolationException(String, String);
-    ctor public SQLIntegrityConstraintViolationException(String, String, int);
-    ctor public SQLIntegrityConstraintViolationException(Throwable);
-    ctor public SQLIntegrityConstraintViolationException(String, Throwable);
-    ctor public SQLIntegrityConstraintViolationException(String, String, Throwable);
-    ctor public SQLIntegrityConstraintViolationException(String, String, int, Throwable);
-  }
-
-  public class SQLInvalidAuthorizationSpecException extends java.sql.SQLNonTransientException {
-    ctor public SQLInvalidAuthorizationSpecException();
-    ctor public SQLInvalidAuthorizationSpecException(String);
-    ctor public SQLInvalidAuthorizationSpecException(String, String);
-    ctor public SQLInvalidAuthorizationSpecException(String, String, int);
-    ctor public SQLInvalidAuthorizationSpecException(Throwable);
-    ctor public SQLInvalidAuthorizationSpecException(String, Throwable);
-    ctor public SQLInvalidAuthorizationSpecException(String, String, Throwable);
-    ctor public SQLInvalidAuthorizationSpecException(String, String, int, Throwable);
-  }
-
-  public class SQLNonTransientConnectionException extends java.sql.SQLNonTransientException {
-    ctor public SQLNonTransientConnectionException();
-    ctor public SQLNonTransientConnectionException(String);
-    ctor public SQLNonTransientConnectionException(String, String);
-    ctor public SQLNonTransientConnectionException(String, String, int);
-    ctor public SQLNonTransientConnectionException(Throwable);
-    ctor public SQLNonTransientConnectionException(String, Throwable);
-    ctor public SQLNonTransientConnectionException(String, String, Throwable);
-    ctor public SQLNonTransientConnectionException(String, String, int, Throwable);
-  }
-
-  public class SQLNonTransientException extends java.sql.SQLException {
-    ctor public SQLNonTransientException();
-    ctor public SQLNonTransientException(String);
-    ctor public SQLNonTransientException(String, String);
-    ctor public SQLNonTransientException(String, String, int);
-    ctor public SQLNonTransientException(Throwable);
-    ctor public SQLNonTransientException(String, Throwable);
-    ctor public SQLNonTransientException(String, String, Throwable);
-    ctor public SQLNonTransientException(String, String, int, Throwable);
-  }
-
-  public interface SQLOutput {
-    method public void writeArray(java.sql.Array) throws java.sql.SQLException;
-    method public void writeAsciiStream(java.io.InputStream) throws java.sql.SQLException;
-    method public void writeBigDecimal(java.math.BigDecimal) throws java.sql.SQLException;
-    method public void writeBinaryStream(java.io.InputStream) throws java.sql.SQLException;
-    method public void writeBlob(java.sql.Blob) throws java.sql.SQLException;
-    method public void writeBoolean(boolean) throws java.sql.SQLException;
-    method public void writeByte(byte) throws java.sql.SQLException;
-    method public void writeBytes(byte[]) throws java.sql.SQLException;
-    method public void writeCharacterStream(java.io.Reader) throws java.sql.SQLException;
-    method public void writeClob(java.sql.Clob) throws java.sql.SQLException;
-    method public void writeDate(java.sql.Date) throws java.sql.SQLException;
-    method public void writeDouble(double) throws java.sql.SQLException;
-    method public void writeFloat(float) throws java.sql.SQLException;
-    method public void writeInt(int) throws java.sql.SQLException;
-    method public void writeLong(long) throws java.sql.SQLException;
-    method public void writeNClob(java.sql.NClob) throws java.sql.SQLException;
-    method public void writeNString(String) throws java.sql.SQLException;
-    method public void writeObject(java.sql.SQLData) throws java.sql.SQLException;
-    method public void writeRef(java.sql.Ref) throws java.sql.SQLException;
-    method public void writeRowId(java.sql.RowId) throws java.sql.SQLException;
-    method public void writeSQLXML(java.sql.SQLXML) throws java.sql.SQLException;
-    method public void writeShort(short) throws java.sql.SQLException;
-    method public void writeString(String) throws java.sql.SQLException;
-    method public void writeStruct(java.sql.Struct) throws java.sql.SQLException;
-    method public void writeTime(java.sql.Time) throws java.sql.SQLException;
-    method public void writeTimestamp(java.sql.Timestamp) throws java.sql.SQLException;
-    method public void writeURL(java.net.URL) throws java.sql.SQLException;
-  }
-
-  public final class SQLPermission extends java.security.BasicPermission {
-    ctor public SQLPermission(String);
-    ctor public SQLPermission(String, String);
-  }
-
-  public class SQLRecoverableException extends java.sql.SQLException {
-    ctor public SQLRecoverableException();
-    ctor public SQLRecoverableException(String);
-    ctor public SQLRecoverableException(String, String);
-    ctor public SQLRecoverableException(String, String, int);
-    ctor public SQLRecoverableException(Throwable);
-    ctor public SQLRecoverableException(String, Throwable);
-    ctor public SQLRecoverableException(String, String, Throwable);
-    ctor public SQLRecoverableException(String, String, int, Throwable);
-  }
-
-  public class SQLSyntaxErrorException extends java.sql.SQLNonTransientException {
-    ctor public SQLSyntaxErrorException();
-    ctor public SQLSyntaxErrorException(String);
-    ctor public SQLSyntaxErrorException(String, String);
-    ctor public SQLSyntaxErrorException(String, String, int);
-    ctor public SQLSyntaxErrorException(Throwable);
-    ctor public SQLSyntaxErrorException(String, Throwable);
-    ctor public SQLSyntaxErrorException(String, String, Throwable);
-    ctor public SQLSyntaxErrorException(String, String, int, Throwable);
-  }
-
-  public class SQLTimeoutException extends java.sql.SQLTransientException {
-    ctor public SQLTimeoutException();
-    ctor public SQLTimeoutException(String);
-    ctor public SQLTimeoutException(String, String);
-    ctor public SQLTimeoutException(String, String, int);
-    ctor public SQLTimeoutException(Throwable);
-    ctor public SQLTimeoutException(String, Throwable);
-    ctor public SQLTimeoutException(String, String, Throwable);
-    ctor public SQLTimeoutException(String, String, int, Throwable);
-  }
-
-  public class SQLTransactionRollbackException extends java.sql.SQLTransientException {
-    ctor public SQLTransactionRollbackException();
-    ctor public SQLTransactionRollbackException(String);
-    ctor public SQLTransactionRollbackException(String, String);
-    ctor public SQLTransactionRollbackException(String, String, int);
-    ctor public SQLTransactionRollbackException(Throwable);
-    ctor public SQLTransactionRollbackException(String, Throwable);
-    ctor public SQLTransactionRollbackException(String, String, Throwable);
-    ctor public SQLTransactionRollbackException(String, String, int, Throwable);
-  }
-
-  public class SQLTransientConnectionException extends java.sql.SQLTransientException {
-    ctor public SQLTransientConnectionException();
-    ctor public SQLTransientConnectionException(String);
-    ctor public SQLTransientConnectionException(String, String);
-    ctor public SQLTransientConnectionException(String, String, int);
-    ctor public SQLTransientConnectionException(Throwable);
-    ctor public SQLTransientConnectionException(String, Throwable);
-    ctor public SQLTransientConnectionException(String, String, Throwable);
-    ctor public SQLTransientConnectionException(String, String, int, Throwable);
-  }
-
-  public class SQLTransientException extends java.sql.SQLException {
-    ctor public SQLTransientException();
-    ctor public SQLTransientException(String);
-    ctor public SQLTransientException(String, String);
-    ctor public SQLTransientException(String, String, int);
-    ctor public SQLTransientException(Throwable);
-    ctor public SQLTransientException(String, Throwable);
-    ctor public SQLTransientException(String, String, Throwable);
-    ctor public SQLTransientException(String, String, int, Throwable);
-  }
-
-  public class SQLWarning extends java.sql.SQLException {
-    ctor public SQLWarning(String, String, int);
-    ctor public SQLWarning(String, String);
-    ctor public SQLWarning(String);
-    ctor public SQLWarning();
-    ctor public SQLWarning(Throwable);
-    ctor public SQLWarning(String, Throwable);
-    ctor public SQLWarning(String, String, Throwable);
-    ctor public SQLWarning(String, String, int, Throwable);
-    method public java.sql.SQLWarning getNextWarning();
-    method public void setNextWarning(java.sql.SQLWarning);
-  }
-
-  public interface SQLXML {
-    method public void free() throws java.sql.SQLException;
-    method public java.io.InputStream getBinaryStream() throws java.sql.SQLException;
-    method public java.io.Reader getCharacterStream() throws java.sql.SQLException;
-    method public <T extends javax.xml.transform.Source> T getSource(Class<T>) throws java.sql.SQLException;
-    method public String getString() throws java.sql.SQLException;
-    method public java.io.OutputStream setBinaryStream() throws java.sql.SQLException;
-    method public java.io.Writer setCharacterStream() throws java.sql.SQLException;
-    method public <T extends javax.xml.transform.Result> T setResult(Class<T>) throws java.sql.SQLException;
-    method public void setString(String) throws java.sql.SQLException;
-  }
-
-  public interface Savepoint {
-    method public int getSavepointId() throws java.sql.SQLException;
-    method public String getSavepointName() throws java.sql.SQLException;
-  }
-
-  public interface Statement extends java.sql.Wrapper java.lang.AutoCloseable {
-    method public void addBatch(String) throws java.sql.SQLException;
-    method public void cancel() throws java.sql.SQLException;
-    method public void clearBatch() throws java.sql.SQLException;
-    method public void clearWarnings() throws java.sql.SQLException;
-    method public void close() throws java.sql.SQLException;
-    method public boolean execute(String) throws java.sql.SQLException;
-    method public boolean execute(String, int) throws java.sql.SQLException;
-    method public boolean execute(String, int[]) throws java.sql.SQLException;
-    method public boolean execute(String, String[]) throws java.sql.SQLException;
-    method public int[] executeBatch() throws java.sql.SQLException;
-    method public java.sql.ResultSet executeQuery(String) throws java.sql.SQLException;
-    method public int executeUpdate(String) throws java.sql.SQLException;
-    method public int executeUpdate(String, int) throws java.sql.SQLException;
-    method public int executeUpdate(String, int[]) throws java.sql.SQLException;
-    method public int executeUpdate(String, String[]) throws java.sql.SQLException;
-    method public java.sql.Connection getConnection() throws java.sql.SQLException;
-    method public int getFetchDirection() throws java.sql.SQLException;
-    method public int getFetchSize() throws java.sql.SQLException;
-    method public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException;
-    method public int getMaxFieldSize() throws java.sql.SQLException;
-    method public int getMaxRows() throws java.sql.SQLException;
-    method public boolean getMoreResults() throws java.sql.SQLException;
-    method public boolean getMoreResults(int) throws java.sql.SQLException;
-    method public int getQueryTimeout() throws java.sql.SQLException;
-    method public java.sql.ResultSet getResultSet() throws java.sql.SQLException;
-    method public int getResultSetConcurrency() throws java.sql.SQLException;
-    method public int getResultSetHoldability() throws java.sql.SQLException;
-    method public int getResultSetType() throws java.sql.SQLException;
-    method public int getUpdateCount() throws java.sql.SQLException;
-    method public java.sql.SQLWarning getWarnings() throws java.sql.SQLException;
-    method public boolean isClosed() throws java.sql.SQLException;
-    method public boolean isPoolable() throws java.sql.SQLException;
-    method public void setCursorName(String) throws java.sql.SQLException;
-    method public void setEscapeProcessing(boolean) throws java.sql.SQLException;
-    method public void setFetchDirection(int) throws java.sql.SQLException;
-    method public void setFetchSize(int) throws java.sql.SQLException;
-    method public void setMaxFieldSize(int) throws java.sql.SQLException;
-    method public void setMaxRows(int) throws java.sql.SQLException;
-    method public void setPoolable(boolean) throws java.sql.SQLException;
-    method public void setQueryTimeout(int) throws java.sql.SQLException;
-    field public static final int CLOSE_ALL_RESULTS = 3; // 0x3
-    field public static final int CLOSE_CURRENT_RESULT = 1; // 0x1
-    field public static final int EXECUTE_FAILED = -3; // 0xfffffffd
-    field public static final int KEEP_CURRENT_RESULT = 2; // 0x2
-    field public static final int NO_GENERATED_KEYS = 2; // 0x2
-    field public static final int RETURN_GENERATED_KEYS = 1; // 0x1
-    field public static final int SUCCESS_NO_INFO = -2; // 0xfffffffe
-  }
-
-  public interface Struct {
-    method public Object[] getAttributes() throws java.sql.SQLException;
-    method public Object[] getAttributes(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public String getSQLTypeName() throws java.sql.SQLException;
-  }
-
-  public class Time extends java.util.Date {
-    ctor @Deprecated public Time(int, int, int);
-    ctor public Time(long);
-    method public static java.sql.Time valueOf(String);
-  }
-
-  public class Timestamp extends java.util.Date {
-    ctor @Deprecated public Timestamp(int, int, int, int, int, int, int);
-    ctor public Timestamp(long);
-    method public boolean after(java.sql.Timestamp);
-    method public boolean before(java.sql.Timestamp);
-    method public int compareTo(java.sql.Timestamp);
-    method public boolean equals(java.sql.Timestamp);
-    method public int getNanos();
-    method public void setNanos(int);
-    method public static java.sql.Timestamp valueOf(String);
-  }
-
-  public class Types {
-    field public static final int ARRAY = 2003; // 0x7d3
-    field public static final int BIGINT = -5; // 0xfffffffb
-    field public static final int BINARY = -2; // 0xfffffffe
-    field public static final int BIT = -7; // 0xfffffff9
-    field public static final int BLOB = 2004; // 0x7d4
-    field public static final int BOOLEAN = 16; // 0x10
-    field public static final int CHAR = 1; // 0x1
-    field public static final int CLOB = 2005; // 0x7d5
-    field public static final int DATALINK = 70; // 0x46
-    field public static final int DATE = 91; // 0x5b
-    field public static final int DECIMAL = 3; // 0x3
-    field public static final int DISTINCT = 2001; // 0x7d1
-    field public static final int DOUBLE = 8; // 0x8
-    field public static final int FLOAT = 6; // 0x6
-    field public static final int INTEGER = 4; // 0x4
-    field public static final int JAVA_OBJECT = 2000; // 0x7d0
-    field public static final int LONGNVARCHAR = -16; // 0xfffffff0
-    field public static final int LONGVARBINARY = -4; // 0xfffffffc
-    field public static final int LONGVARCHAR = -1; // 0xffffffff
-    field public static final int NCHAR = -15; // 0xfffffff1
-    field public static final int NCLOB = 2011; // 0x7db
-    field public static final int NULL = 0; // 0x0
-    field public static final int NUMERIC = 2; // 0x2
-    field public static final int NVARCHAR = -9; // 0xfffffff7
-    field public static final int OTHER = 1111; // 0x457
-    field public static final int REAL = 7; // 0x7
-    field public static final int REF = 2006; // 0x7d6
-    field public static final int ROWID = -8; // 0xfffffff8
-    field public static final int SMALLINT = 5; // 0x5
-    field public static final int SQLXML = 2009; // 0x7d9
-    field public static final int STRUCT = 2002; // 0x7d2
-    field public static final int TIME = 92; // 0x5c
-    field public static final int TIMESTAMP = 93; // 0x5d
-    field public static final int TINYINT = -6; // 0xfffffffa
-    field public static final int VARBINARY = -3; // 0xfffffffd
-    field public static final int VARCHAR = 12; // 0xc
-  }
-
-  public interface Wrapper {
-    method public boolean isWrapperFor(Class<?>) throws java.sql.SQLException;
-    method public <T> T unwrap(Class<T>) throws java.sql.SQLException;
-  }
-
-}
-
-package java.text {
-
-  public class Annotation {
-    ctor public Annotation(Object);
-    method public Object getValue();
-  }
-
-  public interface AttributedCharacterIterator extends java.text.CharacterIterator {
-    method public java.util.Set<java.text.AttributedCharacterIterator.Attribute> getAllAttributeKeys();
-    method public Object getAttribute(java.text.AttributedCharacterIterator.Attribute);
-    method public java.util.Map<java.text.AttributedCharacterIterator.Attribute,java.lang.Object> getAttributes();
-    method public int getRunLimit();
-    method public int getRunLimit(java.text.AttributedCharacterIterator.Attribute);
-    method public int getRunLimit(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>);
-    method public int getRunStart();
-    method public int getRunStart(java.text.AttributedCharacterIterator.Attribute);
-    method public int getRunStart(java.util.Set<? extends java.text.AttributedCharacterIterator.Attribute>);
-  }
-
-  public static class AttributedCharacterIterator.Attribute implements java.io.Serializable {
-    ctor protected AttributedCharacterIterator.Attribute(String);
-    method public final boolean equals(Object);
-    method protected String getName();
-    method public final int hashCode();
-    method protected Object readResolve() throws java.io.InvalidObjectException;
-    field public static final java.text.AttributedCharacterIterator.Attribute INPUT_METHOD_SEGMENT;
-    field public static final java.text.AttributedCharacterIterator.Attribute LANGUAGE;
-    field public static final java.text.AttributedCharacterIterator.Attribute READING;
-  }
-
-  public class AttributedString {
-    ctor public AttributedString(String);
-    ctor public AttributedString(String, java.util.Map<? extends java.text.AttributedCharacterIterator.Attribute,?>);
-    ctor public AttributedString(java.text.AttributedCharacterIterator);
-    ctor public AttributedString(java.text.AttributedCharacterIterator, int, int);
-    ctor public AttributedString(java.text.AttributedCharacterIterator, int, int, java.text.AttributedCharacterIterator.Attribute[]);
-    method public void addAttribute(java.text.AttributedCharacterIterator.Attribute, Object);
-    method public void addAttribute(java.text.AttributedCharacterIterator.Attribute, Object, int, int);
-    method public void addAttributes(java.util.Map<? extends java.text.AttributedCharacterIterator.Attribute,?>, int, int);
-    method public java.text.AttributedCharacterIterator getIterator();
-    method public java.text.AttributedCharacterIterator getIterator(java.text.AttributedCharacterIterator.Attribute[]);
-    method public java.text.AttributedCharacterIterator getIterator(java.text.AttributedCharacterIterator.Attribute[], int, int);
-  }
-
-  public final class Bidi {
-    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 java.text.Bidi createLineBidi(int, int);
-    method public int getBaseLevel();
-    method public int getLength();
-    method public int getLevelAt(int);
-    method public int getRunCount();
-    method public int getRunLevel(int);
-    method public int getRunLimit(int);
-    method public int getRunStart(int);
-    method public boolean isLeftToRight();
-    method public boolean isMixed();
-    method public boolean isRightToLeft();
-    method public static void reorderVisually(byte[], int, Object[], int, int);
-    method public static boolean requiresBidi(char[], int, int);
-    field public static final int DIRECTION_DEFAULT_LEFT_TO_RIGHT = -2; // 0xfffffffe
-    field public static final int DIRECTION_DEFAULT_RIGHT_TO_LEFT = -1; // 0xffffffff
-    field public static final int DIRECTION_LEFT_TO_RIGHT = 0; // 0x0
-    field public static final int DIRECTION_RIGHT_TO_LEFT = 1; // 0x1
-  }
-
-  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 java.text.BreakIterator getCharacterInstance();
-    method public static java.text.BreakIterator getCharacterInstance(java.util.Locale);
-    method public static java.text.BreakIterator getLineInstance();
-    method public static java.text.BreakIterator getLineInstance(java.util.Locale);
-    method public static java.text.BreakIterator getSentenceInstance();
-    method public static java.text.BreakIterator getSentenceInstance(java.util.Locale);
-    method public abstract java.text.CharacterIterator getText();
-    method public static java.text.BreakIterator getWordInstance();
-    method public static java.text.BreakIterator getWordInstance(java.util.Locale);
-    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 abstract void setText(java.text.CharacterIterator);
-    field public static final int DONE = -1; // 0xffffffff
-  }
-
-  public interface CharacterIterator extends java.lang.Cloneable {
-    method public Object clone();
-    method public char current();
-    method public char first();
-    method public int getBeginIndex();
-    method public int getEndIndex();
-    method public int getIndex();
-    method public char last();
-    method public char next();
-    method public char previous();
-    method public char setIndex(int);
-    field public static final char DONE = 65535; // 0xffff '\uffff'
-  }
-
-  public class ChoiceFormat extends java.text.NumberFormat {
-    ctor public ChoiceFormat(String);
-    ctor public ChoiceFormat(double[], String[]);
-    method public void applyPattern(String);
-    method public StringBuffer format(long, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(double, StringBuffer, java.text.FieldPosition);
-    method public Object[] getFormats();
-    method public double[] getLimits();
-    method public static final double nextDouble(double);
-    method public static double nextDouble(double, boolean);
-    method public Number parse(String, java.text.ParsePosition);
-    method public static final double previousDouble(double);
-    method public void setChoices(double[], String[]);
-    method public String toPattern();
-  }
-
-  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 short secondaryOrder(int);
-    method public void setOffset(int);
-    method public void setText(String);
-    method public void setText(java.text.CharacterIterator);
-    method public static short tertiaryOrder(int);
-    field public static final int NULLORDER = -1; // 0xffffffff
-  }
-
-  public abstract class CollationKey implements java.lang.Comparable<java.text.CollationKey> {
-    ctor protected CollationKey(String);
-    method public abstract int compareTo(java.text.CollationKey);
-    method public String getSourceString();
-    method public abstract byte[] toByteArray();
-  }
-
-  public abstract class Collator implements java.lang.Cloneable java.util.Comparator<java.lang.Object> {
-    ctor protected Collator();
-    method public Object clone();
-    method public abstract int compare(String, String);
-    method public int compare(Object, Object);
-    method public boolean equals(String, String);
-    method public static java.util.Locale[] getAvailableLocales();
-    method public abstract java.text.CollationKey getCollationKey(String);
-    method public int getDecomposition();
-    method public static java.text.Collator getInstance();
-    method public static java.text.Collator getInstance(java.util.Locale);
-    method public int getStrength();
-    method public abstract int hashCode();
-    method public void setDecomposition(int);
-    method public void setStrength(int);
-    field public static final int CANONICAL_DECOMPOSITION = 1; // 0x1
-    field public static final int FULL_DECOMPOSITION = 2; // 0x2
-    field public static final int IDENTICAL = 3; // 0x3
-    field public static final int NO_DECOMPOSITION = 0; // 0x0
-    field public static final int PRIMARY = 0; // 0x0
-    field public static final int SECONDARY = 1; // 0x1
-    field public static final int TERTIARY = 2; // 0x2
-  }
-
-  public abstract class DateFormat extends java.text.Format {
-    ctor protected DateFormat();
-    method @NonNull public final StringBuffer format(@NonNull Object, @NonNull StringBuffer, @NonNull java.text.FieldPosition);
-    method @NonNull public abstract StringBuffer format(@NonNull java.util.Date, @NonNull StringBuffer, @NonNull java.text.FieldPosition);
-    method @NonNull public final String format(@NonNull java.util.Date);
-    method @NonNull public static java.util.Locale[] getAvailableLocales();
-    method @NonNull public java.util.Calendar getCalendar();
-    method @NonNull public static final java.text.DateFormat getDateInstance();
-    method @NonNull public static final java.text.DateFormat getDateInstance(int);
-    method @NonNull public static final java.text.DateFormat getDateInstance(int, @NonNull java.util.Locale);
-    method @NonNull public static final java.text.DateFormat getDateTimeInstance();
-    method @NonNull public static final java.text.DateFormat getDateTimeInstance(int, int);
-    method @NonNull public static final java.text.DateFormat getDateTimeInstance(int, int, @NonNull java.util.Locale);
-    method @NonNull public static final java.text.DateFormat getInstance();
-    method @NonNull public java.text.NumberFormat getNumberFormat();
-    method @NonNull public static final java.text.DateFormat getTimeInstance();
-    method @NonNull public static final java.text.DateFormat getTimeInstance(int);
-    method @NonNull public static final java.text.DateFormat getTimeInstance(int, @NonNull java.util.Locale);
-    method @NonNull public java.util.TimeZone getTimeZone();
-    method public boolean isLenient();
-    method @Nullable public java.util.Date parse(@NonNull String) throws java.text.ParseException;
-    method @Nullable public abstract java.util.Date parse(@NonNull String, @NonNull java.text.ParsePosition);
-    method @Nullable public Object parseObject(@NonNull String, @NonNull java.text.ParsePosition);
-    method public void setCalendar(@NonNull java.util.Calendar);
-    method public void setLenient(boolean);
-    method public void setNumberFormat(@NonNull java.text.NumberFormat);
-    method public void setTimeZone(@NonNull java.util.TimeZone);
-    field public static final int AM_PM_FIELD = 14; // 0xe
-    field public static final int DATE_FIELD = 3; // 0x3
-    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 ERA_FIELD = 0; // 0x0
-    field public static final int FULL = 0; // 0x0
-    field public static final int HOUR0_FIELD = 16; // 0x10
-    field public static final int HOUR1_FIELD = 15; // 0xf
-    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 LONG = 1; // 0x1
-    field public static final int MEDIUM = 2; // 0x2
-    field public static final int MILLISECOND_FIELD = 8; // 0x8
-    field public static final int MINUTE_FIELD = 6; // 0x6
-    field public static final int MONTH_FIELD = 2; // 0x2
-    field public static final int SECOND_FIELD = 7; // 0x7
-    field public static final int SHORT = 3; // 0x3
-    field public static final int TIMEZONE_FIELD = 17; // 0x11
-    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 int YEAR_FIELD = 1; // 0x1
-    field @NonNull protected java.util.Calendar calendar;
-    field @NonNull protected java.text.NumberFormat numberFormat;
-  }
-
-  public static class DateFormat.Field extends java.text.Format.Field {
-    ctor protected DateFormat.Field(@NonNull String, int);
-    method public int getCalendarField();
-    method @NonNull public static java.text.DateFormat.Field ofCalendarField(int);
-    field @NonNull public static final java.text.DateFormat.Field AM_PM;
-    field @NonNull public static final java.text.DateFormat.Field DAY_OF_MONTH;
-    field @NonNull public static final java.text.DateFormat.Field DAY_OF_WEEK;
-    field @NonNull public static final java.text.DateFormat.Field DAY_OF_WEEK_IN_MONTH;
-    field @NonNull public static final java.text.DateFormat.Field DAY_OF_YEAR;
-    field @NonNull public static final java.text.DateFormat.Field ERA;
-    field @NonNull public static final java.text.DateFormat.Field HOUR0;
-    field @NonNull public static final java.text.DateFormat.Field HOUR1;
-    field @NonNull public static final java.text.DateFormat.Field HOUR_OF_DAY0;
-    field @NonNull public static final java.text.DateFormat.Field HOUR_OF_DAY1;
-    field @NonNull public static final java.text.DateFormat.Field MILLISECOND;
-    field @NonNull public static final java.text.DateFormat.Field MINUTE;
-    field @NonNull public static final java.text.DateFormat.Field MONTH;
-    field @NonNull public static final java.text.DateFormat.Field SECOND;
-    field @NonNull public static final java.text.DateFormat.Field TIME_ZONE;
-    field @NonNull public static final java.text.DateFormat.Field WEEK_OF_MONTH;
-    field @NonNull public static final java.text.DateFormat.Field WEEK_OF_YEAR;
-    field @NonNull public static final java.text.DateFormat.Field YEAR;
-  }
-
-  public class DateFormatSymbols implements java.lang.Cloneable java.io.Serializable {
-    ctor public DateFormatSymbols();
-    ctor public DateFormatSymbols(java.util.Locale);
-    method public Object clone();
-    method public String[] getAmPmStrings();
-    method public static java.util.Locale[] getAvailableLocales();
-    method public String[] getEras();
-    method public static final java.text.DateFormatSymbols getInstance();
-    method public static final java.text.DateFormatSymbols getInstance(java.util.Locale);
-    method public String getLocalPatternChars();
-    method public String[] getMonths();
-    method public String[] getShortMonths();
-    method public String[] getShortWeekdays();
-    method public String[] getWeekdays();
-    method public String[][] getZoneStrings();
-    method public void setAmPmStrings(String[]);
-    method public void setEras(String[]);
-    method public void setLocalPatternChars(String);
-    method public void setMonths(String[]);
-    method public void setShortMonths(String[]);
-    method public void setShortWeekdays(String[]);
-    method public void setWeekdays(String[]);
-    method public void setZoneStrings(String[][]);
-  }
-
-  public class DecimalFormat extends java.text.NumberFormat {
-    ctor public DecimalFormat();
-    ctor public DecimalFormat(String);
-    ctor public DecimalFormat(String, java.text.DecimalFormatSymbols);
-    method public void applyLocalizedPattern(String);
-    method public void applyPattern(String);
-    method public final StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(double, StringBuffer, java.text.FieldPosition);
-    method public StringBuffer format(long, StringBuffer, java.text.FieldPosition);
-    method public java.text.DecimalFormatSymbols getDecimalFormatSymbols();
-    method public int getGroupingSize();
-    method public int getMultiplier();
-    method public String getNegativePrefix();
-    method public String getNegativeSuffix();
-    method public String getPositivePrefix();
-    method public String getPositiveSuffix();
-    method public boolean isDecimalSeparatorAlwaysShown();
-    method public boolean isParseBigDecimal();
-    method public Number parse(String, java.text.ParsePosition);
-    method public void setDecimalFormatSymbols(java.text.DecimalFormatSymbols);
-    method public void setDecimalSeparatorAlwaysShown(boolean);
-    method public void setGroupingSize(int);
-    method public void setMultiplier(int);
-    method public void setNegativePrefix(String);
-    method public void setNegativeSuffix(String);
-    method public void setParseBigDecimal(boolean);
-    method public void setPositivePrefix(String);
-    method public void setPositiveSuffix(String);
-    method public String toLocalizedPattern();
-    method public String toPattern();
-  }
-
-  public class DecimalFormatSymbols implements java.lang.Cloneable java.io.Serializable {
-    ctor public DecimalFormatSymbols();
-    ctor public DecimalFormatSymbols(java.util.Locale);
-    method public Object clone();
-    method public static java.util.Locale[] getAvailableLocales();
-    method public java.util.Currency getCurrency();
-    method public String getCurrencySymbol();
-    method public char getDecimalSeparator();
-    method public char getDigit();
-    method public String getExponentSeparator();
-    method public char getGroupingSeparator();
-    method public String getInfinity();
-    method public static final java.text.DecimalFormatSymbols getInstance();
-    method public static final java.text.DecimalFormatSymbols getInstance(java.util.Locale);
-    method public String getInternationalCurrencySymbol();
-    method public char getMinusSign();
-    method public char getMonetaryDecimalSeparator();
-    method public String getNaN();
-    method public char getPatternSeparator();
-    method public char getPerMill();
-    method public char getPercent();
-    method public char getZeroDigit();
-    method public void setCurrency(java.util.Currency);
-    method public void setCurrencySymbol(String);
-    method public void setDecimalSeparator(char);
-    method public void setDigit(char);
-    method public void setExponentSeparator(String);
-    method public void setGroupingSeparator(char);
-    method public void setInfinity(String);
-    method public void setInternationalCurrencySymbol(String);
-    method public void setMinusSign(char);
-    method public void setMonetaryDecimalSeparator(char);
-    method public void setNaN(String);
-    method public void setPatternSeparator(char);
-    method public void setPerMill(char);
-    method public void setPercent(char);
-    method public void setZeroDigit(char);
-  }
-
-  public class FieldPosition {
-    ctor public FieldPosition(int);
-    ctor public FieldPosition(java.text.Format.Field);
-    ctor public FieldPosition(java.text.Format.Field, int);
-    method public int getBeginIndex();
-    method public int getEndIndex();
-    method public int getField();
-    method public java.text.Format.Field getFieldAttribute();
-    method public void setBeginIndex(int);
-    method public void setEndIndex(int);
-  }
-
-  public abstract class Format implements java.lang.Cloneable java.io.Serializable {
-    ctor protected Format();
-    method public Object clone();
-    method public final String format(Object);
-    method public abstract StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public java.text.AttributedCharacterIterator formatToCharacterIterator(Object);
-    method public abstract Object parseObject(String, java.text.ParsePosition);
-    method public Object parseObject(String) throws java.text.ParseException;
-  }
-
-  public static class Format.Field extends java.text.AttributedCharacterIterator.Attribute {
-    ctor protected Format.Field(String);
-  }
-
-  public class MessageFormat extends java.text.Format {
-    ctor public MessageFormat(String);
-    ctor public MessageFormat(String, java.util.Locale);
-    method public void applyPattern(String);
-    method public final StringBuffer format(Object[], StringBuffer, java.text.FieldPosition);
-    method public static String format(String, java.lang.Object...);
-    method public final StringBuffer format(Object, StringBuffer, java.text.FieldPosition);
-    method public java.text.Format[] getFormats();
-    method public java.text.Format[] getFormatsByArgumentIndex();
-    method public java.util.Locale getLocale();
-    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 void setFormat(int, java.text.Format);
-    method public void setFormatByArgumentIndex(int, java.text.Format);
-    method public void setFormats(java.text.Format[]);
-    method public void setFormatsByArgumentIndex(java.text.Format[]);
-    method public void setLocale(java.util.Locale);
-    method public String toPattern();
-  }
-
-  public static class MessageFormat.Field extends java.text.Format.Field {
-    ctor protected MessageFormat.Field(String);
-    field public static final java.text.MessageFormat.Field ARGUMENT;
-  }
-
-  public final class Normalizer {
-    method public static boolean isNormalized(CharSequence, java.text.Normalizer.Form);
-    method public static String normalize(CharSequence, java.text.Normalizer.Form);
-  }
-
-  public enum Normalizer.Form {
-    enum_constant public static final java.text.Normalizer.Form NFC;
-    enum_constant public static final java.text.Normalizer.Form NFD;
-    enum_constant public static final java.text.Normalizer.Form NFKC;
-    enum_constant public static final java.text.Normalizer.Form NFKD;
-  }
-
-  public abstract class NumberFormat extends java.text.Format {
-    ctor protected NumberFormat();
-    method @NonNull public StringBuffer format(@NonNull Object, @NonNull StringBuffer, @NonNull java.text.FieldPosition);
-    method @NonNull public final String format(double);
-    method @NonNull public final String format(long);
-    method @NonNull public abstract StringBuffer format(double, @NonNull StringBuffer, @NonNull java.text.FieldPosition);
-    method @NonNull public abstract StringBuffer format(long, @NonNull StringBuffer, @NonNull java.text.FieldPosition);
-    method @NonNull public static java.util.Locale[] getAvailableLocales();
-    method @Nullable public java.util.Currency getCurrency();
-    method @NonNull public static final java.text.NumberFormat getCurrencyInstance();
-    method @NonNull public static java.text.NumberFormat getCurrencyInstance(@NonNull java.util.Locale);
-    method @NonNull public static final java.text.NumberFormat getInstance();
-    method @NonNull public static java.text.NumberFormat getInstance(@NonNull java.util.Locale);
-    method @NonNull public static final java.text.NumberFormat getIntegerInstance();
-    method @NonNull public static java.text.NumberFormat getIntegerInstance(@NonNull java.util.Locale);
-    method public int getMaximumFractionDigits();
-    method public int getMaximumIntegerDigits();
-    method public int getMinimumFractionDigits();
-    method public int getMinimumIntegerDigits();
-    method @NonNull public static final java.text.NumberFormat getNumberInstance();
-    method @NonNull public static java.text.NumberFormat getNumberInstance(@NonNull java.util.Locale);
-    method @NonNull public static final java.text.NumberFormat getPercentInstance();
-    method @NonNull public static java.text.NumberFormat getPercentInstance(@NonNull java.util.Locale);
-    method @NonNull public java.math.RoundingMode getRoundingMode();
-    method public boolean isGroupingUsed();
-    method public boolean isParseIntegerOnly();
-    method @Nullable public abstract Number parse(@NonNull String, @NonNull java.text.ParsePosition);
-    method @Nullable public Number parse(@NonNull String) throws java.text.ParseException;
-    method @Nullable public final Object parseObject(@NonNull String, @NonNull java.text.ParsePosition);
-    method public void setCurrency(@NonNull java.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 setRoundingMode(@Nullable java.math.RoundingMode);
-    field public static final int FRACTION_FIELD = 1; // 0x1
-    field public static final int INTEGER_FIELD = 0; // 0x0
-  }
-
-  public static class NumberFormat.Field extends java.text.Format.Field {
-    ctor protected NumberFormat.Field(@NonNull String);
-    field @NonNull public static final java.text.NumberFormat.Field CURRENCY;
-    field @NonNull public static final java.text.NumberFormat.Field DECIMAL_SEPARATOR;
-    field @NonNull public static final java.text.NumberFormat.Field EXPONENT;
-    field @NonNull public static final java.text.NumberFormat.Field EXPONENT_SIGN;
-    field @NonNull public static final java.text.NumberFormat.Field EXPONENT_SYMBOL;
-    field @NonNull public static final java.text.NumberFormat.Field FRACTION;
-    field @NonNull public static final java.text.NumberFormat.Field GROUPING_SEPARATOR;
-    field @NonNull public static final java.text.NumberFormat.Field INTEGER;
-    field @NonNull public static final java.text.NumberFormat.Field PERCENT;
-    field @NonNull public static final java.text.NumberFormat.Field PERMILLE;
-    field @NonNull public static final java.text.NumberFormat.Field SIGN;
-  }
-
-  public class ParseException extends java.lang.Exception {
-    ctor public ParseException(String, int);
-    method public int getErrorOffset();
-  }
-
-  public class ParsePosition {
-    ctor public ParsePosition(int);
-    method public int getErrorIndex();
-    method public int getIndex();
-    method public void setErrorIndex(int);
-    method public void setIndex(int);
-  }
-
-  public class RuleBasedCollator extends java.text.Collator {
-    ctor public RuleBasedCollator(String) throws java.text.ParseException;
-    method public int compare(String, String);
-    method public java.text.CollationElementIterator getCollationElementIterator(String);
-    method public java.text.CollationElementIterator getCollationElementIterator(java.text.CharacterIterator);
-    method public java.text.CollationKey getCollationKey(String);
-    method public String getRules();
-  }
-
-  public class SimpleDateFormat extends java.text.DateFormat {
-    ctor public SimpleDateFormat();
-    ctor public SimpleDateFormat(String);
-    ctor public SimpleDateFormat(String, java.util.Locale);
-    ctor public SimpleDateFormat(String, java.text.DateFormatSymbols);
-    method public void applyLocalizedPattern(String);
-    method public void applyPattern(String);
-    method public StringBuffer format(java.util.Date, StringBuffer, java.text.FieldPosition);
-    method public java.util.Date get2DigitYearStart();
-    method public java.text.DateFormatSymbols getDateFormatSymbols();
-    method public java.util.Date parse(String, java.text.ParsePosition);
-    method public void set2DigitYearStart(java.util.Date);
-    method public void setDateFormatSymbols(java.text.DateFormatSymbols);
-    method public String toLocalizedPattern();
-    method public String toPattern();
-  }
-
-  public final class StringCharacterIterator implements java.text.CharacterIterator {
-    ctor public StringCharacterIterator(String);
-    ctor public StringCharacterIterator(String, int);
-    ctor public StringCharacterIterator(String, int, int, int);
-    method public Object clone();
-    method public char current();
-    method public char first();
-    method public int getBeginIndex();
-    method public int getEndIndex();
-    method public int getIndex();
-    method public char last();
-    method public char next();
-    method public char previous();
-    method public char setIndex(int);
-    method public void setText(String);
-  }
-
-}
-
-package java.time {
-
-  public abstract class Clock {
-    ctor protected Clock();
-    method public static java.time.Clock fixed(java.time.Instant, java.time.ZoneId);
-    method public abstract java.time.ZoneId getZone();
-    method public abstract java.time.Instant instant();
-    method public long millis();
-    method public static java.time.Clock offset(java.time.Clock, java.time.Duration);
-    method public static java.time.Clock system(java.time.ZoneId);
-    method public static java.time.Clock systemDefaultZone();
-    method public static java.time.Clock systemUTC();
-    method public static java.time.Clock tick(java.time.Clock, java.time.Duration);
-    method public static java.time.Clock tickMinutes(java.time.ZoneId);
-    method public static java.time.Clock tickSeconds(java.time.ZoneId);
-    method public abstract java.time.Clock withZone(java.time.ZoneId);
-  }
-
-  public class DateTimeException extends java.lang.RuntimeException {
-    ctor public DateTimeException(String);
-    ctor public DateTimeException(String, Throwable);
-  }
-
-  public enum DayOfWeek implements java.time.temporal.TemporalAccessor java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public static java.time.DayOfWeek from(java.time.temporal.TemporalAccessor);
-    method public String getDisplayName(java.time.format.TextStyle, java.util.Locale);
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getValue();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public java.time.DayOfWeek minus(long);
-    method public static java.time.DayOfWeek of(int);
-    method public java.time.DayOfWeek plus(long);
-    enum_constant public static final java.time.DayOfWeek FRIDAY;
-    enum_constant public static final java.time.DayOfWeek MONDAY;
-    enum_constant public static final java.time.DayOfWeek SATURDAY;
-    enum_constant public static final java.time.DayOfWeek SUNDAY;
-    enum_constant public static final java.time.DayOfWeek THURSDAY;
-    enum_constant public static final java.time.DayOfWeek TUESDAY;
-    enum_constant public static final java.time.DayOfWeek WEDNESDAY;
-  }
-
-  public final class Duration implements java.lang.Comparable<java.time.Duration> java.io.Serializable java.time.temporal.TemporalAmount {
-    method public java.time.Duration abs();
-    method public java.time.temporal.Temporal addTo(java.time.temporal.Temporal);
-    method public static java.time.Duration between(java.time.temporal.Temporal, java.time.temporal.Temporal);
-    method public int compareTo(java.time.Duration);
-    method public java.time.Duration dividedBy(long);
-    method public static java.time.Duration from(java.time.temporal.TemporalAmount);
-    method public long get(java.time.temporal.TemporalUnit);
-    method public int getNano();
-    method public long getSeconds();
-    method public java.util.List<java.time.temporal.TemporalUnit> getUnits();
-    method public boolean isNegative();
-    method public boolean isZero();
-    method public java.time.Duration minus(java.time.Duration);
-    method public java.time.Duration minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Duration minusDays(long);
-    method public java.time.Duration minusHours(long);
-    method public java.time.Duration minusMillis(long);
-    method public java.time.Duration minusMinutes(long);
-    method public java.time.Duration minusNanos(long);
-    method public java.time.Duration minusSeconds(long);
-    method public java.time.Duration multipliedBy(long);
-    method public java.time.Duration negated();
-    method public static java.time.Duration of(long, java.time.temporal.TemporalUnit);
-    method public static java.time.Duration ofDays(long);
-    method public static java.time.Duration ofHours(long);
-    method public static java.time.Duration ofMillis(long);
-    method public static java.time.Duration ofMinutes(long);
-    method public static java.time.Duration ofNanos(long);
-    method public static java.time.Duration ofSeconds(long);
-    method public static java.time.Duration ofSeconds(long, long);
-    method public static java.time.Duration parse(CharSequence);
-    method public java.time.Duration plus(java.time.Duration);
-    method public java.time.Duration plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Duration plusDays(long);
-    method public java.time.Duration plusHours(long);
-    method public java.time.Duration plusMillis(long);
-    method public java.time.Duration plusMinutes(long);
-    method public java.time.Duration plusNanos(long);
-    method public java.time.Duration plusSeconds(long);
-    method public java.time.temporal.Temporal subtractFrom(java.time.temporal.Temporal);
-    method public long toDays();
-    method public long toHours();
-    method public long toMillis();
-    method public long toMinutes();
-    method public long toNanos();
-    method public java.time.Duration withNanos(int);
-    method public java.time.Duration withSeconds(long);
-    field public static final java.time.Duration ZERO;
-  }
-
-  public final class Instant implements java.lang.Comparable<java.time.Instant> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.OffsetDateTime atOffset(java.time.ZoneOffset);
-    method public java.time.ZonedDateTime atZone(java.time.ZoneId);
-    method public int compareTo(java.time.Instant);
-    method public static java.time.Instant from(java.time.temporal.TemporalAccessor);
-    method public long getEpochSecond();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getNano();
-    method public boolean isAfter(java.time.Instant);
-    method public boolean isBefore(java.time.Instant);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public java.time.Instant minus(java.time.temporal.TemporalAmount);
-    method public java.time.Instant minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Instant minusMillis(long);
-    method public java.time.Instant minusNanos(long);
-    method public java.time.Instant minusSeconds(long);
-    method public static java.time.Instant now();
-    method public static java.time.Instant now(java.time.Clock);
-    method public static java.time.Instant ofEpochMilli(long);
-    method public static java.time.Instant ofEpochSecond(long);
-    method public static java.time.Instant ofEpochSecond(long, long);
-    method public static java.time.Instant parse(CharSequence);
-    method public java.time.Instant plus(java.time.temporal.TemporalAmount);
-    method public java.time.Instant plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Instant plusMillis(long);
-    method public java.time.Instant plusNanos(long);
-    method public java.time.Instant plusSeconds(long);
-    method public long toEpochMilli();
-    method public java.time.Instant truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.Instant with(java.time.temporal.TemporalAdjuster);
-    method public java.time.Instant with(java.time.temporal.TemporalField, long);
-    field public static final java.time.Instant EPOCH;
-    field public static final java.time.Instant MAX;
-    field public static final java.time.Instant MIN;
-  }
-
-  public final class LocalDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.LocalDateTime atStartOfDay();
-    method public java.time.ZonedDateTime atStartOfDay(java.time.ZoneId);
-    method public java.time.LocalDateTime atTime(java.time.LocalTime);
-    method public java.time.LocalDateTime atTime(int, int);
-    method public java.time.LocalDateTime atTime(int, int, int);
-    method public java.time.LocalDateTime atTime(int, int, int, int);
-    method public java.time.OffsetDateTime atTime(java.time.OffsetTime);
-    method public static java.time.LocalDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.IsoChronology getChronology();
-    method public int getDayOfMonth();
-    method public java.time.DayOfWeek getDayOfWeek();
-    method public int getDayOfYear();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public int getYear();
-    method public int lengthOfMonth();
-    method public java.time.LocalDate minus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalDate minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalDate minusDays(long);
-    method public java.time.LocalDate minusMonths(long);
-    method public java.time.LocalDate minusWeeks(long);
-    method public java.time.LocalDate minusYears(long);
-    method public static java.time.LocalDate now();
-    method public static java.time.LocalDate now(java.time.ZoneId);
-    method public static java.time.LocalDate now(java.time.Clock);
-    method public static java.time.LocalDate of(int, java.time.Month, int);
-    method public static java.time.LocalDate of(int, int, int);
-    method public static java.time.LocalDate ofEpochDay(long);
-    method public static java.time.LocalDate ofYearDay(int, int);
-    method public static java.time.LocalDate parse(CharSequence);
-    method public static java.time.LocalDate parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.LocalDate plus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalDate plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalDate plusDays(long);
-    method public java.time.LocalDate plusMonths(long);
-    method public java.time.LocalDate plusWeeks(long);
-    method public java.time.LocalDate plusYears(long);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.Period until(java.time.chrono.ChronoLocalDate);
-    method public java.time.LocalDate with(java.time.temporal.TemporalAdjuster);
-    method public java.time.LocalDate with(java.time.temporal.TemporalField, long);
-    method public java.time.LocalDate withDayOfMonth(int);
-    method public java.time.LocalDate withDayOfYear(int);
-    method public java.time.LocalDate withMonth(int);
-    method public java.time.LocalDate withYear(int);
-    field public static final java.time.LocalDate MAX;
-    field public static final java.time.LocalDate MIN;
-  }
-
-  public final class LocalDateTime implements java.time.chrono.ChronoLocalDateTime<java.time.LocalDate> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.OffsetDateTime atOffset(java.time.ZoneOffset);
-    method public java.time.ZonedDateTime atZone(java.time.ZoneId);
-    method public static java.time.LocalDateTime from(java.time.temporal.TemporalAccessor);
-    method public int getDayOfMonth();
-    method public java.time.DayOfWeek getDayOfWeek();
-    method public int getDayOfYear();
-    method public int getHour();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getMinute();
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public int getNano();
-    method public int getSecond();
-    method public int getYear();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public java.time.LocalDateTime minus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalDateTime minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalDateTime minusDays(long);
-    method public java.time.LocalDateTime minusHours(long);
-    method public java.time.LocalDateTime minusMinutes(long);
-    method public java.time.LocalDateTime minusMonths(long);
-    method public java.time.LocalDateTime minusNanos(long);
-    method public java.time.LocalDateTime minusSeconds(long);
-    method public java.time.LocalDateTime minusWeeks(long);
-    method public java.time.LocalDateTime minusYears(long);
-    method public static java.time.LocalDateTime now();
-    method public static java.time.LocalDateTime now(java.time.ZoneId);
-    method public static java.time.LocalDateTime now(java.time.Clock);
-    method public static java.time.LocalDateTime of(int, java.time.Month, int, int, int);
-    method public static java.time.LocalDateTime of(int, java.time.Month, int, int, int, int);
-    method public static java.time.LocalDateTime of(int, java.time.Month, int, int, int, int, int);
-    method public static java.time.LocalDateTime of(int, int, int, int, int);
-    method public static java.time.LocalDateTime of(int, int, int, int, int, int);
-    method public static java.time.LocalDateTime of(int, int, int, int, int, int, int);
-    method public static java.time.LocalDateTime of(java.time.LocalDate, java.time.LocalTime);
-    method public static java.time.LocalDateTime ofEpochSecond(long, int, java.time.ZoneOffset);
-    method public static java.time.LocalDateTime ofInstant(java.time.Instant, java.time.ZoneId);
-    method public static java.time.LocalDateTime parse(CharSequence);
-    method public static java.time.LocalDateTime parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.LocalDateTime plus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalDateTime plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalDateTime plusDays(long);
-    method public java.time.LocalDateTime plusHours(long);
-    method public java.time.LocalDateTime plusMinutes(long);
-    method public java.time.LocalDateTime plusMonths(long);
-    method public java.time.LocalDateTime plusNanos(long);
-    method public java.time.LocalDateTime plusSeconds(long);
-    method public java.time.LocalDateTime plusWeeks(long);
-    method public java.time.LocalDateTime plusYears(long);
-    method public java.time.LocalDate toLocalDate();
-    method public java.time.LocalTime toLocalTime();
-    method public java.time.LocalDateTime truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.LocalDateTime with(java.time.temporal.TemporalAdjuster);
-    method public java.time.LocalDateTime with(java.time.temporal.TemporalField, long);
-    method public java.time.LocalDateTime withDayOfMonth(int);
-    method public java.time.LocalDateTime withDayOfYear(int);
-    method public java.time.LocalDateTime withHour(int);
-    method public java.time.LocalDateTime withMinute(int);
-    method public java.time.LocalDateTime withMonth(int);
-    method public java.time.LocalDateTime withNano(int);
-    method public java.time.LocalDateTime withSecond(int);
-    method public java.time.LocalDateTime withYear(int);
-    field public static final java.time.LocalDateTime MAX;
-    field public static final java.time.LocalDateTime MIN;
-  }
-
-  public final class LocalTime implements java.lang.Comparable<java.time.LocalTime> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.LocalDateTime atDate(java.time.LocalDate);
-    method public java.time.OffsetTime atOffset(java.time.ZoneOffset);
-    method public int compareTo(java.time.LocalTime);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.LocalTime from(java.time.temporal.TemporalAccessor);
-    method public int getHour();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getMinute();
-    method public int getNano();
-    method public int getSecond();
-    method public boolean isAfter(java.time.LocalTime);
-    method public boolean isBefore(java.time.LocalTime);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public java.time.LocalTime minus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalTime minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalTime minusHours(long);
-    method public java.time.LocalTime minusMinutes(long);
-    method public java.time.LocalTime minusNanos(long);
-    method public java.time.LocalTime minusSeconds(long);
-    method public static java.time.LocalTime now();
-    method public static java.time.LocalTime now(java.time.ZoneId);
-    method public static java.time.LocalTime now(java.time.Clock);
-    method public static java.time.LocalTime of(int, int);
-    method public static java.time.LocalTime of(int, int, int);
-    method public static java.time.LocalTime of(int, int, int, int);
-    method public static java.time.LocalTime ofNanoOfDay(long);
-    method public static java.time.LocalTime ofSecondOfDay(long);
-    method public static java.time.LocalTime parse(CharSequence);
-    method public static java.time.LocalTime parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.LocalTime plus(java.time.temporal.TemporalAmount);
-    method public java.time.LocalTime plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.LocalTime plusHours(long);
-    method public java.time.LocalTime plusMinutes(long);
-    method public java.time.LocalTime plusNanos(long);
-    method public java.time.LocalTime plusSeconds(long);
-    method public long toNanoOfDay();
-    method public int toSecondOfDay();
-    method public java.time.LocalTime truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.LocalTime with(java.time.temporal.TemporalAdjuster);
-    method public java.time.LocalTime with(java.time.temporal.TemporalField, long);
-    method public java.time.LocalTime withHour(int);
-    method public java.time.LocalTime withMinute(int);
-    method public java.time.LocalTime withNano(int);
-    method public java.time.LocalTime withSecond(int);
-    field public static final java.time.LocalTime MAX;
-    field public static final java.time.LocalTime MIDNIGHT;
-    field public static final java.time.LocalTime MIN;
-    field public static final java.time.LocalTime NOON;
-  }
-
-  public enum Month implements java.time.temporal.TemporalAccessor java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public int firstDayOfYear(boolean);
-    method public java.time.Month firstMonthOfQuarter();
-    method public static java.time.Month from(java.time.temporal.TemporalAccessor);
-    method public String getDisplayName(java.time.format.TextStyle, java.util.Locale);
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getValue();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public int length(boolean);
-    method public int maxLength();
-    method public int minLength();
-    method public java.time.Month minus(long);
-    method public static java.time.Month of(int);
-    method public java.time.Month plus(long);
-    enum_constant public static final java.time.Month APRIL;
-    enum_constant public static final java.time.Month AUGUST;
-    enum_constant public static final java.time.Month DECEMBER;
-    enum_constant public static final java.time.Month FEBRUARY;
-    enum_constant public static final java.time.Month JANUARY;
-    enum_constant public static final java.time.Month JULY;
-    enum_constant public static final java.time.Month JUNE;
-    enum_constant public static final java.time.Month MARCH;
-    enum_constant public static final java.time.Month MAY;
-    enum_constant public static final java.time.Month NOVEMBER;
-    enum_constant public static final java.time.Month OCTOBER;
-    enum_constant public static final java.time.Month SEPTEMBER;
-  }
-
-  public final class MonthDay implements java.lang.Comparable<java.time.MonthDay> java.io.Serializable java.time.temporal.TemporalAccessor java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.LocalDate atYear(int);
-    method public int compareTo(java.time.MonthDay);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.MonthDay from(java.time.temporal.TemporalAccessor);
-    method public int getDayOfMonth();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public boolean isAfter(java.time.MonthDay);
-    method public boolean isBefore(java.time.MonthDay);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isValidYear(int);
-    method public static java.time.MonthDay now();
-    method public static java.time.MonthDay now(java.time.ZoneId);
-    method public static java.time.MonthDay now(java.time.Clock);
-    method public static java.time.MonthDay of(java.time.Month, int);
-    method public static java.time.MonthDay of(int, int);
-    method public static java.time.MonthDay parse(CharSequence);
-    method public static java.time.MonthDay parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.MonthDay with(java.time.Month);
-    method public java.time.MonthDay withDayOfMonth(int);
-    method public java.time.MonthDay withMonth(int);
-  }
-
-  public final class OffsetDateTime implements java.lang.Comparable<java.time.OffsetDateTime> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.ZonedDateTime atZoneSameInstant(java.time.ZoneId);
-    method public java.time.ZonedDateTime atZoneSimilarLocal(java.time.ZoneId);
-    method public int compareTo(java.time.OffsetDateTime);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.OffsetDateTime from(java.time.temporal.TemporalAccessor);
-    method public int getDayOfMonth();
-    method public java.time.DayOfWeek getDayOfWeek();
-    method public int getDayOfYear();
-    method public int getHour();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getMinute();
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public int getNano();
-    method public java.time.ZoneOffset getOffset();
-    method public int getSecond();
-    method public int getYear();
-    method public boolean isAfter(java.time.OffsetDateTime);
-    method public boolean isBefore(java.time.OffsetDateTime);
-    method public boolean isEqual(java.time.OffsetDateTime);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public java.time.OffsetDateTime minus(java.time.temporal.TemporalAmount);
-    method public java.time.OffsetDateTime minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetDateTime minusDays(long);
-    method public java.time.OffsetDateTime minusHours(long);
-    method public java.time.OffsetDateTime minusMinutes(long);
-    method public java.time.OffsetDateTime minusMonths(long);
-    method public java.time.OffsetDateTime minusNanos(long);
-    method public java.time.OffsetDateTime minusSeconds(long);
-    method public java.time.OffsetDateTime minusWeeks(long);
-    method public java.time.OffsetDateTime minusYears(long);
-    method public static java.time.OffsetDateTime now();
-    method public static java.time.OffsetDateTime now(java.time.ZoneId);
-    method public static java.time.OffsetDateTime now(java.time.Clock);
-    method public static java.time.OffsetDateTime of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneOffset);
-    method public static java.time.OffsetDateTime of(java.time.LocalDateTime, java.time.ZoneOffset);
-    method public static java.time.OffsetDateTime of(int, int, int, int, int, int, int, java.time.ZoneOffset);
-    method public static java.time.OffsetDateTime ofInstant(java.time.Instant, java.time.ZoneId);
-    method public static java.time.OffsetDateTime parse(CharSequence);
-    method public static java.time.OffsetDateTime parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.OffsetDateTime plus(java.time.temporal.TemporalAmount);
-    method public java.time.OffsetDateTime plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetDateTime plusDays(long);
-    method public java.time.OffsetDateTime plusHours(long);
-    method public java.time.OffsetDateTime plusMinutes(long);
-    method public java.time.OffsetDateTime plusMonths(long);
-    method public java.time.OffsetDateTime plusNanos(long);
-    method public java.time.OffsetDateTime plusSeconds(long);
-    method public java.time.OffsetDateTime plusWeeks(long);
-    method public java.time.OffsetDateTime plusYears(long);
-    method public static java.util.Comparator<java.time.OffsetDateTime> timeLineOrder();
-    method public long toEpochSecond();
-    method public java.time.Instant toInstant();
-    method public java.time.LocalDate toLocalDate();
-    method public java.time.LocalDateTime toLocalDateTime();
-    method public java.time.LocalTime toLocalTime();
-    method public java.time.OffsetTime toOffsetTime();
-    method public java.time.ZonedDateTime toZonedDateTime();
-    method public java.time.OffsetDateTime truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetDateTime with(java.time.temporal.TemporalAdjuster);
-    method public java.time.OffsetDateTime with(java.time.temporal.TemporalField, long);
-    method public java.time.OffsetDateTime withDayOfMonth(int);
-    method public java.time.OffsetDateTime withDayOfYear(int);
-    method public java.time.OffsetDateTime withHour(int);
-    method public java.time.OffsetDateTime withMinute(int);
-    method public java.time.OffsetDateTime withMonth(int);
-    method public java.time.OffsetDateTime withNano(int);
-    method public java.time.OffsetDateTime withOffsetSameInstant(java.time.ZoneOffset);
-    method public java.time.OffsetDateTime withOffsetSameLocal(java.time.ZoneOffset);
-    method public java.time.OffsetDateTime withSecond(int);
-    method public java.time.OffsetDateTime withYear(int);
-    field public static final java.time.OffsetDateTime MAX;
-    field public static final java.time.OffsetDateTime MIN;
-  }
-
-  public final class OffsetTime implements java.lang.Comparable<java.time.OffsetTime> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.OffsetDateTime atDate(java.time.LocalDate);
-    method public int compareTo(java.time.OffsetTime);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.OffsetTime from(java.time.temporal.TemporalAccessor);
-    method public int getHour();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getMinute();
-    method public int getNano();
-    method public java.time.ZoneOffset getOffset();
-    method public int getSecond();
-    method public boolean isAfter(java.time.OffsetTime);
-    method public boolean isBefore(java.time.OffsetTime);
-    method public boolean isEqual(java.time.OffsetTime);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public java.time.OffsetTime minus(java.time.temporal.TemporalAmount);
-    method public java.time.OffsetTime minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetTime minusHours(long);
-    method public java.time.OffsetTime minusMinutes(long);
-    method public java.time.OffsetTime minusNanos(long);
-    method public java.time.OffsetTime minusSeconds(long);
-    method public static java.time.OffsetTime now();
-    method public static java.time.OffsetTime now(java.time.ZoneId);
-    method public static java.time.OffsetTime now(java.time.Clock);
-    method public static java.time.OffsetTime of(java.time.LocalTime, java.time.ZoneOffset);
-    method public static java.time.OffsetTime of(int, int, int, int, java.time.ZoneOffset);
-    method public static java.time.OffsetTime ofInstant(java.time.Instant, java.time.ZoneId);
-    method public static java.time.OffsetTime parse(CharSequence);
-    method public static java.time.OffsetTime parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.OffsetTime plus(java.time.temporal.TemporalAmount);
-    method public java.time.OffsetTime plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetTime plusHours(long);
-    method public java.time.OffsetTime plusMinutes(long);
-    method public java.time.OffsetTime plusNanos(long);
-    method public java.time.OffsetTime plusSeconds(long);
-    method public java.time.LocalTime toLocalTime();
-    method public java.time.OffsetTime truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.OffsetTime with(java.time.temporal.TemporalAdjuster);
-    method public java.time.OffsetTime with(java.time.temporal.TemporalField, long);
-    method public java.time.OffsetTime withHour(int);
-    method public java.time.OffsetTime withMinute(int);
-    method public java.time.OffsetTime withNano(int);
-    method public java.time.OffsetTime withOffsetSameInstant(java.time.ZoneOffset);
-    method public java.time.OffsetTime withOffsetSameLocal(java.time.ZoneOffset);
-    method public java.time.OffsetTime withSecond(int);
-    field public static final java.time.OffsetTime MAX;
-    field public static final java.time.OffsetTime MIN;
-  }
-
-  public final class Period implements java.time.chrono.ChronoPeriod java.io.Serializable {
-    method public java.time.temporal.Temporal addTo(java.time.temporal.Temporal);
-    method public static java.time.Period between(java.time.LocalDate, java.time.LocalDate);
-    method public static java.time.Period from(java.time.temporal.TemporalAmount);
-    method public long get(java.time.temporal.TemporalUnit);
-    method public java.time.chrono.IsoChronology getChronology();
-    method public int getDays();
-    method public int getMonths();
-    method public java.util.List<java.time.temporal.TemporalUnit> getUnits();
-    method public int getYears();
-    method public java.time.Period minus(java.time.temporal.TemporalAmount);
-    method public java.time.Period minusDays(long);
-    method public java.time.Period minusMonths(long);
-    method public java.time.Period minusYears(long);
-    method public java.time.Period multipliedBy(int);
-    method public java.time.Period negated();
-    method public java.time.Period normalized();
-    method public static java.time.Period of(int, int, int);
-    method public static java.time.Period ofDays(int);
-    method public static java.time.Period ofMonths(int);
-    method public static java.time.Period ofWeeks(int);
-    method public static java.time.Period ofYears(int);
-    method public static java.time.Period parse(CharSequence);
-    method public java.time.Period plus(java.time.temporal.TemporalAmount);
-    method public java.time.Period plusDays(long);
-    method public java.time.Period plusMonths(long);
-    method public java.time.Period plusYears(long);
-    method public java.time.temporal.Temporal subtractFrom(java.time.temporal.Temporal);
-    method public long toTotalMonths();
-    method public java.time.Period withDays(int);
-    method public java.time.Period withMonths(int);
-    method public java.time.Period withYears(int);
-    field public static final java.time.Period ZERO;
-  }
-
-  public final class Year implements java.lang.Comparable<java.time.Year> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.LocalDate atDay(int);
-    method public java.time.YearMonth atMonth(java.time.Month);
-    method public java.time.YearMonth atMonth(int);
-    method public java.time.LocalDate atMonthDay(java.time.MonthDay);
-    method public int compareTo(java.time.Year);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.Year from(java.time.temporal.TemporalAccessor);
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int getValue();
-    method public boolean isAfter(java.time.Year);
-    method public boolean isBefore(java.time.Year);
-    method public static boolean isLeap(long);
-    method public boolean isLeap();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public boolean isValidMonthDay(java.time.MonthDay);
-    method public int length();
-    method public java.time.Year minus(java.time.temporal.TemporalAmount);
-    method public java.time.Year minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Year minusYears(long);
-    method public static java.time.Year now();
-    method public static java.time.Year now(java.time.ZoneId);
-    method public static java.time.Year now(java.time.Clock);
-    method public static java.time.Year of(int);
-    method public static java.time.Year parse(CharSequence);
-    method public static java.time.Year parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.Year plus(java.time.temporal.TemporalAmount);
-    method public java.time.Year plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.Year plusYears(long);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.Year with(java.time.temporal.TemporalAdjuster);
-    method public java.time.Year with(java.time.temporal.TemporalField, long);
-    field public static final int MAX_VALUE = 999999999; // 0x3b9ac9ff
-    field public static final int MIN_VALUE = -999999999; // 0xc4653601
-  }
-
-  public final class YearMonth implements java.lang.Comparable<java.time.YearMonth> java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.LocalDate atDay(int);
-    method public java.time.LocalDate atEndOfMonth();
-    method public int compareTo(java.time.YearMonth);
-    method public String format(java.time.format.DateTimeFormatter);
-    method public static java.time.YearMonth from(java.time.temporal.TemporalAccessor);
-    method public long getLong(java.time.temporal.TemporalField);
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public int getYear();
-    method public boolean isAfter(java.time.YearMonth);
-    method public boolean isBefore(java.time.YearMonth);
-    method public boolean isLeapYear();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public boolean isValidDay(int);
-    method public int lengthOfMonth();
-    method public int lengthOfYear();
-    method public java.time.YearMonth minus(java.time.temporal.TemporalAmount);
-    method public java.time.YearMonth minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.YearMonth minusMonths(long);
-    method public java.time.YearMonth minusYears(long);
-    method public static java.time.YearMonth now();
-    method public static java.time.YearMonth now(java.time.ZoneId);
-    method public static java.time.YearMonth now(java.time.Clock);
-    method public static java.time.YearMonth of(int, java.time.Month);
-    method public static java.time.YearMonth of(int, int);
-    method public static java.time.YearMonth parse(CharSequence);
-    method public static java.time.YearMonth parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.YearMonth plus(java.time.temporal.TemporalAmount);
-    method public java.time.YearMonth plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.YearMonth plusMonths(long);
-    method public java.time.YearMonth plusYears(long);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.YearMonth with(java.time.temporal.TemporalAdjuster);
-    method public java.time.YearMonth with(java.time.temporal.TemporalField, long);
-    method public java.time.YearMonth withMonth(int);
-    method public java.time.YearMonth withYear(int);
-  }
-
-  public abstract class ZoneId implements java.io.Serializable {
-    method public static java.time.ZoneId from(java.time.temporal.TemporalAccessor);
-    method public static java.util.Set<java.lang.String> getAvailableZoneIds();
-    method public String getDisplayName(java.time.format.TextStyle, java.util.Locale);
-    method public abstract String getId();
-    method public abstract java.time.zone.ZoneRules getRules();
-    method public java.time.ZoneId normalized();
-    method public static java.time.ZoneId of(String, java.util.Map<java.lang.String,java.lang.String>);
-    method public static java.time.ZoneId of(String);
-    method public static java.time.ZoneId ofOffset(String, java.time.ZoneOffset);
-    method public static java.time.ZoneId systemDefault();
-    field public static final java.util.Map<java.lang.String,java.lang.String> SHORT_IDS;
-  }
-
-  public final class ZoneOffset extends java.time.ZoneId implements java.lang.Comparable<java.time.ZoneOffset> java.io.Serializable java.time.temporal.TemporalAccessor java.time.temporal.TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public int compareTo(java.time.ZoneOffset);
-    method public static java.time.ZoneOffset from(java.time.temporal.TemporalAccessor);
-    method public String getId();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public java.time.zone.ZoneRules getRules();
-    method public int getTotalSeconds();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public static java.time.ZoneOffset of(String);
-    method public static java.time.ZoneOffset ofHours(int);
-    method public static java.time.ZoneOffset ofHoursMinutes(int, int);
-    method public static java.time.ZoneOffset ofHoursMinutesSeconds(int, int, int);
-    method public static java.time.ZoneOffset ofTotalSeconds(int);
-    field public static final java.time.ZoneOffset MAX;
-    field public static final java.time.ZoneOffset MIN;
-    field public static final java.time.ZoneOffset UTC;
-  }
-
-  public final class ZonedDateTime implements java.time.chrono.ChronoZonedDateTime<java.time.LocalDate> java.io.Serializable java.time.temporal.Temporal {
-    method public static java.time.ZonedDateTime from(java.time.temporal.TemporalAccessor);
-    method public int getDayOfMonth();
-    method public java.time.DayOfWeek getDayOfWeek();
-    method public int getDayOfYear();
-    method public int getHour();
-    method public int getMinute();
-    method public java.time.Month getMonth();
-    method public int getMonthValue();
-    method public int getNano();
-    method public java.time.ZoneOffset getOffset();
-    method public int getSecond();
-    method public int getYear();
-    method public java.time.ZoneId getZone();
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public java.time.ZonedDateTime minus(java.time.temporal.TemporalAmount);
-    method public java.time.ZonedDateTime minus(long, java.time.temporal.TemporalUnit);
-    method public java.time.ZonedDateTime minusDays(long);
-    method public java.time.ZonedDateTime minusHours(long);
-    method public java.time.ZonedDateTime minusMinutes(long);
-    method public java.time.ZonedDateTime minusMonths(long);
-    method public java.time.ZonedDateTime minusNanos(long);
-    method public java.time.ZonedDateTime minusSeconds(long);
-    method public java.time.ZonedDateTime minusWeeks(long);
-    method public java.time.ZonedDateTime minusYears(long);
-    method public static java.time.ZonedDateTime now();
-    method public static java.time.ZonedDateTime now(java.time.ZoneId);
-    method public static java.time.ZonedDateTime now(java.time.Clock);
-    method public static java.time.ZonedDateTime of(java.time.LocalDate, java.time.LocalTime, java.time.ZoneId);
-    method public static java.time.ZonedDateTime of(java.time.LocalDateTime, java.time.ZoneId);
-    method public static java.time.ZonedDateTime of(int, int, int, int, int, int, int, java.time.ZoneId);
-    method public static java.time.ZonedDateTime ofInstant(java.time.Instant, java.time.ZoneId);
-    method public static java.time.ZonedDateTime ofInstant(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneId);
-    method public static java.time.ZonedDateTime ofLocal(java.time.LocalDateTime, java.time.ZoneId, java.time.ZoneOffset);
-    method public static java.time.ZonedDateTime ofStrict(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneId);
-    method public static java.time.ZonedDateTime parse(CharSequence);
-    method public static java.time.ZonedDateTime parse(CharSequence, java.time.format.DateTimeFormatter);
-    method public java.time.ZonedDateTime plus(java.time.temporal.TemporalAmount);
-    method public java.time.ZonedDateTime plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.ZonedDateTime plusDays(long);
-    method public java.time.ZonedDateTime plusHours(long);
-    method public java.time.ZonedDateTime plusMinutes(long);
-    method public java.time.ZonedDateTime plusMonths(long);
-    method public java.time.ZonedDateTime plusNanos(long);
-    method public java.time.ZonedDateTime plusSeconds(long);
-    method public java.time.ZonedDateTime plusWeeks(long);
-    method public java.time.ZonedDateTime plusYears(long);
-    method public java.time.LocalDate toLocalDate();
-    method public java.time.LocalDateTime toLocalDateTime();
-    method public java.time.OffsetDateTime toOffsetDateTime();
-    method public java.time.ZonedDateTime truncatedTo(java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.ZonedDateTime with(java.time.temporal.TemporalAdjuster);
-    method public java.time.ZonedDateTime with(java.time.temporal.TemporalField, long);
-    method public java.time.ZonedDateTime withDayOfMonth(int);
-    method public java.time.ZonedDateTime withDayOfYear(int);
-    method public java.time.ZonedDateTime withEarlierOffsetAtOverlap();
-    method public java.time.ZonedDateTime withFixedOffsetZone();
-    method public java.time.ZonedDateTime withHour(int);
-    method public java.time.ZonedDateTime withLaterOffsetAtOverlap();
-    method public java.time.ZonedDateTime withMinute(int);
-    method public java.time.ZonedDateTime withMonth(int);
-    method public java.time.ZonedDateTime withNano(int);
-    method public java.time.ZonedDateTime withSecond(int);
-    method public java.time.ZonedDateTime withYear(int);
-    method public java.time.ZonedDateTime withZoneSameInstant(java.time.ZoneId);
-    method public java.time.ZonedDateTime withZoneSameLocal(java.time.ZoneId);
-  }
-
-}
-
-package java.time.chrono {
-
-  public abstract class AbstractChronology implements java.time.chrono.Chronology {
-    ctor protected AbstractChronology();
-    method public int compareTo(java.time.chrono.Chronology);
-    method public java.time.chrono.ChronoLocalDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-  }
-
-  public interface ChronoLocalDate extends java.time.temporal.Temporal java.lang.Comparable<java.time.chrono.ChronoLocalDate> java.time.temporal.TemporalAdjuster {
-    method public default java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public default java.time.chrono.ChronoLocalDateTime<?> atTime(java.time.LocalTime);
-    method public default int compareTo(java.time.chrono.ChronoLocalDate);
-    method public boolean equals(Object);
-    method public default String format(java.time.format.DateTimeFormatter);
-    method public static java.time.chrono.ChronoLocalDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.Chronology getChronology();
-    method public default java.time.chrono.Era getEra();
-    method public int hashCode();
-    method public default boolean isAfter(java.time.chrono.ChronoLocalDate);
-    method public default boolean isBefore(java.time.chrono.ChronoLocalDate);
-    method public default boolean isEqual(java.time.chrono.ChronoLocalDate);
-    method public default boolean isLeapYear();
-    method public default boolean isSupported(java.time.temporal.TemporalField);
-    method public default boolean isSupported(java.time.temporal.TemporalUnit);
-    method public int lengthOfMonth();
-    method public default int lengthOfYear();
-    method public default java.time.chrono.ChronoLocalDate minus(java.time.temporal.TemporalAmount);
-    method public default java.time.chrono.ChronoLocalDate minus(long, java.time.temporal.TemporalUnit);
-    method public default java.time.chrono.ChronoLocalDate plus(java.time.temporal.TemporalAmount);
-    method public default java.time.chrono.ChronoLocalDate plus(long, java.time.temporal.TemporalUnit);
-    method public static java.util.Comparator<java.time.chrono.ChronoLocalDate> timeLineOrder();
-    method public default long toEpochDay();
-    method public String toString();
-    method public java.time.chrono.ChronoPeriod until(java.time.chrono.ChronoLocalDate);
-    method public default java.time.chrono.ChronoLocalDate with(java.time.temporal.TemporalAdjuster);
-    method public default java.time.chrono.ChronoLocalDate with(java.time.temporal.TemporalField, long);
-  }
-
-  public interface ChronoLocalDateTime<D extends java.time.chrono.ChronoLocalDate> extends java.time.temporal.Temporal java.lang.Comparable<java.time.chrono.ChronoLocalDateTime<?>> java.time.temporal.TemporalAdjuster {
-    method public default java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public java.time.chrono.ChronoZonedDateTime<D> atZone(java.time.ZoneId);
-    method public default int compareTo(java.time.chrono.ChronoLocalDateTime<?>);
-    method public boolean equals(Object);
-    method public default String format(java.time.format.DateTimeFormatter);
-    method public static java.time.chrono.ChronoLocalDateTime<?> from(java.time.temporal.TemporalAccessor);
-    method public default java.time.chrono.Chronology getChronology();
-    method public int hashCode();
-    method public default boolean isAfter(java.time.chrono.ChronoLocalDateTime<?>);
-    method public default boolean isBefore(java.time.chrono.ChronoLocalDateTime<?>);
-    method public default boolean isEqual(java.time.chrono.ChronoLocalDateTime<?>);
-    method public default boolean isSupported(java.time.temporal.TemporalUnit);
-    method public default java.time.chrono.ChronoLocalDateTime<D> minus(java.time.temporal.TemporalAmount);
-    method public default java.time.chrono.ChronoLocalDateTime<D> minus(long, java.time.temporal.TemporalUnit);
-    method public default java.time.chrono.ChronoLocalDateTime<D> plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.ChronoLocalDateTime<D> plus(long, java.time.temporal.TemporalUnit);
-    method public static java.util.Comparator<java.time.chrono.ChronoLocalDateTime<?>> timeLineOrder();
-    method public default long toEpochSecond(java.time.ZoneOffset);
-    method public default java.time.Instant toInstant(java.time.ZoneOffset);
-    method public D toLocalDate();
-    method public java.time.LocalTime toLocalTime();
-    method public String toString();
-    method public default java.time.chrono.ChronoLocalDateTime<D> with(java.time.temporal.TemporalAdjuster);
-    method public java.time.chrono.ChronoLocalDateTime<D> with(java.time.temporal.TemporalField, long);
-  }
-
-  public interface ChronoPeriod extends java.time.temporal.TemporalAmount {
-    method public static java.time.chrono.ChronoPeriod between(java.time.chrono.ChronoLocalDate, java.time.chrono.ChronoLocalDate);
-    method public boolean equals(Object);
-    method public java.time.chrono.Chronology getChronology();
-    method public int hashCode();
-    method public default boolean isNegative();
-    method public default boolean isZero();
-    method public java.time.chrono.ChronoPeriod minus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.ChronoPeriod multipliedBy(int);
-    method public default java.time.chrono.ChronoPeriod negated();
-    method public java.time.chrono.ChronoPeriod normalized();
-    method public java.time.chrono.ChronoPeriod plus(java.time.temporal.TemporalAmount);
-    method public String toString();
-  }
-
-  public interface ChronoZonedDateTime<D extends java.time.chrono.ChronoLocalDate> extends java.time.temporal.Temporal java.lang.Comparable<java.time.chrono.ChronoZonedDateTime<?>> {
-    method public default int compareTo(java.time.chrono.ChronoZonedDateTime<?>);
-    method public boolean equals(Object);
-    method public default String format(java.time.format.DateTimeFormatter);
-    method public static java.time.chrono.ChronoZonedDateTime<?> from(java.time.temporal.TemporalAccessor);
-    method public default java.time.chrono.Chronology getChronology();
-    method public default long getLong(java.time.temporal.TemporalField);
-    method public java.time.ZoneOffset getOffset();
-    method public java.time.ZoneId getZone();
-    method public int hashCode();
-    method public default boolean isAfter(java.time.chrono.ChronoZonedDateTime<?>);
-    method public default boolean isBefore(java.time.chrono.ChronoZonedDateTime<?>);
-    method public default boolean isEqual(java.time.chrono.ChronoZonedDateTime<?>);
-    method public default boolean isSupported(java.time.temporal.TemporalUnit);
-    method public default java.time.chrono.ChronoZonedDateTime<D> minus(java.time.temporal.TemporalAmount);
-    method public default java.time.chrono.ChronoZonedDateTime<D> minus(long, java.time.temporal.TemporalUnit);
-    method public default java.time.chrono.ChronoZonedDateTime<D> plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.ChronoZonedDateTime<D> plus(long, java.time.temporal.TemporalUnit);
-    method public static java.util.Comparator<java.time.chrono.ChronoZonedDateTime<?>> timeLineOrder();
-    method public default long toEpochSecond();
-    method public default java.time.Instant toInstant();
-    method public default D toLocalDate();
-    method public java.time.chrono.ChronoLocalDateTime<D> toLocalDateTime();
-    method public default java.time.LocalTime toLocalTime();
-    method public String toString();
-    method public default java.time.chrono.ChronoZonedDateTime<D> with(java.time.temporal.TemporalAdjuster);
-    method public java.time.chrono.ChronoZonedDateTime<D> with(java.time.temporal.TemporalField, long);
-    method public java.time.chrono.ChronoZonedDateTime<D> withEarlierOffsetAtOverlap();
-    method public java.time.chrono.ChronoZonedDateTime<D> withLaterOffsetAtOverlap();
-    method public java.time.chrono.ChronoZonedDateTime<D> withZoneSameInstant(java.time.ZoneId);
-    method public java.time.chrono.ChronoZonedDateTime<D> withZoneSameLocal(java.time.ZoneId);
-  }
-
-  public interface Chronology extends java.lang.Comparable<java.time.chrono.Chronology> {
-    method public int compareTo(java.time.chrono.Chronology);
-    method public default java.time.chrono.ChronoLocalDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.chrono.ChronoLocalDate date(int, int, int);
-    method public java.time.chrono.ChronoLocalDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ChronoLocalDate dateEpochDay(long);
-    method public default java.time.chrono.ChronoLocalDate dateNow();
-    method public default java.time.chrono.ChronoLocalDate dateNow(java.time.ZoneId);
-    method public default java.time.chrono.ChronoLocalDate dateNow(java.time.Clock);
-    method public default java.time.chrono.ChronoLocalDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.chrono.ChronoLocalDate dateYearDay(int, int);
-    method public boolean equals(Object);
-    method public java.time.chrono.Era eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public static java.time.chrono.Chronology from(java.time.temporal.TemporalAccessor);
-    method public static java.util.Set<java.time.chrono.Chronology> getAvailableChronologies();
-    method public String getCalendarType();
-    method public default String getDisplayName(java.time.format.TextStyle, java.util.Locale);
-    method public String getId();
-    method public int hashCode();
-    method public boolean isLeapYear(long);
-    method public default java.time.chrono.ChronoLocalDateTime<? extends java.time.chrono.ChronoLocalDate> localDateTime(java.time.temporal.TemporalAccessor);
-    method public static java.time.chrono.Chronology of(String);
-    method public static java.time.chrono.Chronology ofLocale(java.util.Locale);
-    method public default java.time.chrono.ChronoPeriod period(int, int, int);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.chrono.ChronoLocalDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public String toString();
-    method public default java.time.chrono.ChronoZonedDateTime<? extends java.time.chrono.ChronoLocalDate> zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public default java.time.chrono.ChronoZonedDateTime<? extends java.time.chrono.ChronoLocalDate> zonedDateTime(java.time.Instant, java.time.ZoneId);
-  }
-
-  public interface Era extends java.time.temporal.TemporalAccessor java.time.temporal.TemporalAdjuster {
-    method public default java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-    method public default String getDisplayName(java.time.format.TextStyle, java.util.Locale);
-    method public default long getLong(java.time.temporal.TemporalField);
-    method public int getValue();
-    method public default boolean isSupported(java.time.temporal.TemporalField);
-  }
-
-  public final class HijrahChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable {
-    method public java.time.chrono.HijrahDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.chrono.HijrahDate date(int, int, int);
-    method public java.time.chrono.HijrahDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.HijrahDate dateEpochDay(long);
-    method public java.time.chrono.HijrahDate dateNow();
-    method public java.time.chrono.HijrahDate dateNow(java.time.ZoneId);
-    method public java.time.chrono.HijrahDate dateNow(java.time.Clock);
-    method public java.time.chrono.HijrahDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.chrono.HijrahDate dateYearDay(int, int);
-    method public java.time.chrono.HijrahEra eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public String getCalendarType();
-    method public String getId();
-    method public boolean isLeapYear(long);
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.HijrahDate> localDateTime(java.time.temporal.TemporalAccessor);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.chrono.HijrahDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.HijrahDate> zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.HijrahDate> zonedDateTime(java.time.Instant, java.time.ZoneId);
-    field public static final java.time.chrono.HijrahChronology INSTANCE;
-  }
-
-  public final class HijrahDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.HijrahDate> atTime(java.time.LocalTime);
-    method public static java.time.chrono.HijrahDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.HijrahChronology getChronology();
-    method public java.time.chrono.HijrahEra getEra();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int lengthOfMonth();
-    method public java.time.chrono.HijrahDate minus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.HijrahDate minus(long, java.time.temporal.TemporalUnit);
-    method public static java.time.chrono.HijrahDate now();
-    method public static java.time.chrono.HijrahDate now(java.time.ZoneId);
-    method public static java.time.chrono.HijrahDate now(java.time.Clock);
-    method public static java.time.chrono.HijrahDate of(int, int, int);
-    method public java.time.chrono.HijrahDate plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.HijrahDate plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.ChronoPeriod until(java.time.chrono.ChronoLocalDate);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.HijrahDate with(java.time.temporal.TemporalField, long);
-    method public java.time.chrono.HijrahDate with(java.time.temporal.TemporalAdjuster);
-    method public java.time.chrono.HijrahDate withVariant(java.time.chrono.HijrahChronology);
-  }
-
-  public enum HijrahEra implements java.time.chrono.Era {
-    method public int getValue();
-    method public static java.time.chrono.HijrahEra of(int);
-    enum_constant public static final java.time.chrono.HijrahEra AH;
-  }
-
-  public final class IsoChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable {
-    method public java.time.LocalDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.LocalDate date(int, int, int);
-    method public java.time.LocalDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.LocalDate dateEpochDay(long);
-    method public java.time.LocalDate dateNow();
-    method public java.time.LocalDate dateNow(java.time.ZoneId);
-    method public java.time.LocalDate dateNow(java.time.Clock);
-    method public java.time.LocalDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.LocalDate dateYearDay(int, int);
-    method public java.time.chrono.IsoEra eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public String getCalendarType();
-    method public String getId();
-    method public boolean isLeapYear(long);
-    method public java.time.LocalDateTime localDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.Period period(int, int, int);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.LocalDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public java.time.ZonedDateTime zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.ZonedDateTime zonedDateTime(java.time.Instant, java.time.ZoneId);
-    field public static final java.time.chrono.IsoChronology INSTANCE;
-  }
-
-  public enum IsoEra implements java.time.chrono.Era {
-    method public int getValue();
-    method public static java.time.chrono.IsoEra of(int);
-    enum_constant public static final java.time.chrono.IsoEra BCE;
-    enum_constant public static final java.time.chrono.IsoEra CE;
-  }
-
-  public final class JapaneseChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable {
-    method public java.time.chrono.JapaneseDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.chrono.JapaneseDate date(int, int, int);
-    method public java.time.chrono.JapaneseDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.JapaneseDate dateEpochDay(long);
-    method public java.time.chrono.JapaneseDate dateNow();
-    method public java.time.chrono.JapaneseDate dateNow(java.time.ZoneId);
-    method public java.time.chrono.JapaneseDate dateNow(java.time.Clock);
-    method public java.time.chrono.JapaneseDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.chrono.JapaneseDate dateYearDay(int, int);
-    method public java.time.chrono.JapaneseEra eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public String getCalendarType();
-    method public String getId();
-    method public boolean isLeapYear(long);
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.JapaneseDate> localDateTime(java.time.temporal.TemporalAccessor);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.chrono.JapaneseDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.JapaneseDate> zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.JapaneseDate> zonedDateTime(java.time.Instant, java.time.ZoneId);
-    field public static final java.time.chrono.JapaneseChronology INSTANCE;
-  }
-
-  public final class JapaneseDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.JapaneseDate> atTime(java.time.LocalTime);
-    method public static java.time.chrono.JapaneseDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.JapaneseChronology getChronology();
-    method public java.time.chrono.JapaneseEra getEra();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int lengthOfMonth();
-    method public java.time.chrono.JapaneseDate minus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.JapaneseDate minus(long, java.time.temporal.TemporalUnit);
-    method public static java.time.chrono.JapaneseDate now();
-    method public static java.time.chrono.JapaneseDate now(java.time.ZoneId);
-    method public static java.time.chrono.JapaneseDate now(java.time.Clock);
-    method public static java.time.chrono.JapaneseDate of(java.time.chrono.JapaneseEra, int, int, int);
-    method public static java.time.chrono.JapaneseDate of(int, int, int);
-    method public java.time.chrono.JapaneseDate plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.JapaneseDate plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.ChronoPeriod until(java.time.chrono.ChronoLocalDate);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.JapaneseDate with(java.time.temporal.TemporalField, long);
-    method public java.time.chrono.JapaneseDate with(java.time.temporal.TemporalAdjuster);
-  }
-
-  public final class JapaneseEra implements java.time.chrono.Era java.io.Serializable {
-    method public int getValue();
-    method public static java.time.chrono.JapaneseEra of(int);
-    method public static java.time.chrono.JapaneseEra valueOf(String);
-    method public static java.time.chrono.JapaneseEra[] values();
-    field public static final java.time.chrono.JapaneseEra HEISEI;
-    field public static final java.time.chrono.JapaneseEra MEIJI;
-    field public static final java.time.chrono.JapaneseEra REIWA;
-    field public static final java.time.chrono.JapaneseEra SHOWA;
-    field public static final java.time.chrono.JapaneseEra TAISHO;
-  }
-
-  public final class MinguoChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable {
-    method public java.time.chrono.MinguoDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.chrono.MinguoDate date(int, int, int);
-    method public java.time.chrono.MinguoDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.MinguoDate dateEpochDay(long);
-    method public java.time.chrono.MinguoDate dateNow();
-    method public java.time.chrono.MinguoDate dateNow(java.time.ZoneId);
-    method public java.time.chrono.MinguoDate dateNow(java.time.Clock);
-    method public java.time.chrono.MinguoDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.chrono.MinguoDate dateYearDay(int, int);
-    method public java.time.chrono.MinguoEra eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public String getCalendarType();
-    method public String getId();
-    method public boolean isLeapYear(long);
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.MinguoDate> localDateTime(java.time.temporal.TemporalAccessor);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.chrono.MinguoDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.MinguoDate> zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.MinguoDate> zonedDateTime(java.time.Instant, java.time.ZoneId);
-    field public static final java.time.chrono.MinguoChronology INSTANCE;
-  }
-
-  public final class MinguoDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.MinguoDate> atTime(java.time.LocalTime);
-    method public static java.time.chrono.MinguoDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.MinguoChronology getChronology();
-    method public java.time.chrono.MinguoEra getEra();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int lengthOfMonth();
-    method public java.time.chrono.MinguoDate minus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.MinguoDate minus(long, java.time.temporal.TemporalUnit);
-    method public static java.time.chrono.MinguoDate now();
-    method public static java.time.chrono.MinguoDate now(java.time.ZoneId);
-    method public static java.time.chrono.MinguoDate now(java.time.Clock);
-    method public static java.time.chrono.MinguoDate of(int, int, int);
-    method public java.time.chrono.MinguoDate plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.MinguoDate plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.ChronoPeriod until(java.time.chrono.ChronoLocalDate);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.MinguoDate with(java.time.temporal.TemporalField, long);
-    method public java.time.chrono.MinguoDate with(java.time.temporal.TemporalAdjuster);
-  }
-
-  public enum MinguoEra implements java.time.chrono.Era {
-    method public int getValue();
-    method public static java.time.chrono.MinguoEra of(int);
-    enum_constant public static final java.time.chrono.MinguoEra BEFORE_ROC;
-    enum_constant public static final java.time.chrono.MinguoEra ROC;
-  }
-
-  public final class ThaiBuddhistChronology extends java.time.chrono.AbstractChronology implements java.io.Serializable {
-    method public java.time.chrono.ThaiBuddhistDate date(java.time.chrono.Era, int, int, int);
-    method public java.time.chrono.ThaiBuddhistDate date(int, int, int);
-    method public java.time.chrono.ThaiBuddhistDate date(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ThaiBuddhistDate dateEpochDay(long);
-    method public java.time.chrono.ThaiBuddhistDate dateNow();
-    method public java.time.chrono.ThaiBuddhistDate dateNow(java.time.ZoneId);
-    method public java.time.chrono.ThaiBuddhistDate dateNow(java.time.Clock);
-    method public java.time.chrono.ThaiBuddhistDate dateYearDay(java.time.chrono.Era, int, int);
-    method public java.time.chrono.ThaiBuddhistDate dateYearDay(int, int);
-    method public java.time.chrono.ThaiBuddhistEra eraOf(int);
-    method public java.util.List<java.time.chrono.Era> eras();
-    method public String getCalendarType();
-    method public String getId();
-    method public boolean isLeapYear(long);
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.ThaiBuddhistDate> localDateTime(java.time.temporal.TemporalAccessor);
-    method public int prolepticYear(java.time.chrono.Era, int);
-    method public java.time.temporal.ValueRange range(java.time.temporal.ChronoField);
-    method public java.time.chrono.ThaiBuddhistDate resolveDate(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.format.ResolverStyle);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.ThaiBuddhistDate> zonedDateTime(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ChronoZonedDateTime<java.time.chrono.ThaiBuddhistDate> zonedDateTime(java.time.Instant, java.time.ZoneId);
-    field public static final java.time.chrono.ThaiBuddhistChronology INSTANCE;
-  }
-
-  public final class ThaiBuddhistDate implements java.time.chrono.ChronoLocalDate java.io.Serializable java.time.temporal.Temporal java.time.temporal.TemporalAdjuster {
-    method public java.time.chrono.ChronoLocalDateTime<java.time.chrono.ThaiBuddhistDate> atTime(java.time.LocalTime);
-    method public static java.time.chrono.ThaiBuddhistDate from(java.time.temporal.TemporalAccessor);
-    method public java.time.chrono.ThaiBuddhistChronology getChronology();
-    method public java.time.chrono.ThaiBuddhistEra getEra();
-    method public long getLong(java.time.temporal.TemporalField);
-    method public int lengthOfMonth();
-    method public java.time.chrono.ThaiBuddhistDate minus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.ThaiBuddhistDate minus(long, java.time.temporal.TemporalUnit);
-    method public static java.time.chrono.ThaiBuddhistDate now();
-    method public static java.time.chrono.ThaiBuddhistDate now(java.time.ZoneId);
-    method public static java.time.chrono.ThaiBuddhistDate now(java.time.Clock);
-    method public static java.time.chrono.ThaiBuddhistDate of(int, int, int);
-    method public java.time.chrono.ThaiBuddhistDate plus(java.time.temporal.TemporalAmount);
-    method public java.time.chrono.ThaiBuddhistDate plus(long, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.ChronoPeriod until(java.time.chrono.ChronoLocalDate);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public java.time.chrono.ThaiBuddhistDate with(java.time.temporal.TemporalField, long);
-    method public java.time.chrono.ThaiBuddhistDate with(java.time.temporal.TemporalAdjuster);
-  }
-
-  public enum ThaiBuddhistEra implements java.time.chrono.Era {
-    method public int getValue();
-    method public static java.time.chrono.ThaiBuddhistEra of(int);
-    enum_constant public static final java.time.chrono.ThaiBuddhistEra BE;
-    enum_constant public static final java.time.chrono.ThaiBuddhistEra BEFORE_BE;
-  }
-
-}
-
-package java.time.format {
-
-  public final class DateTimeFormatter {
-    method public String format(java.time.temporal.TemporalAccessor);
-    method public void formatTo(java.time.temporal.TemporalAccessor, Appendable);
-    method public java.time.chrono.Chronology getChronology();
-    method public java.time.format.DecimalStyle getDecimalStyle();
-    method public java.util.Locale getLocale();
-    method public java.util.Set<java.time.temporal.TemporalField> getResolverFields();
-    method public java.time.format.ResolverStyle getResolverStyle();
-    method public java.time.ZoneId getZone();
-    method public static java.time.format.DateTimeFormatter ofLocalizedDate(java.time.format.FormatStyle);
-    method public static java.time.format.DateTimeFormatter ofLocalizedDateTime(java.time.format.FormatStyle);
-    method public static java.time.format.DateTimeFormatter ofLocalizedDateTime(java.time.format.FormatStyle, java.time.format.FormatStyle);
-    method public static java.time.format.DateTimeFormatter ofLocalizedTime(java.time.format.FormatStyle);
-    method public static java.time.format.DateTimeFormatter ofPattern(String);
-    method public static java.time.format.DateTimeFormatter ofPattern(String, java.util.Locale);
-    method public java.time.temporal.TemporalAccessor parse(CharSequence);
-    method public java.time.temporal.TemporalAccessor parse(CharSequence, java.text.ParsePosition);
-    method public <T> T parse(CharSequence, java.time.temporal.TemporalQuery<T>);
-    method public java.time.temporal.TemporalAccessor parseBest(CharSequence, java.time.temporal.TemporalQuery<?>...);
-    method public java.time.temporal.TemporalAccessor parseUnresolved(CharSequence, java.text.ParsePosition);
-    method public static java.time.temporal.TemporalQuery<java.time.Period> parsedExcessDays();
-    method public static java.time.temporal.TemporalQuery<java.lang.Boolean> parsedLeapSecond();
-    method public java.text.Format toFormat();
-    method public java.text.Format toFormat(java.time.temporal.TemporalQuery<?>);
-    method public java.time.format.DateTimeFormatter withChronology(java.time.chrono.Chronology);
-    method public java.time.format.DateTimeFormatter withDecimalStyle(java.time.format.DecimalStyle);
-    method public java.time.format.DateTimeFormatter withLocale(java.util.Locale);
-    method public java.time.format.DateTimeFormatter withResolverFields(java.time.temporal.TemporalField...);
-    method public java.time.format.DateTimeFormatter withResolverFields(java.util.Set<java.time.temporal.TemporalField>);
-    method public java.time.format.DateTimeFormatter withResolverStyle(java.time.format.ResolverStyle);
-    method public java.time.format.DateTimeFormatter withZone(java.time.ZoneId);
-    field public static final java.time.format.DateTimeFormatter BASIC_ISO_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_DATE_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_INSTANT;
-    field public static final java.time.format.DateTimeFormatter ISO_LOCAL_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_LOCAL_DATE_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_LOCAL_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_OFFSET_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_OFFSET_DATE_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_OFFSET_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_ORDINAL_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_TIME;
-    field public static final java.time.format.DateTimeFormatter ISO_WEEK_DATE;
-    field public static final java.time.format.DateTimeFormatter ISO_ZONED_DATE_TIME;
-    field public static final java.time.format.DateTimeFormatter RFC_1123_DATE_TIME;
-  }
-
-  public final class DateTimeFormatterBuilder {
-    ctor public DateTimeFormatterBuilder();
-    method public java.time.format.DateTimeFormatterBuilder append(java.time.format.DateTimeFormatter);
-    method public java.time.format.DateTimeFormatterBuilder appendChronologyId();
-    method public java.time.format.DateTimeFormatterBuilder appendChronologyText(java.time.format.TextStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendFraction(java.time.temporal.TemporalField, int, int, boolean);
-    method public java.time.format.DateTimeFormatterBuilder appendInstant();
-    method public java.time.format.DateTimeFormatterBuilder appendInstant(int);
-    method public java.time.format.DateTimeFormatterBuilder appendLiteral(char);
-    method public java.time.format.DateTimeFormatterBuilder appendLiteral(String);
-    method public java.time.format.DateTimeFormatterBuilder appendLocalized(java.time.format.FormatStyle, java.time.format.FormatStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendLocalizedOffset(java.time.format.TextStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendOffset(String, String);
-    method public java.time.format.DateTimeFormatterBuilder appendOffsetId();
-    method public java.time.format.DateTimeFormatterBuilder appendOptional(java.time.format.DateTimeFormatter);
-    method public java.time.format.DateTimeFormatterBuilder appendPattern(String);
-    method public java.time.format.DateTimeFormatterBuilder appendText(java.time.temporal.TemporalField);
-    method public java.time.format.DateTimeFormatterBuilder appendText(java.time.temporal.TemporalField, java.time.format.TextStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendText(java.time.temporal.TemporalField, java.util.Map<java.lang.Long,java.lang.String>);
-    method public java.time.format.DateTimeFormatterBuilder appendValue(java.time.temporal.TemporalField);
-    method public java.time.format.DateTimeFormatterBuilder appendValue(java.time.temporal.TemporalField, int);
-    method public java.time.format.DateTimeFormatterBuilder appendValue(java.time.temporal.TemporalField, int, int, java.time.format.SignStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendValueReduced(java.time.temporal.TemporalField, int, int, int);
-    method public java.time.format.DateTimeFormatterBuilder appendValueReduced(java.time.temporal.TemporalField, int, int, java.time.chrono.ChronoLocalDate);
-    method public java.time.format.DateTimeFormatterBuilder appendZoneId();
-    method public java.time.format.DateTimeFormatterBuilder appendZoneOrOffsetId();
-    method public java.time.format.DateTimeFormatterBuilder appendZoneRegionId();
-    method public java.time.format.DateTimeFormatterBuilder appendZoneText(java.time.format.TextStyle);
-    method public java.time.format.DateTimeFormatterBuilder appendZoneText(java.time.format.TextStyle, java.util.Set<java.time.ZoneId>);
-    method public static String getLocalizedDateTimePattern(java.time.format.FormatStyle, java.time.format.FormatStyle, java.time.chrono.Chronology, java.util.Locale);
-    method public java.time.format.DateTimeFormatterBuilder optionalEnd();
-    method public java.time.format.DateTimeFormatterBuilder optionalStart();
-    method public java.time.format.DateTimeFormatterBuilder padNext(int);
-    method public java.time.format.DateTimeFormatterBuilder padNext(int, char);
-    method public java.time.format.DateTimeFormatterBuilder parseCaseInsensitive();
-    method public java.time.format.DateTimeFormatterBuilder parseCaseSensitive();
-    method public java.time.format.DateTimeFormatterBuilder parseDefaulting(java.time.temporal.TemporalField, long);
-    method public java.time.format.DateTimeFormatterBuilder parseLenient();
-    method public java.time.format.DateTimeFormatterBuilder parseStrict();
-    method public java.time.format.DateTimeFormatter toFormatter();
-    method public java.time.format.DateTimeFormatter toFormatter(java.util.Locale);
-  }
-
-  public class DateTimeParseException extends java.time.DateTimeException {
-    ctor public DateTimeParseException(String, CharSequence, int);
-    ctor public DateTimeParseException(String, CharSequence, int, Throwable);
-    method public int getErrorIndex();
-    method public String getParsedString();
-  }
-
-  public final class DecimalStyle {
-    method public static java.util.Set<java.util.Locale> getAvailableLocales();
-    method public char getDecimalSeparator();
-    method public char getNegativeSign();
-    method public char getPositiveSign();
-    method public char getZeroDigit();
-    method public static java.time.format.DecimalStyle of(java.util.Locale);
-    method public static java.time.format.DecimalStyle ofDefaultLocale();
-    method public java.time.format.DecimalStyle withDecimalSeparator(char);
-    method public java.time.format.DecimalStyle withNegativeSign(char);
-    method public java.time.format.DecimalStyle withPositiveSign(char);
-    method public java.time.format.DecimalStyle withZeroDigit(char);
-    field public static final java.time.format.DecimalStyle STANDARD;
-  }
-
-  public enum FormatStyle {
-    enum_constant public static final java.time.format.FormatStyle FULL;
-    enum_constant public static final java.time.format.FormatStyle LONG;
-    enum_constant public static final java.time.format.FormatStyle MEDIUM;
-    enum_constant public static final java.time.format.FormatStyle SHORT;
-  }
-
-  public enum ResolverStyle {
-    enum_constant public static final java.time.format.ResolverStyle LENIENT;
-    enum_constant public static final java.time.format.ResolverStyle SMART;
-    enum_constant public static final java.time.format.ResolverStyle STRICT;
-  }
-
-  public enum SignStyle {
-    enum_constant public static final java.time.format.SignStyle ALWAYS;
-    enum_constant public static final java.time.format.SignStyle EXCEEDS_PAD;
-    enum_constant public static final java.time.format.SignStyle NEVER;
-    enum_constant public static final java.time.format.SignStyle NORMAL;
-    enum_constant public static final java.time.format.SignStyle NOT_NEGATIVE;
-  }
-
-  public enum TextStyle {
-    method public java.time.format.TextStyle asNormal();
-    method public java.time.format.TextStyle asStandalone();
-    method public boolean isStandalone();
-    enum_constant public static final java.time.format.TextStyle FULL;
-    enum_constant public static final java.time.format.TextStyle FULL_STANDALONE;
-    enum_constant public static final java.time.format.TextStyle NARROW;
-    enum_constant public static final java.time.format.TextStyle NARROW_STANDALONE;
-    enum_constant public static final java.time.format.TextStyle SHORT;
-    enum_constant public static final java.time.format.TextStyle SHORT_STANDALONE;
-  }
-
-}
-
-package java.time.temporal {
-
-  public enum ChronoField implements java.time.temporal.TemporalField {
-    method public <R extends java.time.temporal.Temporal> R adjustInto(R, long);
-    method public int checkValidIntValue(long);
-    method public long checkValidValue(long);
-    method public java.time.temporal.TemporalUnit getBaseUnit();
-    method public long getFrom(java.time.temporal.TemporalAccessor);
-    method public java.time.temporal.TemporalUnit getRangeUnit();
-    method public boolean isDateBased();
-    method public boolean isSupportedBy(java.time.temporal.TemporalAccessor);
-    method public boolean isTimeBased();
-    method public java.time.temporal.ValueRange range();
-    method public java.time.temporal.ValueRange rangeRefinedBy(java.time.temporal.TemporalAccessor);
-    enum_constant public static final java.time.temporal.ChronoField ALIGNED_DAY_OF_WEEK_IN_MONTH;
-    enum_constant public static final java.time.temporal.ChronoField ALIGNED_DAY_OF_WEEK_IN_YEAR;
-    enum_constant public static final java.time.temporal.ChronoField ALIGNED_WEEK_OF_MONTH;
-    enum_constant public static final java.time.temporal.ChronoField ALIGNED_WEEK_OF_YEAR;
-    enum_constant public static final java.time.temporal.ChronoField AMPM_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField CLOCK_HOUR_OF_AMPM;
-    enum_constant public static final java.time.temporal.ChronoField CLOCK_HOUR_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField DAY_OF_MONTH;
-    enum_constant public static final java.time.temporal.ChronoField DAY_OF_WEEK;
-    enum_constant public static final java.time.temporal.ChronoField DAY_OF_YEAR;
-    enum_constant public static final java.time.temporal.ChronoField EPOCH_DAY;
-    enum_constant public static final java.time.temporal.ChronoField ERA;
-    enum_constant public static final java.time.temporal.ChronoField HOUR_OF_AMPM;
-    enum_constant public static final java.time.temporal.ChronoField HOUR_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField INSTANT_SECONDS;
-    enum_constant public static final java.time.temporal.ChronoField MICRO_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField MICRO_OF_SECOND;
-    enum_constant public static final java.time.temporal.ChronoField MILLI_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField MILLI_OF_SECOND;
-    enum_constant public static final java.time.temporal.ChronoField MINUTE_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField MINUTE_OF_HOUR;
-    enum_constant public static final java.time.temporal.ChronoField MONTH_OF_YEAR;
-    enum_constant public static final java.time.temporal.ChronoField NANO_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField NANO_OF_SECOND;
-    enum_constant public static final java.time.temporal.ChronoField OFFSET_SECONDS;
-    enum_constant public static final java.time.temporal.ChronoField PROLEPTIC_MONTH;
-    enum_constant public static final java.time.temporal.ChronoField SECOND_OF_DAY;
-    enum_constant public static final java.time.temporal.ChronoField SECOND_OF_MINUTE;
-    enum_constant public static final java.time.temporal.ChronoField YEAR;
-    enum_constant public static final java.time.temporal.ChronoField YEAR_OF_ERA;
-  }
-
-  public enum ChronoUnit implements java.time.temporal.TemporalUnit {
-    method public <R extends java.time.temporal.Temporal> R addTo(R, long);
-    method public long between(java.time.temporal.Temporal, java.time.temporal.Temporal);
-    method public java.time.Duration getDuration();
-    method public boolean isDateBased();
-    method public boolean isDurationEstimated();
-    method public boolean isTimeBased();
-    enum_constant public static final java.time.temporal.ChronoUnit CENTURIES;
-    enum_constant public static final java.time.temporal.ChronoUnit DAYS;
-    enum_constant public static final java.time.temporal.ChronoUnit DECADES;
-    enum_constant public static final java.time.temporal.ChronoUnit ERAS;
-    enum_constant public static final java.time.temporal.ChronoUnit FOREVER;
-    enum_constant public static final java.time.temporal.ChronoUnit HALF_DAYS;
-    enum_constant public static final java.time.temporal.ChronoUnit HOURS;
-    enum_constant public static final java.time.temporal.ChronoUnit MICROS;
-    enum_constant public static final java.time.temporal.ChronoUnit MILLENNIA;
-    enum_constant public static final java.time.temporal.ChronoUnit MILLIS;
-    enum_constant public static final java.time.temporal.ChronoUnit MINUTES;
-    enum_constant public static final java.time.temporal.ChronoUnit MONTHS;
-    enum_constant public static final java.time.temporal.ChronoUnit NANOS;
-    enum_constant public static final java.time.temporal.ChronoUnit SECONDS;
-    enum_constant public static final java.time.temporal.ChronoUnit WEEKS;
-    enum_constant public static final java.time.temporal.ChronoUnit YEARS;
-  }
-
-  public final class IsoFields {
-    field public static final java.time.temporal.TemporalField DAY_OF_QUARTER;
-    field public static final java.time.temporal.TemporalField QUARTER_OF_YEAR;
-    field public static final java.time.temporal.TemporalUnit QUARTER_YEARS;
-    field public static final java.time.temporal.TemporalField WEEK_BASED_YEAR;
-    field public static final java.time.temporal.TemporalUnit WEEK_BASED_YEARS;
-    field public static final java.time.temporal.TemporalField WEEK_OF_WEEK_BASED_YEAR;
-  }
-
-  public final class JulianFields {
-    field public static final java.time.temporal.TemporalField JULIAN_DAY;
-    field public static final java.time.temporal.TemporalField MODIFIED_JULIAN_DAY;
-    field public static final java.time.temporal.TemporalField RATA_DIE;
-  }
-
-  public interface Temporal extends java.time.temporal.TemporalAccessor {
-    method public boolean isSupported(java.time.temporal.TemporalUnit);
-    method public default java.time.temporal.Temporal minus(java.time.temporal.TemporalAmount);
-    method public default java.time.temporal.Temporal minus(long, java.time.temporal.TemporalUnit);
-    method public default java.time.temporal.Temporal plus(java.time.temporal.TemporalAmount);
-    method public java.time.temporal.Temporal plus(long, java.time.temporal.TemporalUnit);
-    method public long until(java.time.temporal.Temporal, java.time.temporal.TemporalUnit);
-    method public default java.time.temporal.Temporal with(java.time.temporal.TemporalAdjuster);
-    method public java.time.temporal.Temporal with(java.time.temporal.TemporalField, long);
-  }
-
-  public interface TemporalAccessor {
-    method public default int get(java.time.temporal.TemporalField);
-    method public long getLong(java.time.temporal.TemporalField);
-    method public boolean isSupported(java.time.temporal.TemporalField);
-    method public default <R> R query(java.time.temporal.TemporalQuery<R>);
-    method public default java.time.temporal.ValueRange range(java.time.temporal.TemporalField);
-  }
-
-  @java.lang.FunctionalInterface public interface TemporalAdjuster {
-    method public java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal);
-  }
-
-  public final class TemporalAdjusters {
-    method public static java.time.temporal.TemporalAdjuster dayOfWeekInMonth(int, java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster firstDayOfMonth();
-    method public static java.time.temporal.TemporalAdjuster firstDayOfNextMonth();
-    method public static java.time.temporal.TemporalAdjuster firstDayOfNextYear();
-    method public static java.time.temporal.TemporalAdjuster firstDayOfYear();
-    method public static java.time.temporal.TemporalAdjuster firstInMonth(java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster lastDayOfMonth();
-    method public static java.time.temporal.TemporalAdjuster lastDayOfYear();
-    method public static java.time.temporal.TemporalAdjuster lastInMonth(java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster next(java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster nextOrSame(java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster ofDateAdjuster(java.util.function.UnaryOperator<java.time.LocalDate>);
-    method public static java.time.temporal.TemporalAdjuster previous(java.time.DayOfWeek);
-    method public static java.time.temporal.TemporalAdjuster previousOrSame(java.time.DayOfWeek);
-  }
-
-  public interface TemporalAmount {
-    method public java.time.temporal.Temporal addTo(java.time.temporal.Temporal);
-    method public long get(java.time.temporal.TemporalUnit);
-    method public java.util.List<java.time.temporal.TemporalUnit> getUnits();
-    method public java.time.temporal.Temporal subtractFrom(java.time.temporal.Temporal);
-  }
-
-  public interface TemporalField {
-    method public <R extends java.time.temporal.Temporal> R adjustInto(R, long);
-    method public java.time.temporal.TemporalUnit getBaseUnit();
-    method public default String getDisplayName(java.util.Locale);
-    method public long getFrom(java.time.temporal.TemporalAccessor);
-    method public java.time.temporal.TemporalUnit getRangeUnit();
-    method public boolean isDateBased();
-    method public boolean isSupportedBy(java.time.temporal.TemporalAccessor);
-    method public boolean isTimeBased();
-    method public java.time.temporal.ValueRange range();
-    method public java.time.temporal.ValueRange rangeRefinedBy(java.time.temporal.TemporalAccessor);
-    method public default java.time.temporal.TemporalAccessor resolve(java.util.Map<java.time.temporal.TemporalField,java.lang.Long>, java.time.temporal.TemporalAccessor, java.time.format.ResolverStyle);
-    method public String toString();
-  }
-
-  public final class TemporalQueries {
-    method public static java.time.temporal.TemporalQuery<java.time.chrono.Chronology> chronology();
-    method public static java.time.temporal.TemporalQuery<java.time.LocalDate> localDate();
-    method public static java.time.temporal.TemporalQuery<java.time.LocalTime> localTime();
-    method public static java.time.temporal.TemporalQuery<java.time.ZoneOffset> offset();
-    method public static java.time.temporal.TemporalQuery<java.time.temporal.TemporalUnit> precision();
-    method public static java.time.temporal.TemporalQuery<java.time.ZoneId> zone();
-    method public static java.time.temporal.TemporalQuery<java.time.ZoneId> zoneId();
-  }
-
-  @java.lang.FunctionalInterface public interface TemporalQuery<R> {
-    method public R queryFrom(java.time.temporal.TemporalAccessor);
-  }
-
-  public interface TemporalUnit {
-    method public <R extends java.time.temporal.Temporal> R addTo(R, long);
-    method public long between(java.time.temporal.Temporal, java.time.temporal.Temporal);
-    method public java.time.Duration getDuration();
-    method public boolean isDateBased();
-    method public boolean isDurationEstimated();
-    method public default boolean isSupportedBy(java.time.temporal.Temporal);
-    method public boolean isTimeBased();
-    method public String toString();
-  }
-
-  public class UnsupportedTemporalTypeException extends java.time.DateTimeException {
-    ctor public UnsupportedTemporalTypeException(String);
-    ctor public UnsupportedTemporalTypeException(String, Throwable);
-  }
-
-  public final class ValueRange implements java.io.Serializable {
-    method public int checkValidIntValue(long, java.time.temporal.TemporalField);
-    method public long checkValidValue(long, java.time.temporal.TemporalField);
-    method public long getLargestMinimum();
-    method public long getMaximum();
-    method public long getMinimum();
-    method public long getSmallestMaximum();
-    method public boolean isFixed();
-    method public boolean isIntValue();
-    method public boolean isValidIntValue(long);
-    method public boolean isValidValue(long);
-    method public static java.time.temporal.ValueRange of(long, long);
-    method public static java.time.temporal.ValueRange of(long, long, long);
-    method public static java.time.temporal.ValueRange of(long, long, long, long);
-  }
-
-  public final class WeekFields implements java.io.Serializable {
-    method public java.time.temporal.TemporalField dayOfWeek();
-    method public java.time.DayOfWeek getFirstDayOfWeek();
-    method public int getMinimalDaysInFirstWeek();
-    method public static java.time.temporal.WeekFields of(java.util.Locale);
-    method public static java.time.temporal.WeekFields of(java.time.DayOfWeek, int);
-    method public java.time.temporal.TemporalField weekBasedYear();
-    method public java.time.temporal.TemporalField weekOfMonth();
-    method public java.time.temporal.TemporalField weekOfWeekBasedYear();
-    method public java.time.temporal.TemporalField weekOfYear();
-    field public static final java.time.temporal.WeekFields ISO;
-    field public static final java.time.temporal.WeekFields SUNDAY_START;
-    field public static final java.time.temporal.TemporalUnit WEEK_BASED_YEARS;
-  }
-
-}
-
-package java.time.zone {
-
-  public final class ZoneOffsetTransition implements java.lang.Comparable<java.time.zone.ZoneOffsetTransition> java.io.Serializable {
-    method public int compareTo(java.time.zone.ZoneOffsetTransition);
-    method public java.time.LocalDateTime getDateTimeAfter();
-    method public java.time.LocalDateTime getDateTimeBefore();
-    method public java.time.Duration getDuration();
-    method public java.time.Instant getInstant();
-    method public java.time.ZoneOffset getOffsetAfter();
-    method public java.time.ZoneOffset getOffsetBefore();
-    method public boolean isGap();
-    method public boolean isOverlap();
-    method public boolean isValidOffset(java.time.ZoneOffset);
-    method public static java.time.zone.ZoneOffsetTransition of(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneOffset);
-    method public long toEpochSecond();
-  }
-
-  public final class ZoneOffsetTransitionRule implements java.io.Serializable {
-    method public java.time.zone.ZoneOffsetTransition createTransition(int);
-    method public int getDayOfMonthIndicator();
-    method public java.time.DayOfWeek getDayOfWeek();
-    method public java.time.LocalTime getLocalTime();
-    method public java.time.Month getMonth();
-    method public java.time.ZoneOffset getOffsetAfter();
-    method public java.time.ZoneOffset getOffsetBefore();
-    method public java.time.ZoneOffset getStandardOffset();
-    method public java.time.zone.ZoneOffsetTransitionRule.TimeDefinition getTimeDefinition();
-    method public boolean isMidnightEndOfDay();
-    method public static java.time.zone.ZoneOffsetTransitionRule of(java.time.Month, int, java.time.DayOfWeek, java.time.LocalTime, boolean, java.time.zone.ZoneOffsetTransitionRule.TimeDefinition, java.time.ZoneOffset, java.time.ZoneOffset, java.time.ZoneOffset);
-  }
-
-  public enum ZoneOffsetTransitionRule.TimeDefinition {
-    method public java.time.LocalDateTime createDateTime(java.time.LocalDateTime, java.time.ZoneOffset, java.time.ZoneOffset);
-    enum_constant public static final java.time.zone.ZoneOffsetTransitionRule.TimeDefinition STANDARD;
-    enum_constant public static final java.time.zone.ZoneOffsetTransitionRule.TimeDefinition UTC;
-    enum_constant public static final java.time.zone.ZoneOffsetTransitionRule.TimeDefinition WALL;
-  }
-
-  public final class ZoneRules implements java.io.Serializable {
-    method public java.time.Duration getDaylightSavings(java.time.Instant);
-    method public java.time.ZoneOffset getOffset(java.time.Instant);
-    method public java.time.ZoneOffset getOffset(java.time.LocalDateTime);
-    method public java.time.ZoneOffset getStandardOffset(java.time.Instant);
-    method public java.time.zone.ZoneOffsetTransition getTransition(java.time.LocalDateTime);
-    method public java.util.List<java.time.zone.ZoneOffsetTransitionRule> getTransitionRules();
-    method public java.util.List<java.time.zone.ZoneOffsetTransition> getTransitions();
-    method public java.util.List<java.time.ZoneOffset> getValidOffsets(java.time.LocalDateTime);
-    method public boolean isDaylightSavings(java.time.Instant);
-    method public boolean isFixedOffset();
-    method public boolean isValidOffset(java.time.LocalDateTime, java.time.ZoneOffset);
-    method public java.time.zone.ZoneOffsetTransition nextTransition(java.time.Instant);
-    method public static java.time.zone.ZoneRules of(java.time.ZoneOffset, java.time.ZoneOffset, java.util.List<java.time.zone.ZoneOffsetTransition>, java.util.List<java.time.zone.ZoneOffsetTransition>, java.util.List<java.time.zone.ZoneOffsetTransitionRule>);
-    method public static java.time.zone.ZoneRules of(java.time.ZoneOffset);
-    method public java.time.zone.ZoneOffsetTransition previousTransition(java.time.Instant);
-  }
-
-  public class ZoneRulesException extends java.time.DateTimeException {
-    ctor public ZoneRulesException(String);
-    ctor public ZoneRulesException(String, Throwable);
-  }
-
-}
-
-package java.util {
-
-  public abstract class AbstractCollection<E> implements java.util.Collection<E> {
-    ctor protected AbstractCollection();
-    method public boolean add(E);
-    method public boolean addAll(@NonNull java.util.Collection<? extends E>);
-    method public void clear();
-    method public boolean contains(@Nullable Object);
-    method public boolean containsAll(@NonNull java.util.Collection<?>);
-    method public boolean isEmpty();
-    method public boolean remove(@Nullable Object);
-    method public boolean removeAll(@NonNull java.util.Collection<?>);
-    method public boolean retainAll(@NonNull java.util.Collection<?>);
-    method @NonNull public Object[] toArray();
-    method @NonNull public <T> T[] toArray(@NonNull T[]);
-  }
-
-  public abstract class AbstractList<E> extends java.util.AbstractCollection<E> implements java.util.List<E> {
-    ctor protected AbstractList();
-    method public void add(int, E);
-    method public boolean addAll(int, @NonNull java.util.Collection<? extends E>);
-    method public int indexOf(@Nullable Object);
-    method @NonNull public java.util.Iterator<E> iterator();
-    method public int lastIndexOf(@Nullable Object);
-    method @NonNull public java.util.ListIterator<E> listIterator();
-    method @NonNull public java.util.ListIterator<E> listIterator(int);
-    method public E remove(int);
-    method protected void removeRange(int, int);
-    method public E set(int, E);
-    method @NonNull public java.util.List<E> subList(int, int);
-    field protected transient int modCount;
-  }
-
-  public abstract class AbstractMap<K, V> implements java.util.Map<K,V> {
-    ctor protected AbstractMap();
-    method public void clear();
-    method public boolean containsKey(@Nullable Object);
-    method public boolean containsValue(@Nullable Object);
-    method @Nullable public V get(@Nullable Object);
-    method public boolean isEmpty();
-    method @NonNull public java.util.Set<K> keySet();
-    method @Nullable public V put(K, V);
-    method public void putAll(@NonNull java.util.Map<? extends K,? extends V>);
-    method @Nullable public V remove(@Nullable Object);
-    method public int size();
-    method @NonNull public java.util.Collection<V> values();
-  }
-
-  public static class AbstractMap.SimpleEntry<K, V> implements java.util.Map.Entry<K,V> java.io.Serializable {
-    ctor public AbstractMap.SimpleEntry(K, V);
-    ctor public AbstractMap.SimpleEntry(@NonNull java.util.Map.Entry<? extends K,? extends V>);
-    method public K getKey();
-    method public V getValue();
-    method public V setValue(V);
-  }
-
-  public static class AbstractMap.SimpleImmutableEntry<K, V> implements java.util.Map.Entry<K,V> java.io.Serializable {
-    ctor public AbstractMap.SimpleImmutableEntry(K, V);
-    ctor public AbstractMap.SimpleImmutableEntry(@NonNull java.util.Map.Entry<? extends K,? extends V>);
-    method public K getKey();
-    method public V getValue();
-    method public V setValue(V);
-  }
-
-  public abstract class AbstractQueue<E> extends java.util.AbstractCollection<E> implements java.util.Queue<E> {
-    ctor protected AbstractQueue();
-    method public E element();
-    method public E remove();
-  }
-
-  public abstract class AbstractSequentialList<E> extends java.util.AbstractList<E> {
-    ctor protected AbstractSequentialList();
-    method public E get(int);
-  }
-
-  public abstract class AbstractSet<E> extends java.util.AbstractCollection<E> implements java.util.Set<E> {
-    ctor protected AbstractSet();
-  }
-
-  public class ArrayDeque<E> extends java.util.AbstractCollection<E> implements java.lang.Cloneable java.util.Deque<E> java.io.Serializable {
-    ctor public ArrayDeque();
-    ctor public ArrayDeque(int);
-    ctor public ArrayDeque(@NonNull java.util.Collection<? extends E>);
-    method public void addFirst(E);
-    method public void addLast(E);
-    method @NonNull public java.util.ArrayDeque<E> clone();
-    method @NonNull public java.util.Iterator<E> descendingIterator();
-    method public E element();
-    method public E getFirst();
-    method public E getLast();
-    method @NonNull public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offerFirst(E);
-    method public boolean offerLast(E);
-    method @Nullable public E peek();
-    method @Nullable public E peekFirst();
-    method @Nullable public E peekLast();
-    method @Nullable public E poll();
-    method @Nullable public E pollFirst();
-    method @Nullable public E pollLast();
-    method public E pop();
-    method public void push(E);
-    method public E remove();
-    method public E removeFirst();
-    method public boolean removeFirstOccurrence(@Nullable Object);
-    method public E removeLast();
-    method public boolean removeLastOccurrence(@Nullable Object);
-    method public int size();
-  }
-
-  public class ArrayList<E> extends java.util.AbstractList<E> implements java.lang.Cloneable java.util.List<E> java.util.RandomAccess java.io.Serializable {
-    ctor public ArrayList(int);
-    ctor public ArrayList();
-    ctor public ArrayList(@NonNull java.util.Collection<? extends E>);
-    method @NonNull public Object clone();
-    method public void ensureCapacity(int);
-    method public void forEach(@NonNull java.util.function.Consumer<? super E>);
-    method public E get(int);
-    method public int size();
-    method public void trimToSize();
-  }
-
-  public class Arrays {
-    method @NonNull @java.lang.SafeVarargs public static <T> java.util.List<T> asList(@NonNull T...);
-    method public static int binarySearch(@NonNull long[], long);
-    method public static int binarySearch(@NonNull long[], int, int, long);
-    method public static int binarySearch(@NonNull int[], int);
-    method public static int binarySearch(@NonNull int[], int, int, int);
-    method public static int binarySearch(@NonNull short[], short);
-    method public static int binarySearch(@NonNull short[], int, int, short);
-    method public static int binarySearch(@NonNull char[], char);
-    method public static int binarySearch(@NonNull char[], int, int, char);
-    method public static int binarySearch(@NonNull byte[], byte);
-    method public static int binarySearch(@NonNull byte[], int, int, byte);
-    method public static int binarySearch(@NonNull double[], double);
-    method public static int binarySearch(@NonNull double[], int, int, double);
-    method public static int binarySearch(@NonNull float[], float);
-    method public static int binarySearch(@NonNull float[], int, int, float);
-    method public static int binarySearch(@NonNull Object[], @NonNull Object);
-    method public static int binarySearch(@NonNull Object[], int, int, @NonNull Object);
-    method public static <T> int binarySearch(@NonNull T[], T, @Nullable java.util.Comparator<? super T>);
-    method public static <T> int binarySearch(@NonNull T[], int, int, T, @Nullable java.util.Comparator<? super T>);
-    method @NonNull public static <T> T[] copyOf(@NonNull T[], int);
-    method @NonNull public static <T, U> T[] copyOf(@NonNull U[], int, @NonNull Class<? extends T[]>);
-    method @NonNull public static byte[] copyOf(@NonNull byte[], int);
-    method @NonNull public static short[] copyOf(@NonNull short[], int);
-    method @NonNull public static int[] copyOf(@NonNull int[], int);
-    method @NonNull public static long[] copyOf(@NonNull long[], int);
-    method @NonNull public static char[] copyOf(@NonNull char[], int);
-    method @NonNull public static float[] copyOf(@NonNull float[], int);
-    method @NonNull public static double[] copyOf(@NonNull double[], int);
-    method @NonNull public static boolean[] copyOf(@NonNull boolean[], int);
-    method @NonNull public static <T> T[] copyOfRange(@NonNull T[], int, int);
-    method @NonNull public static <T, U> T[] copyOfRange(@NonNull U[], int, int, @NonNull Class<? extends T[]>);
-    method @NonNull public static byte[] copyOfRange(@NonNull byte[], int, int);
-    method @NonNull public static short[] copyOfRange(@NonNull short[], int, int);
-    method @NonNull public static int[] copyOfRange(@NonNull int[], int, int);
-    method @NonNull public static long[] copyOfRange(@NonNull long[], int, int);
-    method @NonNull public static char[] copyOfRange(@NonNull char[], int, int);
-    method @NonNull public static float[] copyOfRange(@NonNull float[], int, int);
-    method @NonNull public static double[] copyOfRange(@NonNull double[], int, int);
-    method @NonNull public static boolean[] copyOfRange(@NonNull boolean[], int, int);
-    method public static boolean deepEquals(@Nullable Object[], @Nullable Object[]);
-    method public static int deepHashCode(@Nullable Object[]);
-    method @NonNull public static String deepToString(@Nullable Object[]);
-    method public static boolean equals(@Nullable long[], @Nullable long[]);
-    method public static boolean equals(@Nullable int[], @Nullable int[]);
-    method public static boolean equals(@Nullable short[], @Nullable short[]);
-    method public static boolean equals(@Nullable char[], @Nullable char[]);
-    method public static boolean equals(@Nullable byte[], @Nullable byte[]);
-    method public static boolean equals(@Nullable boolean[], @Nullable boolean[]);
-    method public static boolean equals(@Nullable double[], @Nullable double[]);
-    method public static boolean equals(@Nullable float[], @Nullable float[]);
-    method public static boolean equals(@Nullable Object[], @Nullable Object[]);
-    method public static void fill(@NonNull long[], long);
-    method public static void fill(@NonNull long[], int, int, long);
-    method public static void fill(@NonNull int[], int);
-    method public static void fill(@NonNull int[], int, int, int);
-    method public static void fill(@NonNull short[], short);
-    method public static void fill(@NonNull short[], int, int, short);
-    method public static void fill(@NonNull char[], char);
-    method public static void fill(@NonNull char[], int, int, char);
-    method public static void fill(@NonNull byte[], byte);
-    method public static void fill(@NonNull byte[], int, int, byte);
-    method public static void fill(@NonNull boolean[], boolean);
-    method public static void fill(@NonNull boolean[], int, int, boolean);
-    method public static void fill(@NonNull double[], double);
-    method public static void fill(@NonNull double[], int, int, double);
-    method public static void fill(@NonNull float[], float);
-    method public static void fill(@NonNull float[], int, int, float);
-    method public static void fill(@NonNull Object[], @Nullable Object);
-    method public static void fill(@NonNull Object[], int, int, @Nullable Object);
-    method public static int hashCode(@Nullable long[]);
-    method public static int hashCode(@Nullable int[]);
-    method public static int hashCode(@Nullable short[]);
-    method public static int hashCode(@Nullable char[]);
-    method public static int hashCode(@Nullable byte[]);
-    method public static int hashCode(@Nullable boolean[]);
-    method public static int hashCode(@Nullable float[]);
-    method public static int hashCode(@Nullable double[]);
-    method public static int hashCode(@Nullable Object[]);
-    method public static <T> void parallelPrefix(@NonNull T[], @NonNull java.util.function.BinaryOperator<T>);
-    method public static <T> void parallelPrefix(@NonNull T[], int, int, @NonNull java.util.function.BinaryOperator<T>);
-    method public static void parallelPrefix(@NonNull long[], @NonNull java.util.function.LongBinaryOperator);
-    method public static void parallelPrefix(@NonNull long[], int, int, @NonNull java.util.function.LongBinaryOperator);
-    method public static void parallelPrefix(@NonNull double[], @NonNull java.util.function.DoubleBinaryOperator);
-    method public static void parallelPrefix(@NonNull double[], int, int, @NonNull java.util.function.DoubleBinaryOperator);
-    method public static void parallelPrefix(@NonNull int[], @NonNull java.util.function.IntBinaryOperator);
-    method public static void parallelPrefix(@NonNull int[], int, int, @NonNull java.util.function.IntBinaryOperator);
-    method public static <T> void parallelSetAll(@NonNull T[], @NonNull java.util.function.IntFunction<? extends T>);
-    method public static void parallelSetAll(@NonNull int[], @NonNull java.util.function.IntUnaryOperator);
-    method public static void parallelSetAll(@NonNull long[], @NonNull java.util.function.IntToLongFunction);
-    method public static void parallelSetAll(@NonNull double[], @NonNull java.util.function.IntToDoubleFunction);
-    method public static void parallelSort(@NonNull byte[]);
-    method public static void parallelSort(@NonNull byte[], int, int);
-    method public static void parallelSort(@NonNull char[]);
-    method public static void parallelSort(@NonNull char[], int, int);
-    method public static void parallelSort(@NonNull short[]);
-    method public static void parallelSort(@NonNull short[], int, int);
-    method public static void parallelSort(@NonNull int[]);
-    method public static void parallelSort(@NonNull int[], int, int);
-    method public static void parallelSort(@NonNull long[]);
-    method public static void parallelSort(@NonNull long[], int, int);
-    method public static void parallelSort(@NonNull float[]);
-    method public static void parallelSort(@NonNull float[], int, int);
-    method public static void parallelSort(@NonNull double[]);
-    method public static void parallelSort(@NonNull double[], int, int);
-    method public static <T extends java.lang.Comparable<? super T>> void parallelSort(@NonNull T[]);
-    method public static <T extends java.lang.Comparable<? super T>> void parallelSort(@NonNull T[], int, int);
-    method public static <T> void parallelSort(@NonNull T[], @Nullable java.util.Comparator<? super T>);
-    method public static <T> void parallelSort(@NonNull T[], int, int, @Nullable java.util.Comparator<? super T>);
-    method public static <T> void setAll(@NonNull T[], @NonNull java.util.function.IntFunction<? extends T>);
-    method public static void setAll(@NonNull int[], @NonNull java.util.function.IntUnaryOperator);
-    method public static void setAll(@NonNull long[], @NonNull java.util.function.IntToLongFunction);
-    method public static void setAll(@NonNull double[], @NonNull java.util.function.IntToDoubleFunction);
-    method public static void sort(@NonNull int[]);
-    method public static void sort(@NonNull int[], int, int);
-    method public static void sort(@NonNull long[]);
-    method public static void sort(@NonNull long[], int, int);
-    method public static void sort(@NonNull short[]);
-    method public static void sort(@NonNull short[], int, int);
-    method public static void sort(@NonNull char[]);
-    method public static void sort(@NonNull char[], int, int);
-    method public static void sort(@NonNull byte[]);
-    method public static void sort(@NonNull byte[], int, int);
-    method public static void sort(@NonNull float[]);
-    method public static void sort(@NonNull float[], int, int);
-    method public static void sort(@NonNull double[]);
-    method public static void sort(@NonNull double[], int, int);
-    method public static void sort(@NonNull Object[]);
-    method public static void sort(@NonNull Object[], int, int);
-    method public static <T> void sort(@NonNull T[], @Nullable java.util.Comparator<? super T>);
-    method public static <T> void sort(@NonNull T[], int, int, @Nullable java.util.Comparator<? super T>);
-    method @NonNull public static <T> java.util.Spliterator<T> spliterator(@NonNull T[]);
-    method @NonNull public static <T> java.util.Spliterator<T> spliterator(@NonNull T[], int, int);
-    method @NonNull public static java.util.Spliterator.OfInt spliterator(@NonNull int[]);
-    method @NonNull public static java.util.Spliterator.OfInt spliterator(@NonNull int[], int, int);
-    method @NonNull public static java.util.Spliterator.OfLong spliterator(@NonNull long[]);
-    method @NonNull public static java.util.Spliterator.OfLong spliterator(@NonNull long[], int, int);
-    method @NonNull public static java.util.Spliterator.OfDouble spliterator(@NonNull double[]);
-    method @NonNull public static java.util.Spliterator.OfDouble spliterator(@NonNull double[], int, int);
-    method @NonNull public static <T> java.util.stream.Stream<T> stream(@NonNull T[]);
-    method @NonNull public static <T> java.util.stream.Stream<T> stream(@NonNull T[], int, int);
-    method @NonNull public static java.util.stream.IntStream stream(@NonNull int[]);
-    method @NonNull public static java.util.stream.IntStream stream(@NonNull int[], int, int);
-    method @NonNull public static java.util.stream.LongStream stream(@NonNull long[]);
-    method @NonNull public static java.util.stream.LongStream stream(@NonNull long[], int, int);
-    method @NonNull public static java.util.stream.DoubleStream stream(@NonNull double[]);
-    method @NonNull public static java.util.stream.DoubleStream stream(@NonNull double[], int, int);
-    method @NonNull public static String toString(@Nullable long[]);
-    method @NonNull public static String toString(@Nullable int[]);
-    method @NonNull public static String toString(@Nullable short[]);
-    method @NonNull public static String toString(@Nullable char[]);
-    method @NonNull public static String toString(@Nullable byte[]);
-    method @NonNull public static String toString(@Nullable boolean[]);
-    method @NonNull public static String toString(@Nullable float[]);
-    method @NonNull public static String toString(@Nullable double[]);
-    method @NonNull public static String toString(@Nullable Object[]);
-  }
-
-  public class Base64 {
-    method public static java.util.Base64.Decoder getDecoder();
-    method public static java.util.Base64.Encoder getEncoder();
-    method public static java.util.Base64.Decoder getMimeDecoder();
-    method public static java.util.Base64.Encoder getMimeEncoder();
-    method public static java.util.Base64.Encoder getMimeEncoder(int, byte[]);
-    method public static java.util.Base64.Decoder getUrlDecoder();
-    method public static java.util.Base64.Encoder getUrlEncoder();
-  }
-
-  public static class Base64.Decoder {
-    method public byte[] decode(byte[]);
-    method public byte[] decode(String);
-    method public int decode(byte[], byte[]);
-    method public java.nio.ByteBuffer decode(java.nio.ByteBuffer);
-    method public java.io.InputStream wrap(java.io.InputStream);
-  }
-
-  public static class Base64.Encoder {
-    method public byte[] encode(byte[]);
-    method public int encode(byte[], byte[]);
-    method public java.nio.ByteBuffer encode(java.nio.ByteBuffer);
-    method public String encodeToString(byte[]);
-    method public java.util.Base64.Encoder withoutPadding();
-    method public java.io.OutputStream wrap(java.io.OutputStream);
-  }
-
-  public class BitSet implements java.lang.Cloneable java.io.Serializable {
-    ctor public BitSet();
-    ctor public BitSet(int);
-    method public void and(java.util.BitSet);
-    method public void andNot(java.util.BitSet);
-    method public int cardinality();
-    method public void clear(int);
-    method public void clear(int, int);
-    method public void clear();
-    method public Object clone();
-    method public void flip(int);
-    method public void flip(int, int);
-    method public boolean get(int);
-    method public java.util.BitSet get(int, int);
-    method public boolean intersects(java.util.BitSet);
-    method public boolean isEmpty();
-    method public int length();
-    method public int nextClearBit(int);
-    method public int nextSetBit(int);
-    method public void or(java.util.BitSet);
-    method public int previousClearBit(int);
-    method public int previousSetBit(int);
-    method public void set(int);
-    method public void set(int, boolean);
-    method public void set(int, int);
-    method public void set(int, int, boolean);
-    method public int size();
-    method public java.util.stream.IntStream stream();
-    method public byte[] toByteArray();
-    method public long[] toLongArray();
-    method public static java.util.BitSet valueOf(long[]);
-    method public static java.util.BitSet valueOf(java.nio.LongBuffer);
-    method public static java.util.BitSet valueOf(byte[]);
-    method public static java.util.BitSet valueOf(java.nio.ByteBuffer);
-    method public void xor(java.util.BitSet);
-  }
-
-  public abstract class Calendar implements java.lang.Cloneable java.lang.Comparable<java.util.Calendar> java.io.Serializable {
-    ctor protected Calendar();
-    ctor protected Calendar(@NonNull java.util.TimeZone, @NonNull java.util.Locale);
-    method public abstract void add(int, int);
-    method public boolean after(@Nullable Object);
-    method public boolean before(@Nullable Object);
-    method public final void clear();
-    method public final void clear(int);
-    method @NonNull public Object clone();
-    method public int compareTo(@NonNull java.util.Calendar);
-    method protected void complete();
-    method protected abstract void computeFields();
-    method protected abstract void computeTime();
-    method public int get(int);
-    method public int getActualMaximum(int);
-    method public int getActualMinimum(int);
-    method @NonNull public static java.util.Set<java.lang.String> getAvailableCalendarTypes();
-    method @NonNull public static java.util.Locale[] getAvailableLocales();
-    method @NonNull public String getCalendarType();
-    method @Nullable public String getDisplayName(int, int, @NonNull java.util.Locale);
-    method @Nullable public java.util.Map<java.lang.String,java.lang.Integer> getDisplayNames(int, int, @NonNull java.util.Locale);
-    method public int getFirstDayOfWeek();
-    method public abstract int getGreatestMinimum(int);
-    method @NonNull public static java.util.Calendar getInstance();
-    method @NonNull public static java.util.Calendar getInstance(@NonNull java.util.TimeZone);
-    method @NonNull public static java.util.Calendar getInstance(@NonNull java.util.Locale);
-    method @NonNull public static java.util.Calendar getInstance(@NonNull java.util.TimeZone, @NonNull java.util.Locale);
-    method public abstract int getLeastMaximum(int);
-    method public abstract int getMaximum(int);
-    method public int getMinimalDaysInFirstWeek();
-    method public abstract int getMinimum(int);
-    method @NonNull public final java.util.Date getTime();
-    method public long getTimeInMillis();
-    method @NonNull public java.util.TimeZone getTimeZone();
-    method public int getWeekYear();
-    method public int getWeeksInWeekYear();
-    method protected final int internalGet(int);
-    method public boolean isLenient();
-    method public final boolean isSet(int);
-    method public boolean isWeekDateSupported();
-    method public abstract void roll(int, boolean);
-    method public void roll(int, int);
-    method public 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 final void setTime(@NonNull java.util.Date);
-    method public void setTimeInMillis(long);
-    method public void setTimeZone(@NonNull java.util.TimeZone);
-    method public void setWeekDate(int, int, int);
-    method @NonNull public final java.time.Instant toInstant();
-    field public static final int ALL_STYLES = 0; // 0x0
-    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 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 DST_OFFSET = 16; // 0x10
-    field public static final int ERA = 0; // 0x0
-    field public static final int FEBRUARY = 1; // 0x1
-    field public static final int FIELD_COUNT = 17; // 0x11
-    field public static final int FRIDAY = 6; // 0x6
-    field public static final int HOUR = 10; // 0xa
-    field public static final int HOUR_OF_DAY = 11; // 0xb
-    field public static final int JANUARY = 0; // 0x0
-    field public static final int JULY = 6; // 0x6
-    field public static final int JUNE = 5; // 0x5
-    field public static final int LONG = 2; // 0x2
-    field public static final int LONG_FORMAT = 2; // 0x2
-    field public static final int LONG_STANDALONE = 32770; // 0x8002
-    field public static final int MARCH = 2; // 0x2
-    field public static final int MAY = 4; // 0x4
-    field public static final int MILLISECOND = 14; // 0xe
-    field public static final int MINUTE = 12; // 0xc
-    field public static final int MONDAY = 2; // 0x2
-    field public static final int MONTH = 2; // 0x2
-    field public static final int NARROW_FORMAT = 4; // 0x4
-    field public static final int NARROW_STANDALONE = 32772; // 0x8004
-    field public static final int NOVEMBER = 10; // 0xa
-    field public static final int OCTOBER = 9; // 0x9
-    field public static final int PM = 1; // 0x1
-    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 SHORT = 1; // 0x1
-    field public static final int SHORT_FORMAT = 1; // 0x1
-    field public static final int SHORT_STANDALONE = 32769; // 0x8001
-    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 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 ZONE_OFFSET = 15; // 0xf
-    field protected boolean areFieldsSet;
-    field @NonNull protected int[] fields;
-    field @NonNull protected boolean[] isSet;
-    field protected boolean isTimeSet;
-    field protected long time;
-  }
-
-  public static class Calendar.Builder {
-    ctor public Calendar.Builder();
-    method @NonNull public java.util.Calendar build();
-    method @NonNull public java.util.Calendar.Builder set(int, int);
-    method @NonNull public java.util.Calendar.Builder setCalendarType(@NonNull String);
-    method @NonNull public java.util.Calendar.Builder setDate(int, int, int);
-    method @NonNull public java.util.Calendar.Builder setFields(@NonNull int...);
-    method @NonNull public java.util.Calendar.Builder setInstant(long);
-    method @NonNull public java.util.Calendar.Builder setInstant(@NonNull java.util.Date);
-    method @NonNull public java.util.Calendar.Builder setLenient(boolean);
-    method @NonNull public java.util.Calendar.Builder setLocale(@NonNull java.util.Locale);
-    method @NonNull public java.util.Calendar.Builder setTimeOfDay(int, int, int);
-    method @NonNull public java.util.Calendar.Builder setTimeOfDay(int, int, int, int);
-    method @NonNull public java.util.Calendar.Builder setTimeZone(@NonNull java.util.TimeZone);
-    method @NonNull public java.util.Calendar.Builder setWeekDate(int, int, int);
-    method @NonNull public java.util.Calendar.Builder setWeekDefinition(int, int);
-  }
-
-  public interface Collection<E> extends java.lang.Iterable<E> {
-    method public boolean add(E);
-    method public boolean addAll(@NonNull java.util.Collection<? extends E>);
-    method public void clear();
-    method public boolean contains(@Nullable Object);
-    method public boolean containsAll(@NonNull java.util.Collection<?>);
-    method public boolean equals(@Nullable Object);
-    method public int hashCode();
-    method public boolean isEmpty();
-    method @NonNull public java.util.Iterator<E> iterator();
-    method @NonNull public default java.util.stream.Stream<E> parallelStream();
-    method public boolean remove(@Nullable Object);
-    method public boolean removeAll(@NonNull java.util.Collection<?>);
-    method public default boolean removeIf(@NonNull java.util.function.Predicate<? super E>);
-    method public boolean retainAll(@NonNull java.util.Collection<?>);
-    method public int size();
-    method @NonNull public default java.util.Spliterator<E> spliterator();
-    method @NonNull public default java.util.stream.Stream<E> stream();
-    method @NonNull public Object[] toArray();
-    method @NonNull public <T> T[] toArray(@NonNull T[]);
-  }
-
-  public class Collections {
-    method @java.lang.SafeVarargs public static <T> boolean addAll(@NonNull java.util.Collection<? super T>, @NonNull T...);
-    method @NonNull public static <T> java.util.Queue<T> asLifoQueue(@NonNull java.util.Deque<T>);
-    method public static <T> int binarySearch(@NonNull java.util.List<? extends java.lang.Comparable<? super T>>, @NonNull T);
-    method public static <T> int binarySearch(@NonNull java.util.List<? extends T>, T, @Nullable java.util.Comparator<? super T>);
-    method @NonNull public static <E> java.util.Collection<E> checkedCollection(@NonNull java.util.Collection<E>, @NonNull Class<E>);
-    method @NonNull public static <E> java.util.List<E> checkedList(@NonNull java.util.List<E>, @NonNull Class<E>);
-    method @NonNull public static <K, V> java.util.Map<K,V> checkedMap(@NonNull java.util.Map<K,V>, @NonNull Class<K>, @NonNull Class<V>);
-    method @NonNull public static <K, V> java.util.NavigableMap<K,V> checkedNavigableMap(@NonNull java.util.NavigableMap<K,V>, @NonNull Class<K>, @NonNull Class<V>);
-    method @NonNull public static <E> java.util.NavigableSet<E> checkedNavigableSet(@NonNull java.util.NavigableSet<E>, @NonNull Class<E>);
-    method @NonNull public static <E> java.util.Queue<E> checkedQueue(@NonNull java.util.Queue<E>, @NonNull Class<E>);
-    method @NonNull public static <E> java.util.Set<E> checkedSet(@NonNull java.util.Set<E>, @NonNull Class<E>);
-    method @NonNull public static <K, V> java.util.SortedMap<K,V> checkedSortedMap(@NonNull java.util.SortedMap<K,V>, @NonNull Class<K>, @NonNull Class<V>);
-    method @NonNull public static <E> java.util.SortedSet<E> checkedSortedSet(@NonNull java.util.SortedSet<E>, @NonNull Class<E>);
-    method public static <T> void copy(@NonNull java.util.List<? super T>, @NonNull java.util.List<? extends T>);
-    method public static boolean disjoint(@NonNull java.util.Collection<?>, @NonNull java.util.Collection<?>);
-    method @NonNull public static <T> java.util.Enumeration<T> emptyEnumeration();
-    method @NonNull public static <T> java.util.Iterator<T> emptyIterator();
-    method @NonNull public static final <T> java.util.List<T> emptyList();
-    method @NonNull public static <T> java.util.ListIterator<T> emptyListIterator();
-    method @NonNull public static final <K, V> java.util.Map<K,V> emptyMap();
-    method @NonNull public static final <K, V> java.util.NavigableMap<K,V> emptyNavigableMap();
-    method @NonNull public static <E> java.util.NavigableSet<E> emptyNavigableSet();
-    method @NonNull public static final <T> java.util.Set<T> emptySet();
-    method @NonNull public static final <K, V> java.util.SortedMap<K,V> emptySortedMap();
-    method @NonNull public static <E> java.util.SortedSet<E> emptySortedSet();
-    method @NonNull public static <T> java.util.Enumeration<T> enumeration(@NonNull java.util.Collection<T>);
-    method public static <T> void fill(@NonNull java.util.List<? super T>, T);
-    method public static int frequency(@NonNull java.util.Collection<?>, @Nullable Object);
-    method public static int indexOfSubList(@NonNull java.util.List<?>, @NonNull java.util.List<?>);
-    method public static int lastIndexOfSubList(@NonNull java.util.List<?>, @NonNull java.util.List<?>);
-    method @NonNull public static <T> java.util.ArrayList<T> list(@NonNull java.util.Enumeration<T>);
-    method @NonNull public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T max(@NonNull java.util.Collection<? extends T>);
-    method public static <T> T max(@NonNull java.util.Collection<? extends T>, @Nullable java.util.Comparator<? super T>);
-    method @NonNull public static <T extends java.lang.Object & java.lang.Comparable<? super T>> T min(@NonNull java.util.Collection<? extends T>);
-    method public static <T> T min(@NonNull java.util.Collection<? extends T>, @Nullable java.util.Comparator<? super T>);
-    method @NonNull public static <T> java.util.List<T> nCopies(int, T);
-    method @NonNull public static <E> java.util.Set<E> newSetFromMap(@NonNull java.util.Map<E,java.lang.Boolean>);
-    method public static <T> boolean replaceAll(@NonNull java.util.List<T>, T, T);
-    method public static void reverse(@NonNull java.util.List<?>);
-    method @NonNull public static <T> java.util.Comparator<T> reverseOrder();
-    method @NonNull public static <T> java.util.Comparator<T> reverseOrder(@Nullable java.util.Comparator<T>);
-    method public static void rotate(@NonNull java.util.List<?>, int);
-    method public static void shuffle(@NonNull java.util.List<?>);
-    method public static void shuffle(@NonNull java.util.List<?>, @NonNull java.util.Random);
-    method @NonNull public static <T> java.util.Set<T> singleton(T);
-    method @NonNull public static <T> java.util.List<T> singletonList(T);
-    method @NonNull public static <K, V> java.util.Map<K,V> singletonMap(K, V);
-    method public static <T extends java.lang.Comparable<? super T>> void sort(@NonNull java.util.List<T>);
-    method public static <T> void sort(@NonNull java.util.List<T>, @Nullable java.util.Comparator<? super T>);
-    method public static void swap(@NonNull java.util.List<?>, int, int);
-    method @NonNull public static <T> java.util.Collection<T> synchronizedCollection(@NonNull java.util.Collection<T>);
-    method @NonNull public static <T> java.util.List<T> synchronizedList(@NonNull java.util.List<T>);
-    method @NonNull public static <K, V> java.util.Map<K,V> synchronizedMap(@NonNull java.util.Map<K,V>);
-    method @NonNull public static <K, V> java.util.NavigableMap<K,V> synchronizedNavigableMap(@NonNull java.util.NavigableMap<K,V>);
-    method @NonNull public static <T> java.util.NavigableSet<T> synchronizedNavigableSet(@NonNull java.util.NavigableSet<T>);
-    method @NonNull public static <T> java.util.Set<T> synchronizedSet(@NonNull java.util.Set<T>);
-    method @NonNull public static <K, V> java.util.SortedMap<K,V> synchronizedSortedMap(@NonNull java.util.SortedMap<K,V>);
-    method @NonNull public static <T> java.util.SortedSet<T> synchronizedSortedSet(@NonNull java.util.SortedSet<T>);
-    method @NonNull public static <T> java.util.Collection<T> unmodifiableCollection(@NonNull java.util.Collection<? extends T>);
-    method @NonNull public static <T> java.util.List<T> unmodifiableList(@NonNull java.util.List<? extends T>);
-    method @NonNull public static <K, V> java.util.Map<K,V> unmodifiableMap(@NonNull java.util.Map<? extends K,? extends V>);
-    method @NonNull public static <K, V> java.util.NavigableMap<K,V> unmodifiableNavigableMap(@NonNull java.util.NavigableMap<K,? extends V>);
-    method @NonNull public static <T> java.util.NavigableSet<T> unmodifiableNavigableSet(@NonNull java.util.NavigableSet<T>);
-    method @NonNull public static <T> java.util.Set<T> unmodifiableSet(@NonNull java.util.Set<? extends T>);
-    method @NonNull public static <K, V> java.util.SortedMap<K,V> unmodifiableSortedMap(@NonNull java.util.SortedMap<K,? extends V>);
-    method @NonNull public static <T> java.util.SortedSet<T> unmodifiableSortedSet(@NonNull java.util.SortedSet<T>);
-    field @NonNull public static final java.util.List EMPTY_LIST;
-    field @NonNull public static final java.util.Map EMPTY_MAP;
-    field @NonNull public static final java.util.Set EMPTY_SET;
-  }
-
-  @java.lang.FunctionalInterface public interface Comparator<T> {
-    method public int compare(T, T);
-    method public static <T, U> java.util.Comparator<T> comparing(java.util.function.Function<? super T,? extends U>, java.util.Comparator<? super U>);
-    method public static <T, U extends java.lang.Comparable<? super U>> java.util.Comparator<T> comparing(java.util.function.Function<? super T,? extends U>);
-    method public static <T> java.util.Comparator<T> comparingDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public static <T> java.util.Comparator<T> comparingInt(java.util.function.ToIntFunction<? super T>);
-    method public static <T> java.util.Comparator<T> comparingLong(java.util.function.ToLongFunction<? super T>);
-    method public boolean equals(Object);
-    method public static <T extends java.lang.Comparable<? super T>> java.util.Comparator<T> naturalOrder();
-    method public static <T> java.util.Comparator<T> nullsFirst(java.util.Comparator<? super T>);
-    method public static <T> java.util.Comparator<T> nullsLast(java.util.Comparator<? super T>);
-    method public static <T extends java.lang.Comparable<? super T>> java.util.Comparator<T> reverseOrder();
-    method public default java.util.Comparator<T> reversed();
-    method public default java.util.Comparator<T> thenComparing(java.util.Comparator<? super T>);
-    method public default <U> java.util.Comparator<T> thenComparing(java.util.function.Function<? super T,? extends U>, java.util.Comparator<? super U>);
-    method public default <U extends java.lang.Comparable<? super U>> java.util.Comparator<T> thenComparing(java.util.function.Function<? super T,? extends U>);
-    method public default java.util.Comparator<T> thenComparingDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public default java.util.Comparator<T> thenComparingInt(java.util.function.ToIntFunction<? super T>);
-    method public default java.util.Comparator<T> thenComparingLong(java.util.function.ToLongFunction<? super T>);
-  }
-
-  public class ConcurrentModificationException extends java.lang.RuntimeException {
-    ctor public ConcurrentModificationException();
-    ctor public ConcurrentModificationException(String);
-    ctor public ConcurrentModificationException(Throwable);
-    ctor public ConcurrentModificationException(String, Throwable);
-  }
-
-  public final class Currency implements java.io.Serializable {
-    method public static java.util.Set<java.util.Currency> getAvailableCurrencies();
-    method public String getCurrencyCode();
-    method public int getDefaultFractionDigits();
-    method public String getDisplayName();
-    method public String getDisplayName(java.util.Locale);
-    method public static java.util.Currency getInstance(String);
-    method public static java.util.Currency getInstance(java.util.Locale);
-    method public int getNumericCode();
-    method public String getSymbol();
-    method public String getSymbol(java.util.Locale);
-  }
-
-  public class Date implements java.lang.Cloneable java.lang.Comparable<java.util.Date> java.io.Serializable {
-    ctor public Date();
-    ctor public Date(long);
-    ctor @Deprecated public Date(int, int, int);
-    ctor @Deprecated public Date(int, int, int, int, int);
-    ctor @Deprecated public Date(int, int, int, int, int, int);
-    ctor @Deprecated public Date(String);
-    method @Deprecated public static long UTC(int, int, int, int, int, int);
-    method public boolean after(java.util.Date);
-    method public boolean before(java.util.Date);
-    method public Object clone();
-    method public int compareTo(java.util.Date);
-    method public static java.util.Date from(java.time.Instant);
-    method @Deprecated public int getDate();
-    method @Deprecated public int getDay();
-    method @Deprecated public int getHours();
-    method @Deprecated public int getMinutes();
-    method @Deprecated public int getMonth();
-    method @Deprecated public int getSeconds();
-    method public long getTime();
-    method @Deprecated public int getTimezoneOffset();
-    method @Deprecated public int getYear();
-    method @Deprecated public static long parse(String);
-    method @Deprecated public void setDate(int);
-    method @Deprecated public void setHours(int);
-    method @Deprecated public void setMinutes(int);
-    method @Deprecated public void setMonth(int);
-    method @Deprecated public void setSeconds(int);
-    method public void setTime(long);
-    method @Deprecated public void setYear(int);
-    method @Deprecated public String toGMTString();
-    method public java.time.Instant toInstant();
-    method @Deprecated public String toLocaleString();
-  }
-
-  public interface Deque<E> extends java.util.Queue<E> {
-    method public void addFirst(E);
-    method public void addLast(E);
-    method @NonNull public java.util.Iterator<E> descendingIterator();
-    method public E getFirst();
-    method public E getLast();
-    method public boolean offerFirst(E);
-    method public boolean offerLast(E);
-    method @Nullable public E peekFirst();
-    method @Nullable public E peekLast();
-    method @Nullable public E pollFirst();
-    method @Nullable public E pollLast();
-    method public E pop();
-    method public void push(E);
-    method public E removeFirst();
-    method public boolean removeFirstOccurrence(@Nullable Object);
-    method public E removeLast();
-    method public boolean removeLastOccurrence(@Nullable Object);
-  }
-
-  public abstract class Dictionary<K, V> {
-    ctor public Dictionary();
-    method public abstract java.util.Enumeration<V> elements();
-    method public abstract V get(Object);
-    method public abstract boolean isEmpty();
-    method public abstract java.util.Enumeration<K> keys();
-    method public abstract V put(K, V);
-    method public abstract V remove(Object);
-    method public abstract int size();
-  }
-
-  public class DoubleSummaryStatistics implements java.util.function.DoubleConsumer {
-    ctor public DoubleSummaryStatistics();
-    method public void accept(double);
-    method public void combine(java.util.DoubleSummaryStatistics);
-    method public final double getAverage();
-    method public final long getCount();
-    method public final double getMax();
-    method public final double getMin();
-    method public final double getSum();
-  }
-
-  public class DuplicateFormatFlagsException extends java.util.IllegalFormatException {
-    ctor public DuplicateFormatFlagsException(String);
-    method public String getFlags();
-  }
-
-  public class EmptyStackException extends java.lang.RuntimeException {
-    ctor public EmptyStackException();
-  }
-
-  public class EnumMap<K extends java.lang.Enum<K>, V> extends java.util.AbstractMap<K,V> implements java.lang.Cloneable java.io.Serializable {
-    ctor public EnumMap(Class<K>);
-    ctor public EnumMap(java.util.EnumMap<K,? extends V>);
-    ctor public EnumMap(java.util.Map<K,? extends V>);
-    method public java.util.EnumMap<K,V> clone();
-    method public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-  }
-
-  public abstract class EnumSet<E extends java.lang.Enum<E>> extends java.util.AbstractSet<E> implements java.lang.Cloneable java.io.Serializable {
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> allOf(Class<E>);
-    method public java.util.EnumSet<E> clone();
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> complementOf(java.util.EnumSet<E>);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> copyOf(java.util.EnumSet<E>);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> copyOf(java.util.Collection<E>);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> noneOf(Class<E>);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E, E);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E, E, E);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E, E, E, E);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E, E, E, E, E);
-    method @java.lang.SafeVarargs public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> of(E, E...);
-    method public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> range(E, E);
-  }
-
-  public interface Enumeration<E> {
-    method public boolean hasMoreElements();
-    method public E nextElement();
-  }
-
-  public interface EventListener {
-  }
-
-  public abstract class EventListenerProxy<T extends java.util.EventListener> implements java.util.EventListener {
-    ctor public EventListenerProxy(T);
-    method public T getListener();
-  }
-
-  public class EventObject implements java.io.Serializable {
-    ctor public EventObject(Object);
-    method public Object getSource();
-    field protected transient Object source;
-  }
-
-  public class FormatFlagsConversionMismatchException extends java.util.IllegalFormatException {
-    ctor public FormatFlagsConversionMismatchException(String, char);
-    method public char getConversion();
-    method public String getFlags();
-  }
-
-  public interface Formattable {
-    method public void formatTo(java.util.Formatter, int, int, int);
-  }
-
-  public class FormattableFlags {
-    field public static final int ALTERNATE = 4; // 0x4
-    field public static final int LEFT_JUSTIFY = 1; // 0x1
-    field public static final int UPPERCASE = 2; // 0x2
-  }
-
-  public final class Formatter implements java.io.Closeable java.io.Flushable {
-    ctor public Formatter();
-    ctor public Formatter(Appendable);
-    ctor public Formatter(java.util.Locale);
-    ctor public Formatter(Appendable, java.util.Locale);
-    ctor public Formatter(String) throws java.io.FileNotFoundException;
-    ctor public Formatter(String, String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public Formatter(String, String, java.util.Locale) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public Formatter(java.io.File) throws java.io.FileNotFoundException;
-    ctor public Formatter(java.io.File, String) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public Formatter(java.io.File, String, java.util.Locale) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException;
-    ctor public Formatter(java.io.PrintStream);
-    ctor public Formatter(java.io.OutputStream);
-    ctor public Formatter(java.io.OutputStream, String) throws java.io.UnsupportedEncodingException;
-    ctor public Formatter(java.io.OutputStream, String, java.util.Locale) throws java.io.UnsupportedEncodingException;
-    method public void close();
-    method public void flush();
-    method public java.util.Formatter format(String, java.lang.Object...);
-    method public java.util.Formatter format(java.util.Locale, String, java.lang.Object...);
-    method public java.io.IOException ioException();
-    method public java.util.Locale locale();
-    method public Appendable out();
-  }
-
-  public enum Formatter.BigDecimalLayoutForm {
-    enum_constant public static final java.util.Formatter.BigDecimalLayoutForm DECIMAL_FLOAT;
-    enum_constant public static final java.util.Formatter.BigDecimalLayoutForm SCIENTIFIC;
-  }
-
-  public class FormatterClosedException extends java.lang.IllegalStateException {
-    ctor public FormatterClosedException();
-  }
-
-  public class GregorianCalendar extends java.util.Calendar {
-    ctor public GregorianCalendar();
-    ctor public GregorianCalendar(java.util.TimeZone);
-    ctor public GregorianCalendar(java.util.Locale);
-    ctor public GregorianCalendar(java.util.TimeZone, java.util.Locale);
-    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 void add(int, int);
-    method protected void computeFields();
-    method protected void computeTime();
-    method public static java.util.GregorianCalendar from(java.time.ZonedDateTime);
-    method public int getGreatestMinimum(int);
-    method public final java.util.Date getGregorianChange();
-    method public int getLeastMaximum(int);
-    method public int getMaximum(int);
-    method public int getMinimum(int);
-    method public boolean isLeapYear(int);
-    method public final boolean isWeekDateSupported();
-    method public void roll(int, boolean);
-    method public void setGregorianChange(java.util.Date);
-    method public java.time.ZonedDateTime toZonedDateTime();
-    field public static final int AD = 1; // 0x1
-    field public static final int BC = 0; // 0x0
-  }
-
-  public class HashMap<K, V> extends java.util.AbstractMap<K,V> implements java.lang.Cloneable java.util.Map<K,V> java.io.Serializable {
-    ctor public HashMap(int, float);
-    ctor public HashMap(int);
-    ctor public HashMap();
-    ctor public HashMap(@NonNull java.util.Map<? extends K,? extends V>);
-    method @NonNull public Object clone();
-    method @NonNull public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-  }
-
-  public class HashSet<E> extends java.util.AbstractSet<E> implements java.lang.Cloneable java.io.Serializable java.util.Set<E> {
-    ctor public HashSet();
-    ctor public HashSet(@NonNull java.util.Collection<? extends E>);
-    ctor public HashSet(int, float);
-    ctor public HashSet(int);
-    method @NonNull public Object clone();
-    method @NonNull public java.util.Iterator<E> iterator();
-    method public int size();
-  }
-
-  public class Hashtable<K, V> extends java.util.Dictionary<K,V> implements java.lang.Cloneable java.util.Map<K,V> java.io.Serializable {
-    ctor public Hashtable(int, float);
-    ctor public Hashtable(int);
-    ctor public Hashtable();
-    ctor public Hashtable(java.util.Map<? extends K,? extends V>);
-    method public void clear();
-    method public Object clone();
-    method public boolean contains(Object);
-    method public boolean containsKey(Object);
-    method public boolean containsValue(Object);
-    method public java.util.Enumeration<V> elements();
-    method public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-    method public V get(Object);
-    method public boolean isEmpty();
-    method public java.util.Set<K> keySet();
-    method public java.util.Enumeration<K> keys();
-    method public V put(K, V);
-    method public void putAll(java.util.Map<? extends K,? extends V>);
-    method protected void rehash();
-    method public V remove(Object);
-    method public int size();
-    method public java.util.Collection<V> values();
-  }
-
-  public class IdentityHashMap<K, V> extends java.util.AbstractMap<K,V> implements java.lang.Cloneable java.util.Map<K,V> java.io.Serializable {
-    ctor public IdentityHashMap();
-    ctor public IdentityHashMap(int);
-    ctor public IdentityHashMap(java.util.Map<? extends K,? extends V>);
-    method public Object clone();
-    method public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-  }
-
-  public class IllegalFormatCodePointException extends java.util.IllegalFormatException {
-    ctor public IllegalFormatCodePointException(int);
-    method public int getCodePoint();
-  }
-
-  public class IllegalFormatConversionException extends java.util.IllegalFormatException {
-    ctor public IllegalFormatConversionException(char, Class<?>);
-    method public Class<?> getArgumentClass();
-    method public char getConversion();
-  }
-
-  public class IllegalFormatException extends java.lang.IllegalArgumentException {
-  }
-
-  public class IllegalFormatFlagsException extends java.util.IllegalFormatException {
-    ctor public IllegalFormatFlagsException(String);
-    method public String getFlags();
-  }
-
-  public class IllegalFormatPrecisionException extends java.util.IllegalFormatException {
-    ctor public IllegalFormatPrecisionException(int);
-    method public int getPrecision();
-  }
-
-  public class IllegalFormatWidthException extends java.util.IllegalFormatException {
-    ctor public IllegalFormatWidthException(int);
-    method public int getWidth();
-  }
-
-  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 InputMismatchException extends java.util.NoSuchElementException {
-    ctor public InputMismatchException();
-    ctor public InputMismatchException(String);
-  }
-
-  public class IntSummaryStatistics implements java.util.function.IntConsumer {
-    ctor public IntSummaryStatistics();
-    method public void accept(int);
-    method public void combine(java.util.IntSummaryStatistics);
-    method public final double getAverage();
-    method public final long getCount();
-    method public final int getMax();
-    method public final int getMin();
-    method public final long getSum();
-  }
-
-  public class InvalidPropertiesFormatException extends java.io.IOException {
-    ctor public InvalidPropertiesFormatException(Throwable);
-    ctor public InvalidPropertiesFormatException(String);
-  }
-
-  public interface Iterator<E> {
-    method public default void forEachRemaining(@NonNull java.util.function.Consumer<? super E>);
-    method public boolean hasNext();
-    method public E next();
-    method public default void remove();
-  }
-
-  public class LinkedHashMap<K, V> extends java.util.HashMap<K,V> implements java.util.Map<K,V> {
-    ctor public LinkedHashMap(int, float);
-    ctor public LinkedHashMap(int);
-    ctor public LinkedHashMap();
-    ctor public LinkedHashMap(java.util.Map<? extends K,? extends V>);
-    ctor public LinkedHashMap(int, float, boolean);
-    method protected boolean removeEldestEntry(java.util.Map.Entry<K,V>);
-  }
-
-  public class LinkedHashSet<E> extends java.util.HashSet<E> implements java.lang.Cloneable java.io.Serializable java.util.Set<E> {
-    ctor public LinkedHashSet(int, float);
-    ctor public LinkedHashSet(int);
-    ctor public LinkedHashSet();
-    ctor public LinkedHashSet(java.util.Collection<? extends E>);
-  }
-
-  public class LinkedList<E> extends java.util.AbstractSequentialList<E> implements java.lang.Cloneable java.util.Deque<E> java.util.List<E> java.io.Serializable {
-    ctor public LinkedList();
-    ctor public LinkedList(@NonNull java.util.Collection<? extends E>);
-    method public void addFirst(E);
-    method public void addLast(E);
-    method @NonNull public Object clone();
-    method @NonNull public java.util.Iterator<E> descendingIterator();
-    method public E element();
-    method public E getFirst();
-    method public E getLast();
-    method public boolean offer(E);
-    method public boolean offerFirst(E);
-    method public boolean offerLast(E);
-    method @Nullable public E peek();
-    method @Nullable public E peekFirst();
-    method @Nullable public E peekLast();
-    method @Nullable public E poll();
-    method @Nullable public E pollFirst();
-    method @Nullable public E pollLast();
-    method public E pop();
-    method public void push(E);
-    method public E remove();
-    method public E removeFirst();
-    method public boolean removeFirstOccurrence(@Nullable Object);
-    method public E removeLast();
-    method public boolean removeLastOccurrence(@Nullable Object);
-    method public int size();
-  }
-
-  public interface List<E> extends java.util.Collection<E> {
-    method public void add(int, E);
-    method public boolean addAll(int, @NonNull java.util.Collection<? extends E>);
-    method public E get(int);
-    method public int indexOf(@Nullable Object);
-    method public int lastIndexOf(@Nullable Object);
-    method @NonNull public java.util.ListIterator<E> listIterator();
-    method @NonNull public java.util.ListIterator<E> listIterator(int);
-    method @NonNull public static <E> java.util.List<E> of();
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.List<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull @java.lang.SafeVarargs public static <E> java.util.List<E> of(@NonNull E...);
-    method public E remove(int);
-    method public default void replaceAll(@NonNull java.util.function.UnaryOperator<E>);
-    method public E set(int, E);
-    method public default void sort(@Nullable java.util.Comparator<? super E>);
-    method @NonNull public java.util.List<E> subList(int, int);
-  }
-
-  public interface ListIterator<E> extends java.util.Iterator<E> {
-    method public void add(E);
-    method public boolean hasPrevious();
-    method public int nextIndex();
-    method public E previous();
-    method public int previousIndex();
-    method public void remove();
-    method public void set(E);
-  }
-
-  public abstract class ListResourceBundle extends java.util.ResourceBundle {
-    ctor public ListResourceBundle();
-    method protected abstract Object[][] getContents();
-    method public java.util.Enumeration<java.lang.String> getKeys();
-    method public final Object handleGetObject(String);
-  }
-
-  public final class Locale implements java.lang.Cloneable java.io.Serializable {
-    ctor public Locale(@NonNull String, @NonNull String, @NonNull String);
-    ctor public Locale(@NonNull String, @NonNull String);
-    ctor public Locale(@NonNull String);
-    method @NonNull public Object clone();
-    method @NonNull public static java.util.List<java.util.Locale> filter(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.util.Locale>, @NonNull java.util.Locale.FilteringMode);
-    method @NonNull public static java.util.List<java.util.Locale> filter(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.util.Locale>);
-    method @NonNull public static java.util.List<java.lang.String> filterTags(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.lang.String>, @NonNull java.util.Locale.FilteringMode);
-    method @NonNull public static java.util.List<java.lang.String> filterTags(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.lang.String>);
-    method @NonNull public static java.util.Locale forLanguageTag(@NonNull String);
-    method @NonNull public static java.util.Locale[] getAvailableLocales();
-    method @NonNull public String getCountry();
-    method @NonNull public static java.util.Locale getDefault();
-    method @NonNull public static java.util.Locale getDefault(@NonNull java.util.Locale.Category);
-    method @NonNull public String getDisplayCountry();
-    method @NonNull public String getDisplayCountry(@NonNull java.util.Locale);
-    method @NonNull public String getDisplayLanguage();
-    method @NonNull public String getDisplayLanguage(@NonNull java.util.Locale);
-    method @NonNull public String getDisplayName();
-    method @NonNull public String getDisplayName(@NonNull java.util.Locale);
-    method @NonNull public String getDisplayScript();
-    method @NonNull public String getDisplayScript(@NonNull java.util.Locale);
-    method @NonNull public String getDisplayVariant();
-    method @NonNull public String getDisplayVariant(@NonNull java.util.Locale);
-    method @Nullable public String getExtension(char);
-    method @NonNull public java.util.Set<java.lang.Character> getExtensionKeys();
-    method @NonNull public String getISO3Country() throws java.util.MissingResourceException;
-    method @NonNull public String getISO3Language() throws java.util.MissingResourceException;
-    method @NonNull public static String[] getISOCountries();
-    method @NonNull public static String[] getISOLanguages();
-    method @NonNull public String getLanguage();
-    method @NonNull public String getScript();
-    method @NonNull public java.util.Set<java.lang.String> getUnicodeLocaleAttributes();
-    method @NonNull public java.util.Set<java.lang.String> getUnicodeLocaleKeys();
-    method @Nullable public String getUnicodeLocaleType(@NonNull String);
-    method @NonNull public String getVariant();
-    method public boolean hasExtensions();
-    method @Nullable public static java.util.Locale lookup(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.util.Locale>);
-    method @Nullable public static String lookupTag(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Collection<java.lang.String>);
-    method public static void setDefault(@NonNull java.util.Locale);
-    method public static void setDefault(@NonNull java.util.Locale.Category, @NonNull java.util.Locale);
-    method @NonNull public java.util.Locale stripExtensions();
-    method @NonNull public String toLanguageTag();
-    field @NonNull public static final java.util.Locale CANADA;
-    field @NonNull public static final java.util.Locale CANADA_FRENCH;
-    field @NonNull public static final java.util.Locale CHINA;
-    field @NonNull public static final java.util.Locale CHINESE;
-    field @NonNull public static final java.util.Locale ENGLISH;
-    field @NonNull public static final java.util.Locale FRANCE;
-    field @NonNull public static final java.util.Locale FRENCH;
-    field @NonNull public static final java.util.Locale GERMAN;
-    field @NonNull public static final java.util.Locale GERMANY;
-    field @NonNull public static final java.util.Locale ITALIAN;
-    field @NonNull public static final java.util.Locale ITALY;
-    field @NonNull public static final java.util.Locale JAPAN;
-    field @NonNull public static final java.util.Locale JAPANESE;
-    field @NonNull public static final java.util.Locale KOREA;
-    field @NonNull public static final java.util.Locale KOREAN;
-    field @NonNull public static final java.util.Locale PRC;
-    field public static final char PRIVATE_USE_EXTENSION = 120; // 0x0078 'x'
-    field @NonNull public static final java.util.Locale ROOT;
-    field @NonNull public static final java.util.Locale SIMPLIFIED_CHINESE;
-    field @NonNull public static final java.util.Locale TAIWAN;
-    field @NonNull public static final java.util.Locale TRADITIONAL_CHINESE;
-    field @NonNull public static final java.util.Locale UK;
-    field public static final char UNICODE_LOCALE_EXTENSION = 117; // 0x0075 'u'
-    field @NonNull public static final java.util.Locale US;
-  }
-
-  public static final class Locale.Builder {
-    ctor public Locale.Builder();
-    method @NonNull public java.util.Locale.Builder addUnicodeLocaleAttribute(@NonNull String);
-    method @NonNull public java.util.Locale build();
-    method @NonNull public java.util.Locale.Builder clear();
-    method @NonNull public java.util.Locale.Builder clearExtensions();
-    method @NonNull public java.util.Locale.Builder removeUnicodeLocaleAttribute(@NonNull String);
-    method @NonNull public java.util.Locale.Builder setExtension(char, @Nullable String);
-    method @NonNull public java.util.Locale.Builder setLanguage(@Nullable String);
-    method @NonNull public java.util.Locale.Builder setLanguageTag(@NonNull String);
-    method @NonNull public java.util.Locale.Builder setLocale(@NonNull java.util.Locale);
-    method @NonNull public java.util.Locale.Builder setRegion(@Nullable String);
-    method @NonNull public java.util.Locale.Builder setScript(@Nullable String);
-    method @NonNull public java.util.Locale.Builder setUnicodeLocaleKeyword(@NonNull String, @Nullable String);
-    method @NonNull public java.util.Locale.Builder setVariant(@Nullable String);
-  }
-
-  public enum Locale.Category {
-    enum_constant public static final java.util.Locale.Category DISPLAY;
-    enum_constant public static final java.util.Locale.Category FORMAT;
-  }
-
-  public enum Locale.FilteringMode {
-    enum_constant public static final java.util.Locale.FilteringMode AUTOSELECT_FILTERING;
-    enum_constant public static final java.util.Locale.FilteringMode EXTENDED_FILTERING;
-    enum_constant public static final java.util.Locale.FilteringMode IGNORE_EXTENDED_RANGES;
-    enum_constant public static final java.util.Locale.FilteringMode MAP_EXTENDED_RANGES;
-    enum_constant public static final java.util.Locale.FilteringMode REJECT_EXTENDED_RANGES;
-  }
-
-  public static final class Locale.LanguageRange {
-    ctor public Locale.LanguageRange(@NonNull String);
-    ctor public Locale.LanguageRange(@NonNull String, double);
-    method @NonNull public String getRange();
-    method public double getWeight();
-    method @NonNull public static java.util.List<java.util.Locale.LanguageRange> mapEquivalents(@NonNull java.util.List<java.util.Locale.LanguageRange>, @NonNull java.util.Map<java.lang.String,java.util.List<java.lang.String>>);
-    method @NonNull public static java.util.List<java.util.Locale.LanguageRange> parse(@NonNull String);
-    method @NonNull public static java.util.List<java.util.Locale.LanguageRange> parse(@NonNull String, @NonNull java.util.Map<java.lang.String,java.util.List<java.lang.String>>);
-    field public static final double MAX_WEIGHT = 1.0;
-    field public static final double MIN_WEIGHT = 0.0;
-  }
-
-  public class LongSummaryStatistics implements java.util.function.IntConsumer java.util.function.LongConsumer {
-    ctor public LongSummaryStatistics();
-    method public void accept(int);
-    method public void accept(long);
-    method public void combine(java.util.LongSummaryStatistics);
-    method public final double getAverage();
-    method public final long getCount();
-    method public final long getMax();
-    method public final long getMin();
-    method public final long getSum();
-  }
-
-  public interface Map<K, V> {
-    method public void clear();
-    method @Nullable public default V compute(K, @NonNull java.util.function.BiFunction<? super K,? super V,? extends V>);
-    method @Nullable public default V computeIfAbsent(K, @NonNull java.util.function.Function<? super K,? extends V>);
-    method @Nullable public default V computeIfPresent(K, @NonNull java.util.function.BiFunction<? super K,? super V,? extends V>);
-    method public boolean containsKey(@Nullable Object);
-    method public boolean containsValue(@Nullable Object);
-    method @NonNull public static <K, V> java.util.Map.Entry<K,V> entry(@NonNull K, @NonNull V);
-    method @NonNull public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-    method public boolean equals(@Nullable Object);
-    method public default void forEach(@NonNull java.util.function.BiConsumer<? super K,? super V>);
-    method @Nullable public V get(@Nullable Object);
-    method @Nullable public default V getOrDefault(@Nullable Object, @Nullable V);
-    method public int hashCode();
-    method public boolean isEmpty();
-    method @NonNull public java.util.Set<K> keySet();
-    method @Nullable public default V merge(K, @NonNull V, @NonNull java.util.function.BiFunction<? super V,? super V,? extends V>);
-    method @NonNull public static <K, V> java.util.Map<K,V> of();
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull public static <K, V> java.util.Map<K,V> of(@NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V, @NonNull K, @NonNull V);
-    method @NonNull @java.lang.SafeVarargs public static <K, V> java.util.Map<K,V> ofEntries(@NonNull java.util.Map.Entry<? extends K,? extends V>...);
-    method @Nullable public V put(K, V);
-    method public void putAll(@NonNull java.util.Map<? extends K,? extends V>);
-    method @Nullable public default V putIfAbsent(K, V);
-    method @Nullable public V remove(@Nullable Object);
-    method public default boolean remove(@Nullable Object, @Nullable Object);
-    method public default boolean replace(K, @Nullable V, V);
-    method @Nullable public default V replace(K, V);
-    method public default void replaceAll(@NonNull java.util.function.BiFunction<? super K,? super V,? extends V>);
-    method public int size();
-    method @NonNull public java.util.Collection<V> values();
-  }
-
-  public static interface Map.Entry<K, V> {
-    method @NonNull public static <K extends java.lang.Comparable<? super K>, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByKey();
-    method @NonNull public static <K, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByKey(@NonNull java.util.Comparator<? super K>);
-    method @NonNull public static <K, V extends java.lang.Comparable<? super V>> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByValue();
-    method @NonNull public static <K, V> java.util.Comparator<java.util.Map.Entry<K,V>> comparingByValue(@NonNull java.util.Comparator<? super V>);
-    method public boolean equals(@Nullable Object);
-    method public K getKey();
-    method public V getValue();
-    method public int hashCode();
-    method public V setValue(V);
-  }
-
-  public class MissingFormatArgumentException extends java.util.IllegalFormatException {
-    ctor public MissingFormatArgumentException(String);
-    method public String getFormatSpecifier();
-  }
-
-  public class MissingFormatWidthException extends java.util.IllegalFormatException {
-    ctor public MissingFormatWidthException(String);
-    method public String getFormatSpecifier();
-  }
-
-  public class MissingResourceException extends java.lang.RuntimeException {
-    ctor public MissingResourceException(String, String, String);
-    method public String getClassName();
-    method public String getKey();
-  }
-
-  public interface NavigableMap<K, V> extends java.util.SortedMap<K,V> {
-    method @Nullable public java.util.Map.Entry<K,V> ceilingEntry(K);
-    method @Nullable public K ceilingKey(K);
-    method @NonNull public java.util.NavigableSet<K> descendingKeySet();
-    method @NonNull public java.util.NavigableMap<K,V> descendingMap();
-    method @Nullable public java.util.Map.Entry<K,V> firstEntry();
-    method @Nullable public java.util.Map.Entry<K,V> floorEntry(K);
-    method @Nullable public K floorKey(K);
-    method @NonNull public java.util.NavigableMap<K,V> headMap(K, boolean);
-    method @Nullable public java.util.Map.Entry<K,V> higherEntry(K);
-    method @Nullable public K higherKey(K);
-    method @Nullable public java.util.Map.Entry<K,V> lastEntry();
-    method @Nullable public java.util.Map.Entry<K,V> lowerEntry(K);
-    method @Nullable public K lowerKey(K);
-    method @NonNull public java.util.NavigableSet<K> navigableKeySet();
-    method @Nullable public java.util.Map.Entry<K,V> pollFirstEntry();
-    method @Nullable public java.util.Map.Entry<K,V> pollLastEntry();
-    method @NonNull public java.util.NavigableMap<K,V> subMap(K, boolean, K, boolean);
-    method @NonNull public java.util.NavigableMap<K,V> tailMap(K, boolean);
-  }
-
-  public interface NavigableSet<E> extends java.util.SortedSet<E> {
-    method public E ceiling(E);
-    method public java.util.Iterator<E> descendingIterator();
-    method public java.util.NavigableSet<E> descendingSet();
-    method public E floor(E);
-    method public java.util.NavigableSet<E> headSet(E, boolean);
-    method public E higher(E);
-    method public E lower(E);
-    method public E pollFirst();
-    method public E pollLast();
-    method public java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
-    method public java.util.NavigableSet<E> tailSet(E, boolean);
-  }
-
-  public class NoSuchElementException extends java.lang.RuntimeException {
-    ctor public NoSuchElementException();
-    ctor public NoSuchElementException(String);
-  }
-
-  public final class Objects {
-    method public static int checkFromIndexSize(int, int, int);
-    method public static int checkFromToIndex(int, int, int);
-    method public static int checkIndex(int, int);
-    method public static <T> int compare(T, T, @NonNull java.util.Comparator<? super T>);
-    method public static boolean deepEquals(@Nullable Object, @Nullable Object);
-    method public static boolean equals(@Nullable Object, @Nullable Object);
-    method public static int hash(@Nullable java.lang.Object...);
-    method public static int hashCode(@Nullable Object);
-    method public static boolean isNull(@Nullable Object);
-    method public static boolean nonNull(@Nullable Object);
-    method @NonNull public static <T> T requireNonNull(@Nullable T);
-    method @NonNull public static <T> T requireNonNull(@Nullable T, @NonNull String);
-    method @NonNull public static <T> T requireNonNull(@Nullable T, @NonNull java.util.function.Supplier<java.lang.String>);
-    method @NonNull public static <T> T requireNonNullElse(@Nullable T, @NonNull T);
-    method @NonNull public static <T> T requireNonNullElseGet(@Nullable T, @NonNull java.util.function.Supplier<? extends T>);
-    method @NonNull public static String toString(@Nullable Object);
-    method @NonNull public static String toString(@Nullable Object, @NonNull String);
-  }
-
-  public class Observable {
-    ctor public Observable();
-    method public void addObserver(java.util.Observer);
-    method protected void clearChanged();
-    method public int countObservers();
-    method public void deleteObserver(java.util.Observer);
-    method public void deleteObservers();
-    method public boolean hasChanged();
-    method public void notifyObservers();
-    method public void notifyObservers(Object);
-    method protected void setChanged();
-  }
-
-  public interface Observer {
-    method public void update(java.util.Observable, Object);
-  }
-
-  public final class Optional<T> {
-    method public static <T> java.util.Optional<T> empty();
-    method public java.util.Optional<T> filter(java.util.function.Predicate<? super T>);
-    method public <U> java.util.Optional<U> flatMap(java.util.function.Function<? super T,java.util.Optional<U>>);
-    method public T get();
-    method public void ifPresent(java.util.function.Consumer<? super T>);
-    method public boolean isPresent();
-    method public <U> java.util.Optional<U> map(java.util.function.Function<? super T,? extends U>);
-    method public static <T> java.util.Optional<T> of(T);
-    method public static <T> java.util.Optional<T> ofNullable(T);
-    method public T orElse(T);
-    method public T orElseGet(java.util.function.Supplier<? extends T>);
-    method public <X extends java.lang.Throwable> T orElseThrow(java.util.function.Supplier<? extends X>) throws X;
-  }
-
-  public final class OptionalDouble {
-    method public static java.util.OptionalDouble empty();
-    method public double getAsDouble();
-    method public void ifPresent(java.util.function.DoubleConsumer);
-    method public boolean isPresent();
-    method public static java.util.OptionalDouble of(double);
-    method public double orElse(double);
-    method public double orElseGet(java.util.function.DoubleSupplier);
-    method public <X extends java.lang.Throwable> double orElseThrow(java.util.function.Supplier<X>) throws X;
-  }
-
-  public final class OptionalInt {
-    method public static java.util.OptionalInt empty();
-    method public int getAsInt();
-    method public void ifPresent(java.util.function.IntConsumer);
-    method public boolean isPresent();
-    method public static java.util.OptionalInt of(int);
-    method public int orElse(int);
-    method public int orElseGet(java.util.function.IntSupplier);
-    method public <X extends java.lang.Throwable> int orElseThrow(java.util.function.Supplier<X>) throws X;
-  }
-
-  public final class OptionalLong {
-    method public static java.util.OptionalLong empty();
-    method public long getAsLong();
-    method public void ifPresent(java.util.function.LongConsumer);
-    method public boolean isPresent();
-    method public static java.util.OptionalLong of(long);
-    method public long orElse(long);
-    method public long orElseGet(java.util.function.LongSupplier);
-    method public <X extends java.lang.Throwable> long orElseThrow(java.util.function.Supplier<X>) throws X;
-  }
-
-  public interface PrimitiveIterator<T, T_CONS> extends java.util.Iterator<T> {
-    method public void forEachRemaining(T_CONS);
-  }
-
-  public static interface PrimitiveIterator.OfDouble extends java.util.PrimitiveIterator<java.lang.Double,java.util.function.DoubleConsumer> {
-    method public default void forEachRemaining(java.util.function.DoubleConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Double>);
-    method public default Double next();
-    method public double nextDouble();
-  }
-
-  public static interface PrimitiveIterator.OfInt extends java.util.PrimitiveIterator<java.lang.Integer,java.util.function.IntConsumer> {
-    method public default void forEachRemaining(java.util.function.IntConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer>);
-    method public default Integer next();
-    method public int nextInt();
-  }
-
-  public static interface PrimitiveIterator.OfLong extends java.util.PrimitiveIterator<java.lang.Long,java.util.function.LongConsumer> {
-    method public default void forEachRemaining(java.util.function.LongConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Long>);
-    method public default Long next();
-    method public long nextLong();
-  }
-
-  public class PriorityQueue<E> extends java.util.AbstractQueue<E> implements java.io.Serializable {
-    ctor public PriorityQueue();
-    ctor public PriorityQueue(int);
-    ctor public PriorityQueue(java.util.Comparator<? super E>);
-    ctor public PriorityQueue(int, java.util.Comparator<? super E>);
-    ctor public PriorityQueue(java.util.Collection<? extends E>);
-    ctor public PriorityQueue(java.util.PriorityQueue<? extends E>);
-    ctor public PriorityQueue(java.util.SortedSet<? extends E>);
-    method public java.util.Comparator<? super E> comparator();
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public E peek();
-    method public E poll();
-    method public int size();
-    method public final java.util.Spliterator<E> spliterator();
-  }
-
-  public class Properties extends java.util.Hashtable<java.lang.Object,java.lang.Object> {
-    ctor public Properties();
-    ctor public Properties(java.util.Properties);
-    method public String getProperty(String);
-    method public String getProperty(String, String);
-    method public void list(java.io.PrintStream);
-    method public void list(java.io.PrintWriter);
-    method public void load(java.io.Reader) throws java.io.IOException;
-    method public void load(java.io.InputStream) throws java.io.IOException;
-    method public void loadFromXML(java.io.InputStream) throws java.io.IOException, java.util.InvalidPropertiesFormatException;
-    method public java.util.Enumeration<?> propertyNames();
-    method @Deprecated public void save(java.io.OutputStream, String);
-    method public Object setProperty(String, String);
-    method public void store(java.io.Writer, String) throws java.io.IOException;
-    method public void store(java.io.OutputStream, String) throws java.io.IOException;
-    method public void storeToXML(java.io.OutputStream, String) throws java.io.IOException;
-    method public void storeToXML(java.io.OutputStream, String, String) throws java.io.IOException;
-    method public java.util.Set<java.lang.String> stringPropertyNames();
-    field protected java.util.Properties defaults;
-  }
-
-  public final class PropertyPermission extends java.security.BasicPermission {
-    ctor public PropertyPermission(String, String);
-  }
-
-  public class PropertyResourceBundle extends java.util.ResourceBundle {
-    ctor public PropertyResourceBundle(java.io.InputStream) throws java.io.IOException;
-    ctor public PropertyResourceBundle(java.io.Reader) throws java.io.IOException;
-    method public java.util.Enumeration<java.lang.String> getKeys();
-    method public Object handleGetObject(String);
-  }
-
-  public interface Queue<E> extends java.util.Collection<E> {
-    method public E element();
-    method public boolean offer(E);
-    method @Nullable public E peek();
-    method @Nullable public E poll();
-    method public E remove();
-  }
-
-  public class Random implements java.io.Serializable {
-    ctor public Random();
-    ctor public Random(long);
-    method public java.util.stream.DoubleStream doubles(long);
-    method public java.util.stream.DoubleStream doubles();
-    method public java.util.stream.DoubleStream doubles(long, double, double);
-    method public java.util.stream.DoubleStream doubles(double, double);
-    method public java.util.stream.IntStream ints(long);
-    method public java.util.stream.IntStream ints();
-    method public java.util.stream.IntStream ints(long, int, int);
-    method public java.util.stream.IntStream ints(int, int);
-    method public java.util.stream.LongStream longs(long);
-    method public java.util.stream.LongStream longs();
-    method public java.util.stream.LongStream longs(long, long, long);
-    method public java.util.stream.LongStream longs(long, long);
-    method protected int next(int);
-    method public boolean nextBoolean();
-    method public void nextBytes(byte[]);
-    method public double nextDouble();
-    method public float nextFloat();
-    method public double nextGaussian();
-    method public int nextInt();
-    method public int nextInt(int);
-    method public long nextLong();
-    method public void setSeed(long);
-  }
-
-  public interface RandomAccess {
-  }
-
-  public abstract class ResourceBundle {
-    ctor public ResourceBundle();
-    method public static final void clearCache();
-    method public static final void clearCache(ClassLoader);
-    method public boolean containsKey(String);
-    method public String getBaseBundleName();
-    method public static final java.util.ResourceBundle getBundle(String);
-    method public static final java.util.ResourceBundle getBundle(String, java.util.ResourceBundle.Control);
-    method public static final java.util.ResourceBundle getBundle(String, java.util.Locale);
-    method public static final java.util.ResourceBundle getBundle(String, java.util.Locale, java.util.ResourceBundle.Control);
-    method public static java.util.ResourceBundle getBundle(String, java.util.Locale, ClassLoader);
-    method public static java.util.ResourceBundle getBundle(String, java.util.Locale, ClassLoader, java.util.ResourceBundle.Control);
-    method public abstract java.util.Enumeration<java.lang.String> getKeys();
-    method public java.util.Locale getLocale();
-    method public final Object getObject(String);
-    method public final String getString(String);
-    method public final String[] getStringArray(String);
-    method protected abstract Object handleGetObject(String);
-    method protected java.util.Set<java.lang.String> handleKeySet();
-    method public java.util.Set<java.lang.String> keySet();
-    method protected void setParent(java.util.ResourceBundle);
-    field protected java.util.ResourceBundle parent;
-  }
-
-  public static class ResourceBundle.Control {
-    ctor protected ResourceBundle.Control();
-    method public java.util.List<java.util.Locale> getCandidateLocales(String, java.util.Locale);
-    method public static final java.util.ResourceBundle.Control getControl(java.util.List<java.lang.String>);
-    method public java.util.Locale getFallbackLocale(String, java.util.Locale);
-    method public java.util.List<java.lang.String> getFormats(String);
-    method public static final java.util.ResourceBundle.Control getNoFallbackControl(java.util.List<java.lang.String>);
-    method public long getTimeToLive(String, java.util.Locale);
-    method public boolean needsReload(String, java.util.Locale, String, ClassLoader, java.util.ResourceBundle, long);
-    method public java.util.ResourceBundle newBundle(String, java.util.Locale, String, ClassLoader, boolean) throws java.io.IOException, java.lang.IllegalAccessException, java.lang.InstantiationException;
-    method public String toBundleName(String, java.util.Locale);
-    method public final String toResourceName(String, String);
-    field public static final java.util.List<java.lang.String> FORMAT_CLASS;
-    field public static final java.util.List<java.lang.String> FORMAT_DEFAULT;
-    field public static final java.util.List<java.lang.String> FORMAT_PROPERTIES;
-    field public static final long TTL_DONT_CACHE = -1L; // 0xffffffffffffffffL
-    field public static final long TTL_NO_EXPIRATION_CONTROL = -2L; // 0xfffffffffffffffeL
-  }
-
-  public final class Scanner implements java.io.Closeable java.util.Iterator<java.lang.String> {
-    ctor public Scanner(Readable);
-    ctor public Scanner(java.io.InputStream);
-    ctor public Scanner(java.io.InputStream, String);
-    ctor public Scanner(java.io.File) throws java.io.FileNotFoundException;
-    ctor public Scanner(java.io.File, String) throws java.io.FileNotFoundException;
-    ctor public Scanner(java.nio.file.Path) throws java.io.IOException;
-    ctor public Scanner(java.nio.file.Path, String) throws java.io.IOException;
-    ctor public Scanner(String);
-    ctor public Scanner(java.nio.channels.ReadableByteChannel);
-    ctor public Scanner(java.nio.channels.ReadableByteChannel, String);
-    method public void close();
-    method public java.util.regex.Pattern delimiter();
-    method public String findInLine(String);
-    method public String findInLine(java.util.regex.Pattern);
-    method public String findWithinHorizon(String, int);
-    method public String findWithinHorizon(java.util.regex.Pattern, int);
-    method public boolean hasNext();
-    method public boolean hasNext(String);
-    method public boolean hasNext(java.util.regex.Pattern);
-    method public boolean hasNextBigDecimal();
-    method public boolean hasNextBigInteger();
-    method public boolean hasNextBigInteger(int);
-    method public boolean hasNextBoolean();
-    method public boolean hasNextByte();
-    method public boolean hasNextByte(int);
-    method public boolean hasNextDouble();
-    method public boolean hasNextFloat();
-    method public boolean hasNextInt();
-    method public boolean hasNextInt(int);
-    method public boolean hasNextLine();
-    method public boolean hasNextLong();
-    method public boolean hasNextLong(int);
-    method public boolean hasNextShort();
-    method public boolean hasNextShort(int);
-    method public java.io.IOException ioException();
-    method public java.util.Locale locale();
-    method public java.util.regex.MatchResult match();
-    method public String next();
-    method public String next(String);
-    method public String next(java.util.regex.Pattern);
-    method public java.math.BigDecimal nextBigDecimal();
-    method public java.math.BigInteger nextBigInteger();
-    method public java.math.BigInteger nextBigInteger(int);
-    method public boolean nextBoolean();
-    method public byte nextByte();
-    method public byte nextByte(int);
-    method public double nextDouble();
-    method public float nextFloat();
-    method public int nextInt();
-    method public int nextInt(int);
-    method public String nextLine();
-    method public long nextLong();
-    method public long nextLong(int);
-    method public short nextShort();
-    method public short nextShort(int);
-    method public int radix();
-    method public java.util.Scanner reset();
-    method public java.util.Scanner skip(java.util.regex.Pattern);
-    method public java.util.Scanner skip(String);
-    method public java.util.Scanner useDelimiter(java.util.regex.Pattern);
-    method public java.util.Scanner useDelimiter(String);
-    method public java.util.Scanner useLocale(java.util.Locale);
-    method public java.util.Scanner useRadix(int);
-  }
-
-  public class ServiceConfigurationError extends java.lang.Error {
-    ctor public ServiceConfigurationError(String);
-    ctor public ServiceConfigurationError(String, Throwable);
-  }
-
-  public final class ServiceLoader<S> implements java.lang.Iterable<S> {
-    method public java.util.Iterator<S> iterator();
-    method public static <S> java.util.ServiceLoader<S> load(Class<S>, ClassLoader);
-    method public static <S> java.util.ServiceLoader<S> load(Class<S>);
-    method public static <S> java.util.ServiceLoader<S> loadInstalled(Class<S>);
-    method public void reload();
-  }
-
-  public interface Set<E> extends java.util.Collection<E> {
-    method @NonNull public static <E> java.util.Set<E> of();
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull public static <E> java.util.Set<E> of(@NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E, @NonNull E);
-    method @NonNull @java.lang.SafeVarargs public static <E> java.util.Set<E> of(@NonNull E...);
-  }
-
-  public class SimpleTimeZone extends java.util.TimeZone {
-    ctor public SimpleTimeZone(int, String);
-    ctor public SimpleTimeZone(int, String, int, int, int, int, int, int, int, int);
-    ctor public SimpleTimeZone(int, String, int, int, int, int, int, int, int, int, int);
-    ctor public SimpleTimeZone(int, String, int, int, int, int, int, int, int, int, int, int, int);
-    method public int getOffset(int, int, int, int, int, int);
-    method public int getRawOffset();
-    method public boolean inDaylightTime(java.util.Date);
-    method public void setDSTSavings(int);
-    method public void setEndRule(int, int, int, int);
-    method public void setEndRule(int, int, int);
-    method public void setEndRule(int, int, int, int, boolean);
-    method public void setRawOffset(int);
-    method public void setStartRule(int, int, int, int);
-    method public void setStartRule(int, int, int);
-    method public void setStartRule(int, int, int, int, boolean);
-    method public void setStartYear(int);
-    method public boolean useDaylightTime();
-    field public static final int STANDARD_TIME = 1; // 0x1
-    field public static final int UTC_TIME = 2; // 0x2
-    field public static final int WALL_TIME = 0; // 0x0
-  }
-
-  public interface SortedMap<K, V> extends java.util.Map<K,V> {
-    method @Nullable public java.util.Comparator<? super K> comparator();
-    method public K firstKey();
-    method @NonNull public java.util.SortedMap<K,V> headMap(K);
-    method public K lastKey();
-    method @NonNull public java.util.SortedMap<K,V> subMap(K, K);
-    method @NonNull public java.util.SortedMap<K,V> tailMap(K);
-  }
-
-  public interface SortedSet<E> extends java.util.Set<E> {
-    method public java.util.Comparator<? super E> comparator();
-    method public E first();
-    method public java.util.SortedSet<E> headSet(E);
-    method public E last();
-    method public java.util.SortedSet<E> subSet(E, E);
-    method public java.util.SortedSet<E> tailSet(E);
-  }
-
-  public interface Spliterator<T> {
-    method public int characteristics();
-    method public long estimateSize();
-    method public default void forEachRemaining(java.util.function.Consumer<? super T>);
-    method public default java.util.Comparator<? super T> getComparator();
-    method public default long getExactSizeIfKnown();
-    method public default boolean hasCharacteristics(int);
-    method public boolean tryAdvance(java.util.function.Consumer<? super T>);
-    method public java.util.Spliterator<T> trySplit();
-    field public static final int CONCURRENT = 4096; // 0x1000
-    field public static final int DISTINCT = 1; // 0x1
-    field public static final int IMMUTABLE = 1024; // 0x400
-    field public static final int NONNULL = 256; // 0x100
-    field public static final int ORDERED = 16; // 0x10
-    field public static final int SIZED = 64; // 0x40
-    field public static final int SORTED = 4; // 0x4
-    field public static final int SUBSIZED = 16384; // 0x4000
-  }
-
-  public static interface Spliterator.OfDouble extends java.util.Spliterator.OfPrimitive<java.lang.Double,java.util.function.DoubleConsumer,java.util.Spliterator.OfDouble> {
-    method public default void forEachRemaining(java.util.function.DoubleConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Double>);
-    method public boolean tryAdvance(java.util.function.DoubleConsumer);
-    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Double>);
-    method public java.util.Spliterator.OfDouble trySplit();
-  }
-
-  public static interface Spliterator.OfInt extends java.util.Spliterator.OfPrimitive<java.lang.Integer,java.util.function.IntConsumer,java.util.Spliterator.OfInt> {
-    method public default void forEachRemaining(java.util.function.IntConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer>);
-    method public boolean tryAdvance(java.util.function.IntConsumer);
-    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Integer>);
-    method public java.util.Spliterator.OfInt trySplit();
-  }
-
-  public static interface Spliterator.OfLong extends java.util.Spliterator.OfPrimitive<java.lang.Long,java.util.function.LongConsumer,java.util.Spliterator.OfLong> {
-    method public default void forEachRemaining(java.util.function.LongConsumer);
-    method public default void forEachRemaining(java.util.function.Consumer<? super java.lang.Long>);
-    method public boolean tryAdvance(java.util.function.LongConsumer);
-    method public default boolean tryAdvance(java.util.function.Consumer<? super java.lang.Long>);
-    method public java.util.Spliterator.OfLong trySplit();
-  }
-
-  public static interface Spliterator.OfPrimitive<T, T_CONS, T_SPLITR extends java.util.Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> extends java.util.Spliterator<T> {
-    method public default void forEachRemaining(T_CONS);
-    method public boolean tryAdvance(T_CONS);
-    method public T_SPLITR trySplit();
-  }
-
-  public final class Spliterators {
-    method public static java.util.Spliterator.OfDouble emptyDoubleSpliterator();
-    method public static java.util.Spliterator.OfInt emptyIntSpliterator();
-    method public static java.util.Spliterator.OfLong emptyLongSpliterator();
-    method public static <T> java.util.Spliterator<T> emptySpliterator();
-    method public static <T> java.util.Iterator<T> iterator(java.util.Spliterator<? extends T>);
-    method public static java.util.PrimitiveIterator.OfInt iterator(java.util.Spliterator.OfInt);
-    method public static java.util.PrimitiveIterator.OfLong iterator(java.util.Spliterator.OfLong);
-    method public static java.util.PrimitiveIterator.OfDouble iterator(java.util.Spliterator.OfDouble);
-    method public static <T> java.util.Spliterator<T> spliterator(Object[], int);
-    method public static <T> java.util.Spliterator<T> spliterator(Object[], int, int, int);
-    method public static java.util.Spliterator.OfInt spliterator(int[], int);
-    method public static java.util.Spliterator.OfInt spliterator(int[], int, int, int);
-    method public static java.util.Spliterator.OfLong spliterator(long[], int);
-    method public static java.util.Spliterator.OfLong spliterator(long[], int, int, int);
-    method public static java.util.Spliterator.OfDouble spliterator(double[], int);
-    method public static java.util.Spliterator.OfDouble spliterator(double[], int, int, int);
-    method public static <T> java.util.Spliterator<T> spliterator(java.util.Collection<? extends T>, int);
-    method public static <T> java.util.Spliterator<T> spliterator(java.util.Iterator<? extends T>, long, int);
-    method public static java.util.Spliterator.OfInt spliterator(java.util.PrimitiveIterator.OfInt, long, int);
-    method public static java.util.Spliterator.OfLong spliterator(java.util.PrimitiveIterator.OfLong, long, int);
-    method public static java.util.Spliterator.OfDouble spliterator(java.util.PrimitiveIterator.OfDouble, long, int);
-    method public static <T> java.util.Spliterator<T> spliteratorUnknownSize(java.util.Iterator<? extends T>, int);
-    method public static java.util.Spliterator.OfInt spliteratorUnknownSize(java.util.PrimitiveIterator.OfInt, int);
-    method public static java.util.Spliterator.OfLong spliteratorUnknownSize(java.util.PrimitiveIterator.OfLong, int);
-    method public static java.util.Spliterator.OfDouble spliteratorUnknownSize(java.util.PrimitiveIterator.OfDouble, int);
-  }
-
-  public abstract static class Spliterators.AbstractDoubleSpliterator implements java.util.Spliterator.OfDouble {
-    ctor protected Spliterators.AbstractDoubleSpliterator(long, int);
-    method public int characteristics();
-    method public long estimateSize();
-    method public java.util.Spliterator.OfDouble trySplit();
-  }
-
-  public abstract static class Spliterators.AbstractIntSpliterator implements java.util.Spliterator.OfInt {
-    ctor protected Spliterators.AbstractIntSpliterator(long, int);
-    method public int characteristics();
-    method public long estimateSize();
-    method public java.util.Spliterator.OfInt trySplit();
-  }
-
-  public abstract static class Spliterators.AbstractLongSpliterator implements java.util.Spliterator.OfLong {
-    ctor protected Spliterators.AbstractLongSpliterator(long, int);
-    method public int characteristics();
-    method public long estimateSize();
-    method public java.util.Spliterator.OfLong trySplit();
-  }
-
-  public abstract static class Spliterators.AbstractSpliterator<T> implements java.util.Spliterator<T> {
-    ctor protected Spliterators.AbstractSpliterator(long, int);
-    method public int characteristics();
-    method public long estimateSize();
-    method public java.util.Spliterator<T> trySplit();
-  }
-
-  public final class SplittableRandom {
-    ctor public SplittableRandom(long);
-    ctor public SplittableRandom();
-    method public java.util.stream.DoubleStream doubles(long);
-    method public java.util.stream.DoubleStream doubles();
-    method public java.util.stream.DoubleStream doubles(long, double, double);
-    method public java.util.stream.DoubleStream doubles(double, double);
-    method public java.util.stream.IntStream ints(long);
-    method public java.util.stream.IntStream ints();
-    method public java.util.stream.IntStream ints(long, int, int);
-    method public java.util.stream.IntStream ints(int, int);
-    method public java.util.stream.LongStream longs(long);
-    method public java.util.stream.LongStream longs();
-    method public java.util.stream.LongStream longs(long, long, long);
-    method public java.util.stream.LongStream longs(long, long);
-    method public boolean nextBoolean();
-    method public double nextDouble();
-    method public double nextDouble(double);
-    method public double nextDouble(double, double);
-    method public int nextInt();
-    method public int nextInt(int);
-    method public int nextInt(int, int);
-    method public long nextLong();
-    method public long nextLong(long);
-    method public long nextLong(long, long);
-    method public java.util.SplittableRandom split();
-  }
-
-  public class Stack<E> extends java.util.Vector<E> {
-    ctor public Stack();
-    method public boolean empty();
-    method public E peek();
-    method public E pop();
-    method public E push(E);
-    method public int search(Object);
-  }
-
-  public final class StringJoiner {
-    ctor public StringJoiner(CharSequence);
-    ctor public StringJoiner(CharSequence, CharSequence, CharSequence);
-    method public java.util.StringJoiner add(CharSequence);
-    method public int length();
-    method public java.util.StringJoiner merge(java.util.StringJoiner);
-    method public java.util.StringJoiner setEmptyValue(CharSequence);
-  }
-
-  public class StringTokenizer implements java.util.Enumeration<java.lang.Object> {
-    ctor public StringTokenizer(String, String, boolean);
-    ctor public StringTokenizer(String, String);
-    ctor public StringTokenizer(String);
-    method public int countTokens();
-    method public boolean hasMoreElements();
-    method public boolean hasMoreTokens();
-    method public Object nextElement();
-    method public String nextToken();
-    method public String nextToken(String);
-  }
-
-  public abstract class TimeZone implements java.lang.Cloneable java.io.Serializable {
-    ctor public TimeZone();
-    method public Object clone();
-    method public static String[] getAvailableIDs(int);
-    method public static String[] getAvailableIDs();
-    method public int getDSTSavings();
-    method public static java.util.TimeZone getDefault();
-    method public final String getDisplayName();
-    method public final String getDisplayName(java.util.Locale);
-    method public final String getDisplayName(boolean, int);
-    method public String getDisplayName(boolean, int, java.util.Locale);
-    method public String getID();
-    method public abstract int getOffset(int, int, int, int, int, int);
-    method public int getOffset(long);
-    method public abstract int getRawOffset();
-    method public static java.util.TimeZone getTimeZone(String);
-    method public static java.util.TimeZone getTimeZone(java.time.ZoneId);
-    method public boolean hasSameRules(java.util.TimeZone);
-    method public abstract boolean inDaylightTime(java.util.Date);
-    method public boolean observesDaylightTime();
-    method public static void setDefault(java.util.TimeZone);
-    method public void setID(String);
-    method public abstract void setRawOffset(int);
-    method public java.time.ZoneId toZoneId();
-    method public abstract boolean useDaylightTime();
-    field public static final int LONG = 1; // 0x1
-    field public static final int SHORT = 0; // 0x0
-  }
-
-  public class Timer {
-    ctor public Timer();
-    ctor public Timer(boolean);
-    ctor public Timer(String);
-    ctor public Timer(String, boolean);
-    method public void cancel();
-    method public int purge();
-    method public void schedule(java.util.TimerTask, long);
-    method public void schedule(java.util.TimerTask, java.util.Date);
-    method public void schedule(java.util.TimerTask, long, long);
-    method public void schedule(java.util.TimerTask, java.util.Date, long);
-    method public void scheduleAtFixedRate(java.util.TimerTask, long, long);
-    method public void scheduleAtFixedRate(java.util.TimerTask, java.util.Date, long);
-  }
-
-  public abstract class TimerTask implements java.lang.Runnable {
-    ctor protected TimerTask();
-    method public boolean cancel();
-    method public long scheduledExecutionTime();
-  }
-
-  public class TooManyListenersException extends java.lang.Exception {
-    ctor public TooManyListenersException();
-    ctor public TooManyListenersException(String);
-  }
-
-  public class TreeMap<K, V> extends java.util.AbstractMap<K,V> implements java.lang.Cloneable java.util.NavigableMap<K,V> java.io.Serializable {
-    ctor public TreeMap();
-    ctor public TreeMap(@Nullable java.util.Comparator<? super K>);
-    ctor public TreeMap(@NonNull java.util.Map<? extends K,? extends V>);
-    ctor public TreeMap(@NonNull java.util.SortedMap<K,? extends V>);
-    method @Nullable public java.util.Map.Entry<K,V> ceilingEntry(K);
-    method @Nullable public K ceilingKey(K);
-    method @NonNull public Object clone();
-    method @Nullable public java.util.Comparator<? super K> comparator();
-    method @NonNull public java.util.NavigableSet<K> descendingKeySet();
-    method @NonNull public java.util.NavigableMap<K,V> descendingMap();
-    method @NonNull public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-    method @Nullable public java.util.Map.Entry<K,V> firstEntry();
-    method public K firstKey();
-    method @Nullable public java.util.Map.Entry<K,V> floorEntry(K);
-    method @Nullable public K floorKey(K);
-    method @NonNull public java.util.NavigableMap<K,V> headMap(K, boolean);
-    method @NonNull public java.util.SortedMap<K,V> headMap(K);
-    method @Nullable public java.util.Map.Entry<K,V> higherEntry(K);
-    method @Nullable public K higherKey(K);
-    method @Nullable public java.util.Map.Entry<K,V> lastEntry();
-    method public K lastKey();
-    method @Nullable public java.util.Map.Entry<K,V> lowerEntry(K);
-    method @Nullable public K lowerKey(K);
-    method @NonNull public java.util.NavigableSet<K> navigableKeySet();
-    method @Nullable public java.util.Map.Entry<K,V> pollFirstEntry();
-    method @Nullable public java.util.Map.Entry<K,V> pollLastEntry();
-    method @NonNull public java.util.NavigableMap<K,V> subMap(K, boolean, K, boolean);
-    method @NonNull public java.util.SortedMap<K,V> subMap(K, K);
-    method @NonNull public java.util.NavigableMap<K,V> tailMap(K, boolean);
-    method @NonNull public java.util.SortedMap<K,V> tailMap(K);
-  }
-
-  public class TreeSet<E> extends java.util.AbstractSet<E> implements java.lang.Cloneable java.util.NavigableSet<E> java.io.Serializable {
-    ctor public TreeSet();
-    ctor public TreeSet(java.util.Comparator<? super E>);
-    ctor public TreeSet(java.util.Collection<? extends E>);
-    ctor public TreeSet(java.util.SortedSet<E>);
-    method public E ceiling(E);
-    method public Object clone();
-    method public java.util.Comparator<? super E> comparator();
-    method public java.util.Iterator<E> descendingIterator();
-    method public java.util.NavigableSet<E> descendingSet();
-    method public E first();
-    method public E floor(E);
-    method public java.util.NavigableSet<E> headSet(E, boolean);
-    method public java.util.SortedSet<E> headSet(E);
-    method public E higher(E);
-    method public java.util.Iterator<E> iterator();
-    method public E last();
-    method public E lower(E);
-    method public E pollFirst();
-    method public E pollLast();
-    method public int size();
-    method public java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
-    method public java.util.SortedSet<E> subSet(E, E);
-    method public java.util.NavigableSet<E> tailSet(E, boolean);
-    method public java.util.SortedSet<E> tailSet(E);
-  }
-
-  public final class UUID implements java.lang.Comparable<java.util.UUID> java.io.Serializable {
-    ctor public UUID(long, long);
-    method public int clockSequence();
-    method public int compareTo(java.util.UUID);
-    method public static java.util.UUID fromString(String);
-    method public long getLeastSignificantBits();
-    method public long getMostSignificantBits();
-    method public static java.util.UUID nameUUIDFromBytes(byte[]);
-    method public long node();
-    method public static java.util.UUID randomUUID();
-    method public long timestamp();
-    method public int variant();
-    method public int version();
-  }
-
-  public class UnknownFormatConversionException extends java.util.IllegalFormatException {
-    ctor public UnknownFormatConversionException(String);
-    method public String getConversion();
-  }
-
-  public class UnknownFormatFlagsException extends java.util.IllegalFormatException {
-    ctor public UnknownFormatFlagsException(String);
-    method public String getFlags();
-  }
-
-  public class Vector<E> extends java.util.AbstractList<E> implements java.lang.Cloneable java.util.List<E> java.util.RandomAccess java.io.Serializable {
-    ctor public Vector(int, int);
-    ctor public Vector(int);
-    ctor public Vector();
-    ctor public Vector(@NonNull java.util.Collection<? extends E>);
-    method public void addElement(E);
-    method public int capacity();
-    method @NonNull public Object clone();
-    method public void copyInto(@NonNull Object[]);
-    method public E elementAt(int);
-    method @NonNull public java.util.Enumeration<E> elements();
-    method public void ensureCapacity(int);
-    method public E firstElement();
-    method public void forEach(@NonNull java.util.function.Consumer<? super E>);
-    method public E get(int);
-    method public int indexOf(@Nullable Object, int);
-    method public void insertElementAt(E, int);
-    method public E lastElement();
-    method public int lastIndexOf(@Nullable Object, int);
-    method public void removeAllElements();
-    method public boolean removeElement(@Nullable Object);
-    method public void removeElementAt(int);
-    method public void setElementAt(E, int);
-    method public void setSize(int);
-    method public int size();
-    method public void trimToSize();
-    field protected int capacityIncrement;
-    field protected int elementCount;
-    field @NonNull protected Object[] elementData;
-  }
-
-  public class WeakHashMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.Map<K,V> {
-    ctor public WeakHashMap(int, float);
-    ctor public WeakHashMap(int);
-    ctor public WeakHashMap();
-    ctor public WeakHashMap(@NonNull java.util.Map<? extends K,? extends V>);
-    method @NonNull public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-  }
-
-}
-
-package java.util.concurrent {
-
-  public abstract class AbstractExecutorService implements java.util.concurrent.ExecutorService {
-    ctor public AbstractExecutorService();
-    method public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.lang.InterruptedException;
-    method public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor(Runnable, T);
-    method protected <T> java.util.concurrent.RunnableFuture<T> newTaskFor(java.util.concurrent.Callable<T>);
-    method public java.util.concurrent.Future<?> submit(Runnable);
-    method public <T> java.util.concurrent.Future<T> submit(Runnable, T);
-    method public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T>);
-  }
-
-  public class ArrayBlockingQueue<E> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E> java.io.Serializable {
-    ctor public ArrayBlockingQueue(int);
-    ctor public ArrayBlockingQueue(int, boolean);
-    ctor public ArrayBlockingQueue(int, boolean, java.util.Collection<? extends E>);
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E peek();
-    method public E poll();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void put(E) throws java.lang.InterruptedException;
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public interface BlockingDeque<E> extends java.util.concurrent.BlockingQueue<E> java.util.Deque<E> {
-    method public boolean offerFirst(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean offerLast(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E pollFirst(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E pollLast(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void putFirst(E) throws java.lang.InterruptedException;
-    method public void putLast(E) throws java.lang.InterruptedException;
-    method public E takeFirst() throws java.lang.InterruptedException;
-    method public E takeLast() throws java.lang.InterruptedException;
-  }
-
-  public interface BlockingQueue<E> extends java.util.Queue<E> {
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void put(E) throws java.lang.InterruptedException;
-    method public int remainingCapacity();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public class BrokenBarrierException extends java.lang.Exception {
-    ctor public BrokenBarrierException();
-    ctor public BrokenBarrierException(String);
-  }
-
-  @java.lang.FunctionalInterface public interface Callable<V> {
-    method public V call() throws java.lang.Exception;
-  }
-
-  public class CancellationException extends java.lang.IllegalStateException {
-    ctor public CancellationException();
-    ctor public CancellationException(String);
-  }
-
-  public class CompletableFuture<T> implements java.util.concurrent.CompletionStage<T> java.util.concurrent.Future<T> {
-    ctor public CompletableFuture();
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
-    method public static java.util.concurrent.CompletableFuture<java.lang.Void> allOf(java.util.concurrent.CompletableFuture<?>...);
-    method public static java.util.concurrent.CompletableFuture<java.lang.Object> anyOf(java.util.concurrent.CompletableFuture<?>...);
-    method public <U> java.util.concurrent.CompletableFuture<U> applyToEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>, java.util.concurrent.Executor);
-    method public boolean cancel(boolean);
-    method public boolean complete(T);
-    method public boolean completeExceptionally(Throwable);
-    method public static <U> java.util.concurrent.CompletableFuture<U> completedFuture(U);
-    method public java.util.concurrent.CompletableFuture<T> exceptionally(java.util.function.Function<java.lang.Throwable,? extends T>);
-    method public T get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public T get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public T getNow(T);
-    method public int getNumberOfDependents();
-    method public <U> java.util.concurrent.CompletableFuture<U> handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>, java.util.concurrent.Executor);
-    method public boolean isCancelled();
-    method public boolean isCompletedExceptionally();
-    method public boolean isDone();
-    method public T join();
-    method public void obtrudeException(Throwable);
-    method public void obtrudeValue(T);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, Runnable, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, Runnable, java.util.concurrent.Executor);
-    method public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(Runnable);
-    method public static java.util.concurrent.CompletableFuture<java.lang.Void> runAsync(Runnable, java.util.concurrent.Executor);
-    method public static <U> java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U>);
-    method public static <U> java.util.concurrent.CompletableFuture<U> supplyAsync(java.util.function.Supplier<U>, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAccept(java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>);
-    method public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>);
-    method public <U> java.util.concurrent.CompletableFuture<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenApply(java.util.function.Function<? super T,? extends U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U>);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenApplyAsync(java.util.function.Function<? super T,? extends U>, java.util.concurrent.Executor);
-    method public <U, V> java.util.concurrent.CompletableFuture<V> thenCombine(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>);
-    method public <U, V> java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>);
-    method public <U, V> java.util.concurrent.CompletableFuture<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenCompose(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>);
-    method public <U> java.util.concurrent.CompletableFuture<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRun(Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(Runnable);
-    method public java.util.concurrent.CompletableFuture<java.lang.Void> thenRunAsync(Runnable, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletableFuture<T> toCompletableFuture();
-    method public java.util.concurrent.CompletableFuture<T> whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>);
-    method public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>);
-    method public java.util.concurrent.CompletableFuture<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>, java.util.concurrent.Executor);
-  }
-
-  public static interface CompletableFuture.AsynchronousCompletionTask {
-  }
-
-  public class CompletionException extends java.lang.RuntimeException {
-    ctor protected CompletionException();
-    ctor protected CompletionException(String);
-    ctor public CompletionException(String, Throwable);
-    ctor public CompletionException(Throwable);
-  }
-
-  public interface CompletionService<V> {
-    method public java.util.concurrent.Future<V> poll();
-    method public java.util.concurrent.Future<V> poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public java.util.concurrent.Future<V> submit(java.util.concurrent.Callable<V>);
-    method public java.util.concurrent.Future<V> submit(Runnable, V);
-    method public java.util.concurrent.Future<V> take() throws java.lang.InterruptedException;
-  }
-
-  public interface CompletionStage<T> {
-    method public java.util.concurrent.CompletionStage<java.lang.Void> acceptEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> acceptEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletionStage<U> applyToEither(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>);
-    method public <U> java.util.concurrent.CompletionStage<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>);
-    method public <U> java.util.concurrent.CompletionStage<U> applyToEitherAsync(java.util.concurrent.CompletionStage<? extends T>, java.util.function.Function<? super T,U>, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletionStage<T> exceptionally(java.util.function.Function<java.lang.Throwable,? extends T>);
-    method public <U> java.util.concurrent.CompletionStage<U> handle(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>);
-    method public <U> java.util.concurrent.CompletionStage<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>);
-    method public <U> java.util.concurrent.CompletionStage<U> handleAsync(java.util.function.BiFunction<? super T,java.lang.Throwable,? extends U>, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterBoth(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterBothAsync(java.util.concurrent.CompletionStage<?>, Runnable, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterEither(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> runAfterEitherAsync(java.util.concurrent.CompletionStage<?>, Runnable, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenAccept(java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptAsync(java.util.function.Consumer<? super T>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBoth(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>);
-    method public <U> java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>);
-    method public <U> java.util.concurrent.CompletionStage<java.lang.Void> thenAcceptBothAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiConsumer<? super T,? super U>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletionStage<U> thenApply(java.util.function.Function<? super T,? extends U>);
-    method public <U> java.util.concurrent.CompletionStage<U> thenApplyAsync(java.util.function.Function<? super T,? extends U>);
-    method public <U> java.util.concurrent.CompletionStage<U> thenApplyAsync(java.util.function.Function<? super T,? extends U>, java.util.concurrent.Executor);
-    method public <U, V> java.util.concurrent.CompletionStage<V> thenCombine(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>);
-    method public <U, V> java.util.concurrent.CompletionStage<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>);
-    method public <U, V> java.util.concurrent.CompletionStage<V> thenCombineAsync(java.util.concurrent.CompletionStage<? extends U>, java.util.function.BiFunction<? super T,? super U,? extends V>, java.util.concurrent.Executor);
-    method public <U> java.util.concurrent.CompletionStage<U> thenCompose(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>);
-    method public <U> java.util.concurrent.CompletionStage<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>);
-    method public <U> java.util.concurrent.CompletionStage<U> thenComposeAsync(java.util.function.Function<? super T,? extends java.util.concurrent.CompletionStage<U>>, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenRun(Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenRunAsync(Runnable);
-    method public java.util.concurrent.CompletionStage<java.lang.Void> thenRunAsync(Runnable, java.util.concurrent.Executor);
-    method public java.util.concurrent.CompletableFuture<T> toCompletableFuture();
-    method public java.util.concurrent.CompletionStage<T> whenComplete(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>);
-    method public java.util.concurrent.CompletionStage<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>);
-    method public java.util.concurrent.CompletionStage<T> whenCompleteAsync(java.util.function.BiConsumer<? super T,? super java.lang.Throwable>, java.util.concurrent.Executor);
-  }
-
-  public class ConcurrentHashMap<K, V> extends java.util.AbstractMap<K,V> implements java.util.concurrent.ConcurrentMap<K,V> java.io.Serializable {
-    ctor public ConcurrentHashMap();
-    ctor public ConcurrentHashMap(int);
-    ctor public ConcurrentHashMap(@NonNull java.util.Map<? extends K,? extends V>);
-    ctor public ConcurrentHashMap(int, float);
-    ctor public ConcurrentHashMap(int, float, int);
-    method public boolean contains(@NonNull Object);
-    method @NonNull public java.util.Enumeration<V> elements();
-    method @NonNull public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-    method public void forEach(long, @NonNull java.util.function.BiConsumer<? super K,? super V>);
-    method public <U> void forEach(long, @NonNull java.util.function.BiFunction<? super K,? super V,? extends U>, @NonNull java.util.function.Consumer<? super U>);
-    method public void forEachEntry(long, @NonNull java.util.function.Consumer<? super java.util.Map.Entry<K,V>>);
-    method public <U> void forEachEntry(long, @NonNull java.util.function.Function<java.util.Map.Entry<K,V>,? extends U>, @NonNull java.util.function.Consumer<? super U>);
-    method public void forEachKey(long, @NonNull java.util.function.Consumer<? super K>);
-    method public <U> void forEachKey(long, @NonNull java.util.function.Function<? super K,? extends U>, @NonNull java.util.function.Consumer<? super U>);
-    method public void forEachValue(long, @NonNull java.util.function.Consumer<? super V>);
-    method public <U> void forEachValue(long, @NonNull java.util.function.Function<? super V,? extends U>, @NonNull java.util.function.Consumer<? super U>);
-    method @NonNull public java.util.concurrent.ConcurrentHashMap.KeySetView<K,V> keySet(@NonNull V);
-    method @NonNull public java.util.Enumeration<K> keys();
-    method public long mappingCount();
-    method @NonNull public static <K> java.util.concurrent.ConcurrentHashMap.KeySetView<K,java.lang.Boolean> newKeySet();
-    method @NonNull public static <K> java.util.concurrent.ConcurrentHashMap.KeySetView<K,java.lang.Boolean> newKeySet(int);
-    method @Nullable public <U> U reduce(long, @NonNull java.util.function.BiFunction<? super K,? super V,? extends U>, @NonNull java.util.function.BiFunction<? super U,? super U,? extends U>);
-    method @Nullable public java.util.Map.Entry<K,V> reduceEntries(long, @NonNull java.util.function.BiFunction<java.util.Map.Entry<K,V>,java.util.Map.Entry<K,V>,? extends java.util.Map.Entry<K,V>>);
-    method @Nullable public <U> U reduceEntries(long, @NonNull java.util.function.Function<java.util.Map.Entry<K,V>,? extends U>, @NonNull java.util.function.BiFunction<? super U,? super U,? extends U>);
-    method public double reduceEntriesToDouble(long, @NonNull java.util.function.ToDoubleFunction<java.util.Map.Entry<K,V>>, double, @NonNull java.util.function.DoubleBinaryOperator);
-    method public int reduceEntriesToInt(long, @NonNull java.util.function.ToIntFunction<java.util.Map.Entry<K,V>>, int, @NonNull java.util.function.IntBinaryOperator);
-    method public long reduceEntriesToLong(long, @NonNull java.util.function.ToLongFunction<java.util.Map.Entry<K,V>>, long, @NonNull java.util.function.LongBinaryOperator);
-    method @Nullable public K reduceKeys(long, @NonNull java.util.function.BiFunction<? super K,? super K,? extends K>);
-    method @Nullable public <U> U reduceKeys(long, @NonNull java.util.function.Function<? super K,? extends U>, @NonNull java.util.function.BiFunction<? super U,? super U,? extends U>);
-    method public double reduceKeysToDouble(long, @NonNull java.util.function.ToDoubleFunction<? super K>, double, @NonNull java.util.function.DoubleBinaryOperator);
-    method public int reduceKeysToInt(long, @NonNull java.util.function.ToIntFunction<? super K>, int, @NonNull java.util.function.IntBinaryOperator);
-    method public long reduceKeysToLong(long, @NonNull java.util.function.ToLongFunction<? super K>, long, @NonNull java.util.function.LongBinaryOperator);
-    method public double reduceToDouble(long, @NonNull java.util.function.ToDoubleBiFunction<? super K,? super V>, double, @NonNull java.util.function.DoubleBinaryOperator);
-    method public int reduceToInt(long, @NonNull java.util.function.ToIntBiFunction<? super K,? super V>, int, @NonNull java.util.function.IntBinaryOperator);
-    method public long reduceToLong(long, @NonNull java.util.function.ToLongBiFunction<? super K,? super V>, long, @NonNull java.util.function.LongBinaryOperator);
-    method @Nullable public V reduceValues(long, @NonNull java.util.function.BiFunction<? super V,? super V,? extends V>);
-    method @Nullable public <U> U reduceValues(long, @NonNull java.util.function.Function<? super V,? extends U>, @NonNull java.util.function.BiFunction<? super U,? super U,? extends U>);
-    method public double reduceValuesToDouble(long, @NonNull java.util.function.ToDoubleFunction<? super V>, double, @NonNull java.util.function.DoubleBinaryOperator);
-    method public int reduceValuesToInt(long, @NonNull java.util.function.ToIntFunction<? super V>, int, @NonNull java.util.function.IntBinaryOperator);
-    method public long reduceValuesToLong(long, @NonNull java.util.function.ToLongFunction<? super V>, long, @NonNull java.util.function.LongBinaryOperator);
-    method @Nullable public <U> U search(long, @NonNull java.util.function.BiFunction<? super K,? super V,? extends U>);
-    method @Nullable public <U> U searchEntries(long, @NonNull java.util.function.Function<java.util.Map.Entry<K,V>,? extends U>);
-    method @Nullable public <U> U searchKeys(long, @NonNull java.util.function.Function<? super K,? extends U>);
-    method @Nullable public <U> U searchValues(long, @NonNull java.util.function.Function<? super V,? extends U>);
-  }
-
-  public static class ConcurrentHashMap.KeySetView<K, V> implements java.util.Collection<K> java.io.Serializable java.util.Set<K> {
-    method public boolean add(@NonNull K);
-    method public boolean addAll(@NonNull java.util.Collection<? extends K>);
-    method public final void clear();
-    method public boolean contains(@NonNull Object);
-    method public final boolean containsAll(@NonNull java.util.Collection<?>);
-    method public void forEach(@NonNull java.util.function.Consumer<? super K>);
-    method @NonNull public java.util.concurrent.ConcurrentHashMap<K,V> getMap();
-    method @Nullable public V getMappedValue();
-    method public final boolean isEmpty();
-    method @NonNull public java.util.Iterator<K> iterator();
-    method public boolean remove(@NonNull Object);
-    method public final boolean removeAll(@NonNull java.util.Collection<?>);
-    method public final boolean retainAll(@NonNull java.util.Collection<?>);
-    method public final int size();
-    method @NonNull public java.util.Spliterator<K> spliterator();
-    method @NonNull public final Object[] toArray();
-    method @NonNull public final <T> T[] toArray(@NonNull T[]);
-    method @NonNull public final String toString();
-  }
-
-  public class ConcurrentLinkedDeque<E> extends java.util.AbstractCollection<E> implements java.util.Deque<E> java.io.Serializable {
-    ctor public ConcurrentLinkedDeque();
-    ctor public ConcurrentLinkedDeque(java.util.Collection<? extends E>);
-    method public void addFirst(E);
-    method public void addLast(E);
-    method public java.util.Iterator<E> descendingIterator();
-    method public E element();
-    method public E getFirst();
-    method public E getLast();
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offerFirst(E);
-    method public boolean offerLast(E);
-    method public E peek();
-    method public E peekFirst();
-    method public E peekLast();
-    method public E poll();
-    method public E pollFirst();
-    method public E pollLast();
-    method public E pop();
-    method public void push(E);
-    method public E remove();
-    method public E removeFirst();
-    method public boolean removeFirstOccurrence(Object);
-    method public E removeLast();
-    method public boolean removeLastOccurrence(Object);
-    method public int size();
-  }
-
-  public class ConcurrentLinkedQueue<E> extends java.util.AbstractQueue<E> implements java.util.Queue<E> java.io.Serializable {
-    ctor public ConcurrentLinkedQueue();
-    ctor public ConcurrentLinkedQueue(java.util.Collection<? extends E>);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public E peek();
-    method public E poll();
-    method public int size();
-  }
-
-  public interface ConcurrentMap<K, V> extends java.util.Map<K,V> {
-    method public V putIfAbsent(K, V);
-    method public boolean remove(Object, Object);
-    method public boolean replace(K, V, V);
-    method public V replace(K, V);
-  }
-
-  public interface ConcurrentNavigableMap<K, V> extends java.util.concurrent.ConcurrentMap<K,V> java.util.NavigableMap<K,V> {
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> descendingMap();
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> headMap(K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> headMap(K);
-    method public java.util.NavigableSet<K> keySet();
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> subMap(K, boolean, K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> subMap(K, K);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> tailMap(K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> tailMap(K);
-  }
-
-  public class ConcurrentSkipListMap<K, V> extends java.util.AbstractMap<K,V> implements java.lang.Cloneable java.util.concurrent.ConcurrentNavigableMap<K,V> java.io.Serializable {
-    ctor public ConcurrentSkipListMap();
-    ctor public ConcurrentSkipListMap(java.util.Comparator<? super K>);
-    ctor public ConcurrentSkipListMap(java.util.Map<? extends K,? extends V>);
-    ctor public ConcurrentSkipListMap(java.util.SortedMap<K,? extends V>);
-    method public java.util.Map.Entry<K,V> ceilingEntry(K);
-    method public K ceilingKey(K);
-    method public java.util.concurrent.ConcurrentSkipListMap<K,V> clone();
-    method public java.util.Comparator<? super K> comparator();
-    method public java.util.NavigableSet<K> descendingKeySet();
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> descendingMap();
-    method public java.util.Set<java.util.Map.Entry<K,V>> entrySet();
-    method public java.util.Map.Entry<K,V> firstEntry();
-    method public K firstKey();
-    method public java.util.Map.Entry<K,V> floorEntry(K);
-    method public K floorKey(K);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> headMap(K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> headMap(K);
-    method public java.util.Map.Entry<K,V> higherEntry(K);
-    method public K higherKey(K);
-    method public java.util.NavigableSet<K> keySet();
-    method public java.util.Map.Entry<K,V> lastEntry();
-    method public K lastKey();
-    method public java.util.Map.Entry<K,V> lowerEntry(K);
-    method public K lowerKey(K);
-    method public java.util.NavigableSet<K> navigableKeySet();
-    method public java.util.Map.Entry<K,V> pollFirstEntry();
-    method public java.util.Map.Entry<K,V> pollLastEntry();
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> subMap(K, boolean, K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> subMap(K, K);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> tailMap(K, boolean);
-    method public java.util.concurrent.ConcurrentNavigableMap<K,V> tailMap(K);
-  }
-
-  public class ConcurrentSkipListSet<E> extends java.util.AbstractSet<E> implements java.lang.Cloneable java.util.NavigableSet<E> java.io.Serializable {
-    ctor public ConcurrentSkipListSet();
-    ctor public ConcurrentSkipListSet(java.util.Comparator<? super E>);
-    ctor public ConcurrentSkipListSet(java.util.Collection<? extends E>);
-    ctor public ConcurrentSkipListSet(java.util.SortedSet<E>);
-    method public E ceiling(E);
-    method public java.util.concurrent.ConcurrentSkipListSet<E> clone();
-    method public java.util.Comparator<? super E> comparator();
-    method public java.util.Iterator<E> descendingIterator();
-    method public java.util.NavigableSet<E> descendingSet();
-    method public E first();
-    method public E floor(E);
-    method public java.util.NavigableSet<E> headSet(E, boolean);
-    method public java.util.NavigableSet<E> headSet(E);
-    method public E higher(E);
-    method public java.util.Iterator<E> iterator();
-    method public E last();
-    method public E lower(E);
-    method public E pollFirst();
-    method public E pollLast();
-    method public int size();
-    method public java.util.NavigableSet<E> subSet(E, boolean, E, boolean);
-    method public java.util.NavigableSet<E> subSet(E, E);
-    method public java.util.NavigableSet<E> tailSet(E, boolean);
-    method public java.util.NavigableSet<E> tailSet(E);
-  }
-
-  public class CopyOnWriteArrayList<E> implements java.lang.Cloneable java.util.List<E> java.util.RandomAccess java.io.Serializable {
-    ctor public CopyOnWriteArrayList();
-    ctor public CopyOnWriteArrayList(@NonNull java.util.Collection<? extends E>);
-    ctor public CopyOnWriteArrayList(@NonNull E[]);
-    method public boolean add(E);
-    method public void add(int, E);
-    method public boolean addAll(@NonNull java.util.Collection<? extends E>);
-    method public boolean addAll(int, @NonNull java.util.Collection<? extends E>);
-    method public int addAllAbsent(@NonNull java.util.Collection<? extends E>);
-    method public boolean addIfAbsent(E);
-    method public void clear();
-    method @NonNull public Object clone();
-    method public boolean contains(@Nullable Object);
-    method public boolean containsAll(@NonNull java.util.Collection<?>);
-    method public void forEach(@NonNull java.util.function.Consumer<? super E>);
-    method public E get(int);
-    method public int indexOf(@Nullable Object);
-    method public int indexOf(@Nullable E, int);
-    method public boolean isEmpty();
-    method @NonNull public java.util.Iterator<E> iterator();
-    method public int lastIndexOf(@Nullable Object);
-    method public int lastIndexOf(@Nullable E, int);
-    method @NonNull public java.util.ListIterator<E> listIterator();
-    method @NonNull public java.util.ListIterator<E> listIterator(int);
-    method public E remove(int);
-    method public boolean remove(@Nullable Object);
-    method public boolean removeAll(@NonNull java.util.Collection<?>);
-    method public boolean retainAll(@NonNull java.util.Collection<?>);
-    method public E set(int, E);
-    method public int size();
-    method @NonNull public java.util.List<E> subList(int, int);
-    method @NonNull public Object[] toArray();
-    method @NonNull public <T> T[] toArray(@NonNull T[]);
-  }
-
-  public class CopyOnWriteArraySet<E> extends java.util.AbstractSet<E> implements java.io.Serializable {
-    ctor public CopyOnWriteArraySet();
-    ctor public CopyOnWriteArraySet(java.util.Collection<? extends E>);
-    method public void forEach(java.util.function.Consumer<? super E>);
-    method public java.util.Iterator<E> iterator();
-    method public int size();
-  }
-
-  public class CountDownLatch {
-    ctor public CountDownLatch(int);
-    method public void await() throws java.lang.InterruptedException;
-    method public boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void countDown();
-    method public long getCount();
-  }
-
-  public abstract class CountedCompleter<T> extends java.util.concurrent.ForkJoinTask<T> {
-    ctor protected CountedCompleter(java.util.concurrent.CountedCompleter<?>, int);
-    ctor protected CountedCompleter(java.util.concurrent.CountedCompleter<?>);
-    ctor protected CountedCompleter();
-    method public final void addToPendingCount(int);
-    method public final boolean compareAndSetPendingCount(int, int);
-    method public void complete(T);
-    method public abstract void compute();
-    method public final int decrementPendingCountUnlessZero();
-    method protected final boolean exec();
-    method public final java.util.concurrent.CountedCompleter<?> firstComplete();
-    method public final java.util.concurrent.CountedCompleter<?> getCompleter();
-    method public final int getPendingCount();
-    method public T getRawResult();
-    method public final java.util.concurrent.CountedCompleter<?> getRoot();
-    method public final void helpComplete(int);
-    method public final java.util.concurrent.CountedCompleter<?> nextComplete();
-    method public void onCompletion(java.util.concurrent.CountedCompleter<?>);
-    method public boolean onExceptionalCompletion(Throwable, java.util.concurrent.CountedCompleter<?>);
-    method public final void propagateCompletion();
-    method public final void quietlyCompleteRoot();
-    method public final void setPendingCount(int);
-    method protected void setRawResult(T);
-    method public final void tryComplete();
-  }
-
-  public class CyclicBarrier {
-    ctor public CyclicBarrier(int, Runnable);
-    ctor public CyclicBarrier(int);
-    method public int await() throws java.util.concurrent.BrokenBarrierException, java.lang.InterruptedException;
-    method public int await(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.BrokenBarrierException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public int getNumberWaiting();
-    method public int getParties();
-    method public boolean isBroken();
-    method public void reset();
-  }
-
-  public class DelayQueue<E extends java.util.concurrent.Delayed> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E> {
-    ctor public DelayQueue();
-    ctor public DelayQueue(java.util.Collection<? extends E>);
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
-    method public E peek();
-    method public E poll();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void put(E);
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public interface Delayed extends java.lang.Comparable<java.util.concurrent.Delayed> {
-    method public long getDelay(java.util.concurrent.TimeUnit);
-  }
-
-  public class Exchanger<V> {
-    ctor public Exchanger();
-    method public V exchange(V) throws java.lang.InterruptedException;
-    method public V exchange(V, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-  }
-
-  public class ExecutionException extends java.lang.Exception {
-    ctor protected ExecutionException();
-    ctor protected ExecutionException(String);
-    ctor public ExecutionException(String, Throwable);
-    ctor public ExecutionException(Throwable);
-  }
-
-  public interface Executor {
-    method public void execute(Runnable);
-  }
-
-  public class ExecutorCompletionService<V> implements java.util.concurrent.CompletionService<V> {
-    ctor public ExecutorCompletionService(java.util.concurrent.Executor);
-    ctor public ExecutorCompletionService(java.util.concurrent.Executor, java.util.concurrent.BlockingQueue<java.util.concurrent.Future<V>>);
-    method public java.util.concurrent.Future<V> poll();
-    method public java.util.concurrent.Future<V> poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public java.util.concurrent.Future<V> submit(java.util.concurrent.Callable<V>);
-    method public java.util.concurrent.Future<V> submit(Runnable, V);
-    method public java.util.concurrent.Future<V> take() throws java.lang.InterruptedException;
-  }
-
-  public interface ExecutorService extends java.util.concurrent.Executor {
-    method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.lang.InterruptedException;
-    method public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>>, long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public boolean isShutdown();
-    method public boolean isTerminated();
-    method public void shutdown();
-    method public java.util.List<java.lang.Runnable> shutdownNow();
-    method public <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T>);
-    method public <T> java.util.concurrent.Future<T> submit(Runnable, T);
-    method public java.util.concurrent.Future<?> submit(Runnable);
-  }
-
-  public class Executors {
-    method public static <T> java.util.concurrent.Callable<T> callable(Runnable, T);
-    method public static java.util.concurrent.Callable<java.lang.Object> callable(Runnable);
-    method public static java.util.concurrent.Callable<java.lang.Object> callable(java.security.PrivilegedAction<?>);
-    method public static java.util.concurrent.Callable<java.lang.Object> callable(java.security.PrivilegedExceptionAction<?>);
-    method public static java.util.concurrent.ThreadFactory defaultThreadFactory();
-    method public static java.util.concurrent.ExecutorService newCachedThreadPool();
-    method public static java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory);
-    method public static java.util.concurrent.ExecutorService newFixedThreadPool(int);
-    method public static java.util.concurrent.ExecutorService newFixedThreadPool(int, java.util.concurrent.ThreadFactory);
-    method public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int);
-    method public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int, java.util.concurrent.ThreadFactory);
-    method public static java.util.concurrent.ExecutorService newSingleThreadExecutor();
-    method public static java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory);
-    method public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor();
-    method public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory);
-    method public static java.util.concurrent.ExecutorService newWorkStealingPool(int);
-    method public static java.util.concurrent.ExecutorService newWorkStealingPool();
-    method public static <T> java.util.concurrent.Callable<T> privilegedCallable(java.util.concurrent.Callable<T>);
-    method public static <T> java.util.concurrent.Callable<T> privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable<T>);
-    method public static java.util.concurrent.ThreadFactory privilegedThreadFactory();
-    method public static java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService);
-    method public static java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService);
-  }
-
-  public final class Flow {
-    method public static int defaultBufferSize();
-  }
-
-  public static interface Flow.Processor<T, R> extends java.util.concurrent.Flow.Subscriber<T> java.util.concurrent.Flow.Publisher<R> {
-  }
-
-  @java.lang.FunctionalInterface public static interface Flow.Publisher<T> {
-    method public void subscribe(java.util.concurrent.Flow.Subscriber<? super T>);
-  }
-
-  public static interface Flow.Subscriber<T> {
-    method public void onComplete();
-    method public void onError(Throwable);
-    method public void onNext(T);
-    method public void onSubscribe(java.util.concurrent.Flow.Subscription);
-  }
-
-  public static interface Flow.Subscription {
-    method public void cancel();
-    method public void request(long);
-  }
-
-  public class ForkJoinPool extends java.util.concurrent.AbstractExecutorService {
-    ctor public ForkJoinPool();
-    ctor public ForkJoinPool(int);
-    ctor public ForkJoinPool(int, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.lang.Thread.UncaughtExceptionHandler, boolean);
-    method public boolean awaitQuiescence(long, java.util.concurrent.TimeUnit);
-    method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public static java.util.concurrent.ForkJoinPool commonPool();
-    method protected int drainTasksTo(java.util.Collection<? super java.util.concurrent.ForkJoinTask<?>>);
-    method public void execute(java.util.concurrent.ForkJoinTask<?>);
-    method public void execute(Runnable);
-    method public int getActiveThreadCount();
-    method public boolean getAsyncMode();
-    method public static int getCommonPoolParallelism();
-    method public java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory getFactory();
-    method public int getParallelism();
-    method public int getPoolSize();
-    method public int getQueuedSubmissionCount();
-    method public long getQueuedTaskCount();
-    method public int getRunningThreadCount();
-    method public long getStealCount();
-    method public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();
-    method public boolean hasQueuedSubmissions();
-    method public <T> T invoke(java.util.concurrent.ForkJoinTask<T>);
-    method public <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>>);
-    method public boolean isQuiescent();
-    method public boolean isShutdown();
-    method public boolean isTerminated();
-    method public boolean isTerminating();
-    method public static void managedBlock(java.util.concurrent.ForkJoinPool.ManagedBlocker) throws java.lang.InterruptedException;
-    method protected java.util.concurrent.ForkJoinTask<?> pollSubmission();
-    method public void shutdown();
-    method public java.util.List<java.lang.Runnable> shutdownNow();
-    method public <T> java.util.concurrent.ForkJoinTask<T> submit(java.util.concurrent.ForkJoinTask<T>);
-    method public <T> java.util.concurrent.ForkJoinTask<T> submit(java.util.concurrent.Callable<T>);
-    method public <T> java.util.concurrent.ForkJoinTask<T> submit(Runnable, T);
-    method public java.util.concurrent.ForkJoinTask<?> submit(Runnable);
-    field public static final java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory defaultForkJoinWorkerThreadFactory;
-  }
-
-  public static interface ForkJoinPool.ForkJoinWorkerThreadFactory {
-    method public java.util.concurrent.ForkJoinWorkerThread newThread(java.util.concurrent.ForkJoinPool);
-  }
-
-  public static interface ForkJoinPool.ManagedBlocker {
-    method public boolean block() throws java.lang.InterruptedException;
-    method public boolean isReleasable();
-  }
-
-  public abstract class ForkJoinTask<V> implements java.util.concurrent.Future<V> java.io.Serializable {
-    ctor public ForkJoinTask();
-    method public static java.util.concurrent.ForkJoinTask<?> adapt(Runnable);
-    method public static <T> java.util.concurrent.ForkJoinTask<T> adapt(Runnable, T);
-    method public static <T> java.util.concurrent.ForkJoinTask<T> adapt(java.util.concurrent.Callable<? extends T>);
-    method public boolean cancel(boolean);
-    method public final boolean compareAndSetForkJoinTaskTag(short, short);
-    method public void complete(V);
-    method public void completeExceptionally(Throwable);
-    method protected abstract boolean exec();
-    method public final java.util.concurrent.ForkJoinTask<V> fork();
-    method public final V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public final V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public final Throwable getException();
-    method public final short getForkJoinTaskTag();
-    method public static java.util.concurrent.ForkJoinPool getPool();
-    method public static int getQueuedTaskCount();
-    method public abstract V getRawResult();
-    method public static int getSurplusQueuedTaskCount();
-    method public static void helpQuiesce();
-    method public static boolean inForkJoinPool();
-    method public final V invoke();
-    method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>, java.util.concurrent.ForkJoinTask<?>);
-    method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>...);
-    method public static <T extends java.util.concurrent.ForkJoinTask<?>> java.util.Collection<T> invokeAll(java.util.Collection<T>);
-    method public final boolean isCancelled();
-    method public final boolean isCompletedAbnormally();
-    method public final boolean isCompletedNormally();
-    method public final boolean isDone();
-    method public final V join();
-    method protected static java.util.concurrent.ForkJoinTask<?> peekNextLocalTask();
-    method protected static java.util.concurrent.ForkJoinTask<?> pollNextLocalTask();
-    method protected static java.util.concurrent.ForkJoinTask<?> pollTask();
-    method public final void quietlyComplete();
-    method public final void quietlyInvoke();
-    method public final void quietlyJoin();
-    method public void reinitialize();
-    method public final short setForkJoinTaskTag(short);
-    method protected abstract void setRawResult(V);
-    method public boolean tryUnfork();
-  }
-
-  public class ForkJoinWorkerThread extends java.lang.Thread {
-    ctor protected ForkJoinWorkerThread(java.util.concurrent.ForkJoinPool);
-    method public java.util.concurrent.ForkJoinPool getPool();
-    method public int getPoolIndex();
-    method protected void onStart();
-    method protected void onTermination(Throwable);
-  }
-
-  public interface Future<V> {
-    method public boolean cancel(boolean);
-    method public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public boolean isCancelled();
-    method public boolean isDone();
-  }
-
-  public class FutureTask<V> implements java.util.concurrent.RunnableFuture<V> {
-    ctor public FutureTask(java.util.concurrent.Callable<V>);
-    ctor public FutureTask(Runnable, V);
-    method public boolean cancel(boolean);
-    method protected void done();
-    method public V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
-    method public V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public boolean isCancelled();
-    method public boolean isDone();
-    method public void run();
-    method protected boolean runAndReset();
-    method protected void set(V);
-    method protected void setException(Throwable);
-  }
-
-  public class LinkedBlockingDeque<E> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingDeque<E> java.io.Serializable {
-    ctor public LinkedBlockingDeque();
-    ctor public LinkedBlockingDeque(int);
-    ctor public LinkedBlockingDeque(java.util.Collection<? extends E>);
-    method public void addFirst(E);
-    method public void addLast(E);
-    method public java.util.Iterator<E> descendingIterator();
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public E getFirst();
-    method public E getLast();
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean offerFirst(E);
-    method public boolean offerFirst(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean offerLast(E);
-    method public boolean offerLast(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E peek();
-    method public E peekFirst();
-    method public E peekLast();
-    method public E poll();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E pollFirst();
-    method public E pollFirst(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E pollLast();
-    method public E pollLast(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E pop();
-    method public void push(E);
-    method public void put(E) throws java.lang.InterruptedException;
-    method public void putFirst(E) throws java.lang.InterruptedException;
-    method public void putLast(E) throws java.lang.InterruptedException;
-    method public int remainingCapacity();
-    method public E removeFirst();
-    method public boolean removeFirstOccurrence(Object);
-    method public E removeLast();
-    method public boolean removeLastOccurrence(Object);
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-    method public E takeFirst() throws java.lang.InterruptedException;
-    method public E takeLast() throws java.lang.InterruptedException;
-  }
-
-  public class LinkedBlockingQueue<E> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E> java.io.Serializable {
-    ctor public LinkedBlockingQueue();
-    ctor public LinkedBlockingQueue(int);
-    ctor public LinkedBlockingQueue(java.util.Collection<? extends E>);
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean offer(E);
-    method public E peek();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E poll();
-    method public void put(E) throws java.lang.InterruptedException;
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public class LinkedTransferQueue<E> extends java.util.AbstractQueue<E> implements java.io.Serializable java.util.concurrent.TransferQueue<E> {
-    ctor public LinkedTransferQueue();
-    ctor public LinkedTransferQueue(java.util.Collection<? extends E>);
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public int getWaitingConsumerCount();
-    method public boolean hasWaitingConsumer();
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
-    method public boolean offer(E);
-    method public E peek();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E poll();
-    method public void put(E);
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-    method public void transfer(E) throws java.lang.InterruptedException;
-    method public boolean tryTransfer(E);
-    method public boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-  }
-
-  public class Phaser {
-    ctor public Phaser();
-    ctor public Phaser(int);
-    ctor public Phaser(java.util.concurrent.Phaser);
-    ctor public Phaser(java.util.concurrent.Phaser, int);
-    method public int arrive();
-    method public int arriveAndAwaitAdvance();
-    method public int arriveAndDeregister();
-    method public int awaitAdvance(int);
-    method public int awaitAdvanceInterruptibly(int) throws java.lang.InterruptedException;
-    method public int awaitAdvanceInterruptibly(int, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException;
-    method public int bulkRegister(int);
-    method public void forceTermination();
-    method public int getArrivedParties();
-    method public java.util.concurrent.Phaser getParent();
-    method public final int getPhase();
-    method public int getRegisteredParties();
-    method public java.util.concurrent.Phaser getRoot();
-    method public int getUnarrivedParties();
-    method public boolean isTerminated();
-    method protected boolean onAdvance(int, int);
-    method public int register();
-  }
-
-  public class PriorityBlockingQueue<E> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E> java.io.Serializable {
-    ctor public PriorityBlockingQueue();
-    ctor public PriorityBlockingQueue(int);
-    ctor public PriorityBlockingQueue(int, java.util.Comparator<? super E>);
-    ctor public PriorityBlockingQueue(java.util.Collection<? extends E>);
-    method public java.util.Comparator<? super E> comparator();
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E);
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit);
-    method public E peek();
-    method public E poll();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void put(E);
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public abstract class RecursiveAction extends java.util.concurrent.ForkJoinTask<java.lang.Void> {
-    ctor public RecursiveAction();
-    method protected abstract void compute();
-    method protected final boolean exec();
-    method public final Void getRawResult();
-    method protected final void setRawResult(Void);
-  }
-
-  public abstract class RecursiveTask<V> extends java.util.concurrent.ForkJoinTask<V> {
-    ctor public RecursiveTask();
-    method protected abstract V compute();
-    method protected final boolean exec();
-    method public final V getRawResult();
-    method protected final void setRawResult(V);
-  }
-
-  public class RejectedExecutionException extends java.lang.RuntimeException {
-    ctor public RejectedExecutionException();
-    ctor public RejectedExecutionException(String);
-    ctor public RejectedExecutionException(String, Throwable);
-    ctor public RejectedExecutionException(Throwable);
-  }
-
-  public interface RejectedExecutionHandler {
-    method public void rejectedExecution(Runnable, java.util.concurrent.ThreadPoolExecutor);
-  }
-
-  public interface RunnableFuture<V> extends java.lang.Runnable java.util.concurrent.Future<V> {
-  }
-
-  public interface RunnableScheduledFuture<V> extends java.util.concurrent.RunnableFuture<V> java.util.concurrent.ScheduledFuture<V> {
-    method public boolean isPeriodic();
-  }
-
-  public interface ScheduledExecutorService extends java.util.concurrent.ExecutorService {
-    method public java.util.concurrent.ScheduledFuture<?> schedule(Runnable, long, java.util.concurrent.TimeUnit);
-    method public <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit);
-    method public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(Runnable, long, long, java.util.concurrent.TimeUnit);
-    method public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit);
-  }
-
-  public interface ScheduledFuture<V> extends java.util.concurrent.Delayed java.util.concurrent.Future<V> {
-  }
-
-  public class ScheduledThreadPoolExecutor extends java.util.concurrent.ThreadPoolExecutor implements java.util.concurrent.ScheduledExecutorService {
-    ctor public ScheduledThreadPoolExecutor(int);
-    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory);
-    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.RejectedExecutionHandler);
-    ctor public ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler);
-    method protected <V> java.util.concurrent.RunnableScheduledFuture<V> decorateTask(Runnable, java.util.concurrent.RunnableScheduledFuture<V>);
-    method protected <V> java.util.concurrent.RunnableScheduledFuture<V> decorateTask(java.util.concurrent.Callable<V>, java.util.concurrent.RunnableScheduledFuture<V>);
-    method public boolean getContinueExistingPeriodicTasksAfterShutdownPolicy();
-    method public boolean getExecuteExistingDelayedTasksAfterShutdownPolicy();
-    method public boolean getRemoveOnCancelPolicy();
-    method public java.util.concurrent.ScheduledFuture<?> schedule(Runnable, long, java.util.concurrent.TimeUnit);
-    method public <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit);
-    method public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(Runnable, long, long, java.util.concurrent.TimeUnit);
-    method public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(Runnable, long, long, java.util.concurrent.TimeUnit);
-    method public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean);
-    method public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean);
-    method public void setRemoveOnCancelPolicy(boolean);
-  }
-
-  public class Semaphore implements java.io.Serializable {
-    ctor public Semaphore(int);
-    ctor public Semaphore(int, boolean);
-    method public void acquire() throws java.lang.InterruptedException;
-    method public void acquire(int) throws java.lang.InterruptedException;
-    method public void acquireUninterruptibly();
-    method public void acquireUninterruptibly(int);
-    method public int availablePermits();
-    method public int drainPermits();
-    method public final int getQueueLength();
-    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
-    method public final boolean hasQueuedThreads();
-    method public boolean isFair();
-    method protected void reducePermits(int);
-    method public void release();
-    method public void release(int);
-    method public boolean tryAcquire();
-    method public boolean tryAcquire(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean tryAcquire(int);
-    method public boolean tryAcquire(int, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-  }
-
-  public class SynchronousQueue<E> extends java.util.AbstractQueue<E> implements java.util.concurrent.BlockingQueue<E> java.io.Serializable {
-    ctor public SynchronousQueue();
-    ctor public SynchronousQueue(boolean);
-    method public int drainTo(java.util.Collection<? super E>);
-    method public int drainTo(java.util.Collection<? super E>, int);
-    method public java.util.Iterator<E> iterator();
-    method public boolean offer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean offer(E);
-    method public E peek();
-    method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public E poll();
-    method public void put(E) throws java.lang.InterruptedException;
-    method public int remainingCapacity();
-    method public int size();
-    method public E take() throws java.lang.InterruptedException;
-  }
-
-  public interface ThreadFactory {
-    method public Thread newThread(Runnable);
-  }
-
-  public class ThreadLocalRandom extends java.util.Random {
-    method public static java.util.concurrent.ThreadLocalRandom current();
-    method public double nextDouble(double);
-    method public double nextDouble(double, double);
-    method public int nextInt(int, int);
-    method public long nextLong(long);
-    method public long nextLong(long, long);
-  }
-
-  public class ThreadPoolExecutor extends java.util.concurrent.AbstractExecutorService {
-    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>);
-    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory);
-    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.RejectedExecutionHandler);
-    ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler);
-    method protected void afterExecute(Runnable, Throwable);
-    method public void allowCoreThreadTimeOut(boolean);
-    method public boolean allowsCoreThreadTimeOut();
-    method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method protected void beforeExecute(Thread, Runnable);
-    method public void execute(Runnable);
-    method protected void finalize();
-    method public int getActiveCount();
-    method public long getCompletedTaskCount();
-    method public int getCorePoolSize();
-    method public long getKeepAliveTime(java.util.concurrent.TimeUnit);
-    method public int getLargestPoolSize();
-    method public int getMaximumPoolSize();
-    method public int getPoolSize();
-    method public java.util.concurrent.BlockingQueue<java.lang.Runnable> getQueue();
-    method public java.util.concurrent.RejectedExecutionHandler getRejectedExecutionHandler();
-    method public long getTaskCount();
-    method public java.util.concurrent.ThreadFactory getThreadFactory();
-    method public boolean isShutdown();
-    method public boolean isTerminated();
-    method public boolean isTerminating();
-    method public int prestartAllCoreThreads();
-    method public boolean prestartCoreThread();
-    method public void purge();
-    method public boolean remove(Runnable);
-    method public void setCorePoolSize(int);
-    method public void setKeepAliveTime(long, java.util.concurrent.TimeUnit);
-    method public void setMaximumPoolSize(int);
-    method public void setRejectedExecutionHandler(java.util.concurrent.RejectedExecutionHandler);
-    method public void setThreadFactory(java.util.concurrent.ThreadFactory);
-    method public void shutdown();
-    method public java.util.List<java.lang.Runnable> shutdownNow();
-    method protected void terminated();
-  }
-
-  public static class ThreadPoolExecutor.AbortPolicy implements java.util.concurrent.RejectedExecutionHandler {
-    ctor public ThreadPoolExecutor.AbortPolicy();
-    method public void rejectedExecution(Runnable, java.util.concurrent.ThreadPoolExecutor);
-  }
-
-  public static class ThreadPoolExecutor.CallerRunsPolicy implements java.util.concurrent.RejectedExecutionHandler {
-    ctor public ThreadPoolExecutor.CallerRunsPolicy();
-    method public void rejectedExecution(Runnable, java.util.concurrent.ThreadPoolExecutor);
-  }
-
-  public static class ThreadPoolExecutor.DiscardOldestPolicy implements java.util.concurrent.RejectedExecutionHandler {
-    ctor public ThreadPoolExecutor.DiscardOldestPolicy();
-    method public void rejectedExecution(Runnable, java.util.concurrent.ThreadPoolExecutor);
-  }
-
-  public static class ThreadPoolExecutor.DiscardPolicy implements java.util.concurrent.RejectedExecutionHandler {
-    ctor public ThreadPoolExecutor.DiscardPolicy();
-    method public void rejectedExecution(Runnable, java.util.concurrent.ThreadPoolExecutor);
-  }
-
-  public enum TimeUnit {
-    method public long convert(long, java.util.concurrent.TimeUnit);
-    method public void sleep(long) throws java.lang.InterruptedException;
-    method public void timedJoin(Thread, long) throws java.lang.InterruptedException;
-    method public void timedWait(Object, long) throws java.lang.InterruptedException;
-    method public long toDays(long);
-    method public long toHours(long);
-    method public long toMicros(long);
-    method public long toMillis(long);
-    method public long toMinutes(long);
-    method public long toNanos(long);
-    method public long toSeconds(long);
-    enum_constant public static final java.util.concurrent.TimeUnit DAYS;
-    enum_constant public static final java.util.concurrent.TimeUnit HOURS;
-    enum_constant public static final java.util.concurrent.TimeUnit MICROSECONDS;
-    enum_constant public static final java.util.concurrent.TimeUnit MILLISECONDS;
-    enum_constant public static final java.util.concurrent.TimeUnit MINUTES;
-    enum_constant public static final java.util.concurrent.TimeUnit NANOSECONDS;
-    enum_constant public static final java.util.concurrent.TimeUnit SECONDS;
-  }
-
-  public class TimeoutException extends java.lang.Exception {
-    ctor public TimeoutException();
-    ctor public TimeoutException(String);
-  }
-
-  public interface TransferQueue<E> extends java.util.concurrent.BlockingQueue<E> {
-    method public int getWaitingConsumerCount();
-    method public boolean hasWaitingConsumer();
-    method public void transfer(E) throws java.lang.InterruptedException;
-    method public boolean tryTransfer(E);
-    method public boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-  }
-
-}
-
-package java.util.concurrent.atomic {
-
-  public class AtomicBoolean implements java.io.Serializable {
-    ctor public AtomicBoolean(boolean);
-    ctor public AtomicBoolean();
-    method public final boolean compareAndSet(boolean, boolean);
-    method public final boolean get();
-    method public final boolean getAndSet(boolean);
-    method public final void lazySet(boolean);
-    method public final void set(boolean);
-    method public boolean weakCompareAndSet(boolean, boolean);
-  }
-
-  public class AtomicInteger extends java.lang.Number implements java.io.Serializable {
-    ctor public AtomicInteger(int);
-    ctor public AtomicInteger();
-    method public final int accumulateAndGet(int, java.util.function.IntBinaryOperator);
-    method public final int addAndGet(int);
-    method public final boolean compareAndSet(int, int);
-    method public final int decrementAndGet();
-    method public double doubleValue();
-    method public float floatValue();
-    method public final int get();
-    method public final int getAndAccumulate(int, java.util.function.IntBinaryOperator);
-    method public final int getAndAdd(int);
-    method public final int getAndDecrement();
-    method public final int getAndIncrement();
-    method public final int getAndSet(int);
-    method public final int getAndUpdate(java.util.function.IntUnaryOperator);
-    method public final int incrementAndGet();
-    method public int intValue();
-    method public final void lazySet(int);
-    method public long longValue();
-    method public final void set(int);
-    method public final int updateAndGet(java.util.function.IntUnaryOperator);
-    method public final boolean weakCompareAndSet(int, int);
-  }
-
-  public class AtomicIntegerArray implements java.io.Serializable {
-    ctor public AtomicIntegerArray(int);
-    ctor public AtomicIntegerArray(int[]);
-    method public final int accumulateAndGet(int, int, java.util.function.IntBinaryOperator);
-    method public final int addAndGet(int, int);
-    method public final boolean compareAndSet(int, int, int);
-    method public final int decrementAndGet(int);
-    method public final int get(int);
-    method public final int getAndAccumulate(int, int, java.util.function.IntBinaryOperator);
-    method public final int getAndAdd(int, int);
-    method public final int getAndDecrement(int);
-    method public final int getAndIncrement(int);
-    method public final int getAndSet(int, int);
-    method public final int getAndUpdate(int, java.util.function.IntUnaryOperator);
-    method public final int incrementAndGet(int);
-    method public final void lazySet(int, int);
-    method public final int length();
-    method public final void set(int, int);
-    method public final int updateAndGet(int, java.util.function.IntUnaryOperator);
-    method public final boolean weakCompareAndSet(int, int, int);
-  }
-
-  public abstract class AtomicIntegerFieldUpdater<T> {
-    ctor protected AtomicIntegerFieldUpdater();
-    method public final int accumulateAndGet(T, int, java.util.function.IntBinaryOperator);
-    method public int addAndGet(T, int);
-    method public abstract boolean compareAndSet(T, int, int);
-    method public int decrementAndGet(T);
-    method public abstract int get(T);
-    method public final int getAndAccumulate(T, int, java.util.function.IntBinaryOperator);
-    method public int getAndAdd(T, int);
-    method public int getAndDecrement(T);
-    method public int getAndIncrement(T);
-    method public int getAndSet(T, int);
-    method public final int getAndUpdate(T, java.util.function.IntUnaryOperator);
-    method public int incrementAndGet(T);
-    method public abstract void lazySet(T, int);
-    method public static <U> java.util.concurrent.atomic.AtomicIntegerFieldUpdater<U> newUpdater(Class<U>, String);
-    method public abstract void set(T, int);
-    method public final int updateAndGet(T, java.util.function.IntUnaryOperator);
-    method public abstract boolean weakCompareAndSet(T, int, int);
-  }
-
-  public class AtomicLong extends java.lang.Number implements java.io.Serializable {
-    ctor public AtomicLong(long);
-    ctor public AtomicLong();
-    method public final long accumulateAndGet(long, java.util.function.LongBinaryOperator);
-    method public final long addAndGet(long);
-    method public final boolean compareAndSet(long, long);
-    method public final long decrementAndGet();
-    method public double doubleValue();
-    method public float floatValue();
-    method public final long get();
-    method public final long getAndAccumulate(long, java.util.function.LongBinaryOperator);
-    method public final long getAndAdd(long);
-    method public final long getAndDecrement();
-    method public final long getAndIncrement();
-    method public final long getAndSet(long);
-    method public final long getAndUpdate(java.util.function.LongUnaryOperator);
-    method public final long incrementAndGet();
-    method public int intValue();
-    method public final void lazySet(long);
-    method public long longValue();
-    method public final void set(long);
-    method public final long updateAndGet(java.util.function.LongUnaryOperator);
-    method public final boolean weakCompareAndSet(long, long);
-  }
-
-  public class AtomicLongArray implements java.io.Serializable {
-    ctor public AtomicLongArray(int);
-    ctor public AtomicLongArray(long[]);
-    method public final long accumulateAndGet(int, long, java.util.function.LongBinaryOperator);
-    method public long addAndGet(int, long);
-    method public final boolean compareAndSet(int, long, long);
-    method public final long decrementAndGet(int);
-    method public final long get(int);
-    method public final long getAndAccumulate(int, long, java.util.function.LongBinaryOperator);
-    method public final long getAndAdd(int, long);
-    method public final long getAndDecrement(int);
-    method public final long getAndIncrement(int);
-    method public final long getAndSet(int, long);
-    method public final long getAndUpdate(int, java.util.function.LongUnaryOperator);
-    method public final long incrementAndGet(int);
-    method public final void lazySet(int, long);
-    method public final int length();
-    method public final void set(int, long);
-    method public final long updateAndGet(int, java.util.function.LongUnaryOperator);
-    method public final boolean weakCompareAndSet(int, long, long);
-  }
-
-  public abstract class AtomicLongFieldUpdater<T> {
-    ctor protected AtomicLongFieldUpdater();
-    method public final long accumulateAndGet(T, long, java.util.function.LongBinaryOperator);
-    method public long addAndGet(T, long);
-    method public abstract boolean compareAndSet(T, long, long);
-    method public long decrementAndGet(T);
-    method public abstract long get(T);
-    method public final long getAndAccumulate(T, long, java.util.function.LongBinaryOperator);
-    method public long getAndAdd(T, long);
-    method public long getAndDecrement(T);
-    method public long getAndIncrement(T);
-    method public long getAndSet(T, long);
-    method public final long getAndUpdate(T, java.util.function.LongUnaryOperator);
-    method public long incrementAndGet(T);
-    method public abstract void lazySet(T, long);
-    method public static <U> java.util.concurrent.atomic.AtomicLongFieldUpdater<U> newUpdater(Class<U>, String);
-    method public abstract void set(T, long);
-    method public final long updateAndGet(T, java.util.function.LongUnaryOperator);
-    method public abstract boolean weakCompareAndSet(T, long, long);
-  }
-
-  public class AtomicMarkableReference<V> {
-    ctor public AtomicMarkableReference(V, boolean);
-    method public boolean attemptMark(V, boolean);
-    method public boolean compareAndSet(V, V, boolean, boolean);
-    method public V get(boolean[]);
-    method public V getReference();
-    method public boolean isMarked();
-    method public void set(V, boolean);
-    method public boolean weakCompareAndSet(V, V, boolean, boolean);
-  }
-
-  public class AtomicReference<V> implements java.io.Serializable {
-    ctor public AtomicReference(V);
-    ctor public AtomicReference();
-    method public final V accumulateAndGet(V, java.util.function.BinaryOperator<V>);
-    method public final boolean compareAndSet(V, V);
-    method public final V get();
-    method public final V getAndAccumulate(V, java.util.function.BinaryOperator<V>);
-    method public final V getAndSet(V);
-    method public final V getAndUpdate(java.util.function.UnaryOperator<V>);
-    method public final void lazySet(V);
-    method public final void set(V);
-    method public final V updateAndGet(java.util.function.UnaryOperator<V>);
-    method public final boolean weakCompareAndSet(V, V);
-  }
-
-  public class AtomicReferenceArray<E> implements java.io.Serializable {
-    ctor public AtomicReferenceArray(int);
-    ctor public AtomicReferenceArray(E[]);
-    method public final E accumulateAndGet(int, E, java.util.function.BinaryOperator<E>);
-    method public final boolean compareAndSet(int, E, E);
-    method public final E get(int);
-    method public final E getAndAccumulate(int, E, java.util.function.BinaryOperator<E>);
-    method public final E getAndSet(int, E);
-    method public final E getAndUpdate(int, java.util.function.UnaryOperator<E>);
-    method public final void lazySet(int, E);
-    method public final int length();
-    method public final void set(int, E);
-    method public final E updateAndGet(int, java.util.function.UnaryOperator<E>);
-    method public final boolean weakCompareAndSet(int, E, E);
-  }
-
-  public abstract class AtomicReferenceFieldUpdater<T, V> {
-    ctor protected AtomicReferenceFieldUpdater();
-    method public final V accumulateAndGet(T, V, java.util.function.BinaryOperator<V>);
-    method public abstract boolean compareAndSet(T, V, V);
-    method public abstract V get(T);
-    method public final V getAndAccumulate(T, V, java.util.function.BinaryOperator<V>);
-    method public V getAndSet(T, V);
-    method public final V getAndUpdate(T, java.util.function.UnaryOperator<V>);
-    method public abstract void lazySet(T, V);
-    method public static <U, W> java.util.concurrent.atomic.AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U>, Class<W>, String);
-    method public abstract void set(T, V);
-    method public final V updateAndGet(T, java.util.function.UnaryOperator<V>);
-    method public abstract boolean weakCompareAndSet(T, V, V);
-  }
-
-  public class AtomicStampedReference<V> {
-    ctor public AtomicStampedReference(V, int);
-    method public boolean attemptStamp(V, int);
-    method public boolean compareAndSet(V, V, int, int);
-    method public V get(int[]);
-    method public V getReference();
-    method public int getStamp();
-    method public void set(V, int);
-    method public boolean weakCompareAndSet(V, V, int, int);
-  }
-
-  public class DoubleAccumulator extends java.lang.Number implements java.io.Serializable {
-    ctor public DoubleAccumulator(java.util.function.DoubleBinaryOperator, double);
-    method public void accumulate(double);
-    method public double doubleValue();
-    method public float floatValue();
-    method public double get();
-    method public double getThenReset();
-    method public int intValue();
-    method public long longValue();
-    method public void reset();
-  }
-
-  public class DoubleAdder extends java.lang.Number implements java.io.Serializable {
-    ctor public DoubleAdder();
-    method public void add(double);
-    method public double doubleValue();
-    method public float floatValue();
-    method public int intValue();
-    method public long longValue();
-    method public void reset();
-    method public double sum();
-    method public double sumThenReset();
-  }
-
-  public class LongAccumulator extends java.lang.Number implements java.io.Serializable {
-    ctor public LongAccumulator(java.util.function.LongBinaryOperator, long);
-    method public void accumulate(long);
-    method public double doubleValue();
-    method public float floatValue();
-    method public long get();
-    method public long getThenReset();
-    method public int intValue();
-    method public long longValue();
-    method public void reset();
-  }
-
-  public class LongAdder extends java.lang.Number implements java.io.Serializable {
-    ctor public LongAdder();
-    method public void add(long);
-    method public void decrement();
-    method public double doubleValue();
-    method public float floatValue();
-    method public void increment();
-    method public int intValue();
-    method public long longValue();
-    method public void reset();
-    method public long sum();
-    method public long sumThenReset();
-  }
-
-}
-
-package java.util.concurrent.locks {
-
-  public abstract class AbstractOwnableSynchronizer implements java.io.Serializable {
-    ctor protected AbstractOwnableSynchronizer();
-    method protected final Thread getExclusiveOwnerThread();
-    method protected final void setExclusiveOwnerThread(Thread);
-  }
-
-  public abstract class AbstractQueuedLongSynchronizer extends java.util.concurrent.locks.AbstractOwnableSynchronizer implements java.io.Serializable {
-    ctor protected AbstractQueuedLongSynchronizer();
-    method public final void acquire(long);
-    method public final void acquireInterruptibly(long) throws java.lang.InterruptedException;
-    method public final void acquireShared(long);
-    method public final void acquireSharedInterruptibly(long) throws java.lang.InterruptedException;
-    method protected final boolean compareAndSetState(long, long);
-    method public final java.util.Collection<java.lang.Thread> getExclusiveQueuedThreads();
-    method public final Thread getFirstQueuedThread();
-    method public final int getQueueLength();
-    method public final java.util.Collection<java.lang.Thread> getQueuedThreads();
-    method public final java.util.Collection<java.lang.Thread> getSharedQueuedThreads();
-    method protected final long getState();
-    method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
-    method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
-    method public final boolean hasContended();
-    method public final boolean hasQueuedPredecessors();
-    method public final boolean hasQueuedThreads();
-    method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
-    method protected boolean isHeldExclusively();
-    method public final boolean isQueued(Thread);
-    method public final boolean owns(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
-    method public final boolean release(long);
-    method public final boolean releaseShared(long);
-    method protected final void setState(long);
-    method protected boolean tryAcquire(long);
-    method public final boolean tryAcquireNanos(long, long) throws java.lang.InterruptedException;
-    method protected long tryAcquireShared(long);
-    method public final boolean tryAcquireSharedNanos(long, long) throws java.lang.InterruptedException;
-    method protected boolean tryRelease(long);
-    method protected boolean tryReleaseShared(long);
-  }
-
-  public class AbstractQueuedLongSynchronizer.ConditionObject implements java.util.concurrent.locks.Condition java.io.Serializable {
-    ctor public AbstractQueuedLongSynchronizer.ConditionObject();
-    method public final void await() throws java.lang.InterruptedException;
-    method public final boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public final long awaitNanos(long) throws java.lang.InterruptedException;
-    method public final void awaitUninterruptibly();
-    method public final boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
-    method protected final int getWaitQueueLength();
-    method protected final java.util.Collection<java.lang.Thread> getWaitingThreads();
-    method protected final boolean hasWaiters();
-    method public final void signal();
-    method public final void signalAll();
-  }
-
-  public abstract class AbstractQueuedSynchronizer extends java.util.concurrent.locks.AbstractOwnableSynchronizer implements java.io.Serializable {
-    ctor protected AbstractQueuedSynchronizer();
-    method public final void acquire(int);
-    method public final void acquireInterruptibly(int) throws java.lang.InterruptedException;
-    method public final void acquireShared(int);
-    method public final void acquireSharedInterruptibly(int) throws java.lang.InterruptedException;
-    method protected final boolean compareAndSetState(int, int);
-    method public final java.util.Collection<java.lang.Thread> getExclusiveQueuedThreads();
-    method public final Thread getFirstQueuedThread();
-    method public final int getQueueLength();
-    method public final java.util.Collection<java.lang.Thread> getQueuedThreads();
-    method public final java.util.Collection<java.lang.Thread> getSharedQueuedThreads();
-    method protected final int getState();
-    method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
-    method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
-    method public final boolean hasContended();
-    method public final boolean hasQueuedPredecessors();
-    method public final boolean hasQueuedThreads();
-    method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
-    method protected boolean isHeldExclusively();
-    method public final boolean isQueued(Thread);
-    method public final boolean owns(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
-    method public final boolean release(int);
-    method public final boolean releaseShared(int);
-    method protected final void setState(int);
-    method protected boolean tryAcquire(int);
-    method public final boolean tryAcquireNanos(int, long) throws java.lang.InterruptedException;
-    method protected int tryAcquireShared(int);
-    method public final boolean tryAcquireSharedNanos(int, long) throws java.lang.InterruptedException;
-    method protected boolean tryRelease(int);
-    method protected boolean tryReleaseShared(int);
-  }
-
-  public class AbstractQueuedSynchronizer.ConditionObject implements java.util.concurrent.locks.Condition java.io.Serializable {
-    ctor public AbstractQueuedSynchronizer.ConditionObject();
-    method public final void await() throws java.lang.InterruptedException;
-    method public final boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public final long awaitNanos(long) throws java.lang.InterruptedException;
-    method public final void awaitUninterruptibly();
-    method public final boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
-    method protected final int getWaitQueueLength();
-    method protected final java.util.Collection<java.lang.Thread> getWaitingThreads();
-    method protected final boolean hasWaiters();
-    method public final void signal();
-    method public final void signalAll();
-  }
-
-  public interface Condition {
-    method public void await() throws java.lang.InterruptedException;
-    method public boolean await(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public long awaitNanos(long) throws java.lang.InterruptedException;
-    method public void awaitUninterruptibly();
-    method public boolean awaitUntil(java.util.Date) throws java.lang.InterruptedException;
-    method public void signal();
-    method public void signalAll();
-  }
-
-  public interface Lock {
-    method public void lock();
-    method public void lockInterruptibly() throws java.lang.InterruptedException;
-    method public java.util.concurrent.locks.Condition newCondition();
-    method public boolean tryLock();
-    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void unlock();
-  }
-
-  public class LockSupport {
-    method public static Object getBlocker(Thread);
-    method public static void park(Object);
-    method public static void park();
-    method public static void parkNanos(Object, long);
-    method public static void parkNanos(long);
-    method public static void parkUntil(Object, long);
-    method public static void parkUntil(long);
-    method public static void unpark(Thread);
-  }
-
-  public interface ReadWriteLock {
-    method public java.util.concurrent.locks.Lock readLock();
-    method public java.util.concurrent.locks.Lock writeLock();
-  }
-
-  public class ReentrantLock implements java.util.concurrent.locks.Lock java.io.Serializable {
-    ctor public ReentrantLock();
-    ctor public ReentrantLock(boolean);
-    method public int getHoldCount();
-    method protected Thread getOwner();
-    method public final int getQueueLength();
-    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
-    method public int getWaitQueueLength(java.util.concurrent.locks.Condition);
-    method protected java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.Condition);
-    method public final boolean hasQueuedThread(Thread);
-    method public final boolean hasQueuedThreads();
-    method public boolean hasWaiters(java.util.concurrent.locks.Condition);
-    method public final boolean isFair();
-    method public boolean isHeldByCurrentThread();
-    method public boolean isLocked();
-    method public void lock();
-    method public void lockInterruptibly() throws java.lang.InterruptedException;
-    method public java.util.concurrent.locks.Condition newCondition();
-    method public boolean tryLock();
-    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void unlock();
-  }
-
-  public class ReentrantReadWriteLock implements java.util.concurrent.locks.ReadWriteLock java.io.Serializable {
-    ctor public ReentrantReadWriteLock();
-    ctor public ReentrantReadWriteLock(boolean);
-    method protected Thread getOwner();
-    method public final int getQueueLength();
-    method protected java.util.Collection<java.lang.Thread> getQueuedReaderThreads();
-    method protected java.util.Collection<java.lang.Thread> getQueuedThreads();
-    method protected java.util.Collection<java.lang.Thread> getQueuedWriterThreads();
-    method public int getReadHoldCount();
-    method public int getReadLockCount();
-    method public int getWaitQueueLength(java.util.concurrent.locks.Condition);
-    method protected java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.Condition);
-    method public int getWriteHoldCount();
-    method public final boolean hasQueuedThread(Thread);
-    method public final boolean hasQueuedThreads();
-    method public boolean hasWaiters(java.util.concurrent.locks.Condition);
-    method public final boolean isFair();
-    method public boolean isWriteLocked();
-    method public boolean isWriteLockedByCurrentThread();
-    method public java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock readLock();
-    method public java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock writeLock();
-  }
-
-  public static class ReentrantReadWriteLock.ReadLock implements java.util.concurrent.locks.Lock java.io.Serializable {
-    ctor protected ReentrantReadWriteLock.ReadLock(java.util.concurrent.locks.ReentrantReadWriteLock);
-    method public void lock();
-    method public void lockInterruptibly() throws java.lang.InterruptedException;
-    method public java.util.concurrent.locks.Condition newCondition();
-    method public boolean tryLock();
-    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void unlock();
-  }
-
-  public static class ReentrantReadWriteLock.WriteLock implements java.util.concurrent.locks.Lock java.io.Serializable {
-    ctor protected ReentrantReadWriteLock.WriteLock(java.util.concurrent.locks.ReentrantReadWriteLock);
-    method public int getHoldCount();
-    method public boolean isHeldByCurrentThread();
-    method public void lock();
-    method public void lockInterruptibly() throws java.lang.InterruptedException;
-    method public java.util.concurrent.locks.Condition newCondition();
-    method public boolean tryLock();
-    method public boolean tryLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void unlock();
-  }
-
-  public class StampedLock implements java.io.Serializable {
-    ctor public StampedLock();
-    method public java.util.concurrent.locks.Lock asReadLock();
-    method public java.util.concurrent.locks.ReadWriteLock asReadWriteLock();
-    method public java.util.concurrent.locks.Lock asWriteLock();
-    method public int getReadLockCount();
-    method public boolean isReadLocked();
-    method public boolean isWriteLocked();
-    method public long readLock();
-    method public long readLockInterruptibly() throws java.lang.InterruptedException;
-    method public long tryConvertToOptimisticRead(long);
-    method public long tryConvertToReadLock(long);
-    method public long tryConvertToWriteLock(long);
-    method public long tryOptimisticRead();
-    method public long tryReadLock();
-    method public long tryReadLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public boolean tryUnlockRead();
-    method public boolean tryUnlockWrite();
-    method public long tryWriteLock();
-    method public long tryWriteLock(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
-    method public void unlock(long);
-    method public void unlockRead(long);
-    method public void unlockWrite(long);
-    method public boolean validate(long);
-    method public long writeLock();
-    method public long writeLockInterruptibly() throws java.lang.InterruptedException;
-  }
-
-}
-
-package java.util.function {
-
-  @java.lang.FunctionalInterface public interface BiConsumer<T, U> {
-    method public void accept(T, U);
-    method public default java.util.function.BiConsumer<T,U> andThen(java.util.function.BiConsumer<? super T,? super U>);
-  }
-
-  @java.lang.FunctionalInterface public interface BiFunction<T, U, R> {
-    method public default <V> java.util.function.BiFunction<T,U,V> andThen(java.util.function.Function<? super R,? extends V>);
-    method public R apply(T, U);
-  }
-
-  @java.lang.FunctionalInterface public interface BiPredicate<T, U> {
-    method public default java.util.function.BiPredicate<T,U> and(java.util.function.BiPredicate<? super T,? super U>);
-    method public default java.util.function.BiPredicate<T,U> negate();
-    method public default java.util.function.BiPredicate<T,U> or(java.util.function.BiPredicate<? super T,? super U>);
-    method public boolean test(T, U);
-  }
-
-  @java.lang.FunctionalInterface public interface BinaryOperator<T> extends java.util.function.BiFunction<T,T,T> {
-    method public static <T> java.util.function.BinaryOperator<T> maxBy(java.util.Comparator<? super T>);
-    method public static <T> java.util.function.BinaryOperator<T> minBy(java.util.Comparator<? super T>);
-  }
-
-  @java.lang.FunctionalInterface public interface BooleanSupplier {
-    method public boolean getAsBoolean();
-  }
-
-  @java.lang.FunctionalInterface public interface Consumer<T> {
-    method public void accept(T);
-    method public default java.util.function.Consumer<T> andThen(java.util.function.Consumer<? super T>);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleBinaryOperator {
-    method public double applyAsDouble(double, double);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleConsumer {
-    method public void accept(double);
-    method public default java.util.function.DoubleConsumer andThen(java.util.function.DoubleConsumer);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleFunction<R> {
-    method public R apply(double);
-  }
-
-  @java.lang.FunctionalInterface public interface DoublePredicate {
-    method public default java.util.function.DoublePredicate and(java.util.function.DoublePredicate);
-    method public default java.util.function.DoublePredicate negate();
-    method public default java.util.function.DoublePredicate or(java.util.function.DoublePredicate);
-    method public boolean test(double);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleSupplier {
-    method public double getAsDouble();
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleToIntFunction {
-    method public int applyAsInt(double);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleToLongFunction {
-    method public long applyAsLong(double);
-  }
-
-  @java.lang.FunctionalInterface public interface DoubleUnaryOperator {
-    method public default java.util.function.DoubleUnaryOperator andThen(java.util.function.DoubleUnaryOperator);
-    method public double applyAsDouble(double);
-    method public default java.util.function.DoubleUnaryOperator compose(java.util.function.DoubleUnaryOperator);
-    method public static java.util.function.DoubleUnaryOperator identity();
-  }
-
-  @java.lang.FunctionalInterface public interface Function<T, R> {
-    method public default <V> java.util.function.Function<T,V> andThen(java.util.function.Function<? super R,? extends V>);
-    method public R apply(T);
-    method public default <V> java.util.function.Function<V,R> compose(java.util.function.Function<? super V,? extends T>);
-    method public static <T> java.util.function.Function<T,T> identity();
-  }
-
-  @java.lang.FunctionalInterface public interface IntBinaryOperator {
-    method public int applyAsInt(int, int);
-  }
-
-  @java.lang.FunctionalInterface public interface IntConsumer {
-    method public void accept(int);
-    method public default java.util.function.IntConsumer andThen(java.util.function.IntConsumer);
-  }
-
-  @java.lang.FunctionalInterface public interface IntFunction<R> {
-    method public R apply(int);
-  }
-
-  @java.lang.FunctionalInterface public interface IntPredicate {
-    method public default java.util.function.IntPredicate and(java.util.function.IntPredicate);
-    method public default java.util.function.IntPredicate negate();
-    method public default java.util.function.IntPredicate or(java.util.function.IntPredicate);
-    method public boolean test(int);
-  }
-
-  @java.lang.FunctionalInterface public interface IntSupplier {
-    method public int getAsInt();
-  }
-
-  @java.lang.FunctionalInterface public interface IntToDoubleFunction {
-    method public double applyAsDouble(int);
-  }
-
-  @java.lang.FunctionalInterface public interface IntToLongFunction {
-    method public long applyAsLong(int);
-  }
-
-  @java.lang.FunctionalInterface public interface IntUnaryOperator {
-    method public default java.util.function.IntUnaryOperator andThen(java.util.function.IntUnaryOperator);
-    method public int applyAsInt(int);
-    method public default java.util.function.IntUnaryOperator compose(java.util.function.IntUnaryOperator);
-    method public static java.util.function.IntUnaryOperator identity();
-  }
-
-  @java.lang.FunctionalInterface public interface LongBinaryOperator {
-    method public long applyAsLong(long, long);
-  }
-
-  @java.lang.FunctionalInterface public interface LongConsumer {
-    method public void accept(long);
-    method public default java.util.function.LongConsumer andThen(java.util.function.LongConsumer);
-  }
-
-  @java.lang.FunctionalInterface public interface LongFunction<R> {
-    method public R apply(long);
-  }
-
-  @java.lang.FunctionalInterface public interface LongPredicate {
-    method public default java.util.function.LongPredicate and(java.util.function.LongPredicate);
-    method public default java.util.function.LongPredicate negate();
-    method public default java.util.function.LongPredicate or(java.util.function.LongPredicate);
-    method public boolean test(long);
-  }
-
-  @java.lang.FunctionalInterface public interface LongSupplier {
-    method public long getAsLong();
-  }
-
-  @java.lang.FunctionalInterface public interface LongToDoubleFunction {
-    method public double applyAsDouble(long);
-  }
-
-  @java.lang.FunctionalInterface public interface LongToIntFunction {
-    method public int applyAsInt(long);
-  }
-
-  @java.lang.FunctionalInterface public interface LongUnaryOperator {
-    method public default java.util.function.LongUnaryOperator andThen(java.util.function.LongUnaryOperator);
-    method public long applyAsLong(long);
-    method public default java.util.function.LongUnaryOperator compose(java.util.function.LongUnaryOperator);
-    method public static java.util.function.LongUnaryOperator identity();
-  }
-
-  @java.lang.FunctionalInterface public interface ObjDoubleConsumer<T> {
-    method public void accept(T, double);
-  }
-
-  @java.lang.FunctionalInterface public interface ObjIntConsumer<T> {
-    method public void accept(T, int);
-  }
-
-  @java.lang.FunctionalInterface public interface ObjLongConsumer<T> {
-    method public void accept(T, long);
-  }
-
-  @java.lang.FunctionalInterface public interface Predicate<T> {
-    method public default java.util.function.Predicate<T> and(java.util.function.Predicate<? super T>);
-    method public static <T> java.util.function.Predicate<T> isEqual(Object);
-    method public default java.util.function.Predicate<T> negate();
-    method public default java.util.function.Predicate<T> or(java.util.function.Predicate<? super T>);
-    method public boolean test(T);
-  }
-
-  @java.lang.FunctionalInterface public interface Supplier<T> {
-    method public T get();
-  }
-
-  @java.lang.FunctionalInterface public interface ToDoubleBiFunction<T, U> {
-    method public double applyAsDouble(T, U);
-  }
-
-  @java.lang.FunctionalInterface public interface ToDoubleFunction<T> {
-    method public double applyAsDouble(T);
-  }
-
-  @java.lang.FunctionalInterface public interface ToIntBiFunction<T, U> {
-    method public int applyAsInt(T, U);
-  }
-
-  @java.lang.FunctionalInterface public interface ToIntFunction<T> {
-    method public int applyAsInt(T);
-  }
-
-  @java.lang.FunctionalInterface public interface ToLongBiFunction<T, U> {
-    method public long applyAsLong(T, U);
-  }
-
-  @java.lang.FunctionalInterface public interface ToLongFunction<T> {
-    method public long applyAsLong(T);
-  }
-
-  @java.lang.FunctionalInterface public interface UnaryOperator<T> extends java.util.function.Function<T,T> {
-    method public static <T> java.util.function.UnaryOperator<T> identity();
-  }
-
-}
-
-package java.util.jar {
-
-  public class Attributes implements java.lang.Cloneable java.util.Map<java.lang.Object,java.lang.Object> {
-    ctor public Attributes();
-    ctor public Attributes(int);
-    ctor public Attributes(java.util.jar.Attributes);
-    method public void clear();
-    method public Object clone();
-    method public boolean containsKey(Object);
-    method public boolean containsValue(Object);
-    method public java.util.Set<java.util.Map.Entry<java.lang.Object,java.lang.Object>> entrySet();
-    method public Object get(Object);
-    method public String getValue(String);
-    method public String getValue(java.util.jar.Attributes.Name);
-    method public boolean isEmpty();
-    method public java.util.Set<java.lang.Object> keySet();
-    method public Object put(Object, Object);
-    method public void putAll(java.util.Map<?,?>);
-    method public String putValue(String, String);
-    method public Object remove(Object);
-    method public int size();
-    method public java.util.Collection<java.lang.Object> values();
-    field protected java.util.Map<java.lang.Object,java.lang.Object> map;
-  }
-
-  public static class Attributes.Name {
-    ctor public Attributes.Name(String);
-    field public static final java.util.jar.Attributes.Name CLASS_PATH;
-    field public static final java.util.jar.Attributes.Name CONTENT_TYPE;
-    field @Deprecated public static final java.util.jar.Attributes.Name EXTENSION_INSTALLATION;
-    field public static final java.util.jar.Attributes.Name EXTENSION_LIST;
-    field public static final java.util.jar.Attributes.Name EXTENSION_NAME;
-    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_TITLE;
-    field @Deprecated public static final java.util.jar.Attributes.Name IMPLEMENTATION_URL;
-    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_VENDOR;
-    field @Deprecated public static final java.util.jar.Attributes.Name IMPLEMENTATION_VENDOR_ID;
-    field public static final java.util.jar.Attributes.Name IMPLEMENTATION_VERSION;
-    field public static final java.util.jar.Attributes.Name MAIN_CLASS;
-    field public static final java.util.jar.Attributes.Name MANIFEST_VERSION;
-    field public static final java.util.jar.Attributes.Name SEALED;
-    field public static final java.util.jar.Attributes.Name SIGNATURE_VERSION;
-    field public static final java.util.jar.Attributes.Name SPECIFICATION_TITLE;
-    field public static final java.util.jar.Attributes.Name SPECIFICATION_VENDOR;
-    field public static final java.util.jar.Attributes.Name SPECIFICATION_VERSION;
-  }
-
-  public class JarEntry extends java.util.zip.ZipEntry {
-    ctor public JarEntry(String);
-    ctor public JarEntry(java.util.zip.ZipEntry);
-    ctor public JarEntry(java.util.jar.JarEntry);
-    method public java.util.jar.Attributes getAttributes() throws java.io.IOException;
-    method public java.security.cert.Certificate[] getCertificates();
-    method public java.security.CodeSigner[] getCodeSigners();
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-  }
-
-  public class JarException extends java.util.zip.ZipException {
-    ctor public JarException();
-    ctor public JarException(String);
-  }
-
-  public class JarFile extends java.util.zip.ZipFile {
-    ctor public JarFile(String) throws java.io.IOException;
-    ctor public JarFile(String, boolean) throws java.io.IOException;
-    ctor public JarFile(java.io.File) throws java.io.IOException;
-    ctor public JarFile(java.io.File, boolean) throws java.io.IOException;
-    ctor public JarFile(java.io.File, boolean, int) throws java.io.IOException;
-    method public java.util.Enumeration<java.util.jar.JarEntry> entries();
-    method public java.util.jar.JarEntry getJarEntry(String);
-    method public java.util.jar.Manifest getManifest() throws java.io.IOException;
-    method public java.util.stream.Stream<java.util.jar.JarEntry> stream();
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-    field public static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
-  }
-
-  public class JarInputStream extends java.util.zip.ZipInputStream {
-    ctor public JarInputStream(java.io.InputStream) throws java.io.IOException;
-    ctor public JarInputStream(java.io.InputStream, boolean) throws java.io.IOException;
-    method public java.util.jar.Manifest getManifest();
-    method public java.util.jar.JarEntry getNextJarEntry() throws java.io.IOException;
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-  }
-
-  public class JarOutputStream extends java.util.zip.ZipOutputStream {
-    ctor public JarOutputStream(java.io.OutputStream, java.util.jar.Manifest) throws java.io.IOException;
-    ctor public JarOutputStream(java.io.OutputStream) throws java.io.IOException;
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-  }
-
-  public class Manifest implements java.lang.Cloneable {
-    ctor public Manifest();
-    ctor public Manifest(java.io.InputStream) throws java.io.IOException;
-    ctor public Manifest(java.util.jar.Manifest);
-    method public void clear();
-    method public Object clone();
-    method public java.util.jar.Attributes getAttributes(String);
-    method public java.util.Map<java.lang.String,java.util.jar.Attributes> getEntries();
-    method public java.util.jar.Attributes getMainAttributes();
-    method public void read(java.io.InputStream) throws java.io.IOException;
-    method public void write(java.io.OutputStream) throws java.io.IOException;
-  }
-
-  public abstract class Pack200 {
-    method public static java.util.jar.Pack200.Packer newPacker();
-    method public static java.util.jar.Pack200.Unpacker newUnpacker();
-  }
-
-  public static interface Pack200.Packer {
-    method @Deprecated public default void addPropertyChangeListener(java.beans.PropertyChangeListener);
-    method public void pack(java.util.jar.JarFile, java.io.OutputStream) throws java.io.IOException;
-    method public void pack(java.util.jar.JarInputStream, java.io.OutputStream) throws java.io.IOException;
-    method public java.util.SortedMap<java.lang.String,java.lang.String> properties();
-    method @Deprecated public default void removePropertyChangeListener(java.beans.PropertyChangeListener);
-    field public static final String CLASS_ATTRIBUTE_PFX = "pack.class.attribute.";
-    field public static final String CODE_ATTRIBUTE_PFX = "pack.code.attribute.";
-    field public static final String DEFLATE_HINT = "pack.deflate.hint";
-    field public static final String EFFORT = "pack.effort";
-    field public static final String ERROR = "error";
-    field public static final String FALSE = "false";
-    field public static final String FIELD_ATTRIBUTE_PFX = "pack.field.attribute.";
-    field public static final String KEEP = "keep";
-    field public static final String KEEP_FILE_ORDER = "pack.keep.file.order";
-    field public static final String LATEST = "latest";
-    field public static final String METHOD_ATTRIBUTE_PFX = "pack.method.attribute.";
-    field public static final String MODIFICATION_TIME = "pack.modification.time";
-    field public static final String PASS = "pass";
-    field public static final String PASS_FILE_PFX = "pack.pass.file.";
-    field public static final String PROGRESS = "pack.progress";
-    field public static final String SEGMENT_LIMIT = "pack.segment.limit";
-    field public static final String STRIP = "strip";
-    field public static final String TRUE = "true";
-    field public static final String UNKNOWN_ATTRIBUTE = "pack.unknown.attribute";
-  }
-
-  public static interface Pack200.Unpacker {
-    method @Deprecated public default void addPropertyChangeListener(java.beans.PropertyChangeListener);
-    method public java.util.SortedMap<java.lang.String,java.lang.String> properties();
-    method @Deprecated public default void removePropertyChangeListener(java.beans.PropertyChangeListener);
-    method public void unpack(java.io.InputStream, java.util.jar.JarOutputStream) throws java.io.IOException;
-    method public void unpack(java.io.File, java.util.jar.JarOutputStream) throws java.io.IOException;
-    field public static final String DEFLATE_HINT = "unpack.deflate.hint";
-    field public static final String FALSE = "false";
-    field public static final String KEEP = "keep";
-    field public static final String PROGRESS = "unpack.progress";
-    field public static final String TRUE = "true";
-  }
-
-}
-
-package java.util.logging {
-
-  public class ConsoleHandler extends java.util.logging.StreamHandler {
-    ctor public ConsoleHandler();
-    method public void close();
-  }
-
-  public class ErrorManager {
-    ctor public ErrorManager();
-    method public void error(String, Exception, int);
-    field public static final int CLOSE_FAILURE = 3; // 0x3
-    field public static final int FLUSH_FAILURE = 2; // 0x2
-    field public static final int FORMAT_FAILURE = 5; // 0x5
-    field public static final int GENERIC_FAILURE = 0; // 0x0
-    field public static final int OPEN_FAILURE = 4; // 0x4
-    field public static final int WRITE_FAILURE = 1; // 0x1
-  }
-
-  public class FileHandler extends java.util.logging.StreamHandler {
-    ctor public FileHandler() throws java.io.IOException, java.lang.SecurityException;
-    ctor public FileHandler(String) throws java.io.IOException, java.lang.SecurityException;
-    ctor public FileHandler(String, boolean) throws java.io.IOException, java.lang.SecurityException;
-    ctor public FileHandler(String, int, int) throws java.io.IOException, java.lang.SecurityException;
-    ctor public FileHandler(String, int, int, boolean) throws java.io.IOException, java.lang.SecurityException;
-  }
-
-  @java.lang.FunctionalInterface public interface Filter {
-    method public boolean isLoggable(java.util.logging.LogRecord);
-  }
-
-  public abstract class Formatter {
-    ctor protected Formatter();
-    method public abstract String format(java.util.logging.LogRecord);
-    method public String formatMessage(java.util.logging.LogRecord);
-    method public String getHead(java.util.logging.Handler);
-    method public String getTail(java.util.logging.Handler);
-  }
-
-  public abstract class Handler {
-    ctor protected Handler();
-    method public abstract void close() throws java.lang.SecurityException;
-    method public abstract void flush();
-    method public String getEncoding();
-    method public java.util.logging.ErrorManager getErrorManager();
-    method public java.util.logging.Filter getFilter();
-    method public java.util.logging.Formatter getFormatter();
-    method public java.util.logging.Level getLevel();
-    method public boolean isLoggable(java.util.logging.LogRecord);
-    method public abstract void publish(java.util.logging.LogRecord);
-    method protected void reportError(String, Exception, int);
-    method public void setEncoding(String) throws java.lang.SecurityException, java.io.UnsupportedEncodingException;
-    method public void setErrorManager(java.util.logging.ErrorManager);
-    method public void setFilter(java.util.logging.Filter) throws java.lang.SecurityException;
-    method public void setFormatter(java.util.logging.Formatter) throws java.lang.SecurityException;
-    method public void setLevel(java.util.logging.Level) throws java.lang.SecurityException;
-  }
-
-  public class Level implements java.io.Serializable {
-    ctor protected Level(@NonNull String, int);
-    ctor protected Level(@NonNull String, int, @Nullable String);
-    method @NonNull public String getLocalizedName();
-    method @NonNull public String getName();
-    method @Nullable public String getResourceBundleName();
-    method public final int intValue();
-    method @NonNull public static java.util.logging.Level parse(@NonNull String) throws java.lang.IllegalArgumentException;
-    method @NonNull public final String toString();
-    field @NonNull public static final java.util.logging.Level ALL;
-    field @NonNull public static final java.util.logging.Level CONFIG;
-    field @NonNull public static final java.util.logging.Level FINE;
-    field @NonNull public static final java.util.logging.Level FINER;
-    field @NonNull public static final java.util.logging.Level FINEST;
-    field @NonNull public static final java.util.logging.Level INFO;
-    field @NonNull public static final java.util.logging.Level OFF;
-    field @NonNull public static final java.util.logging.Level SEVERE;
-    field @NonNull public static final java.util.logging.Level WARNING;
-  }
-
-  public class LogManager {
-    ctor protected LogManager();
-    method public boolean addLogger(java.util.logging.Logger);
-    method @Deprecated public void addPropertyChangeListener(java.beans.PropertyChangeListener) throws java.lang.SecurityException;
-    method public void checkAccess() throws java.lang.SecurityException;
-    method public static java.util.logging.LogManager getLogManager();
-    method public java.util.logging.Logger getLogger(String);
-    method public java.util.Enumeration<java.lang.String> getLoggerNames();
-    method public static java.util.logging.LoggingMXBean getLoggingMXBean();
-    method public String getProperty(String);
-    method public void readConfiguration() throws java.io.IOException, java.lang.SecurityException;
-    method public void readConfiguration(java.io.InputStream) throws java.io.IOException, java.lang.SecurityException;
-    method @Deprecated public void removePropertyChangeListener(java.beans.PropertyChangeListener) throws java.lang.SecurityException;
-    method public void reset() throws java.lang.SecurityException;
-    field public static final String LOGGING_MXBEAN_NAME = "java.util.logging:type=Logging";
-  }
-
-  public class LogRecord implements java.io.Serializable {
-    ctor public LogRecord(java.util.logging.Level, String);
-    method public java.util.logging.Level getLevel();
-    method public String getLoggerName();
-    method public String getMessage();
-    method public long getMillis();
-    method public Object[] getParameters();
-    method public java.util.ResourceBundle getResourceBundle();
-    method public String getResourceBundleName();
-    method public long getSequenceNumber();
-    method public String getSourceClassName();
-    method public String getSourceMethodName();
-    method public int getThreadID();
-    method public Throwable getThrown();
-    method public void setLevel(java.util.logging.Level);
-    method public void setLoggerName(String);
-    method public void setMessage(String);
-    method public void setMillis(long);
-    method public void setParameters(Object[]);
-    method public void setResourceBundle(java.util.ResourceBundle);
-    method public void setResourceBundleName(String);
-    method public void setSequenceNumber(long);
-    method public void setSourceClassName(String);
-    method public void setSourceMethodName(String);
-    method public void setThreadID(int);
-    method public void setThrown(Throwable);
-  }
-
-  public class Logger {
-    ctor protected Logger(@Nullable String, @Nullable String);
-    method public void addHandler(@NonNull java.util.logging.Handler) throws java.lang.SecurityException;
-    method public void config(@Nullable String);
-    method public void config(@NonNull java.util.function.Supplier<java.lang.String>);
-    method public void entering(@Nullable String, @Nullable String);
-    method public void entering(@Nullable String, @Nullable String, @Nullable Object);
-    method public void entering(@Nullable String, @Nullable String, @Nullable Object[]);
-    method public void exiting(@Nullable String, @Nullable String);
-    method public void exiting(@Nullable String, @Nullable String, @Nullable Object);
-    method public void fine(@Nullable String);
-    method public void fine(@NonNull java.util.function.Supplier<java.lang.String>);
-    method public void finer(@Nullable String);
-    method public void finer(@NonNull java.util.function.Supplier<java.lang.String>);
-    method public void finest(@Nullable String);
-    method public void finest(@NonNull java.util.function.Supplier<java.lang.String>);
-    method @NonNull public static java.util.logging.Logger getAnonymousLogger();
-    method @NonNull public static java.util.logging.Logger getAnonymousLogger(@Nullable String);
-    method @Nullable public java.util.logging.Filter getFilter();
-    method @NonNull public static final java.util.logging.Logger getGlobal();
-    method @NonNull public java.util.logging.Handler[] getHandlers();
-    method @Nullable public java.util.logging.Level getLevel();
-    method @NonNull public static java.util.logging.Logger getLogger(@NonNull String);
-    method @NonNull public static java.util.logging.Logger getLogger(@NonNull String, @Nullable String);
-    method @Nullable public String getName();
-    method @Nullable public java.util.logging.Logger getParent();
-    method @Nullable public java.util.ResourceBundle getResourceBundle();
-    method @Nullable public String getResourceBundleName();
-    method public boolean getUseParentHandlers();
-    method public void info(@Nullable String);
-    method public void info(@NonNull java.util.function.Supplier<java.lang.String>);
-    method public boolean isLoggable(@NonNull java.util.logging.Level);
-    method public void log(@NonNull java.util.logging.LogRecord);
-    method public void log(@NonNull java.util.logging.Level, @Nullable String);
-    method public void log(@NonNull java.util.logging.Level, @NonNull java.util.function.Supplier<java.lang.String>);
-    method public void log(@NonNull java.util.logging.Level, @Nullable String, @Nullable Object);
-    method public void log(@NonNull java.util.logging.Level, @Nullable String, @Nullable Object[]);
-    method public void log(@NonNull java.util.logging.Level, @Nullable String, @Nullable Throwable);
-    method public void log(@NonNull java.util.logging.Level, @Nullable Throwable, @NonNull java.util.function.Supplier<java.lang.String>);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @NonNull java.util.function.Supplier<java.lang.String>);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable Object);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable Object[]);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable Throwable);
-    method public void logp(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable Throwable, @NonNull java.util.function.Supplier<java.lang.String>);
-    method @Deprecated public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable String);
-    method @Deprecated public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable String, @Nullable Object);
-    method @Deprecated public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable String, @Nullable Object[]);
-    method public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable java.util.ResourceBundle, @Nullable String, @Nullable java.lang.Object...);
-    method @Deprecated public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable String, @Nullable String, @Nullable Throwable);
-    method public void logrb(@NonNull java.util.logging.Level, @Nullable String, @Nullable String, @Nullable java.util.ResourceBundle, @Nullable String, @Nullable Throwable);
-    method public void removeHandler(@Nullable java.util.logging.Handler) throws java.lang.SecurityException;
-    method public void setFilter(@Nullable java.util.logging.Filter) throws java.lang.SecurityException;
-    method public void setLevel(@Nullable java.util.logging.Level) throws java.lang.SecurityException;
-    method public void setParent(@NonNull java.util.logging.Logger);
-    method public void setResourceBundle(@NonNull java.util.ResourceBundle);
-    method public void setUseParentHandlers(boolean);
-    method public void severe(@Nullable String);
-    method public void severe(@NonNull java.util.function.Supplier<java.lang.String>);
-    method public void throwing(@Nullable String, @Nullable String, @Nullable Throwable);
-    method public void warning(@Nullable String);
-    method public void warning(@NonNull java.util.function.Supplier<java.lang.String>);
-    field @NonNull public static final String GLOBAL_LOGGER_NAME = "global";
-    field @Deprecated @NonNull public static final java.util.logging.Logger global;
-  }
-
-  public interface LoggingMXBean {
-    method public String getLoggerLevel(String);
-    method public java.util.List<java.lang.String> getLoggerNames();
-    method public String getParentLoggerName(String);
-    method public void setLoggerLevel(String, String);
-  }
-
-  public final class LoggingPermission extends java.security.BasicPermission {
-    ctor public LoggingPermission(String, String) throws java.lang.IllegalArgumentException;
-  }
-
-  public class MemoryHandler extends java.util.logging.Handler {
-    ctor public MemoryHandler();
-    ctor public MemoryHandler(java.util.logging.Handler, int, java.util.logging.Level);
-    method public void close() throws java.lang.SecurityException;
-    method public void flush();
-    method public java.util.logging.Level getPushLevel();
-    method public void publish(java.util.logging.LogRecord);
-    method public void push();
-    method public void setPushLevel(java.util.logging.Level) throws java.lang.SecurityException;
-  }
-
-  public class SimpleFormatter extends java.util.logging.Formatter {
-    ctor public SimpleFormatter();
-    method public String format(java.util.logging.LogRecord);
-  }
-
-  public class SocketHandler extends java.util.logging.StreamHandler {
-    ctor public SocketHandler() throws java.io.IOException;
-    ctor public SocketHandler(String, int) throws java.io.IOException;
-  }
-
-  public class StreamHandler extends java.util.logging.Handler {
-    ctor public StreamHandler();
-    ctor public StreamHandler(java.io.OutputStream, java.util.logging.Formatter);
-    method public void close() throws java.lang.SecurityException;
-    method public void flush();
-    method public void publish(java.util.logging.LogRecord);
-    method protected void setOutputStream(java.io.OutputStream) throws java.lang.SecurityException;
-  }
-
-  public class XMLFormatter extends java.util.logging.Formatter {
-    ctor public XMLFormatter();
-    method public String format(java.util.logging.LogRecord);
-  }
-
-}
-
-package java.util.prefs {
-
-  public abstract class AbstractPreferences extends java.util.prefs.Preferences {
-    ctor protected AbstractPreferences(java.util.prefs.AbstractPreferences, String);
-    method public String absolutePath();
-    method public void addNodeChangeListener(java.util.prefs.NodeChangeListener);
-    method public void addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
-    method protected final java.util.prefs.AbstractPreferences[] cachedChildren();
-    method protected abstract java.util.prefs.AbstractPreferences childSpi(String);
-    method public String[] childrenNames() throws java.util.prefs.BackingStoreException;
-    method protected abstract String[] childrenNamesSpi() throws java.util.prefs.BackingStoreException;
-    method public void clear() throws java.util.prefs.BackingStoreException;
-    method public void exportNode(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
-    method public void exportSubtree(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
-    method public void flush() throws java.util.prefs.BackingStoreException;
-    method protected abstract void flushSpi() throws java.util.prefs.BackingStoreException;
-    method public String get(String, String);
-    method public boolean getBoolean(String, boolean);
-    method public byte[] getByteArray(String, byte[]);
-    method protected java.util.prefs.AbstractPreferences getChild(String) throws java.util.prefs.BackingStoreException;
-    method public double getDouble(String, double);
-    method public float getFloat(String, float);
-    method public int getInt(String, int);
-    method public long getLong(String, long);
-    method protected abstract String getSpi(String);
-    method protected boolean isRemoved();
-    method public boolean isUserNode();
-    method public String[] keys() throws java.util.prefs.BackingStoreException;
-    method protected abstract String[] keysSpi() throws java.util.prefs.BackingStoreException;
-    method public String name();
-    method public java.util.prefs.Preferences node(String);
-    method public boolean nodeExists(String) throws java.util.prefs.BackingStoreException;
-    method public java.util.prefs.Preferences parent();
-    method public void put(String, String);
-    method public void putBoolean(String, boolean);
-    method public void putByteArray(String, byte[]);
-    method public void putDouble(String, double);
-    method public void putFloat(String, float);
-    method public void putInt(String, int);
-    method public void putLong(String, long);
-    method protected abstract void putSpi(String, String);
-    method public void remove(String);
-    method public void removeNode() throws java.util.prefs.BackingStoreException;
-    method public void removeNodeChangeListener(java.util.prefs.NodeChangeListener);
-    method protected abstract void removeNodeSpi() throws java.util.prefs.BackingStoreException;
-    method public void removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
-    method protected abstract void removeSpi(String);
-    method public void sync() throws java.util.prefs.BackingStoreException;
-    method protected abstract void syncSpi() throws java.util.prefs.BackingStoreException;
-    field protected final Object lock;
-    field protected boolean newNode;
-  }
-
-  public class BackingStoreException extends java.lang.Exception {
-    ctor public BackingStoreException(String);
-    ctor public BackingStoreException(Throwable);
-  }
-
-  public class InvalidPreferencesFormatException extends java.lang.Exception {
-    ctor public InvalidPreferencesFormatException(Throwable);
-    ctor public InvalidPreferencesFormatException(String);
-    ctor public InvalidPreferencesFormatException(String, Throwable);
-  }
-
-  public class NodeChangeEvent extends java.util.EventObject {
-    ctor public NodeChangeEvent(java.util.prefs.Preferences, java.util.prefs.Preferences);
-    method public java.util.prefs.Preferences getChild();
-    method public java.util.prefs.Preferences getParent();
-  }
-
-  public interface NodeChangeListener extends java.util.EventListener {
-    method public void childAdded(java.util.prefs.NodeChangeEvent);
-    method public void childRemoved(java.util.prefs.NodeChangeEvent);
-  }
-
-  public class PreferenceChangeEvent extends java.util.EventObject {
-    ctor public PreferenceChangeEvent(java.util.prefs.Preferences, String, String);
-    method public String getKey();
-    method public String getNewValue();
-    method public java.util.prefs.Preferences getNode();
-  }
-
-  @java.lang.FunctionalInterface public interface PreferenceChangeListener extends java.util.EventListener {
-    method public void preferenceChange(java.util.prefs.PreferenceChangeEvent);
-  }
-
-  public abstract class Preferences {
-    ctor protected Preferences();
-    method public abstract String absolutePath();
-    method public abstract void addNodeChangeListener(java.util.prefs.NodeChangeListener);
-    method public abstract void addPreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
-    method public abstract String[] childrenNames() throws java.util.prefs.BackingStoreException;
-    method public abstract void clear() throws java.util.prefs.BackingStoreException;
-    method public abstract void exportNode(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
-    method public abstract void exportSubtree(java.io.OutputStream) throws java.util.prefs.BackingStoreException, java.io.IOException;
-    method public abstract void flush() throws java.util.prefs.BackingStoreException;
-    method public abstract String get(String, String);
-    method public abstract boolean getBoolean(String, boolean);
-    method public abstract byte[] getByteArray(String, byte[]);
-    method public abstract double getDouble(String, double);
-    method public abstract float getFloat(String, float);
-    method public abstract int getInt(String, int);
-    method public abstract long getLong(String, long);
-    method public static void importPreferences(java.io.InputStream) throws java.io.IOException, java.util.prefs.InvalidPreferencesFormatException;
-    method public abstract boolean isUserNode();
-    method public abstract String[] keys() throws java.util.prefs.BackingStoreException;
-    method public abstract String name();
-    method public abstract java.util.prefs.Preferences node(String);
-    method public abstract boolean nodeExists(String) throws java.util.prefs.BackingStoreException;
-    method public abstract java.util.prefs.Preferences parent();
-    method public abstract void put(String, String);
-    method public abstract void putBoolean(String, boolean);
-    method public abstract void putByteArray(String, byte[]);
-    method public abstract void putDouble(String, double);
-    method public abstract void putFloat(String, float);
-    method public abstract void putInt(String, int);
-    method public abstract void putLong(String, long);
-    method public abstract void remove(String);
-    method public abstract void removeNode() throws java.util.prefs.BackingStoreException;
-    method public abstract void removeNodeChangeListener(java.util.prefs.NodeChangeListener);
-    method public abstract void removePreferenceChangeListener(java.util.prefs.PreferenceChangeListener);
-    method public abstract void sync() throws java.util.prefs.BackingStoreException;
-    method public static java.util.prefs.Preferences systemNodeForPackage(Class<?>);
-    method public static java.util.prefs.Preferences systemRoot();
-    method public abstract String toString();
-    method public static java.util.prefs.Preferences userNodeForPackage(Class<?>);
-    method public static java.util.prefs.Preferences userRoot();
-    field public static final int MAX_KEY_LENGTH = 80; // 0x50
-    field public static final int MAX_NAME_LENGTH = 80; // 0x50
-    field public static final int MAX_VALUE_LENGTH = 8192; // 0x2000
-  }
-
-  public interface PreferencesFactory {
-    method public java.util.prefs.Preferences systemRoot();
-    method public java.util.prefs.Preferences userRoot();
-  }
-
-}
-
-package java.util.regex {
-
-  public interface MatchResult {
-    method public int end();
-    method public int end(int);
-    method public String group();
-    method public String group(int);
-    method public int groupCount();
-    method public int start();
-    method public int start(int);
-  }
-
-  public final class Matcher implements java.util.regex.MatchResult {
-    method @NonNull public java.util.regex.Matcher appendReplacement(@NonNull StringBuffer, @NonNull String);
-    method @NonNull public StringBuffer appendTail(@NonNull StringBuffer);
-    method public int end();
-    method public int end(int);
-    method public int end(@NonNull String);
-    method public boolean find();
-    method public boolean find(int);
-    method @NonNull public String group();
-    method @Nullable public String group(int);
-    method @Nullable public String group(@NonNull String);
-    method public int groupCount();
-    method public boolean hasAnchoringBounds();
-    method public boolean hasTransparentBounds();
-    method public boolean hitEnd();
-    method public boolean lookingAt();
-    method public boolean matches();
-    method @NonNull public java.util.regex.Pattern pattern();
-    method @NonNull public static String quoteReplacement(@NonNull String);
-    method @NonNull public java.util.regex.Matcher region(int, int);
-    method public int regionEnd();
-    method public int regionStart();
-    method @NonNull public String replaceAll(@NonNull String);
-    method @NonNull public String replaceFirst(@NonNull String);
-    method public boolean requireEnd();
-    method @NonNull public java.util.regex.Matcher reset();
-    method @NonNull public java.util.regex.Matcher reset(@NonNull CharSequence);
-    method public int start();
-    method public int start(int);
-    method public int start(@NonNull String);
-    method @NonNull public java.util.regex.MatchResult toMatchResult();
-    method @NonNull public java.util.regex.Matcher useAnchoringBounds(boolean);
-    method @NonNull public java.util.regex.Matcher usePattern(@NonNull java.util.regex.Pattern);
-    method @NonNull public java.util.regex.Matcher useTransparentBounds(boolean);
-  }
-
-  public final class Pattern implements java.io.Serializable {
-    method @NonNull public java.util.function.Predicate<java.lang.String> asPredicate();
-    method @NonNull public static java.util.regex.Pattern compile(@NonNull String);
-    method @NonNull public static java.util.regex.Pattern compile(@NonNull String, int);
-    method public int flags();
-    method @NonNull public java.util.regex.Matcher matcher(@NonNull CharSequence);
-    method public static boolean matches(@NonNull String, @NonNull CharSequence);
-    method @NonNull public String pattern();
-    method @NonNull public static String quote(@NonNull String);
-    method @NonNull public String[] split(@NonNull CharSequence, int);
-    method @NonNull public String[] split(@NonNull CharSequence);
-    method @NonNull public java.util.stream.Stream<java.lang.String> splitAsStream(@NonNull CharSequence);
-    field public static final int CANON_EQ = 128; // 0x80
-    field public static final int CASE_INSENSITIVE = 2; // 0x2
-    field public static final int COMMENTS = 4; // 0x4
-    field public static final int DOTALL = 32; // 0x20
-    field public static final int LITERAL = 16; // 0x10
-    field public static final int MULTILINE = 8; // 0x8
-    field public static final int UNICODE_CASE = 64; // 0x40
-    field public static final int UNICODE_CHARACTER_CLASS = 256; // 0x100
-    field public static final int UNIX_LINES = 1; // 0x1
-  }
-
-  public class PatternSyntaxException extends java.lang.IllegalArgumentException {
-    ctor public PatternSyntaxException(String, String, int);
-    method public String getDescription();
-    method public int getIndex();
-    method public String getPattern();
-  }
-
-}
-
-package java.util.stream {
-
-  public interface BaseStream<T, S extends java.util.stream.BaseStream<T, S>> extends java.lang.AutoCloseable {
-    method public void close();
-    method public boolean isParallel();
-    method public java.util.Iterator<T> iterator();
-    method public S onClose(Runnable);
-    method public S parallel();
-    method public S sequential();
-    method public java.util.Spliterator<T> spliterator();
-    method public S unordered();
-  }
-
-  public interface Collector<T, A, R> {
-    method public java.util.function.BiConsumer<A,T> accumulator();
-    method public java.util.Set<java.util.stream.Collector.Characteristics> characteristics();
-    method public java.util.function.BinaryOperator<A> combiner();
-    method public java.util.function.Function<A,R> finisher();
-    method public static <T, R> java.util.stream.Collector<T,R,R> of(java.util.function.Supplier<R>, java.util.function.BiConsumer<R,T>, java.util.function.BinaryOperator<R>, java.util.stream.Collector.Characteristics...);
-    method public static <T, A, R> java.util.stream.Collector<T,A,R> of(java.util.function.Supplier<A>, java.util.function.BiConsumer<A,T>, java.util.function.BinaryOperator<A>, java.util.function.Function<A,R>, java.util.stream.Collector.Characteristics...);
-    method public java.util.function.Supplier<A> supplier();
-  }
-
-  public enum Collector.Characteristics {
-    enum_constant public static final java.util.stream.Collector.Characteristics CONCURRENT;
-    enum_constant public static final java.util.stream.Collector.Characteristics IDENTITY_FINISH;
-    enum_constant public static final java.util.stream.Collector.Characteristics UNORDERED;
-  }
-
-  public final class Collectors {
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingInt(java.util.function.ToIntFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Double> averagingLong(java.util.function.ToLongFunction<? super T>);
-    method public static <T, A, R, RR> java.util.stream.Collector<T,A,RR> collectingAndThen(java.util.stream.Collector<T,A,R>, java.util.function.Function<R,RR>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Long> counting();
-    method public static <T, K> java.util.stream.Collector<T,?,java.util.Map<K,java.util.List<T>>> groupingBy(java.util.function.Function<? super T,? extends K>);
-    method public static <T, K, A, D> java.util.stream.Collector<T,?,java.util.Map<K,D>> groupingBy(java.util.function.Function<? super T,? extends K>, java.util.stream.Collector<? super T,A,D>);
-    method public static <T, K, D, A, M extends java.util.Map<K, D>> java.util.stream.Collector<T,?,M> groupingBy(java.util.function.Function<? super T,? extends K>, java.util.function.Supplier<M>, java.util.stream.Collector<? super T,A,D>);
-    method public static <T, K> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,java.util.List<T>>> groupingByConcurrent(java.util.function.Function<? super T,? extends K>);
-    method public static <T, K, A, D> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,D>> groupingByConcurrent(java.util.function.Function<? super T,? extends K>, java.util.stream.Collector<? super T,A,D>);
-    method public static <T, K, A, D, M extends java.util.concurrent.ConcurrentMap<K, D>> java.util.stream.Collector<T,?,M> groupingByConcurrent(java.util.function.Function<? super T,? extends K>, java.util.function.Supplier<M>, java.util.stream.Collector<? super T,A,D>);
-    method public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining();
-    method public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining(CharSequence);
-    method public static java.util.stream.Collector<java.lang.CharSequence,?,java.lang.String> joining(CharSequence, CharSequence, CharSequence);
-    method public static <T, U, A, R> java.util.stream.Collector<T,?,R> mapping(java.util.function.Function<? super T,? extends U>, java.util.stream.Collector<? super U,A,R>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> maxBy(java.util.Comparator<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> minBy(java.util.Comparator<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.Map<java.lang.Boolean,java.util.List<T>>> partitioningBy(java.util.function.Predicate<? super T>);
-    method public static <T, D, A> java.util.stream.Collector<T,?,java.util.Map<java.lang.Boolean,D>> partitioningBy(java.util.function.Predicate<? super T>, java.util.stream.Collector<? super T,A,D>);
-    method public static <T> java.util.stream.Collector<T,?,T> reducing(T, java.util.function.BinaryOperator<T>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.Optional<T>> reducing(java.util.function.BinaryOperator<T>);
-    method public static <T, U> java.util.stream.Collector<T,?,U> reducing(U, java.util.function.Function<? super T,? extends U>, java.util.function.BinaryOperator<U>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.DoubleSummaryStatistics> summarizingDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.IntSummaryStatistics> summarizingInt(java.util.function.ToIntFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.LongSummaryStatistics> summarizingLong(java.util.function.ToLongFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Double> summingDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Integer> summingInt(java.util.function.ToIntFunction<? super T>);
-    method public static <T> java.util.stream.Collector<T,?,java.lang.Long> summingLong(java.util.function.ToLongFunction<? super T>);
-    method public static <T, C extends java.util.Collection<T>> java.util.stream.Collector<T,?,C> toCollection(java.util.function.Supplier<C>);
-    method public static <T, K, U> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,U>> toConcurrentMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>);
-    method public static <T, K, U> java.util.stream.Collector<T,?,java.util.concurrent.ConcurrentMap<K,U>> toConcurrentMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>, java.util.function.BinaryOperator<U>);
-    method public static <T, K, U, M extends java.util.concurrent.ConcurrentMap<K, U>> java.util.stream.Collector<T,?,M> toConcurrentMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>, java.util.function.BinaryOperator<U>, java.util.function.Supplier<M>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.List<T>> toList();
-    method public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>);
-    method public static <T, K, U> java.util.stream.Collector<T,?,java.util.Map<K,U>> toMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>, java.util.function.BinaryOperator<U>);
-    method public static <T, K, U, M extends java.util.Map<K, U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends K>, java.util.function.Function<? super T,? extends U>, java.util.function.BinaryOperator<U>, java.util.function.Supplier<M>);
-    method public static <T> java.util.stream.Collector<T,?,java.util.Set<T>> toSet();
-  }
-
-  public interface DoubleStream extends java.util.stream.BaseStream<java.lang.Double,java.util.stream.DoubleStream> {
-    method public boolean allMatch(java.util.function.DoublePredicate);
-    method public boolean anyMatch(java.util.function.DoublePredicate);
-    method public java.util.OptionalDouble average();
-    method public java.util.stream.Stream<java.lang.Double> boxed();
-    method public static java.util.stream.DoubleStream.Builder builder();
-    method public <R> R collect(java.util.function.Supplier<R>, java.util.function.ObjDoubleConsumer<R>, java.util.function.BiConsumer<R,R>);
-    method public static java.util.stream.DoubleStream concat(java.util.stream.DoubleStream, java.util.stream.DoubleStream);
-    method public long count();
-    method public java.util.stream.DoubleStream distinct();
-    method public static java.util.stream.DoubleStream empty();
-    method public java.util.stream.DoubleStream filter(java.util.function.DoublePredicate);
-    method public java.util.OptionalDouble findAny();
-    method public java.util.OptionalDouble findFirst();
-    method public java.util.stream.DoubleStream flatMap(java.util.function.DoubleFunction<? extends java.util.stream.DoubleStream>);
-    method public void forEach(java.util.function.DoubleConsumer);
-    method public void forEachOrdered(java.util.function.DoubleConsumer);
-    method public static java.util.stream.DoubleStream generate(java.util.function.DoubleSupplier);
-    method public static java.util.stream.DoubleStream iterate(double, java.util.function.DoubleUnaryOperator);
-    method public java.util.PrimitiveIterator.OfDouble iterator();
-    method public java.util.stream.DoubleStream limit(long);
-    method public java.util.stream.DoubleStream map(java.util.function.DoubleUnaryOperator);
-    method public java.util.stream.IntStream mapToInt(java.util.function.DoubleToIntFunction);
-    method public java.util.stream.LongStream mapToLong(java.util.function.DoubleToLongFunction);
-    method public <U> java.util.stream.Stream<U> mapToObj(java.util.function.DoubleFunction<? extends U>);
-    method public java.util.OptionalDouble max();
-    method public java.util.OptionalDouble min();
-    method public boolean noneMatch(java.util.function.DoublePredicate);
-    method public static java.util.stream.DoubleStream of(double);
-    method public static java.util.stream.DoubleStream of(double...);
-    method public java.util.stream.DoubleStream parallel();
-    method public java.util.stream.DoubleStream peek(java.util.function.DoubleConsumer);
-    method public double reduce(double, java.util.function.DoubleBinaryOperator);
-    method public java.util.OptionalDouble reduce(java.util.function.DoubleBinaryOperator);
-    method public java.util.stream.DoubleStream sequential();
-    method public java.util.stream.DoubleStream skip(long);
-    method public java.util.stream.DoubleStream sorted();
-    method public java.util.Spliterator.OfDouble spliterator();
-    method public double sum();
-    method public java.util.DoubleSummaryStatistics summaryStatistics();
-    method public double[] toArray();
-  }
-
-  public static interface DoubleStream.Builder extends java.util.function.DoubleConsumer {
-    method public default java.util.stream.DoubleStream.Builder add(double);
-    method public java.util.stream.DoubleStream build();
-  }
-
-  public interface IntStream extends java.util.stream.BaseStream<java.lang.Integer,java.util.stream.IntStream> {
-    method public boolean allMatch(java.util.function.IntPredicate);
-    method public boolean anyMatch(java.util.function.IntPredicate);
-    method public java.util.stream.DoubleStream asDoubleStream();
-    method public java.util.stream.LongStream asLongStream();
-    method public java.util.OptionalDouble average();
-    method public java.util.stream.Stream<java.lang.Integer> boxed();
-    method public static java.util.stream.IntStream.Builder builder();
-    method public <R> R collect(java.util.function.Supplier<R>, java.util.function.ObjIntConsumer<R>, java.util.function.BiConsumer<R,R>);
-    method public static java.util.stream.IntStream concat(java.util.stream.IntStream, java.util.stream.IntStream);
-    method public long count();
-    method public java.util.stream.IntStream distinct();
-    method public static java.util.stream.IntStream empty();
-    method public java.util.stream.IntStream filter(java.util.function.IntPredicate);
-    method public java.util.OptionalInt findAny();
-    method public java.util.OptionalInt findFirst();
-    method public java.util.stream.IntStream flatMap(java.util.function.IntFunction<? extends java.util.stream.IntStream>);
-    method public void forEach(java.util.function.IntConsumer);
-    method public void forEachOrdered(java.util.function.IntConsumer);
-    method public static java.util.stream.IntStream generate(java.util.function.IntSupplier);
-    method public static java.util.stream.IntStream iterate(int, java.util.function.IntUnaryOperator);
-    method public java.util.PrimitiveIterator.OfInt iterator();
-    method public java.util.stream.IntStream limit(long);
-    method public java.util.stream.IntStream map(java.util.function.IntUnaryOperator);
-    method public java.util.stream.DoubleStream mapToDouble(java.util.function.IntToDoubleFunction);
-    method public java.util.stream.LongStream mapToLong(java.util.function.IntToLongFunction);
-    method public <U> java.util.stream.Stream<U> mapToObj(java.util.function.IntFunction<? extends U>);
-    method public java.util.OptionalInt max();
-    method public java.util.OptionalInt min();
-    method public boolean noneMatch(java.util.function.IntPredicate);
-    method public static java.util.stream.IntStream of(int);
-    method public static java.util.stream.IntStream of(int...);
-    method public java.util.stream.IntStream parallel();
-    method public java.util.stream.IntStream peek(java.util.function.IntConsumer);
-    method public static java.util.stream.IntStream range(int, int);
-    method public static java.util.stream.IntStream rangeClosed(int, int);
-    method public int reduce(int, java.util.function.IntBinaryOperator);
-    method public java.util.OptionalInt reduce(java.util.function.IntBinaryOperator);
-    method public java.util.stream.IntStream sequential();
-    method public java.util.stream.IntStream skip(long);
-    method public java.util.stream.IntStream sorted();
-    method public java.util.Spliterator.OfInt spliterator();
-    method public int sum();
-    method public java.util.IntSummaryStatistics summaryStatistics();
-    method public int[] toArray();
-  }
-
-  public static interface IntStream.Builder extends java.util.function.IntConsumer {
-    method public default java.util.stream.IntStream.Builder add(int);
-    method public java.util.stream.IntStream build();
-  }
-
-  public interface LongStream extends java.util.stream.BaseStream<java.lang.Long,java.util.stream.LongStream> {
-    method public boolean allMatch(java.util.function.LongPredicate);
-    method public boolean anyMatch(java.util.function.LongPredicate);
-    method public java.util.stream.DoubleStream asDoubleStream();
-    method public java.util.OptionalDouble average();
-    method public java.util.stream.Stream<java.lang.Long> boxed();
-    method public static java.util.stream.LongStream.Builder builder();
-    method public <R> R collect(java.util.function.Supplier<R>, java.util.function.ObjLongConsumer<R>, java.util.function.BiConsumer<R,R>);
-    method public static java.util.stream.LongStream concat(java.util.stream.LongStream, java.util.stream.LongStream);
-    method public long count();
-    method public java.util.stream.LongStream distinct();
-    method public static java.util.stream.LongStream empty();
-    method public java.util.stream.LongStream filter(java.util.function.LongPredicate);
-    method public java.util.OptionalLong findAny();
-    method public java.util.OptionalLong findFirst();
-    method public java.util.stream.LongStream flatMap(java.util.function.LongFunction<? extends java.util.stream.LongStream>);
-    method public void forEach(java.util.function.LongConsumer);
-    method public void forEachOrdered(java.util.function.LongConsumer);
-    method public static java.util.stream.LongStream generate(java.util.function.LongSupplier);
-    method public static java.util.stream.LongStream iterate(long, java.util.function.LongUnaryOperator);
-    method public java.util.PrimitiveIterator.OfLong iterator();
-    method public java.util.stream.LongStream limit(long);
-    method public java.util.stream.LongStream map(java.util.function.LongUnaryOperator);
-    method public java.util.stream.DoubleStream mapToDouble(java.util.function.LongToDoubleFunction);
-    method public java.util.stream.IntStream mapToInt(java.util.function.LongToIntFunction);
-    method public <U> java.util.stream.Stream<U> mapToObj(java.util.function.LongFunction<? extends U>);
-    method public java.util.OptionalLong max();
-    method public java.util.OptionalLong min();
-    method public boolean noneMatch(java.util.function.LongPredicate);
-    method public static java.util.stream.LongStream of(long);
-    method public static java.util.stream.LongStream of(long...);
-    method public java.util.stream.LongStream parallel();
-    method public java.util.stream.LongStream peek(java.util.function.LongConsumer);
-    method public static java.util.stream.LongStream range(long, long);
-    method public static java.util.stream.LongStream rangeClosed(long, long);
-    method public long reduce(long, java.util.function.LongBinaryOperator);
-    method public java.util.OptionalLong reduce(java.util.function.LongBinaryOperator);
-    method public java.util.stream.LongStream sequential();
-    method public java.util.stream.LongStream skip(long);
-    method public java.util.stream.LongStream sorted();
-    method public java.util.Spliterator.OfLong spliterator();
-    method public long sum();
-    method public java.util.LongSummaryStatistics summaryStatistics();
-    method public long[] toArray();
-  }
-
-  public static interface LongStream.Builder extends java.util.function.LongConsumer {
-    method public default java.util.stream.LongStream.Builder add(long);
-    method public java.util.stream.LongStream build();
-  }
-
-  public interface Stream<T> extends java.util.stream.BaseStream<T,java.util.stream.Stream<T>> {
-    method public boolean allMatch(java.util.function.Predicate<? super T>);
-    method public boolean anyMatch(java.util.function.Predicate<? super T>);
-    method public static <T> java.util.stream.Stream.Builder<T> builder();
-    method public <R> R collect(java.util.function.Supplier<R>, java.util.function.BiConsumer<R,? super T>, java.util.function.BiConsumer<R,R>);
-    method public <R, A> R collect(java.util.stream.Collector<? super T,A,R>);
-    method public static <T> java.util.stream.Stream<T> concat(java.util.stream.Stream<? extends T>, java.util.stream.Stream<? extends T>);
-    method public long count();
-    method public java.util.stream.Stream<T> distinct();
-    method public static <T> java.util.stream.Stream<T> empty();
-    method public java.util.stream.Stream<T> filter(java.util.function.Predicate<? super T>);
-    method public java.util.Optional<T> findAny();
-    method public java.util.Optional<T> findFirst();
-    method public <R> java.util.stream.Stream<R> flatMap(java.util.function.Function<? super T,? extends java.util.stream.Stream<? extends R>>);
-    method public java.util.stream.DoubleStream flatMapToDouble(java.util.function.Function<? super T,? extends java.util.stream.DoubleStream>);
-    method public java.util.stream.IntStream flatMapToInt(java.util.function.Function<? super T,? extends java.util.stream.IntStream>);
-    method public java.util.stream.LongStream flatMapToLong(java.util.function.Function<? super T,? extends java.util.stream.LongStream>);
-    method public void forEach(java.util.function.Consumer<? super T>);
-    method public void forEachOrdered(java.util.function.Consumer<? super T>);
-    method public static <T> java.util.stream.Stream<T> generate(java.util.function.Supplier<T>);
-    method public static <T> java.util.stream.Stream<T> iterate(T, java.util.function.UnaryOperator<T>);
-    method public java.util.stream.Stream<T> limit(long);
-    method public <R> java.util.stream.Stream<R> map(java.util.function.Function<? super T,? extends R>);
-    method public java.util.stream.DoubleStream mapToDouble(java.util.function.ToDoubleFunction<? super T>);
-    method public java.util.stream.IntStream mapToInt(java.util.function.ToIntFunction<? super T>);
-    method public java.util.stream.LongStream mapToLong(java.util.function.ToLongFunction<? super T>);
-    method public java.util.Optional<T> max(java.util.Comparator<? super T>);
-    method public java.util.Optional<T> min(java.util.Comparator<? super T>);
-    method public boolean noneMatch(java.util.function.Predicate<? super T>);
-    method public static <T> java.util.stream.Stream<T> of(T);
-    method @java.lang.SafeVarargs public static <T> java.util.stream.Stream<T> of(T...);
-    method public java.util.stream.Stream<T> peek(java.util.function.Consumer<? super T>);
-    method public T reduce(T, java.util.function.BinaryOperator<T>);
-    method public java.util.Optional<T> reduce(java.util.function.BinaryOperator<T>);
-    method public <U> U reduce(U, java.util.function.BiFunction<U,? super T,U>, java.util.function.BinaryOperator<U>);
-    method public java.util.stream.Stream<T> skip(long);
-    method public java.util.stream.Stream<T> sorted();
-    method public java.util.stream.Stream<T> sorted(java.util.Comparator<? super T>);
-    method public Object[] toArray();
-    method public <A> A[] toArray(java.util.function.IntFunction<A[]>);
-  }
-
-  public static interface Stream.Builder<T> extends java.util.function.Consumer<T> {
-    method public default java.util.stream.Stream.Builder<T> add(T);
-    method public java.util.stream.Stream<T> build();
-  }
-
-  public final class StreamSupport {
-    method public static java.util.stream.DoubleStream doubleStream(java.util.Spliterator.OfDouble, boolean);
-    method public static java.util.stream.DoubleStream doubleStream(java.util.function.Supplier<? extends java.util.Spliterator.OfDouble>, int, boolean);
-    method public static java.util.stream.IntStream intStream(java.util.Spliterator.OfInt, boolean);
-    method public static java.util.stream.IntStream intStream(java.util.function.Supplier<? extends java.util.Spliterator.OfInt>, int, boolean);
-    method public static java.util.stream.LongStream longStream(java.util.Spliterator.OfLong, boolean);
-    method public static java.util.stream.LongStream longStream(java.util.function.Supplier<? extends java.util.Spliterator.OfLong>, int, boolean);
-    method public static <T> java.util.stream.Stream<T> stream(java.util.Spliterator<T>, boolean);
-    method public static <T> java.util.stream.Stream<T> stream(java.util.function.Supplier<? extends java.util.Spliterator<T>>, int, boolean);
-  }
-
-}
-
-package java.util.zip {
-
-  public class Adler32 implements java.util.zip.Checksum {
-    ctor public Adler32();
-    method public long getValue();
-    method public void reset();
-    method public void update(int);
-    method public void update(byte[], int, int);
-    method public void update(byte[]);
-    method public void update(java.nio.ByteBuffer);
-  }
-
-  public class CRC32 implements java.util.zip.Checksum {
-    ctor public CRC32();
-    method public long getValue();
-    method public void reset();
-    method public void update(int);
-    method public void update(byte[], int, int);
-    method public void update(byte[]);
-    method public void update(java.nio.ByteBuffer);
-  }
-
-  public class CheckedInputStream extends java.io.FilterInputStream {
-    ctor public CheckedInputStream(java.io.InputStream, java.util.zip.Checksum);
-    method public java.util.zip.Checksum getChecksum();
-  }
-
-  public class CheckedOutputStream extends java.io.FilterOutputStream {
-    ctor public CheckedOutputStream(java.io.OutputStream, java.util.zip.Checksum);
-    method public java.util.zip.Checksum getChecksum();
-  }
-
-  public interface Checksum {
-    method public long getValue();
-    method public void reset();
-    method public void update(int);
-    method public void update(byte[], int, int);
-  }
-
-  public class DataFormatException extends java.lang.Exception {
-    ctor public DataFormatException();
-    ctor public DataFormatException(String);
-  }
-
-  public class Deflater {
-    ctor public Deflater(int, boolean);
-    ctor public Deflater(int);
-    ctor public Deflater();
-    method public int deflate(byte[], int, int);
-    method public int deflate(byte[]);
-    method public int deflate(byte[], int, int, int);
-    method public void end();
-    method protected void finalize();
-    method public void finish();
-    method public boolean finished();
-    method public int getAdler();
-    method public long getBytesRead();
-    method public long getBytesWritten();
-    method public int getTotalIn();
-    method public int getTotalOut();
-    method public boolean needsInput();
-    method public void reset();
-    method public void setDictionary(byte[], int, int);
-    method public void setDictionary(byte[]);
-    method public void setInput(byte[], int, int);
-    method public void setInput(byte[]);
-    method public void setLevel(int);
-    method public void setStrategy(int);
-    field public static final int BEST_COMPRESSION = 9; // 0x9
-    field public static final int BEST_SPEED = 1; // 0x1
-    field public static final int DEFAULT_COMPRESSION = -1; // 0xffffffff
-    field public static final int DEFAULT_STRATEGY = 0; // 0x0
-    field public static final int DEFLATED = 8; // 0x8
-    field public static final int FILTERED = 1; // 0x1
-    field public static final int FULL_FLUSH = 3; // 0x3
-    field public static final int HUFFMAN_ONLY = 2; // 0x2
-    field public static final int NO_COMPRESSION = 0; // 0x0
-    field public static final int NO_FLUSH = 0; // 0x0
-    field public static final int SYNC_FLUSH = 2; // 0x2
-  }
-
-  public class DeflaterInputStream extends java.io.FilterInputStream {
-    ctor public DeflaterInputStream(java.io.InputStream);
-    ctor public DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater);
-    ctor public DeflaterInputStream(java.io.InputStream, java.util.zip.Deflater, int);
-    field protected final byte[] buf;
-    field protected final java.util.zip.Deflater def;
-  }
-
-  public class DeflaterOutputStream extends java.io.FilterOutputStream {
-    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int, boolean);
-    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, int);
-    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater, boolean);
-    ctor public DeflaterOutputStream(java.io.OutputStream, java.util.zip.Deflater);
-    ctor public DeflaterOutputStream(java.io.OutputStream, boolean);
-    ctor public DeflaterOutputStream(java.io.OutputStream);
-    method protected void deflate() throws java.io.IOException;
-    method public void finish() throws java.io.IOException;
-    field protected byte[] buf;
-    field protected java.util.zip.Deflater def;
-  }
-
-  public class GZIPInputStream extends java.util.zip.InflaterInputStream {
-    ctor public GZIPInputStream(java.io.InputStream, int) throws java.io.IOException;
-    ctor public GZIPInputStream(java.io.InputStream) throws java.io.IOException;
-    field public static final int GZIP_MAGIC = 35615; // 0x8b1f
-    field protected java.util.zip.CRC32 crc;
-    field protected boolean eos;
-  }
-
-  public class GZIPOutputStream extends java.util.zip.DeflaterOutputStream {
-    ctor public GZIPOutputStream(java.io.OutputStream, int) throws java.io.IOException;
-    ctor public GZIPOutputStream(java.io.OutputStream, int, boolean) throws java.io.IOException;
-    ctor public GZIPOutputStream(java.io.OutputStream) throws java.io.IOException;
-    ctor public GZIPOutputStream(java.io.OutputStream, boolean) throws java.io.IOException;
-    field protected java.util.zip.CRC32 crc;
-  }
-
-  public class Inflater {
-    ctor public Inflater(boolean);
-    ctor public Inflater();
-    method public void end();
-    method protected void finalize();
-    method public boolean finished();
-    method public int getAdler();
-    method public long getBytesRead();
-    method public long getBytesWritten();
-    method public int getRemaining();
-    method public int getTotalIn();
-    method public int getTotalOut();
-    method public int inflate(byte[], int, int) throws java.util.zip.DataFormatException;
-    method public int inflate(byte[]) throws java.util.zip.DataFormatException;
-    method public boolean needsDictionary();
-    method public boolean needsInput();
-    method public void reset();
-    method public void setDictionary(byte[], int, int);
-    method public void setDictionary(byte[]);
-    method public void setInput(byte[], int, int);
-    method public void setInput(byte[]);
-  }
-
-  public class InflaterInputStream extends java.io.FilterInputStream {
-    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater, int);
-    ctor public InflaterInputStream(java.io.InputStream, java.util.zip.Inflater);
-    ctor public InflaterInputStream(java.io.InputStream);
-    method protected void fill() throws java.io.IOException;
-    field protected byte[] buf;
-    field @Deprecated protected boolean closed;
-    field protected java.util.zip.Inflater inf;
-    field protected int len;
-  }
-
-  public class InflaterOutputStream extends java.io.FilterOutputStream {
-    ctor public InflaterOutputStream(java.io.OutputStream);
-    ctor public InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater);
-    ctor public InflaterOutputStream(java.io.OutputStream, java.util.zip.Inflater, int);
-    method public void finish() throws java.io.IOException;
-    field protected final byte[] buf;
-    field protected final java.util.zip.Inflater inf;
-  }
-
-  public class ZipEntry implements java.lang.Cloneable {
-    ctor public ZipEntry(String);
-    ctor public ZipEntry(java.util.zip.ZipEntry);
-    method public Object clone();
-    method public String getComment();
-    method public long getCompressedSize();
-    method public long getCrc();
-    method public java.nio.file.attribute.FileTime getCreationTime();
-    method public byte[] getExtra();
-    method public java.nio.file.attribute.FileTime getLastAccessTime();
-    method public java.nio.file.attribute.FileTime getLastModifiedTime();
-    method public int getMethod();
-    method public String getName();
-    method public long getSize();
-    method public long getTime();
-    method public boolean isDirectory();
-    method public void setComment(String);
-    method public void setCompressedSize(long);
-    method public void setCrc(long);
-    method public java.util.zip.ZipEntry setCreationTime(java.nio.file.attribute.FileTime);
-    method public void setExtra(byte[]);
-    method public java.util.zip.ZipEntry setLastAccessTime(java.nio.file.attribute.FileTime);
-    method public java.util.zip.ZipEntry setLastModifiedTime(java.nio.file.attribute.FileTime);
-    method public void setMethod(int);
-    method public void setSize(long);
-    method public void setTime(long);
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int DEFLATED = 8; // 0x8
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-    field public static final int STORED = 0; // 0x0
-  }
-
-  public class ZipError extends java.lang.InternalError {
-    ctor public ZipError(String);
-  }
-
-  public class ZipException extends java.io.IOException {
-    ctor public ZipException();
-    ctor public ZipException(String);
-  }
-
-  public class ZipFile implements java.io.Closeable {
-    ctor public ZipFile(String) throws java.io.IOException;
-    ctor public ZipFile(java.io.File, int) throws java.io.IOException;
-    ctor public ZipFile(java.io.File) throws java.io.IOException, java.util.zip.ZipException;
-    ctor public ZipFile(java.io.File, int, java.nio.charset.Charset) throws java.io.IOException;
-    ctor public ZipFile(String, java.nio.charset.Charset) throws java.io.IOException;
-    ctor public ZipFile(java.io.File, java.nio.charset.Charset) throws java.io.IOException;
-    method public void close() throws java.io.IOException;
-    method public java.util.Enumeration<? extends java.util.zip.ZipEntry> entries();
-    method protected void finalize() throws java.io.IOException;
-    method public String getComment();
-    method public java.util.zip.ZipEntry getEntry(String);
-    method public java.io.InputStream getInputStream(java.util.zip.ZipEntry) throws java.io.IOException;
-    method public String getName();
-    method public int size();
-    method public java.util.stream.Stream<? extends java.util.zip.ZipEntry> stream();
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-    field public static final int OPEN_DELETE = 4; // 0x4
-    field public static final int OPEN_READ = 1; // 0x1
-  }
-
-  public class ZipInputStream extends java.util.zip.InflaterInputStream {
-    ctor public ZipInputStream(java.io.InputStream);
-    ctor public ZipInputStream(java.io.InputStream, java.nio.charset.Charset);
-    method public void closeEntry() throws java.io.IOException;
-    method protected java.util.zip.ZipEntry createZipEntry(String);
-    method public java.util.zip.ZipEntry getNextEntry() throws java.io.IOException;
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-  }
-
-  public class ZipOutputStream extends java.util.zip.DeflaterOutputStream {
-    ctor public ZipOutputStream(java.io.OutputStream);
-    ctor public ZipOutputStream(java.io.OutputStream, java.nio.charset.Charset);
-    method public void closeEntry() throws java.io.IOException;
-    method public void putNextEntry(java.util.zip.ZipEntry) throws java.io.IOException;
-    method public void setComment(String);
-    method public void setLevel(int);
-    method public void setMethod(int);
-    field public static final int CENATT = 36; // 0x24
-    field public static final int CENATX = 38; // 0x26
-    field public static final int CENCOM = 32; // 0x20
-    field public static final int CENCRC = 16; // 0x10
-    field public static final int CENDSK = 34; // 0x22
-    field public static final int CENEXT = 30; // 0x1e
-    field public static final int CENFLG = 8; // 0x8
-    field public static final int CENHDR = 46; // 0x2e
-    field public static final int CENHOW = 10; // 0xa
-    field public static final int CENLEN = 24; // 0x18
-    field public static final int CENNAM = 28; // 0x1c
-    field public static final int CENOFF = 42; // 0x2a
-    field public static final long CENSIG = 33639248L; // 0x2014b50L
-    field public static final int CENSIZ = 20; // 0x14
-    field public static final int CENTIM = 12; // 0xc
-    field public static final int CENVEM = 4; // 0x4
-    field public static final int CENVER = 6; // 0x6
-    field public static final int DEFLATED = 8; // 0x8
-    field public static final int ENDCOM = 20; // 0x14
-    field public static final int ENDHDR = 22; // 0x16
-    field public static final int ENDOFF = 16; // 0x10
-    field public static final long ENDSIG = 101010256L; // 0x6054b50L
-    field public static final int ENDSIZ = 12; // 0xc
-    field public static final int ENDSUB = 8; // 0x8
-    field public static final int ENDTOT = 10; // 0xa
-    field public static final int EXTCRC = 4; // 0x4
-    field public static final int EXTHDR = 16; // 0x10
-    field public static final int EXTLEN = 12; // 0xc
-    field public static final long EXTSIG = 134695760L; // 0x8074b50L
-    field public static final int EXTSIZ = 8; // 0x8
-    field public static final int LOCCRC = 14; // 0xe
-    field public static final int LOCEXT = 28; // 0x1c
-    field public static final int LOCFLG = 6; // 0x6
-    field public static final int LOCHDR = 30; // 0x1e
-    field public static final int LOCHOW = 8; // 0x8
-    field public static final int LOCLEN = 22; // 0x16
-    field public static final int LOCNAM = 26; // 0x1a
-    field public static final long LOCSIG = 67324752L; // 0x4034b50L
-    field public static final int LOCSIZ = 18; // 0x12
-    field public static final int LOCTIM = 10; // 0xa
-    field public static final int LOCVER = 4; // 0x4
-    field public static final int STORED = 0; // 0x0
-  }
-
-}
-
-package javax.crypto {
-
-  public class AEADBadTagException extends javax.crypto.BadPaddingException {
-    ctor public AEADBadTagException();
-    ctor public AEADBadTagException(String);
-  }
-
-  public class BadPaddingException extends java.security.GeneralSecurityException {
-    ctor public BadPaddingException();
-    ctor public BadPaddingException(String);
-  }
-
-  public class Cipher {
-    ctor protected Cipher(javax.crypto.CipherSpi, java.security.Provider, String);
-    method public final byte[] doFinal() throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
-    method public final int doFinal(byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method public final byte[] doFinal(byte[]) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
-    method public final byte[] doFinal(byte[], int, int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
-    method public final int doFinal(byte[], int, int, byte[]) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method public final int doFinal(byte[], int, int, byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method public final int doFinal(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method public final String getAlgorithm();
-    method public final int getBlockSize();
-    method public final javax.crypto.ExemptionMechanism getExemptionMechanism();
-    method public final byte[] getIV();
-    method public static final javax.crypto.Cipher getInstance(String) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException;
-    method public static final javax.crypto.Cipher getInstance(String, String) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.Cipher getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException;
-    method public static final int getMaxAllowedKeyLength(String) throws java.security.NoSuchAlgorithmException;
-    method public static final java.security.spec.AlgorithmParameterSpec getMaxAllowedParameterSpec(String) throws java.security.NoSuchAlgorithmException;
-    method public final int getOutputSize(int);
-    method public final java.security.AlgorithmParameters getParameters();
-    method public final java.security.Provider getProvider();
-    method public final void init(int, java.security.Key) throws java.security.InvalidKeyException;
-    method public final void init(int, java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method public final void init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(int, java.security.Key, java.security.AlgorithmParameters) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(int, java.security.cert.Certificate) throws java.security.InvalidKeyException;
-    method public final void init(int, java.security.cert.Certificate, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method public final java.security.Key unwrap(byte[], String, int) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method public final byte[] update(byte[]);
-    method public final byte[] update(byte[], int, int);
-    method public final int update(byte[], int, int, byte[]) throws javax.crypto.ShortBufferException;
-    method public final int update(byte[], int, int, byte[], int) throws javax.crypto.ShortBufferException;
-    method public final int update(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.ShortBufferException;
-    method public final void updateAAD(byte[]);
-    method public final void updateAAD(byte[], int, int);
-    method public final void updateAAD(java.nio.ByteBuffer);
-    method public final byte[] wrap(java.security.Key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException;
-    field public static final int DECRYPT_MODE = 2; // 0x2
-    field public static final int ENCRYPT_MODE = 1; // 0x1
-    field public static final int PRIVATE_KEY = 2; // 0x2
-    field public static final int PUBLIC_KEY = 1; // 0x1
-    field public static final int SECRET_KEY = 3; // 0x3
-    field public static final int UNWRAP_MODE = 4; // 0x4
-    field public static final int WRAP_MODE = 3; // 0x3
-  }
-
-  public class CipherInputStream extends java.io.FilterInputStream {
-    ctor public CipherInputStream(java.io.InputStream, javax.crypto.Cipher);
-    ctor protected CipherInputStream(java.io.InputStream);
-  }
-
-  public class CipherOutputStream extends java.io.FilterOutputStream {
-    ctor public CipherOutputStream(java.io.OutputStream, javax.crypto.Cipher);
-    ctor protected CipherOutputStream(java.io.OutputStream);
-  }
-
-  public abstract class CipherSpi {
-    ctor public CipherSpi();
-    method protected abstract byte[] engineDoFinal(byte[], int, int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException;
-    method protected abstract int engineDoFinal(byte[], int, int, byte[], int) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method protected int engineDoFinal(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.ShortBufferException;
-    method protected abstract int engineGetBlockSize();
-    method protected abstract byte[] engineGetIV();
-    method protected int engineGetKeySize(java.security.Key) throws java.security.InvalidKeyException;
-    method protected abstract int engineGetOutputSize(int);
-    method protected abstract java.security.AlgorithmParameters engineGetParameters();
-    method protected abstract void engineInit(int, java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method protected abstract void engineInit(int, java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method protected abstract void engineInit(int, java.security.Key, java.security.AlgorithmParameters, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method protected abstract void engineSetMode(String) throws java.security.NoSuchAlgorithmException;
-    method protected abstract void engineSetPadding(String) throws javax.crypto.NoSuchPaddingException;
-    method protected java.security.Key engineUnwrap(byte[], String, int) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method protected abstract byte[] engineUpdate(byte[], int, int);
-    method protected abstract int engineUpdate(byte[], int, int, byte[], int) throws javax.crypto.ShortBufferException;
-    method protected int engineUpdate(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.crypto.ShortBufferException;
-    method protected void engineUpdateAAD(byte[], int, int);
-    method protected void engineUpdateAAD(java.nio.ByteBuffer);
-    method protected byte[] engineWrap(java.security.Key) throws javax.crypto.IllegalBlockSizeException, java.security.InvalidKeyException;
-  }
-
-  public class EncryptedPrivateKeyInfo {
-    ctor public EncryptedPrivateKeyInfo(byte[]) throws java.io.IOException;
-    ctor public EncryptedPrivateKeyInfo(String, byte[]) throws java.security.NoSuchAlgorithmException;
-    ctor public EncryptedPrivateKeyInfo(java.security.AlgorithmParameters, byte[]) throws java.security.NoSuchAlgorithmException;
-    method public String getAlgName();
-    method public java.security.AlgorithmParameters getAlgParameters();
-    method public byte[] getEncoded() throws java.io.IOException;
-    method public byte[] getEncryptedData();
-    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(javax.crypto.Cipher) throws java.security.spec.InvalidKeySpecException;
-    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key, String) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public java.security.spec.PKCS8EncodedKeySpec getKeySpec(java.security.Key, java.security.Provider) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-  }
-
-  public class ExemptionMechanism {
-    ctor protected ExemptionMechanism(javax.crypto.ExemptionMechanismSpi, java.security.Provider, String);
-    method public final byte[] genExemptionBlob() throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException;
-    method public final int genExemptionBlob(byte[]) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
-    method public final int genExemptionBlob(byte[], int) throws javax.crypto.ExemptionMechanismException, java.lang.IllegalStateException, javax.crypto.ShortBufferException;
-    method public static final javax.crypto.ExemptionMechanism getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.crypto.ExemptionMechanism getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.ExemptionMechanism getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final String getName();
-    method public final int getOutputSize(int) throws java.lang.IllegalStateException;
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.Key) throws javax.crypto.ExemptionMechanismException, java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.AlgorithmParameters) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final boolean isCryptoAllowed(java.security.Key) throws javax.crypto.ExemptionMechanismException;
-  }
-
-  public class ExemptionMechanismException extends java.security.GeneralSecurityException {
-    ctor public ExemptionMechanismException();
-    ctor public ExemptionMechanismException(String);
-  }
-
-  public abstract class ExemptionMechanismSpi {
-    ctor public ExemptionMechanismSpi();
-    method protected abstract byte[] engineGenExemptionBlob() throws javax.crypto.ExemptionMechanismException;
-    method protected abstract int engineGenExemptionBlob(byte[], int) throws javax.crypto.ExemptionMechanismException, javax.crypto.ShortBufferException;
-    method protected abstract int engineGetOutputSize(int);
-    method protected abstract void engineInit(java.security.Key) throws javax.crypto.ExemptionMechanismException, java.security.InvalidKeyException;
-    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method protected abstract void engineInit(java.security.Key, java.security.AlgorithmParameters) throws javax.crypto.ExemptionMechanismException, java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-  }
-
-  public class IllegalBlockSizeException extends java.security.GeneralSecurityException {
-    ctor public IllegalBlockSizeException();
-    ctor public IllegalBlockSizeException(String);
-  }
-
-  public class KeyAgreement {
-    ctor protected KeyAgreement(javax.crypto.KeyAgreementSpi, java.security.Provider, String);
-    method public final java.security.Key doPhase(java.security.Key, boolean) throws java.lang.IllegalStateException, java.security.InvalidKeyException;
-    method public final byte[] generateSecret() throws java.lang.IllegalStateException;
-    method public final int generateSecret(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
-    method public final javax.crypto.SecretKey generateSecret(String) throws java.lang.IllegalStateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method public final String getAlgorithm();
-    method public static final javax.crypto.KeyAgreement getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.crypto.KeyAgreement getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.KeyAgreement getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.Key) throws java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-  }
-
-  public abstract class KeyAgreementSpi {
-    ctor public KeyAgreementSpi();
-    method protected abstract java.security.Key engineDoPhase(java.security.Key, boolean) throws java.lang.IllegalStateException, java.security.InvalidKeyException;
-    method protected abstract byte[] engineGenerateSecret() throws java.lang.IllegalStateException;
-    method protected abstract int engineGenerateSecret(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
-    method protected abstract javax.crypto.SecretKey engineGenerateSecret(String) throws java.lang.IllegalStateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method protected abstract void engineInit(java.security.Key, java.security.SecureRandom) throws java.security.InvalidKeyException;
-    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-  }
-
-  public class KeyGenerator {
-    ctor protected KeyGenerator(javax.crypto.KeyGeneratorSpi, java.security.Provider, String);
-    method public final javax.crypto.SecretKey generateKey();
-    method public final String getAlgorithm();
-    method public static final javax.crypto.KeyGenerator getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.crypto.KeyGenerator getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.KeyGenerator getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.SecureRandom);
-    method public final void init(java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException;
-    method public final void init(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
-    method public final void init(int);
-    method public final void init(int, java.security.SecureRandom);
-  }
-
-  public abstract class KeyGeneratorSpi {
-    ctor public KeyGeneratorSpi();
-    method protected abstract javax.crypto.SecretKey engineGenerateKey();
-    method protected abstract void engineInit(java.security.SecureRandom);
-    method protected abstract void engineInit(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom) throws java.security.InvalidAlgorithmParameterException;
-    method protected abstract void engineInit(int, java.security.SecureRandom);
-  }
-
-  public class Mac implements java.lang.Cloneable {
-    ctor protected Mac(javax.crypto.MacSpi, java.security.Provider, String);
-    method public final Object clone() throws java.lang.CloneNotSupportedException;
-    method public final byte[] doFinal() throws java.lang.IllegalStateException;
-    method public final void doFinal(byte[], int) throws java.lang.IllegalStateException, javax.crypto.ShortBufferException;
-    method public final byte[] doFinal(byte[]) throws java.lang.IllegalStateException;
-    method public final String getAlgorithm();
-    method public static final javax.crypto.Mac getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.crypto.Mac getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.Mac getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final int getMacLength();
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.Key) throws java.security.InvalidKeyException;
-    method public final void init(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method public final void reset();
-    method public final void update(byte) throws java.lang.IllegalStateException;
-    method public final void update(byte[]) throws java.lang.IllegalStateException;
-    method public final void update(byte[], int, int) throws java.lang.IllegalStateException;
-    method public final void update(java.nio.ByteBuffer);
-  }
-
-  public abstract class MacSpi {
-    ctor public MacSpi();
-    method public Object clone() throws java.lang.CloneNotSupportedException;
-    method protected abstract byte[] engineDoFinal();
-    method protected abstract int engineGetMacLength();
-    method protected abstract void engineInit(java.security.Key, java.security.spec.AlgorithmParameterSpec) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException;
-    method protected abstract void engineReset();
-    method protected abstract void engineUpdate(byte);
-    method protected abstract void engineUpdate(byte[], int, int);
-    method protected void engineUpdate(java.nio.ByteBuffer);
-  }
-
-  public class NoSuchPaddingException extends java.security.GeneralSecurityException {
-    ctor public NoSuchPaddingException();
-    ctor public NoSuchPaddingException(String);
-  }
-
-  public class NullCipher extends javax.crypto.Cipher {
-    ctor public NullCipher();
-  }
-
-  public class SealedObject implements java.io.Serializable {
-    ctor public SealedObject(java.io.Serializable, javax.crypto.Cipher) throws java.io.IOException, javax.crypto.IllegalBlockSizeException;
-    ctor protected SealedObject(javax.crypto.SealedObject);
-    method public final String getAlgorithm();
-    method public final Object getObject(java.security.Key) throws java.lang.ClassNotFoundException, java.io.IOException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException;
-    method public final Object getObject(javax.crypto.Cipher) throws javax.crypto.BadPaddingException, java.lang.ClassNotFoundException, java.io.IOException, javax.crypto.IllegalBlockSizeException;
-    method public final Object getObject(java.security.Key, String) throws java.lang.ClassNotFoundException, java.io.IOException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    field protected byte[] encodedParams;
-  }
-
-  public interface SecretKey extends java.security.Key javax.security.auth.Destroyable {
-    field public static final long serialVersionUID = -4795878709595146952L; // 0xbd719db928b8f538L
-  }
-
-  public class SecretKeyFactory {
-    ctor protected SecretKeyFactory(javax.crypto.SecretKeyFactorySpi, java.security.Provider, String);
-    method public final javax.crypto.SecretKey generateSecret(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method public final String getAlgorithm();
-    method public static final javax.crypto.SecretKeyFactory getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.crypto.SecretKeyFactory getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.crypto.SecretKeyFactory getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.spec.KeySpec getKeySpec(javax.crypto.SecretKey, Class<?>) throws java.security.spec.InvalidKeySpecException;
-    method public final java.security.Provider getProvider();
-    method public final javax.crypto.SecretKey translateKey(javax.crypto.SecretKey) throws java.security.InvalidKeyException;
-  }
-
-  public abstract class SecretKeyFactorySpi {
-    ctor public SecretKeyFactorySpi();
-    method protected abstract javax.crypto.SecretKey engineGenerateSecret(java.security.spec.KeySpec) throws java.security.spec.InvalidKeySpecException;
-    method protected abstract java.security.spec.KeySpec engineGetKeySpec(javax.crypto.SecretKey, Class<?>) throws java.security.spec.InvalidKeySpecException;
-    method protected abstract javax.crypto.SecretKey engineTranslateKey(javax.crypto.SecretKey) throws java.security.InvalidKeyException;
-  }
-
-  public class ShortBufferException extends java.security.GeneralSecurityException {
-    ctor public ShortBufferException();
-    ctor public ShortBufferException(String);
-  }
-
-}
-
-package javax.crypto.interfaces {
-
-  public interface DHKey {
-    method public javax.crypto.spec.DHParameterSpec getParams();
-  }
-
-  public interface DHPrivateKey extends javax.crypto.interfaces.DHKey java.security.PrivateKey {
-    method public java.math.BigInteger getX();
-    field public static final long serialVersionUID = 2211791113380396553L; // 0x1eb1dc4c8e677e09L
-  }
-
-  public interface DHPublicKey extends javax.crypto.interfaces.DHKey java.security.PublicKey {
-    method public java.math.BigInteger getY();
-    field public static final long serialVersionUID = -6628103563352519193L; // 0xa4043eed23df4de7L
-  }
-
-  public interface PBEKey extends javax.crypto.SecretKey {
-    method public int getIterationCount();
-    method public char[] getPassword();
-    method public byte[] getSalt();
-    field public static final long serialVersionUID = -1430015993304333921L; // 0xec279007d7f7c19fL
-  }
-
-}
-
-package javax.crypto.spec {
-
-  public class DESKeySpec implements java.security.spec.KeySpec {
-    ctor public DESKeySpec(byte[]) throws java.security.InvalidKeyException;
-    ctor public DESKeySpec(byte[], int) throws java.security.InvalidKeyException;
-    method public byte[] getKey();
-    method public static boolean isParityAdjusted(byte[], int) throws java.security.InvalidKeyException;
-    method public static boolean isWeak(byte[], int) throws java.security.InvalidKeyException;
-    field public static final int DES_KEY_LEN = 8; // 0x8
-  }
-
-  public class DESedeKeySpec implements java.security.spec.KeySpec {
-    ctor public DESedeKeySpec(byte[]) throws java.security.InvalidKeyException;
-    ctor public DESedeKeySpec(byte[], int) throws java.security.InvalidKeyException;
-    method public byte[] getKey();
-    method public static boolean isParityAdjusted(byte[], int) throws java.security.InvalidKeyException;
-    field public static final int DES_EDE_KEY_LEN = 24; // 0x18
-  }
-
-  public class DHGenParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public DHGenParameterSpec(int, int);
-    method public int getExponentSize();
-    method public int getPrimeSize();
-  }
-
-  public class DHParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public DHParameterSpec(java.math.BigInteger, java.math.BigInteger);
-    ctor public DHParameterSpec(java.math.BigInteger, java.math.BigInteger, int);
-    method public java.math.BigInteger getG();
-    method public int getL();
-    method public java.math.BigInteger getP();
-  }
-
-  public class DHPrivateKeySpec implements java.security.spec.KeySpec {
-    ctor public DHPrivateKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getX();
-  }
-
-  public class DHPublicKeySpec implements java.security.spec.KeySpec {
-    ctor public DHPublicKeySpec(java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public java.math.BigInteger getG();
-    method public java.math.BigInteger getP();
-    method public java.math.BigInteger getY();
-  }
-
-  public class GCMParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public GCMParameterSpec(int, byte[]);
-    ctor public GCMParameterSpec(int, byte[], int, int);
-    method public byte[] getIV();
-    method public int getTLen();
-  }
-
-  public class IvParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public IvParameterSpec(byte[]);
-    ctor public IvParameterSpec(byte[], int, int);
-    method public byte[] getIV();
-  }
-
-  public class OAEPParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public OAEPParameterSpec(String, String, java.security.spec.AlgorithmParameterSpec, javax.crypto.spec.PSource);
-    method public String getDigestAlgorithm();
-    method public String getMGFAlgorithm();
-    method public java.security.spec.AlgorithmParameterSpec getMGFParameters();
-    method public javax.crypto.spec.PSource getPSource();
-    field public static final javax.crypto.spec.OAEPParameterSpec DEFAULT;
-  }
-
-  public class PBEKeySpec implements java.security.spec.KeySpec {
-    ctor public PBEKeySpec(char[]);
-    ctor public PBEKeySpec(char[], byte[], int, int);
-    ctor public PBEKeySpec(char[], byte[], int);
-    method public final void clearPassword();
-    method public final int getIterationCount();
-    method public final int getKeyLength();
-    method public final char[] getPassword();
-    method public final byte[] getSalt();
-  }
-
-  public class PBEParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public PBEParameterSpec(byte[], int);
-    ctor public PBEParameterSpec(byte[], int, java.security.spec.AlgorithmParameterSpec);
-    method public int getIterationCount();
-    method public java.security.spec.AlgorithmParameterSpec getParameterSpec();
-    method public byte[] getSalt();
-  }
-
-  public class PSource {
-    ctor protected PSource(String);
-    method public String getAlgorithm();
-  }
-
-  public static final class PSource.PSpecified extends javax.crypto.spec.PSource {
-    ctor public PSource.PSpecified(byte[]);
-    method public byte[] getValue();
-    field public static final javax.crypto.spec.PSource.PSpecified DEFAULT;
-  }
-
-  public class RC2ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public RC2ParameterSpec(int);
-    ctor public RC2ParameterSpec(int, byte[]);
-    ctor public RC2ParameterSpec(int, byte[], int);
-    method public int getEffectiveKeyBits();
-    method public byte[] getIV();
-  }
-
-  public class RC5ParameterSpec implements java.security.spec.AlgorithmParameterSpec {
-    ctor public RC5ParameterSpec(int, int, int);
-    ctor public RC5ParameterSpec(int, int, int, byte[]);
-    ctor public RC5ParameterSpec(int, int, int, byte[], int);
-    method public byte[] getIV();
-    method public int getRounds();
-    method public int getVersion();
-    method public int getWordSize();
-  }
-
-  public class SecretKeySpec implements java.security.spec.KeySpec javax.crypto.SecretKey {
-    ctor public SecretKeySpec(byte[], String);
-    ctor public SecretKeySpec(byte[], int, int, String);
-    method public String getAlgorithm();
-    method public byte[] getEncoded();
-    method public String getFormat();
-  }
-
-}
-
 package javax.microedition.khronos.egl {
 
   public interface EGL {
@@ -77787,1527 +55376,6 @@
 
 }
 
-package javax.net {
-
-  public abstract class ServerSocketFactory {
-    ctor protected ServerSocketFactory();
-    method public java.net.ServerSocket createServerSocket() throws java.io.IOException;
-    method public abstract java.net.ServerSocket createServerSocket(int) throws java.io.IOException;
-    method public abstract java.net.ServerSocket createServerSocket(int, int) throws java.io.IOException;
-    method public abstract java.net.ServerSocket createServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
-    method public static javax.net.ServerSocketFactory getDefault();
-  }
-
-  public abstract class SocketFactory {
-    ctor protected SocketFactory();
-    method public java.net.Socket createSocket() throws java.io.IOException;
-    method public abstract java.net.Socket createSocket(String, int) throws java.io.IOException, java.net.UnknownHostException;
-    method public abstract java.net.Socket createSocket(String, int, java.net.InetAddress, int) throws java.io.IOException, java.net.UnknownHostException;
-    method public abstract java.net.Socket createSocket(java.net.InetAddress, int) throws java.io.IOException;
-    method public abstract java.net.Socket createSocket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
-    method public static javax.net.SocketFactory getDefault();
-  }
-
-}
-
-package javax.net.ssl {
-
-  public class CertPathTrustManagerParameters implements javax.net.ssl.ManagerFactoryParameters {
-    ctor public CertPathTrustManagerParameters(java.security.cert.CertPathParameters);
-    method public java.security.cert.CertPathParameters getParameters();
-  }
-
-  public abstract class ExtendedSSLSession implements javax.net.ssl.SSLSession {
-    ctor public ExtendedSSLSession();
-    method public abstract String[] getLocalSupportedSignatureAlgorithms();
-    method public abstract String[] getPeerSupportedSignatureAlgorithms();
-    method public java.util.List<javax.net.ssl.SNIServerName> getRequestedServerNames();
-  }
-
-  public class HandshakeCompletedEvent extends java.util.EventObject {
-    ctor public HandshakeCompletedEvent(javax.net.ssl.SSLSocket, javax.net.ssl.SSLSession);
-    method public String getCipherSuite();
-    method public java.security.cert.Certificate[] getLocalCertificates();
-    method public java.security.Principal getLocalPrincipal();
-    method public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public javax.net.ssl.SSLSession getSession();
-    method public javax.net.ssl.SSLSocket getSocket();
-  }
-
-  public interface HandshakeCompletedListener extends java.util.EventListener {
-    method public void handshakeCompleted(javax.net.ssl.HandshakeCompletedEvent);
-  }
-
-  public interface HostnameVerifier {
-    method public boolean verify(String, javax.net.ssl.SSLSession);
-  }
-
-  public abstract class HttpsURLConnection extends java.net.HttpURLConnection {
-    ctor protected HttpsURLConnection(java.net.URL);
-    method public abstract String getCipherSuite();
-    method public static javax.net.ssl.HostnameVerifier getDefaultHostnameVerifier();
-    method public static javax.net.ssl.SSLSocketFactory getDefaultSSLSocketFactory();
-    method public javax.net.ssl.HostnameVerifier getHostnameVerifier();
-    method public abstract java.security.cert.Certificate[] getLocalCertificates();
-    method public java.security.Principal getLocalPrincipal();
-    method public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public javax.net.ssl.SSLSocketFactory getSSLSocketFactory();
-    method public abstract java.security.cert.Certificate[] getServerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public static void setDefaultHostnameVerifier(javax.net.ssl.HostnameVerifier);
-    method public static void setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory);
-    method public void setHostnameVerifier(javax.net.ssl.HostnameVerifier);
-    method public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory);
-    field protected javax.net.ssl.HostnameVerifier hostnameVerifier;
-  }
-
-  public interface KeyManager {
-  }
-
-  public class KeyManagerFactory {
-    ctor protected KeyManagerFactory(javax.net.ssl.KeyManagerFactorySpi, java.security.Provider, String);
-    method public final String getAlgorithm();
-    method public static final String getDefaultAlgorithm();
-    method public static final javax.net.ssl.KeyManagerFactory getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.net.ssl.KeyManagerFactory getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.net.ssl.KeyManagerFactory getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final javax.net.ssl.KeyManager[] getKeyManagers();
-    method public final java.security.Provider getProvider();
-    method public final void init(java.security.KeyStore, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    method public final void init(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public abstract class KeyManagerFactorySpi {
-    ctor public KeyManagerFactorySpi();
-    method protected abstract javax.net.ssl.KeyManager[] engineGetKeyManagers();
-    method protected abstract void engineInit(java.security.KeyStore, char[]) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyException;
-    method protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public class KeyStoreBuilderParameters implements javax.net.ssl.ManagerFactoryParameters {
-    ctor public KeyStoreBuilderParameters(java.security.KeyStore.Builder);
-    ctor public KeyStoreBuilderParameters(java.util.List<java.security.KeyStore.Builder>);
-    method public java.util.List<java.security.KeyStore.Builder> getParameters();
-  }
-
-  public interface ManagerFactoryParameters {
-  }
-
-  public final class SNIHostName extends javax.net.ssl.SNIServerName {
-    ctor public SNIHostName(String);
-    ctor public SNIHostName(byte[]);
-    method public static javax.net.ssl.SNIMatcher createSNIMatcher(String);
-    method public String getAsciiName();
-  }
-
-  public abstract class SNIMatcher {
-    ctor protected SNIMatcher(int);
-    method public final int getType();
-    method public abstract boolean matches(javax.net.ssl.SNIServerName);
-  }
-
-  public abstract class SNIServerName {
-    ctor protected SNIServerName(int, byte[]);
-    method public final byte[] getEncoded();
-    method public final int getType();
-  }
-
-  public class SSLContext {
-    ctor protected SSLContext(javax.net.ssl.SSLContextSpi, java.security.Provider, String);
-    method public final javax.net.ssl.SSLEngine createSSLEngine();
-    method public final javax.net.ssl.SSLEngine createSSLEngine(String, int);
-    method public final javax.net.ssl.SSLSessionContext getClientSessionContext();
-    method public static javax.net.ssl.SSLContext getDefault() throws java.security.NoSuchAlgorithmException;
-    method public final javax.net.ssl.SSLParameters getDefaultSSLParameters();
-    method public static javax.net.ssl.SSLContext getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static javax.net.ssl.SSLContext getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static javax.net.ssl.SSLContext getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final String getProtocol();
-    method public final java.security.Provider getProvider();
-    method public final javax.net.ssl.SSLSessionContext getServerSessionContext();
-    method public final javax.net.ssl.SSLServerSocketFactory getServerSocketFactory();
-    method public final javax.net.ssl.SSLSocketFactory getSocketFactory();
-    method public final javax.net.ssl.SSLParameters getSupportedSSLParameters();
-    method public final void init(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) throws java.security.KeyManagementException;
-    method public static void setDefault(javax.net.ssl.SSLContext);
-  }
-
-  public abstract class SSLContextSpi {
-    ctor public SSLContextSpi();
-    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine();
-    method protected abstract javax.net.ssl.SSLEngine engineCreateSSLEngine(String, int);
-    method protected abstract javax.net.ssl.SSLSessionContext engineGetClientSessionContext();
-    method protected javax.net.ssl.SSLParameters engineGetDefaultSSLParameters();
-    method protected abstract javax.net.ssl.SSLSessionContext engineGetServerSessionContext();
-    method protected abstract javax.net.ssl.SSLServerSocketFactory engineGetServerSocketFactory();
-    method protected abstract javax.net.ssl.SSLSocketFactory engineGetSocketFactory();
-    method protected javax.net.ssl.SSLParameters engineGetSupportedSSLParameters();
-    method protected abstract void engineInit(javax.net.ssl.KeyManager[], javax.net.ssl.TrustManager[], java.security.SecureRandom) throws java.security.KeyManagementException;
-  }
-
-  public abstract class SSLEngine {
-    ctor protected SSLEngine();
-    ctor protected SSLEngine(String, int);
-    method public abstract void beginHandshake() throws javax.net.ssl.SSLException;
-    method public abstract void closeInbound() throws javax.net.ssl.SSLException;
-    method public abstract void closeOutbound();
-    method public String getApplicationProtocol();
-    method public abstract Runnable getDelegatedTask();
-    method public abstract boolean getEnableSessionCreation();
-    method public abstract String[] getEnabledCipherSuites();
-    method public abstract String[] getEnabledProtocols();
-    method public String getHandshakeApplicationProtocol();
-    method public java.util.function.BiFunction<javax.net.ssl.SSLEngine,java.util.List<java.lang.String>,java.lang.String> getHandshakeApplicationProtocolSelector();
-    method public javax.net.ssl.SSLSession getHandshakeSession();
-    method public abstract javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus();
-    method public abstract boolean getNeedClientAuth();
-    method public String getPeerHost();
-    method public int getPeerPort();
-    method public javax.net.ssl.SSLParameters getSSLParameters();
-    method public abstract javax.net.ssl.SSLSession getSession();
-    method public abstract String[] getSupportedCipherSuites();
-    method public abstract String[] getSupportedProtocols();
-    method public abstract boolean getUseClientMode();
-    method public abstract boolean getWantClientAuth();
-    method public abstract boolean isInboundDone();
-    method public abstract boolean isOutboundDone();
-    method public abstract void setEnableSessionCreation(boolean);
-    method public abstract void setEnabledCipherSuites(String[]);
-    method public abstract void setEnabledProtocols(String[]);
-    method public void setHandshakeApplicationProtocolSelector(java.util.function.BiFunction<javax.net.ssl.SSLEngine,java.util.List<java.lang.String>,java.lang.String>);
-    method public abstract void setNeedClientAuth(boolean);
-    method public void setSSLParameters(javax.net.ssl.SSLParameters);
-    method public abstract void setUseClientMode(boolean);
-    method public abstract void setWantClientAuth(boolean);
-    method public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
-    method public javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer[]) throws javax.net.ssl.SSLException;
-    method public abstract javax.net.ssl.SSLEngineResult unwrap(java.nio.ByteBuffer, java.nio.ByteBuffer[], int, int) throws javax.net.ssl.SSLException;
-    method public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
-    method public javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[], java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
-    method public abstract javax.net.ssl.SSLEngineResult wrap(java.nio.ByteBuffer[], int, int, java.nio.ByteBuffer) throws javax.net.ssl.SSLException;
-  }
-
-  public class SSLEngineResult {
-    ctor public SSLEngineResult(javax.net.ssl.SSLEngineResult.Status, javax.net.ssl.SSLEngineResult.HandshakeStatus, int, int);
-    method public final int bytesConsumed();
-    method public final int bytesProduced();
-    method public final javax.net.ssl.SSLEngineResult.HandshakeStatus getHandshakeStatus();
-    method public final javax.net.ssl.SSLEngineResult.Status getStatus();
-  }
-
-  public enum SSLEngineResult.HandshakeStatus {
-    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus FINISHED;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_TASK;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_UNWRAP;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NEED_WRAP;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.HandshakeStatus NOT_HANDSHAKING;
-  }
-
-  public enum SSLEngineResult.Status {
-    enum_constant public static final javax.net.ssl.SSLEngineResult.Status BUFFER_OVERFLOW;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.Status BUFFER_UNDERFLOW;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.Status CLOSED;
-    enum_constant public static final javax.net.ssl.SSLEngineResult.Status OK;
-  }
-
-  public class SSLException extends java.io.IOException {
-    ctor public SSLException(String);
-    ctor public SSLException(String, Throwable);
-    ctor public SSLException(Throwable);
-  }
-
-  public class SSLHandshakeException extends javax.net.ssl.SSLException {
-    ctor public SSLHandshakeException(String);
-  }
-
-  public class SSLKeyException extends javax.net.ssl.SSLException {
-    ctor public SSLKeyException(String);
-  }
-
-  public class SSLParameters {
-    ctor public SSLParameters();
-    ctor public SSLParameters(String[]);
-    ctor public SSLParameters(String[], String[]);
-    method public java.security.AlgorithmConstraints getAlgorithmConstraints();
-    method public String[] getApplicationProtocols();
-    method public String[] getCipherSuites();
-    method public String getEndpointIdentificationAlgorithm();
-    method public boolean getNeedClientAuth();
-    method public String[] getProtocols();
-    method public final java.util.Collection<javax.net.ssl.SNIMatcher> getSNIMatchers();
-    method public final java.util.List<javax.net.ssl.SNIServerName> getServerNames();
-    method public final boolean getUseCipherSuitesOrder();
-    method public boolean getWantClientAuth();
-    method public void setAlgorithmConstraints(java.security.AlgorithmConstraints);
-    method public void setApplicationProtocols(String[]);
-    method public void setCipherSuites(String[]);
-    method public void setEndpointIdentificationAlgorithm(String);
-    method public void setNeedClientAuth(boolean);
-    method public void setProtocols(String[]);
-    method public final void setSNIMatchers(java.util.Collection<javax.net.ssl.SNIMatcher>);
-    method public final void setServerNames(java.util.List<javax.net.ssl.SNIServerName>);
-    method public final void setUseCipherSuitesOrder(boolean);
-    method public void setWantClientAuth(boolean);
-  }
-
-  public class SSLPeerUnverifiedException extends javax.net.ssl.SSLException {
-    ctor public SSLPeerUnverifiedException(String);
-  }
-
-  public final class SSLPermission extends java.security.BasicPermission {
-    ctor public SSLPermission(String);
-    ctor public SSLPermission(String, String);
-  }
-
-  public class SSLProtocolException extends javax.net.ssl.SSLException {
-    ctor public SSLProtocolException(String);
-  }
-
-  public abstract class SSLServerSocket extends java.net.ServerSocket {
-    ctor protected SSLServerSocket() throws java.io.IOException;
-    ctor protected SSLServerSocket(int) throws java.io.IOException;
-    ctor protected SSLServerSocket(int, int) throws java.io.IOException;
-    ctor protected SSLServerSocket(int, int, java.net.InetAddress) throws java.io.IOException;
-    method public abstract boolean getEnableSessionCreation();
-    method public abstract String[] getEnabledCipherSuites();
-    method public abstract String[] getEnabledProtocols();
-    method public abstract boolean getNeedClientAuth();
-    method public javax.net.ssl.SSLParameters getSSLParameters();
-    method public abstract String[] getSupportedCipherSuites();
-    method public abstract String[] getSupportedProtocols();
-    method public abstract boolean getUseClientMode();
-    method public abstract boolean getWantClientAuth();
-    method public abstract void setEnableSessionCreation(boolean);
-    method public abstract void setEnabledCipherSuites(String[]);
-    method public abstract void setEnabledProtocols(String[]);
-    method public abstract void setNeedClientAuth(boolean);
-    method public void setSSLParameters(javax.net.ssl.SSLParameters);
-    method public abstract void setUseClientMode(boolean);
-    method public abstract void setWantClientAuth(boolean);
-  }
-
-  public abstract class SSLServerSocketFactory extends javax.net.ServerSocketFactory {
-    ctor protected SSLServerSocketFactory();
-    method public static javax.net.ServerSocketFactory getDefault();
-    method public abstract String[] getDefaultCipherSuites();
-    method public abstract String[] getSupportedCipherSuites();
-  }
-
-  public interface SSLSession {
-    method public int getApplicationBufferSize();
-    method public String getCipherSuite();
-    method public long getCreationTime();
-    method public byte[] getId();
-    method public long getLastAccessedTime();
-    method public java.security.cert.Certificate[] getLocalCertificates();
-    method public java.security.Principal getLocalPrincipal();
-    method public int getPacketBufferSize();
-    method public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public String getPeerHost();
-    method public int getPeerPort();
-    method public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException;
-    method public String getProtocol();
-    method public javax.net.ssl.SSLSessionContext getSessionContext();
-    method public Object getValue(String);
-    method public String[] getValueNames();
-    method public void invalidate();
-    method public boolean isValid();
-    method public void putValue(String, Object);
-    method public void removeValue(String);
-  }
-
-  public class SSLSessionBindingEvent extends java.util.EventObject {
-    ctor public SSLSessionBindingEvent(javax.net.ssl.SSLSession, String);
-    method public String getName();
-    method public javax.net.ssl.SSLSession getSession();
-  }
-
-  public interface SSLSessionBindingListener extends java.util.EventListener {
-    method public void valueBound(javax.net.ssl.SSLSessionBindingEvent);
-    method public void valueUnbound(javax.net.ssl.SSLSessionBindingEvent);
-  }
-
-  public interface SSLSessionContext {
-    method public java.util.Enumeration<byte[]> getIds();
-    method public javax.net.ssl.SSLSession getSession(byte[]);
-    method public int getSessionCacheSize();
-    method public int getSessionTimeout();
-    method public void setSessionCacheSize(int) throws java.lang.IllegalArgumentException;
-    method public void setSessionTimeout(int) throws java.lang.IllegalArgumentException;
-  }
-
-  public abstract class SSLSocket extends java.net.Socket {
-    ctor protected SSLSocket();
-    ctor protected SSLSocket(String, int) throws java.io.IOException, java.net.UnknownHostException;
-    ctor protected SSLSocket(java.net.InetAddress, int) throws java.io.IOException;
-    ctor protected SSLSocket(String, int, java.net.InetAddress, int) throws java.io.IOException, java.net.UnknownHostException;
-    ctor protected SSLSocket(java.net.InetAddress, int, java.net.InetAddress, int) throws java.io.IOException;
-    method public abstract void addHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
-    method public String getApplicationProtocol();
-    method public abstract boolean getEnableSessionCreation();
-    method public abstract String[] getEnabledCipherSuites();
-    method public abstract String[] getEnabledProtocols();
-    method public String getHandshakeApplicationProtocol();
-    method public java.util.function.BiFunction<javax.net.ssl.SSLSocket,java.util.List<java.lang.String>,java.lang.String> getHandshakeApplicationProtocolSelector();
-    method public javax.net.ssl.SSLSession getHandshakeSession();
-    method public abstract boolean getNeedClientAuth();
-    method public javax.net.ssl.SSLParameters getSSLParameters();
-    method public abstract javax.net.ssl.SSLSession getSession();
-    method public abstract String[] getSupportedCipherSuites();
-    method public abstract String[] getSupportedProtocols();
-    method public abstract boolean getUseClientMode();
-    method public abstract boolean getWantClientAuth();
-    method public abstract void removeHandshakeCompletedListener(javax.net.ssl.HandshakeCompletedListener);
-    method public abstract void setEnableSessionCreation(boolean);
-    method public abstract void setEnabledCipherSuites(String[]);
-    method public abstract void setEnabledProtocols(String[]);
-    method public void setHandshakeApplicationProtocolSelector(java.util.function.BiFunction<javax.net.ssl.SSLSocket,java.util.List<java.lang.String>,java.lang.String>);
-    method public abstract void setNeedClientAuth(boolean);
-    method public void setSSLParameters(javax.net.ssl.SSLParameters);
-    method public abstract void setUseClientMode(boolean);
-    method public abstract void setWantClientAuth(boolean);
-    method public abstract void startHandshake() throws java.io.IOException;
-  }
-
-  public abstract class SSLSocketFactory extends javax.net.SocketFactory {
-    ctor public SSLSocketFactory();
-    method public abstract java.net.Socket createSocket(java.net.Socket, String, int, boolean) throws java.io.IOException;
-    method public static javax.net.SocketFactory getDefault();
-    method public abstract String[] getDefaultCipherSuites();
-    method public abstract String[] getSupportedCipherSuites();
-  }
-
-  public final class StandardConstants {
-    field public static final int SNI_HOST_NAME = 0; // 0x0
-  }
-
-  public interface TrustManager {
-  }
-
-  public class TrustManagerFactory {
-    ctor protected TrustManagerFactory(javax.net.ssl.TrustManagerFactorySpi, java.security.Provider, String);
-    method public final String getAlgorithm();
-    method public static final String getDefaultAlgorithm();
-    method public static final javax.net.ssl.TrustManagerFactory getInstance(String) throws java.security.NoSuchAlgorithmException;
-    method public static final javax.net.ssl.TrustManagerFactory getInstance(String, String) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException;
-    method public static final javax.net.ssl.TrustManagerFactory getInstance(String, java.security.Provider) throws java.security.NoSuchAlgorithmException;
-    method public final java.security.Provider getProvider();
-    method public final javax.net.ssl.TrustManager[] getTrustManagers();
-    method public final void init(java.security.KeyStore) throws java.security.KeyStoreException;
-    method public final void init(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public abstract class TrustManagerFactorySpi {
-    ctor public TrustManagerFactorySpi();
-    method protected abstract javax.net.ssl.TrustManager[] engineGetTrustManagers();
-    method protected abstract void engineInit(java.security.KeyStore) throws java.security.KeyStoreException;
-    method protected abstract void engineInit(javax.net.ssl.ManagerFactoryParameters) throws java.security.InvalidAlgorithmParameterException;
-  }
-
-  public abstract class X509ExtendedKeyManager implements javax.net.ssl.X509KeyManager {
-    ctor protected X509ExtendedKeyManager();
-    method public String chooseEngineClientAlias(String[], java.security.Principal[], javax.net.ssl.SSLEngine);
-    method public String chooseEngineServerAlias(String, java.security.Principal[], javax.net.ssl.SSLEngine);
-  }
-
-  public abstract class X509ExtendedTrustManager implements javax.net.ssl.X509TrustManager {
-    ctor public X509ExtendedTrustManager();
-    method public abstract void checkClientTrusted(java.security.cert.X509Certificate[], String, java.net.Socket) throws java.security.cert.CertificateException;
-    method public abstract void checkClientTrusted(java.security.cert.X509Certificate[], String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
-    method public abstract void checkServerTrusted(java.security.cert.X509Certificate[], String, java.net.Socket) throws java.security.cert.CertificateException;
-    method public abstract void checkServerTrusted(java.security.cert.X509Certificate[], String, javax.net.ssl.SSLEngine) throws java.security.cert.CertificateException;
-  }
-
-  public interface X509KeyManager extends javax.net.ssl.KeyManager {
-    method public String chooseClientAlias(String[], java.security.Principal[], java.net.Socket);
-    method public String chooseServerAlias(String, java.security.Principal[], java.net.Socket);
-    method public java.security.cert.X509Certificate[] getCertificateChain(String);
-    method public String[] getClientAliases(String, java.security.Principal[]);
-    method public java.security.PrivateKey getPrivateKey(String);
-    method public String[] getServerAliases(String, java.security.Principal[]);
-  }
-
-  public interface X509TrustManager extends javax.net.ssl.TrustManager {
-    method public void checkClientTrusted(java.security.cert.X509Certificate[], String) throws java.security.cert.CertificateException;
-    method public void checkServerTrusted(java.security.cert.X509Certificate[], String) throws java.security.cert.CertificateException;
-    method public java.security.cert.X509Certificate[] getAcceptedIssuers();
-  }
-
-}
-
-package javax.security.auth {
-
-  public final class AuthPermission extends java.security.BasicPermission {
-    ctor public AuthPermission(String);
-    ctor public AuthPermission(String, String);
-  }
-
-  public class DestroyFailedException extends java.lang.Exception {
-    ctor public DestroyFailedException();
-    ctor public DestroyFailedException(String);
-  }
-
-  public interface Destroyable {
-    method public default void destroy() throws javax.security.auth.DestroyFailedException;
-    method public default boolean isDestroyed();
-  }
-
-  public final class PrivateCredentialPermission extends java.security.Permission {
-    ctor public PrivateCredentialPermission(String, String);
-    method public String getActions();
-    method public String getCredentialClass();
-    method public String[][] getPrincipals();
-    method public boolean implies(java.security.Permission);
-  }
-
-  public final class Subject implements java.io.Serializable {
-    ctor public Subject();
-    ctor public Subject(boolean, java.util.Set<? extends java.security.Principal>, java.util.Set<?>, java.util.Set<?>);
-    method public static <T> T doAs(javax.security.auth.Subject, java.security.PrivilegedAction<T>);
-    method public static <T> T doAs(javax.security.auth.Subject, java.security.PrivilegedExceptionAction<T>) throws java.security.PrivilegedActionException;
-    method public static <T> T doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedAction<T>, java.security.AccessControlContext);
-    method public static <T> T doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction<T>, java.security.AccessControlContext) throws java.security.PrivilegedActionException;
-    method public java.util.Set<java.security.Principal> getPrincipals();
-    method public <T extends java.security.Principal> java.util.Set<T> getPrincipals(Class<T>);
-    method public java.util.Set<java.lang.Object> getPrivateCredentials();
-    method public <T> java.util.Set<T> getPrivateCredentials(Class<T>);
-    method public java.util.Set<java.lang.Object> getPublicCredentials();
-    method public <T> java.util.Set<T> getPublicCredentials(Class<T>);
-    method public static javax.security.auth.Subject getSubject(java.security.AccessControlContext);
-    method public boolean isReadOnly();
-    method public void setReadOnly();
-  }
-
-  public class SubjectDomainCombiner implements java.security.DomainCombiner {
-    ctor public SubjectDomainCombiner(javax.security.auth.Subject);
-    method public java.security.ProtectionDomain[] combine(java.security.ProtectionDomain[], java.security.ProtectionDomain[]);
-    method public javax.security.auth.Subject getSubject();
-  }
-
-}
-
-package javax.security.auth.callback {
-
-  public interface Callback {
-  }
-
-  public interface CallbackHandler {
-    method public void handle(javax.security.auth.callback.Callback[]) throws java.io.IOException, javax.security.auth.callback.UnsupportedCallbackException;
-  }
-
-  public class PasswordCallback implements javax.security.auth.callback.Callback java.io.Serializable {
-    ctor public PasswordCallback(String, boolean);
-    method public void clearPassword();
-    method public char[] getPassword();
-    method public String getPrompt();
-    method public boolean isEchoOn();
-    method public void setPassword(char[]);
-  }
-
-  public class UnsupportedCallbackException extends java.lang.Exception {
-    ctor public UnsupportedCallbackException(javax.security.auth.callback.Callback);
-    ctor public UnsupportedCallbackException(javax.security.auth.callback.Callback, String);
-    method public javax.security.auth.callback.Callback getCallback();
-  }
-
-}
-
-package javax.security.auth.login {
-
-  public class LoginException extends java.security.GeneralSecurityException {
-    ctor public LoginException();
-    ctor public LoginException(String);
-  }
-
-}
-
-package javax.security.auth.x500 {
-
-  public final class X500Principal implements java.security.Principal java.io.Serializable {
-    ctor public X500Principal(String);
-    ctor public X500Principal(String, java.util.Map<java.lang.String,java.lang.String>);
-    ctor public X500Principal(byte[]);
-    ctor public X500Principal(java.io.InputStream);
-    method public byte[] getEncoded();
-    method public String getName();
-    method public String getName(String);
-    method public String getName(String, java.util.Map<java.lang.String,java.lang.String>);
-    field public static final String CANONICAL = "CANONICAL";
-    field public static final String RFC1779 = "RFC1779";
-    field public static final String RFC2253 = "RFC2253";
-  }
-
-}
-
-package javax.security.cert {
-
-  public abstract class Certificate {
-    ctor public Certificate();
-    method public abstract byte[] getEncoded() throws javax.security.cert.CertificateEncodingException;
-    method public abstract java.security.PublicKey getPublicKey();
-    method public abstract String toString();
-    method public abstract void verify(java.security.PublicKey) throws javax.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-    method public abstract void verify(java.security.PublicKey, String) throws javax.security.cert.CertificateException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, java.security.SignatureException;
-  }
-
-  public class CertificateEncodingException extends javax.security.cert.CertificateException {
-    ctor public CertificateEncodingException();
-    ctor public CertificateEncodingException(String);
-  }
-
-  public class CertificateException extends java.lang.Exception {
-    ctor public CertificateException();
-    ctor public CertificateException(String);
-  }
-
-  public class CertificateExpiredException extends javax.security.cert.CertificateException {
-    ctor public CertificateExpiredException();
-    ctor public CertificateExpiredException(String);
-  }
-
-  public class CertificateNotYetValidException extends javax.security.cert.CertificateException {
-    ctor public CertificateNotYetValidException();
-    ctor public CertificateNotYetValidException(String);
-  }
-
-  public class CertificateParsingException extends javax.security.cert.CertificateException {
-    ctor public CertificateParsingException();
-    ctor public CertificateParsingException(String);
-  }
-
-  public abstract class X509Certificate extends javax.security.cert.Certificate {
-    ctor public X509Certificate();
-    method public abstract void checkValidity() throws javax.security.cert.CertificateExpiredException, javax.security.cert.CertificateNotYetValidException;
-    method public abstract void checkValidity(java.util.Date) throws javax.security.cert.CertificateExpiredException, javax.security.cert.CertificateNotYetValidException;
-    method public static final javax.security.cert.X509Certificate getInstance(java.io.InputStream) throws javax.security.cert.CertificateException;
-    method public static final javax.security.cert.X509Certificate getInstance(byte[]) throws javax.security.cert.CertificateException;
-    method public abstract java.security.Principal getIssuerDN();
-    method public abstract java.util.Date getNotAfter();
-    method public abstract java.util.Date getNotBefore();
-    method public abstract java.math.BigInteger getSerialNumber();
-    method public abstract String getSigAlgName();
-    method public abstract String getSigAlgOID();
-    method public abstract byte[] getSigAlgParams();
-    method public abstract java.security.Principal getSubjectDN();
-    method public abstract int getVersion();
-  }
-
-}
-
-package javax.sql {
-
-  public interface CommonDataSource {
-    method public java.io.PrintWriter getLogWriter() throws java.sql.SQLException;
-    method public int getLoginTimeout() throws java.sql.SQLException;
-    method public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException;
-    method public void setLogWriter(java.io.PrintWriter) throws java.sql.SQLException;
-    method public void setLoginTimeout(int) throws java.sql.SQLException;
-  }
-
-  public class ConnectionEvent extends java.util.EventObject {
-    ctor public ConnectionEvent(javax.sql.PooledConnection);
-    ctor public ConnectionEvent(javax.sql.PooledConnection, java.sql.SQLException);
-    method public java.sql.SQLException getSQLException();
-  }
-
-  public interface ConnectionEventListener extends java.util.EventListener {
-    method public void connectionClosed(javax.sql.ConnectionEvent);
-    method public void connectionErrorOccurred(javax.sql.ConnectionEvent);
-  }
-
-  public interface ConnectionPoolDataSource extends javax.sql.CommonDataSource {
-    method public javax.sql.PooledConnection getPooledConnection() throws java.sql.SQLException;
-    method public javax.sql.PooledConnection getPooledConnection(String, String) throws java.sql.SQLException;
-  }
-
-  public interface DataSource extends javax.sql.CommonDataSource java.sql.Wrapper {
-    method public java.sql.Connection getConnection() throws java.sql.SQLException;
-    method public java.sql.Connection getConnection(String, String) throws java.sql.SQLException;
-  }
-
-  public interface PooledConnection {
-    method public void addConnectionEventListener(javax.sql.ConnectionEventListener);
-    method public void addStatementEventListener(javax.sql.StatementEventListener);
-    method public void close() throws java.sql.SQLException;
-    method public java.sql.Connection getConnection() throws java.sql.SQLException;
-    method public void removeConnectionEventListener(javax.sql.ConnectionEventListener);
-    method public void removeStatementEventListener(javax.sql.StatementEventListener);
-  }
-
-  public interface RowSet extends java.sql.ResultSet {
-    method public void addRowSetListener(javax.sql.RowSetListener);
-    method public void clearParameters() throws java.sql.SQLException;
-    method public void execute() throws java.sql.SQLException;
-    method public String getCommand();
-    method public String getDataSourceName();
-    method public boolean getEscapeProcessing() throws java.sql.SQLException;
-    method public int getMaxFieldSize() throws java.sql.SQLException;
-    method public int getMaxRows() throws java.sql.SQLException;
-    method public String getPassword();
-    method public int getQueryTimeout() throws java.sql.SQLException;
-    method public int getTransactionIsolation();
-    method public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap() throws java.sql.SQLException;
-    method public String getUrl() throws java.sql.SQLException;
-    method public String getUsername();
-    method public boolean isReadOnly();
-    method public void removeRowSetListener(javax.sql.RowSetListener);
-    method public void setArray(int, java.sql.Array) throws java.sql.SQLException;
-    method public void setAsciiStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setAsciiStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setAsciiStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setAsciiStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBigDecimal(int, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void setBigDecimal(String, java.math.BigDecimal) throws java.sql.SQLException;
-    method public void setBinaryStream(int, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setBinaryStream(String, java.io.InputStream, int) throws java.sql.SQLException;
-    method public void setBinaryStream(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBinaryStream(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBlob(int, java.sql.Blob) throws java.sql.SQLException;
-    method public void setBlob(int, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBlob(int, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBlob(String, java.io.InputStream, long) throws java.sql.SQLException;
-    method public void setBlob(String, java.sql.Blob) throws java.sql.SQLException;
-    method public void setBlob(String, java.io.InputStream) throws java.sql.SQLException;
-    method public void setBoolean(int, boolean) throws java.sql.SQLException;
-    method public void setBoolean(String, boolean) throws java.sql.SQLException;
-    method public void setByte(int, byte) throws java.sql.SQLException;
-    method public void setByte(String, byte) throws java.sql.SQLException;
-    method public void setBytes(int, byte[]) throws java.sql.SQLException;
-    method public void setBytes(String, byte[]) throws java.sql.SQLException;
-    method public void setCharacterStream(int, java.io.Reader, int) throws java.sql.SQLException;
-    method public void setCharacterStream(String, java.io.Reader, int) throws java.sql.SQLException;
-    method public void setCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setClob(int, java.sql.Clob) throws java.sql.SQLException;
-    method public void setClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setClob(String, java.sql.Clob) throws java.sql.SQLException;
-    method public void setClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setCommand(String) throws java.sql.SQLException;
-    method public void setConcurrency(int) throws java.sql.SQLException;
-    method public void setDataSourceName(String) throws java.sql.SQLException;
-    method public void setDate(int, java.sql.Date) throws java.sql.SQLException;
-    method public void setDate(int, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
-    method public void setDate(String, java.sql.Date) throws java.sql.SQLException;
-    method public void setDate(String, java.sql.Date, java.util.Calendar) throws java.sql.SQLException;
-    method public void setDouble(int, double) throws java.sql.SQLException;
-    method public void setDouble(String, double) throws java.sql.SQLException;
-    method public void setEscapeProcessing(boolean) throws java.sql.SQLException;
-    method public void setFloat(int, float) throws java.sql.SQLException;
-    method public void setFloat(String, float) throws java.sql.SQLException;
-    method public void setInt(int, int) throws java.sql.SQLException;
-    method public void setInt(String, int) throws java.sql.SQLException;
-    method public void setLong(int, long) throws java.sql.SQLException;
-    method public void setLong(String, long) throws java.sql.SQLException;
-    method public void setMaxFieldSize(int) throws java.sql.SQLException;
-    method public void setMaxRows(int) throws java.sql.SQLException;
-    method public void setNCharacterStream(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setNCharacterStream(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNCharacterStream(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setNClob(String, java.sql.NClob) throws java.sql.SQLException;
-    method public void setNClob(String, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNClob(String, java.io.Reader) throws java.sql.SQLException;
-    method public void setNClob(int, java.io.Reader, long) throws java.sql.SQLException;
-    method public void setNClob(int, java.sql.NClob) throws java.sql.SQLException;
-    method public void setNClob(int, java.io.Reader) throws java.sql.SQLException;
-    method public void setNString(int, String) throws java.sql.SQLException;
-    method public void setNString(String, String) throws java.sql.SQLException;
-    method public void setNull(int, int) throws java.sql.SQLException;
-    method public void setNull(String, int) throws java.sql.SQLException;
-    method public void setNull(int, int, String) throws java.sql.SQLException;
-    method public void setNull(String, int, String) throws java.sql.SQLException;
-    method public void setObject(int, Object, int, int) throws java.sql.SQLException;
-    method public void setObject(String, Object, int, int) throws java.sql.SQLException;
-    method public void setObject(int, Object, int) throws java.sql.SQLException;
-    method public void setObject(String, Object, int) throws java.sql.SQLException;
-    method public void setObject(String, Object) throws java.sql.SQLException;
-    method public void setObject(int, Object) throws java.sql.SQLException;
-    method public void setPassword(String) throws java.sql.SQLException;
-    method public void setQueryTimeout(int) throws java.sql.SQLException;
-    method public void setReadOnly(boolean) throws java.sql.SQLException;
-    method public void setRef(int, java.sql.Ref) throws java.sql.SQLException;
-    method public void setRowId(int, java.sql.RowId) throws java.sql.SQLException;
-    method public void setRowId(String, java.sql.RowId) throws java.sql.SQLException;
-    method public void setSQLXML(int, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void setSQLXML(String, java.sql.SQLXML) throws java.sql.SQLException;
-    method public void setShort(int, short) throws java.sql.SQLException;
-    method public void setShort(String, short) throws java.sql.SQLException;
-    method public void setString(int, String) throws java.sql.SQLException;
-    method public void setString(String, String) throws java.sql.SQLException;
-    method public void setTime(int, java.sql.Time) throws java.sql.SQLException;
-    method public void setTime(int, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTime(String, java.sql.Time) throws java.sql.SQLException;
-    method public void setTime(String, java.sql.Time, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTimestamp(int, java.sql.Timestamp) throws java.sql.SQLException;
-    method public void setTimestamp(String, java.sql.Timestamp) throws java.sql.SQLException;
-    method public void setTimestamp(int, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTimestamp(String, java.sql.Timestamp, java.util.Calendar) throws java.sql.SQLException;
-    method public void setTransactionIsolation(int) throws java.sql.SQLException;
-    method public void setType(int) throws java.sql.SQLException;
-    method public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>>) throws java.sql.SQLException;
-    method public void setURL(int, java.net.URL) throws java.sql.SQLException;
-    method public void setUrl(String) throws java.sql.SQLException;
-    method public void setUsername(String) throws java.sql.SQLException;
-  }
-
-  public class RowSetEvent extends java.util.EventObject {
-    ctor public RowSetEvent(javax.sql.RowSet);
-  }
-
-  public interface RowSetInternal {
-    method public java.sql.Connection getConnection() throws java.sql.SQLException;
-    method public java.sql.ResultSet getOriginal() throws java.sql.SQLException;
-    method public java.sql.ResultSet getOriginalRow() throws java.sql.SQLException;
-    method public Object[] getParams() throws java.sql.SQLException;
-    method public void setMetaData(javax.sql.RowSetMetaData) throws java.sql.SQLException;
-  }
-
-  public interface RowSetListener extends java.util.EventListener {
-    method public void cursorMoved(javax.sql.RowSetEvent);
-    method public void rowChanged(javax.sql.RowSetEvent);
-    method public void rowSetChanged(javax.sql.RowSetEvent);
-  }
-
-  public interface RowSetMetaData extends java.sql.ResultSetMetaData {
-    method public void setAutoIncrement(int, boolean) throws java.sql.SQLException;
-    method public void setCaseSensitive(int, boolean) throws java.sql.SQLException;
-    method public void setCatalogName(int, String) throws java.sql.SQLException;
-    method public void setColumnCount(int) throws java.sql.SQLException;
-    method public void setColumnDisplaySize(int, int) throws java.sql.SQLException;
-    method public void setColumnLabel(int, String) throws java.sql.SQLException;
-    method public void setColumnName(int, String) throws java.sql.SQLException;
-    method public void setColumnType(int, int) throws java.sql.SQLException;
-    method public void setColumnTypeName(int, String) throws java.sql.SQLException;
-    method public void setCurrency(int, boolean) throws java.sql.SQLException;
-    method public void setNullable(int, int) throws java.sql.SQLException;
-    method public void setPrecision(int, int) throws java.sql.SQLException;
-    method public void setScale(int, int) throws java.sql.SQLException;
-    method public void setSchemaName(int, String) throws java.sql.SQLException;
-    method public void setSearchable(int, boolean) throws java.sql.SQLException;
-    method public void setSigned(int, boolean) throws java.sql.SQLException;
-    method public void setTableName(int, String) throws java.sql.SQLException;
-  }
-
-  public interface RowSetReader {
-    method public void readData(javax.sql.RowSetInternal) throws java.sql.SQLException;
-  }
-
-  public interface RowSetWriter {
-    method public boolean writeData(javax.sql.RowSetInternal) throws java.sql.SQLException;
-  }
-
-  public class StatementEvent extends java.util.EventObject {
-    ctor public StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement);
-    ctor public StatementEvent(javax.sql.PooledConnection, java.sql.PreparedStatement, java.sql.SQLException);
-    method public java.sql.SQLException getSQLException();
-    method public java.sql.PreparedStatement getStatement();
-  }
-
-  public interface StatementEventListener extends java.util.EventListener {
-    method public void statementClosed(javax.sql.StatementEvent);
-    method public void statementErrorOccurred(javax.sql.StatementEvent);
-  }
-
-}
-
-package javax.xml {
-
-  public final class XMLConstants {
-    field public static final String DEFAULT_NS_PREFIX = "";
-    field public static final String FEATURE_SECURE_PROCESSING = "http://javax.xml.XMLConstants/feature/secure-processing";
-    field public static final String NULL_NS_URI = "";
-    field public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0";
-    field public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
-    field public static final String W3C_XML_SCHEMA_NS_URI = "http://www.w3.org/2001/XMLSchema";
-    field public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes";
-    field public static final String XMLNS_ATTRIBUTE = "xmlns";
-    field public static final String XMLNS_ATTRIBUTE_NS_URI = "http://www.w3.org/2000/xmlns/";
-    field public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
-    field public static final String XML_NS_PREFIX = "xml";
-    field public static final String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
-  }
-
-}
-
-package javax.xml.datatype {
-
-  public class DatatypeConfigurationException extends java.lang.Exception {
-    ctor public DatatypeConfigurationException();
-    ctor public DatatypeConfigurationException(String);
-    ctor public DatatypeConfigurationException(String, Throwable);
-    ctor public DatatypeConfigurationException(Throwable);
-  }
-
-  public final class DatatypeConstants {
-    field public static final int APRIL = 4; // 0x4
-    field public static final int AUGUST = 8; // 0x8
-    field public static final javax.xml.namespace.QName DATE;
-    field public static final javax.xml.namespace.QName DATETIME;
-    field public static final javax.xml.datatype.DatatypeConstants.Field DAYS;
-    field public static final int DECEMBER = 12; // 0xc
-    field public static final javax.xml.namespace.QName DURATION;
-    field public static final javax.xml.namespace.QName DURATION_DAYTIME;
-    field public static final javax.xml.namespace.QName DURATION_YEARMONTH;
-    field public static final int EQUAL = 0; // 0x0
-    field public static final int FEBRUARY = 2; // 0x2
-    field public static final int FIELD_UNDEFINED = -2147483648; // 0x80000000
-    field public static final javax.xml.namespace.QName GDAY;
-    field public static final javax.xml.namespace.QName GMONTH;
-    field public static final javax.xml.namespace.QName GMONTHDAY;
-    field public static final int GREATER = 1; // 0x1
-    field public static final javax.xml.namespace.QName GYEAR;
-    field public static final javax.xml.namespace.QName GYEARMONTH;
-    field public static final javax.xml.datatype.DatatypeConstants.Field HOURS;
-    field public static final int INDETERMINATE = 2; // 0x2
-    field public static final int JANUARY = 1; // 0x1
-    field public static final int JULY = 7; // 0x7
-    field public static final int JUNE = 6; // 0x6
-    field public static final int LESSER = -1; // 0xffffffff
-    field public static final int MARCH = 3; // 0x3
-    field public static final int MAX_TIMEZONE_OFFSET = -840; // 0xfffffcb8
-    field public static final int MAY = 5; // 0x5
-    field public static final javax.xml.datatype.DatatypeConstants.Field MINUTES;
-    field public static final int MIN_TIMEZONE_OFFSET = 840; // 0x348
-    field public static final javax.xml.datatype.DatatypeConstants.Field MONTHS;
-    field public static final int NOVEMBER = 11; // 0xb
-    field public static final int OCTOBER = 10; // 0xa
-    field public static final javax.xml.datatype.DatatypeConstants.Field SECONDS;
-    field public static final int SEPTEMBER = 9; // 0x9
-    field public static final javax.xml.namespace.QName TIME;
-    field public static final javax.xml.datatype.DatatypeConstants.Field YEARS;
-  }
-
-  public static final class DatatypeConstants.Field {
-    method public int getId();
-  }
-
-  public abstract class DatatypeFactory {
-    ctor protected DatatypeFactory();
-    method public abstract javax.xml.datatype.Duration newDuration(String);
-    method public abstract javax.xml.datatype.Duration newDuration(long);
-    method public abstract javax.xml.datatype.Duration newDuration(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigDecimal);
-    method public javax.xml.datatype.Duration newDuration(boolean, int, int, int, int, int, int);
-    method public javax.xml.datatype.Duration newDurationDayTime(String);
-    method public javax.xml.datatype.Duration newDurationDayTime(long);
-    method public javax.xml.datatype.Duration newDurationDayTime(boolean, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger, java.math.BigInteger);
-    method public javax.xml.datatype.Duration newDurationDayTime(boolean, int, int, int, int);
-    method public javax.xml.datatype.Duration newDurationYearMonth(String);
-    method public javax.xml.datatype.Duration newDurationYearMonth(long);
-    method public javax.xml.datatype.Duration newDurationYearMonth(boolean, java.math.BigInteger, java.math.BigInteger);
-    method public javax.xml.datatype.Duration newDurationYearMonth(boolean, int, int);
-    method public static javax.xml.datatype.DatatypeFactory newInstance() throws javax.xml.datatype.DatatypeConfigurationException;
-    method public static javax.xml.datatype.DatatypeFactory newInstance(String, ClassLoader) throws javax.xml.datatype.DatatypeConfigurationException;
-    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar();
-    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(String);
-    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(java.util.GregorianCalendar);
-    method public abstract javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(java.math.BigInteger, int, int, int, int, int, java.math.BigDecimal, int);
-    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendar(int, int, int, int, int, int, int, int);
-    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarDate(int, int, int, int);
-    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, int);
-    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, java.math.BigDecimal, int);
-    method public javax.xml.datatype.XMLGregorianCalendar newXMLGregorianCalendarTime(int, int, int, int, int);
-    field public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS;
-    field public static final String DATATYPEFACTORY_PROPERTY = "javax.xml.datatype.DatatypeFactory";
-  }
-
-  public abstract class Duration {
-    ctor public Duration();
-    method public abstract javax.xml.datatype.Duration add(javax.xml.datatype.Duration);
-    method public abstract void addTo(java.util.Calendar);
-    method public void addTo(java.util.Date);
-    method public abstract int compare(javax.xml.datatype.Duration);
-    method public int getDays();
-    method public abstract Number getField(javax.xml.datatype.DatatypeConstants.Field);
-    method public int getHours();
-    method public int getMinutes();
-    method public int getMonths();
-    method public int getSeconds();
-    method public abstract int getSign();
-    method public long getTimeInMillis(java.util.Calendar);
-    method public long getTimeInMillis(java.util.Date);
-    method public javax.xml.namespace.QName getXMLSchemaType();
-    method public int getYears();
-    method public abstract int hashCode();
-    method public boolean isLongerThan(javax.xml.datatype.Duration);
-    method public abstract boolean isSet(javax.xml.datatype.DatatypeConstants.Field);
-    method public boolean isShorterThan(javax.xml.datatype.Duration);
-    method public javax.xml.datatype.Duration multiply(int);
-    method public abstract javax.xml.datatype.Duration multiply(java.math.BigDecimal);
-    method public abstract javax.xml.datatype.Duration negate();
-    method public abstract javax.xml.datatype.Duration normalizeWith(java.util.Calendar);
-    method public javax.xml.datatype.Duration subtract(javax.xml.datatype.Duration);
-  }
-
-  public abstract class XMLGregorianCalendar implements java.lang.Cloneable {
-    ctor public XMLGregorianCalendar();
-    method public abstract void add(javax.xml.datatype.Duration);
-    method public abstract void clear();
-    method public abstract Object clone();
-    method public abstract int compare(javax.xml.datatype.XMLGregorianCalendar);
-    method public abstract int getDay();
-    method public abstract java.math.BigInteger getEon();
-    method public abstract java.math.BigInteger getEonAndYear();
-    method public abstract java.math.BigDecimal getFractionalSecond();
-    method public abstract int getHour();
-    method public int getMillisecond();
-    method public abstract int getMinute();
-    method public abstract int getMonth();
-    method public abstract int getSecond();
-    method public abstract java.util.TimeZone getTimeZone(int);
-    method public abstract int getTimezone();
-    method public abstract javax.xml.namespace.QName getXMLSchemaType();
-    method public abstract int getYear();
-    method public abstract boolean isValid();
-    method public abstract javax.xml.datatype.XMLGregorianCalendar normalize();
-    method public abstract void reset();
-    method public abstract void setDay(int);
-    method public abstract void setFractionalSecond(java.math.BigDecimal);
-    method public abstract void setHour(int);
-    method public abstract void setMillisecond(int);
-    method public abstract void setMinute(int);
-    method public abstract void setMonth(int);
-    method public abstract void setSecond(int);
-    method public void setTime(int, int, int);
-    method public void setTime(int, int, int, java.math.BigDecimal);
-    method public void setTime(int, int, int, int);
-    method public abstract void setTimezone(int);
-    method public abstract void setYear(java.math.BigInteger);
-    method public abstract void setYear(int);
-    method public abstract java.util.GregorianCalendar toGregorianCalendar();
-    method public abstract java.util.GregorianCalendar toGregorianCalendar(java.util.TimeZone, java.util.Locale, javax.xml.datatype.XMLGregorianCalendar);
-    method public abstract String toXMLFormat();
-  }
-
-}
-
-package javax.xml.namespace {
-
-  public interface NamespaceContext {
-    method public String getNamespaceURI(String);
-    method public String getPrefix(String);
-    method public java.util.Iterator getPrefixes(String);
-  }
-
-  public class QName implements java.io.Serializable {
-    ctor public QName(String, String);
-    ctor public QName(String, String, String);
-    ctor public QName(String);
-    method public final boolean equals(Object);
-    method public String getLocalPart();
-    method public String getNamespaceURI();
-    method public String getPrefix();
-    method public final int hashCode();
-    method public static javax.xml.namespace.QName valueOf(String);
-  }
-
-}
-
-package javax.xml.parsers {
-
-  public abstract class DocumentBuilder {
-    ctor protected DocumentBuilder();
-    method public abstract org.w3c.dom.DOMImplementation getDOMImplementation();
-    method public javax.xml.validation.Schema getSchema();
-    method public abstract boolean isNamespaceAware();
-    method public abstract boolean isValidating();
-    method public boolean isXIncludeAware();
-    method public abstract org.w3c.dom.Document newDocument();
-    method public org.w3c.dom.Document parse(java.io.InputStream) throws java.io.IOException, org.xml.sax.SAXException;
-    method public org.w3c.dom.Document parse(java.io.InputStream, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public org.w3c.dom.Document parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public org.w3c.dom.Document parse(java.io.File) throws java.io.IOException, org.xml.sax.SAXException;
-    method public abstract org.w3c.dom.Document parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void reset();
-    method public abstract void setEntityResolver(org.xml.sax.EntityResolver);
-    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
-  }
-
-  public abstract class DocumentBuilderFactory {
-    ctor protected DocumentBuilderFactory();
-    method public abstract Object getAttribute(String) throws java.lang.IllegalArgumentException;
-    method public abstract boolean getFeature(String) throws javax.xml.parsers.ParserConfigurationException;
-    method public javax.xml.validation.Schema getSchema();
-    method public boolean isCoalescing();
-    method public boolean isExpandEntityReferences();
-    method public boolean isIgnoringComments();
-    method public boolean isIgnoringElementContentWhitespace();
-    method public boolean isNamespaceAware();
-    method public boolean isValidating();
-    method public boolean isXIncludeAware();
-    method public abstract javax.xml.parsers.DocumentBuilder newDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException;
-    method public static javax.xml.parsers.DocumentBuilderFactory newInstance();
-    method public static javax.xml.parsers.DocumentBuilderFactory newInstance(String, ClassLoader);
-    method public abstract void setAttribute(String, Object) throws java.lang.IllegalArgumentException;
-    method public void setCoalescing(boolean);
-    method public void setExpandEntityReferences(boolean);
-    method public abstract void setFeature(String, boolean) throws javax.xml.parsers.ParserConfigurationException;
-    method public void setIgnoringComments(boolean);
-    method public void setIgnoringElementContentWhitespace(boolean);
-    method public void setNamespaceAware(boolean);
-    method public void setSchema(javax.xml.validation.Schema);
-    method public void setValidating(boolean);
-    method public void setXIncludeAware(boolean);
-  }
-
-  public class FactoryConfigurationError extends java.lang.Error {
-    ctor public FactoryConfigurationError();
-    ctor public FactoryConfigurationError(String);
-    ctor public FactoryConfigurationError(Exception);
-    ctor public FactoryConfigurationError(Exception, String);
-    method public Exception getException();
-  }
-
-  public class ParserConfigurationException extends java.lang.Exception {
-    ctor public ParserConfigurationException();
-    ctor public ParserConfigurationException(String);
-  }
-
-  public abstract class SAXParser {
-    ctor protected SAXParser();
-    method public abstract org.xml.sax.Parser getParser() throws org.xml.sax.SAXException;
-    method public abstract Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public javax.xml.validation.Schema getSchema();
-    method public abstract org.xml.sax.XMLReader getXMLReader() throws org.xml.sax.SAXException;
-    method public abstract boolean isNamespaceAware();
-    method public abstract boolean isValidating();
-    method public boolean isXIncludeAware();
-    method public void parse(java.io.InputStream, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(java.io.InputStream, org.xml.sax.HandlerBase, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(String, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(String, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(java.io.File, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(java.io.File, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(org.xml.sax.InputSource, org.xml.sax.HandlerBase) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(org.xml.sax.InputSource, org.xml.sax.helpers.DefaultHandler) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void reset();
-    method public abstract void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-  }
-
-  public abstract class SAXParserFactory {
-    ctor protected SAXParserFactory();
-    method public abstract boolean getFeature(String) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public javax.xml.validation.Schema getSchema();
-    method public boolean isNamespaceAware();
-    method public boolean isValidating();
-    method public boolean isXIncludeAware();
-    method public static javax.xml.parsers.SAXParserFactory newInstance();
-    method public static javax.xml.parsers.SAXParserFactory newInstance(String, ClassLoader);
-    method public abstract javax.xml.parsers.SAXParser newSAXParser() throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException;
-    method public abstract void setFeature(String, boolean) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setNamespaceAware(boolean);
-    method public void setSchema(javax.xml.validation.Schema);
-    method public void setValidating(boolean);
-    method public void setXIncludeAware(boolean);
-  }
-
-}
-
-package javax.xml.transform {
-
-  public interface ErrorListener {
-    method public void error(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
-    method public void fatalError(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
-    method public void warning(javax.xml.transform.TransformerException) throws javax.xml.transform.TransformerException;
-  }
-
-  public class OutputKeys {
-    field public static final String CDATA_SECTION_ELEMENTS = "cdata-section-elements";
-    field public static final String DOCTYPE_PUBLIC = "doctype-public";
-    field public static final String DOCTYPE_SYSTEM = "doctype-system";
-    field public static final String ENCODING = "encoding";
-    field public static final String INDENT = "indent";
-    field public static final String MEDIA_TYPE = "media-type";
-    field public static final String METHOD = "method";
-    field public static final String OMIT_XML_DECLARATION = "omit-xml-declaration";
-    field public static final String STANDALONE = "standalone";
-    field public static final String VERSION = "version";
-  }
-
-  public interface Result {
-    method public String getSystemId();
-    method public void setSystemId(String);
-    field public static final String PI_DISABLE_OUTPUT_ESCAPING = "javax.xml.transform.disable-output-escaping";
-    field public static final String PI_ENABLE_OUTPUT_ESCAPING = "javax.xml.transform.enable-output-escaping";
-  }
-
-  public interface Source {
-    method public String getSystemId();
-    method public void setSystemId(String);
-  }
-
-  public interface SourceLocator {
-    method public int getColumnNumber();
-    method public int getLineNumber();
-    method public String getPublicId();
-    method public String getSystemId();
-  }
-
-  public interface Templates {
-    method public java.util.Properties getOutputProperties();
-    method public javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException;
-  }
-
-  public abstract class Transformer {
-    ctor protected Transformer();
-    method public abstract void clearParameters();
-    method public abstract javax.xml.transform.ErrorListener getErrorListener();
-    method public abstract java.util.Properties getOutputProperties();
-    method public abstract String getOutputProperty(String) throws java.lang.IllegalArgumentException;
-    method public abstract Object getParameter(String);
-    method public abstract javax.xml.transform.URIResolver getURIResolver();
-    method public void reset();
-    method public abstract void setErrorListener(javax.xml.transform.ErrorListener) throws java.lang.IllegalArgumentException;
-    method public abstract void setOutputProperties(java.util.Properties);
-    method public abstract void setOutputProperty(String, String) throws java.lang.IllegalArgumentException;
-    method public abstract void setParameter(String, Object);
-    method public abstract void setURIResolver(javax.xml.transform.URIResolver);
-    method public abstract void transform(javax.xml.transform.Source, javax.xml.transform.Result) throws javax.xml.transform.TransformerException;
-  }
-
-  public class TransformerConfigurationException extends javax.xml.transform.TransformerException {
-    ctor public TransformerConfigurationException();
-    ctor public TransformerConfigurationException(String);
-    ctor public TransformerConfigurationException(Throwable);
-    ctor public TransformerConfigurationException(String, Throwable);
-    ctor public TransformerConfigurationException(String, javax.xml.transform.SourceLocator);
-    ctor public TransformerConfigurationException(String, javax.xml.transform.SourceLocator, Throwable);
-  }
-
-  public class TransformerException extends java.lang.Exception {
-    ctor public TransformerException(String);
-    ctor public TransformerException(Throwable);
-    ctor public TransformerException(String, Throwable);
-    ctor public TransformerException(String, javax.xml.transform.SourceLocator);
-    ctor public TransformerException(String, javax.xml.transform.SourceLocator, Throwable);
-    method public Throwable getException();
-    method public String getLocationAsString();
-    method public javax.xml.transform.SourceLocator getLocator();
-    method public String getMessageAndLocation();
-    method public void setLocator(javax.xml.transform.SourceLocator);
-  }
-
-  public abstract class TransformerFactory {
-    ctor protected TransformerFactory();
-    method public abstract javax.xml.transform.Source getAssociatedStylesheet(javax.xml.transform.Source, String, String, String) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract Object getAttribute(String);
-    method public abstract javax.xml.transform.ErrorListener getErrorListener();
-    method public abstract boolean getFeature(String);
-    method public abstract javax.xml.transform.URIResolver getURIResolver();
-    method public static javax.xml.transform.TransformerFactory newInstance() throws javax.xml.transform.TransformerFactoryConfigurationError;
-    method public static javax.xml.transform.TransformerFactory newInstance(String, ClassLoader) throws javax.xml.transform.TransformerFactoryConfigurationError;
-    method public abstract javax.xml.transform.Templates newTemplates(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract javax.xml.transform.Transformer newTransformer(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract javax.xml.transform.Transformer newTransformer() throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract void setAttribute(String, Object);
-    method public abstract void setErrorListener(javax.xml.transform.ErrorListener);
-    method public abstract void setFeature(String, boolean) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract void setURIResolver(javax.xml.transform.URIResolver);
-  }
-
-  public class TransformerFactoryConfigurationError extends java.lang.Error {
-    ctor public TransformerFactoryConfigurationError();
-    ctor public TransformerFactoryConfigurationError(String);
-    ctor public TransformerFactoryConfigurationError(Exception);
-    ctor public TransformerFactoryConfigurationError(Exception, String);
-    method public Exception getException();
-  }
-
-  public interface URIResolver {
-    method public javax.xml.transform.Source resolve(String, String) throws javax.xml.transform.TransformerException;
-  }
-
-}
-
-package javax.xml.transform.dom {
-
-  public interface DOMLocator extends javax.xml.transform.SourceLocator {
-    method public org.w3c.dom.Node getOriginatingNode();
-  }
-
-  public class DOMResult implements javax.xml.transform.Result {
-    ctor public DOMResult();
-    ctor public DOMResult(org.w3c.dom.Node);
-    ctor public DOMResult(org.w3c.dom.Node, String);
-    ctor public DOMResult(org.w3c.dom.Node, org.w3c.dom.Node);
-    ctor public DOMResult(org.w3c.dom.Node, org.w3c.dom.Node, String);
-    method public org.w3c.dom.Node getNextSibling();
-    method public org.w3c.dom.Node getNode();
-    method public String getSystemId();
-    method public void setNextSibling(org.w3c.dom.Node);
-    method public void setNode(org.w3c.dom.Node);
-    method public void setSystemId(String);
-    field public static final String FEATURE = "http://javax.xml.transform.dom.DOMResult/feature";
-  }
-
-  public class DOMSource implements javax.xml.transform.Source {
-    ctor public DOMSource();
-    ctor public DOMSource(org.w3c.dom.Node);
-    ctor public DOMSource(org.w3c.dom.Node, String);
-    method public org.w3c.dom.Node getNode();
-    method public String getSystemId();
-    method public void setNode(org.w3c.dom.Node);
-    method public void setSystemId(String);
-    field public static final String FEATURE = "http://javax.xml.transform.dom.DOMSource/feature";
-  }
-
-}
-
-package javax.xml.transform.sax {
-
-  public class SAXResult implements javax.xml.transform.Result {
-    ctor public SAXResult();
-    ctor public SAXResult(org.xml.sax.ContentHandler);
-    method public org.xml.sax.ContentHandler getHandler();
-    method public org.xml.sax.ext.LexicalHandler getLexicalHandler();
-    method public String getSystemId();
-    method public void setHandler(org.xml.sax.ContentHandler);
-    method public void setLexicalHandler(org.xml.sax.ext.LexicalHandler);
-    method public void setSystemId(String);
-    field public static final String FEATURE = "http://javax.xml.transform.sax.SAXResult/feature";
-  }
-
-  public class SAXSource implements javax.xml.transform.Source {
-    ctor public SAXSource();
-    ctor public SAXSource(org.xml.sax.XMLReader, org.xml.sax.InputSource);
-    ctor public SAXSource(org.xml.sax.InputSource);
-    method public org.xml.sax.InputSource getInputSource();
-    method public String getSystemId();
-    method public org.xml.sax.XMLReader getXMLReader();
-    method public void setInputSource(org.xml.sax.InputSource);
-    method public void setSystemId(String);
-    method public void setXMLReader(org.xml.sax.XMLReader);
-    method public static org.xml.sax.InputSource sourceToInputSource(javax.xml.transform.Source);
-    field public static final String FEATURE = "http://javax.xml.transform.sax.SAXSource/feature";
-  }
-
-  public abstract class SAXTransformerFactory extends javax.xml.transform.TransformerFactory {
-    ctor protected SAXTransformerFactory();
-    method public abstract javax.xml.transform.sax.TemplatesHandler newTemplatesHandler() throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler(javax.xml.transform.Templates) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract javax.xml.transform.sax.TransformerHandler newTransformerHandler() throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Source) throws javax.xml.transform.TransformerConfigurationException;
-    method public abstract org.xml.sax.XMLFilter newXMLFilter(javax.xml.transform.Templates) throws javax.xml.transform.TransformerConfigurationException;
-    field public static final String FEATURE = "http://javax.xml.transform.sax.SAXTransformerFactory/feature";
-    field public static final String FEATURE_XMLFILTER = "http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter";
-  }
-
-  public interface TemplatesHandler extends org.xml.sax.ContentHandler {
-    method public String getSystemId();
-    method public javax.xml.transform.Templates getTemplates();
-    method public void setSystemId(String);
-  }
-
-  public interface TransformerHandler extends org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.ext.LexicalHandler {
-    method public String getSystemId();
-    method public javax.xml.transform.Transformer getTransformer();
-    method public void setResult(javax.xml.transform.Result) throws java.lang.IllegalArgumentException;
-    method public void setSystemId(String);
-  }
-
-}
-
-package javax.xml.transform.stream {
-
-  public class StreamResult implements javax.xml.transform.Result {
-    ctor public StreamResult();
-    ctor public StreamResult(java.io.OutputStream);
-    ctor public StreamResult(java.io.Writer);
-    ctor public StreamResult(String);
-    ctor public StreamResult(java.io.File);
-    method public java.io.OutputStream getOutputStream();
-    method public String getSystemId();
-    method public java.io.Writer getWriter();
-    method public void setOutputStream(java.io.OutputStream);
-    method public void setSystemId(String);
-    method public void setSystemId(java.io.File);
-    method public void setWriter(java.io.Writer);
-    field public static final String FEATURE = "http://javax.xml.transform.stream.StreamResult/feature";
-  }
-
-  public class StreamSource implements javax.xml.transform.Source {
-    ctor public StreamSource();
-    ctor public StreamSource(java.io.InputStream);
-    ctor public StreamSource(java.io.InputStream, String);
-    ctor public StreamSource(java.io.Reader);
-    ctor public StreamSource(java.io.Reader, String);
-    ctor public StreamSource(String);
-    ctor public StreamSource(java.io.File);
-    method public java.io.InputStream getInputStream();
-    method public String getPublicId();
-    method public java.io.Reader getReader();
-    method public String getSystemId();
-    method public void setInputStream(java.io.InputStream);
-    method public void setPublicId(String);
-    method public void setReader(java.io.Reader);
-    method public void setSystemId(String);
-    method public void setSystemId(java.io.File);
-    field public static final String FEATURE = "http://javax.xml.transform.stream.StreamSource/feature";
-  }
-
-}
-
-package javax.xml.validation {
-
-  public abstract class Schema {
-    ctor protected Schema();
-    method public abstract javax.xml.validation.Validator newValidator();
-    method public abstract javax.xml.validation.ValidatorHandler newValidatorHandler();
-  }
-
-  public abstract class SchemaFactory {
-    ctor protected SchemaFactory();
-    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
-    method public abstract boolean isSchemaLanguageSupported(String);
-    method public static javax.xml.validation.SchemaFactory newInstance(String);
-    method public static javax.xml.validation.SchemaFactory newInstance(String, String, ClassLoader);
-    method public javax.xml.validation.Schema newSchema(javax.xml.transform.Source) throws org.xml.sax.SAXException;
-    method public javax.xml.validation.Schema newSchema(java.io.File) throws org.xml.sax.SAXException;
-    method public javax.xml.validation.Schema newSchema(java.net.URL) throws org.xml.sax.SAXException;
-    method public abstract javax.xml.validation.Schema newSchema(javax.xml.transform.Source[]) throws org.xml.sax.SAXException;
-    method public abstract javax.xml.validation.Schema newSchema() throws org.xml.sax.SAXException;
-    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
-  }
-
-  public abstract class SchemaFactoryLoader {
-    ctor protected SchemaFactoryLoader();
-    method public abstract javax.xml.validation.SchemaFactory newFactory(String);
-  }
-
-  public abstract class TypeInfoProvider {
-    ctor protected TypeInfoProvider();
-    method public abstract org.w3c.dom.TypeInfo getAttributeTypeInfo(int);
-    method public abstract org.w3c.dom.TypeInfo getElementTypeInfo();
-    method public abstract boolean isIdAttribute(int);
-    method public abstract boolean isSpecified(int);
-  }
-
-  public abstract class Validator {
-    ctor protected Validator();
-    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
-    method public abstract void reset();
-    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
-    method public void validate(javax.xml.transform.Source) throws java.io.IOException, org.xml.sax.SAXException;
-    method public abstract void validate(javax.xml.transform.Source, javax.xml.transform.Result) throws java.io.IOException, org.xml.sax.SAXException;
-  }
-
-  public abstract class ValidatorHandler implements org.xml.sax.ContentHandler {
-    ctor protected ValidatorHandler();
-    method public abstract org.xml.sax.ContentHandler getContentHandler();
-    method public abstract org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract org.w3c.dom.ls.LSResourceResolver getResourceResolver();
-    method public abstract javax.xml.validation.TypeInfoProvider getTypeInfoProvider();
-    method public abstract void setContentHandler(org.xml.sax.ContentHandler);
-    method public abstract void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public abstract void setResourceResolver(org.w3c.dom.ls.LSResourceResolver);
-  }
-
-}
-
-package javax.xml.xpath {
-
-  public interface XPath {
-    method public javax.xml.xpath.XPathExpression compile(String) throws javax.xml.xpath.XPathExpressionException;
-    method public Object evaluate(String, Object, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
-    method public String evaluate(String, Object) throws javax.xml.xpath.XPathExpressionException;
-    method public Object evaluate(String, org.xml.sax.InputSource, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
-    method public String evaluate(String, org.xml.sax.InputSource) throws javax.xml.xpath.XPathExpressionException;
-    method public javax.xml.namespace.NamespaceContext getNamespaceContext();
-    method public javax.xml.xpath.XPathFunctionResolver getXPathFunctionResolver();
-    method public javax.xml.xpath.XPathVariableResolver getXPathVariableResolver();
-    method public void reset();
-    method public void setNamespaceContext(javax.xml.namespace.NamespaceContext);
-    method public void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver);
-    method public void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver);
-  }
-
-  public class XPathConstants {
-    field public static final javax.xml.namespace.QName BOOLEAN;
-    field public static final String DOM_OBJECT_MODEL = "http://java.sun.com/jaxp/xpath/dom";
-    field public static final javax.xml.namespace.QName NODE;
-    field public static final javax.xml.namespace.QName NODESET;
-    field public static final javax.xml.namespace.QName NUMBER;
-    field public static final javax.xml.namespace.QName STRING;
-  }
-
-  public class XPathException extends java.lang.Exception {
-    ctor public XPathException(String);
-    ctor public XPathException(Throwable);
-  }
-
-  public interface XPathExpression {
-    method public Object evaluate(Object, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
-    method public String evaluate(Object) throws javax.xml.xpath.XPathExpressionException;
-    method public Object evaluate(org.xml.sax.InputSource, javax.xml.namespace.QName) throws javax.xml.xpath.XPathExpressionException;
-    method public String evaluate(org.xml.sax.InputSource) throws javax.xml.xpath.XPathExpressionException;
-  }
-
-  public class XPathExpressionException extends javax.xml.xpath.XPathException {
-    ctor public XPathExpressionException(String);
-    ctor public XPathExpressionException(Throwable);
-  }
-
-  public abstract class XPathFactory {
-    ctor protected XPathFactory();
-    method public abstract boolean getFeature(String) throws javax.xml.xpath.XPathFactoryConfigurationException;
-    method public abstract boolean isObjectModelSupported(String);
-    method public static final javax.xml.xpath.XPathFactory newInstance();
-    method public static final javax.xml.xpath.XPathFactory newInstance(String) throws javax.xml.xpath.XPathFactoryConfigurationException;
-    method public static javax.xml.xpath.XPathFactory newInstance(String, String, ClassLoader) throws javax.xml.xpath.XPathFactoryConfigurationException;
-    method public abstract javax.xml.xpath.XPath newXPath();
-    method public abstract void setFeature(String, boolean) throws javax.xml.xpath.XPathFactoryConfigurationException;
-    method public abstract void setXPathFunctionResolver(javax.xml.xpath.XPathFunctionResolver);
-    method public abstract void setXPathVariableResolver(javax.xml.xpath.XPathVariableResolver);
-    field public static final String DEFAULT_OBJECT_MODEL_URI = "http://java.sun.com/jaxp/xpath/dom";
-    field public static final String DEFAULT_PROPERTY_NAME = "javax.xml.xpath.XPathFactory";
-  }
-
-  public class XPathFactoryConfigurationException extends javax.xml.xpath.XPathException {
-    ctor public XPathFactoryConfigurationException(String);
-    ctor public XPathFactoryConfigurationException(Throwable);
-  }
-
-  public interface XPathFunction {
-    method public Object evaluate(java.util.List) throws javax.xml.xpath.XPathFunctionException;
-  }
-
-  public class XPathFunctionException extends javax.xml.xpath.XPathExpressionException {
-    ctor public XPathFunctionException(String);
-    ctor public XPathFunctionException(Throwable);
-  }
-
-  public interface XPathFunctionResolver {
-    method public javax.xml.xpath.XPathFunction resolveFunction(javax.xml.namespace.QName, int);
-  }
-
-  public interface XPathVariableResolver {
-    method public Object resolveVariable(javax.xml.namespace.QName);
-  }
-
-}
-
 package org.apache.http.conn {
 
   @Deprecated public class ConnectTimeoutException extends java.io.InterruptedIOException {
@@ -79442,1152 +55510,3 @@
 
 }
 
-package org.json {
-
-  public class JSONArray {
-    ctor public JSONArray();
-    ctor public JSONArray(java.util.Collection);
-    ctor public JSONArray(org.json.JSONTokener) throws org.json.JSONException;
-    ctor public JSONArray(String) throws org.json.JSONException;
-    ctor public JSONArray(Object) throws org.json.JSONException;
-    method public Object get(int) throws org.json.JSONException;
-    method public boolean getBoolean(int) throws org.json.JSONException;
-    method public double getDouble(int) throws org.json.JSONException;
-    method public int getInt(int) throws org.json.JSONException;
-    method public org.json.JSONArray getJSONArray(int) throws org.json.JSONException;
-    method public org.json.JSONObject getJSONObject(int) throws org.json.JSONException;
-    method public long getLong(int) throws org.json.JSONException;
-    method public String getString(int) throws org.json.JSONException;
-    method public boolean isNull(int);
-    method public String join(String) throws org.json.JSONException;
-    method public int length();
-    method public Object opt(int);
-    method public boolean optBoolean(int);
-    method public boolean optBoolean(int, boolean);
-    method public double optDouble(int);
-    method public double optDouble(int, double);
-    method public int optInt(int);
-    method public int optInt(int, int);
-    method public org.json.JSONArray optJSONArray(int);
-    method public org.json.JSONObject optJSONObject(int);
-    method public long optLong(int);
-    method public long optLong(int, long);
-    method public String optString(int);
-    method public String optString(int, String);
-    method public org.json.JSONArray put(boolean);
-    method public org.json.JSONArray put(double) throws org.json.JSONException;
-    method public org.json.JSONArray put(int);
-    method public org.json.JSONArray put(long);
-    method public org.json.JSONArray put(Object);
-    method public org.json.JSONArray put(int, boolean) throws org.json.JSONException;
-    method public org.json.JSONArray put(int, double) throws org.json.JSONException;
-    method public org.json.JSONArray put(int, int) throws org.json.JSONException;
-    method public org.json.JSONArray put(int, long) throws org.json.JSONException;
-    method public org.json.JSONArray put(int, Object) throws org.json.JSONException;
-    method public Object remove(int);
-    method public org.json.JSONObject toJSONObject(org.json.JSONArray) throws org.json.JSONException;
-    method public String toString(int) throws org.json.JSONException;
-  }
-
-  public class JSONException extends java.lang.Exception {
-    ctor public JSONException(String);
-    ctor public JSONException(String, Throwable);
-    ctor public JSONException(Throwable);
-  }
-
-  public class JSONObject {
-    ctor public JSONObject();
-    ctor public JSONObject(@NonNull java.util.Map);
-    ctor public JSONObject(@NonNull org.json.JSONTokener) throws org.json.JSONException;
-    ctor public JSONObject(@NonNull String) throws org.json.JSONException;
-    ctor public JSONObject(@NonNull org.json.JSONObject, @NonNull String[]) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject accumulate(@NonNull String, @Nullable Object) throws org.json.JSONException;
-    method @NonNull public Object get(@NonNull String) throws org.json.JSONException;
-    method public boolean getBoolean(@NonNull String) throws org.json.JSONException;
-    method public double getDouble(@NonNull String) throws org.json.JSONException;
-    method public int getInt(@NonNull String) throws org.json.JSONException;
-    method @NonNull public org.json.JSONArray getJSONArray(@NonNull String) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject getJSONObject(@NonNull String) throws org.json.JSONException;
-    method public long getLong(@NonNull String) throws org.json.JSONException;
-    method @NonNull public String getString(@NonNull String) throws org.json.JSONException;
-    method public boolean has(@Nullable String);
-    method public boolean isNull(@Nullable String);
-    method @NonNull public java.util.Iterator<java.lang.String> keys();
-    method public int length();
-    method @Nullable public org.json.JSONArray names();
-    method @NonNull public static String numberToString(@NonNull Number) throws org.json.JSONException;
-    method @Nullable public Object opt(@Nullable String);
-    method public boolean optBoolean(@Nullable String);
-    method public boolean optBoolean(@Nullable String, boolean);
-    method public double optDouble(@Nullable String);
-    method public double optDouble(@Nullable String, double);
-    method public int optInt(@Nullable String);
-    method public int optInt(@Nullable String, int);
-    method @Nullable public org.json.JSONArray optJSONArray(@Nullable String);
-    method @Nullable public org.json.JSONObject optJSONObject(@Nullable String);
-    method public long optLong(@Nullable String);
-    method public long optLong(@Nullable String, long);
-    method @NonNull public String optString(@Nullable String);
-    method @NonNull public String optString(@Nullable String, @NonNull String);
-    method @NonNull public org.json.JSONObject put(@NonNull String, boolean) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject put(@NonNull String, double) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject put(@NonNull String, int) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject put(@NonNull String, long) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject put(@NonNull String, @Nullable Object) throws org.json.JSONException;
-    method @NonNull public org.json.JSONObject putOpt(@Nullable String, @Nullable Object) throws org.json.JSONException;
-    method @NonNull public static String quote(@Nullable String);
-    method @Nullable public Object remove(@Nullable String);
-    method @Nullable public org.json.JSONArray toJSONArray(@Nullable org.json.JSONArray) throws org.json.JSONException;
-    method @NonNull public String toString(int) throws org.json.JSONException;
-    method @Nullable public static Object wrap(@Nullable Object);
-    field @NonNull public static final Object NULL;
-  }
-
-  public class JSONStringer {
-    ctor public JSONStringer();
-    method public org.json.JSONStringer array() throws org.json.JSONException;
-    method public org.json.JSONStringer endArray() throws org.json.JSONException;
-    method public org.json.JSONStringer endObject() throws org.json.JSONException;
-    method public org.json.JSONStringer key(String) throws org.json.JSONException;
-    method public org.json.JSONStringer object() throws org.json.JSONException;
-    method public org.json.JSONStringer value(Object) throws org.json.JSONException;
-    method public org.json.JSONStringer value(boolean) throws org.json.JSONException;
-    method public org.json.JSONStringer value(double) throws org.json.JSONException;
-    method public org.json.JSONStringer value(long) throws org.json.JSONException;
-  }
-
-  public class JSONTokener {
-    ctor public JSONTokener(String);
-    method public void back();
-    method public static int dehexchar(char);
-    method public boolean more();
-    method public char next();
-    method public char next(char) throws org.json.JSONException;
-    method public String next(int) throws org.json.JSONException;
-    method public char nextClean() throws org.json.JSONException;
-    method public String nextString(char) throws org.json.JSONException;
-    method public String nextTo(String);
-    method public String nextTo(char);
-    method public Object nextValue() throws org.json.JSONException;
-    method public void skipPast(String);
-    method public char skipTo(char);
-    method public org.json.JSONException syntaxError(String);
-  }
-
-}
-
-package org.w3c.dom {
-
-  public interface Attr extends org.w3c.dom.Node {
-    method public String getName();
-    method public org.w3c.dom.Element getOwnerElement();
-    method public org.w3c.dom.TypeInfo getSchemaTypeInfo();
-    method public boolean getSpecified();
-    method public String getValue();
-    method public boolean isId();
-    method public void setValue(String) throws org.w3c.dom.DOMException;
-  }
-
-  public interface CDATASection extends org.w3c.dom.Text {
-  }
-
-  public interface CharacterData extends org.w3c.dom.Node {
-    method public void appendData(String) throws org.w3c.dom.DOMException;
-    method public void deleteData(int, int) throws org.w3c.dom.DOMException;
-    method public String getData() throws org.w3c.dom.DOMException;
-    method public int getLength();
-    method public void insertData(int, String) throws org.w3c.dom.DOMException;
-    method public void replaceData(int, int, String) throws org.w3c.dom.DOMException;
-    method public void setData(String) throws org.w3c.dom.DOMException;
-    method public String substringData(int, int) throws org.w3c.dom.DOMException;
-  }
-
-  public interface Comment extends org.w3c.dom.CharacterData {
-  }
-
-  public interface DOMConfiguration {
-    method public boolean canSetParameter(String, Object);
-    method public Object getParameter(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.DOMStringList getParameterNames();
-    method public void setParameter(String, Object) throws org.w3c.dom.DOMException;
-  }
-
-  public interface DOMError {
-    method public org.w3c.dom.DOMLocator getLocation();
-    method public String getMessage();
-    method public Object getRelatedData();
-    method public Object getRelatedException();
-    method public short getSeverity();
-    method public String getType();
-    field public static final short SEVERITY_ERROR = 2; // 0x2
-    field public static final short SEVERITY_FATAL_ERROR = 3; // 0x3
-    field public static final short SEVERITY_WARNING = 1; // 0x1
-  }
-
-  public interface DOMErrorHandler {
-    method public boolean handleError(org.w3c.dom.DOMError);
-  }
-
-  public class DOMException extends java.lang.RuntimeException {
-    ctor public DOMException(short, String);
-    field public static final short DOMSTRING_SIZE_ERR = 2; // 0x2
-    field public static final short HIERARCHY_REQUEST_ERR = 3; // 0x3
-    field public static final short INDEX_SIZE_ERR = 1; // 0x1
-    field public static final short INUSE_ATTRIBUTE_ERR = 10; // 0xa
-    field public static final short INVALID_ACCESS_ERR = 15; // 0xf
-    field public static final short INVALID_CHARACTER_ERR = 5; // 0x5
-    field public static final short INVALID_MODIFICATION_ERR = 13; // 0xd
-    field public static final short INVALID_STATE_ERR = 11; // 0xb
-    field public static final short NAMESPACE_ERR = 14; // 0xe
-    field public static final short NOT_FOUND_ERR = 8; // 0x8
-    field public static final short NOT_SUPPORTED_ERR = 9; // 0x9
-    field public static final short NO_DATA_ALLOWED_ERR = 6; // 0x6
-    field public static final short NO_MODIFICATION_ALLOWED_ERR = 7; // 0x7
-    field public static final short SYNTAX_ERR = 12; // 0xc
-    field public static final short TYPE_MISMATCH_ERR = 17; // 0x11
-    field public static final short VALIDATION_ERR = 16; // 0x10
-    field public static final short WRONG_DOCUMENT_ERR = 4; // 0x4
-    field public short code;
-  }
-
-  public interface DOMImplementation {
-    method public org.w3c.dom.Document createDocument(String, String, org.w3c.dom.DocumentType) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.DocumentType createDocumentType(String, String, String) throws org.w3c.dom.DOMException;
-    method public Object getFeature(String, String);
-    method public boolean hasFeature(String, String);
-  }
-
-  public interface DOMImplementationList {
-    method public int getLength();
-    method public org.w3c.dom.DOMImplementation item(int);
-  }
-
-  public interface DOMImplementationSource {
-    method public org.w3c.dom.DOMImplementation getDOMImplementation(String);
-    method public org.w3c.dom.DOMImplementationList getDOMImplementationList(String);
-  }
-
-  public interface DOMLocator {
-    method public int getByteOffset();
-    method public int getColumnNumber();
-    method public int getLineNumber();
-    method public org.w3c.dom.Node getRelatedNode();
-    method public String getUri();
-    method public int getUtf16Offset();
-  }
-
-  public interface DOMStringList {
-    method public boolean contains(String);
-    method public int getLength();
-    method public String item(int);
-  }
-
-  public interface Document extends org.w3c.dom.Node {
-    method public org.w3c.dom.Node adoptNode(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr createAttribute(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr createAttributeNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.CDATASection createCDATASection(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Comment createComment(String);
-    method public org.w3c.dom.DocumentFragment createDocumentFragment();
-    method public org.w3c.dom.Element createElement(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Element createElementNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.EntityReference createEntityReference(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.ProcessingInstruction createProcessingInstruction(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Text createTextNode(String);
-    method public org.w3c.dom.DocumentType getDoctype();
-    method public org.w3c.dom.Element getDocumentElement();
-    method public String getDocumentURI();
-    method public org.w3c.dom.DOMConfiguration getDomConfig();
-    method public org.w3c.dom.Element getElementById(String);
-    method public org.w3c.dom.NodeList getElementsByTagName(String);
-    method public org.w3c.dom.NodeList getElementsByTagNameNS(String, String);
-    method public org.w3c.dom.DOMImplementation getImplementation();
-    method public String getInputEncoding();
-    method public boolean getStrictErrorChecking();
-    method public String getXmlEncoding();
-    method public boolean getXmlStandalone();
-    method public String getXmlVersion();
-    method public org.w3c.dom.Node importNode(org.w3c.dom.Node, boolean) throws org.w3c.dom.DOMException;
-    method public void normalizeDocument();
-    method public org.w3c.dom.Node renameNode(org.w3c.dom.Node, String, String) throws org.w3c.dom.DOMException;
-    method public void setDocumentURI(String);
-    method public void setStrictErrorChecking(boolean);
-    method public void setXmlStandalone(boolean) throws org.w3c.dom.DOMException;
-    method public void setXmlVersion(String) throws org.w3c.dom.DOMException;
-  }
-
-  public interface DocumentFragment extends org.w3c.dom.Node {
-  }
-
-  public interface DocumentType extends org.w3c.dom.Node {
-    method public org.w3c.dom.NamedNodeMap getEntities();
-    method public String getInternalSubset();
-    method public String getName();
-    method public org.w3c.dom.NamedNodeMap getNotations();
-    method public String getPublicId();
-    method public String getSystemId();
-  }
-
-  public interface Element extends org.w3c.dom.Node {
-    method public String getAttribute(String);
-    method public String getAttributeNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr getAttributeNode(String);
-    method public org.w3c.dom.Attr getAttributeNodeNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.NodeList getElementsByTagName(String);
-    method public org.w3c.dom.NodeList getElementsByTagNameNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.TypeInfo getSchemaTypeInfo();
-    method public String getTagName();
-    method public boolean hasAttribute(String);
-    method public boolean hasAttributeNS(String, String) throws org.w3c.dom.DOMException;
-    method public void removeAttribute(String) throws org.w3c.dom.DOMException;
-    method public void removeAttributeNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
-    method public void setAttribute(String, String) throws org.w3c.dom.DOMException;
-    method public void setAttributeNS(String, String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr) throws org.w3c.dom.DOMException;
-    method public void setIdAttribute(String, boolean) throws org.w3c.dom.DOMException;
-    method public void setIdAttributeNS(String, String, boolean) throws org.w3c.dom.DOMException;
-    method public void setIdAttributeNode(org.w3c.dom.Attr, boolean) throws org.w3c.dom.DOMException;
-  }
-
-  public interface Entity extends org.w3c.dom.Node {
-    method public String getInputEncoding();
-    method public String getNotationName();
-    method public String getPublicId();
-    method public String getSystemId();
-    method public String getXmlEncoding();
-    method public String getXmlVersion();
-  }
-
-  public interface EntityReference extends org.w3c.dom.Node {
-  }
-
-  public interface NameList {
-    method public boolean contains(String);
-    method public boolean containsNS(String, String);
-    method public int getLength();
-    method public String getName(int);
-    method public String getNamespaceURI(int);
-  }
-
-  public interface NamedNodeMap {
-    method public int getLength();
-    method public org.w3c.dom.Node getNamedItem(String);
-    method public org.w3c.dom.Node getNamedItemNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node item(int);
-    method public org.w3c.dom.Node removeNamedItem(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node removeNamedItemNS(String, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node setNamedItem(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node setNamedItemNS(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-  }
-
-  public interface Node {
-    method public org.w3c.dom.Node appendChild(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node cloneNode(boolean);
-    method public short compareDocumentPosition(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.NamedNodeMap getAttributes();
-    method public String getBaseURI();
-    method public org.w3c.dom.NodeList getChildNodes();
-    method public Object getFeature(String, String);
-    method public org.w3c.dom.Node getFirstChild();
-    method public org.w3c.dom.Node getLastChild();
-    method public String getLocalName();
-    method public String getNamespaceURI();
-    method public org.w3c.dom.Node getNextSibling();
-    method public String getNodeName();
-    method public short getNodeType();
-    method public String getNodeValue() throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Document getOwnerDocument();
-    method public org.w3c.dom.Node getParentNode();
-    method public String getPrefix();
-    method public org.w3c.dom.Node getPreviousSibling();
-    method public String getTextContent() throws org.w3c.dom.DOMException;
-    method public Object getUserData(String);
-    method public boolean hasAttributes();
-    method public boolean hasChildNodes();
-    method public org.w3c.dom.Node insertBefore(org.w3c.dom.Node, org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public boolean isDefaultNamespace(String);
-    method public boolean isEqualNode(org.w3c.dom.Node);
-    method public boolean isSameNode(org.w3c.dom.Node);
-    method public boolean isSupported(String, String);
-    method public String lookupNamespaceURI(String);
-    method public String lookupPrefix(String);
-    method public void normalize();
-    method public org.w3c.dom.Node removeChild(org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Node replaceChild(org.w3c.dom.Node, org.w3c.dom.Node) throws org.w3c.dom.DOMException;
-    method public void setNodeValue(String) throws org.w3c.dom.DOMException;
-    method public void setPrefix(String) throws org.w3c.dom.DOMException;
-    method public void setTextContent(String) throws org.w3c.dom.DOMException;
-    method public Object setUserData(String, Object, org.w3c.dom.UserDataHandler);
-    field public static final short ATTRIBUTE_NODE = 2; // 0x2
-    field public static final short CDATA_SECTION_NODE = 4; // 0x4
-    field public static final short COMMENT_NODE = 8; // 0x8
-    field public static final short DOCUMENT_FRAGMENT_NODE = 11; // 0xb
-    field public static final short DOCUMENT_NODE = 9; // 0x9
-    field public static final short DOCUMENT_POSITION_CONTAINED_BY = 16; // 0x10
-    field public static final short DOCUMENT_POSITION_CONTAINS = 8; // 0x8
-    field public static final short DOCUMENT_POSITION_DISCONNECTED = 1; // 0x1
-    field public static final short DOCUMENT_POSITION_FOLLOWING = 4; // 0x4
-    field public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32; // 0x20
-    field public static final short DOCUMENT_POSITION_PRECEDING = 2; // 0x2
-    field public static final short DOCUMENT_TYPE_NODE = 10; // 0xa
-    field public static final short ELEMENT_NODE = 1; // 0x1
-    field public static final short ENTITY_NODE = 6; // 0x6
-    field public static final short ENTITY_REFERENCE_NODE = 5; // 0x5
-    field public static final short NOTATION_NODE = 12; // 0xc
-    field public static final short PROCESSING_INSTRUCTION_NODE = 7; // 0x7
-    field public static final short TEXT_NODE = 3; // 0x3
-  }
-
-  public interface NodeList {
-    method public int getLength();
-    method public org.w3c.dom.Node item(int);
-  }
-
-  public interface Notation extends org.w3c.dom.Node {
-    method public String getPublicId();
-    method public String getSystemId();
-  }
-
-  public interface ProcessingInstruction extends org.w3c.dom.Node {
-    method public String getData();
-    method public String getTarget();
-    method public void setData(String) throws org.w3c.dom.DOMException;
-  }
-
-  public interface Text extends org.w3c.dom.CharacterData {
-    method public String getWholeText();
-    method public boolean isElementContentWhitespace();
-    method public org.w3c.dom.Text replaceWholeText(String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.Text splitText(int) throws org.w3c.dom.DOMException;
-  }
-
-  public interface TypeInfo {
-    method public String getTypeName();
-    method public String getTypeNamespace();
-    method public boolean isDerivedFrom(String, String, int);
-    field public static final int DERIVATION_EXTENSION = 2; // 0x2
-    field public static final int DERIVATION_LIST = 8; // 0x8
-    field public static final int DERIVATION_RESTRICTION = 1; // 0x1
-    field public static final int DERIVATION_UNION = 4; // 0x4
-  }
-
-  public interface UserDataHandler {
-    method public void handle(short, String, Object, org.w3c.dom.Node, org.w3c.dom.Node);
-    field public static final short NODE_ADOPTED = 5; // 0x5
-    field public static final short NODE_CLONED = 1; // 0x1
-    field public static final short NODE_DELETED = 3; // 0x3
-    field public static final short NODE_IMPORTED = 2; // 0x2
-    field public static final short NODE_RENAMED = 4; // 0x4
-  }
-
-}
-
-package org.w3c.dom.ls {
-
-  public interface DOMImplementationLS {
-    method public org.w3c.dom.ls.LSInput createLSInput();
-    method public org.w3c.dom.ls.LSOutput createLSOutput();
-    method public org.w3c.dom.ls.LSParser createLSParser(short, String) throws org.w3c.dom.DOMException;
-    method public org.w3c.dom.ls.LSSerializer createLSSerializer();
-    field public static final short MODE_ASYNCHRONOUS = 2; // 0x2
-    field public static final short MODE_SYNCHRONOUS = 1; // 0x1
-  }
-
-  public class LSException extends java.lang.RuntimeException {
-    ctor public LSException(short, String);
-    field public static final short PARSE_ERR = 81; // 0x51
-    field public static final short SERIALIZE_ERR = 82; // 0x52
-    field public short code;
-  }
-
-  public interface LSInput {
-    method public String getBaseURI();
-    method public java.io.InputStream getByteStream();
-    method public boolean getCertifiedText();
-    method public java.io.Reader getCharacterStream();
-    method public String getEncoding();
-    method public String getPublicId();
-    method public String getStringData();
-    method public String getSystemId();
-    method public void setBaseURI(String);
-    method public void setByteStream(java.io.InputStream);
-    method public void setCertifiedText(boolean);
-    method public void setCharacterStream(java.io.Reader);
-    method public void setEncoding(String);
-    method public void setPublicId(String);
-    method public void setStringData(String);
-    method public void setSystemId(String);
-  }
-
-  public interface LSOutput {
-    method public java.io.OutputStream getByteStream();
-    method public java.io.Writer getCharacterStream();
-    method public String getEncoding();
-    method public String getSystemId();
-    method public void setByteStream(java.io.OutputStream);
-    method public void setCharacterStream(java.io.Writer);
-    method public void setEncoding(String);
-    method public void setSystemId(String);
-  }
-
-  public interface LSParser {
-    method public void abort();
-    method public boolean getAsync();
-    method public boolean getBusy();
-    method public org.w3c.dom.DOMConfiguration getDomConfig();
-    method public org.w3c.dom.ls.LSParserFilter getFilter();
-    method public org.w3c.dom.Document parse(org.w3c.dom.ls.LSInput) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
-    method public org.w3c.dom.Document parseURI(String) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
-    method public org.w3c.dom.Node parseWithContext(org.w3c.dom.ls.LSInput, org.w3c.dom.Node, short) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
-    method public void setFilter(org.w3c.dom.ls.LSParserFilter);
-    field public static final short ACTION_APPEND_AS_CHILDREN = 1; // 0x1
-    field public static final short ACTION_INSERT_AFTER = 4; // 0x4
-    field public static final short ACTION_INSERT_BEFORE = 3; // 0x3
-    field public static final short ACTION_REPLACE = 5; // 0x5
-    field public static final short ACTION_REPLACE_CHILDREN = 2; // 0x2
-  }
-
-  public interface LSParserFilter {
-    method public short acceptNode(org.w3c.dom.Node);
-    method public int getWhatToShow();
-    method public short startElement(org.w3c.dom.Element);
-    field public static final short FILTER_ACCEPT = 1; // 0x1
-    field public static final short FILTER_INTERRUPT = 4; // 0x4
-    field public static final short FILTER_REJECT = 2; // 0x2
-    field public static final short FILTER_SKIP = 3; // 0x3
-  }
-
-  public interface LSResourceResolver {
-    method public org.w3c.dom.ls.LSInput resolveResource(String, String, String, String, String);
-  }
-
-  public interface LSSerializer {
-    method public org.w3c.dom.DOMConfiguration getDomConfig();
-    method public String getNewLine();
-    method public void setNewLine(String);
-    method public boolean write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput) throws org.w3c.dom.ls.LSException;
-    method public String writeToString(org.w3c.dom.Node) throws org.w3c.dom.DOMException, org.w3c.dom.ls.LSException;
-    method public boolean writeToURI(org.w3c.dom.Node, String) throws org.w3c.dom.ls.LSException;
-  }
-
-}
-
-package org.xml.sax {
-
-  @Deprecated public interface AttributeList {
-    method @Deprecated public int getLength();
-    method @Deprecated public String getName(int);
-    method @Deprecated public String getType(int);
-    method @Deprecated public String getType(String);
-    method @Deprecated public String getValue(int);
-    method @Deprecated public String getValue(String);
-  }
-
-  public interface Attributes {
-    method public int getIndex(String, String);
-    method public int getIndex(String);
-    method public int getLength();
-    method public String getLocalName(int);
-    method public String getQName(int);
-    method public String getType(int);
-    method public String getType(String, String);
-    method public String getType(String);
-    method public String getURI(int);
-    method public String getValue(int);
-    method public String getValue(String, String);
-    method public String getValue(String);
-  }
-
-  public interface ContentHandler {
-    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endDocument() throws org.xml.sax.SAXException;
-    method public void endElement(String, String, String) throws org.xml.sax.SAXException;
-    method public void endPrefixMapping(String) throws org.xml.sax.SAXException;
-    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method public void setDocumentLocator(org.xml.sax.Locator);
-    method public void skippedEntity(String) throws org.xml.sax.SAXException;
-    method public void startDocument() throws org.xml.sax.SAXException;
-    method public void startElement(String, String, String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
-    method public void startPrefixMapping(String, String) throws org.xml.sax.SAXException;
-  }
-
-  public interface DTDHandler {
-    method public void notationDecl(String, String, String) throws org.xml.sax.SAXException;
-    method public void unparsedEntityDecl(String, String, String, String) throws org.xml.sax.SAXException;
-  }
-
-  @Deprecated public interface DocumentHandler {
-    method @Deprecated public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method @Deprecated public void endDocument() throws org.xml.sax.SAXException;
-    method @Deprecated public void endElement(String) throws org.xml.sax.SAXException;
-    method @Deprecated public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method @Deprecated public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method @Deprecated public void setDocumentLocator(org.xml.sax.Locator);
-    method @Deprecated public void startDocument() throws org.xml.sax.SAXException;
-    method @Deprecated public void startElement(String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
-  }
-
-  public interface EntityResolver {
-    method public org.xml.sax.InputSource resolveEntity(String, String) throws java.io.IOException, org.xml.sax.SAXException;
-  }
-
-  public interface ErrorHandler {
-    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-  }
-
-  @Deprecated public class HandlerBase implements org.xml.sax.DTDHandler org.xml.sax.DocumentHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler {
-    ctor @Deprecated public HandlerBase();
-    method @Deprecated public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method @Deprecated public void endDocument() throws org.xml.sax.SAXException;
-    method @Deprecated public void endElement(String) throws org.xml.sax.SAXException;
-    method @Deprecated public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method @Deprecated public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method @Deprecated public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method @Deprecated public void notationDecl(String, String, String);
-    method @Deprecated public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method @Deprecated public org.xml.sax.InputSource resolveEntity(String, String) throws org.xml.sax.SAXException;
-    method @Deprecated public void setDocumentLocator(org.xml.sax.Locator);
-    method @Deprecated public void startDocument() throws org.xml.sax.SAXException;
-    method @Deprecated public void startElement(String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
-    method @Deprecated public void unparsedEntityDecl(String, String, String, String);
-    method @Deprecated public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-  }
-
-  public class InputSource {
-    ctor public InputSource();
-    ctor public InputSource(String);
-    ctor public InputSource(java.io.InputStream);
-    ctor public InputSource(java.io.Reader);
-    method public java.io.InputStream getByteStream();
-    method public java.io.Reader getCharacterStream();
-    method public String getEncoding();
-    method public String getPublicId();
-    method public String getSystemId();
-    method public void setByteStream(java.io.InputStream);
-    method public void setCharacterStream(java.io.Reader);
-    method public void setEncoding(String);
-    method public void setPublicId(String);
-    method public void setSystemId(String);
-  }
-
-  public interface Locator {
-    method public int getColumnNumber();
-    method public int getLineNumber();
-    method public String getPublicId();
-    method public String getSystemId();
-  }
-
-  @Deprecated public interface Parser {
-    method @Deprecated public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method @Deprecated public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method @Deprecated public void setDTDHandler(org.xml.sax.DTDHandler);
-    method @Deprecated public void setDocumentHandler(org.xml.sax.DocumentHandler);
-    method @Deprecated public void setEntityResolver(org.xml.sax.EntityResolver);
-    method @Deprecated public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method @Deprecated public void setLocale(java.util.Locale) throws org.xml.sax.SAXException;
-  }
-
-  public class SAXException extends java.lang.Exception {
-    ctor public SAXException();
-    ctor public SAXException(String);
-    ctor public SAXException(Exception);
-    ctor public SAXException(String, Exception);
-    method public Exception getException();
-  }
-
-  public class SAXNotRecognizedException extends org.xml.sax.SAXException {
-    ctor public SAXNotRecognizedException();
-    ctor public SAXNotRecognizedException(String);
-  }
-
-  public class SAXNotSupportedException extends org.xml.sax.SAXException {
-    ctor public SAXNotSupportedException();
-    ctor public SAXNotSupportedException(String);
-  }
-
-  public class SAXParseException extends org.xml.sax.SAXException {
-    ctor public SAXParseException(String, org.xml.sax.Locator);
-    ctor public SAXParseException(String, org.xml.sax.Locator, Exception);
-    ctor public SAXParseException(String, String, String, int, int);
-    ctor public SAXParseException(String, String, String, int, int, Exception);
-    method public int getColumnNumber();
-    method public int getLineNumber();
-    method public String getPublicId();
-    method public String getSystemId();
-  }
-
-  public interface XMLFilter extends org.xml.sax.XMLReader {
-    method public org.xml.sax.XMLReader getParent();
-    method public void setParent(org.xml.sax.XMLReader);
-  }
-
-  public interface XMLReader {
-    method public org.xml.sax.ContentHandler getContentHandler();
-    method public org.xml.sax.DTDHandler getDTDHandler();
-    method public org.xml.sax.EntityResolver getEntityResolver();
-    method public org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void setContentHandler(org.xml.sax.ContentHandler);
-    method public void setDTDHandler(org.xml.sax.DTDHandler);
-    method public void setEntityResolver(org.xml.sax.EntityResolver);
-    method public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-  }
-
-}
-
-package org.xml.sax.ext {
-
-  public interface Attributes2 extends org.xml.sax.Attributes {
-    method public boolean isDeclared(int);
-    method public boolean isDeclared(String);
-    method public boolean isDeclared(String, String);
-    method public boolean isSpecified(int);
-    method public boolean isSpecified(String, String);
-    method public boolean isSpecified(String);
-  }
-
-  public class Attributes2Impl extends org.xml.sax.helpers.AttributesImpl implements org.xml.sax.ext.Attributes2 {
-    ctor public Attributes2Impl();
-    ctor public Attributes2Impl(org.xml.sax.Attributes);
-    method public boolean isDeclared(int);
-    method public boolean isDeclared(String, String);
-    method public boolean isDeclared(String);
-    method public boolean isSpecified(int);
-    method public boolean isSpecified(String, String);
-    method public boolean isSpecified(String);
-    method public void setDeclared(int, boolean);
-    method public void setSpecified(int, boolean);
-  }
-
-  public interface DeclHandler {
-    method public void attributeDecl(String, String, String, String, String) throws org.xml.sax.SAXException;
-    method public void elementDecl(String, String) throws org.xml.sax.SAXException;
-    method public void externalEntityDecl(String, String, String) throws org.xml.sax.SAXException;
-    method public void internalEntityDecl(String, String) throws org.xml.sax.SAXException;
-  }
-
-  public class DefaultHandler2 extends org.xml.sax.helpers.DefaultHandler implements org.xml.sax.ext.DeclHandler org.xml.sax.ext.EntityResolver2 org.xml.sax.ext.LexicalHandler {
-    ctor public DefaultHandler2();
-    method public void attributeDecl(String, String, String, String, String) throws org.xml.sax.SAXException;
-    method public void comment(char[], int, int) throws org.xml.sax.SAXException;
-    method public void elementDecl(String, String) throws org.xml.sax.SAXException;
-    method public void endCDATA() throws org.xml.sax.SAXException;
-    method public void endDTD() throws org.xml.sax.SAXException;
-    method public void endEntity(String) throws org.xml.sax.SAXException;
-    method public void externalEntityDecl(String, String, String) throws org.xml.sax.SAXException;
-    method public org.xml.sax.InputSource getExternalSubset(String, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void internalEntityDecl(String, String) throws org.xml.sax.SAXException;
-    method public org.xml.sax.InputSource resolveEntity(String, String, String, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void startCDATA() throws org.xml.sax.SAXException;
-    method public void startDTD(String, String, String) throws org.xml.sax.SAXException;
-    method public void startEntity(String) throws org.xml.sax.SAXException;
-  }
-
-  public interface EntityResolver2 extends org.xml.sax.EntityResolver {
-    method public org.xml.sax.InputSource getExternalSubset(String, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public org.xml.sax.InputSource resolveEntity(String, String, String, String) throws java.io.IOException, org.xml.sax.SAXException;
-  }
-
-  public interface LexicalHandler {
-    method public void comment(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endCDATA() throws org.xml.sax.SAXException;
-    method public void endDTD() throws org.xml.sax.SAXException;
-    method public void endEntity(String) throws org.xml.sax.SAXException;
-    method public void startCDATA() throws org.xml.sax.SAXException;
-    method public void startDTD(String, String, String) throws org.xml.sax.SAXException;
-    method public void startEntity(String) throws org.xml.sax.SAXException;
-  }
-
-  public interface Locator2 extends org.xml.sax.Locator {
-    method public String getEncoding();
-    method public String getXMLVersion();
-  }
-
-  public class Locator2Impl extends org.xml.sax.helpers.LocatorImpl implements org.xml.sax.ext.Locator2 {
-    ctor public Locator2Impl();
-    ctor public Locator2Impl(org.xml.sax.Locator);
-    method public String getEncoding();
-    method public String getXMLVersion();
-    method public void setEncoding(String);
-    method public void setXMLVersion(String);
-  }
-
-}
-
-package org.xml.sax.helpers {
-
-  @Deprecated public class AttributeListImpl implements org.xml.sax.AttributeList {
-    ctor @Deprecated public AttributeListImpl();
-    ctor @Deprecated public AttributeListImpl(org.xml.sax.AttributeList);
-    method @Deprecated public void addAttribute(String, String, String);
-    method @Deprecated public void clear();
-    method @Deprecated public int getLength();
-    method @Deprecated public String getName(int);
-    method @Deprecated public String getType(int);
-    method @Deprecated public String getType(String);
-    method @Deprecated public String getValue(int);
-    method @Deprecated public String getValue(String);
-    method @Deprecated public void removeAttribute(String);
-    method @Deprecated public void setAttributeList(org.xml.sax.AttributeList);
-  }
-
-  public class AttributesImpl implements org.xml.sax.Attributes {
-    ctor public AttributesImpl();
-    ctor public AttributesImpl(org.xml.sax.Attributes);
-    method public void addAttribute(String, String, String, String, String);
-    method public void clear();
-    method public int getIndex(String, String);
-    method public int getIndex(String);
-    method public int getLength();
-    method public String getLocalName(int);
-    method public String getQName(int);
-    method public String getType(int);
-    method public String getType(String, String);
-    method public String getType(String);
-    method public String getURI(int);
-    method public String getValue(int);
-    method public String getValue(String, String);
-    method public String getValue(String);
-    method public void removeAttribute(int);
-    method public void setAttribute(int, String, String, String, String, String);
-    method public void setAttributes(org.xml.sax.Attributes);
-    method public void setLocalName(int, String);
-    method public void setQName(int, String);
-    method public void setType(int, String);
-    method public void setURI(int, String);
-    method public void setValue(int, String);
-  }
-
-  public class DefaultHandler implements org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler {
-    ctor public DefaultHandler();
-    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endDocument() throws org.xml.sax.SAXException;
-    method public void endElement(String, String, String) throws org.xml.sax.SAXException;
-    method public void endPrefixMapping(String) throws org.xml.sax.SAXException;
-    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method public void notationDecl(String, String, String) throws org.xml.sax.SAXException;
-    method public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method public org.xml.sax.InputSource resolveEntity(String, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void setDocumentLocator(org.xml.sax.Locator);
-    method public void skippedEntity(String) throws org.xml.sax.SAXException;
-    method public void startDocument() throws org.xml.sax.SAXException;
-    method public void startElement(String, String, String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
-    method public void startPrefixMapping(String, String) throws org.xml.sax.SAXException;
-    method public void unparsedEntityDecl(String, String, String, String) throws org.xml.sax.SAXException;
-    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-  }
-
-  public class LocatorImpl implements org.xml.sax.Locator {
-    ctor public LocatorImpl();
-    ctor public LocatorImpl(org.xml.sax.Locator);
-    method public int getColumnNumber();
-    method public int getLineNumber();
-    method public String getPublicId();
-    method public String getSystemId();
-    method public void setColumnNumber(int);
-    method public void setLineNumber(int);
-    method public void setPublicId(String);
-    method public void setSystemId(String);
-  }
-
-  public class NamespaceSupport {
-    ctor public NamespaceSupport();
-    method public boolean declarePrefix(String, String);
-    method public java.util.Enumeration getDeclaredPrefixes();
-    method public String getPrefix(String);
-    method public java.util.Enumeration getPrefixes();
-    method public java.util.Enumeration getPrefixes(String);
-    method public String getURI(String);
-    method public boolean isNamespaceDeclUris();
-    method public void popContext();
-    method public String[] processName(String, String[], boolean);
-    method public void pushContext();
-    method public void reset();
-    method public void setNamespaceDeclUris(boolean);
-    field public static final String NSDECL = "http://www.w3.org/xmlns/2000/";
-    field public static final String XMLNS = "http://www.w3.org/XML/1998/namespace";
-  }
-
-  public class ParserAdapter implements org.xml.sax.DocumentHandler org.xml.sax.XMLReader {
-    ctor public ParserAdapter() throws org.xml.sax.SAXException;
-    ctor public ParserAdapter(org.xml.sax.Parser);
-    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endDocument() throws org.xml.sax.SAXException;
-    method public void endElement(String) throws org.xml.sax.SAXException;
-    method public org.xml.sax.ContentHandler getContentHandler();
-    method public org.xml.sax.DTDHandler getDTDHandler();
-    method public org.xml.sax.EntityResolver getEntityResolver();
-    method public org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method public void setContentHandler(org.xml.sax.ContentHandler);
-    method public void setDTDHandler(org.xml.sax.DTDHandler);
-    method public void setDocumentLocator(org.xml.sax.Locator);
-    method public void setEntityResolver(org.xml.sax.EntityResolver);
-    method public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void startDocument() throws org.xml.sax.SAXException;
-    method public void startElement(String, org.xml.sax.AttributeList) throws org.xml.sax.SAXException;
-  }
-
-  @Deprecated public class ParserFactory {
-    method @Deprecated public static org.xml.sax.Parser makeParser() throws java.lang.ClassCastException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.NullPointerException;
-    method @Deprecated public static org.xml.sax.Parser makeParser(String) throws java.lang.ClassCastException, java.lang.ClassNotFoundException, java.lang.IllegalAccessException, java.lang.InstantiationException;
-  }
-
-  public class XMLFilterImpl implements org.xml.sax.ContentHandler org.xml.sax.DTDHandler org.xml.sax.EntityResolver org.xml.sax.ErrorHandler org.xml.sax.XMLFilter {
-    ctor public XMLFilterImpl();
-    ctor public XMLFilterImpl(org.xml.sax.XMLReader);
-    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endDocument() throws org.xml.sax.SAXException;
-    method public void endElement(String, String, String) throws org.xml.sax.SAXException;
-    method public void endPrefixMapping(String) throws org.xml.sax.SAXException;
-    method public void error(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public void fatalError(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-    method public org.xml.sax.ContentHandler getContentHandler();
-    method public org.xml.sax.DTDHandler getDTDHandler();
-    method public org.xml.sax.EntityResolver getEntityResolver();
-    method public org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public org.xml.sax.XMLReader getParent();
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method public void notationDecl(String, String, String) throws org.xml.sax.SAXException;
-    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method public org.xml.sax.InputSource resolveEntity(String, String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void setContentHandler(org.xml.sax.ContentHandler);
-    method public void setDTDHandler(org.xml.sax.DTDHandler);
-    method public void setDocumentLocator(org.xml.sax.Locator);
-    method public void setEntityResolver(org.xml.sax.EntityResolver);
-    method public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setParent(org.xml.sax.XMLReader);
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void skippedEntity(String) throws org.xml.sax.SAXException;
-    method public void startDocument() throws org.xml.sax.SAXException;
-    method public void startElement(String, String, String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
-    method public void startPrefixMapping(String, String) throws org.xml.sax.SAXException;
-    method public void unparsedEntityDecl(String, String, String, String) throws org.xml.sax.SAXException;
-    method public void warning(org.xml.sax.SAXParseException) throws org.xml.sax.SAXException;
-  }
-
-  public class XMLReaderAdapter implements org.xml.sax.ContentHandler org.xml.sax.Parser {
-    ctor public XMLReaderAdapter() throws org.xml.sax.SAXException;
-    ctor public XMLReaderAdapter(org.xml.sax.XMLReader);
-    method public void characters(char[], int, int) throws org.xml.sax.SAXException;
-    method public void endDocument() throws org.xml.sax.SAXException;
-    method public void endElement(String, String, String) throws org.xml.sax.SAXException;
-    method public void endPrefixMapping(String);
-    method public void ignorableWhitespace(char[], int, int) throws org.xml.sax.SAXException;
-    method public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void processingInstruction(String, String) throws org.xml.sax.SAXException;
-    method public void setDTDHandler(org.xml.sax.DTDHandler);
-    method public void setDocumentHandler(org.xml.sax.DocumentHandler);
-    method public void setDocumentLocator(org.xml.sax.Locator);
-    method public void setEntityResolver(org.xml.sax.EntityResolver);
-    method public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setLocale(java.util.Locale) throws org.xml.sax.SAXException;
-    method public void skippedEntity(String) throws org.xml.sax.SAXException;
-    method public void startDocument() throws org.xml.sax.SAXException;
-    method public void startElement(String, String, String, org.xml.sax.Attributes) throws org.xml.sax.SAXException;
-    method public void startPrefixMapping(String, String);
-  }
-
-  public final class XMLReaderFactory {
-    method public static org.xml.sax.XMLReader createXMLReader() throws org.xml.sax.SAXException;
-    method public static org.xml.sax.XMLReader createXMLReader(String) throws org.xml.sax.SAXException;
-  }
-
-}
-
-package org.xmlpull.v1 {
-
-  public interface XmlPullParser {
-    method public void defineEntityReplacementText(String, String) throws org.xmlpull.v1.XmlPullParserException;
-    method public int getAttributeCount();
-    method public String getAttributeName(int);
-    method public String getAttributeNamespace(int);
-    method public String getAttributePrefix(int);
-    method public String getAttributeType(int);
-    method public String getAttributeValue(int);
-    method public String getAttributeValue(String, String);
-    method public int getColumnNumber();
-    method public int getDepth();
-    method public int getEventType() throws org.xmlpull.v1.XmlPullParserException;
-    method public boolean getFeature(String);
-    method public String getInputEncoding();
-    method public int getLineNumber();
-    method public String getName();
-    method public String getNamespace(String);
-    method public String getNamespace();
-    method public int getNamespaceCount(int) throws org.xmlpull.v1.XmlPullParserException;
-    method public String getNamespacePrefix(int) throws org.xmlpull.v1.XmlPullParserException;
-    method public String getNamespaceUri(int) throws org.xmlpull.v1.XmlPullParserException;
-    method public String getPositionDescription();
-    method public String getPrefix();
-    method public Object getProperty(String);
-    method public String getText();
-    method public char[] getTextCharacters(int[]);
-    method public boolean isAttributeDefault(int);
-    method public boolean isEmptyElementTag() throws org.xmlpull.v1.XmlPullParserException;
-    method public boolean isWhitespace() throws org.xmlpull.v1.XmlPullParserException;
-    method public int next() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
-    method public int nextTag() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
-    method public String nextText() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
-    method public int nextToken() throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
-    method public void require(int, String, String) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
-    method public void setFeature(String, boolean) throws org.xmlpull.v1.XmlPullParserException;
-    method public void setInput(java.io.Reader) throws org.xmlpull.v1.XmlPullParserException;
-    method public void setInput(java.io.InputStream, String) throws org.xmlpull.v1.XmlPullParserException;
-    method public void setProperty(String, Object) throws org.xmlpull.v1.XmlPullParserException;
-    field public static final int CDSECT = 5; // 0x5
-    field public static final int COMMENT = 9; // 0x9
-    field public static final int DOCDECL = 10; // 0xa
-    field public static final int END_DOCUMENT = 1; // 0x1
-    field public static final int END_TAG = 3; // 0x3
-    field public static final int ENTITY_REF = 6; // 0x6
-    field public static final String FEATURE_PROCESS_DOCDECL = "http://xmlpull.org/v1/doc/features.html#process-docdecl";
-    field public static final String FEATURE_PROCESS_NAMESPACES = "http://xmlpull.org/v1/doc/features.html#process-namespaces";
-    field public static final String FEATURE_REPORT_NAMESPACE_ATTRIBUTES = "http://xmlpull.org/v1/doc/features.html#report-namespace-prefixes";
-    field public static final String FEATURE_VALIDATION = "http://xmlpull.org/v1/doc/features.html#validation";
-    field public static final int IGNORABLE_WHITESPACE = 7; // 0x7
-    field public static final String NO_NAMESPACE = "";
-    field public static final int PROCESSING_INSTRUCTION = 8; // 0x8
-    field public static final int START_DOCUMENT = 0; // 0x0
-    field public static final int START_TAG = 2; // 0x2
-    field public static final int TEXT = 4; // 0x4
-    field public static final String[] TYPES;
-  }
-
-  public class XmlPullParserException extends java.lang.Exception {
-    ctor public XmlPullParserException(String);
-    ctor public XmlPullParserException(String, org.xmlpull.v1.XmlPullParser, Throwable);
-    method public int getColumnNumber();
-    method public Throwable getDetail();
-    method public int getLineNumber();
-    field protected int column;
-    field protected Throwable detail;
-    field protected int row;
-  }
-
-  public class XmlPullParserFactory {
-    ctor protected XmlPullParserFactory();
-    method public boolean getFeature(String);
-    method public boolean isNamespaceAware();
-    method public boolean isValidating();
-    method public static org.xmlpull.v1.XmlPullParserFactory newInstance() throws org.xmlpull.v1.XmlPullParserException;
-    method public static org.xmlpull.v1.XmlPullParserFactory newInstance(String, Class) throws org.xmlpull.v1.XmlPullParserException;
-    method public org.xmlpull.v1.XmlPullParser newPullParser() throws org.xmlpull.v1.XmlPullParserException;
-    method public org.xmlpull.v1.XmlSerializer newSerializer() throws org.xmlpull.v1.XmlPullParserException;
-    method public void setFeature(String, boolean) throws org.xmlpull.v1.XmlPullParserException;
-    method public void setNamespaceAware(boolean);
-    method public void setValidating(boolean);
-    field public static final String PROPERTY_NAME = "org.xmlpull.v1.XmlPullParserFactory";
-    field protected String classNamesLocation;
-    field protected java.util.HashMap<java.lang.String,java.lang.Boolean> features;
-    field protected java.util.ArrayList parserClasses;
-    field protected java.util.ArrayList serializerClasses;
-  }
-
-  public interface XmlSerializer {
-    method public org.xmlpull.v1.XmlSerializer attribute(String, String, String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void cdsect(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void comment(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void docdecl(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void endDocument() throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public org.xmlpull.v1.XmlSerializer endTag(String, String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void entityRef(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void flush() throws java.io.IOException;
-    method public int getDepth();
-    method public boolean getFeature(String);
-    method public String getName();
-    method public String getNamespace();
-    method public String getPrefix(String, boolean) throws java.lang.IllegalArgumentException;
-    method public Object getProperty(String);
-    method public void ignorableWhitespace(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void processingInstruction(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void setFeature(String, boolean) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void setOutput(java.io.OutputStream, String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void setOutput(java.io.Writer) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void setPrefix(String, String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void setProperty(String, Object) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public void startDocument(String, Boolean) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public org.xmlpull.v1.XmlSerializer startTag(String, String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public org.xmlpull.v1.XmlSerializer text(String) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-    method public org.xmlpull.v1.XmlSerializer text(char[], int, int) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.IllegalStateException;
-  }
-
-}
-
-package org.xmlpull.v1.sax2 {
-
-  public class Driver implements org.xml.sax.Attributes org.xml.sax.Locator org.xml.sax.XMLReader {
-    ctor public Driver() throws org.xmlpull.v1.XmlPullParserException;
-    ctor public Driver(org.xmlpull.v1.XmlPullParser) throws org.xmlpull.v1.XmlPullParserException;
-    method public int getColumnNumber();
-    method public org.xml.sax.ContentHandler getContentHandler();
-    method public org.xml.sax.DTDHandler getDTDHandler();
-    method public org.xml.sax.EntityResolver getEntityResolver();
-    method public org.xml.sax.ErrorHandler getErrorHandler();
-    method public boolean getFeature(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public int getIndex(String, String);
-    method public int getIndex(String);
-    method public int getLength();
-    method public int getLineNumber();
-    method public String getLocalName(int);
-    method public Object getProperty(String) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public String getPublicId();
-    method public String getQName(int);
-    method public String getSystemId();
-    method public String getType(int);
-    method public String getType(String, String);
-    method public String getType(String);
-    method public String getURI(int);
-    method public String getValue(int);
-    method public String getValue(String, String);
-    method public String getValue(String);
-    method public void parse(org.xml.sax.InputSource) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parse(String) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void parseSubTree(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xml.sax.SAXException;
-    method public void setContentHandler(org.xml.sax.ContentHandler);
-    method public void setDTDHandler(org.xml.sax.DTDHandler);
-    method public void setEntityResolver(org.xml.sax.EntityResolver);
-    method public void setErrorHandler(org.xml.sax.ErrorHandler);
-    method public void setFeature(String, boolean) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method public void setProperty(String, Object) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException;
-    method protected void startElement(String, String, String) throws org.xml.sax.SAXException;
-    field protected static final String APACHE_DYNAMIC_VALIDATION_FEATURE = "http://apache.org/xml/features/validation/dynamic";
-    field protected static final String APACHE_SCHEMA_VALIDATION_FEATURE = "http://apache.org/xml/features/validation/schema";
-    field protected static final String DECLARATION_HANDLER_PROPERTY = "http://xml.org/sax/properties/declaration-handler";
-    field protected static final String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler";
-    field protected static final String NAMESPACES_FEATURE = "http://xml.org/sax/features/namespaces";
-    field protected static final String NAMESPACE_PREFIXES_FEATURE = "http://xml.org/sax/features/namespace-prefixes";
-    field protected static final String VALIDATION_FEATURE = "http://xml.org/sax/features/validation";
-    field protected org.xml.sax.ContentHandler contentHandler;
-    field protected org.xml.sax.ErrorHandler errorHandler;
-    field protected org.xmlpull.v1.XmlPullParser pp;
-    field protected String systemId;
-  }
-
-}
-
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 a48ad95..cc819fa 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";
@@ -236,7 +237,9 @@
     field public static final String USE_RESERVED_DISK = "android.permission.USE_RESERVED_DISK";
     field public static final String WHITELIST_AUTO_REVOKE_PERMISSIONS = "android.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS";
     field public static final String WHITELIST_RESTRICTED_PERMISSIONS = "android.permission.WHITELIST_RESTRICTED_PERMISSIONS";
+    field public static final String WIFI_ACCESS_COEX_UNSAFE_CHANNELS = "android.permission.WIFI_ACCESS_COEX_UNSAFE_CHANNELS";
     field public static final String WIFI_SET_DEVICE_MOBILITY_STATE = "android.permission.WIFI_SET_DEVICE_MOBILITY_STATE";
+    field public static final String WIFI_UPDATE_COEX_UNSAFE_CHANNELS = "android.permission.WIFI_UPDATE_COEX_UNSAFE_CHANNELS";
     field public static final String WIFI_UPDATE_USABILITY_STATS_SCORE = "android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE";
     field public static final String WRITE_DEVICE_CONFIG = "android.permission.WRITE_DEVICE_CONFIG";
     field public static final String WRITE_DREAM_STATE = "android.permission.WRITE_DREAM_STATE";
@@ -1576,6 +1579,7 @@
     field @NonNull public static final android.os.ParcelUuid HOGP;
     field @NonNull public static final android.os.ParcelUuid HSP;
     field @NonNull public static final android.os.ParcelUuid HSP_AG;
+    field @NonNull public static final android.os.ParcelUuid LE_AUDIO;
     field @NonNull public static final android.os.ParcelUuid MAP;
     field @NonNull public static final android.os.ParcelUuid MAS;
     field @NonNull public static final android.os.ParcelUuid MNS;
@@ -1872,6 +1876,9 @@
   public class ApplicationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable {
     method public boolean isEncryptionAware();
     method public boolean isInstantApp();
+    method public boolean isOem();
+    method public boolean isProduct();
+    method public boolean isVendor();
     field public String credentialProtectedDataDir;
     field public int targetSandboxVersion;
   }
@@ -4138,8 +4145,11 @@
 
   public class AudioManager {
     method @Deprecated public int abandonAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDeviceForStrategyChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener) throws java.lang.SecurityException;
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDeviceForStrategyChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener) throws java.lang.SecurityException;
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDevicesForCapturePresetChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDevicesForCapturePresetChangedListener) throws java.lang.SecurityException;
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDevicesForStrategyChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDevicesForStrategyChangedListener) throws java.lang.SecurityException;
     method public void clearAudioServerStateCallback();
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean clearPreferredDevicesForCapturePreset(int);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int dispatchAudioFocusChange(@NonNull android.media.AudioFocusInfo, int, @NonNull android.media.audiopolicy.AudioPolicy);
     method @IntRange(from=0) public long getAdditionalOutputDeviceDelay(@NonNull android.media.AudioDeviceInfo);
     method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static java.util.List<android.media.audiopolicy.AudioProductStrategy> getAudioProductStrategies();
@@ -4149,13 +4159,17 @@
     method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getMaxVolumeIndexForAttributes(@NonNull android.media.AudioAttributes);
     method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getMinVolumeIndexForAttributes(@NonNull android.media.AudioAttributes);
     method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public android.media.AudioDeviceAttributes getPreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy);
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public java.util.List<android.media.AudioDeviceAttributes> getPreferredDevicesForCapturePreset(int);
+    method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public java.util.List<android.media.AudioDeviceAttributes> getPreferredDevicesForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy);
     method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int[] getSupportedSystemUsages();
     method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getVolumeIndexForAttributes(@NonNull android.media.AudioAttributes);
     method public boolean isAudioServerRunning();
     method public boolean isHdmiSystemAudioSupported();
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int registerAudioPolicy(@NonNull android.media.audiopolicy.AudioPolicy);
     method public void registerVolumeGroupCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.VolumeGroupCallback);
-    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDeviceForStrategyChangedListener(@NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener);
+    method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDeviceForStrategyChangedListener(@NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDevicesForCapturePresetChangedListener(@NonNull android.media.AudioManager.OnPreferredDevicesForCapturePresetChangedListener);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDevicesForStrategyChangedListener(@NonNull android.media.AudioManager.OnPreferredDevicesForStrategyChangedListener);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean removePreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, @NonNull android.media.AudioAttributes, int, int) throws java.lang.IllegalArgumentException;
     method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.MODIFY_AUDIO_ROUTING}) public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, @NonNull android.media.AudioAttributes, int, int, android.media.audiopolicy.AudioPolicy) throws java.lang.IllegalArgumentException;
@@ -4163,7 +4177,9 @@
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setAdditionalOutputDeviceDelay(@NonNull android.media.AudioDeviceInfo, @IntRange(from=0) long);
     method public void setAudioServerStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.AudioServerStateCallback);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setFocusRequestResult(@NonNull android.media.AudioFocusInfo, int, @NonNull android.media.audiopolicy.AudioPolicy);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDeviceForCapturePreset(int, @NonNull android.media.AudioDeviceAttributes);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull android.media.AudioDeviceAttributes);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDevicesForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull java.util.List<android.media.AudioDeviceAttributes>);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setSupportedSystemUsages(@NonNull int[]);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setVolumeIndexForAttributes(@NonNull android.media.AudioAttributes, int, int);
     method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void unregisterAudioPolicy(@NonNull android.media.audiopolicy.AudioPolicy);
@@ -4182,8 +4198,16 @@
     method public void onAudioServerUp();
   }
 
-  public static interface AudioManager.OnPreferredDeviceForStrategyChangedListener {
-    method public void onPreferredDeviceForStrategyChanged(@NonNull android.media.audiopolicy.AudioProductStrategy, @Nullable android.media.AudioDeviceAttributes);
+  @Deprecated public static interface AudioManager.OnPreferredDeviceForStrategyChangedListener {
+    method @Deprecated public void onPreferredDeviceForStrategyChanged(@NonNull android.media.audiopolicy.AudioProductStrategy, @Nullable android.media.AudioDeviceAttributes);
+  }
+
+  public static interface AudioManager.OnPreferredDevicesForCapturePresetChangedListener {
+    method public void onPreferredDevicesForCapturePresetChanged(int, @NonNull java.util.List<android.media.AudioDeviceAttributes>);
+  }
+
+  public static interface AudioManager.OnPreferredDevicesForStrategyChangedListener {
+    method public void onPreferredDevicesForStrategyChanged(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull java.util.List<android.media.AudioDeviceAttributes>);
   }
 
   public abstract static class AudioManager.VolumeGroupCallback {
@@ -6005,6 +6029,10 @@
     method @Deprecated public void onUpstreamChanged(@Nullable android.net.Network);
   }
 
+  public class DnsResolverServiceManager {
+    method @NonNull @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public static android.os.IBinder getService(@NonNull android.content.Context);
+  }
+
   public class EthernetManager {
     method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public android.net.EthernetManager.TetheredInterfaceRequest requestTetheredInterface(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.TetheredInterfaceCallback);
   }
@@ -6400,6 +6428,19 @@
     method @NonNull public android.net.StaticIpConfiguration.Builder setIpAddress(@Nullable android.net.LinkAddress);
   }
 
+  public final class TcpKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable {
+    ctor public TcpKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[], int, int, int, int, int, int) throws android.net.InvalidPacketException;
+    method public int describeContents();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.net.TcpKeepalivePacketData> CREATOR;
+    field public final int ipTos;
+    field public final int ipTtl;
+    field public final int tcpAck;
+    field public final int tcpSeq;
+    field public final int tcpWindow;
+    field public final int tcpWindowScale;
+  }
+
   public class TrafficStats {
     method public static void setThreadStatsTagApp();
     method public static void setThreadStatsTagBackup();
@@ -6948,12 +6989,14 @@
     method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.os.connectivity.WifiBatteryStats getWifiBatteryStats();
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportFullWifiLockAcquiredFromSource(@NonNull android.os.WorkSource);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportFullWifiLockReleasedFromSource(@NonNull android.os.WorkSource);
+    method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportMobileRadioPowerState(boolean, int) throws java.lang.RuntimeException;
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiBatchedScanStartedFromSource(@NonNull android.os.WorkSource, @IntRange(from=0) int);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiBatchedScanStoppedFromSource(@NonNull android.os.WorkSource);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiMulticastDisabled(@NonNull android.os.WorkSource);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiMulticastEnabled(@NonNull android.os.WorkSource);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiOff();
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiOn();
+    method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiRadioPowerState(boolean, int) throws java.lang.RuntimeException;
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiRssiChanged(@IntRange(from=0xffffff81, to=0) int);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiScanStartedFromSource(@NonNull android.os.WorkSource);
     method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiScanStoppedFromSource(@NonNull android.os.WorkSource);
@@ -7000,6 +7043,7 @@
 
   public abstract static class BugreportManager.BugreportCallback {
     ctor public BugreportManager.BugreportCallback();
+    method public void onEarlyReportFinished();
     method public void onError(int);
     method public void onFinished();
     method public void onProgress(@FloatRange(from=0.0f, to=100.0f) float);
@@ -7327,12 +7371,14 @@
 
   public class RecoverySystem {
     method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void cancelScheduledUpdate(android.content.Context) throws java.io.IOException;
-    method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void clearPrepareForUnattendedUpdate(@NonNull android.content.Context) throws java.io.IOException;
+    method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void clearPrepareForUnattendedUpdate(@NonNull android.content.Context) throws java.io.IOException;
     method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException;
-    method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void prepareForUnattendedUpdate(@NonNull android.content.Context, @NonNull String, @Nullable android.content.IntentSender) throws java.io.IOException;
+    method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static boolean isPreparedForUnattendedUpdate(@NonNull android.content.Context) throws java.io.IOException;
+    method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void prepareForUnattendedUpdate(@NonNull android.content.Context, @NonNull String, @Nullable android.content.IntentSender) throws java.io.IOException;
     method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException;
     method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException;
-    method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, @NonNull String) throws java.io.IOException;
+    method @Deprecated @RequiresPermission(android.Manifest.permission.RECOVERY) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, @NonNull String) throws java.io.IOException;
+    method @RequiresPermission(anyOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, boolean) throws java.io.IOException;
     method @RequiresPermission(allOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootWipeAb(android.content.Context, java.io.File, String) throws java.io.IOException;
     method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException;
     method public static boolean verifyPackageCompatibility(java.io.File) throws java.io.IOException;
@@ -7884,6 +7930,7 @@
     field public static final String NAMESPACE_INTELLIGENCE_ATTENTION = "intelligence_attention";
     field public static final String NAMESPACE_MEDIA_NATIVE = "media_native";
     field public static final String NAMESPACE_NETD_NATIVE = "netd_native";
+    field public static final String NAMESPACE_OTA = "ota";
     field public static final String NAMESPACE_PACKAGE_MANAGER_SERVICE = "package_manager_service";
     field public static final String NAMESPACE_PERMISSIONS = "permissions";
     field public static final String NAMESPACE_PRIVACY = "privacy";
@@ -10120,6 +10167,7 @@
   }
 
   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);
@@ -10237,8 +10285,10 @@
     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);
@@ -10288,6 +10338,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
@@ -10322,6 +10378,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
@@ -10341,6 +10402,12 @@
     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 {
     method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo);
     method public void onError(int);
@@ -10725,6 +10792,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 {
@@ -11269,18 +11471,29 @@
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(int, int);
     method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public String getProvisioningStringValue(int);
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getRcsProvisioningStatusForCapability(int);
+    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isRcsVolteSingleRegistrationCapable() throws android.telephony.ims.ImsException;
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean);
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException;
+    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerRcsProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.RcsProvisioningCallback) throws android.telephony.ims.ImsException;
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(int, int, boolean);
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String);
+    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRcsClientConfiguration(@NonNull android.telephony.ims.RcsClientConfiguration) throws android.telephony.ims.ImsException;
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setRcsProvisioningStatusForCapability(int, boolean);
+    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void triggerRcsReconfiguration();
     method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback);
+    method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterRcsProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.RcsProvisioningCallback);
+    field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_RCS_SINGLE_REGISTRATION_CAPABILITY_UPDATE = "android.telephony.ims.action.RCS_SINGLE_REGISTRATION_CAPABILITY_UPDATE";
+    field public static final String EXTRA_STATUS = "android.telephony.ims.extra.STATUS";
+    field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.ims.extra.SUBSCRIPTION_ID";
     field public static final int KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID = 67; // 0x43
     field public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27; // 0x1b
     field public static final int KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE = 26; // 0x1a
     field public static final int PROVISIONING_VALUE_DISABLED = 0; // 0x0
     field public static final int PROVISIONING_VALUE_ENABLED = 1; // 0x1
+    field public static final int STATUS_CAPABLE = 0; // 0x0
+    field public static final int STATUS_CARRIER_NOT_CAPABLE = 2; // 0x2
+    field public static final int STATUS_DEVICE_NOT_CAPABLE = 1; // 0x1
     field public static final String STRING_QUERY_RESULT_ERROR_GENERIC = "STRING_QUERY_RESULT_ERROR_GENERIC";
     field public static final String STRING_QUERY_RESULT_ERROR_NOT_READY = "STRING_QUERY_RESULT_ERROR_NOT_READY";
   }
@@ -11291,6 +11504,27 @@
     method public void onProvisioningStringChanged(int, @NonNull String);
   }
 
+  public static class ProvisioningManager.RcsProvisioningCallback {
+    ctor public ProvisioningManager.RcsProvisioningCallback();
+    method public void onAutoConfigurationErrorReceived(int, @NonNull String);
+    method public void onConfigurationChanged(@NonNull byte[]);
+    method public void onConfigurationReset();
+    method public void onRemoved();
+  }
+
+  public final class RcsClientConfiguration implements android.os.Parcelable {
+    ctor public RcsClientConfiguration(@NonNull String, @NonNull String, @NonNull String, @NonNull String);
+    method public int describeContents();
+    method @NonNull public String getClientVendor();
+    method @NonNull public String getClientVersion();
+    method @NonNull public String getRcsProfile();
+    method @NonNull public String getRcsVersion();
+    method public void writeToParcel(@NonNull android.os.Parcel, int);
+    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.RcsClientConfiguration> CREATOR;
+    field public static final String RCS_PROFILE_1_0 = "UP_1.0";
+    field public static final String RCS_PROFILE_2_3 = "UP_2.3";
+  }
+
   public class RcsUceAdapter {
     method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUceSettingEnabled(boolean) throws android.telephony.ims.ImsException;
   }
@@ -11314,6 +11548,7 @@
   }
 
   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);
@@ -11382,6 +11617,7 @@
     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;
+    method public void triggerFullNetworkRegistration(@NonNull android.telephony.ims.SipDelegateConnection, @IntRange(from=100, to=699) int, @Nullable String);
     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
@@ -11577,11 +11813,15 @@
     ctor public ImsConfigImplBase();
     method public int getConfigInt(int);
     method public String getConfigString(int);
+    method public final void notifyAutoConfigurationErrorReceived(int, @NonNull String);
     method public final void notifyProvisionedValueChanged(int, int);
     method public final void notifyProvisionedValueChanged(int, String);
     method public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean);
+    method public void notifyRcsAutoConfigurationRemoved();
     method public int setConfig(int, int);
     method public int setConfig(int, String);
+    method public void setRcsClientConfiguration(@NonNull android.telephony.ims.RcsClientConfiguration);
+    method public void triggerAutoConfiguration();
     field public static final int CONFIG_RESULT_FAILED = 1; // 0x1
     field public static final int CONFIG_RESULT_SUCCESS = 0; // 0x0
     field public static final int CONFIG_RESULT_UNKNOWN = -1; // 0xffffffff
@@ -11626,6 +11866,9 @@
     method public final void onRegistering(int);
     method public final void onSubscriberAssociatedUriChanged(android.net.Uri[]);
     method public final void onTechnologyChangeFailed(int, android.telephony.ims.ImsReasonInfo);
+    method public void triggerFullNetworkRegistration(@IntRange(from=100, to=699) int, @Nullable String);
+    method public void triggerSipDelegateDeregistration();
+    method public void updateSipDelegateRegistration();
     field public static final int REGISTRATION_TECH_IWLAN = 1; // 0x1
     field public static final int REGISTRATION_TECH_LTE = 0; // 0x0
     field public static final int REGISTRATION_TECH_NONE = -1; // 0xffffffff
diff --git a/core/api/test-current.txt b/core/api/test-current.txt
index 660328f..9cf9ce4 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 {
@@ -849,6 +850,7 @@
   }
 
   public class AudioManager {
+    method @Nullable public static android.media.AudioDeviceInfo getDeviceInfoFromType(int);
     method public boolean hasRegisteredDynamicPolicy();
   }
 
@@ -870,6 +872,9 @@
     method public static float getMasterBalance();
     method public static final int getNumStreamTypes();
     method public static int setMasterBalance(float);
+    field public static final int DEVICE_ROLE_DISABLED = 2; // 0x2
+    field public static final int DEVICE_ROLE_NONE = 0; // 0x0
+    field public static final int DEVICE_ROLE_PREFERRED = 1; // 0x1
     field public static final int STREAM_DEFAULT = -1; // 0xffffffff
   }
 
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/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 496ac3b..82e48bf 100644
--- a/core/java/android/app/SystemServiceRegistry.java
+++ b/core/java/android/app/SystemServiceRegistry.java
@@ -113,7 +113,6 @@
 import android.media.tv.tunerresourcemanager.TunerResourceManager;
 import android.net.ConnectivityDiagnosticsManager;
 import android.net.ConnectivityManager;
-import android.net.ConnectivityThread;
 import android.net.EthernetManager;
 import android.net.IConnectivityManager;
 import android.net.IEthernetManager;
@@ -768,8 +767,7 @@
             public LowpanManager createService(ContextImpl ctx) throws ServiceNotFoundException {
                 IBinder b = ServiceManager.getServiceOrThrow(Context.LOWPAN_SERVICE);
                 ILowpanManager service = ILowpanManager.Stub.asInterface(b);
-                return new LowpanManager(ctx.getOuterContext(), service,
-                        ConnectivityThread.getInstanceLooper());
+                return new LowpanManager(ctx.getOuterContext(), service);
             }});
 
         registerService(Context.ETHERNET_SERVICE, EthernetManager.class,
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/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 6edc8ea..9acf6756 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -53,7 +53,6 @@
 import android.content.pm.ParceledListSlice;
 import android.content.pm.UserInfo;
 import android.graphics.Bitmap;
-import android.net.NetworkUtils;
 import android.net.PrivateDnsConnectivityChecker;
 import android.net.ProxyInfo;
 import android.net.Uri;
@@ -90,6 +89,7 @@
 import android.util.Log;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.net.NetworkUtilsInternal;
 import com.android.internal.os.BackgroundThread;
 import com.android.internal.util.Preconditions;
 import com.android.org.conscrypt.TrustedCertificateStore;
@@ -11466,7 +11466,7 @@
             return PRIVATE_DNS_SET_ERROR_FAILURE_SETTING;
         }
 
-        if (NetworkUtils.isWeaklyValidatedHostname(privateDnsHost)) {
+        if (NetworkUtilsInternal.isWeaklyValidatedHostname(privateDnsHost)) {
             if (!PrivateDnsConnectivityChecker.canConnectToPrivateDnsServer(privateDnsHost)) {
                 return PRIVATE_DNS_SET_ERROR_HOST_NOT_SERVING;
             }
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/people/OWNERS b/core/java/android/app/people/OWNERS
new file mode 100644
index 0000000..7371a88
--- /dev/null
+++ b/core/java/android/app/people/OWNERS
@@ -0,0 +1,4 @@
+# Bug component: 978868
+
+danningc@google.com
+juliacr@google.com
\ No newline at end of file
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 7bea5d7..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,6 +35,7 @@
  * {@hide}
  */
 interface ITimeDetectorService {
+  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 162e182..52016b6 100644
--- a/core/java/android/app/timedetector/TimeDetector.java
+++ b/core/java/android/app/timedetector/TimeDetector.java
@@ -71,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 ac02c89..b0aa3c8 100644
--- a/core/java/android/app/timedetector/TimeDetectorImpl.java
+++ b/core/java/android/app/timedetector/TimeDetectorImpl.java
@@ -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/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/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/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index 2dfbb3a..e4b2d70 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -2933,6 +2933,16 @@
                             }
                         });
                     }
+                    synchronized (mBluetoothConnectionCallbackExecutorMap) {
+                        if (!mBluetoothConnectionCallbackExecutorMap.isEmpty()) {
+                            try {
+                                mService.registerBluetoothConnectionCallback(mConnectionCallback);
+                            } catch (RemoteException e) {
+                                Log.e(TAG, "onBluetoothServiceUp: Failed to register bluetooth"
+                                        + "connection callback", e);
+                            }
+                        }
+                    }
                 }
 
                 public void onBluetoothServiceDown() {
@@ -3582,25 +3592,25 @@
             return false;
         }
 
-        // If the callback map is empty, we register the service-to-app callback
-        if (mBluetoothConnectionCallbackExecutorMap.isEmpty()) {
-            try {
-                mServiceLock.readLock().lock();
-                if (mService != null) {
-                    if (!mService.registerBluetoothConnectionCallback(mConnectionCallback)) {
-                        return false;
-                    }
-                }
-            } catch (RemoteException e) {
-                Log.e(TAG, "", e);
-                mBluetoothConnectionCallbackExecutorMap.remove(callback);
-            } finally {
-                mServiceLock.readLock().unlock();
-            }
-        }
-
-        // Adds the passed in callback to our map of callbacks to executors
         synchronized (mBluetoothConnectionCallbackExecutorMap) {
+            // If the callback map is empty, we register the service-to-app callback
+            if (mBluetoothConnectionCallbackExecutorMap.isEmpty()) {
+                try {
+                    mServiceLock.readLock().lock();
+                    if (mService != null) {
+                        if (!mService.registerBluetoothConnectionCallback(mConnectionCallback)) {
+                            return false;
+                        }
+                    }
+                } catch (RemoteException e) {
+                    Log.e(TAG, "", e);
+                    mBluetoothConnectionCallbackExecutorMap.remove(callback);
+                } finally {
+                    mServiceLock.readLock().unlock();
+                }
+            }
+
+            // Adds the passed in callback to our map of callbacks to executors
             if (mBluetoothConnectionCallbackExecutorMap.containsKey(callback)) {
                 throw new IllegalArgumentException("This callback has already been registered");
             }
diff --git a/core/java/android/bluetooth/BluetoothUuid.java b/core/java/android/bluetooth/BluetoothUuid.java
index e274af1..56c4824 100644
--- a/core/java/android/bluetooth/BluetoothUuid.java
+++ b/core/java/android/bluetooth/BluetoothUuid.java
@@ -153,7 +153,12 @@
     @SystemApi
     public static final ParcelUuid HEARING_AID =
             ParcelUuid.fromString("0000FDF0-0000-1000-8000-00805f9b34fb");
-
+   /** Placeholder until specification is released
+     * @hide */
+    @NonNull
+    @SystemApi
+    public static final ParcelUuid LE_AUDIO =
+            ParcelUuid.fromString("EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE");
     /** @hide */
     @NonNull
     @SystemApi
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/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/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 81d9b11..e32068f 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -2101,7 +2101,7 @@
     }
 
     /** @hide */
-    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
+    @SystemApi
     public boolean isOem() {
         return (privateFlags & ApplicationInfo.PRIVATE_FLAG_OEM) != 0;
     }
@@ -2149,13 +2149,13 @@
     }
 
     /** @hide */
-    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
+    @SystemApi
     public boolean isVendor() {
         return (privateFlags & ApplicationInfo.PRIVATE_FLAG_VENDOR) != 0;
     }
 
     /** @hide */
-    @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
+    @SystemApi
     public boolean isProduct() {
         return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PRODUCT) != 0;
     }
diff --git a/core/java/android/content/pm/LimitedLengthInputStream.java b/core/java/android/content/pm/LimitedLengthInputStream.java
index 19b681e..05089f6 100644
--- a/core/java/android/content/pm/LimitedLengthInputStream.java
+++ b/core/java/android/content/pm/LimitedLengthInputStream.java
@@ -1,6 +1,6 @@
 package android.content.pm;
 
-import libcore.util.ArrayUtils;
+import com.android.internal.util.ArrayUtils;
 
 import java.io.FilterInputStream;
 import java.io.IOException;
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 50ef08a..00f5fb9 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,
@@ -2313,6 +2367,23 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature(String, int)}: If this feature is supported, the feature version
+     * specifies a date such that the device is known to pass the OpenGLES dEQP test suite
+     * associated with that date.  The date is encoded as follows:
+     * <ul>
+     * <li>Year in bits 31-16</li>
+     * <li>Month in bits 15-8</li>
+     * <li>Day in bits 7-0</li>
+     * </ul>
+     * <p>
+     * Example: 2021-03-01 is encoded as 0x07E50301, and would indicate that the device passes the
+     * OpenGL ES dEQP test suite version that was current on 2021-03-01.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_OPENGLES_DEQP_LEVEL = "android.software.opengles.deqp.level";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device includes broadcast radio tuner.
      * @hide
      */
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/AssetManager.java b/core/java/android/content/res/AssetManager.java
index 36986de..13433dc 100644
--- a/core/java/android/content/res/AssetManager.java
+++ b/core/java/android/content/res/AssetManager.java
@@ -1574,7 +1574,6 @@
     private static native long nativeAssetGetLength(long assetPtr);
     private static native long nativeAssetGetRemainingLength(long assetPtr);
 
-    private static native String[] nativeCreateIdmapsForStaticOverlaysTargetingAndroid();
     private static native @Nullable Map nativeGetOverlayableMap(long ptr,
             @NonNull String packageName);
     private static native @Nullable String nativeGetOverlayablesToString(long ptr,
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/res/ResourcesImpl.java b/core/java/android/content/res/ResourcesImpl.java
index c16006a..477ffef 100644
--- a/core/java/android/content/res/ResourcesImpl.java
+++ b/core/java/android/content/res/ResourcesImpl.java
@@ -548,7 +548,24 @@
             remainder = languageTag.substring(separator);
         }
 
-        return Locale.adjustLanguageCode(language) + remainder;
+        // No need to convert to lower cases because the language in the return value of
+        // Locale.toLanguageTag has been lower-cased.
+        final String adjustedLanguage;
+        switch(language) {
+            case "id":
+                adjustedLanguage = "in";
+                break;
+            case "yi":
+                adjustedLanguage = "ji";
+                break;
+            case "he":
+                adjustedLanguage = "iw";
+                break;
+            default:
+                adjustedLanguage = language;
+                break;
+        }
+        return adjustedLanguage + remainder;
     }
 
     /**
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/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/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index cf5d4e5..540ea5c 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -2108,17 +2108,6 @@
         // ignored
     }
 
-    /** {@hide} */
-    @Deprecated
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
-        try {
-            return mService.getActiveNetworkQuotaInfo();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
     /**
      * @hide
      * @deprecated Talk to TelephonyManager directly
@@ -3163,9 +3152,9 @@
     }
 
     /**
-     * Set sign in error notification to visible or in visible
+     * Set sign in error notification to visible or invisible
      *
-     * {@hide}
+     * @hide
      * @deprecated Doesn't properly deal with multiple connected networks of the same type.
      */
     @Deprecated
diff --git a/core/java/android/net/DnsResolverServiceManager.java b/core/java/android/net/DnsResolverServiceManager.java
new file mode 100644
index 0000000..1597322
--- /dev/null
+++ b/core/java/android/net/DnsResolverServiceManager.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 android.net;
+
+import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.os.IBinder;
+import android.os.ServiceManager;
+
+import java.util.Objects;
+
+/**
+ * Provides a way to obtain the DnsResolver binder objects.
+ *
+ * @hide
+ */
+@SystemApi
+public class DnsResolverServiceManager {
+    /**
+     * Name to retrieve a {@link android.net.IDnsResolver} IBinder.
+     */
+    private static final String DNS_RESOLVER_SERVICE = "dnsresolver";
+
+    private DnsResolverServiceManager() {}
+
+    /**
+     * Get an {@link IBinder} representing the DnsResolver stable AIDL interface
+     *
+     * @param context the context for permission check.
+     * @return {@link android.net.IDnsResolver} IBinder.
+     */
+    @NonNull
+    @RequiresPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
+    public static IBinder getService(@NonNull final Context context) {
+        Objects.requireNonNull(context);
+        context.enforceCallingOrSelfPermission(NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
+                "DnsResolverServiceManager");
+        try {
+            return ServiceManager.getServiceOrThrow(DNS_RESOLVER_SERVICE);
+        } catch (ServiceManager.ServiceNotFoundException e) {
+            // Catch ServiceManager#ServiceNotFoundException and rethrow IllegalStateException
+            // because ServiceManager#ServiceNotFoundException is @hide so that it can't be listed
+            // on the system api. Thus, rethrow IllegalStateException if dns resolver service cannot
+            // be found.
+            throw new IllegalStateException("Cannot find dns resolver service.");
+        }
+    }
+}
diff --git a/core/java/android/net/EthernetManager.java b/core/java/android/net/EthernetManager.java
index 84a8e1c..7cd63ef 100644
--- a/core/java/android/net/EthernetManager.java
+++ b/core/java/android/net/EthernetManager.java
@@ -24,10 +24,11 @@
 import android.compat.annotation.UnsupportedAppUsage;
 import android.content.Context;
 import android.os.Build;
-import android.os.Handler;
-import android.os.Message;
 import android.os.RemoteException;
 
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.os.BackgroundThread;
+
 import java.util.ArrayList;
 import java.util.Objects;
 import java.util.concurrent.Executor;
@@ -41,31 +42,35 @@
 @SystemService(Context.ETHERNET_SERVICE)
 public class EthernetManager {
     private static final String TAG = "EthernetManager";
-    private static final int MSG_AVAILABILITY_CHANGED = 1000;
 
-    private final Context mContext;
     private final IEthernetManager mService;
-    private final Handler mHandler = new Handler(ConnectivityThread.getInstanceLooper()) {
-        @Override
-        public void handleMessage(Message msg) {
-            if (msg.what == MSG_AVAILABILITY_CHANGED) {
-                boolean isAvailable = (msg.arg1 == 1);
-                for (Listener listener : mListeners) {
-                    listener.onAvailabilityChanged((String) msg.obj, isAvailable);
-                }
-            }
-        }
-    };
-    private final ArrayList<Listener> mListeners = new ArrayList<>();
+    @GuardedBy("mListeners")
+    private final ArrayList<ListenerInfo> mListeners = new ArrayList<>();
     private final IEthernetServiceListener.Stub mServiceListener =
             new IEthernetServiceListener.Stub() {
                 @Override
                 public void onAvailabilityChanged(String iface, boolean isAvailable) {
-                    mHandler.obtainMessage(
-                            MSG_AVAILABILITY_CHANGED, isAvailable ? 1 : 0, 0, iface).sendToTarget();
+                    synchronized (mListeners) {
+                        for (ListenerInfo li : mListeners) {
+                            li.executor.execute(() ->
+                                    li.listener.onAvailabilityChanged(iface, isAvailable));
+                        }
+                    }
                 }
             };
 
+    private static class ListenerInfo {
+        @NonNull
+        public final Executor executor;
+        @NonNull
+        public final Listener listener;
+
+        private ListenerInfo(@NonNull Executor executor, @NonNull Listener listener) {
+            this.executor = executor;
+            this.listener = listener;
+        }
+    }
+
     /**
      * A listener interface to receive notification on changes in Ethernet.
      * @hide
@@ -89,7 +94,6 @@
      * @hide
      */
     public EthernetManager(Context context, IEthernetManager service) {
-        mContext = context;
         mService = service;
     }
 
@@ -146,21 +150,38 @@
 
     /**
      * Adds a listener.
+     *
+     * Consider using {@link #addListener(Listener, Executor)} instead: this method uses a default
+     * executor that may have higher latency than a provided executor.
      * @param listener A {@link Listener} to add.
      * @throws IllegalArgumentException If the listener is null.
      * @hide
      */
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public void addListener(Listener listener) {
-        if (listener == null) {
-            throw new IllegalArgumentException("listener must not be null");
+    public void addListener(@NonNull Listener listener) {
+        addListener(listener, BackgroundThread.getExecutor());
+    }
+
+    /**
+     * Adds a listener.
+     * @param listener A {@link Listener} to add.
+     * @param executor Executor to run callbacks on.
+     * @throws IllegalArgumentException If the listener or executor is null.
+     * @hide
+     */
+    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
+    public void addListener(@NonNull Listener listener, @NonNull Executor executor) {
+        if (listener == null || executor == null) {
+            throw new NullPointerException("listener and executor must not be null");
         }
-        mListeners.add(listener);
-        if (mListeners.size() == 1) {
-            try {
-                mService.addListener(mServiceListener);
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
+        synchronized (mListeners) {
+            mListeners.add(new ListenerInfo(executor, listener));
+            if (mListeners.size() == 1) {
+                try {
+                    mService.addListener(mServiceListener);
+                } catch (RemoteException e) {
+                    throw e.rethrowFromSystemServer();
+                }
             }
         }
     }
@@ -185,16 +206,18 @@
      * @hide
      */
     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public void removeListener(Listener listener) {
+    public void removeListener(@NonNull Listener listener) {
         if (listener == null) {
             throw new IllegalArgumentException("listener must not be null");
         }
-        mListeners.remove(listener);
-        if (mListeners.isEmpty()) {
-            try {
-                mService.removeListener(mServiceListener);
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
+        synchronized (mListeners) {
+            mListeners.removeIf(l -> l.listener == listener);
+            if (mListeners.isEmpty()) {
+                try {
+                    mService.removeListener(mServiceListener);
+                } catch (RemoteException e) {
+                    throw e.rethrowFromSystemServer();
+                }
             }
         }
     }
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 4173200..95a2f2e 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -25,13 +25,13 @@
 import android.net.NetworkAgentConfig;
 import android.net.NetworkCapabilities;
 import android.net.NetworkInfo;
-import android.net.NetworkQuotaInfo;
 import android.net.NetworkRequest;
 import android.net.NetworkState;
 import android.net.ISocketKeepaliveCallback;
 import android.net.ProxyInfo;
 import android.os.Bundle;
 import android.os.IBinder;
+import android.os.INetworkActivityListener;
 import android.os.Messenger;
 import android.os.ParcelFileDescriptor;
 import android.os.PersistableBundle;
@@ -76,7 +76,6 @@
     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
     NetworkState[] getAllNetworkState();
 
-    NetworkQuotaInfo getActiveNetworkQuotaInfo();
     boolean isActiveNetworkMetered();
 
     boolean requestRouteToHostAddress(int networkType, in byte[] hostAddress,
@@ -235,4 +234,10 @@
                 in PersistableBundle extras);
 
     void systemReady();
+
+    void registerNetworkActivityListener(in INetworkActivityListener l);
+
+    void unregisterNetworkActivityListener(in INetworkActivityListener l);
+
+    boolean isDefaultNetworkActive();
 }
diff --git a/core/java/android/net/INetworkManagementEventObserver.aidl b/core/java/android/net/INetworkManagementEventObserver.aidl
index f0fe92e..37813ce 100644
--- a/core/java/android/net/INetworkManagementEventObserver.aidl
+++ b/core/java/android/net/INetworkManagementEventObserver.aidl
@@ -85,11 +85,14 @@
     /**
      * Interface data activity status is changed.
      *
-     * @param iface The interface.
+     * @param networkType The legacy network type of the data activity change.
      * @param active  True if the interface is actively transmitting data, false if it is idle.
      * @param tsNanos Elapsed realtime in nanos when the state of the network interface changed.
+     * @param uid Uid of this event. It represents the uid that was responsible for waking the
+     *            radio. For those events that are reported by system itself, not from specific uid,
+     *            use -1 for the events which means no uid.
      */
-    void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos);
+    void interfaceClassDataActivityChanged(int networkType, boolean active, long tsNanos, int uid);
 
     /**
      * Information about available DNS servers has been received.
diff --git a/core/java/android/net/INetworkPolicyManager.aidl b/core/java/android/net/INetworkPolicyManager.aidl
index e486052..792e5b4 100644
--- a/core/java/android/net/INetworkPolicyManager.aidl
+++ b/core/java/android/net/INetworkPolicyManager.aidl
@@ -17,6 +17,7 @@
 package android.net;
 
 import android.net.INetworkPolicyListener;
+import android.net.Network;
 import android.net.NetworkPolicy;
 import android.net.NetworkQuotaInfo;
 import android.net.NetworkState;
@@ -67,6 +68,8 @@
     void setDeviceIdleMode(boolean enabled);
     void setWifiMeteredOverride(String networkId, int meteredOverride);
 
+    int getMultipathPreference(in Network network);
+
     @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
     NetworkQuotaInfo getNetworkQuotaInfo(in NetworkState state);
 
diff --git a/core/java/android/net/LinkProperties.java b/core/java/android/net/LinkProperties.java
index 0941e7d..486e2d7 100644
--- a/core/java/android/net/LinkProperties.java
+++ b/core/java/android/net/LinkProperties.java
@@ -20,12 +20,13 @@
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.util.LinkPropertiesUtils;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.TextUtils;
 
+import com.android.net.module.util.LinkPropertiesUtils;
+
 import java.net.Inet4Address;
 import java.net.Inet6Address;
 import java.net.InetAddress;
diff --git a/core/java/android/net/MacAddress.java b/core/java/android/net/MacAddress.java
index 178183d..c7116b4 100644
--- a/core/java/android/net/MacAddress.java
+++ b/core/java/android/net/MacAddress.java
@@ -20,13 +20,13 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.util.MacAddressUtils;
 import android.net.wifi.WifiInfo;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 
 import com.android.internal.util.Preconditions;
+import com.android.net.module.util.MacAddressUtils;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 0676ad4..6780167 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -51,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.
@@ -94,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;
@@ -110,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
@@ -337,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.
@@ -393,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 {
@@ -418,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) {
@@ -696,11 +657,6 @@
      * 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);
@@ -713,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 */);
@@ -735,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);
     }
@@ -760,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);
     }
@@ -773,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 8dad11f..1a37fb9 100644
--- a/core/java/android/net/NetworkCapabilities.java
+++ b/core/java/android/net/NetworkCapabilities.java
@@ -975,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.
      *
@@ -1684,6 +1688,7 @@
                 && equalsTransportInfo(that)
                 && equalsUids(that)
                 && equalsSSID(that)
+                && equalsOwnerUid(that)
                 && equalsPrivateDnsBroken(that)
                 && equalsRequestor(that)
                 && equalsAdministratorUids(that);
@@ -1697,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/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index f05f033..ce16a78 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -432,6 +432,17 @@
         }
     }
 
+    /**
+     * Get multipath preference for the given network.
+     */
+    public int getMultipathPreference(Network network) {
+        try {
+            return mService.getMultipathPreference(network);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
     /** {@hide} */
     @Deprecated
     public static Iterator<Pair<ZonedDateTime, ZonedDateTime>> cycleIterator(NetworkPolicy policy) {
diff --git a/core/java/android/net/NetworkStatsHistory.java b/core/java/android/net/NetworkStatsHistory.java
index fba7561..bf25602 100644
--- a/core/java/android/net/NetworkStatsHistory.java
+++ b/core/java/android/net/NetworkStatsHistory.java
@@ -26,9 +26,9 @@
 import static android.net.NetworkStatsHistory.Entry.UNKNOWN;
 import static android.net.NetworkStatsHistory.ParcelUtils.readLongArray;
 import static android.net.NetworkStatsHistory.ParcelUtils.writeLongArray;
-import static android.net.NetworkUtils.multiplySafeByRational;
 import static android.text.format.DateUtils.SECOND_IN_MILLIS;
 
+import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational;
 import static com.android.internal.util.ArrayUtils.total;
 
 import android.compat.annotation.UnsupportedAppUsage;
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java
index a0faafa..b5962c5 100644
--- a/core/java/android/net/NetworkUtils.java
+++ b/core/java/android/net/NetworkUtils.java
@@ -16,14 +16,9 @@
 
 package android.net;
 
-import static android.system.OsConstants.AF_INET;
-import static android.system.OsConstants.AF_INET6;
-
-import android.annotation.NonNull;
 import android.compat.annotation.UnsupportedAppUsage;
 import android.os.Build;
 import android.system.ErrnoException;
-import android.system.Os;
 import android.util.Log;
 import android.util.Pair;
 
@@ -35,7 +30,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;
 
@@ -156,14 +150,6 @@
     public static native Network getDnsNetwork() throws ErrnoException;
 
     /**
-     * Allow/Disallow creating AF_INET/AF_INET6 sockets and DNS lookups for current process.
-     *
-     * @param allowNetworking whether to allow or disallow creating AF_INET/AF_INET6 sockets
-     *                        and DNS lookups.
-     */
-    public static native void setAllowNetworkingForProcess(boolean allowNetworking);
-
-    /**
      * Get the tcp repair window associated with the {@code fd}.
      *
      * @param fd the tcp socket's {@link FileDescriptor}.
@@ -342,20 +328,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.
@@ -452,60 +424,4 @@
         return routedIPCount;
     }
 
-    private static final int[] ADDRESS_FAMILIES = new int[] {AF_INET, AF_INET6};
-
-    /**
-     * Returns true if the hostname is weakly validated.
-     * @param hostname Name of host to validate.
-     * @return True if it's a valid-ish hostname.
-     *
-     * @hide
-     */
-    public static boolean isWeaklyValidatedHostname(@NonNull String hostname) {
-        // TODO(b/34953048): Use a validation method that permits more accurate,
-        // but still inexpensive, checking of likely valid DNS hostnames.
-        final String weakHostnameRegex = "^[a-zA-Z0-9_.-]+$";
-        if (!hostname.matches(weakHostnameRegex)) {
-            return false;
-        }
-
-        for (int address_family : ADDRESS_FAMILIES) {
-            if (Os.inet_pton(address_family, hostname) != null) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Safely multiple a value by a rational.
-     * <p>
-     * Internally it uses integer-based math whenever possible, but switches
-     * over to double-based math if values would overflow.
-     * @hide
-     */
-    public static long multiplySafeByRational(long value, long num, long den) {
-        if (den == 0) {
-            throw new ArithmeticException("Invalid Denominator");
-        }
-        long x = value;
-        long y = num;
-
-        // Logic shamelessly borrowed from Math.multiplyExact()
-        long r = x * y;
-        long ax = Math.abs(x);
-        long ay = Math.abs(y);
-        if (((ax | ay) >>> 31 != 0)) {
-            // Some bits greater than 2^31 that might cause overflow
-            // Check the result using the divide operator
-            // and check for the special case of Long.MIN_VALUE * -1
-            if (((y != 0) && (r / y != x)) ||
-                    (x == Long.MIN_VALUE && y == -1)) {
-                // Use double math to avoid overflowing
-                return (long) (((double) num / den) * value);
-            }
-        }
-        return r / den;
-    }
 }
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..03b07e0 100644
--- a/core/java/android/net/Proxy.java
+++ b/core/java/android/net/Proxy.java
@@ -24,6 +24,8 @@
 import android.text.TextUtils;
 import android.util.Log;
 
+import com.android.net.module.util.ProxyUtils;
+
 import java.net.InetSocketAddress;
 import java.net.ProxySelector;
 import java.net.URI;
@@ -205,7 +207,7 @@
                 if (host.equalsIgnoreCase("localhost")) {
                     return true;
                 }
-                if (NetworkUtils.numericToInetAddress(host).isLoopbackAddress()) {
+                if (InetAddresses.parseNumericAddress(host).isLoopbackAddress()) {
                     return true;
                 }
             }
@@ -251,7 +253,7 @@
         if (p != null) {
             host = p.getHost();
             port = Integer.toString(p.getPort());
-            exclList = p.getExclusionListAsString();
+            exclList = ProxyUtils.exclusionListAsString(p.getExclusionList());
             pacFileUrl = p.getPacFileUrl();
         }
         setHttpProxySystemProperty(host, port, exclList, pacFileUrl);
diff --git a/core/java/android/net/RouteInfo.java b/core/java/android/net/RouteInfo.java
index 6166a75..94f849f 100644
--- a/core/java/android/net/RouteInfo.java
+++ b/core/java/android/net/RouteInfo.java
@@ -21,11 +21,12 @@
 import android.annotation.Nullable;
 import android.annotation.SystemApi;
 import android.compat.annotation.UnsupportedAppUsage;
-import android.net.util.NetUtils;
 import android.os.Build;
 import android.os.Parcel;
 import android.os.Parcelable;
 
+import com.android.net.module.util.NetUtils;
+
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.net.Inet4Address;
diff --git a/core/java/android/net/TcpKeepalivePacketData.java b/core/java/android/net/TcpKeepalivePacketData.java
new file mode 100644
index 0000000..ddb3a6a7
--- /dev/null
+++ b/core/java/android/net/TcpKeepalivePacketData.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.net;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.net.InetAddress;
+import java.util.Objects;
+
+/**
+ * Represents the actual tcp keep alive packets which will be used for hardware offload.
+ * @hide
+ */
+@SystemApi
+public final class TcpKeepalivePacketData extends KeepalivePacketData implements Parcelable {
+    private static final String TAG = "TcpKeepalivePacketData";
+
+    /** TCP sequence number. */
+    public final int tcpSeq;
+
+    /** TCP ACK number. */
+    public final int tcpAck;
+
+    /** TCP RCV window. */
+    public final int tcpWindow;
+
+    /** TCP RCV window scale. */
+    public final int tcpWindowScale;
+
+    /** IP TOS. */
+    public final int ipTos;
+
+    /** IP TTL. */
+    public final int ipTtl;
+
+    public TcpKeepalivePacketData(@NonNull final InetAddress srcAddress, int srcPort,
+            @NonNull final InetAddress dstAddress, int dstPort, @NonNull final byte[] data,
+            int tcpSeq, int tcpAck, int tcpWindow, int tcpWindowScale, int ipTos, int ipTtl)
+            throws InvalidPacketException {
+        super(srcAddress, srcPort, dstAddress, dstPort, data);
+        this.tcpSeq = tcpSeq;
+        this.tcpAck = tcpAck;
+        this.tcpWindow = tcpWindow;
+        this.tcpWindowScale = tcpWindowScale;
+        this.ipTos = ipTos;
+        this.ipTtl = ipTtl;
+    }
+
+    @Override
+    public boolean equals(@Nullable final Object o) {
+        if (!(o instanceof TcpKeepalivePacketData)) return false;
+        final TcpKeepalivePacketData other = (TcpKeepalivePacketData) o;
+        final InetAddress srcAddress = getSrcAddress();
+        final InetAddress dstAddress = getDstAddress();
+        return srcAddress.equals(other.getSrcAddress())
+                && dstAddress.equals(other.getDstAddress())
+                && getSrcPort() == other.getSrcPort()
+                && getDstPort() == other.getDstPort()
+                && this.tcpAck == other.tcpAck
+                && this.tcpSeq == other.tcpSeq
+                && this.tcpWindow == other.tcpWindow
+                && this.tcpWindowScale == other.tcpWindowScale
+                && this.ipTos == other.ipTos
+                && this.ipTtl == other.ipTtl;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(getSrcAddress(), getDstAddress(), getSrcPort(), getDstPort(),
+                tcpAck, tcpSeq, tcpWindow, tcpWindowScale, ipTos, ipTtl);
+    }
+
+    /**
+     * Parcelable Implementation.
+     * Note that this object implements parcelable (and needs to keep doing this as it inherits
+     * from a class that does), but should usually be parceled as a stable parcelable using
+     * the toStableParcelable() and fromStableParcelable() methods.
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    /** Write to parcel. */
+    @Override
+    public void writeToParcel(@NonNull Parcel out, int flags) {
+        out.writeString(getSrcAddress().getHostAddress());
+        out.writeString(getDstAddress().getHostAddress());
+        out.writeInt(getSrcPort());
+        out.writeInt(getDstPort());
+        out.writeByteArray(getPacket());
+        out.writeInt(tcpSeq);
+        out.writeInt(tcpAck);
+        out.writeInt(tcpWindow);
+        out.writeInt(tcpWindowScale);
+        out.writeInt(ipTos);
+        out.writeInt(ipTtl);
+    }
+
+    private static TcpKeepalivePacketData readFromParcel(Parcel in) throws InvalidPacketException {
+        InetAddress srcAddress = InetAddresses.parseNumericAddress(in.readString());
+        InetAddress dstAddress = InetAddresses.parseNumericAddress(in.readString());
+        int srcPort = in.readInt();
+        int dstPort = in.readInt();
+        byte[] packet = in.createByteArray();
+        int tcpSeq = in.readInt();
+        int tcpAck = in.readInt();
+        int tcpWnd = in.readInt();
+        int tcpWndScale = in.readInt();
+        int ipTos = in.readInt();
+        int ipTtl = in.readInt();
+        return new TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, packet, tcpSeq,
+                tcpAck, tcpWnd, tcpWndScale, ipTos, ipTtl);
+    }
+
+    /** Parcelable Creator. */
+    public static final @NonNull Parcelable.Creator<TcpKeepalivePacketData> CREATOR =
+            new Parcelable.Creator<TcpKeepalivePacketData>() {
+                public TcpKeepalivePacketData createFromParcel(Parcel in) {
+                    try {
+                        return readFromParcel(in);
+                    } catch (InvalidPacketException e) {
+                        throw new IllegalArgumentException(
+                                "Invalid TCP keepalive data: " + e.getError());
+                    }
+                }
+
+                public TcpKeepalivePacketData[] newArray(int size) {
+                    return new TcpKeepalivePacketData[size];
+                }
+            };
+
+    @Override
+    public String toString() {
+        return "saddr: " + getSrcAddress()
+                + " daddr: " + getDstAddress()
+                + " sport: " + getSrcPort()
+                + " dport: " + getDstPort()
+                + " seq: " + tcpSeq
+                + " ack: " + tcpAck
+                + " window: " + tcpWindow
+                + " windowScale: " + tcpWindowScale
+                + " tos: " + ipTos
+                + " ttl: " + ipTtl;
+    }
+}
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/vcn/VcnConfig.java b/core/java/android/net/vcn/VcnConfig.java
index 148acf1..d4a3fa7 100644
--- a/core/java/android/net/vcn/VcnConfig.java
+++ b/core/java/android/net/vcn/VcnConfig.java
@@ -15,30 +15,104 @@
  */
 package android.net.vcn;
 
+import static com.android.internal.annotations.VisibleForTesting.Visibility;
+
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.os.Parcel;
 import android.os.Parcelable;
+import android.os.PersistableBundle;
+import android.util.ArraySet;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.Preconditions;
+import com.android.server.vcn.util.PersistableBundleUtils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Objects;
+import java.util.Set;
 
 /**
  * This class represents a configuration for a Virtual Carrier Network.
  *
+ * <p>Each {@link VcnGatewayConnectionConfig} instance added represents a connection that will be
+ * brought up on demand based on active {@link NetworkRequest}(s).
+ *
+ * @see VcnManager for more information on the Virtual Carrier Network feature
  * @hide
  */
 public final class VcnConfig implements Parcelable {
     @NonNull private static final String TAG = VcnConfig.class.getSimpleName();
 
-    private VcnConfig() {
+    private static final String GATEWAY_CONNECTION_CONFIGS_KEY = "mGatewayConnectionConfigs";
+    @NonNull private final Set<VcnGatewayConnectionConfig> mGatewayConnectionConfigs;
+
+    private VcnConfig(@NonNull Set<VcnGatewayConnectionConfig> tunnelConfigs) {
+        mGatewayConnectionConfigs = Collections.unmodifiableSet(tunnelConfigs);
+
         validate();
     }
-    // TODO: Implement getters, validators, etc
 
     /**
-     * Validates this configuration.
+     * Deserializes a VcnConfig from a PersistableBundle.
      *
      * @hide
      */
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    public VcnConfig(@NonNull PersistableBundle in) {
+        final PersistableBundle gatewayConnectionConfigsBundle =
+                in.getPersistableBundle(GATEWAY_CONNECTION_CONFIGS_KEY);
+        mGatewayConnectionConfigs =
+                new ArraySet<>(
+                        PersistableBundleUtils.toList(
+                                gatewayConnectionConfigsBundle, VcnGatewayConnectionConfig::new));
+
+        validate();
+    }
+
     private void validate() {
-        // TODO: implement validation logic
+        Preconditions.checkCollectionNotEmpty(
+                mGatewayConnectionConfigs, "gatewayConnectionConfigs");
+    }
+
+    /** Retrieves the set of configured tunnels. */
+    @NonNull
+    public Set<VcnGatewayConnectionConfig> getGatewayConnectionConfigs() {
+        return Collections.unmodifiableSet(mGatewayConnectionConfigs);
+    }
+
+    /**
+     * Serializes this object to a PersistableBundle.
+     *
+     * @hide
+     */
+    @NonNull
+    public PersistableBundle toPersistableBundle() {
+        final PersistableBundle result = new PersistableBundle();
+
+        final PersistableBundle gatewayConnectionConfigsBundle =
+                PersistableBundleUtils.fromList(
+                        new ArrayList<>(mGatewayConnectionConfigs),
+                        VcnGatewayConnectionConfig::toPersistableBundle);
+        result.putPersistableBundle(GATEWAY_CONNECTION_CONFIGS_KEY, gatewayConnectionConfigsBundle);
+
+        return result;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(mGatewayConnectionConfigs);
+    }
+
+    @Override
+    public boolean equals(@Nullable Object other) {
+        if (!(other instanceof VcnConfig)) {
+            return false;
+        }
+
+        final VcnConfig rhs = (VcnConfig) other;
+        return mGatewayConnectionConfigs.equals(rhs.mGatewayConnectionConfigs);
     }
 
     // Parcelable methods
@@ -49,15 +123,16 @@
     }
 
     @Override
-    public void writeToParcel(Parcel out, int flags) {}
+    public void writeToParcel(Parcel out, int flags) {
+        out.writeParcelable(toPersistableBundle(), flags);
+    }
 
     @NonNull
     public static final Parcelable.Creator<VcnConfig> CREATOR =
             new Parcelable.Creator<VcnConfig>() {
                 @NonNull
                 public VcnConfig createFromParcel(Parcel in) {
-                    // TODO: Ensure all methods are pulled from the parcels
-                    return new VcnConfig();
+                    return new VcnConfig((PersistableBundle) in.readParcelable(null));
                 }
 
                 @NonNull
@@ -68,7 +143,23 @@
 
     /** This class is used to incrementally build {@link VcnConfig} objects. */
     public static class Builder {
-        // TODO: Implement this builder
+        @NonNull
+        private final Set<VcnGatewayConnectionConfig> mGatewayConnectionConfigs = new ArraySet<>();
+
+        /**
+         * Adds a configuration for an individual gateway connection.
+         *
+         * @param gatewayConnectionConfig the configuration for an individual gateway connection
+         * @return this {@link Builder} instance, for chaining
+         */
+        @NonNull
+        public Builder addGatewayConnectionConfig(
+                @NonNull VcnGatewayConnectionConfig gatewayConnectionConfig) {
+            Objects.requireNonNull(gatewayConnectionConfig, "gatewayConnectionConfig was null");
+
+            mGatewayConnectionConfigs.add(gatewayConnectionConfig);
+            return this;
+        }
 
         /**
          * Builds and validates the VcnConfig.
@@ -77,7 +168,7 @@
          */
         @NonNull
         public VcnConfig build() {
-            return new VcnConfig();
+            return new VcnConfig(mGatewayConnectionConfigs);
         }
     }
 }
diff --git a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
index 8160edc..039360a 100644
--- a/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
+++ b/core/java/android/net/vcn/VcnGatewayConnectionConfig.java
@@ -15,7 +15,27 @@
  */
 package android.net.vcn;
 
+import static android.net.NetworkCapabilities.NetCapability;
+
+import static com.android.internal.annotations.VisibleForTesting.Visibility;
+
+import android.annotation.IntRange;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.net.NetworkCapabilities;
+import android.os.PersistableBundle;
+import android.util.ArraySet;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.util.Preconditions;
+import com.android.server.vcn.util.PersistableBundleUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Objects;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
 
 /**
  * This class represents a configuration for a connection to a Virtual Carrier Network gateway.
@@ -49,38 +69,399 @@
  *   <li>{@link android.net.NetworkCapabilities.NET_CAPABILITY_MCX}
  * </ul>
  *
+ * <p>The meteredness and roaming of the VCN {@link Network} will be determined by that of the
+ * underlying Network(s).
+ *
  * @hide
  */
 public final class VcnGatewayConnectionConfig {
-    private VcnGatewayConnectionConfig() {
+    // TODO: Use MIN_MTU_V6 once it is public, @hide
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    static final int MIN_MTU_V6 = 1280;
+
+    private static final Set<Integer> ALLOWED_CAPABILITIES;
+
+    static {
+        Set<Integer> allowedCaps = new ArraySet<>();
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_MMS);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_SUPL);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_DUN);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_FOTA);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_IMS);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_CBS);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_IA);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_RCS);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_XCAP);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_EIMS);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_INTERNET);
+        allowedCaps.add(NetworkCapabilities.NET_CAPABILITY_MCX);
+
+        ALLOWED_CAPABILITIES = Collections.unmodifiableSet(allowedCaps);
+    }
+
+    private static final int DEFAULT_MAX_MTU = 1500;
+
+    /**
+     * The maximum number of retry intervals that may be specified.
+     *
+     * <p>Limited to ensure an upper bound on config sizes.
+     */
+    private static final int MAX_RETRY_INTERVAL_COUNT = 10;
+
+    /**
+     * The minimum allowable repeating retry interval
+     *
+     * <p>To ensure the device is not constantly being woken up, this retry interval MUST be greater
+     * than this value.
+     *
+     * @see {@link Builder#setRetryInterval()}
+     */
+    private static final long MINIMUM_REPEATING_RETRY_INTERVAL_MS = TimeUnit.MINUTES.toMillis(15);
+
+    private static final long[] DEFAULT_RETRY_INTERVALS_MS =
+            new long[] {
+                TimeUnit.SECONDS.toMillis(1),
+                TimeUnit.SECONDS.toMillis(2),
+                TimeUnit.SECONDS.toMillis(5),
+                TimeUnit.SECONDS.toMillis(30),
+                TimeUnit.MINUTES.toMillis(1),
+                TimeUnit.MINUTES.toMillis(5),
+                TimeUnit.MINUTES.toMillis(15)
+            };
+
+    private static final String EXPOSED_CAPABILITIES_KEY = "mExposedCapabilities";
+    @NonNull private final Set<Integer> mExposedCapabilities;
+
+    private static final String UNDERLYING_CAPABILITIES_KEY = "mUnderlyingCapabilities";
+    @NonNull private final Set<Integer> mUnderlyingCapabilities;
+
+    // TODO: Add Ike/ChildSessionParams as a subclass - maybe VcnIkeGatewayConnectionConfig
+
+    private static final String MAX_MTU_KEY = "mMaxMtu";
+    private final int mMaxMtu;
+
+    private static final String RETRY_INTERVAL_MS_KEY = "mRetryIntervalsMs";
+    @NonNull private final long[] mRetryIntervalsMs;
+
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    public VcnGatewayConnectionConfig(
+            @NonNull Set<Integer> exposedCapabilities,
+            @NonNull Set<Integer> underlyingCapabilities,
+            @NonNull long[] retryIntervalsMs,
+            @IntRange(from = MIN_MTU_V6) int maxMtu) {
+        mExposedCapabilities = exposedCapabilities;
+        mUnderlyingCapabilities = underlyingCapabilities;
+        mRetryIntervalsMs = retryIntervalsMs;
+        mMaxMtu = maxMtu;
+
         validate();
     }
 
-    // TODO: Implement getters, validators, etc
+    /** @hide */
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    public VcnGatewayConnectionConfig(@NonNull PersistableBundle in) {
+        final PersistableBundle exposedCapsBundle =
+                in.getPersistableBundle(EXPOSED_CAPABILITIES_KEY);
+        final PersistableBundle underlyingCapsBundle =
+                in.getPersistableBundle(UNDERLYING_CAPABILITIES_KEY);
+
+        mExposedCapabilities = new ArraySet<>(PersistableBundleUtils.toList(
+                exposedCapsBundle, PersistableBundleUtils.INTEGER_DESERIALIZER));
+        mUnderlyingCapabilities = new ArraySet<>(PersistableBundleUtils.toList(
+                underlyingCapsBundle, PersistableBundleUtils.INTEGER_DESERIALIZER));
+        mRetryIntervalsMs = in.getLongArray(RETRY_INTERVAL_MS_KEY);
+        mMaxMtu = in.getInt(MAX_MTU_KEY);
+
+        validate();
+    }
+
+    private void validate() {
+        Preconditions.checkArgument(
+                mExposedCapabilities != null && !mExposedCapabilities.isEmpty(),
+                "exposedCapsBundle was null or empty");
+        for (Integer cap : getAllExposedCapabilities()) {
+            checkValidCapability(cap);
+        }
+
+        Preconditions.checkArgument(
+                mUnderlyingCapabilities != null && !mUnderlyingCapabilities.isEmpty(),
+                "underlyingCapabilities was null or empty");
+        for (Integer cap : getAllUnderlyingCapabilities()) {
+            checkValidCapability(cap);
+        }
+
+        Objects.requireNonNull(mRetryIntervalsMs, "retryIntervalsMs was null");
+        validateRetryInterval(mRetryIntervalsMs);
+
+        Preconditions.checkArgument(
+                mMaxMtu >= MIN_MTU_V6, "maxMtu must be at least IPv6 min MTU (1280)");
+    }
+
+    private static void checkValidCapability(int capability) {
+        Preconditions.checkArgument(
+                ALLOWED_CAPABILITIES.contains(capability),
+                "NetworkCapability " + capability + "out of range");
+    }
+
+    private static void validateRetryInterval(@Nullable long[] retryIntervalsMs) {
+        Preconditions.checkArgument(
+                retryIntervalsMs != null
+                        && retryIntervalsMs.length > 0
+                        && retryIntervalsMs.length <= MAX_RETRY_INTERVAL_COUNT,
+                "retryIntervalsMs was null, empty or exceed max interval count");
+
+        final long repeatingInterval = retryIntervalsMs[retryIntervalsMs.length - 1];
+        if (repeatingInterval < MINIMUM_REPEATING_RETRY_INTERVAL_MS) {
+            throw new IllegalArgumentException(
+                    "Repeating retry interval was too short, must be a minimum of 15 minutes: "
+                            + repeatingInterval);
+        }
+    }
 
     /**
-     * Validates this configuration
+     * Returns all exposed capabilities.
      *
      * @hide
      */
-    private void validate() {
-        // TODO: implement validation logic
+    @NonNull
+    public Set<Integer> getAllExposedCapabilities() {
+        return Collections.unmodifiableSet(mExposedCapabilities);
     }
 
-    // Parcelable methods
+    /**
+     * Checks if this config is configured to support/expose a specific capability.
+     *
+     * @param capability the capability to check for
+     */
+    public boolean hasExposedCapability(@NetCapability int capability) {
+        checkValidCapability(capability);
 
-    /** This class is used to incrementally build {@link VcnGatewayConnectionConfig} objects */
+        return mExposedCapabilities.contains(capability);
+    }
+
+    /**
+     * Returns all capabilities required of underlying networks.
+     *
+     * @hide
+     */
+    @NonNull
+    public Set<Integer> getAllUnderlyingCapabilities() {
+        return Collections.unmodifiableSet(mUnderlyingCapabilities);
+    }
+
+    /**
+     * Checks if this config requires an underlying network to have the specified capability.
+     *
+     * @param capability the capability to check for
+     */
+    public boolean requiresUnderlyingCapability(@NetCapability int capability) {
+        checkValidCapability(capability);
+
+        return mUnderlyingCapabilities.contains(capability);
+    }
+
+    /** Retrieves the configured retry intervals. */
+    @NonNull
+    public long[] getRetryIntervalsMs() {
+        return Arrays.copyOf(mRetryIntervalsMs, mRetryIntervalsMs.length);
+    }
+
+    /** Retrieves the maximum MTU allowed for this Gateway Connection. */
+    @IntRange(from = MIN_MTU_V6)
+    public int getMaxMtu() {
+        return mMaxMtu;
+    }
+
+    /**
+     * Converts this config to a PersistableBundle.
+     *
+     * @hide
+     */
+    @NonNull
+    @VisibleForTesting(visibility = Visibility.PROTECTED)
+    public PersistableBundle toPersistableBundle() {
+        final PersistableBundle result = new PersistableBundle();
+
+        final PersistableBundle exposedCapsBundle =
+                PersistableBundleUtils.fromList(
+                        new ArrayList<>(mExposedCapabilities),
+                        PersistableBundleUtils.INTEGER_SERIALIZER);
+        final PersistableBundle underlyingCapsBundle =
+                PersistableBundleUtils.fromList(
+                        new ArrayList<>(mUnderlyingCapabilities),
+                        PersistableBundleUtils.INTEGER_SERIALIZER);
+
+        result.putPersistableBundle(EXPOSED_CAPABILITIES_KEY, exposedCapsBundle);
+        result.putPersistableBundle(UNDERLYING_CAPABILITIES_KEY, underlyingCapsBundle);
+        result.putLongArray(RETRY_INTERVAL_MS_KEY, mRetryIntervalsMs);
+        result.putInt(MAX_MTU_KEY, mMaxMtu);
+
+        return result;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(
+                mExposedCapabilities,
+                mUnderlyingCapabilities,
+                Arrays.hashCode(mRetryIntervalsMs),
+                mMaxMtu);
+    }
+
+    @Override
+    public boolean equals(@Nullable Object other) {
+        if (!(other instanceof VcnGatewayConnectionConfig)) {
+            return false;
+        }
+
+        final VcnGatewayConnectionConfig rhs = (VcnGatewayConnectionConfig) other;
+        return mExposedCapabilities.equals(rhs.mExposedCapabilities)
+                && mUnderlyingCapabilities.equals(rhs.mUnderlyingCapabilities)
+                && Arrays.equals(mRetryIntervalsMs, rhs.mRetryIntervalsMs)
+                && mMaxMtu == rhs.mMaxMtu;
+    }
+
+    /** This class is used to incrementally build {@link VcnGatewayConnectionConfig} objects. */
     public static class Builder {
-        // TODO: Implement this builder
+        @NonNull private final Set<Integer> mExposedCapabilities = new ArraySet();
+        @NonNull private final Set<Integer> mUnderlyingCapabilities = new ArraySet();
+        @NonNull private long[] mRetryIntervalsMs = DEFAULT_RETRY_INTERVALS_MS;
+        private int mMaxMtu = DEFAULT_MAX_MTU;
+
+        // TODO: (b/175829816) Consider VCN-exposed capabilities that may be transport dependent.
+        //       Consider the case where the VCN might only expose MMS on WiFi, but defer to MMS
+        //       when on Cell.
 
         /**
-         * Builds and validates the VcnGatewayConnectionConfig
+         * Add a capability that this VCN Gateway Connection will support.
+         *
+         * @param exposedCapability the app-facing capability to be exposed by this VCN Gateway
+         *     Connection (i.e., the capabilities that this VCN Gateway Connection will support).
+         * @return this {@link Builder} instance, for chaining
+         * @see VcnGatewayConnectionConfig for a list of capabilities may be exposed by a Gateway
+         *     Connection
+         */
+        public Builder addExposedCapability(@NetCapability int exposedCapability) {
+            checkValidCapability(exposedCapability);
+
+            mExposedCapabilities.add(exposedCapability);
+            return this;
+        }
+
+        /**
+         * Remove a capability that this VCN Gateway Connection will support.
+         *
+         * @param exposedCapability the app-facing capability to not be exposed by this VCN Gateway
+         *     Connection (i.e., the capabilities that this VCN Gateway Connection will support)
+         * @return this {@link Builder} instance, for chaining
+         * @see VcnGatewayConnectionConfig for a list of capabilities may be exposed by a Gateway
+         *     Connection
+         */
+        public Builder removeExposedCapability(@NetCapability int exposedCapability) {
+            checkValidCapability(exposedCapability);
+
+            mExposedCapabilities.remove(exposedCapability);
+            return this;
+        }
+
+        /**
+         * Require a capability for Networks underlying this VCN Gateway Connection.
+         *
+         * @param underlyingCapability the capability that a network MUST have in order to be an
+         *     underlying network for this VCN Gateway Connection.
+         * @return this {@link Builder} instance, for chaining
+         * @see VcnGatewayConnectionConfig for a list of capabilities may be required of underlying
+         *     networks
+         */
+        public Builder addRequiredUnderlyingCapability(@NetCapability int underlyingCapability) {
+            checkValidCapability(underlyingCapability);
+
+            mUnderlyingCapabilities.add(underlyingCapability);
+            return this;
+        }
+
+        /**
+         * Remove a requirement of a capability for Networks underlying this VCN Gateway Connection.
+         *
+         * <p>Calling this method will allow Networks that do NOT have this capability to be
+         * selected as an underlying network for this VCN Gateway Connection. However, underlying
+         * networks MAY still have the removed capability.
+         *
+         * @param underlyingCapability the capability that a network DOES NOT need to have in order
+         *     to be an underlying network for this VCN Gateway Connection.
+         * @return this {@link Builder} instance, for chaining
+         * @see VcnGatewayConnectionConfig for a list of capabilities may be required of underlying
+         *     networks
+         */
+        public Builder removeRequiredUnderlyingCapability(@NetCapability int underlyingCapability) {
+            checkValidCapability(underlyingCapability);
+
+            mUnderlyingCapabilities.remove(underlyingCapability);
+            return this;
+        }
+
+        /**
+         * Set the retry interval between VCN establishment attempts upon successive failures.
+         *
+         * <p>The last retry interval will be repeated until safe mode is entered, or a connection
+         * is successfully established, at which point the retry timers will be reset. For power
+         * reasons, the last (repeated) retry interval MUST be at least 15 minutes.
+         *
+         * <p>Retry intervals MAY be subject to system power saving modes. That is to say that if
+         * the system enters a power saving mode, the retry may not occur until the device leaves
+         * the specified power saving mode. Intervals are sequential, and intervals will NOT be
+         * skipped if system power saving results in delaying retries (even if it exceed multiple
+         * retry intervals).
+         *
+         * <p>Each Gateway Connection will retry according to the retry intervals configured, but if
+         * safe mode is enabled, all Gateway Connection(s) will be disabled.
+         *
+         * @param retryIntervalsMs an array of between 1 and 10 millisecond intervals after which
+         *     the VCN will attempt to retry a session initiation. The last (repeating) retry
+         *     interval must be at least 15 minutes. Defaults to: {@code [1s, 2s, 5s, 30s, 1m, 5m,
+         *     15m]}
+         * @return this {@link Builder} instance, for chaining
+         * @see VcnManager for additional discussion on fail-safe mode
+         */
+        @NonNull
+        public Builder setRetryInterval(@NonNull long[] retryIntervalsMs) {
+            validateRetryInterval(retryIntervalsMs);
+
+            mRetryIntervalsMs = retryIntervalsMs;
+            return this;
+        }
+
+        /**
+         * Sets the maximum MTU allowed for this VCN Gateway Connection.
+         *
+         * <p>This MTU is applied to the VCN Gateway Connection exposed Networks, and represents the
+         * MTU of the virtualized network.
+         *
+         * <p>The system may reduce the MTU below the maximum specified based on signals such as the
+         * MTU of the underlying networks (and adjusted for Gateway Connection overhead).
+         *
+         * @param maxMtu the maximum MTU allowed for this Gateway Connection. Must be greater than
+         *     the IPv6 minimum MTU of 1280. Defaults to 1500.
+         * @return this {@link Builder} instance, for chaining
+         */
+        @NonNull
+        public Builder setMaxMtu(@IntRange(from = MIN_MTU_V6) int maxMtu) {
+            Preconditions.checkArgument(
+                    maxMtu >= MIN_MTU_V6, "maxMtu must be at least IPv6 min MTU (1280)");
+
+            mMaxMtu = maxMtu;
+            return this;
+        }
+
+        /**
+         * Builds and validates the VcnGatewayConnectionConfig.
          *
          * @return an immutable VcnGatewayConnectionConfig instance
          */
         @NonNull
         public VcnGatewayConnectionConfig build() {
-            return new VcnGatewayConnectionConfig();
+            return new VcnGatewayConnectionConfig(
+                    mExposedCapabilities, mUnderlyingCapabilities, mRetryIntervalsMs, mMaxMtu);
         }
     }
 }
diff --git a/core/java/android/net/vcn/VcnManager.java b/core/java/android/net/vcn/VcnManager.java
index 6769b9e..19c183f 100644
--- a/core/java/android/net/vcn/VcnManager.java
+++ b/core/java/android/net/vcn/VcnManager.java
@@ -23,10 +23,37 @@
 import android.content.Context;
 import android.os.ParcelUuid;
 import android.os.RemoteException;
+import android.os.ServiceSpecificException;
+
+import java.io.IOException;
 
 /**
  * VcnManager publishes APIs for applications to configure and manage Virtual Carrier Networks.
  *
+ * <p>A VCN creates a virtualization layer to allow MVNOs to aggregate heterogeneous physical
+ * networks, unifying them as a single carrier network. This enables infrastructure flexibility on
+ * the part of MVNOs without impacting user connectivity, abstracting the physical network
+ * technologies as an implementation detail of their public network.
+ *
+ * <p>Each VCN virtualizes an Carrier's network by building tunnels to a carrier's core network over
+ * carrier-managed physical links and supports a IP mobility layer to ensure seamless transitions
+ * between the underlying networks. Each VCN is configured based on a Subscription Group (see {@link
+ * android.telephony.SubscriptionManager}) and aggregates all networks that are brought up based on
+ * a profile or suggestion in the specified Subscription Group.
+ *
+ * <p>The VCN can be configured to expose one or more {@link android.net.Network}(s), each with
+ * different capabilities, allowing for APN virtualization.
+ *
+ * <p>If a tunnel fails to connect, or otherwise encounters a fatal error, the VCN will attempt to
+ * reestablish the connection. If the tunnel still has not reconnected after a system-determined
+ * timeout, the VCN Safe Mode (see below) will be entered.
+ *
+ * <p>The VCN Safe Mode ensures that users (and carriers) have a fallback to restore system
+ * connectivity to update profiles, diagnose issues, contact support, or perform other remediation
+ * tasks. In Safe Mode, the system will allow underlying cellular networks to be used as default.
+ * Additionally, during Safe Mode, the VCN will continue to retry the connections, and will
+ * automatically exit Safe Mode if all active tunnels connect successfully.
+ *
  * @hide
  */
 @SystemService(Context.VCN_MANAGEMENT_SERVICE)
@@ -63,15 +90,20 @@
      * @param config the configuration parameters for the VCN
      * @throws SecurityException if the caller does not have carrier privileges, or is not running
      *     as the primary user
+     * @throws IOException if the configuration failed to be persisted. A caller encountering this
+     *     exception should attempt to retry (possibly after a delay).
      * @hide
      */
     @RequiresPermission("carrier privileges") // TODO (b/72967236): Define a system-wide constant
-    public void setVcnConfig(@NonNull ParcelUuid subscriptionGroup, @NonNull VcnConfig config) {
+    public void setVcnConfig(@NonNull ParcelUuid subscriptionGroup, @NonNull VcnConfig config)
+            throws IOException {
         requireNonNull(subscriptionGroup, "subscriptionGroup was null");
         requireNonNull(config, "config was null");
 
         try {
             mService.setVcnConfig(subscriptionGroup, config);
+        } catch (ServiceSpecificException e) {
+            throw new IOException(e);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -88,14 +120,18 @@
      * @param subscriptionGroup the subscription group that the configuration should be applied to
      * @throws SecurityException if the caller does not have carrier privileges, or is not running
      *     as the primary user
+     * @throws IOException if the configuration failed to be cleared. A caller encountering this
+     *     exception should attempt to retry (possibly after a delay).
      * @hide
      */
     @RequiresPermission("carrier privileges") // TODO (b/72967236): Define a system-wide constant
-    public void clearVcnConfig(@NonNull ParcelUuid subscriptionGroup) {
+    public void clearVcnConfig(@NonNull ParcelUuid subscriptionGroup) throws IOException {
         requireNonNull(subscriptionGroup, "subscriptionGroup was null");
 
         try {
             mService.clearVcnConfig(subscriptionGroup);
+        } catch (ServiceSpecificException e) {
+            throw new IOException(e);
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
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/BatteryStatsManager.java b/core/java/android/os/BatteryStatsManager.java
index a9585c6..258e58d 100644
--- a/core/java/android/os/BatteryStatsManager.java
+++ b/core/java/android/os/BatteryStatsManager.java
@@ -26,6 +26,7 @@
 import android.content.Context;
 import android.os.connectivity.CellularBatteryStats;
 import android.os.connectivity.WifiBatteryStats;
+import android.telephony.DataConnectionRealTimeInfo;
 
 import com.android.internal.app.IBatteryStats;
 
@@ -376,4 +377,50 @@
             e.rethrowFromSystemServer();
         }
     }
+
+    /**
+     * Indicates that the radio power state has changed.
+     *
+     * @param isActive indicates if the mobile radio is powered.
+     * @param uid Uid of this event. For the active state it represents the uid that was responsible
+     *            for waking the radio, or -1 if the system was responsible for waking the radio.
+     *            For inactive state, the UID should always be -1.
+     * @throws RuntimeException if there are binder remote-invocation errors.
+     */
+    @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
+    public void reportMobileRadioPowerState(boolean isActive, int uid) throws RuntimeException {
+        try {
+            mBatteryStats.noteMobileRadioPowerState(getDataConnectionPowerState(isActive),
+                    SystemClock.elapsedRealtimeNanos(), uid);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Indicates that the wifi power state has changed.
+     *
+     * @param isActive indicates if the wifi radio is powered.
+     * @param uid Uid of this event. For the active state it represents the uid that was responsible
+     *            for waking the radio, or -1 if the system was responsible for waking the radio.
+     *            For inactive state, the UID should always be -1.
+     * @throws RuntimeException if there are binder remote-invocation errors.
+     */
+    @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
+    public void reportWifiRadioPowerState(boolean isActive, int uid) throws RuntimeException {
+        try {
+            mBatteryStats.noteWifiRadioPowerState(getDataConnectionPowerState(isActive),
+                    SystemClock.elapsedRealtimeNanos(), uid);
+        } catch (RemoteException e) {
+            e.rethrowFromSystemServer();
+        }
+    }
+
+    private static int getDataConnectionPowerState(boolean isActive) {
+        // TODO: DataConnectionRealTimeInfo is under telephony package but the constants are used
+        // for both Wifi and mobile. It would make more sense to separate the constants to a generic
+        // class or move it to generic package.
+        return isActive ? DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH
+                : DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
+    }
 }
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/BugreportManager.java b/core/java/android/os/BugreportManager.java
index fe4d729..46ad7b8 100644
--- a/core/java/android/os/BugreportManager.java
+++ b/core/java/android/os/BugreportManager.java
@@ -26,7 +26,6 @@
 import android.annotation.SystemService;
 import android.app.ActivityManager;
 import android.content.Context;
-import android.content.Intent;
 import android.os.Handler;
 import android.util.Log;
 import android.widget.Toast;
@@ -52,8 +51,6 @@
 public final class BugreportManager {
 
     private static final String TAG = "BugreportManager";
-    private static final String INTENT_UI_INTENSIVE_BUGREPORT_DUMPS_FINISHED =
-            "com.android.internal.intent.action.UI_INTENSIVE_BUGREPORT_DUMPS_FINISHED";
 
     private final Context mContext;
     private final IDumpstate mBinder;
@@ -126,6 +123,12 @@
          * Called when taking bugreport finishes successfully.
          */
         public void onFinished() {}
+
+        /**
+         * Called when it is ready for calling app to show UI, showing any extra UI before this
+         * callback can interfere with bugreport generation.
+         */
+        public void onEarlyReportFinished() {}
     }
 
     /**
@@ -288,21 +291,12 @@
         }
 
         @Override
-        public void onUiIntensiveBugreportDumpsFinished(String callingPackage)
+        public void onUiIntensiveBugreportDumpsFinished()
                 throws RemoteException {
             final long identity = Binder.clearCallingIdentity();
             try {
                 mExecutor.execute(() -> {
-                    // Send intent to let calling app to show UI safely without interfering with
-                    // the bugreport/screenshot generation.
-                    // TODO(b/154298410): When S is ready for API change, add a method in
-                    // BugreportCallback so we can just call the callback instead of using
-                    // broadcast.
-                    Intent intent = new Intent(INTENT_UI_INTENSIVE_BUGREPORT_DUMPS_FINISHED);
-                    intent.setPackage(callingPackage);
-                    intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
-                    intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
-                    mContext.sendBroadcast(intent, android.Manifest.permission.DUMP);
+                    mCallback.onEarlyReportFinished();
                 });
             } finally {
                 Binder.restoreCallingIdentity(identity);
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 3e77022..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,15 +1024,33 @@
 
         /**
          * 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;
 
diff --git a/core/java/android/os/Debug.java b/core/java/android/os/Debug.java
index 8ab734d..27dc6e0 100644
--- a/core/java/android/os/Debug.java
+++ b/core/java/android/os/Debug.java
@@ -2576,6 +2576,13 @@
     public static native long getIonMappedSizeKb();
 
     /**
+     * Return memory size in kilobytes used by GPU.
+     *
+     * @hide
+     */
+    public static native long getGpuTotalUsageKb();
+
+    /**
      * Return whether virtually-mapped kernel stacks are enabled (CONFIG_VMAP_STACK).
      * Note: caller needs config_gz read sepolicy permission
      *
diff --git a/core/java/android/os/FileBridge.java b/core/java/android/os/FileBridge.java
index ab5637c..7b84575 100644
--- a/core/java/android/os/FileBridge.java
+++ b/core/java/android/os/FileBridge.java
@@ -22,11 +22,12 @@
 import android.system.Os;
 import android.util.Log;
 
+import com.android.internal.util.ArrayUtils;
+
 import libcore.io.IoBridge;
 import libcore.io.IoUtils;
 import libcore.io.Memory;
 import libcore.io.Streams;
-import libcore.util.ArrayUtils;
 
 import java.io.FileDescriptor;
 import java.io.IOException;
diff --git a/core/java/android/os/GraphicsEnvironment.java b/core/java/android/os/GraphicsEnvironment.java
index a6b869d..e77b163 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;
@@ -248,6 +249,7 @@
         }
         if (appInfo == null) {
             Log.w(TAG, "Debug layer app '" + packageName + "' not installed");
+            return "";
         }
 
         final String abi = chooseAbi(appInfo);
@@ -722,14 +724,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 +750,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 +810,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 +879,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 +910,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 +922,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..33dedda 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -282,8 +282,8 @@
     /**
      * Control network activity of a UID over interfaces with a quota limit.
      */
-    void setUidMeteredNetworkDenylist(int uid, boolean enable);
-    void setUidMeteredNetworkAllowlist(int uid, boolean enable);
+    void setUidOnMeteredNetworkDenylist(int uid, boolean enable);
+    void setUidOnMeteredNetworkAllowlist(int uid, boolean enable);
     boolean setDataSaverModeEnabled(boolean enable);
 
     void setUidCleartextNetworkPolicy(int uid, int policy);
@@ -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/IRecoverySystem.aidl b/core/java/android/os/IRecoverySystem.aidl
index 2561e1e..2052883 100644
--- a/core/java/android/os/IRecoverySystem.aidl
+++ b/core/java/android/os/IRecoverySystem.aidl
@@ -27,7 +27,9 @@
     boolean setupBcb(in String command);
     boolean clearBcb();
     void rebootRecoveryWithCommand(in String command);
-    boolean requestLskf(in String updateToken, in IntentSender sender);
-    boolean clearLskf();
-    boolean rebootWithLskf(in String updateToken, in String reason);
+    boolean requestLskf(in String packageName, in IntentSender sender);
+    boolean clearLskf(in String packageName);
+    boolean isLskfCaptured(in String packageName);
+    boolean rebootWithLskfAssumeSlotSwitch(in String packageName, in String reason);
+    boolean rebootWithLskf(in String packageName, in String reason, in boolean slotSwitch);
 }
diff --git a/core/java/android/os/OWNERS b/core/java/android/os/OWNERS
index 40c291f..8c77a20 100644
--- a/core/java/android/os/OWNERS
+++ b/core/java/android/os/OWNERS
@@ -15,7 +15,47 @@
 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
+
+# Binder
+per-file BadParcelableException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file Binder.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file BinderProxy.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file DeadObjectException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file IBinder.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file Parcel.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ParcelFileDescriptor.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ParcelFormatException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file Parcelable.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ParcelableException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ParcelableHolder.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ParcelableParcel.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file RemoteException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ServiceManager.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ServiceManagerNative.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file ServiceSpecificException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file TransactionTooLargeException.java = file:platform/frameworks/native:/libs/binder/OWNERS
+
+# HwBinder
+per-file HwBinder.java = file:platform/system/libhwbinder:/OWNERS
+per-file HwBlob.java = file:platform/system/libhwbinder:/OWNERS
+per-file HwParcel.java = file:platform/system/libhwbinder:/OWNERS
+per-file HwParcel.java = file:platform/system/libhwbinder:/OWNERS
+per-file HwRemoteBinder.java = file:platform/system/libhwbinder:/OWNERS
+per-file IHwBinder.java = file:platform/system/libhwbinder:/OWNERS
+per-file IHwInterface.java = file:platform/system/libhwbinder:/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
+
+# RecoverySystem
+per-file *Recovery* = file:/services/core/java/com/android/server/recoverysystem/OWNERS
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index cf90174..6acdcc4 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -33,11 +33,12 @@
 import android.util.SparseBooleanArray;
 import android.util.SparseIntArray;
 
+import com.android.internal.util.ArrayUtils;
+
 import dalvik.annotation.optimization.CriticalNative;
 import dalvik.annotation.optimization.FastNative;
 import dalvik.system.VMRuntime;
 
-import libcore.util.ArrayUtils;
 import libcore.util.SneakyThrow;
 
 import java.io.ByteArrayInputStream;
diff --git a/core/java/android/os/ParcelableHolder.java b/core/java/android/os/ParcelableHolder.java
index 1be367c..368ee2d 100644
--- a/core/java/android/os/ParcelableHolder.java
+++ b/core/java/android/os/ParcelableHolder.java
@@ -63,6 +63,8 @@
  * op.y = ...;
  * ap.extension.setParcelable(op);}</pre>
  *
+ * <p class="note">ParcelableHolder is <strong>not</strong> thread-safe.</p>
+ *
  * @hide
  */
 @SystemApi
@@ -120,6 +122,7 @@
 
     /**
      * Write a parcelable into ParcelableHolder, the previous parcelable will be removed.
+     * (@link #setParcelable} and (@link #getParcelable} are not thread-safe.
      * @throws BadParcelableException if the parcelable's stability is more unstable
      *         ParcelableHolder.
      */
@@ -139,6 +142,8 @@
     }
 
     /**
+     * Read a parcelable from ParcelableHolder.
+     * (@link #setParcelable} and (@link #getParcelable} are not thread-safe.
      * @return the parcelable that was written by {@link #setParcelable} or {@link #readFromParcel},
      *         or {@code null} if the parcelable has not been written.
      * @throws BadParcelableException if T is different from the type written by
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/RecoverySystem.java b/core/java/android/os/RecoverySystem.java
index 38e1704..6713de8 100644
--- a/core/java/android/os/RecoverySystem.java
+++ b/core/java/android/os/RecoverySystem.java
@@ -631,31 +631,35 @@
     /**
      * Prepare to apply an unattended update by asking the user for their Lock Screen Knowledge
      * Factor (LSKF). If supplied, the {@code intentSender} will be called when the system is setup
-     * and ready to apply the OTA.
-     * <p>
-     * When the system is already prepared for update and this API is called again with the same
-     * {@code updateToken}, it will not call the intent sender nor request the user enter their Lock
-     * Screen Knowledge Factor.
-     * <p>
-     * When this API is called again with a different {@code updateToken}, the prepared-for-update
-     * status is reset and process repeats as though it's the initial call to this method as
-     * described in the first paragraph.
+     * and ready to apply the OTA. This API is expected to handle requests from multiple clients
+     * simultaneously, e.g. from ota and mainline.
+     *
+     * <p> The behavior of multi-client Resume on Reboot works as follows
+     * <li> Each client should call this function to prepare for Resume on Reboot before calling
+     *      {@link #rebootAndApply(Context, String, boolean)} </li>
+     * <li> One client cannot clear the Resume on Reboot preparation of another client. </li>
+     * <li> If multiple clients have prepared for Resume on Reboot, the subsequent reboot will be
+     *      first come, first served. </li>
      *
      * @param context the Context to use.
-     * @param updateToken token used to indicate which update was prepared
+     * @param updateToken this parameter is deprecated and won't be used. Callers can supply with
+     *                    an empty string. See details in
+     *                    <a href="http://go/multi-client-ror">http://go/multi-client-ror</a>
+     *                    TODO(xunchang) update the link of document with the public doc.
      * @param intentSender the intent to call when the update is prepared; may be {@code null}
      * @throws IOException if there were any errors setting up unattended update
      * @hide
      */
     @SystemApi
-    @RequiresPermission(android.Manifest.permission.RECOVERY)
+    @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY,
+            android.Manifest.permission.REBOOT})
     public static void prepareForUnattendedUpdate(@NonNull Context context,
             @NonNull String updateToken, @Nullable IntentSender intentSender) throws IOException {
         if (updateToken == null) {
             throw new NullPointerException("updateToken == null");
         }
         RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE);
-        if (!rs.requestLskf(updateToken, intentSender)) {
+        if (!rs.requestLskf(context.getPackageName(), intentSender)) {
             throw new IOException("preparation for update failed");
         }
     }
@@ -664,32 +668,38 @@
      * Request that any previously requested Lock Screen Knowledge Factor (LSKF) is cleared and
      * the preparation for unattended update is reset.
      *
+     * <p> Note that the API won't clear the underlying Resume on Reboot preparation state if
+     * another client has requested. So the reboot call from the other client can still succeed.
+     *
      * @param context the Context to use.
      * @throws IOException if there were any errors clearing the unattended update state
      * @hide
      */
     @SystemApi
-    @RequiresPermission(android.Manifest.permission.RECOVERY)
+    @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY,
+            android.Manifest.permission.REBOOT})
     public static void clearPrepareForUnattendedUpdate(@NonNull Context context)
             throws IOException {
         RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE);
-        if (!rs.clearLskf()) {
+        if (!rs.clearLskf(context.getPackageName())) {
             throw new IOException("could not reset unattended update state");
         }
     }
 
     /**
-     * Request that the device reboot and apply the update that has been prepared. The
-     * {@code updateToken} must match what was given for {@link #prepareForUnattendedUpdate} or
-     * this will return {@code false}.
+     * Request that the device reboot and apply the update that has been prepared. This API is
+     * deprecated, and is expected to be used by OTA only on devices running Android 11.
      *
      * @param context the Context to use.
-     * @param updateToken the token used to call {@link #prepareForUnattendedUpdate} before
+     * @param updateToken this parameter is deprecated and won't be used. See details in
+     *                    <a href="http://go/multi-client-ror">http://go/multi-client-ror</a>
+     *                    TODO(xunchang) update the link of document with the public doc.
      * @param reason the reboot reason to give to the {@link PowerManager}
      * @throws IOException if the reboot couldn't proceed because the device wasn't ready for an
      *               unattended reboot or if the {@code updateToken} did not match the previously
      *               given token
      * @hide
+     * @deprecated Use {@link #rebootAndApply(Context, String, boolean)} instead
      */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.RECOVERY)
@@ -699,7 +709,47 @@
             throw new NullPointerException("updateToken == null");
         }
         RecoverySystem rs = (RecoverySystem) context.getSystemService(Context.RECOVERY_SERVICE);
-        if (!rs.rebootWithLskf(updateToken, reason)) {
+        // OTA is the sole user, who expects a slot switch.
+        if (!rs.rebootWithLskfAssumeSlotSwitch(context.getPackageName(), reason)) {
+            throw new IOException("system not prepared to apply update");
+        }
+    }
+
+    /**
+     * Query if Resume on Reboot has been prepared for a given caller.
+     *
+     * @param context the Context to use.
+     * @throws IOException if there were any errors connecting to the service or querying the state.
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY,
+            android.Manifest.permission.REBOOT})
+    public static boolean isPreparedForUnattendedUpdate(@NonNull Context context)
+            throws IOException {
+        RecoverySystem rs = context.getSystemService(RecoverySystem.class);
+        return rs.isLskfCaptured(context.getPackageName());
+    }
+
+    /**
+     * Request that the device reboot and apply the update that has been prepared.
+     * {@link #prepareForUnattendedUpdate} must be called before for the given client,
+     * otherwise the function call will fail.
+     *
+     * @param context the Context to use.
+     * @param reason the reboot reason to give to the {@link PowerManager}
+     * @param slotSwitch true if the caller expects the slot to be switched on A/B devices.
+     * @throws IOException if the reboot couldn't proceed because the device wasn't ready for an
+     *               unattended reboot.
+     * @hide
+     */
+    @SystemApi
+    @RequiresPermission(anyOf = {android.Manifest.permission.RECOVERY,
+            android.Manifest.permission.REBOOT})
+    public static void rebootAndApply(@NonNull Context context,
+            @NonNull String reason, boolean slotSwitch) throws IOException {
+        RecoverySystem rs = context.getSystemService(RecoverySystem.class);
+        if (!rs.rebootWithLskf(context.getPackageName(), reason, slotSwitch)) {
             throw new IOException("system not prepared to apply update");
         }
     }
@@ -1283,16 +1333,15 @@
     /**
      * Begins the process of asking the user for the Lock Screen Knowledge Factor.
      *
-     * @param updateToken token that will be used in calls to {@link #rebootAndApply} to ensure
-     *                    that the preparation was for the correct update
+     * @param packageName the package name of the caller who requests Resume on Reboot
      * @return true if the request was correct
      * @throws IOException if the recovery system service could not be contacted
      */
-    private boolean requestLskf(String updateToken, IntentSender sender) throws IOException {
+    private boolean requestLskf(String packageName, IntentSender sender) throws IOException {
         try {
-            return mService.requestLskf(updateToken, sender);
+            return mService.requestLskf(packageName, sender);
         } catch (RemoteException e) {
-            throw new IOException("could request update");
+            throw new IOException("could request LSKF capture");
         }
     }
 
@@ -1302,22 +1351,52 @@
      * @return true if the setup for OTA was cleared
      * @throws IOException if the recovery system service could not be contacted
      */
-    private boolean clearLskf() throws IOException {
+    private boolean clearLskf(String packageName) throws IOException {
         try {
-            return mService.clearLskf();
+            return mService.clearLskf(packageName);
         } catch (RemoteException e) {
             throw new IOException("could not clear LSKF");
         }
     }
 
     /**
+     * Queries if the Resume on Reboot has been prepared for a given caller.
+     *
+     * @param packageName the identifier of the caller who requests Resume on Reboot
+     * @return true if Resume on Reboot is prepared.
+     * @throws IOException if the recovery system service could not be contacted
+     */
+    private boolean isLskfCaptured(String packageName) throws IOException {
+        try {
+            return mService.isLskfCaptured(packageName);
+        } catch (RemoteException e) {
+            throw new IOException("could not get LSKF capture state");
+        }
+    }
+
+    /**
      * Calls the recovery system service to reboot and apply update.
      *
-     * @param updateToken the update token for which the update was prepared
      */
-    private boolean rebootWithLskf(String updateToken, String reason) throws IOException {
+    private boolean rebootWithLskf(String packageName, String reason, boolean slotSwitch)
+            throws IOException {
         try {
-            return mService.rebootWithLskf(updateToken, reason);
+            return mService.rebootWithLskf(packageName, reason, slotSwitch);
+        } catch (RemoteException e) {
+            throw new IOException("could not reboot for update");
+        }
+    }
+
+
+    /**
+     * Calls the recovery system service to reboot and apply update. This is the legacy API and
+     * expects a slot switch for A/B devices.
+     *
+     */
+    private boolean rebootWithLskfAssumeSlotSwitch(String packageName, String reason)
+            throws IOException {
+        try {
+            return mService.rebootWithLskfAssumeSlotSwitch(packageName, reason);
         } catch (RemoteException e) {
             throw new IOException("could not reboot for update");
         }
diff --git a/core/java/android/os/TransactionTooLargeException.java b/core/java/android/os/TransactionTooLargeException.java
index 10abf26..4d5b2a1 100644
--- a/core/java/android/os/TransactionTooLargeException.java
+++ b/core/java/android/os/TransactionTooLargeException.java
@@ -23,9 +23,11 @@
  * During a remote procedure call, the arguments and the return value of the call
  * are transferred as {@link Parcel} objects stored in the Binder transaction buffer.
  * If the arguments or the return value are too large to fit in the transaction buffer,
- * then the call will fail and {@link TransactionTooLargeException} will be thrown.
+ * then the call will fail.  {@link TransactionTooLargeException} is thrown as a
+ * heuristic when a transaction is large, and it fails, since these are the transactions
+ * which are most likely to overfill the transaction buffer.
  * </p><p>
- * The Binder transaction buffer has a limited fixed size, currently 1Mb, which
+ * The Binder transaction buffer has a limited fixed size, currently 1MB, which
  * is shared by all transactions in progress for the process.  Consequently this
  * exception can be thrown when there are many transactions in progress even when
  * most of the individual transactions are of moderate size.
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..08a51ff
--- /dev/null
+++ b/core/java/android/os/image/OWNERS
@@ -0,0 +1,3 @@
+include /packages/DynamicSystemInstallationService/OWNERS
+
+andrewhsieh@google.com
diff --git a/core/java/android/os/incremental/OWNERS b/core/java/android/os/incremental/OWNERS
new file mode 100644
index 0000000..3795493
--- /dev/null
+++ b/core/java/android/os/incremental/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 554432
+alexbuy@google.com
+schfan@google.com
+toddke@google.com
+zyy@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/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/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index fa1b7d5..38a59f0 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -4305,13 +4305,23 @@
          * <P>
          * Type: INTEGER (A bitmask of CARRIER_PRESENCE_* fields)
          * </P>
+         *
+         * @deprecated The contacts database will only show presence
+         * information on devices where
+         * {@link android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL} is true,
+         * otherwise use {@link android.telephony.ims.RcsUceAdapter}.
          */
+        @Deprecated
         public static final String CARRIER_PRESENCE = "carrier_presence";
 
         /**
          * Indicates that the entry is Video Telephony (VT) capable on the
          * current carrier. An allowed bitmask of {@link #CARRIER_PRESENCE}.
+         *
+         * @deprecated Same as {@link DataColumns#CARRIER_PRESENCE}.
+         *
          */
+        @Deprecated
         public static final int CARRIER_PRESENCE_VT_CAPABLE = 0x01;
 
         /**
diff --git a/core/java/android/provider/DeviceConfig.java b/core/java/android/provider/DeviceConfig.java
index 4d67d46..e7e2c61 100644
--- a/core/java/android/provider/DeviceConfig.java
+++ b/core/java/android/provider/DeviceConfig.java
@@ -403,6 +403,14 @@
     public static final String NAMESPACE_PERMISSIONS = "permissions";
 
     /**
+     * Namespace for ota related features.
+     *
+     * @hide
+     */
+    @SystemApi
+    public static final String NAMESPACE_OTA = "ota";
+
+    /**
      * Namespace for all widget related features.
      *
      * @hide
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..cb1509a 100644
--- a/core/java/android/provider/OWNERS
+++ b/core/java/android/provider/OWNERS
@@ -1,5 +1,18 @@
-per-file DeviceConfig.java = svetoslavganov@google.com
-per-file DeviceConfig.java = hackbod@google.com
-per-file DeviceConfig.java = schfan@google.com
+per-file *BlockedNumber* = file:/telephony/OWNERS
+per-file *Telephony* = file:/telephony/OWNERS
 
+per-file *CallLog* = file:platform/packages/providers/ContactsProvider:/OWNERS
+per-file *Contacts* = file:platform/packages/providers/ContactsProvider:/OWNERS
+per-file *Voicemail* = file:platform/packages/providers/ContactsProvider:/OWNERS
 
+per-file *Calendar* = file:platform/packages/providers/CalendarProvider:/OWNERS
+
+per-file *Downloads* = file:platform/packages/providers/DownloadProvider:/OWNERS
+
+per-file *DeviceConfig* = file:/packages/SettingsProvider/OWNERS
+per-file *Settings* = file:/packages/SettingsProvider/OWNERS
+
+per-file *Documents* = file:/core/java/android/os/storage/OWNERS
+per-file *Documents* = file:platform/packages/apps/DocumentsUI:/OWNERS
+
+per-file *Slices* = file:/core/java/android/app/slice/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/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 6054de8..727769c 100644
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -5167,6 +5167,14 @@
         public static final String COLUMN_IMS_RCS_UCE_ENABLED = "ims_rcs_uce_enabled";
 
         /**
+         * TelephonyProvider column name for determining if the user has enabled cross SIM calling
+         * for this subscription.
+         *
+         * @hide
+         */
+        public static final String COLUMN_CROSS_SIM_CALLING_ENABLED = "cross_sim_calling_enabled";
+
+        /**
          * TelephonyProvider column name for whether a subscription is opportunistic, that is,
          * whether the network it connects to is limited in functionality or coverage.
          * For example, CBRS.
@@ -5270,5 +5278,13 @@
          * @hide
          */
         public static final String COLUMN_ALLOWED_NETWORK_TYPES = "allowed_network_types";
+
+        /**
+         * TelephonyProvider column name for RCS configuration.
+         * <p>TYPE: BLOB
+         *
+         * @hide
+         */
+        public static final String COLUMN_RCS_CONFIG = "rcs_config";
     }
 }
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..7140ff1 100644
--- a/core/java/android/security/OWNERS
+++ b/core/java/android/security/OWNERS
@@ -1,4 +1,11 @@
+# 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
 per-file FrameworkNetworkSecurityPolicy.java = klyubin@google.com
+per-file Confirmation*.java = jdanis@google.com
+per-file Confirmation*.java = swillden@google.com
diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java
index 6ef9e7e..017f405 100644
--- a/core/java/android/security/keymaster/KeymasterDefs.java
+++ b/core/java/android/security/keymaster/KeymasterDefs.java
@@ -16,18 +16,18 @@
 
 package android.security.keymaster;
 
-import android.hardware.keymint.Algorithm;
-import android.hardware.keymint.BlockMode;
-import android.hardware.keymint.Digest;
-import android.hardware.keymint.ErrorCode;
-import android.hardware.keymint.HardwareAuthenticatorType;
-import android.hardware.keymint.KeyFormat;
-import android.hardware.keymint.KeyOrigin;
-import android.hardware.keymint.KeyPurpose;
-import android.hardware.keymint.PaddingMode;
-import android.hardware.keymint.SecurityLevel;
-import android.hardware.keymint.Tag;
-import android.hardware.keymint.TagType;
+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;
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/attestation/OWNERS b/core/java/android/service/attestation/OWNERS
new file mode 100644
index 0000000..b9e7b99
--- /dev/null
+++ b/core/java/android/service/attestation/OWNERS
@@ -0,0 +1,2 @@
+chaviw@google.com
+ogunwale@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/storage/OWNERS b/core/java/android/service/storage/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/core/java/android/service/storage/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
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/AngleMeasurement.java b/core/java/android/uwb/AngleMeasurement.java
index 33bc121..93b5fd4 100644
--- a/core/java/android/uwb/AngleMeasurement.java
+++ b/core/java/android/uwb/AngleMeasurement.java
@@ -17,6 +17,7 @@
 package android.uwb;
 
 import android.annotation.FloatRange;
+import android.annotation.NonNull;
 import android.os.Parcel;
 import android.os.Parcelable;
 
@@ -109,7 +110,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeDouble(mRadians);
         dest.writeDouble(mErrorRadians);
         dest.writeDouble(mConfidenceLevel);
@@ -146,6 +147,7 @@
          * @param radians angle in radians
          * @throws IllegalArgumentException if angle exceeds allowed limits of [-Math.PI, +Math.PI]
          */
+        @NonNull
         public Builder setRadians(double radians) {
             if (radians < -Math.PI || radians > Math.PI) {
                 throw new IllegalArgumentException("Invalid radians: " + radians);
@@ -160,6 +162,7 @@
          * @param errorRadians error of the angle in radians
          * @throws IllegalArgumentException if the error exceeds the allowed limits of [0, +Math.PI]
          */
+        @NonNull
         public Builder setErrorRadians(double errorRadians) {
             if (errorRadians < 0.0 || errorRadians > Math.PI) {
                 throw new IllegalArgumentException(
@@ -175,6 +178,7 @@
          * @param confidenceLevel level of confidence of the angle measurement
          * @throws IllegalArgumentException if the error exceeds the allowed limits of [0.0, 1.0]
          */
+        @NonNull
         public Builder setConfidenceLevel(double confidenceLevel) {
             if (confidenceLevel < 0.0 || confidenceLevel > 1.0) {
                 throw new IllegalArgumentException(
@@ -189,6 +193,7 @@
          *
          * @throws IllegalStateException if angle, error, or confidence values are missing
          */
+        @NonNull
         public AngleMeasurement build() {
             if (Double.isNaN(mRadians)) {
                 throw new IllegalStateException("Angle is not set");
diff --git a/core/java/android/uwb/AngleOfArrivalMeasurement.java b/core/java/android/uwb/AngleOfArrivalMeasurement.java
index cd5af69..20a1c7a 100644
--- a/core/java/android/uwb/AngleOfArrivalMeasurement.java
+++ b/core/java/android/uwb/AngleOfArrivalMeasurement.java
@@ -53,7 +53,7 @@
      * @return the azimuth {@link AngleMeasurement}
      */
     @NonNull
-    public AngleMeasurement getAzimuth() {
+    public AngleMeasurement getAzimuthAngleMeasurement() {
         return mAzimuthAngleMeasurement;
     }
 
@@ -70,7 +70,7 @@
      * @return altitude {@link AngleMeasurement} or null when this is not available
      */
     @Nullable
-    public AngleMeasurement getAltitude() {
+    public AngleMeasurement getAltitudeAngleMeasurement() {
         return mAltitudeAngleMeasurement;
     }
 
@@ -85,8 +85,8 @@
 
         if (obj instanceof AngleOfArrivalMeasurement) {
             AngleOfArrivalMeasurement other = (AngleOfArrivalMeasurement) obj;
-            return mAzimuthAngleMeasurement.equals(other.getAzimuth())
-                    && mAltitudeAngleMeasurement.equals(other.getAltitude());
+            return mAzimuthAngleMeasurement.equals(other.getAzimuthAngleMeasurement())
+                    && mAltitudeAngleMeasurement.equals(other.getAltitudeAngleMeasurement());
         }
         return false;
     }
@@ -105,7 +105,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeParcelable(mAzimuthAngleMeasurement, flags);
         dest.writeParcelable(mAltitudeAngleMeasurement, flags);
     }
@@ -143,6 +143,7 @@
          *
          * @param azimuthAngle azimuth angle
          */
+        @NonNull
         public Builder setAzimuthAngleMeasurement(@NonNull AngleMeasurement azimuthAngle) {
             mAzimuthAngleMeasurement = azimuthAngle;
             return this;
@@ -153,6 +154,7 @@
          *
          * @param altitudeAngle altitude angle
          */
+        @NonNull
         public Builder setAltitudeAngleMeasurement(@NonNull AngleMeasurement altitudeAngle) {
             mAltitudeAngleMeasurement = altitudeAngle;
             return this;
@@ -163,6 +165,7 @@
          *
          * @throws IllegalStateException if the required azimuth angle is not provided
          */
+        @NonNull
         public AngleOfArrivalMeasurement build() {
             if (mAzimuthAngleMeasurement == null) {
                 throw new IllegalStateException("Azimuth angle measurement is not set");
diff --git a/core/java/android/uwb/DistanceMeasurement.java b/core/java/android/uwb/DistanceMeasurement.java
index c959840..10c2172 100644
--- a/core/java/android/uwb/DistanceMeasurement.java
+++ b/core/java/android/uwb/DistanceMeasurement.java
@@ -17,6 +17,7 @@
 package android.uwb;
 
 import android.annotation.FloatRange;
+import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.os.Parcel;
 import android.os.Parcelable;
@@ -106,7 +107,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeDouble(mMeters);
         dest.writeDouble(mErrorMeters);
         dest.writeDouble(mConfidenceLevel);
@@ -143,6 +144,7 @@
          * @param meters distance in meters
          * @throws IllegalArgumentException if meters is NaN
          */
+        @NonNull
         public Builder setMeters(double meters) {
             if (Double.isNaN(meters)) {
                 throw new IllegalArgumentException("meters cannot be NaN");
@@ -157,6 +159,7 @@
          * @param errorMeters distance error in meters
          * @throws IllegalArgumentException if error is negative or NaN
          */
+        @NonNull
         public Builder setErrorMeters(double errorMeters) {
             if (Double.isNaN(errorMeters) || errorMeters < 0.0) {
                 throw new IllegalArgumentException(
@@ -172,6 +175,7 @@
          * @param confidenceLevel the confidence level in the distance measurement
          * @throws IllegalArgumentException if confidence level is not in the range of [0.0, 1.0]
          */
+        @NonNull
         public Builder setConfidenceLevel(double confidenceLevel) {
             if (confidenceLevel < 0.0 || confidenceLevel > 1.0) {
                 throw new IllegalArgumentException(
@@ -186,6 +190,7 @@
          *
          * @throws IllegalStateException if meters, error, or confidence are not set
          */
+        @NonNull
         public DistanceMeasurement build() {
             if (Double.isNaN(mMeters)) {
                 throw new IllegalStateException("Meters cannot be NaN");
diff --git a/core/java/android/uwb/OWNERS b/core/java/android/uwb/OWNERS
new file mode 100644
index 0000000..ea41c39
--- /dev/null
+++ b/core/java/android/uwb/OWNERS
@@ -0,0 +1,5 @@
+bstack@google.com
+eliptus@google.com
+jsolnit@google.com
+siyuanh@google.com
+zachoverflow@google.com
diff --git a/core/java/android/uwb/RangingManager.java b/core/java/android/uwb/RangingManager.java
new file mode 100644
index 0000000..a9bf4ab
--- /dev/null
+++ b/core/java/android/uwb/RangingManager.java
@@ -0,0 +1,178 @@
+/*
+ * 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.PersistableBundle;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.util.Hashtable;
+import java.util.concurrent.Executor;
+
+/**
+ * @hide
+ */
+public class RangingManager extends android.uwb.IUwbRangingCallbacks.Stub {
+    private static final String TAG = "Uwb.RangingManager";
+
+    private final IUwbAdapter mAdapter;
+    private final Hashtable<SessionHandle, RangingSession> mRangingSessionTable = new Hashtable<>();
+
+    public RangingManager(IUwbAdapter adapter) {
+        mAdapter = adapter;
+    }
+
+    /**
+     * Open a new ranging session
+     *
+     * @param params the parameters that define the ranging session
+     * @param executor {@link Executor} to run callbacks
+     * @param callbacks {@link RangingSession.Callback} to associate with the {@link RangingSession}
+     *                  that is being opened.
+     * @return a new {@link RangingSession}
+     */
+    public RangingSession openSession(@NonNull PersistableBundle params, @NonNull Executor executor,
+            @NonNull RangingSession.Callback callbacks) {
+        SessionHandle sessionHandle;
+        try {
+            sessionHandle = mAdapter.startRanging(this, params);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+
+        synchronized (this) {
+            if (hasSession(sessionHandle)) {
+                Log.w(TAG, "Newly created session unexpectedly reuses an active SessionHandle");
+                executor.execute(() -> callbacks.onClosed(
+                        RangingSession.Callback.CLOSE_REASON_LOCAL_GENERIC_ERROR,
+                        new PersistableBundle()));
+            }
+
+            RangingSession session =
+                    new RangingSession(executor, callbacks, mAdapter, sessionHandle);
+            mRangingSessionTable.put(sessionHandle, session);
+            return session;
+        }
+    }
+
+    private boolean hasSession(SessionHandle sessionHandle) {
+        return mRangingSessionTable.containsKey(sessionHandle);
+    }
+
+    @Override
+    public void onRangingStarted(SessionHandle sessionHandle, PersistableBundle parameters) {
+        synchronized (this) {
+            if (!hasSession(sessionHandle)) {
+                Log.w(TAG,
+                        "onRangingStarted - received unexpected SessionHandle: " + sessionHandle);
+                return;
+            }
+
+            RangingSession session = mRangingSessionTable.get(sessionHandle);
+            session.onRangingStarted(parameters);
+        }
+    }
+
+    @Override
+    public void onRangingStartFailed(SessionHandle sessionHandle, int reason,
+            PersistableBundle params) {
+        synchronized (this) {
+            if (!hasSession(sessionHandle)) {
+                Log.w(TAG, "onRangingStartFailed - received unexpected SessionHandle: "
+                        + sessionHandle);
+                return;
+            }
+
+            RangingSession session = mRangingSessionTable.get(sessionHandle);
+            session.onRangingClosed(convertStartFailureToCloseReason(reason), params);
+            mRangingSessionTable.remove(sessionHandle);
+        }
+    }
+
+    @Override
+    public void onRangingClosed(SessionHandle sessionHandle, int reason, PersistableBundle params) {
+        synchronized (this) {
+            if (!hasSession(sessionHandle)) {
+                Log.w(TAG, "onRangingClosed - received unexpected SessionHandle: " + sessionHandle);
+                return;
+            }
+
+            RangingSession session = mRangingSessionTable.get(sessionHandle);
+            session.onRangingClosed(convertToCloseReason(reason), params);
+            mRangingSessionTable.remove(sessionHandle);
+        }
+    }
+
+    @Override
+    public void onRangingResult(SessionHandle sessionHandle, RangingReport result) {
+        synchronized (this) {
+            if (!hasSession(sessionHandle)) {
+                Log.w(TAG, "onRangingResult - received unexpected SessionHandle: " + sessionHandle);
+                return;
+            }
+
+            RangingSession session = mRangingSessionTable.get(sessionHandle);
+            session.onRangingResult(result);
+        }
+    }
+
+    @RangingSession.Callback.CloseReason
+    private static int convertToCloseReason(@CloseReason int reason) {
+        switch (reason) {
+            case CloseReason.LOCAL_API:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_CLOSE_API;
+
+            case CloseReason.MAX_SESSIONS_REACHED:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_MAX_SESSIONS_REACHED;
+
+            case CloseReason.SYSTEM_POLICY:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_SYSTEM_POLICY;
+
+            case CloseReason.REMOTE_REQUEST:
+                return RangingSession.Callback.CLOSE_REASON_REMOTE_REQUEST;
+
+            case CloseReason.PROTOCOL_SPECIFIC:
+                return RangingSession.Callback.CLOSE_REASON_PROTOCOL_SPECIFIC;
+
+            case CloseReason.UNKNOWN:
+            default:
+                return RangingSession.Callback.CLOSE_REASON_UNKNOWN;
+        }
+    }
+
+    @RangingSession.Callback.CloseReason
+    private static int convertStartFailureToCloseReason(@StartFailureReason int reason) {
+        switch (reason) {
+            case StartFailureReason.BAD_PARAMETERS:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_BAD_PARAMETERS;
+
+            case StartFailureReason.MAX_SESSIONS_REACHED:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_MAX_SESSIONS_REACHED;
+
+            case StartFailureReason.SYSTEM_POLICY:
+                return RangingSession.Callback.CLOSE_REASON_LOCAL_SYSTEM_POLICY;
+
+            case StartFailureReason.PROTOCOL_SPECIFIC:
+                return RangingSession.Callback.CLOSE_REASON_PROTOCOL_SPECIFIC;
+
+            case StartFailureReason.UNKNOWN:
+            default:
+                return RangingSession.Callback.CLOSE_REASON_UNKNOWN;
+        }
+    }
+}
diff --git a/core/java/android/uwb/RangingMeasurement.java b/core/java/android/uwb/RangingMeasurement.java
index f1c3162..50e5f0d 100644
--- a/core/java/android/uwb/RangingMeasurement.java
+++ b/core/java/android/uwb/RangingMeasurement.java
@@ -60,6 +60,9 @@
         return mRemoteDeviceAddress;
     }
 
+    /**
+     * @hide
+     */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(value = {
             RANGING_STATUS_SUCCESS,
@@ -115,7 +118,7 @@
      *         {@link #RANGING_STATUS_SUCCESS}
      */
     @Nullable
-    public DistanceMeasurement getDistance() {
+    public DistanceMeasurement getDistanceMeasurement() {
         return mDistanceMeasurement;
     }
 
@@ -126,7 +129,7 @@
      *         {@link #RANGING_STATUS_SUCCESS}
      */
     @Nullable
-    public AngleOfArrivalMeasurement getAngleOfArrival() {
+    public AngleOfArrivalMeasurement getAngleOfArrivalMeasurement() {
         return mAngleOfArrivalMeasurement;
     }
 
@@ -144,8 +147,8 @@
             return mRemoteDeviceAddress.equals(other.getRemoteDeviceAddress())
                     && mStatus == other.getStatus()
                     && mElapsedRealtimeNanos == other.getElapsedRealtimeNanos()
-                    && mDistanceMeasurement.equals(other.getDistance())
-                    && mAngleOfArrivalMeasurement.equals(other.getAngleOfArrival());
+                    && mDistanceMeasurement.equals(other.getDistanceMeasurement())
+                    && mAngleOfArrivalMeasurement.equals(other.getAngleOfArrivalMeasurement());
         }
         return false;
     }
@@ -165,7 +168,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeParcelable(mRemoteDeviceAddress, flags);
         dest.writeInt(mStatus);
         dest.writeLong(mElapsedRealtimeNanos);
@@ -210,6 +213,7 @@
          *
          * @param remoteDeviceAddress remote device's address
          */
+        @NonNull
         public Builder setRemoteDeviceAddress(@NonNull UwbAddress remoteDeviceAddress) {
             mRemoteDeviceAddress = remoteDeviceAddress;
             return this;
@@ -220,6 +224,7 @@
          *
          * @param status the status of the ranging measurement
          */
+        @NonNull
         public Builder setStatus(@Status int status) {
             mStatus = status;
             return this;
@@ -230,6 +235,7 @@
          *
          * @param elapsedRealtimeNanos time the ranging measurement occurred
          */
+        @NonNull
         public Builder setElapsedRealtimeNanos(long elapsedRealtimeNanos) {
             if (elapsedRealtimeNanos < 0) {
                 throw new IllegalArgumentException("elapsedRealtimeNanos must be >= 0");
@@ -243,6 +249,7 @@
          *
          * @param distanceMeasurement the distance measurement for this ranging measurement
          */
+        @NonNull
         public Builder setDistanceMeasurement(@NonNull DistanceMeasurement distanceMeasurement) {
             mDistanceMeasurement = distanceMeasurement;
             return this;
@@ -254,6 +261,7 @@
          * @param angleOfArrivalMeasurement the angle of arrival measurement for this ranging
          *                                  measurement
          */
+        @NonNull
         public Builder setAngleOfArrivalMeasurement(
                 @NonNull AngleOfArrivalMeasurement angleOfArrivalMeasurement) {
             mAngleOfArrivalMeasurement = angleOfArrivalMeasurement;
@@ -268,6 +276,7 @@
          *                               elapsedRealtimeNanos of the measurement is invalid, or
          *                               if no remote device address is set
          */
+        @NonNull
         public RangingMeasurement build() {
             if (mStatus != RANGING_STATUS_SUCCESS) {
                 if (mDistanceMeasurement != null) {
diff --git a/core/java/android/uwb/RangingReport.java b/core/java/android/uwb/RangingReport.java
index 45180bf..5b5f084 100644
--- a/core/java/android/uwb/RangingReport.java
+++ b/core/java/android/uwb/RangingReport.java
@@ -83,7 +83,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeTypedList(mRangingMeasurements);
     }
 
@@ -113,6 +113,7 @@
          *
          * @param rangingMeasurement a ranging measurement
          */
+        @NonNull
         public Builder addMeasurement(@NonNull RangingMeasurement rangingMeasurement) {
             mMeasurements.add(rangingMeasurement);
             return this;
@@ -123,6 +124,7 @@
          *
          * @param rangingMeasurements {@link List} of {@link RangingMeasurement}s to add
          */
+        @NonNull
         public Builder addMeasurements(@NonNull List<RangingMeasurement> rangingMeasurements) {
             mMeasurements.addAll(rangingMeasurements);
             return this;
@@ -133,6 +135,7 @@
          *
          * @throws IllegalStateException if measurements are not in monotonically increasing order
          */
+        @NonNull
         public RangingReport build() {
             // Verify that all measurement timestamps are monotonically increasing
             RangingMeasurement prevMeasurement = null;
diff --git a/core/java/android/uwb/RangingSession.java b/core/java/android/uwb/RangingSession.java
index 8639269..b0dbd85 100644
--- a/core/java/android/uwb/RangingSession.java
+++ b/core/java/android/uwb/RangingSession.java
@@ -17,7 +17,11 @@
 package android.uwb;
 
 import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.os.Binder;
 import android.os.PersistableBundle;
+import android.os.RemoteException;
+import android.util.Log;
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
@@ -33,12 +37,26 @@
  * {@link UwbManager#openRangingSession(PersistableBundle, Executor, Callback)} to request to open a
  * session. Once the session is opened, a {@link RangingSession} object is provided through
  * {@link RangingSession.Callback#onOpenSuccess(RangingSession, PersistableBundle)}. If opening a
- * session fails, the failure is reported through {@link RangingSession.Callback#onClosed(int)} with
- * the failure reason.
+ * session fails, the failure is reported through
+ * {@link RangingSession.Callback#onClosed(int, PersistableBundle)} with the failure reason.
  *
  * @hide
  */
 public final class RangingSession implements AutoCloseable {
+    private static final String TAG = "Uwb.RangingSession";
+    private final SessionHandle mSessionHandle;
+    private final IUwbAdapter mAdapter;
+    private final Executor mExecutor;
+    private final Callback mCallback;
+
+    private enum State {
+        INIT,
+        OPEN,
+        CLOSED,
+    }
+
+    private State mState;
+
     /**
      * Interface for receiving {@link RangingSession} events
      */
@@ -50,8 +68,11 @@
          * @param session the newly opened {@link RangingSession}
          * @param sessionInfo session specific parameters from lower layers
          */
-        void onOpenSuccess(RangingSession session, PersistableBundle sessionInfo);
+        void onOpenSuccess(@NonNull RangingSession session, @NonNull PersistableBundle sessionInfo);
 
+        /**
+         * @hide
+         */
         @Retention(RetentionPolicy.SOURCE)
         @IntDef(value = {
                 CLOSE_REASON_UNKNOWN,
@@ -112,20 +133,46 @@
         int CLOSE_REASON_REMOTE_REQUEST = 7;
 
         /**
+         * Indicates that the session was closed for a protocol specific reason. The associated
+         * {@link PersistableBundle} should be consulted for additional information.
+         */
+        int CLOSE_REASON_PROTOCOL_SPECIFIC = 8;
+
+        /**
          * Invoked when session is either closed spontaneously, or per user request via
          * {@link RangingSession#close()} or {@link AutoCloseable#close()}, or when session failed
          * to open.
          *
          * @param reason reason for the session closure
+         * @param parameters protocol specific parameters related to the close reason
          */
-        void onClosed(@CloseReason int reason);
+        void onClosed(@CloseReason int reason, @NonNull PersistableBundle parameters);
 
         /**
          * Called once per ranging interval even when a ranging measurement fails
          *
          * @param rangingReport ranging report for this interval's measurements
          */
-        void onReportReceived(RangingReport rangingReport);
+        void onReportReceived(@NonNull RangingReport rangingReport);
+    }
+
+    /**
+     * @hide
+     */
+    public RangingSession(Executor executor, Callback callback, IUwbAdapter adapter,
+            SessionHandle sessionHandle) {
+        mState = State.INIT;
+        mExecutor = executor;
+        mCallback = callback;
+        mAdapter = adapter;
+        mSessionHandle = sessionHandle;
+    }
+
+    /**
+     * @hide
+     */
+    public boolean isOpen() {
+        return mState == State.OPEN;
     }
 
     /**
@@ -133,16 +180,74 @@
      * <p>If this session is currently open, it will close and stop the session.
      * <p>If the session is in the process of being opened, it will attempt to stop the session from
      * being opened.
-     * <p>If the session is already closed, the registered {@link Callback#onClosed(int)} callback
-     * will still be invoked.
+     * <p>If the session is already closed, the registered
+     * {@link Callback#onClosed(int, PersistableBundle)} callback will still be invoked.
      *
-     * <p>{@link Callback#onClosed(int)} will be invoked using the same callback
+     * <p>{@link Callback#onClosed(int, PersistableBundle)} will be invoked using the same callback
      * object given to {@link UwbManager#openRangingSession(PersistableBundle, Executor, Callback)}
      * when the {@link RangingSession} was opened. The callback will be invoked after each call to
      * {@link #close()}, even if the {@link RangingSession} is already closed.
      */
     @Override
     public void close() {
-        throw new UnsupportedOperationException();
+        if (mState == State.CLOSED) {
+            mExecutor.execute(() -> mCallback.onClosed(
+                    Callback.CLOSE_REASON_LOCAL_CLOSE_API, new PersistableBundle()));
+            return;
+        }
+
+        try {
+            mAdapter.closeRanging(mSessionHandle);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public void onRangingStarted(@NonNull PersistableBundle parameters) {
+        if (mState == State.CLOSED) {
+            Log.w(TAG, "onRangingStarted invoked for a closed session");
+            return;
+        }
+
+        mState = State.OPEN;
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            mExecutor.execute(() -> mCallback.onOpenSuccess(this, parameters));
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public void onRangingClosed(@Callback.CloseReason int reason, PersistableBundle parameters) {
+        mState = State.CLOSED;
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            mExecutor.execute(() -> mCallback.onClosed(reason, parameters));
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    /**
+     * @hide
+     */
+    public void onRangingResult(@NonNull RangingReport report) {
+        if (!isOpen()) {
+            Log.w(TAG, "onRangingResult invoked for non-open session");
+            return;
+        }
+
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            mExecutor.execute(() -> mCallback.onReportReceived(report));
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
     }
 }
diff --git a/core/java/android/uwb/UwbAddress.java b/core/java/android/uwb/UwbAddress.java
index 828324c..b9523a3 100644
--- a/core/java/android/uwb/UwbAddress.java
+++ b/core/java/android/uwb/UwbAddress.java
@@ -51,7 +51,7 @@
      *       {@link #SHORT_ADDRESS_BYTE_LENGTH} or {@link #EXTENDED_ADDRESS_BYTE_LENGTH} bytes
      */
     @NonNull
-    public static UwbAddress fromBytes(@NonNull byte[] address) throws IllegalArgumentException {
+    public static UwbAddress fromBytes(@NonNull byte[] address) {
         if (address.length != SHORT_ADDRESS_BYTE_LENGTH
                 && address.length != EXTENDED_ADDRESS_BYTE_LENGTH) {
             throw new IllegalArgumentException("Invalid UwbAddress length " + address.length);
@@ -107,7 +107,7 @@
     }
 
     @Override
-    public void writeToParcel(Parcel dest, int flags) {
+    public void writeToParcel(@NonNull Parcel dest, int flags) {
         dest.writeInt(mAddressBytes.length);
         dest.writeByteArray(mAddressBytes);
     }
diff --git a/core/java/android/uwb/UwbManager.java b/core/java/android/uwb/UwbManager.java
index ed5cf36..f4d8018 100644
--- a/core/java/android/uwb/UwbManager.java
+++ b/core/java/android/uwb/UwbManager.java
@@ -49,12 +49,16 @@
     private IUwbAdapter mUwbAdapter;
     private static final String SERVICE_NAME = "uwb";
 
-    private AdapterStateListener mAdapterStateListener;
+    private final AdapterStateListener mAdapterStateListener;
+    private final RangingManager mRangingManager;
 
     /**
      * Interface for receiving UWB adapter state changes
      */
     public interface AdapterStateCallback {
+        /**
+         * @hide
+         */
         @Retention(RetentionPolicy.SOURCE)
         @IntDef(value = {
                 STATE_CHANGED_REASON_SESSION_STARTED,
@@ -116,6 +120,7 @@
     private UwbManager(IUwbAdapter adapter) {
         mUwbAdapter = adapter;
         mAdapterStateListener = new AdapterStateListener(adapter);
+        mRangingManager = new RangingManager(adapter);
     }
 
     /**
@@ -195,6 +200,9 @@
         }
     }
 
+    /**
+     * @hide
+     */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef(value = {
             ANGLE_OF_ARRIVAL_SUPPORT_TYPE_NONE,
@@ -387,8 +395,8 @@
      */
     @NonNull
     public AutoCloseable openRangingSession(@NonNull PersistableBundle parameters,
-            @NonNull Executor executor,
+            @NonNull @CallbackExecutor Executor executor,
             @NonNull RangingSession.Callback callbacks) {
-        throw new UnsupportedOperationException();
+        return mRangingManager.openSession(parameters, executor, callbacks);
     }
 }
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/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..e66b17a 100644
--- a/core/java/android/view/OWNERS
+++ b/core/java/android/view/OWNERS
@@ -1,15 +1,79 @@
+# 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
+
+# Notifications
+per-file Notification*.java = file:/services/core/java/com/android/server/notification/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 View.java = file:/core/java/android/view/inputmethod/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
+per-file ViewRootImpl.java = file:/core/java/android/view/inputmethod/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..c5a956a
--- /dev/null
+++ b/core/java/com/android/internal/app/OWNERS
@@ -0,0 +1,5 @@
+per-file *AppOp* = file:/core/java/android/permission/OWNERS
+per-file *Resolver* = file:/packages/SystemUI/OWNERS
+per-file *Chooser* = file:/packages/SystemUI/OWNERS
+per-file SimpleIconFactory.java = file:/packages/SystemUI/OWNERS
+per-file NetInitiatedActivity.java = file:/location/java/android/location/OWNERS
diff --git a/core/java/com/android/internal/app/chooser/OWNERS b/core/java/com/android/internal/app/chooser/OWNERS
new file mode 100644
index 0000000..a6f1632
--- /dev/null
+++ b/core/java/com/android/internal/app/chooser/OWNERS
@@ -0,0 +1 @@
+file:/packages/SystemUI/OWNERS
\ No newline at end of file
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/net/NetworkUtilsInternal.java b/core/java/com/android/internal/net/NetworkUtilsInternal.java
new file mode 100644
index 0000000..571d7e7
--- /dev/null
+++ b/core/java/com/android/internal/net/NetworkUtilsInternal.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.net;
+
+import static android.system.OsConstants.AF_INET;
+import static android.system.OsConstants.AF_INET6;
+
+import android.annotation.NonNull;
+import android.system.Os;
+
+/** @hide */
+public class NetworkUtilsInternal {
+
+    private static final int[] ADDRESS_FAMILIES = new int[] {AF_INET, AF_INET6};
+
+    /**
+     * Allow/Disallow creating AF_INET/AF_INET6 sockets and DNS lookups for current process.
+     *
+     * @param allowNetworking whether to allow or disallow creating AF_INET/AF_INET6 sockets
+     *                        and DNS lookups.
+     */
+    public static native void setAllowNetworkingForProcess(boolean allowNetworking);
+
+    /**
+     * Returns true if the hostname is weakly validated.
+     * @param hostname Name of host to validate.
+     * @return True if it's a valid-ish hostname.
+     *
+     * @hide
+     */
+    public static boolean isWeaklyValidatedHostname(@NonNull String hostname) {
+        // TODO(b/34953048): Use a validation method that permits more accurate,
+        // but still inexpensive, checking of likely valid DNS hostnames.
+        final String weakHostnameRegex = "^[a-zA-Z0-9_.-]+$";
+        if (!hostname.matches(weakHostnameRegex)) {
+            return false;
+        }
+
+        for (int address_family : ADDRESS_FAMILIES) {
+            if (Os.inet_pton(address_family, hostname) != null) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * Safely multiple a value by a rational.
+     * <p>
+     * Internally it uses integer-based math whenever possible, but switches
+     * over to double-based math if values would overflow.
+     * @hide
+     */
+    public static long multiplySafeByRational(long value, long num, long den) {
+        if (den == 0) {
+            throw new ArithmeticException("Invalid Denominator");
+        }
+        long x = value;
+        long y = num;
+
+        // Logic shamelessly borrowed from Math.multiplyExact()
+        long r = x * y;
+        long ax = Math.abs(x);
+        long ay = Math.abs(y);
+        if (((ax | ay) >>> 31 != 0)) {
+            // Some bits greater than 2^31 that might cause overflow
+            // Check the result using the divide operator
+            // and check for the special case of Long.MIN_VALUE * -1
+            if (((y != 0) && (r / y != x))
+                    || (x == Long.MIN_VALUE && y == -1)) {
+                // Use double math to avoid overflowing
+                return (long) (((double) num / den) * value);
+            }
+        }
+        return r / den;
+    }
+}
diff --git a/core/java/com/android/internal/net/VpnProfile.java b/core/java/com/android/internal/net/VpnProfile.java
index a17f5f5..b7170d8 100644
--- a/core/java/com/android/internal/net/VpnProfile.java
+++ b/core/java/com/android/internal/net/VpnProfile.java
@@ -28,6 +28,7 @@
 import android.text.TextUtils;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.net.module.util.ProxyUtils;
 
 import java.net.InetAddress;
 import java.nio.charset.StandardCharsets;
@@ -285,10 +286,12 @@
                 String exclList = (values.length > 17) ? values[17] : "";
                 String pacFileUrl = (values.length > 18) ? values[18] : "";
                 if (!host.isEmpty() || !port.isEmpty() || !exclList.isEmpty()) {
-                    profile.proxy = new ProxyInfo(host, port.isEmpty() ?
-                            0 : Integer.parseInt(port), exclList);
+                    profile.proxy =
+                            ProxyInfo.buildDirectProxy(host, port.isEmpty() ?
+                                    0 : Integer.parseInt(port),
+                                    ProxyUtils.exclusionStringAsList(exclList));
                 } else if (!pacFileUrl.isEmpty()) {
-                    profile.proxy = new ProxyInfo(Uri.parse(pacFileUrl));
+                    profile.proxy = ProxyInfo.buildPacProxy(Uri.parse(pacFileUrl));
                 }
             } // else profile.proxy = null
 
@@ -337,8 +340,8 @@
             builder.append(VALUE_DELIMITER).append(proxy.getPort());
             builder.append(VALUE_DELIMITER)
                     .append(
-                            proxy.getExclusionListAsString() != null
-                                    ? proxy.getExclusionListAsString()
+                            ProxyUtils.exclusionListAsString(proxy.getExclusionList()) != null
+                                    ? ProxyUtils.exclusionListAsString(proxy.getExclusionList())
                                     : "");
             builder.append(VALUE_DELIMITER).append(proxy.getPacFileUrl().toString());
         } else {
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 e595db3..e644274 100644
--- a/core/java/com/android/internal/os/KernelWakelockReader.java
+++ b/core/java/com/android/internal/os/KernelWakelockReader.java
@@ -78,13 +78,16 @@
         boolean useSystemSuspend = (new File(sSysClassWakeupDir)).exists();
 
         if (useSystemSuspend) {
-            // Get both kernel and native wakelock stats from SystemSuspend
-            updateVersion(staleStats);
-            if (getWakelockStatsFromSystemSuspend(staleStats) == null) {
-                Slog.w(TAG, "Failed to get wakelock stats from SystemSuspend");
-                return null;
+            // static read/write lock protection for sKernelWakelockUpdateVersion
+            synchronized (KernelWakelockReader.class) {
+                // Get both kernel and native wakelock stats from SystemSuspend
+                updateVersion(staleStats);
+                if (getWakelockStatsFromSystemSuspend(staleStats) == null) {
+                    Slog.w(TAG, "Failed to get wakelock stats from SystemSuspend");
+                    return null;
+                }
+                return removeOldStats(staleStats);
             }
-            return removeOldStats(staleStats);
         } else {
             Arrays.fill(mKernelWakelockBuffer, (byte) 0);
             int len = 0;
@@ -141,14 +144,17 @@
                 }
             }
 
-            updateVersion(staleStats);
-            // Get native wakelock stats from SystemSuspend
-            if (getWakelockStatsFromSystemSuspend(staleStats) == null) {
-                Slog.w(TAG, "Failed to get Native wakelock stats from SystemSuspend");
+            // static read/write lock protection for sKernelWakelockUpdateVersion
+            synchronized (KernelWakelockReader.class) {
+                updateVersion(staleStats);
+                // Get native wakelock stats from SystemSuspend
+                if (getWakelockStatsFromSystemSuspend(staleStats) == null) {
+                    Slog.w(TAG, "Failed to get Native wakelock stats from SystemSuspend");
+                }
+                // Get kernel wakelock stats
+                parseProcWakelocks(mKernelWakelockBuffer, len, wakeup_sources, staleStats);
+                return removeOldStats(staleStats);
             }
-            // Get kernel wakelock stats
-            parseProcWakelocks(mKernelWakelockBuffer, len, wakeup_sources, staleStats);
-            return removeOldStats(staleStats);
         }
     }
 
@@ -184,7 +190,6 @@
 
         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/Zygote.java b/core/java/com/android/internal/os/Zygote.java
index 15d4525..0381a75 100644
--- a/core/java/com/android/internal/os/Zygote.java
+++ b/core/java/com/android/internal/os/Zygote.java
@@ -24,7 +24,6 @@
 import android.net.Credentials;
 import android.net.LocalServerSocket;
 import android.net.LocalSocket;
-import android.net.NetworkUtils;
 import android.os.FactoryTest;
 import android.os.IVold;
 import android.os.Process;
@@ -35,6 +34,8 @@
 import android.system.Os;
 import android.util.Log;
 
+import com.android.internal.net.NetworkUtilsInternal;
+
 import dalvik.annotation.optimization.FastNative;
 import dalvik.system.ZygoteHooks;
 
@@ -352,7 +353,7 @@
 
             // If no GIDs were specified, don't make any permissions changes based on groups.
             if (gids != null && gids.length > 0) {
-                NetworkUtils.setAllowNetworkingForProcess(containsInetGid(gids));
+                NetworkUtilsInternal.setAllowNetworkingForProcess(containsInetGid(gids));
             }
         }
 
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/AnnotationValidations.java b/core/java/com/android/internal/util/AnnotationValidations.java
index 2d3b450..cf5e48f 100644
--- a/core/java/com/android/internal/util/AnnotationValidations.java
+++ b/core/java/com/android/internal/util/AnnotationValidations.java
@@ -182,7 +182,7 @@
             Annotation ignored, int value, Object... params) {}
     public static void validate(Class<? extends Annotation> annotation,
             Annotation ignored, int value) {
-        if (("android.annotation".equals(annotation.getPackageName$())
+        if (("android.annotation".equals(annotation.getPackageName())
                 && annotation.getSimpleName().endsWith("Res"))
                 || ColorInt.class.equals(annotation)) {
             if (value < 0) {
@@ -192,7 +192,7 @@
     }
     public static void validate(Class<? extends Annotation> annotation,
             Annotation ignored, long value) {
-        if ("android.annotation".equals(annotation.getPackageName$())
+        if ("android.annotation".equals(annotation.getPackageName())
                 && annotation.getSimpleName().endsWith("Long")) {
             if (value < 0L) {
                 invalid(annotation, value);
diff --git a/core/java/com/android/internal/util/ArrayUtils.java b/core/java/com/android/internal/util/ArrayUtils.java
index 9ad1502..931ec64 100644
--- a/core/java/com/android/internal/util/ArrayUtils.java
+++ b/core/java/com/android/internal/util/ArrayUtils.java
@@ -734,6 +734,25 @@
     }
 
     /**
+     * Throws {@link ArrayIndexOutOfBoundsException} if the range is out of bounds.
+     * @param len length of the array. Must be non-negative
+     * @param offset start index of the range. Must be non-negative
+     * @param count length of the range. Must be non-negative
+     * @throws ArrayIndexOutOfBoundsException if the range from {@code offset} with length
+     * {@code count} is out of bounds of the array
+     */
+    public static void throwsIfOutOfBounds(int len, int offset, int count) {
+        if (len < 0) {
+            throw new ArrayIndexOutOfBoundsException("Negative length: " + len);
+        }
+
+        if ((offset | count) < 0 || offset > len - count) {
+            throw new ArrayIndexOutOfBoundsException(
+                    "length=" + len + "; regionStart=" + offset + "; regionLength=" + count);
+        }
+    }
+
+    /**
      * Returns an array with values from {@code val} minus {@code null} values
      *
      * @param arrayConstructor typically {@code T[]::new} e.g. {@code String[]::new}
diff --git a/core/java/com/android/internal/util/OWNERS b/core/java/com/android/internal/util/OWNERS
index 8b9acd3..a045451 100644
--- a/core/java/com/android/internal/util/OWNERS
+++ b/core/java/com/android/internal/util/OWNERS
@@ -2,3 +2,4 @@
 per-file MessageUtils*, Protocol*, RingBuffer*, TokenBucket* = jchalard@google.com, lorenzo@google.com, satk@google.com
 per-file Protocol* = etancohen@google.com, lorenzo@google.com
 per-file State* = jchalard@google.com, lorenzo@google.com, satk@google.com
+per-file DataClass* = eugenesusla@google.com
\ No newline at end of file
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/java/com/android/server/net/BaseNetworkObserver.java b/core/java/com/android/server/net/BaseNetworkObserver.java
index 2a9c0b4..93f89b5 100644
--- a/core/java/com/android/server/net/BaseNetworkObserver.java
+++ b/core/java/com/android/server/net/BaseNetworkObserver.java
@@ -64,7 +64,8 @@
     }
 
     @Override
-    public void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos) {
+    public void interfaceClassDataActivityChanged(int networkType, boolean active, long tsNanos,
+            int uid) {
         // default no-op
     }
 
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index 1968146..b4572fd 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -182,6 +182,7 @@
                 "android_content_res_Configuration.cpp",
                 "android_security_Scrypt.cpp",
                 "com_android_internal_content_om_OverlayConfig.cpp",
+                "com_android_internal_net_NetworkUtilsInternal.cpp",
                 "com_android_internal_os_ClassLoaderFactory.cpp",
                 "com_android_internal_os_FuseAppLoop.cpp",
                 "com_android_internal_os_KernelCpuUidBpfMapReader.cpp",
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 7b708ef..3198cb1 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -187,6 +187,7 @@
 extern int register_android_security_Scrypt(JNIEnv *env);
 extern int register_com_android_internal_content_NativeLibraryHelper(JNIEnv *env);
 extern int register_com_android_internal_content_om_OverlayConfig(JNIEnv *env);
+extern int register_com_android_internal_net_NetworkUtilsInternal(JNIEnv* env);
 extern int register_com_android_internal_os_ClassLoaderFactory(JNIEnv* env);
 extern int register_com_android_internal_os_FuseAppLoop(JNIEnv* env);
 extern int register_com_android_internal_os_KernelCpuUidBpfMapReader(JNIEnv *env);
@@ -1520,6 +1521,7 @@
         REG_JNI(register_android_os_SharedMemory),
         REG_JNI(register_android_os_incremental_IncrementalManager),
         REG_JNI(register_com_android_internal_content_om_OverlayConfig),
+        REG_JNI(register_com_android_internal_net_NetworkUtilsInternal),
         REG_JNI(register_com_android_internal_os_ClassLoaderFactory),
         REG_JNI(register_com_android_internal_os_Zygote),
         REG_JNI(register_com_android_internal_os_ZygoteInit),
diff --git a/core/jni/OWNERS b/core/jni/OWNERS
index 7d80993..2279d57 100644
--- a/core/jni/OWNERS
+++ b/core/jni/OWNERS
@@ -6,15 +6,53 @@
 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
+
+# Resources
+per-file android_content_res_* = file:/core/java/android/content/res/OWNERS
+per-file android_util_AssetManager* = file:/core/java/android/content/res/OWNERS
+per-file android_util_StringBlock* = file:/core/java/android/content/res/OWNERS
+per-file android_util_XmlBlock* = file:/core/java/android/content/res/OWNERS
+per-file com_android_internal_content_om_OverlayConfig* = file:/core/java/android/content/res/OWNERS
+
+# Binder related things
+per-file android_os_Parcel* = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file android_os_ServiceManager* = file:platform/frameworks/native:/libs/binder/OWNERS
+per-file android_util_Binder* = file:platform/frameworks/native:/libs/binder/OWNERS
+
+# HwBinder related things
+per-file android_os_HwBinder* = file:platform/system/libhwbinder:/OWNERS
+per-file android_os_HwBlob* = file:platform/system/libhwbinder:/OWNERS
+per-file android_os_HwParcel* = file:platform/system/libhwbinder:/OWNERS
+per-file android_os_HwRemoteBinder* = file:platform/system/libhwbinder:/OWNERS
+per-file EphemeralStorage* = file:platform/system/libhwbinder:/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_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_content_res_ApkAssets.cpp b/core/jni/android_content_res_ApkAssets.cpp
index fbdd406..444bb66 100644
--- a/core/jni/android_content_res_ApkAssets.cpp
+++ b/core/jni/android_content_res_ApkAssets.cpp
@@ -24,6 +24,7 @@
 #include "utils/misc.h"
 #include "utils/Trace.h"
 
+#include "android_util_AssetManager_private.h"
 #include "core_jni_helpers.h"
 #include "jni.h"
 #include "nativehelper/ScopedUtfChars.h"
@@ -347,12 +348,17 @@
     return 0;
   }
 
+  const auto buffer = asset->getIncFsBuffer(true /* aligned */);
+  const size_t length = asset->getLength();
+  if (!buffer.convert<uint8_t>().verify(length)) {
+    jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+    return 0;
+  }
+
   // DynamicRefTable is only needed when looking up resource references. Opening an XML file
   // directly from an ApkAssets has no notion of proper resource references.
-  std::unique_ptr<ResXMLTree> xml_tree = util::make_unique<ResXMLTree>(nullptr /*dynamicRefTable*/);
-  status_t err = xml_tree->setTo(asset->getBuffer(true), asset->getLength(), true);
-  asset.reset();
-
+  auto xml_tree = util::make_unique<ResXMLTree>(nullptr /*dynamicRefTable*/);
+  status_t err = xml_tree->setTo(buffer.unsafe_ptr(), length, true);
   if (err != NO_ERROR) {
     jniThrowException(env, "java/io/FileNotFoundException", "Corrupt XML binary file");
     return 0;
diff --git a/core/jni/android_media_AudioDeviceAttributes.cpp b/core/jni/android_media_AudioDeviceAttributes.cpp
index e79c95e..2a16dce 100644
--- a/core/jni/android_media_AudioDeviceAttributes.cpp
+++ b/core/jni/android_media_AudioDeviceAttributes.cpp
@@ -31,7 +31,7 @@
                                  const AudioDeviceTypeAddr *devTypeAddr) {
     jint jStatus = (jint)AUDIO_JAVA_SUCCESS;
     jint jNativeType = (jint)devTypeAddr->mType;
-    ScopedLocalRef<jstring> jAddress(env, env->NewStringUTF(devTypeAddr->mAddress.data()));
+    ScopedLocalRef<jstring> jAddress(env, env->NewStringUTF(devTypeAddr->getAddress()));
 
     *jAudioDeviceAttributes = env->NewObject(gAudioDeviceAttributesClass, gAudioDeviceAttributesCstor,
             jNativeType, jAddress.get());
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 7493e39..20e64ff 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -172,6 +172,8 @@
     jmethodID postRecordConfigEventFromNative;
 } gAudioPolicyEventHandlerMethods;
 
+static struct { jmethodID add; } gListMethods;
+
 //
 // JNI Initialization for OpenSLES routing
 //
@@ -292,25 +294,30 @@
     return old;
 }
 
-#define check_AudioSystem_Command(status) _check_AudioSystem_Command(__func__, (status))
+#define check_AudioSystem_Command(...) _check_AudioSystem_Command(__func__, __VA_ARGS__)
 
-static int _check_AudioSystem_Command(const char* caller, status_t status)
-{
-    ALOGE_IF(status, "Command failed for %s: %d", caller, status);
+static int _check_AudioSystem_Command(const char *caller, status_t status,
+                                      std::vector<status_t> ignoredErrors = {}) {
+    int jniStatus = kAudioStatusOk;
     switch (status) {
     case DEAD_OBJECT:
-        return kAudioStatusMediaServerDied;
+        jniStatus = kAudioStatusMediaServerDied;
+        break;
     case NO_ERROR:
-        return kAudioStatusOk;
+        break;
     default:
+        if (std::find(begin(ignoredErrors), end(ignoredErrors), status) == end(ignoredErrors)) {
+            jniStatus = kAudioStatusError;
+        }
         break;
     }
-    return kAudioStatusError;
+    ALOGE_IF(jniStatus != kAudioStatusOk, "Command failed for %s: %d", caller, status);
+    return jniStatus;
 }
 
 static jint getVectorOfAudioDeviceTypeAddr(JNIEnv *env, jintArray deviceTypes,
                                            jobjectArray deviceAddresses,
-                                           Vector<AudioDeviceTypeAddr> &audioDeviceTypeAddrVector) {
+                                           AudioDeviceTypeAddrVector &audioDeviceTypeAddrVector) {
     if (deviceTypes == nullptr || deviceAddresses == nullptr) {
         return (jint)AUDIO_JAVA_BAD_VALUE;
     }
@@ -337,7 +344,7 @@
         }
         const char *address = env->GetStringUTFChars((jstring)addrJobj, NULL);
         AudioDeviceTypeAddr dev = AudioDeviceTypeAddr((audio_devices_t)typesPtr[i], address);
-        audioDeviceTypeAddrVector.add(dev);
+        audioDeviceTypeAddrVector.push_back(dev);
         env->ReleaseStringUTFChars((jstring)addrJobj, address);
     }
     env->ReleaseIntArrayElements(deviceTypes, typesPtr, 0);
@@ -2063,7 +2070,7 @@
 
 static jint android_media_AudioSystem_setUidDeviceAffinities(JNIEnv *env, jobject clazz,
         jint uid, jintArray deviceTypes, jobjectArray deviceAddresses) {
-    Vector<AudioDeviceTypeAddr> deviceVector;
+    AudioDeviceTypeAddrVector deviceVector;
     jint results = getVectorOfAudioDeviceTypeAddr(env, deviceTypes, deviceAddresses, deviceVector);
     if (results != NO_ERROR) {
         return results;
@@ -2081,7 +2088,7 @@
 static jint android_media_AudioSystem_setUserIdDeviceAffinities(JNIEnv *env, jobject clazz,
                                                                 jint userId, jintArray deviceTypes,
                                                                 jobjectArray deviceAddresses) {
-    Vector<AudioDeviceTypeAddr> deviceVector;
+    AudioDeviceTypeAddrVector deviceVector;
     jint results = getVectorOfAudioDeviceTypeAddr(env, deviceTypes, deviceAddresses, deviceVector);
     if (results != NO_ERROR) {
         return results;
@@ -2362,48 +2369,124 @@
     return AudioSystem::isCallScreenModeSupported();
 }
 
-static jint
-android_media_AudioSystem_setPreferredDeviceForStrategy(JNIEnv *env, jobject thiz,
-        jint strategy, jint deviceType, jstring deviceAddress) {
-
-    const char *c_address = env->GetStringUTFChars(deviceAddress, NULL);
+static jint android_media_AudioSystem_setDevicesRoleForStrategy(JNIEnv *env, jobject thiz,
+                                                                jint strategy, jint role,
+                                                                jintArray jDeviceTypes,
+                                                                jobjectArray jDeviceAddresses) {
+    AudioDeviceTypeAddrVector nDevices;
+    jint results = getVectorOfAudioDeviceTypeAddr(env, jDeviceTypes, jDeviceAddresses, nDevices);
+    if (results != NO_ERROR) {
+        return results;
+    }
     int status = check_AudioSystem_Command(
-            AudioSystem::setPreferredDeviceForStrategy((product_strategy_t)strategy,
-                                                       AudioDeviceTypeAddr((audio_devices_t)
-                                                                                   deviceType,
-                                                                           c_address)));
-    env->ReleaseStringUTFChars(deviceAddress, c_address);
+            AudioSystem::setDevicesRoleForStrategy((product_strategy_t)strategy,
+                                                   (device_role_t)role, nDevices));
     return (jint) status;
 }
 
-static jint
-android_media_AudioSystem_removePreferredDeviceForStrategy(JNIEnv *env, jobject thiz, jint strategy)
-{
-    return (jint) check_AudioSystem_Command(
-            AudioSystem::removePreferredDeviceForStrategy((product_strategy_t) strategy));
+static jint android_media_AudioSystem_removeDevicesRoleForStrategy(JNIEnv *env, jobject thiz,
+                                                                   jint strategy, jint role) {
+    return (jint)
+            check_AudioSystem_Command(AudioSystem::removeDevicesRoleForStrategy((product_strategy_t)
+                                                                                        strategy,
+                                                                                (device_role_t)
+                                                                                        role),
+                                      {NAME_NOT_FOUND});
 }
 
-static jint
-android_media_AudioSystem_getPreferredDeviceForStrategy(JNIEnv *env, jobject thiz,
-        jint strategy, jobjectArray jDeviceArray)
-{
-    if (jDeviceArray == nullptr || env->GetArrayLength(jDeviceArray) != 1) {
-        ALOGE("%s invalid array to store AudioDeviceAttributes", __FUNCTION__);
-        return (jint)AUDIO_JAVA_BAD_VALUE;
-    }
-
-    AudioDeviceTypeAddr elDevice;
+static jint android_media_AudioSystem_getDevicesForRoleAndStrategy(JNIEnv *env, jobject thiz,
+                                                                   jint strategy, jint role,
+                                                                   jobject jDevices) {
+    AudioDeviceTypeAddrVector nDevices;
     status_t status = check_AudioSystem_Command(
-            AudioSystem::getPreferredDeviceForStrategy((product_strategy_t) strategy, elDevice));
+            AudioSystem::getDevicesForRoleAndStrategy((product_strategy_t)strategy,
+                                                      (device_role_t)role, nDevices));
     if (status != NO_ERROR) {
         return (jint) status;
     }
-    jobject jAudioDeviceAttributes = NULL;
-    jint jStatus = createAudioDeviceAttributesFromNative(env, &jAudioDeviceAttributes, &elDevice);
-    if (jStatus == AUDIO_JAVA_SUCCESS) {
-        env->SetObjectArrayElement(jDeviceArray, 0, jAudioDeviceAttributes);
+    for (const auto &device : nDevices) {
+        jobject jAudioDeviceAttributes = NULL;
+        jint jStatus = createAudioDeviceAttributesFromNative(env, &jAudioDeviceAttributes, &device);
+        if (jStatus != AUDIO_JAVA_SUCCESS) {
+            return jStatus;
+        }
+        env->CallBooleanMethod(jDevices, gListMethods.add, jAudioDeviceAttributes);
+        env->DeleteLocalRef(jAudioDeviceAttributes);
     }
-    return jStatus;
+    return AUDIO_JAVA_SUCCESS;
+}
+
+static jint android_media_AudioSystem_setDevicesRoleForCapturePreset(
+        JNIEnv *env, jobject thiz, jint capturePreset, jint role, jintArray jDeviceTypes,
+        jobjectArray jDeviceAddresses) {
+    AudioDeviceTypeAddrVector nDevices;
+    jint results = getVectorOfAudioDeviceTypeAddr(env, jDeviceTypes, jDeviceAddresses, nDevices);
+    if (results != NO_ERROR) {
+        return results;
+    }
+    int status = check_AudioSystem_Command(
+            AudioSystem::setDevicesRoleForCapturePreset((audio_source_t)capturePreset,
+                                                        (device_role_t)role, nDevices));
+    return (jint)status;
+}
+
+static jint android_media_AudioSystem_addDevicesRoleForCapturePreset(
+        JNIEnv *env, jobject thiz, jint capturePreset, jint role, jintArray jDeviceTypes,
+        jobjectArray jDeviceAddresses) {
+    AudioDeviceTypeAddrVector nDevices;
+    jint results = getVectorOfAudioDeviceTypeAddr(env, jDeviceTypes, jDeviceAddresses, nDevices);
+    if (results != NO_ERROR) {
+        return results;
+    }
+    int status = check_AudioSystem_Command(
+            AudioSystem::addDevicesRoleForCapturePreset((audio_source_t)capturePreset,
+                                                        (device_role_t)role, nDevices));
+    return (jint)status;
+}
+
+static jint android_media_AudioSystem_removeDevicesRoleForCapturePreset(
+        JNIEnv *env, jobject thiz, jint capturePreset, jint role, jintArray jDeviceTypes,
+        jobjectArray jDeviceAddresses) {
+    AudioDeviceTypeAddrVector nDevices;
+    jint results = getVectorOfAudioDeviceTypeAddr(env, jDeviceTypes, jDeviceAddresses, nDevices);
+    if (results != NO_ERROR) {
+        return results;
+    }
+    int status = check_AudioSystem_Command(
+            AudioSystem::removeDevicesRoleForCapturePreset((audio_source_t)capturePreset,
+                                                           (device_role_t)role, nDevices));
+    return (jint)status;
+}
+
+static jint android_media_AudioSystem_clearDevicesRoleForCapturePreset(JNIEnv *env, jobject thiz,
+                                                                       jint capturePreset,
+                                                                       jint role) {
+    return (jint)check_AudioSystem_Command(
+            AudioSystem::clearDevicesRoleForCapturePreset((audio_source_t)capturePreset,
+                                                          (device_role_t)role));
+}
+
+static jint android_media_AudioSystem_getDevicesForRoleAndCapturePreset(JNIEnv *env, jobject thiz,
+                                                                        jint capturePreset,
+                                                                        jint role,
+                                                                        jobject jDevices) {
+    AudioDeviceTypeAddrVector nDevices;
+    status_t status = check_AudioSystem_Command(
+            AudioSystem::getDevicesForRoleAndCapturePreset((audio_source_t)capturePreset,
+                                                           (device_role_t)role, nDevices));
+    if (status != NO_ERROR) {
+        return (jint)status;
+    }
+    for (const auto &device : nDevices) {
+        jobject jAudioDeviceAttributes = NULL;
+        jint jStatus = createAudioDeviceAttributesFromNative(env, &jAudioDeviceAttributes, &device);
+        if (jStatus != AUDIO_JAVA_SUCCESS) {
+            return jStatus;
+        }
+        env->CallBooleanMethod(jDevices, gListMethods.add, jAudioDeviceAttributes);
+        env->DeleteLocalRef(jAudioDeviceAttributes);
+    }
+    return AUDIO_JAVA_SUCCESS;
 }
 
 static jint
@@ -2551,12 +2634,22 @@
          {"setAudioHalPids", "([I)I", (void *)android_media_AudioSystem_setAudioHalPids},
          {"isCallScreeningModeSupported", "()Z",
           (void *)android_media_AudioSystem_isCallScreeningModeSupported},
-         {"setPreferredDeviceForStrategy", "(IILjava/lang/String;)I",
-          (void *)android_media_AudioSystem_setPreferredDeviceForStrategy},
-         {"removePreferredDeviceForStrategy", "(I)I",
-          (void *)android_media_AudioSystem_removePreferredDeviceForStrategy},
-         {"getPreferredDeviceForStrategy", "(I[Landroid/media/AudioDeviceAttributes;)I",
-          (void *)android_media_AudioSystem_getPreferredDeviceForStrategy},
+         {"setDevicesRoleForStrategy", "(II[I[Ljava/lang/String;)I",
+          (void *)android_media_AudioSystem_setDevicesRoleForStrategy},
+         {"removeDevicesRoleForStrategy", "(II)I",
+          (void *)android_media_AudioSystem_removeDevicesRoleForStrategy},
+         {"getDevicesForRoleAndStrategy", "(IILjava/util/List;)I",
+          (void *)android_media_AudioSystem_getDevicesForRoleAndStrategy},
+         {"setDevicesRoleForCapturePreset", "(II[I[Ljava/lang/String;)I",
+          (void *)android_media_AudioSystem_setDevicesRoleForCapturePreset},
+         {"addDevicesRoleForCapturePreset", "(II[I[Ljava/lang/String;)I",
+          (void *)android_media_AudioSystem_addDevicesRoleForCapturePreset},
+         {"removeDevicesRoleForCapturePreset", "(II[I[Ljava/lang/String;)I",
+          (void *)android_media_AudioSystem_removeDevicesRoleForCapturePreset},
+         {"clearDevicesRoleForCapturePreset", "(II)I",
+          (void *)android_media_AudioSystem_clearDevicesRoleForCapturePreset},
+         {"getDevicesForRoleAndCapturePreset", "(IILjava/util/List;)I",
+          (void *)android_media_AudioSystem_getDevicesForRoleAndCapturePreset},
          {"getDevicesForAttributes",
           "(Landroid/media/AudioAttributes;[Landroid/media/AudioDeviceAttributes;)I",
           (void *)android_media_AudioSystem_getDevicesForAttributes},
@@ -2758,6 +2851,9 @@
     gMidAudioRecordRoutingProxy_release =
             android::GetMethodIDOrDie(env, gClsAudioRecordRoutingProxy, "native_release", "()V");
 
+    jclass listClass = FindClassOrDie(env, "java/util/List");
+    gListMethods.add = GetMethodIDOrDie(env, listClass, "add", "(Ljava/lang/Object;)Z");
+
     AudioSystem::addErrorCallback(android_media_AudioSystem_error_callback);
 
     RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
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_net_NetUtils.cpp b/core/jni/android_net_NetUtils.cpp
index 8d4c4e5..2155246 100644
--- a/core/jni/android_net_NetUtils.cpp
+++ b/core/jni/android_net_NetUtils.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright 2008, The Android Open Source Project
+ * 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.
@@ -28,7 +28,6 @@
 #include <netinet/udp.h>
 
 #include <DnsProxydProtocol.h> // NETID_USE_LOCAL_NAMESERVERS
-#include <android_runtime/AndroidRuntime.h>
 #include <cutils/properties.h>
 #include <nativehelper/JNIPlatformHelp.h>
 #include <nativehelper/ScopedLocalRef.h>
@@ -226,11 +225,6 @@
             class_Network, ctor, dnsNetId & ~NETID_USE_LOCAL_NAMESERVERS, privateDnsBypass);
 }
 
-static void android_net_utils_setAllowNetworkingForProcess(JNIEnv *env, jobject thiz,
-                                                           jboolean hasConnectivity) {
-    setAllowNetworkingForProcess(hasConnectivity == JNI_TRUE);
-}
-
 static jobject android_net_utils_getTcpRepairWindow(JNIEnv *env, jobject thiz, jobject javaFd) {
     if (javaFd == NULL) {
         jniThrowNullPointerException(env, NULL);
@@ -288,7 +282,6 @@
     { "resNetworkResult", "(Ljava/io/FileDescriptor;)Landroid/net/DnsResolver$DnsResponse;", (void*) android_net_utils_resNetworkResult },
     { "resNetworkCancel", "(Ljava/io/FileDescriptor;)V", (void*) android_net_utils_resNetworkCancel },
     { "getDnsNetwork", "()Landroid/net/Network;", (void*) android_net_utils_getDnsNetwork },
-    { "setAllowNetworkingForProcess", "(Z)V", (void *)android_net_utils_setAllowNetworkingForProcess },
 };
 // clang-format on
 
diff --git a/core/jni/android_os_Debug.cpp b/core/jni/android_os_Debug.cpp
index 5a859aa..28fc8ed 100644
--- a/core/jni/android_os_Debug.cpp
+++ b/core/jni/android_os_Debug.cpp
@@ -844,6 +844,17 @@
     return ionPss;
 }
 
+static jlong android_os_Debug_getGpuTotalUsageKb(JNIEnv* env, jobject clazz) {
+    jlong sizeKb = -1;
+    uint64_t size;
+
+    if (meminfo::ReadGpuTotalUsageKb(&size)) {
+        sizeKb = size;
+    }
+
+    return sizeKb;
+}
+
 static jboolean android_os_Debug_isVmapStack(JNIEnv *env, jobject clazz)
 {
     static enum {
@@ -912,6 +923,8 @@
             (void*)android_os_Debug_getIonPoolsSizeKb },
     { "getIonMappedSizeKb", "()J",
             (void*)android_os_Debug_getIonMappedSizeKb },
+    { "getGpuTotalUsageKb", "()J",
+            (void*)android_os_Debug_getGpuTotalUsageKb },
     { "isVmapStack", "()Z",
             (void*)android_os_Debug_isVmapStack },
 };
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index e6881b3..b2c69a0 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -39,10 +39,10 @@
 #include "androidfw/AssetManager2.h"
 #include "androidfw/AttributeResolution.h"
 #include "androidfw/MutexGuard.h"
-#include "androidfw/PosixUtils.h"
 #include "androidfw/ResourceTypes.h"
 #include "androidfw/ResourceUtils.h"
 
+#include "android_util_AssetManager_private.h"
 #include "core_jni_helpers.h"
 #include "jni.h"
 #include "nativehelper/JNIPlatformHelp.h"
@@ -58,7 +58,6 @@
 extern "C" int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
 
 using ::android::base::StringPrintf;
-using ::android::util::ExecuteBinary;
 
 namespace android {
 
@@ -114,101 +113,17 @@
   return cookie > 0 ? static_cast<ApkAssetsCookie>(cookie - 1) : kInvalidCookie;
 }
 
-static jobjectArray NativeCreateIdmapsForStaticOverlaysTargetingAndroid(JNIEnv* env,
-                                                                        jclass /*clazz*/) {
-  // --input-directory can be given multiple times, but idmap2 expects the directory to exist
-  std::vector<std::string> input_dirs;
-  struct stat st;
-  if (stat(AssetManager::VENDOR_OVERLAY_DIR, &st) == 0) {
-    input_dirs.push_back(AssetManager::VENDOR_OVERLAY_DIR);
-  }
-
-  if (stat(AssetManager::PRODUCT_OVERLAY_DIR, &st) == 0) {
-    input_dirs.push_back(AssetManager::PRODUCT_OVERLAY_DIR);
-  }
-
-  if (stat(AssetManager::SYSTEM_EXT_OVERLAY_DIR, &st) == 0) {
-    input_dirs.push_back(AssetManager::SYSTEM_EXT_OVERLAY_DIR);
-  }
-
-  if (stat(AssetManager::ODM_OVERLAY_DIR, &st) == 0) {
-    input_dirs.push_back(AssetManager::ODM_OVERLAY_DIR);
-  }
-
-  if (stat(AssetManager::OEM_OVERLAY_DIR, &st) == 0) {
-    input_dirs.push_back(AssetManager::OEM_OVERLAY_DIR);
-  }
-
-  if (input_dirs.empty()) {
-    LOG(WARNING) << "no directories for idmap2 to scan";
-    return env->NewObjectArray(0, g_stringClass, nullptr);
-  }
-
-  if (access("/system/bin/idmap2", X_OK) == -1) {
-    PLOG(WARNING) << "unable to execute idmap2";
-    return nullptr;
-  }
-
-  std::vector<std::string> argv{"/system/bin/idmap2",
-    "scan",
-    "--recursive",
-    "--target-package-name", "android",
-    "--target-apk-path", "/system/framework/framework-res.apk",
-    "--output-directory", "/data/resource-cache"};
-
-  for (const auto& dir : input_dirs) {
-    argv.push_back("--input-directory");
-    argv.push_back(dir);
-  }
-
-  const auto result = ExecuteBinary(argv);
-
-  if (!result) {
-      LOG(ERROR) << "failed to execute idmap2";
-      return nullptr;
-  }
-
-  if (result->status != 0) {
-    LOG(ERROR) << "idmap2: " << result->stderr;
-    return nullptr;
-  }
-
-  std::vector<std::string> idmap_paths;
-  std::istringstream input(result->stdout);
-  std::string path;
-  while (std::getline(input, path)) {
-    idmap_paths.push_back(path);
-  }
-
-  jobjectArray array = env->NewObjectArray(idmap_paths.size(), g_stringClass, nullptr);
-  if (array == nullptr) {
-    return nullptr;
-  }
-  for (size_t i = 0; i < idmap_paths.size(); i++) {
-    const std::string path = idmap_paths[i];
-    jstring java_string = env->NewStringUTF(path.c_str());
-    if (env->ExceptionCheck()) {
-      return nullptr;
-    }
-    env->SetObjectArrayElement(array, i, java_string);
-    env->DeleteLocalRef(java_string);
-  }
-  return array;
-}
-
-static jint CopyValue(JNIEnv* env, ApkAssetsCookie cookie, const Res_value& value, uint32_t ref,
-                      uint32_t type_spec_flags, ResTable_config* config, jobject out_typed_value) {
-  env->SetIntField(out_typed_value, gTypedValueOffsets.mType, value.dataType);
+static jint CopyValue(JNIEnv* env, const AssetManager2::SelectedValue& value,
+                      jobject out_typed_value) {
+  env->SetIntField(out_typed_value, gTypedValueOffsets.mType, value.type);
   env->SetIntField(out_typed_value, gTypedValueOffsets.mAssetCookie,
-                   ApkAssetsCookieToJavaCookie(cookie));
+                   ApkAssetsCookieToJavaCookie(value.cookie));
   env->SetIntField(out_typed_value, gTypedValueOffsets.mData, value.data);
   env->SetObjectField(out_typed_value, gTypedValueOffsets.mString, nullptr);
-  env->SetIntField(out_typed_value, gTypedValueOffsets.mResourceId, ref);
-  env->SetIntField(out_typed_value, gTypedValueOffsets.mChangingConfigurations, type_spec_flags);
-  if (config != nullptr) {
-    env->SetIntField(out_typed_value, gTypedValueOffsets.mDensity, config->density);
-  }
-  return static_cast<jint>(ApkAssetsCookieToJavaCookie(cookie));
+  env->SetIntField(out_typed_value, gTypedValueOffsets.mResourceId, value.resid);
+  env->SetIntField(out_typed_value, gTypedValueOffsets.mChangingConfigurations, value.flags);
+  env->SetIntField(out_typed_value, gTypedValueOffsets.mDensity, value.config.density);
+  return static_cast<jint>(ApkAssetsCookieToJavaCookie(value.cookie));
 }
 
 // ----------------------------------------------------------------------------
@@ -653,15 +568,15 @@
     return 0;
   }
 
-  // May be nullptr.
-  std::shared_ptr<const DynamicRefTable> dynamic_ref_table =
-      assetmanager->GetDynamicRefTableForCookie(cookie);
+  const incfs::map_ptr<void> buffer = asset->getIncFsBuffer(true /* aligned */);
+  const size_t length = asset->getLength();
+  if (!buffer.convert<uint8_t>().verify(length)) {
+    jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+    return 0;
+  }
 
-  std::unique_ptr<ResXMLTree> xml_tree = util::make_unique<ResXMLTree>(
-      std::move(dynamic_ref_table));
-  status_t err = xml_tree->setTo(asset->getBuffer(true), asset->getLength(), true);
-  asset.reset();
-
+  auto xml_tree = util::make_unique<ResXMLTree>(assetmanager->GetDynamicRefTableForCookie(cookie));
+  status_t err = xml_tree->setTo(buffer.unsafe_ptr(), length, true);
   if (err != NO_ERROR) {
     jniThrowException(env, "java/io/FileNotFoundException", "Corrupt XML binary file");
     return 0;
@@ -690,15 +605,15 @@
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
   ApkAssetsCookie cookie = JavaCookieToApkAssetsCookie(jcookie);
 
-  // May be nullptr.
-   std::shared_ptr<const DynamicRefTable> dynamic_ref_table =
-       assetmanager->GetDynamicRefTableForCookie(cookie);
+  const incfs::map_ptr<void> buffer = asset->getIncFsBuffer(true /* aligned */);
+  const size_t length = asset->getLength();
+  if (!buffer.convert<uint8_t>().verify(length)) {
+    jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+    return 0;
+  }
 
-  std::unique_ptr<ResXMLTree> xml_tree = util::make_unique<ResXMLTree>(
-      std::move(dynamic_ref_table));
-  status_t err = xml_tree->setTo(asset->getBuffer(true), asset->getLength(), true);
-  asset.reset();
-
+  auto xml_tree = util::make_unique<ResXMLTree>(assetmanager->GetDynamicRefTableForCookie(cookie));
+  status_t err = xml_tree->setTo(buffer.unsafe_ptr(), length, true);
   if (err != NO_ERROR) {
     jniThrowException(env, "java/io/FileNotFoundException", "Corrupt XML binary file");
     return 0;
@@ -710,67 +625,62 @@
                                    jshort density, jobject typed_value,
                                    jboolean resolve_references) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-  ApkAssetsCookie cookie =
-      assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/,
-                                static_cast<uint16_t>(density), &value, &selected_config, &flags);
-  if (cookie == kInvalidCookie) {
+  auto value = assetmanager->GetResource(static_cast<uint32_t>(resid), false /*may_be_bag*/,
+                                         static_cast<uint16_t>(density));
+  if (!value.has_value()) {
+    ThrowIfIOError(env, value);
     return ApkAssetsCookieToJavaCookie(kInvalidCookie);
   }
 
-  uint32_t ref = static_cast<uint32_t>(resid);
   if (resolve_references) {
-    cookie = assetmanager->ResolveReference(cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
+    auto result = assetmanager->ResolveReference(value.value());
+    if (!result.has_value()) {
+      ThrowIfIOError(env, result);
       return ApkAssetsCookieToJavaCookie(kInvalidCookie);
     }
   }
-  return CopyValue(env, cookie, value, ref, flags, &selected_config, typed_value);
+  return CopyValue(env, *value, typed_value);
 }
 
 static jint NativeGetResourceBagValue(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid,
                                       jint bag_entry_id, jobject typed_value) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag.has_value()) {
+    ThrowIfIOError(env, bag);
     return ApkAssetsCookieToJavaCookie(kInvalidCookie);
   }
 
-  uint32_t type_spec_flags = bag->type_spec_flags;
-  ApkAssetsCookie cookie = kInvalidCookie;
-  const Res_value* bag_value = nullptr;
-  for (const ResolvedBag::Entry& entry : bag) {
-    if (entry.key == static_cast<uint32_t>(bag_entry_id)) {
-      cookie = entry.cookie;
-      bag_value = &entry.value;
+  // The legacy would find the last entry with the target bag entry id
+  using reverse_bag_iterator = std::reverse_iterator<const ResolvedBag::Entry*>;
+  const auto rbegin = reverse_bag_iterator(end(*bag));
+  const auto rend = reverse_bag_iterator(begin(*bag));
+  auto entry = std::find_if(rbegin, rend, [bag_entry_id](auto&& e) {
+    return e.key == static_cast<uint32_t>(bag_entry_id);
+  });
 
-      // Keep searching (the old implementation did that).
-    }
-  }
-
-  if (cookie == kInvalidCookie) {
+  if (entry == rend) {
     return ApkAssetsCookieToJavaCookie(kInvalidCookie);
   }
 
-  Res_value value = *bag_value;
-  uint32_t ref = static_cast<uint32_t>(resid);
-  ResTable_config selected_config;
-  cookie = assetmanager->ResolveReference(cookie, &value, &selected_config, &type_spec_flags, &ref);
-  if (cookie == kInvalidCookie) {
+  AssetManager2::SelectedValue attr_value(*bag, *entry);
+  auto result = assetmanager->ResolveReference(attr_value);
+  if (!result.has_value()) {
+    ThrowIfIOError(env, result);
     return ApkAssetsCookieToJavaCookie(kInvalidCookie);
   }
-  return CopyValue(env, cookie, value, ref, type_spec_flags, nullptr, typed_value);
+  return CopyValue(env, attr_value, typed_value);
 }
 
 static jintArray NativeGetStyleAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag_result.has_value()) {
+    ThrowIfIOError(env, bag_result);
     return nullptr;
   }
 
+  const ResolvedBag* bag = *bag_result;
   jintArray array = env->NewIntArray(bag->entry_count);
   if (env->ExceptionCheck()) {
     return nullptr;
@@ -786,42 +696,47 @@
 static jobjectArray NativeGetResourceStringArray(JNIEnv* env, jclass /*clazz*/, jlong ptr,
                                                  jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag_result.has_value()) {
+    ThrowIfIOError(env, bag_result);
     return nullptr;
   }
 
+  const ResolvedBag* bag = *bag_result;
   jobjectArray array = env->NewObjectArray(bag->entry_count, g_stringClass, nullptr);
   if (array == nullptr) {
     return nullptr;
   }
 
   for (uint32_t i = 0; i < bag->entry_count; i++) {
-    const ResolvedBag::Entry& entry = bag->entries[i];
-
     // Resolve any references to their final value.
-    Res_value value = entry.value;
-    ResTable_config selected_config;
-    uint32_t flags;
-    uint32_t ref;
-    ApkAssetsCookie cookie =
-        assetmanager->ResolveReference(entry.cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
+    AssetManager2::SelectedValue attr_value(bag, bag->entries[i]);
+    auto result = assetmanager->ResolveReference(attr_value);
+    if (!result.has_value()) {
+      ThrowIfIOError(env, result);
       return nullptr;
     }
 
-    if (value.dataType == Res_value::TYPE_STRING) {
-      const ApkAssets* apk_assets = assetmanager->GetApkAssets()[cookie];
+    if (attr_value.type == Res_value::TYPE_STRING) {
+      const ApkAssets* apk_assets = assetmanager->GetApkAssets()[attr_value.cookie];
       const ResStringPool* pool = apk_assets->GetLoadedArsc()->GetStringPool();
 
       jstring java_string = nullptr;
-      size_t str_len;
-      const char* str_utf8 = pool->string8At(value.data, &str_len);
-      if (str_utf8 != nullptr) {
-        java_string = env->NewStringUTF(str_utf8);
+      auto str_utf8 = pool->string8At(attr_value.data);
+      if (UNLIKELY(ThrowIfIOError(env, str_utf8))) {
+        return nullptr;
+      }
+
+      if (str_utf8.has_value()) {
+        java_string = env->NewStringUTF(str_utf8->data());
       } else {
-        const char16_t* str_utf16 = pool->stringAt(value.data, &str_len);
-        java_string = env->NewString(reinterpret_cast<const jchar*>(str_utf16), str_len);
+        auto str_utf16 = pool->stringAt(attr_value.data);
+        if (!str_utf16.has_value()) {
+          ThrowIfIOError(env, str_utf16);
+          return nullptr;
+        }
+        java_string = env->NewString(reinterpret_cast<const jchar*>(str_utf16->data()),
+                                     str_utf16->size());
       }
 
       // Check for errors creating the strings (if malformed or no memory).
@@ -842,11 +757,13 @@
 static jintArray NativeGetResourceStringArrayInfo(JNIEnv* env, jclass /*clazz*/, jlong ptr,
                                                   jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag_result.has_value()) {
+    ThrowIfIOError(env, bag_result);
     return nullptr;
   }
 
+  const ResolvedBag* bag = *bag_result;
   jintArray array = env->NewIntArray(bag->entry_count * 2);
   if (array == nullptr) {
     return nullptr;
@@ -858,24 +775,20 @@
   }
 
   for (size_t i = 0; i < bag->entry_count; i++) {
-    const ResolvedBag::Entry& entry = bag->entries[i];
-    Res_value value = entry.value;
-    ResTable_config selected_config;
-    uint32_t flags;
-    uint32_t ref;
-    ApkAssetsCookie cookie =
-        assetmanager->ResolveReference(entry.cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
+    AssetManager2::SelectedValue attr_value(bag, bag->entries[i]);
+    auto result = assetmanager->ResolveReference(attr_value);
+    if (!result.has_value()) {
       env->ReleasePrimitiveArrayCritical(array, buffer, JNI_ABORT);
+      ThrowIfIOError(env, result);
       return nullptr;
     }
 
     jint string_index = -1;
-    if (value.dataType == Res_value::TYPE_STRING) {
-      string_index = static_cast<jint>(value.data);
+    if (attr_value.type == Res_value::TYPE_STRING) {
+      string_index = static_cast<jint>(attr_value.data);
     }
 
-    buffer[i * 2] = ApkAssetsCookieToJavaCookie(cookie);
+    buffer[i * 2] = ApkAssetsCookieToJavaCookie(attr_value.cookie);
     buffer[(i * 2) + 1] = string_index;
   }
   env->ReleasePrimitiveArrayCritical(array, buffer, 0);
@@ -884,11 +797,13 @@
 
 static jintArray NativeGetResourceIntArray(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag_result.has_value()) {
+    ThrowIfIOError(env, bag_result);
     return nullptr;
   }
 
+  const ResolvedBag* bag = *bag_result;
   jintArray array = env->NewIntArray(bag->entry_count);
   if (array == nullptr) {
     return nullptr;
@@ -900,40 +815,39 @@
   }
 
   for (size_t i = 0; i < bag->entry_count; i++) {
-    const ResolvedBag::Entry& entry = bag->entries[i];
-    Res_value value = entry.value;
-    ResTable_config selected_config;
-    uint32_t flags;
-    uint32_t ref;
-    ApkAssetsCookie cookie =
-        assetmanager->ResolveReference(entry.cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
-      env->ReleasePrimitiveArrayCritical(array, buffer, JNI_ABORT);
+    AssetManager2::SelectedValue attr_value(bag, bag->entries[i]);
+    auto result = assetmanager->ResolveReference(attr_value);
+    if (!result.has_value()) {
+      env->ReleasePrimitiveArrayCritical(array, buffer, 0);
+      ThrowIfIOError(env, result);
       return nullptr;
     }
 
-    if (value.dataType >= Res_value::TYPE_FIRST_INT && value.dataType <= Res_value::TYPE_LAST_INT) {
-      buffer[i] = static_cast<jint>(value.data);
+    if (attr_value.type >= Res_value::TYPE_FIRST_INT &&
+      attr_value.type <= Res_value::TYPE_LAST_INT) {
+      buffer[i] = static_cast<jint>(attr_value.data);
     }
   }
   env->ReleasePrimitiveArrayCritical(array, buffer, 0);
   return array;
 }
 
-static jint NativeGetResourceArraySize(JNIEnv* /*env*/, jclass /*clazz*/, jlong ptr, jint resid) {
-  ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
-    return -1;
-  }
-  return static_cast<jint>(bag->entry_count);
+static jint NativeGetResourceArraySize(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
+    ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
+    auto bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
+    if (!bag.has_value()) {
+      ThrowIfIOError(env, bag);
+      return -1;
+    }
+    return static_cast<jint>((*bag)->entry_count);
 }
 
 static jint NativeGetResourceArray(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid,
                                    jintArray out_data) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  const ResolvedBag* bag = assetmanager->GetBag(static_cast<uint32_t>(resid));
-  if (bag == nullptr) {
+  auto bag_result = assetmanager->GetBag(static_cast<uint32_t>(resid));
+  if (!bag_result.has_value()) {
+    ThrowIfIOError(env, bag_result);
     return -1;
   }
 
@@ -942,8 +856,10 @@
     return -1;
   }
 
+  const ResolvedBag* bag = *bag_result;
   if (static_cast<jsize>(bag->entry_count) > out_data_length * STYLE_NUM_ENTRIES) {
-    jniThrowException(env, "java/lang/IllegalArgumentException", "Input array is not large enough");
+    jniThrowException(env, "java/lang/IllegalArgumentException",
+                      "Input array is not large enough");
     return -1;
   }
 
@@ -954,31 +870,26 @@
 
   jint* cursor = buffer;
   for (size_t i = 0; i < bag->entry_count; i++) {
-    const ResolvedBag::Entry& entry = bag->entries[i];
-    Res_value value = entry.value;
-    ResTable_config selected_config;
-    selected_config.density = 0;
-    uint32_t flags = bag->type_spec_flags;
-    uint32_t ref = 0;
-    ApkAssetsCookie cookie =
-        assetmanager->ResolveReference(entry.cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
+    AssetManager2::SelectedValue attr_value(bag, bag->entries[i]);
+    auto result = assetmanager->ResolveReference(attr_value);
+    if (!result.has_value()) {
       env->ReleasePrimitiveArrayCritical(out_data, buffer, JNI_ABORT);
+      ThrowIfIOError(env, bag_result);
       return -1;
     }
 
     // Deal with the special @null value -- it turns back to TYPE_NULL.
-    if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
-      value.dataType = Res_value::TYPE_NULL;
-      value.data = Res_value::DATA_NULL_UNDEFINED;
+    if (attr_value.type == Res_value::TYPE_REFERENCE && attr_value.data == 0) {
+      attr_value.type = Res_value::TYPE_NULL;
+      attr_value.data = Res_value::DATA_NULL_UNDEFINED;
     }
 
-    cursor[STYLE_TYPE] = static_cast<jint>(value.dataType);
-    cursor[STYLE_DATA] = static_cast<jint>(value.data);
-    cursor[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(cookie);
-    cursor[STYLE_RESOURCE_ID] = static_cast<jint>(ref);
-    cursor[STYLE_CHANGING_CONFIGURATIONS] = static_cast<jint>(flags);
-    cursor[STYLE_DENSITY] = static_cast<jint>(selected_config.density);
+    cursor[STYLE_TYPE] = static_cast<jint>(attr_value.type);
+    cursor[STYLE_DATA] = static_cast<jint>(attr_value.data);
+    cursor[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(attr_value.cookie);
+    cursor[STYLE_RESOURCE_ID] = static_cast<jint>(attr_value.resid);
+    cursor[STYLE_CHANGING_CONFIGURATIONS] = static_cast<jint>(attr_value.flags);
+    cursor[STYLE_DENSITY] = static_cast<jint>(attr_value.config.density);
     cursor += STYLE_NUM_ENTRIES;
   }
   env->ReleasePrimitiveArrayCritical(out_data, buffer, 0);
@@ -1006,60 +917,71 @@
     CHECK(package_utf8.c_str() != nullptr);
     package = package_utf8.c_str();
   }
+
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  return static_cast<jint>(assetmanager->GetResourceId(name_utf8.c_str(), type, package));
+  auto resid = assetmanager->GetResourceId(name_utf8.c_str(), type, package);
+  if (!resid.has_value()) {
+    ThrowIfIOError(env, resid);
+    return 0;
+  }
+
+  return static_cast<jint>(*resid);
 }
 
 static jstring NativeGetResourceName(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  AssetManager2::ResourceName name;
-  if (!assetmanager->GetResourceName(static_cast<uint32_t>(resid), &name)) {
+  auto name = assetmanager->GetResourceName(static_cast<uint32_t>(resid));
+  if (!name.has_value()) {
+    ThrowIfIOError(env, name);
     return nullptr;
   }
 
-  std::string result = ToFormattedResourceString(&name);
+  const std::string result = ToFormattedResourceString(name.value());
   return env->NewStringUTF(result.c_str());
 }
 
 static jstring NativeGetResourcePackageName(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  AssetManager2::ResourceName name;
-  if (!assetmanager->GetResourceName(static_cast<uint32_t>(resid), &name)) {
+  auto name = assetmanager->GetResourceName(static_cast<uint32_t>(resid));
+  if (!name.has_value()) {
+    ThrowIfIOError(env, name);
     return nullptr;
   }
 
-  if (name.package != nullptr) {
-    return env->NewStringUTF(name.package);
+  if (name->package != nullptr) {
+    return env->NewStringUTF(name->package);
   }
   return nullptr;
 }
 
 static jstring NativeGetResourceTypeName(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  AssetManager2::ResourceName name;
-  if (!assetmanager->GetResourceName(static_cast<uint32_t>(resid), &name)) {
+  auto name = assetmanager->GetResourceName(static_cast<uint32_t>(resid));
+  if (!name.has_value()) {
+    ThrowIfIOError(env, name);
     return nullptr;
   }
 
-  if (name.type != nullptr) {
-    return env->NewStringUTF(name.type);
-  } else if (name.type16 != nullptr) {
-    return env->NewString(reinterpret_cast<const jchar*>(name.type16), name.type_len);
+  if (name->type != nullptr) {
+    return env->NewStringUTF(name->type);
+  } else if (name->type16 != nullptr) {
+    return env->NewString(reinterpret_cast<const jchar*>(name->type16), name->type_len);
   }
   return nullptr;
 }
 
 static jstring NativeGetResourceEntryName(JNIEnv* env, jclass /*clazz*/, jlong ptr, jint resid) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  AssetManager2::ResourceName name;
-  if (!assetmanager->GetResourceName(static_cast<uint32_t>(resid), &name)) {
+  auto name = assetmanager->GetResourceName(static_cast<uint32_t>(resid));
+  if (!name.has_value()) {
+    ThrowIfIOError(env, name);
     return nullptr;
   }
 
-  if (name.entry != nullptr) {
-    return env->NewStringUTF(name.entry);
-  } else if (name.entry16 != nullptr) {
-    return env->NewString(reinterpret_cast<const jchar*>(name.entry16), name.entry_len);
+  if (name->entry != nullptr) {
+    return env->NewStringUTF(name->entry);
+  } else if (name->entry16 != nullptr) {
+    return env->NewString(reinterpret_cast<const jchar*>(name->entry16), name->entry_len);
   }
   return nullptr;
 }
@@ -1123,17 +1045,21 @@
 
 static jobjectArray NativeGetSizeConfigurations(JNIEnv* env, jclass /*clazz*/, jlong ptr) {
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
-  std::set<ResTable_config> configurations =
-      assetmanager->GetResourceConfigurations(true /*exclude_system*/, false /*exclude_mipmap*/);
+  auto configurations = assetmanager->GetResourceConfigurations(true /*exclude_system*/,
+                                                                false /*exclude_mipmap*/);
+  if (!configurations.has_value()) {
+    ThrowIfIOError(env, configurations);
+    return nullptr;
+  }
 
   jobjectArray array =
-      env->NewObjectArray(configurations.size(), gConfigurationOffsets.classObject, nullptr);
+      env->NewObjectArray(configurations->size(), gConfigurationOffsets.classObject, nullptr);
   if (array == nullptr) {
     return nullptr;
   }
 
   size_t idx = 0;
-  for (const ResTable_config& configuration : configurations) {
+  for (const ResTable_config& configuration : *configurations) {
     jobject java_configuration = ConstructConfigurationObject(env, configuration);
     if (java_configuration == nullptr) {
       return nullptr;
@@ -1156,13 +1082,10 @@
   (void) assetmanager;
 
   // Load default style from attribute, if specified...
-  uint32_t def_style_flags = 0u;
   if (def_style_attr != 0) {
-    Res_value value;
-    if (theme->GetAttribute(def_style_attr, &value, &def_style_flags) != kInvalidCookie) {
-      if (value.dataType == Res_value::TYPE_REFERENCE) {
-        def_style_resid = value.data;
-      }
+    auto value = theme->GetAttribute(def_style_attr);
+    if (value.has_value() && value->type == Res_value::TYPE_REFERENCE) {
+      def_style_resid = value->data;
     }
   }
 
@@ -1203,10 +1126,11 @@
     return;
   }
 
-  ApplyStyle(theme, xml_parser, static_cast<uint32_t>(def_style_attr),
-             static_cast<uint32_t>(def_style_resid), reinterpret_cast<uint32_t*>(attrs), attrs_len,
-             out_values, out_indices);
+  auto result = ApplyStyle(theme, xml_parser, static_cast<uint32_t>(def_style_attr),
+                           static_cast<uint32_t>(def_style_resid),
+                           reinterpret_cast<uint32_t*>(attrs), attrs_len, out_values, out_indices);
   env->ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT);
+  ThrowIfIOError(env, result);
 }
 
 static jboolean NativeResolveAttrs(JNIEnv* env, jclass /*clazz*/, jlong ptr, jlong theme_ptr,
@@ -1267,11 +1191,12 @@
   Theme* theme = reinterpret_cast<Theme*>(theme_ptr);
   CHECK(theme->GetAssetManager() == &(*assetmanager));
   (void) assetmanager;
-
-  bool result = ResolveAttrs(
-      theme, static_cast<uint32_t>(def_style_attr), static_cast<uint32_t>(def_style_resid),
-      reinterpret_cast<uint32_t*>(values), values_len, reinterpret_cast<uint32_t*>(attrs),
-      attrs_len, reinterpret_cast<uint32_t*>(out_values), reinterpret_cast<uint32_t*>(out_indices));
+  auto result =
+          ResolveAttrs(theme, static_cast<uint32_t>(def_style_attr),
+                       static_cast<uint32_t>(def_style_resid), reinterpret_cast<uint32_t*>(values),
+                       values_len, reinterpret_cast<uint32_t*>(attrs), attrs_len,
+                       reinterpret_cast<uint32_t*>(out_values),
+                       reinterpret_cast<uint32_t*>(out_indices));
   if (out_indices != nullptr) {
     env->ReleasePrimitiveArrayCritical(out_java_indices, out_indices, 0);
   }
@@ -1280,8 +1205,13 @@
   if (values != nullptr) {
     env->ReleasePrimitiveArrayCritical(java_values, values, JNI_ABORT);
   }
+
   env->ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT);
-  return result ? JNI_TRUE : JNI_FALSE;
+  if (!result.has_value()) {
+    ThrowIfIOError(env, result);
+    return JNI_FALSE;
+  }
+  return JNI_TRUE;
 }
 
 static jboolean NativeRetrieveAttributes(JNIEnv* env, jclass /*clazz*/, jlong ptr,
@@ -1322,18 +1252,22 @@
 
   ScopedLock<AssetManager2> assetmanager(AssetManagerFromLong(ptr));
   ResXMLParser* xml_parser = reinterpret_cast<ResXMLParser*>(xml_parser_ptr);
-
-  bool result = RetrieveAttributes(assetmanager.get(), xml_parser,
-                                   reinterpret_cast<uint32_t*>(attrs), attrs_len,
-                                   reinterpret_cast<uint32_t*>(out_values),
-                                   reinterpret_cast<uint32_t*>(out_indices));
+  auto result =
+          RetrieveAttributes(assetmanager.get(), xml_parser, reinterpret_cast<uint32_t*>(attrs),
+                             attrs_len, reinterpret_cast<uint32_t*>(out_values),
+                             reinterpret_cast<uint32_t*>(out_indices));
 
   if (out_indices != nullptr) {
     env->ReleasePrimitiveArrayCritical(out_java_indices, out_indices, 0);
   }
+
   env->ReleasePrimitiveArrayCritical(out_java_values, out_values, 0);
   env->ReleasePrimitiveArrayCritical(java_attrs, attrs, JNI_ABORT);
-  return result ? JNI_TRUE : JNI_FALSE;
+  if (!result.has_value()) {
+    ThrowIfIOError(env, result);
+    return JNI_FALSE;
+  }
+  return JNI_TRUE;
 }
 
 static jlong NativeThemeCreate(JNIEnv* /*env*/, jclass /*clazz*/, jlong ptr) {
@@ -1352,7 +1286,9 @@
   Theme* theme = reinterpret_cast<Theme*>(theme_ptr);
   CHECK(theme->GetAssetManager() == &(*assetmanager));
   (void) assetmanager;
-  theme->ApplyStyle(static_cast<uint32_t>(resid), force);
+
+  auto result = theme->ApplyStyle(static_cast<uint32_t>(resid), force);
+  ThrowIfIOError(env, result);
 
   // TODO(adamlesinski): Consider surfacing exception when result is failure.
   // CTS currently expects no exceptions from this method.
@@ -1365,19 +1301,22 @@
   Theme* dst_theme = reinterpret_cast<Theme*>(dst_theme_ptr);
   Theme* src_theme = reinterpret_cast<Theme*>(src_theme_ptr);
 
+  ScopedLock<AssetManager2> src_assetmanager(AssetManagerFromLong(src_asset_manager_ptr));
+  CHECK(src_theme->GetAssetManager() == &(*src_assetmanager));
+  (void) src_assetmanager;
+
   if (dst_asset_manager_ptr != src_asset_manager_ptr) {
     ScopedLock<AssetManager2> dst_assetmanager(AssetManagerFromLong(dst_asset_manager_ptr));
     CHECK(dst_theme->GetAssetManager() == &(*dst_assetmanager));
     (void) dst_assetmanager;
 
-    ScopedLock <AssetManager2> src_assetmanager(AssetManagerFromLong(src_asset_manager_ptr));
-    CHECK(src_theme->GetAssetManager() == &(*src_assetmanager));
-    (void) src_assetmanager;
-
-    dst_theme->SetTo(*src_theme);
-  } else {
-    dst_theme->SetTo(*src_theme);
+    auto result = dst_theme->SetTo(*src_theme);
+    ThrowIfIOError(env, result);
+    return;
   }
+
+  auto result = dst_theme->SetTo(*src_theme);
+  ThrowIfIOError(env, result);
 }
 
 static void NativeThemeClear(JNIEnv* /*env*/, jclass /*clazz*/, jlong theme_ptr) {
@@ -1392,23 +1331,21 @@
   CHECK(theme->GetAssetManager() == &(*assetmanager));
   (void) assetmanager;
 
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie = theme->GetAttribute(static_cast<uint32_t>(resid), &value, &flags);
-  if (cookie == kInvalidCookie) {
+  auto value = theme->GetAttribute(static_cast<uint32_t>(resid));
+  if (!value.has_value()) {
     return ApkAssetsCookieToJavaCookie(kInvalidCookie);
   }
 
-  uint32_t ref = 0u;
-  if (resolve_references) {
-    ResTable_config selected_config;
-    cookie =
-        theme->GetAssetManager()->ResolveReference(cookie, &value, &selected_config, &flags, &ref);
-    if (cookie == kInvalidCookie) {
-      return ApkAssetsCookieToJavaCookie(kInvalidCookie);
-    }
+  if (!resolve_references) {
+    return CopyValue(env, *value, typed_value);
   }
-  return CopyValue(env, cookie, value, ref, flags, nullptr, typed_value);
+
+  auto result = theme->GetAssetManager()->ResolveReference(*value);
+  if (!result.has_value()) {
+    ThrowIfIOError(env, result);
+    return ApkAssetsCookieToJavaCookie(kInvalidCookie);
+  }
+  return CopyValue(env, *value, typed_value);
 }
 
 static void NativeThemeDump(JNIEnv* /*env*/, jclass /*clazz*/, jlong ptr, jlong theme_ptr,
@@ -1563,8 +1500,6 @@
     {"nativeAssetGetRemainingLength", "(J)J", (void*)NativeAssetGetRemainingLength},
 
     // System/idmap related methods.
-    {"nativeCreateIdmapsForStaticOverlaysTargetingAndroid", "()[Ljava/lang/String;",
-     (void*)NativeCreateIdmapsForStaticOverlaysTargetingAndroid},
     {"nativeGetOverlayableMap", "(JLjava/lang/String;)Ljava/util/Map;",
      (void*)NativeGetOverlayableMap},
     {"nativeGetOverlayablesToString", "(JLjava/lang/String;)Ljava/lang/String;",
diff --git a/core/jni/android_util_AssetManager_private.h b/core/jni/android_util_AssetManager_private.h
new file mode 100644
index 0000000..153509b9
--- /dev/null
+++ b/core/jni/android_util_AssetManager_private.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_UTIL_ASSETMANAGER_PRIVATE_H
+#define ANDROID_UTIL_ASSETMANAGER_PRIVATE_H
+
+#include <optional>
+
+#include <androidfw/Errors.h>
+#include <android-base/expected.h>
+
+#include "core_jni_helpers.h"
+#include "jni.h"
+#include "nativehelper/JNIHelp.h"
+
+namespace android {
+
+constexpr const char* kResourcesNotFound = "android/content/res/Resources$NotFoundException";
+constexpr const static char* kIOErrorMessage = "failed to read resources.arsc data";
+
+template <typename T, typename E>
+static bool ThrowIfIOError(JNIEnv* env, const base::expected<T, E>& result) {
+  if constexpr (std::is_same<NullOrIOError, E>::value) {
+    if (IsIOError(result)) {
+      jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+      return true;
+    }
+     return false;
+  } else {
+    if (!result.has_value()) {
+      static_assert(std::is_same<IOError, E>::value, "Unknown result error type");
+      jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+      return true;
+    }
+    return false;
+  }
+}
+
+} // namespace android
+
+#endif //ANDROID_UTIL_ASSETMANAGER_PRIVATE_H
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/jni/android_util_StringBlock.cpp b/core/jni/android_util_StringBlock.cpp
index 760f9e3..45f6b72 100644
--- a/core/jni/android_util_StringBlock.cpp
+++ b/core/jni/android_util_StringBlock.cpp
@@ -17,6 +17,7 @@
 
 #define LOG_TAG "StringBlock"
 
+#include "android_util_AssetManager_private.h"
 #include "jni.h"
 #include <nativehelper/JNIHelp.h>
 #include <utils/misc.h>
@@ -31,10 +32,8 @@
 
 // ----------------------------------------------------------------------------
 
-static jlong android_content_StringBlock_nativeCreate(JNIEnv* env, jobject clazz,
-                                                  jbyteArray bArray,
-                                                  jint off, jint len)
-{
+static jlong android_content_StringBlock_nativeCreate(JNIEnv* env, jobject clazz, jbyteArray bArray,
+                                                      jint off, jint len) {
     if (bArray == NULL) {
         jniThrowNullPointerException(env, NULL);
         return 0;
@@ -59,9 +58,7 @@
     return reinterpret_cast<jlong>(osb);
 }
 
-static jint android_content_StringBlock_nativeGetSize(JNIEnv* env, jobject clazz,
-                                                   jlong token)
-{
+static jint android_content_StringBlock_nativeGetSize(JNIEnv* env, jobject clazz, jlong token) {
     ResStringPool* osb = reinterpret_cast<ResStringPool*>(token);
     if (osb == NULL) {
         jniThrowNullPointerException(env, NULL);
@@ -71,76 +68,84 @@
     return osb->size();
 }
 
-static jstring android_content_StringBlock_nativeGetString(JNIEnv* env, jobject clazz,
-                                                        jlong token, jint idx)
-{
+static jstring android_content_StringBlock_nativeGetString(JNIEnv* env, jobject clazz, jlong token,
+                                                           jint idx) {
     ResStringPool* osb = reinterpret_cast<ResStringPool*>(token);
     if (osb == NULL) {
         jniThrowNullPointerException(env, NULL);
         return 0;
     }
 
-    size_t len;
-    const char* str8 = osb->string8At(idx, &len);
-    if (str8 != NULL) {
-        return env->NewStringUTF(str8);
+    auto str8 = osb->string8At(idx);
+    if (UNLIKELY(ThrowIfIOError(env, str8))) {
+        return 0;
+    } else if (str8.has_value()) {
+        return env->NewStringUTF(str8->data());
     }
 
-    const char16_t* str = osb->stringAt(idx, &len);
-    if (str == NULL) {
+    auto str = osb->stringAt(idx);
+    if (UNLIKELY(ThrowIfIOError(env, str))) {
+        return 0;
+    } else if (UNLIKELY(!str.has_value())) {
         jniThrowException(env, "java/lang/IndexOutOfBoundsException", NULL);
         return 0;
     }
 
-    return env->NewString((const jchar*)str, len);
+    return env->NewString((const jchar*)str->data(), str->size());
 }
 
-static jintArray android_content_StringBlock_nativeGetStyle(JNIEnv* env, jobject clazz,
-                                                         jlong token, jint idx)
-{
+static jintArray android_content_StringBlock_nativeGetStyle(JNIEnv* env, jobject clazz, jlong token,
+                                                            jint idx) {
     ResStringPool* osb = reinterpret_cast<ResStringPool*>(token);
     if (osb == NULL) {
         jniThrowNullPointerException(env, NULL);
         return NULL;
     }
 
-    const ResStringPool_span* spans = osb->styleAt(idx);
-    if (spans == NULL) {
+    auto spans = osb->styleAt(idx);
+    if (!spans.has_value()) {
+        ThrowIfIOError(env, spans);
         return NULL;
     }
 
-    const ResStringPool_span* pos = spans;
-    int num = 0;
-    while (pos->name.index != ResStringPool_span::END) {
-        num++;
-        pos++;
-    }
+    jintArray array;
+    {
+        int num = 0;
+        auto pos = *spans;
+        while (true) {
+            if (UNLIKELY(!pos)) {
+                jniThrowException(env, kResourcesNotFound, kIOErrorMessage);
+                return NULL;
+            }
+            if (pos->name.index == ResStringPool_span::END) {
+                break;
+            }
+            num++;
+            pos++;
+        }
 
-    if (num == 0) {
-        return NULL;
-    }
+        if (num == 0) {
+            return NULL;
+        }
 
-    jintArray array = env->NewIntArray((num*sizeof(ResStringPool_span))/sizeof(jint));
-    if (array == NULL) { // NewIntArray already threw OutOfMemoryError.
-        return NULL;
+        array = env->NewIntArray((num * sizeof(ResStringPool_span)) / sizeof(jint));
+        if (array == NULL) { // NewIntArray already threw OutOfMemoryError.
+            return NULL;
+        }
     }
-
-    num = 0;
-    static const int numInts = sizeof(ResStringPool_span)/sizeof(jint);
-    while (spans->name.index != ResStringPool_span::END) {
-        env->SetIntArrayRegion(array,
-                                  num*numInts, numInts,
-                                  (jint*)spans);
-        spans++;
-        num++;
+    {
+        int num = 0;
+        static const int numInts = sizeof(ResStringPool_span) / sizeof(jint);
+        while ((*spans)->name.index != ResStringPool_span::END) {
+            env->SetIntArrayRegion(array, num * numInts, numInts, (jint*)spans->unsafe_ptr());
+            (*spans)++;
+            num++;
+        }
     }
-
     return array;
 }
 
-static void android_content_StringBlock_nativeDestroy(JNIEnv* env, jobject clazz,
-                                                   jlong token)
-{
+static void android_content_StringBlock_nativeDestroy(JNIEnv* env, jobject clazz, jlong token) {
     ResStringPool* osb = reinterpret_cast<ResStringPool*>(token);
     if (osb == NULL) {
         jniThrowNullPointerException(env, NULL);
diff --git a/core/jni/com_android_internal_net_NetworkUtilsInternal.cpp b/core/jni/com_android_internal_net_NetworkUtilsInternal.cpp
new file mode 100644
index 0000000..10fc18d
--- /dev/null
+++ b/core/jni/com_android_internal_net_NetworkUtilsInternal.cpp
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+#include "NetdClient.h"
+#include "core_jni_helpers.h"
+#include "jni.h"
+
+namespace android {
+static void android_net_utils_setAllowNetworkingForProcess(JNIEnv *env, jobject thiz,
+                                                           jboolean hasConnectivity) {
+    setAllowNetworkingForProcess(hasConnectivity == JNI_TRUE);
+}
+
+static const JNINativeMethod gNetworkUtilMethods[] = {
+        {"setAllowNetworkingForProcess", "(Z)V",
+         (void *)android_net_utils_setAllowNetworkingForProcess},
+};
+
+int register_com_android_internal_net_NetworkUtilsInternal(JNIEnv *env) {
+    return RegisterMethodsOrDie(env, "com/android/internal/net/NetworkUtilsInternal",
+                                gNetworkUtilMethods, NELEM(gNetworkUtilMethods));
+}
+
+} // namespace android
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/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e6619f5..a9fe5d5 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"
@@ -1769,6 +1769,16 @@
     <permission android:name="android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE"
         android:protectionLevel="signature|privileged" />
 
+    <!-- @SystemApi @hide Allows system APK to update Wifi coex channels to avoid.
+         <p>Not for use by third-party applications. -->
+    <permission android:name="android.permission.WIFI_UPDATE_COEX_UNSAFE_CHANNELS"
+                android:protectionLevel="signature" />
+
+    <!-- @SystemApi @hide Allows applications to access Wifi coex channels being avoided.
+         <p>Not for use by third-party applications. -->
+    <permission android:name="android.permission.WIFI_ACCESS_COEX_UNSAFE_CHANNELS"
+                android:protectionLevel="signature|privileged" />
+
     <!-- ======================================= -->
     <!-- Permissions for short range, peripheral networks -->
     <!-- ======================================= -->
@@ -2323,6 +2333,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 -->
     <!-- ================================== -->
@@ -5067,6 +5085,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..02cf0b7
--- /dev/null
+++ b/core/res/OWNERS
@@ -0,0 +1,18 @@
+adamp@google.com
+alanv@google.com
+dsandler@android.com
+dsandler@google.com
+hackbod@android.com
+hackbod@google.com
+jsharkey@android.com
+jsharkey@google.com
+juliacr@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 d8d3831..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>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index b75891b..d41868e 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -20,12 +20,12 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="byteShort" msgid="202579285008794431">"B"</string>
+    <string name="byteShort" msgid="202579285008794431">"ባ"</string>
     <string name="kilobyteShort" msgid="2214285521564195803">"ኪባ"</string>
-    <string name="megabyteShort" msgid="6649361267635823443">"MB"</string>
-    <string name="gigabyteShort" msgid="7515809460261287991">"GB"</string>
-    <string name="terabyteShort" msgid="1822367128583886496">"TB"</string>
-    <string name="petabyteShort" msgid="5651571254228534832">"PB"</string>
+    <string name="megabyteShort" msgid="6649361267635823443">"ሜባ"</string>
+    <string name="gigabyteShort" msgid="7515809460261287991">"ጊባ"</string>
+    <string name="terabyteShort" msgid="1822367128583886496">"ቴባ"</string>
+    <string name="petabyteShort" msgid="5651571254228534832">"ፔባ"</string>
     <string name="fileSizeSuffix" msgid="4233671691980131257">"<xliff:g id="NUMBER">%1$s</xliff:g> <xliff:g id="UNIT">%2$s</xliff:g>"</string>
     <string name="untitled" msgid="3381766946944136678">"&lt;ርዕስ አልባ&gt;"</string>
     <string name="emptyPhoneNumber" msgid="5812172618020360048">"(ምንም ስልክ ቁጥር የለም)"</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>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 6187df9..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>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index 1ecda85..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>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index cfae367..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>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index 57e0635..daec63a 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -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>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index f10606c..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>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index fce5680..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>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index a737ced..c1c4099 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/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>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index c986718..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>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 40ce89c..f85fe5a 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -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>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index ba9e060..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>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 1382850..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>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 0f00b56..627a3ab 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -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>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 4fd5d4c..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>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 1586cf7..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>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index c8fb137..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>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 76843db..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>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 2ef1b19..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>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index b71fcb4..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>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 32d6c24..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>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 3ca71e6..13f1b56 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -823,13 +823,13 @@
     <string name="keyguard_password_enter_pin_password_code" msgid="7792964196473964340">"Introduce el código PIN para desbloquear."</string>
     <string name="keyguard_password_wrong_pin_code" msgid="8583732939138432793">"Código PIN incorrecto"</string>
     <string name="keyguard_label_text" msgid="3841953694564168384">"Para desbloquear el teléfono, pulsa la tecla de menú y, a continuación, pulsa 0."</string>
-    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"Llamada de emergencia"</string>
+    <string name="emergency_call_dialog_number_for_display" msgid="2978165477085612673">"Número de emergencia"</string>
     <string name="lockscreen_carrier_default" msgid="6192313772955399160">"Sin servicio"</string>
     <string name="lockscreen_screen_locked" msgid="7364905540516041817">"Pantalla bloqueada"</string>
     <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>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 3b8ae1d..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>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index e79052b..5e52506 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -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>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 656de35..03a1456 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/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>
@@ -1878,7 +1878,7 @@
     <string name="language_selection_title" msgid="52674936078683285">"افزودن زبان"</string>
     <string name="country_selection_title" msgid="5221495687299014379">"اولویت‌های منطقه"</string>
     <string name="search_language_hint" msgid="7004225294308793583">"نام زبان را تایپ کنید"</string>
-    <string name="language_picker_section_suggested" msgid="6556199184638990447">"پیشنهادشده"</string>
+    <string name="language_picker_section_suggested" msgid="6556199184638990447">"پیشنهادی"</string>
     <string name="language_picker_section_all" msgid="1985809075777564284">"همه زبان‌ها"</string>
     <string name="region_picker_section_all" msgid="756441309928774155">"همه منطقه‌ها"</string>
     <string name="locale_search_menu" msgid="6258090710176422934">"جستجو"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 4061662..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>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 9035291..29fe136 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -52,7 +52,6 @@
     <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>
@@ -180,7 +179,6 @@
     <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>
@@ -253,7 +251,6 @@
     <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>
@@ -832,7 +829,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>
@@ -997,7 +994,6 @@
     <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>
@@ -1020,82 +1016,66 @@
     <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>
@@ -1466,7 +1446,6 @@
     <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>
@@ -1603,7 +1582,6 @@
     <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>
@@ -1790,7 +1768,6 @@
     <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>
@@ -1822,42 +1799,34 @@
     <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>
@@ -1898,7 +1867,6 @@
     <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>
@@ -1966,7 +1934,6 @@
     <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>
@@ -2060,7 +2027,6 @@
     <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 8b1b85d..a5b1626 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -52,7 +52,6 @@
     <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>
@@ -180,7 +179,6 @@
     <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>
@@ -253,7 +251,6 @@
     <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>
@@ -832,7 +829,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>
@@ -997,7 +994,6 @@
     <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>
@@ -1020,82 +1016,66 @@
     <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>
@@ -1466,7 +1446,6 @@
     <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>
@@ -1603,7 +1582,6 @@
     <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>
@@ -1790,7 +1768,6 @@
     <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>
@@ -1822,42 +1799,34 @@
     <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>
@@ -1898,7 +1867,6 @@
     <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>
@@ -1966,7 +1934,6 @@
     <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>
@@ -2060,7 +2027,6 @@
     <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 b0fe949..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>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 83f5040..55e462c 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/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>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 63c3a4c8..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>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 4a4b6a7..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>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 711b413..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>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index c88af99..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>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 4aed7224..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>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index a6094c5..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>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 1d8b3f2..054344e 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>
@@ -1441,7 +1441,7 @@
     <string name="car_mode_disable_notification_message" msgid="8954550232288567515">"Tocca per uscire dall\'app di guida."</string>
     <string name="back_button_label" msgid="4078224038025043387">"Indietro"</string>
     <string name="next_button_label" msgid="6040209156399907780">"Avanti"</string>
-    <string name="skip_button_label" msgid="3566599811326688389">"Ignora"</string>
+    <string name="skip_button_label" msgid="3566599811326688389">"Salta"</string>
     <string name="no_matches" msgid="6472699895759164599">"Nessuna corrispondenza"</string>
     <string name="find_on_page" msgid="5400537367077438198">"Trova nella pagina"</string>
     <plurals name="matches_found" formatted="false" msgid="1101758718194295554">
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 3ec4e74..00e3d60 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>
@@ -853,7 +853,7 @@
     <string name="lockscreen_transport_prev_description" msgid="2879469521751181478">"הרצועה הקודמת"</string>
     <string name="lockscreen_transport_next_description" msgid="2931509904881099919">"הרצועה הבאה"</string>
     <string name="lockscreen_transport_pause_description" msgid="6705284702135372494">"השהה"</string>
-    <string name="lockscreen_transport_play_description" msgid="106868788691652733">"הפעל"</string>
+    <string name="lockscreen_transport_play_description" msgid="106868788691652733">"הפעלה"</string>
     <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>
@@ -1842,7 +1842,7 @@
     <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>
+    <string name="data_saver_enable_button" msgid="4399405762586419726">"הפעלה"</string>
     <plurals name="zen_mode_duration_minutes_summary" formatted="false" msgid="2877101784123058273">
       <item quantity="two">‏למשך %d דקות (עד <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
       <item quantity="many">‏למשך %1$d דקות (עד <xliff:g id="FORMATTEDTIME_1">%2$s</xliff:g>)</item>
@@ -1952,7 +1952,7 @@
     <string name="app_suspended_unsuspend_message" msgid="1665438589450555459">"ביטול ההשהיה של האפליקציה"</string>
     <string name="work_mode_off_title" msgid="5503291976647976560">"להפעיל את פרופיל העבודה?"</string>
     <string name="work_mode_off_message" msgid="8417484421098563803">"אפליקציות העבודה, התראות, נתונים ותכונות נוספות של פרופיל העבודה יופעלו"</string>
-    <string name="work_mode_turn_on" msgid="3662561662475962285">"הפעל"</string>
+    <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>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 29ac44d..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>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 96debba..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>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 8b06cd4..04020fb 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/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>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 2980a5b..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>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 484276b7..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>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 5551835..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>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 69efba6..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>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index 242d819..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>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index f034390..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>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 65f741f..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>
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 287ce50..d61a278 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/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>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 4a99d80..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>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 35eccd1..657f680 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/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>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 521861d..a1c4b63 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/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>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index d578090..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>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index e911623..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>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index 5e7e66f..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>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index ce2cf69..e2cf7f9 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/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>
@@ -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-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 9c4acb1..594ea61 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>
@@ -954,7 +954,7 @@
     <string name="permdesc_readHistoryBookmarks" msgid="2323799501008967852">"Hiermee kan de app de geschiedenis lezen van alle URL\'s die in de systeemeigen browser zijn bezocht, en alle bookmarks in de systeemeigen browser. Let op: deze rechten kunnen niet worden geforceerd door andere browsers of andere apps met internetmogelijkheden."</string>
     <string name="permlab_writeHistoryBookmarks" msgid="6090259925187986937">"webbookmarks en -geschiedenis schrijven"</string>
     <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="573341025292489065">"Hiermee kan de app de webgeschiedenis wijzigen in de systeemeigen browser en de bookmarks die zijn opgeslagen op je tablet. Deze rechten kunnen niet worden geforceerd door andere browsers of andere apps met internetmogelijkheden."</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"Hiermee kan de app de browsergeschiedenis of opgeslagen bookmarks bewerken op je Android TV-apparaat. Hierdoor kan de app mogelijk browsergegevens wissen of aanpassen. Opmerking: Dit recht kan niet worden afgedwongen door andere browsers of andere apps met internetmogelijkheden."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tv" msgid="88642768580408561">"Hiermee kan de app de browsergeschiedenis of opgeslagen bookmarks bewerken op je Android TV-apparaat. Hierdoor kan de app mogelijk browsegegevens wissen of aanpassen. Opmerking: Dit recht kan niet worden afgedwongen door andere browsers of andere apps met internetmogelijkheden."</string>
     <string name="permdesc_writeHistoryBookmarks" product="default" msgid="2245203087160913652">"Hiermee kan de app de webgeschiedenis wijzigen in de systeemeigen browser en de bookmarks die zijn opgeslagen op je telefoon. Deze rechten kunnen niet worden geforceerd door andere browsers of andere apps met internetmogelijkheden."</string>
     <string name="permlab_setAlarm" msgid="1158001610254173567">"een wekker instellen"</string>
     <string name="permdesc_setAlarm" msgid="2185033720060109640">"Hiermee kan de app een wekker instellen in een geïnstalleerde wekker-app. Deze functie wordt door sommige wekker-apps niet geïmplementeerd."</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 4baab0e..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>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index cab0a64..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>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 7feead5..c206b12 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -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>
@@ -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="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="battery_saver_description_with_learn_more" msgid="4424488535318105801">"Aby wydłużyć czas pracy na baterii, funkcja Oszczędzanie baterii:\n\n• włącza ciemny motyw,\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 ciemny motyw,\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>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index ebe3f41..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>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index f4fa1d0..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>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index ebe3f41..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>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 4a3bd43..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>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index d106e79..f7f80f2 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/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>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index 760a413..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>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 68d40a5..624d554 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -162,7 +162,7 @@
     <string name="httpErrorAuth" msgid="469553140922938968">"Nepodarilo sa overiť totožnosť."</string>
     <string name="httpErrorProxyAuth" msgid="7229662162030113406">"Overenie pomocou servera proxy bolo neúspešné."</string>
     <string name="httpErrorConnect" msgid="3295081579893205617">"K serveru sa nepodarilo pripojiť."</string>
-    <string name="httpErrorIO" msgid="3860318696166314490">"Nepodarilo sa nadviazať komunikáciu so serverom. Skúste to znova neskôr."</string>
+    <string name="httpErrorIO" msgid="3860318696166314490">"Nepodarilo sa nadviazať komunikáciu so serverom. Skúste to neskôr."</string>
     <string name="httpErrorTimeout" msgid="7446272815190334204">"Časový limit pripojenia na server vypršal."</string>
     <string name="httpErrorRedirectLoop" msgid="8455757777509512098">"Stránka obsahuje príliš veľa presmerovaní servera."</string>
     <string name="httpErrorUnsupportedScheme" msgid="2664108769858966374">"Protokol nie je podporovaný."</string>
@@ -563,7 +563,7 @@
     <string name="fingerprint_error_timeout" msgid="2946635815726054226">"Časový limit rozpoznania odtlačku prsta vypršal. Skúste to znova."</string>
     <string name="fingerprint_error_canceled" msgid="540026881380070750">"Operácia týkajúca sa odtlačku prsta bola zrušená"</string>
     <string name="fingerprint_error_user_canceled" msgid="7685676229281231614">"Overenie odtlačku prsta zrušil používateľ."</string>
-    <string name="fingerprint_error_lockout" msgid="7853461265604738671">"Príliš veľa pokusov. Skúste to znova neskôr."</string>
+    <string name="fingerprint_error_lockout" msgid="7853461265604738671">"Príliš veľa pokusov. Skúste to neskôr."</string>
     <string name="fingerprint_error_lockout_permanent" msgid="3895478283943513746">"Príliš veľa pokusov. Senzor odtlačkov prstov bol deaktivovaný."</string>
     <string name="fingerprint_error_unable_to_process" msgid="1148553603490048742">"Skúste to znova"</string>
     <string name="fingerprint_error_no_fingerprints" msgid="8671811719699072411">"Neregistrovali ste žiadne odtlačky prstov."</string>
@@ -607,7 +607,7 @@
     <string name="face_error_no_space" msgid="5649264057026021723">"Nové údaje o tvári sa nedajú uložiť. Najprv odstráňte jeden zo starých záznamov."</string>
     <string name="face_error_canceled" msgid="2164434737103802131">"Operácia týkajúca sa tváre bola zrušená"</string>
     <string name="face_error_user_canceled" msgid="8553045452825849843">"Odomknutie tvárou zrušil používateľ."</string>
-    <string name="face_error_lockout" msgid="7864408714994529437">"Príliš veľa pokusov. Skúste to znova neskôr."</string>
+    <string name="face_error_lockout" msgid="7864408714994529437">"Príliš veľa pokusov. Skúste to neskôr."</string>
     <string name="face_error_lockout_permanent" msgid="8277853602168960343">"Príliš veľa pokusov. Odomknutie tvárou bolo zakázané."</string>
     <string name="face_error_unable_to_process" msgid="5723292697366130070">"Nedá sa overiť tvár. Skúste to znova."</string>
     <string name="face_error_not_enrolled" msgid="7369928733504691611">"Nenastavili ste odomknutie tvárou."</string>
@@ -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>
@@ -1816,7 +1816,7 @@
       <item quantity="other">Skúste to znova o <xliff:g id="COUNT">%d</xliff:g> sekúnd</item>
       <item quantity="one">Skúste to znova o 1 sekundu</item>
     </plurals>
-    <string name="restr_pin_try_later" msgid="5897719962541636727">"Skúste to znova neskôr"</string>
+    <string name="restr_pin_try_later" msgid="5897719962541636727">"Skúste to neskôr"</string>
     <string name="immersive_cling_title" msgid="2307034298721541791">"Zobrazenie na celú obrazovku"</string>
     <string name="immersive_cling_description" msgid="7092737175345204832">"Ukončíte potiahnutím zhora nadol."</string>
     <string name="immersive_cling_positive" msgid="7047498036346489883">"Dobre"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 452a0a4..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>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index 000ec50..8742a67 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>
@@ -1306,8 +1306,8 @@
     <string name="usb_power_notification_message" msgid="7284765627437897702">"Pajisja e lidhur po karikohet. Trokit për opsione të tjera."</string>
     <string name="usb_unsupported_audio_accessory_title" msgid="2335775548086533065">"U zbulua aksesor i audios analoge"</string>
     <string name="usb_unsupported_audio_accessory_message" msgid="1300168007129796621">"Pajisja e bashkuar nuk është e pajtueshme me këtë telefon. Trokit për të mësuar më shumë."</string>
-    <string name="adb_active_notification_title" msgid="408390247354560331">"Korrigjuesi i USB-së është i lidhur"</string>
-    <string name="adb_active_notification_message" msgid="5617264033476778211">"Trokit për të çaktivizuar korrigjimin e USB-së"</string>
+    <string name="adb_active_notification_title" msgid="408390247354560331">"Korrigjimi përmes USB-së është i lidhur"</string>
+    <string name="adb_active_notification_message" msgid="5617264033476778211">"Trokit për të çaktivizuar korrigjimin përmes USB-së"</string>
     <string name="adb_active_notification_message" product="tv" msgid="6624498401272780855">"Përzgjidhe për të çaktivizuar korrigjimin e gabimeve të USB-së"</string>
     <string name="adbwifi_active_notification_title" msgid="6147343659168302473">"Korrigjimi përmes Wi-Fi është lidhur"</string>
     <string name="adbwifi_active_notification_message" msgid="930987922852867972">"Trokit për të çaktivizuar korrigjimin përmes Wi-Fi"</string>
@@ -1920,7 +1920,7 @@
     <string name="app_category_maps" msgid="6395725487922533156">"Harta dhe navigim"</string>
     <string name="app_category_productivity" msgid="1844422703029557883">"Produktivitet"</string>
     <string name="device_storage_monitor_notification_channel" msgid="5164244565844470758">"Hapësira ruajtëse e pajisjes"</string>
-    <string name="adb_debugging_notification_channel_tv" msgid="4764046459631031496">"Korrigjimi i USB-së"</string>
+    <string name="adb_debugging_notification_channel_tv" msgid="4764046459631031496">"Korrigjimi përmes USB-së"</string>
     <string name="time_picker_hour_label" msgid="4208590187662336864">"orë"</string>
     <string name="time_picker_minute_label" msgid="8307452311269824553">"minutë"</string>
     <string name="time_picker_header_text" msgid="9073802285051516688">"Vendos orën"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 2596ac1..d2e7865 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -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>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index c1e6ac1..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>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 67d53be..7066c00 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -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>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 1284720..0c5f964 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -267,7 +267,7 @@
     <string name="global_action_lockdown" msgid="2475471405907902963">"பூட்டு"</string>
     <string name="status_bar_notification_info_overflow" msgid="3330152558746563475">"999+"</string>
     <string name="notification_hidden_text" msgid="2835519769868187223">"புதிய அறிவிப்பு"</string>
-    <string name="notification_channel_virtual_keyboard" msgid="6465975799223304567">"விர்ச்சுவல் கீபோர்ட்"</string>
+    <string name="notification_channel_virtual_keyboard" msgid="6465975799223304567">"விர்ச்சுவல் கீபோர்டு"</string>
     <string name="notification_channel_physical_keyboard" msgid="5417306456125988096">"கைமுறை விசைப்பலகை"</string>
     <string name="notification_channel_security" msgid="8516754650348238057">"பாதுகாப்பு"</string>
     <string name="notification_channel_car_mode" msgid="2123919247040988436">"கார் பயன்முறை"</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>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 1676f1f..726fd6c 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/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>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index bd5a6b6..4c6be82 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -310,7 +310,7 @@
     <string name="permgrouplab_camera" msgid="9090413408963547706">"กล้องถ่ายรูป"</string>
     <string name="permgroupdesc_camera" msgid="7585150538459320326">"ถ่ายภาพและบันทึกวิดีโอ"</string>
     <string name="permgrouplab_calllog" msgid="7926834372073550288">"ประวัติการโทร"</string>
-    <string name="permgroupdesc_calllog" msgid="2026996642917801803">"อ่านและเขียนประวัติการโทรของโทรศัพท์"</string>
+    <string name="permgroupdesc_calllog" msgid="2026996642917801803">"อ่านและเขียนบันทึกการโทรของโทรศัพท์"</string>
     <string name="permgrouplab_phone" msgid="570318944091926620">"โทรศัพท์"</string>
     <string name="permgroupdesc_phone" msgid="270048070781478204">"โทรและจัดการการโทร"</string>
     <string name="permgrouplab_sensors" msgid="9134046949784064495">"เซ็นเซอร์ร่างกาย"</string>
@@ -403,12 +403,12 @@
     <string name="permdesc_writeContacts" product="tablet" msgid="6422419281427826181">"อนุญาตให้แอปแก้ไขข้อมูลเกี่ยวกับรายชื่อติดต่อที่จัดเก็บไว้ในแท็บเล็ต สิทธิ์นี้ทำให้แอปลบข้อมูลรายชื่อติดต่อได้"</string>
     <string name="permdesc_writeContacts" product="tv" msgid="6488872735379978935">"อนุญาตให้แอปแก้ไขข้อมูลเกี่ยวกับรายชื่อติดต่อที่จัดเก็บไว้ในอุปกรณ์ Android TV สิทธิ์นี้ทำให้แอปลบข้อมูลรายชื่อติดต่อได้"</string>
     <string name="permdesc_writeContacts" product="default" msgid="8304795696237065281">"อนุญาตให้แอปแก้ไขข้อมูลเกี่ยวกับรายชื่อติดต่อที่จัดเก็บไว้ในโทรศัพท์ สิทธิ์นี้ทำให้แอปลบข้อมูลรายชื่อติดต่อได้"</string>
-    <string name="permlab_readCallLog" msgid="1739990210293505948">"อ่านประวัติการโทร"</string>
+    <string name="permlab_readCallLog" msgid="1739990210293505948">"อ่านบันทึกการโทร"</string>
     <string name="permdesc_readCallLog" msgid="8964770895425873433">"แอปนี้สามารถอ่านประวัติการโทรของคุณได้"</string>
-    <string name="permlab_writeCallLog" msgid="670292975137658895">"เขียนประวัติการโทร"</string>
-    <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_writeCallLog" msgid="670292975137658895">"เขียนบันทึกการโทร"</string>
+    <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="permdesc_bodySensors" product="default" msgid="2365357960407973997">"อนุญาตให้แอปเข้าถึงข้อมูลจากเซ็นเซอร์ที่ตรวจสอบสภาพทางกายภาพ เช่น อัตราการเต้นของหัวใจ"</string>
     <string name="permlab_readCalendar" msgid="6408654259475396200">"อ่านกิจกรรมในปฏิทินและรายละเอียด"</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>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 6e5c310..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>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 145c6bb..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>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 617509e..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>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index b845f7e..0480053 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -818,7 +818,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="3112256684547584093">"‏PUK اور نیا PIN کوڈ ٹائپ کریں"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="2825313071899938305">"‏PUK کوڈ"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="5505434724229581207">"‏نیا PIN کوڈ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="4032288032993261520"><font size="17">"پاسورڈ ٹائپ کرنے کیلئے تھپتھپائیں"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="4032288032993261520"><font size="17">"پاس ورڈ ٹائپ کرنے کیلئے تھپتھپائیں"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="2751130557661643482">"غیر مقفل کرنے کیلئے پاس ورڈ ٹائپ کریں"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="7792964196473964340">"‏غیر مقفل کرنے کیلئے PIN ٹائپ کریں"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="8583732939138432793">"‏غلط PIN کوڈ۔"</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>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index 1a3ecd0..2b83c82 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -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>
@@ -1765,7 +1765,7 @@
     <string name="restr_pin_confirm_pin" msgid="7143161971614944989">"Yangi PIN kodni tasdiqlash"</string>
     <string name="restr_pin_create_pin" msgid="917067613896366033">"Cheklovlarni o‘zgartirish uchun PIN-kod yaratish"</string>
     <string name="restr_pin_error_doesnt_match" msgid="7063392698489280556">"PIN-kod mos kelmadi. Qayta urinib ko‘ring."</string>
-    <string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN kod kamida 4 ta raqamdan iborat bo‘lishi shart."</string>
+    <string name="restr_pin_error_too_short" msgid="1547007808237941065">"PIN kod juda qisqa, kamida 4 ta raqam kiriting."</string>
     <plurals name="restr_pin_countdown" formatted="false" msgid="4427486903285216153">
       <item quantity="other"><xliff:g id="COUNT">%d</xliff:g> soniyadan so‘ng qayta urinib ko‘ring</item>
       <item quantity="one">1 soniyadan so‘ng qayta urinib ko‘ring</item>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index c2caedd..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>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 2766440b..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>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index b1b21ac..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>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index a65d6fd..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>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 883bed2..bb5360e 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -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>
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 7fdbad0..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 -->
 
@@ -2275,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. -->
@@ -2305,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 36e94e5..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" />
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/bugreports/src/com/android/os/bugreports/tests/BugreportManagerTest.java b/core/tests/bugreports/src/com/android/os/bugreports/tests/BugreportManagerTest.java
index 9246a23..f9e3bc6 100644
--- a/core/tests/bugreports/src/com/android/os/bugreports/tests/BugreportManagerTest.java
+++ b/core/tests/bugreports/src/com/android/os/bugreports/tests/BugreportManagerTest.java
@@ -118,6 +118,7 @@
         // Wifi bugreports should not receive any progress.
         assertThat(callback.hasReceivedProgress()).isFalse();
         assertThat(mBugreportFile.length()).isGreaterThan(0L);
+        assertThat(callback.hasEarlyReportFinished()).isTrue();
         assertFdsAreClosed(mBugreportFd);
     }
 
@@ -135,6 +136,7 @@
         // Interactive bugreports show progress updates.
         assertThat(callback.hasReceivedProgress()).isTrue();
         assertThat(mBugreportFile.length()).isGreaterThan(0L);
+        assertThat(callback.hasEarlyReportFinished()).isTrue();
         assertFdsAreClosed(mBugreportFd);
     }
 
@@ -246,6 +248,7 @@
         private int mErrorCode = -1;
         private boolean mSuccess = false;
         private boolean mReceivedProgress = false;
+        private boolean mEarlyReportFinished = false;
         private final Object mLock = new Object();
 
         @Override
@@ -271,6 +274,13 @@
             }
         }
 
+        @Override
+        public void onEarlyReportFinished() {
+            synchronized (mLock) {
+                mEarlyReportFinished = true;
+            }
+        }
+
         /* Indicates completion; and ended up with a success or error. */
         public boolean isDone() {
             synchronized (mLock) {
@@ -295,6 +305,12 @@
                 return mReceivedProgress;
             }
         }
+
+        public boolean hasEarlyReportFinished() {
+            synchronized (mLock) {
+                return mEarlyReportFinished;
+            }
+        }
     }
 
     public static BugreportManager getBugreportManager() {
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/BstatsTestApp/OWNERS b/core/tests/coretests/BstatsTestApp/OWNERS
new file mode 100644
index 0000000..4068e2b
--- /dev/null
+++ b/core/tests/coretests/BstatsTestApp/OWNERS
@@ -0,0 +1 @@
+include /BATTERY_STATS_OWNERS
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/os/storage/OWNERS b/core/tests/coretests/src/android/os/storage/OWNERS
new file mode 100644
index 0000000..6f9dbea
--- /dev/null
+++ b/core/tests/coretests/src/android/os/storage/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/os/storage/OWNERS
diff --git a/core/tests/coretests/src/android/service/notification/OWNERS b/core/tests/coretests/src/android/service/notification/OWNERS
new file mode 100644
index 0000000..1502b60
--- /dev/null
+++ b/core/tests/coretests/src/android/service/notification/OWNERS
@@ -0,0 +1,2 @@
+include platform/frameworks/base:/services/core/java/com/android/server/notification/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/os/OWNERS b/core/tests/coretests/src/com/android/internal/os/OWNERS
new file mode 100644
index 0000000..4068e2b
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/os/OWNERS
@@ -0,0 +1 @@
+include /BATTERY_STATS_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/coretests/src/com/android/internal/util/ArrayUtilsTest.java b/core/tests/coretests/src/com/android/internal/util/ArrayUtilsTest.java
index d026735..e8793a9 100644
--- a/core/tests/coretests/src/com/android/internal/util/ArrayUtilsTest.java
+++ b/core/tests/coretests/src/com/android/internal/util/ArrayUtilsTest.java
@@ -118,4 +118,89 @@
         assertEquals(3, ArrayUtils.unstableRemoveIf(collection, isNull));
         assertEquals(0, collection.size());
     }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_passesWhenRangeInsideArray() {
+        ArrayUtils.throwsIfOutOfBounds(10, 2, 6);
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_passesWhenRangeIsWholeArray() {
+        ArrayUtils.throwsIfOutOfBounds(10, 0, 10);
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_passesWhenEmptyRangeAtStart() {
+        ArrayUtils.throwsIfOutOfBounds(10, 0, 0);
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_passesWhenEmptyRangeAtEnd() {
+        ArrayUtils.throwsIfOutOfBounds(10, 10, 0);
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_passesWhenEmptyArray() {
+        ArrayUtils.throwsIfOutOfBounds(0, 0, 0);
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenRangeStartNegative() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(10, -1, 5);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenCountNegative() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(10, 5, -1);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenRangeStartTooHigh() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(10, 11, 0);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenRangeEndTooHigh() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(10, 5, 6);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenLengthNegative() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(-1, 0, 0);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
+
+    @SmallTest
+    public void testThrowsIfOutOfBounds_failsWhenOverflowRangeEndTooHigh() {
+        try {
+            ArrayUtils.throwsIfOutOfBounds(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
+            fail();
+        } catch (ArrayIndexOutOfBoundsException expected) {
+            // expected
+        }
+    }
 }
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/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/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/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/OWNERS b/core/tests/uwbtests/OWNERS
new file mode 100644
index 0000000..c7b09a2
--- /dev/null
+++ b/core/tests/uwbtests/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/uwb/OWNERS
diff --git a/core/tests/uwbtests/src/android/uwb/AngleOfArrivalMeasurementTest.java b/core/tests/uwbtests/src/android/uwb/AngleOfArrivalMeasurementTest.java
index 077b08f..e0884e3 100644
--- a/core/tests/uwbtests/src/android/uwb/AngleOfArrivalMeasurementTest.java
+++ b/core/tests/uwbtests/src/android/uwb/AngleOfArrivalMeasurementTest.java
@@ -48,8 +48,8 @@
         builder.setAzimuthAngleMeasurement(azimuth);
         AngleOfArrivalMeasurement measurement = tryBuild(builder, true);
 
-        assertEquals(azimuth, measurement.getAzimuth());
-        assertEquals(altitude, measurement.getAltitude());
+        assertEquals(azimuth, measurement.getAzimuthAngleMeasurement());
+        assertEquals(altitude, measurement.getAltitudeAngleMeasurement());
     }
 
     private AngleMeasurement getAngleMeasurement(double radian, double error, double confidence) {
diff --git a/core/tests/uwbtests/src/android/uwb/RangingManagerTest.java b/core/tests/uwbtests/src/android/uwb/RangingManagerTest.java
new file mode 100644
index 0000000..6df1c3e
--- /dev/null
+++ b/core/tests/uwbtests/src/android/uwb/RangingManagerTest.java
@@ -0,0 +1,260 @@
+/*
+ * 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.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import android.os.PersistableBundle;
+import android.os.RemoteException;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.concurrent.Executor;
+
+/**
+ * Test of {@link AdapterStateListener}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class RangingManagerTest {
+
+    private static final IUwbAdapter ADAPTER = mock(IUwbAdapter.class);
+    private static final Executor EXECUTOR = UwbTestUtils.getExecutor();
+    private static final PersistableBundle PARAMS = new PersistableBundle();
+    private static final @CloseReason int CLOSE_REASON = CloseReason.UNKNOWN;
+
+    @Test
+    public void testOpenSession_StartRangingInvoked() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+        verify(ADAPTER, times(1)).startRanging(eq(rangingManager), eq(PARAMS));
+    }
+
+    @Test
+    public void testOpenSession_ErrorIfSameSessionHandleReturned() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+
+        // Calling openSession will cause the same session handle to be returned. The onClosed
+        // callback should be invoked
+        RangingSession.Callback callback2 = mock(RangingSession.Callback.class);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback2);
+        verify(callback, times(0)).onClosed(anyInt(), any());
+        verify(callback2, times(1)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingStarted_ValidSessionHandle() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+        rangingManager.onRangingStarted(handle, PARAMS);
+        verify(callback, times(1)).onOpenSuccess(any(), any());
+    }
+
+    @Test
+    public void testOnRangingStarted_InvalidSessionHandle() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+
+        rangingManager.onRangingStarted(new SessionHandle(2), PARAMS);
+        verify(callback, times(0)).onOpenSuccess(any(), any());
+    }
+
+    @Test
+    public void testOnRangingStarted_MultipleSessionsRegistered() throws RemoteException {
+        SessionHandle sessionHandle1 = new SessionHandle(1);
+        SessionHandle sessionHandle2 = new SessionHandle(2);
+        RangingSession.Callback callback1 = mock(RangingSession.Callback.class);
+        RangingSession.Callback callback2 = mock(RangingSession.Callback.class);
+
+        when(ADAPTER.startRanging(any(), any()))
+                .thenReturn(sessionHandle1)
+                .thenReturn(sessionHandle2);
+
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback1);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback2);
+
+        rangingManager.onRangingStarted(sessionHandle1, PARAMS);
+        verify(callback1, times(1)).onOpenSuccess(any(), any());
+        verify(callback2, times(0)).onOpenSuccess(any(), any());
+
+        rangingManager.onRangingStarted(sessionHandle2, PARAMS);
+        verify(callback1, times(1)).onOpenSuccess(any(), any());
+        verify(callback2, times(1)).onOpenSuccess(any(), any());
+    }
+
+    @Test
+    public void testOnRangingClosed_OnRangingClosedCalled() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+
+        rangingManager.onRangingClosed(handle, CLOSE_REASON, PARAMS);
+        verify(callback, times(1)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingClosed_MultipleSessionsRegistered() throws RemoteException {
+        // Verify that if multiple sessions are registered, only the session that is
+        // requested to close receives the associated callbacks
+        SessionHandle sessionHandle1 = new SessionHandle(1);
+        SessionHandle sessionHandle2 = new SessionHandle(2);
+        RangingSession.Callback callback1 = mock(RangingSession.Callback.class);
+        RangingSession.Callback callback2 = mock(RangingSession.Callback.class);
+
+        when(ADAPTER.startRanging(any(), any()))
+                .thenReturn(sessionHandle1)
+                .thenReturn(sessionHandle2);
+
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback1);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback2);
+
+        rangingManager.onRangingClosed(sessionHandle1, CLOSE_REASON, PARAMS);
+        verify(callback1, times(1)).onClosed(anyInt(), any());
+        verify(callback2, times(0)).onClosed(anyInt(), any());
+
+        rangingManager.onRangingClosed(sessionHandle2, CLOSE_REASON, PARAMS);
+        verify(callback1, times(1)).onClosed(anyInt(), any());
+        verify(callback2, times(1)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingReport_OnReportReceived() throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+        rangingManager.onRangingStarted(handle, PARAMS);
+
+        RangingReport report = UwbTestUtils.getRangingReports(1);
+        rangingManager.onRangingResult(handle, report);
+        verify(callback, times(1)).onReportReceived(eq(report));
+    }
+
+    @Test
+    public void testOnRangingReport_MultipleSessionsRegistered() throws RemoteException {
+        SessionHandle sessionHandle1 = new SessionHandle(1);
+        SessionHandle sessionHandle2 = new SessionHandle(2);
+        RangingSession.Callback callback1 = mock(RangingSession.Callback.class);
+        RangingSession.Callback callback2 = mock(RangingSession.Callback.class);
+
+        when(ADAPTER.startRanging(any(), any()))
+                .thenReturn(sessionHandle1)
+                .thenReturn(sessionHandle2);
+
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback1);
+        rangingManager.onRangingStarted(sessionHandle1, PARAMS);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback2);
+        rangingManager.onRangingStarted(sessionHandle2, PARAMS);
+
+        rangingManager.onRangingResult(sessionHandle1, UwbTestUtils.getRangingReports(1));
+        verify(callback1, times(1)).onReportReceived(any());
+        verify(callback2, times(0)).onReportReceived(any());
+
+        rangingManager.onRangingResult(sessionHandle2, UwbTestUtils.getRangingReports(1));
+        verify(callback1, times(1)).onReportReceived(any());
+        verify(callback2, times(1)).onReportReceived(any());
+    }
+
+    @Test
+    public void testOnClose_Reasons() throws RemoteException {
+        runOnClose_Reason(CloseReason.LOCAL_API,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_CLOSE_API);
+
+        runOnClose_Reason(CloseReason.MAX_SESSIONS_REACHED,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_MAX_SESSIONS_REACHED);
+
+        runOnClose_Reason(CloseReason.PROTOCOL_SPECIFIC,
+                RangingSession.Callback.CLOSE_REASON_PROTOCOL_SPECIFIC);
+
+        runOnClose_Reason(CloseReason.REMOTE_REQUEST,
+                RangingSession.Callback.CLOSE_REASON_REMOTE_REQUEST);
+
+        runOnClose_Reason(CloseReason.SYSTEM_POLICY,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_SYSTEM_POLICY);
+
+        runOnClose_Reason(CloseReason.UNKNOWN,
+                RangingSession.Callback.CLOSE_REASON_UNKNOWN);
+    }
+
+    private void runOnClose_Reason(@CloseReason int reasonIn,
+            @RangingSession.Callback.CloseReason int reasonOut) throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+
+        rangingManager.onRangingClosed(handle, reasonIn, PARAMS);
+        verify(callback, times(1)).onClosed(eq(reasonOut), eq(PARAMS));
+    }
+
+    @Test
+    public void testStartFailureReasons() throws RemoteException {
+        runOnRangingStartFailed_Reason(StartFailureReason.BAD_PARAMETERS,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_BAD_PARAMETERS);
+
+        runOnRangingStartFailed_Reason(StartFailureReason.MAX_SESSIONS_REACHED,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_MAX_SESSIONS_REACHED);
+
+        runOnRangingStartFailed_Reason(StartFailureReason.PROTOCOL_SPECIFIC,
+                RangingSession.Callback.CLOSE_REASON_PROTOCOL_SPECIFIC);
+
+        runOnRangingStartFailed_Reason(StartFailureReason.SYSTEM_POLICY,
+                RangingSession.Callback.CLOSE_REASON_LOCAL_SYSTEM_POLICY);
+
+        runOnRangingStartFailed_Reason(StartFailureReason.UNKNOWN,
+                RangingSession.Callback.CLOSE_REASON_UNKNOWN);
+    }
+
+    private void runOnRangingStartFailed_Reason(@StartFailureReason int reasonIn,
+            @RangingSession.Callback.CloseReason int reasonOut) throws RemoteException {
+        RangingManager rangingManager = new RangingManager(ADAPTER);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        SessionHandle handle = new SessionHandle(1);
+        when(ADAPTER.startRanging(any(), any())).thenReturn(handle);
+        rangingManager.openSession(PARAMS, EXECUTOR, callback);
+
+        rangingManager.onRangingStartFailed(handle, reasonIn, PARAMS);
+        verify(callback, times(1)).onClosed(eq(reasonOut), eq(PARAMS));
+    }
+}
diff --git a/core/tests/uwbtests/src/android/uwb/RangingMeasurementTest.java b/core/tests/uwbtests/src/android/uwb/RangingMeasurementTest.java
index a7559d8..edd4d08 100644
--- a/core/tests/uwbtests/src/android/uwb/RangingMeasurementTest.java
+++ b/core/tests/uwbtests/src/android/uwb/RangingMeasurementTest.java
@@ -63,8 +63,8 @@
         assertEquals(status, measurement.getStatus());
         assertEquals(address, measurement.getRemoteDeviceAddress());
         assertEquals(time, measurement.getElapsedRealtimeNanos());
-        assertEquals(angleMeasurement, measurement.getAngleOfArrival());
-        assertEquals(distanceMeasurement, measurement.getDistance());
+        assertEquals(angleMeasurement, measurement.getAngleOfArrivalMeasurement());
+        assertEquals(distanceMeasurement, measurement.getDistanceMeasurement());
     }
 
     private RangingMeasurement tryBuild(RangingMeasurement.Builder builder,
diff --git a/core/tests/uwbtests/src/android/uwb/RangingSessionTest.java b/core/tests/uwbtests/src/android/uwb/RangingSessionTest.java
new file mode 100644
index 0000000..702c68e
--- /dev/null
+++ b/core/tests/uwbtests/src/android/uwb/RangingSessionTest.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.os.PersistableBundle;
+import android.os.RemoteException;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.filters.SmallTest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.concurrent.Executor;
+
+/**
+ * Test of {@link RangingSession}.
+ */
+@SmallTest
+@RunWith(AndroidJUnit4.class)
+public class RangingSessionTest {
+    private static final IUwbAdapter ADAPTER = mock(IUwbAdapter.class);
+    private static final Executor EXECUTOR = UwbTestUtils.getExecutor();
+    private static final PersistableBundle PARAMS = new PersistableBundle();
+    private static final @RangingSession.Callback.CloseReason int CLOSE_REASON =
+            RangingSession.Callback.CLOSE_REASON_LOCAL_GENERIC_ERROR;
+
+    @Test
+    public void testOnRangingStarted_OnOpenSuccessCalled() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+        verifyOpenState(session, false);
+
+        session.onRangingStarted(PARAMS);
+        verifyOpenState(session, true);
+
+        // Verify that the onOpenSuccess callback was invoked
+        verify(callback, times(1)).onOpenSuccess(eq(session), any());
+        verify(callback, times(0)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingStarted_CannotOpenClosedSession() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+
+        session.onRangingStarted(PARAMS);
+        verifyOpenState(session, true);
+        verify(callback, times(1)).onOpenSuccess(eq(session), any());
+        verify(callback, times(0)).onClosed(anyInt(), any());
+
+        session.onRangingClosed(CLOSE_REASON, PARAMS);
+        verifyOpenState(session, false);
+        verify(callback, times(1)).onOpenSuccess(eq(session), any());
+        verify(callback, times(1)).onClosed(anyInt(), any());
+
+        // Now invoke the ranging started callback and ensure the session remains closed
+        session.onRangingStarted(PARAMS);
+        verifyOpenState(session, false);
+        verify(callback, times(1)).onOpenSuccess(eq(session), any());
+        verify(callback, times(1)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingClosed_OnClosedCalledWhenSessionNotOpen() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+        verifyOpenState(session, false);
+
+        session.onRangingClosed(CLOSE_REASON, PARAMS);
+        verifyOpenState(session, false);
+
+        // Verify that the onOpenSuccess callback was invoked
+        verify(callback, times(0)).onOpenSuccess(eq(session), any());
+        verify(callback, times(1)).onClosed(anyInt(), any());
+    }
+
+    @Test public void testOnRangingClosed_OnClosedCalled() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+        session.onRangingStarted(PARAMS);
+        session.onRangingClosed(CLOSE_REASON, PARAMS);
+        verify(callback, times(1)).onClosed(anyInt(), any());
+
+        verifyOpenState(session, false);
+        session.onRangingClosed(CLOSE_REASON, PARAMS);
+        verify(callback, times(2)).onClosed(anyInt(), any());
+    }
+
+    @Test
+    public void testOnRangingResult_OnReportReceivedCalled() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+        verifyOpenState(session, false);
+
+        session.onRangingStarted(PARAMS);
+        verifyOpenState(session, true);
+
+        RangingReport report = UwbTestUtils.getRangingReports(1);
+        session.onRangingResult(report);
+        verify(callback, times(1)).onReportReceived(eq(report));
+    }
+
+    @Test
+    public void testClose() throws RemoteException {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+        session.onRangingStarted(PARAMS);
+
+        // Calling close multiple times should invoke closeRanging until the session receives
+        // the onClosed callback.
+        int totalCallsBeforeOnRangingClosed = 3;
+        for (int i = 1; i <= totalCallsBeforeOnRangingClosed; i++) {
+            session.close();
+            verifyOpenState(session, true);
+            verify(ADAPTER, times(i)).closeRanging(handle);
+            verify(callback, times(0)).onClosed(anyInt(), any());
+        }
+
+        // After onClosed is invoked, then the adapter should no longer be called for each call to
+        // the session's close.
+        final int totalCallsAfterOnRangingClosed = 2;
+        for (int i = 1; i <= totalCallsAfterOnRangingClosed; i++) {
+            session.onRangingClosed(CLOSE_REASON, PARAMS);
+            verifyOpenState(session, false);
+            verify(ADAPTER, times(totalCallsBeforeOnRangingClosed)).closeRanging(handle);
+            verify(callback, times(i)).onClosed(anyInt(), any());
+        }
+    }
+
+    @Test
+    public void testOnRangingResult_OnReportReceivedCalledWhenOpen() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+
+        assertFalse(session.isOpen());
+        session.onRangingStarted(PARAMS);
+        assertTrue(session.isOpen());
+
+        // Verify that the onReportReceived callback was invoked
+        RangingReport report = UwbTestUtils.getRangingReports(1);
+        session.onRangingResult(report);
+        verify(callback, times(1)).onReportReceived(report);
+    }
+
+    @Test
+    public void testOnRangingResult_OnReportReceivedNotCalledWhenNotOpen() {
+        SessionHandle handle = new SessionHandle(123);
+        RangingSession.Callback callback = mock(RangingSession.Callback.class);
+        RangingSession session = new RangingSession(EXECUTOR, callback, ADAPTER, handle);
+
+        assertFalse(session.isOpen());
+
+        // Verify that the onReportReceived callback was invoked
+        RangingReport report = UwbTestUtils.getRangingReports(1);
+        session.onRangingResult(report);
+        verify(callback, times(0)).onReportReceived(report);
+    }
+
+    private void verifyOpenState(RangingSession session, boolean expected) {
+        assertEquals(expected, session.isOpen());
+    }
+}
diff --git a/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java b/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
index fb75092..b4b2e30 100644
--- a/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
+++ b/core/tests/uwbtests/src/android/uwb/UwbTestUtils.java
@@ -22,6 +22,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.Executor;
 
 public class UwbTestUtils {
     private UwbTestUtils() {}
@@ -96,4 +97,13 @@
         }
         return UwbAddress.fromBytes(addressBytes);
     }
+
+    public static Executor getExecutor() {
+        return new Executor() {
+            @Override
+            public void execute(Runnable command) {
+                command.run();
+            }
+        };
+    }
 }
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/Android.bp b/data/etc/car/Android.bp
index e549271..12bd0f5 100644
--- a/data/etc/car/Android.bp
+++ b/data/etc/car/Android.bp
@@ -158,6 +158,13 @@
 }
 
 prebuilt_etc {
+    name: "privapp_allowlist_com.google.android.car.networking.preferenceupdater",
+    sub_dir: "permissions",
+    src: "com.google.android.car.networking.preferenceupdater.xml",
+    filename_from_src: true,
+}
+
+prebuilt_etc {
     name: "privapp_whitelist_com.android.car.ui.paintbooth",
     sub_dir: "permissions",
     src: "com.android.car.ui.paintbooth.xml",
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/car/com.google.android.car.networking.preferenceupdater.xml b/data/etc/car/com.google.android.car.networking.preferenceupdater.xml
new file mode 100644
index 0000000..489ce1b
--- /dev/null
+++ b/data/etc/car/com.google.android.car.networking.preferenceupdater.xml
@@ -0,0 +1,27 @@
+<?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
+  -->
+<permissions>
+    <privapp-permissions package="com.google.android.car.networking.preferenceupdater">
+        <permission name="android.permission.ACCESS_NETWORK_STATE"/>
+        <permission name="android.permission.ACCESS_WIFI_STATE"/>
+        <permission name="android.permission.ACTIVITY_EMBEDDING"/>
+        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
+        <permission name="android.permission.INTERACT_ACROSS_USERS_FULL"/>
+        <permission name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"/>
+        <permission name="android.permission.LOCATION_HARDWARE"/>
+    </privapp-permissions>
+</permissions>
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 ce6deeab..f9a0689 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">
@@ -339,6 +343,8 @@
         <permission name="android.permission.MOUNT_FORMAT_FILESYSTEMS"/>
         <permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
         <permission name="android.permission.MOVE_PACKAGE"/>
+        <!-- Needed for test only -->
+        <permission name="android.permission.NETWORK_AIRPLANE_MODE"/>
         <permission name="android.permission.OBSERVE_APP_USAGE"/>
         <permission name="android.permission.NETWORK_SCAN"/>
         <permission name="android.permission.PACKAGE_USAGE_STATS" />
@@ -432,6 +438,8 @@
         <permission name="android.permission.MANAGE_DEBUGGING" />
         <!-- Permissions required for CTS test - TimeManagerTest -->
         <permission name="android.permission.MANAGE_TIME_AND_ZONE_DETECTION" />
+        <!-- Permissions required for CTS test - CtsHdmiCecHostTestCases -->
+        <permission name="android.permission.HDMI_CEC"/>
     </privapp-permissions>
 
     <privapp-permissions package="com.android.statementservice">
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/keyboards/keyboards.mk b/data/keyboards/keyboards.mk
index 68cbd29..c7ce8cd 100644
--- a/data/keyboards/keyboards.mk
+++ b/data/keyboards/keyboards.mk
@@ -14,13 +14,9 @@
 
 # Warning: this is actually a product definition, to be inherited from
 
-include $(LOCAL_PATH)/common.mk
+PRODUCT_COPY_FILES := \
+  $(call find-copy-subdir-files,*.kl,$(LOCAL_PATH),system/usr/keylayout) \
+  $(call find-copy-subdir-files,*.kcm,$(LOCAL_PATH),system/usr/keychars) \
+  $(call find-copy-subdir-files,*.idc,$(LOCAL_PATH),system/usr/idc)
 
-PRODUCT_COPY_FILES := $(foreach file,$(framework_keylayouts),\
-    $(file):system/usr/keylayout/$(notdir $(file)))
 
-PRODUCT_COPY_FILES += $(foreach file,$(framework_keycharmaps),\
-    $(file):system/usr/keychars/$(notdir $(file)))
-
-PRODUCT_COPY_FILES += $(foreach file,$(framework_keyconfigs),\
-    $(file):system/usr/idc/$(notdir $(file)))
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/DrmOutputStream.java b/drm/java/android/drm/DrmOutputStream.java
index 73e7f23..2a3f530 100644
--- a/drm/java/android/drm/DrmOutputStream.java
+++ b/drm/java/android/drm/DrmOutputStream.java
@@ -25,9 +25,10 @@
 import android.system.Os;
 import android.util.Log;
 
+import com.android.internal.util.ArrayUtils;
+
 import libcore.io.IoBridge;
 import libcore.io.Streams;
-import libcore.util.ArrayUtils;
 
 import java.io.FileDescriptor;
 import java.io.FilterOutputStream;
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..5851cbb
--- /dev/null
+++ b/graphics/OWNERS
@@ -0,0 +1 @@
+include /graphics/java/android/graphics/OWNERS
\ No newline at end of file
diff --git a/graphics/java/android/graphics/OWNERS b/graphics/java/android/graphics/OWNERS
new file mode 100644
index 0000000..9fa8f1b
--- /dev/null
+++ b/graphics/java/android/graphics/OWNERS
@@ -0,0 +1,13 @@
+# Bug component: 24939
+
+romainguy@google.com
+jreck@google.com
+njawad@google.com
+sumir@google.com
+djsollen@google.com
+scroggo@google.com
+
+per-file BLASTBufferQueue.java = file:/services/core/java/com/android/server/wm/OWNERS
+per-file FontFamily.java = file:fonts/OWNERS
+per-file FontListParser.java = file:fonts/OWNERS
+per-file Typeface.java = file:fonts/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/keystore2/AndroidKeyStore3DESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStore3DESCipherSpi.java
index 69c7a25..56f7ea8 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;
@@ -41,7 +41,7 @@
  *
  * @hide
  */
-public class AndroidKeyStore3DESCipherSpi extends AndroidKeyStoreCipherSpiBase {
+public abstract class AndroidKeyStore3DESCipherSpi extends AndroidKeyStoreCipherSpiBase {
 
     private static final int BLOCK_SIZE_BYTES = 8;
 
@@ -73,12 +73,22 @@
             public NoPadding() {
                 super(KeymasterDefs.KM_PAD_NONE);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "DESede/ECB/NoPadding";
+            }
         }
 
         public static class PKCS7Padding extends ECB {
             public PKCS7Padding() {
                 super(KeymasterDefs.KM_PAD_PKCS7);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "DESede/ECB/PKCS7Padding";
+            }
         }
     }
 
@@ -91,12 +101,23 @@
             public NoPadding() {
                 super(KeymasterDefs.KM_PAD_NONE);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "DESede/CBC/NoPadding";
+            }
+
         }
 
         public static class PKCS7Padding extends CBC {
             public PKCS7Padding() {
                 super(KeymasterDefs.KM_PAD_PKCS7);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "DESede/CBC/PKCS7Padding";
+            }
         }
     }
 
@@ -288,7 +309,7 @@
         if (parameters != null) {
             for (KeyParameter p : parameters) {
                 if (p.tag == KeymasterDefs.KM_TAG_NONCE) {
-                    returnedIv = p.blob;
+                    returnedIv = p.value.getBlob();
                     break;
                 }
             }
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreAuthenticatedAESCipherSpi.java
index 2b5f6c3..64da837 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;
@@ -64,6 +64,11 @@
         }
 
         @Override
+        protected final String getTransform() {
+            return "AES/GCM/NoPadding";
+        }
+
+        @Override
         protected final void resetAll() {
             mTagLengthBits = DEFAULT_TAG_LENGTH_BITS;
             super.resetAll();
@@ -325,7 +330,7 @@
         if (parameters != null) {
             for (KeyParameter p : parameters) {
                 if (p.tag == KeymasterDefs.KM_TAG_NONCE) {
-                    returnedIv = p.blob;
+                    returnedIv = p.value.getBlob();
                     break;
                 }
             }
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreBCWorkaroundProvider.java b/keystore/java/android/security/keystore2/AndroidKeyStoreBCWorkaroundProvider.java
index dd943d4..9ad6f3a 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreBCWorkaroundProvider.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreBCWorkaroundProvider.java
@@ -254,13 +254,13 @@
     private void putAsymmetricCipherImpl(String transformation, String implClass) {
         put("Cipher." + transformation, implClass);
         put("Cipher." + transformation + " SupportedKeyClasses",
-                KEYSTORE_PRIVATE_KEY_CLASS_NAME + "|" + KEYSTORE_PUBLIC_KEY_CLASS_NAME);
+                KEYSTORE_PRIVATE_KEY_CLASS_NAME);
     }
 
     private void putSignatureImpl(String algorithm, String implClass) {
         put("Signature." + algorithm, implClass);
         put("Signature." + algorithm + " SupportedKeyClasses",
-                KEYSTORE_PRIVATE_KEY_CLASS_NAME + "|" + KEYSTORE_PUBLIC_KEY_CLASS_NAME);
+                KEYSTORE_PRIVATE_KEY_CLASS_NAME);
     }
 
     public static String[] getSupportedEcdsaSignatureDigests() {
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java b/keystore/java/android/security/keystore2/AndroidKeyStoreCipherSpiBase.java
index 18d2692..2ee952c 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;
@@ -43,6 +43,7 @@
 import java.security.SecureRandom;
 import java.security.spec.AlgorithmParameterSpec;
 import java.security.spec.InvalidKeySpecException;
+import java.security.spec.MGF1ParameterSpec;
 import java.security.spec.PKCS8EncodedKeySpec;
 import java.security.spec.X509EncodedKeySpec;
 import java.util.ArrayList;
@@ -57,6 +58,8 @@
 import javax.crypto.SecretKey;
 import javax.crypto.SecretKeyFactory;
 import javax.crypto.ShortBufferException;
+import javax.crypto.spec.OAEPParameterSpec;
+import javax.crypto.spec.PSource;
 import javax.crypto.spec.SecretKeySpec;
 
 /**
@@ -99,6 +102,8 @@
      */
     private Exception mCachedException;
 
+    private Cipher mCipher;
+
     AndroidKeyStoreCipherSpiBase() {
         mOperation = null;
         mEncrypting = false;
@@ -110,6 +115,7 @@
         mAdditionalAuthenticationDataStreamer = null;
         mAdditionalAuthenticationDataStreamerClosed = false;
         mCachedException = null;
+        mCipher = null;
     }
 
     @Override
@@ -117,6 +123,45 @@
             throws InvalidKeyException {
         resetAll();
 
+        if (!(key instanceof AndroidKeyStorePrivateKey
+                || key instanceof AndroidKeyStoreSecretKey)) {
+            try {
+                mCipher = Cipher.getInstance(getTransform());
+                String transform = getTransform();
+
+                if ("RSA/ECB/OAEPWithSHA-224AndMGF1Padding".equals(transform)) {
+                    OAEPParameterSpec spec =
+                            new OAEPParameterSpec("SHA-224", "MGF1",
+                                    new MGF1ParameterSpec("SHA1"), PSource.PSpecified.DEFAULT);
+                    mCipher.init(opmode, key, spec, random);
+                } else if ("RSA/ECB/OAEPWithSHA-256AndMGF1Padding".equals(transform)) {
+                    OAEPParameterSpec spec =
+                            new OAEPParameterSpec("SHA-256", "MGF1",
+                                    new MGF1ParameterSpec("SHA1"), PSource.PSpecified.DEFAULT);
+                    mCipher.init(opmode, key, spec, random);
+
+                } else if ("RSA/ECB/OAEPWithSHA-384AndMGF1Padding".equals(transform)) {
+                    OAEPParameterSpec spec =
+                            new OAEPParameterSpec("SHA-384", "MGF1",
+                                    new MGF1ParameterSpec("SHA1"), PSource.PSpecified.DEFAULT);
+                    mCipher.init(opmode, key, spec, random);
+
+                } else if ("RSA/ECB/OAEPWithSHA-512AndMGF1Padding".equals(transform)) {
+                    OAEPParameterSpec spec =
+                            new OAEPParameterSpec("SHA-512", "MGF1",
+                                    new MGF1ParameterSpec("SHA1"), PSource.PSpecified.DEFAULT);
+                    mCipher.init(opmode, key, spec, random);
+                } else {
+                    mCipher.init(opmode, key, random);
+                }
+                return;
+            } catch (NoSuchAlgorithmException
+                    | NoSuchPaddingException
+                    | InvalidAlgorithmParameterException e) {
+                throw new InvalidKeyException(e);
+            }
+        }
+
         boolean success = false;
         try {
             init(opmode, key, random);
@@ -139,6 +184,17 @@
             SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
         resetAll();
 
+        if (!(key instanceof AndroidKeyStorePrivateKey
+                || key instanceof AndroidKeyStoreSecretKey)) {
+            try {
+                mCipher = Cipher.getInstance(getTransform());
+                mCipher.init(opmode, key, params, random);
+                return;
+            } catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
+                throw new InvalidKeyException(e);
+            }
+        }
+
         boolean success = false;
         try {
             init(opmode, key, random);
@@ -157,6 +213,17 @@
             SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException {
         resetAll();
 
+        if (!(key instanceof AndroidKeyStorePrivateKey
+                || key instanceof AndroidKeyStoreSecretKey)) {
+            try {
+                mCipher = Cipher.getInstance(getTransform());
+                mCipher.init(opmode, key, params, random);
+                return;
+            } catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
+                throw new InvalidKeyException(e);
+            }
+        }
+
         boolean success = false;
         try {
             init(opmode, key, random);
@@ -214,6 +281,7 @@
         mAdditionalAuthenticationDataStreamer = null;
         mAdditionalAuthenticationDataStreamerClosed = false;
         mCachedException = null;
+        mCipher = null;
     }
 
     /**
@@ -320,6 +388,10 @@
 
     @Override
     protected final byte[] engineUpdate(byte[] input, int inputOffset, int inputLen) {
+        if (mCipher != null) {
+            return mCipher.update(input, inputOffset, inputLen);
+        }
+
         if (mCachedException != null) {
             return null;
         }
@@ -371,6 +443,9 @@
     @Override
     protected final int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output,
             int outputOffset) throws ShortBufferException {
+        if (mCipher != null) {
+            return mCipher.update(input, inputOffset, inputLen, output);
+        }
         byte[] outputCopy = engineUpdate(input, inputOffset, inputLen);
         if (outputCopy == null) {
             return 0;
@@ -387,6 +462,10 @@
     @Override
     protected final int engineUpdate(ByteBuffer input, ByteBuffer output)
             throws ShortBufferException {
+        if (mCipher != null) {
+            return mCipher.update(input, output);
+        }
+
         if (input == null) {
             throw new NullPointerException("input == null");
         }
@@ -423,6 +502,11 @@
 
     @Override
     protected final void engineUpdateAAD(byte[] input, int inputOffset, int inputLen) {
+        if (mCipher != null) {
+            mCipher.updateAAD(input, inputOffset, inputLen);
+            return;
+        }
+
         if (mCachedException != null) {
             return;
         }
@@ -459,6 +543,11 @@
 
     @Override
     protected final void engineUpdateAAD(ByteBuffer src) {
+        if (mCipher != null) {
+            mCipher.updateAAD(src);
+            return;
+        }
+
         if (src == null) {
             throw new IllegalArgumentException("src == null");
         }
@@ -486,6 +575,10 @@
     @Override
     protected final byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
             throws IllegalBlockSizeException, BadPaddingException {
+        if (mCipher != null) {
+            return mCipher.doFinal(input, inputOffset, inputLen);
+        }
+
         if (mCachedException != null) {
             throw (IllegalBlockSizeException)
                     new IllegalBlockSizeException().initCause(mCachedException);
@@ -522,6 +615,10 @@
     protected final int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[] output,
             int outputOffset) throws ShortBufferException, IllegalBlockSizeException,
             BadPaddingException {
+        if (mCipher != null) {
+            return mCipher.doFinal(input, inputOffset, inputLen, output);
+        }
+
         byte[] outputCopy = engineDoFinal(input, inputOffset, inputLen);
         if (outputCopy == null) {
             return 0;
@@ -538,6 +635,10 @@
     @Override
     protected final int engineDoFinal(ByteBuffer input, ByteBuffer output)
             throws ShortBufferException, IllegalBlockSizeException, BadPaddingException {
+        if (mCipher != null) {
+            return mCipher.doFinal(input, output);
+        }
+
         if (input == null) {
             throw new NullPointerException("input == null");
         }
@@ -575,6 +676,10 @@
     @Override
     protected final byte[] engineWrap(Key key)
             throws IllegalBlockSizeException, InvalidKeyException {
+        if (mCipher != null) {
+            return mCipher.wrap(key);
+        }
+
         if (mKey == null) {
             throw new IllegalStateException("Not initilized");
         }
@@ -656,6 +761,10 @@
     @Override
     protected final Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm,
             int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException {
+        if (mCipher != null) {
+            return mCipher.unwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType);
+        }
+
         if (mKey == null) {
             throw new IllegalStateException("Not initilized");
         }
@@ -902,4 +1011,6 @@
      */
     protected abstract void loadAlgorithmSpecificParametersFromBeginResult(
             KeyParameter[] parameters);
+
+    protected abstract String getTransform();
 }
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreECDSASignatureSpi.java
index 2250c89..8289671 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;
@@ -44,6 +44,11 @@
         }
 
         @Override
+        protected String getAlgorithm() {
+            return "NONEwithECDSA";
+        }
+
+        @Override
         protected KeyStoreCryptoOperationStreamer createMainDataStreamer(
                 KeyStoreOperation operation) {
             return new TruncateToFieldSizeMessageStreamer(
@@ -113,30 +118,50 @@
         public SHA1() {
             super(KeymasterDefs.KM_DIGEST_SHA1);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA1withECDSA";
+        }
     }
 
     public final static class SHA224 extends AndroidKeyStoreECDSASignatureSpi {
         public SHA224() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_224);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA224withECDSA";
+        }
     }
 
     public final static class SHA256 extends AndroidKeyStoreECDSASignatureSpi {
         public SHA256() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_256);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA256withECDSA";
+        }
     }
 
     public final static class SHA384 extends AndroidKeyStoreECDSASignatureSpi {
         public SHA384() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_384);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA384withECDSA";
+        }
     }
 
     public final static class SHA512 extends AndroidKeyStoreECDSASignatureSpi {
         public SHA512() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_512);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA512withECDSA";
+        }
     }
 
     private final int mKeymasterDigest;
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/AndroidKeyStoreLoadStoreParameter.java b/keystore/java/android/security/keystore2/AndroidKeyStoreLoadStoreParameter.java
index afb1054..0c6744f 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreLoadStoreParameter.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreLoadStoreParameter.java
@@ -22,11 +22,11 @@
 /**
  * @hide
  */
-class AndroidKeyStoreLoadStoreParameter implements KeyStore.LoadStoreParameter {
+public class AndroidKeyStoreLoadStoreParameter implements KeyStore.LoadStoreParameter {
 
     private final int mNamespace;
 
-    AndroidKeyStoreLoadStoreParameter(int namespace) {
+    public AndroidKeyStoreLoadStoreParameter(int namespace) {
         mNamespace = namespace;
     }
 
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreProvider.java b/keystore/java/android/security/keystore2/AndroidKeyStoreProvider.java
index b2e32a3..403da18 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreProvider.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreProvider.java
@@ -31,9 +31,7 @@
 import android.system.keystore2.KeyMetadata;
 import android.system.keystore2.ResponseCode;
 
-import java.security.KeyFactory;
 import java.security.KeyPair;
-import java.security.NoSuchAlgorithmException;
 import java.security.Provider;
 import java.security.ProviderException;
 import java.security.PublicKey;
@@ -42,8 +40,6 @@
 import java.security.UnrecoverableKeyException;
 import java.security.interfaces.ECPublicKey;
 import java.security.interfaces.RSAPublicKey;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.X509EncodedKeySpec;
 
 import javax.crypto.Cipher;
 import javax.crypto.Mac;
@@ -237,28 +233,11 @@
             throw new UnrecoverableKeyException("Failed to obtain X.509 form of public key."
                     + " Keystore has no public certificate stored.");
         }
-        final byte[] x509EncodedPublicKey = metadata.certificate;
+        final byte[] x509PublicCert = metadata.certificate;
 
-        String jcaKeyAlgorithm;
-        try {
-            jcaKeyAlgorithm = KeyProperties.KeyAlgorithm.fromKeymasterAsymmetricKeyAlgorithm(
-                    algorithm);
-        } catch (IllegalArgumentException e) {
-            throw (UnrecoverableKeyException)
-                    new UnrecoverableKeyException("Failed to load private key")
-                            .initCause(e);
-        }
+        PublicKey publicKey = AndroidKeyStoreSpi.toCertificate(x509PublicCert).getPublicKey();
 
-        PublicKey publicKey;
-        try {
-            KeyFactory keyFactory = KeyFactory.getInstance(jcaKeyAlgorithm);
-            publicKey = keyFactory.generatePublic(new X509EncodedKeySpec(x509EncodedPublicKey));
-        } catch (NoSuchAlgorithmException e) {
-            throw new ProviderException(
-                    "Failed to obtain " + jcaKeyAlgorithm + " KeyFactory", e);
-        } catch (InvalidKeySpecException e) {
-            throw new ProviderException("Invalid X.509 encoding of public key", e);
-        }
+        String jcaKeyAlgorithm = publicKey.getAlgorithm();
 
         KeyStoreSecurityLevel securityLevel = iSecurityLevel;
         if (KeyProperties.KEY_ALGORITHM_EC.equalsIgnoreCase(jcaKeyAlgorithm)) {
@@ -358,7 +337,7 @@
 
         KeyDescriptor descriptor = new KeyDescriptor();
         if (namespace == KeyProperties.NAMESPACE_APPLICATION) {
-            descriptor.nspace = 0; // ignored;
+            descriptor.nspace = KeyProperties.NAMESPACE_APPLICATION; // ignored;
             descriptor.domain = Domain.APP;
         } else {
             descriptor.nspace = namespace;
@@ -387,10 +366,10 @@
         for (Authorization a : response.metadata.authorizations) {
             switch (a.keyParameter.tag) {
                 case KeymasterDefs.KM_TAG_ALGORITHM:
-                    keymasterAlgorithm = a.keyParameter.integer;
+                    keymasterAlgorithm = a.keyParameter.value.getAlgorithm();
                     break;
                 case KeymasterDefs.KM_TAG_DIGEST:
-                    if (keymasterDigest == -1) keymasterDigest = a.keyParameter.integer;
+                    if (keymasterDigest == -1) keymasterDigest = a.keyParameter.value.getDigest();
                     break;
             }
         }
@@ -407,7 +386,7 @@
                 keymasterAlgorithm == KeymasterDefs.KM_ALGORITHM_EC) {
             return makeAndroidKeyStorePublicKeyFromKeyEntryResponse(descriptor, response.metadata,
                     new KeyStoreSecurityLevel(response.iSecurityLevel),
-                    keymasterAlgorithm);
+                    keymasterAlgorithm).getPrivateKey();
         } else {
             throw new UnrecoverableKeyException("Key algorithm unknown");
         }
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreRSACipherSpi.java
index 2686ddc..6ff9432 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;
@@ -158,7 +158,7 @@
     }
 
     /**
-     * RSA cipher with OAEP encryption padding. Only SHA-1 based MGF1 is supported as MGF.
+     * RSA cipher with OAEP encryption padding.
      */
     abstract static class OAEPWithMGF1Padding extends AndroidKeyStoreRSACipherSpi {
 
@@ -316,6 +316,25 @@
         protected final int getAdditionalEntropyAmountForFinish() {
             return (isEncrypting()) ? mDigestOutputSizeBytes : 0;
         }
+
+        @Override
+        protected final String getTransform() {
+            switch (mKeymasterDigest) {
+                case KeymasterDefs.KM_DIGEST_SHA1:
+                    return "RSA/ECB/OAEPWithSHA-1AndMGF1Padding";
+                case KeymasterDefs.KM_DIGEST_SHA_2_224:
+                    return "RSA/ECB/OAEPWithSHA-224AndMGF1Padding";
+                case KeymasterDefs.KM_DIGEST_SHA_2_256:
+                    return "RSA/ECB/OAEPWithSHA-256AndMGF1Padding";
+                case KeymasterDefs.KM_DIGEST_SHA_2_384:
+                    return "RSA/ECB/OAEPWithSHA-384AndMGF1Padding";
+                case KeymasterDefs.KM_DIGEST_SHA_2_512:
+                    return "RSA/ECB/OAEPWithSHA-512AndMGF1Padding";
+                default:
+                    return "RSA/ECB/OAEPPadding";
+            }
+        }
+
     }
 
     public static class OAEPWithSHA1AndMGF1Padding extends OAEPWithMGF1Padding {
@@ -358,6 +377,11 @@
     }
 
     @Override
+    protected String getTransform() {
+        return "RSA/ECB/" + KeyProperties.EncryptionPadding.fromKeymaster(mKeymasterPadding);
+    }
+
+    @Override
     protected final void initKey(int opmode, Key key) throws InvalidKeyException {
         if (key == null) {
             throw new InvalidKeyException("Unsupported key: null");
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreRSASignatureSpi.java
index 444dad4..931c2f8 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;
 
@@ -48,42 +48,70 @@
         public NONEWithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_NONE);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "NONEwithRSA";
+        }
     }
 
     public static final class MD5WithPKCS1Padding extends PKCS1Padding {
         public MD5WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_MD5);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "MD5withRSA";
+        }
     }
 
     public static final class SHA1WithPKCS1Padding extends PKCS1Padding {
         public SHA1WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_SHA1);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA1withRSA";
+        }
     }
 
     public static final class SHA224WithPKCS1Padding extends PKCS1Padding {
         public SHA224WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_224);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA224withRSA";
+        }
     }
 
     public static final class SHA256WithPKCS1Padding extends PKCS1Padding {
         public SHA256WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_256);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA256withRSA";
+        }
     }
 
     public static final class SHA384WithPKCS1Padding extends PKCS1Padding {
         public SHA384WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_384);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA384withRSA";
+        }
     }
 
     public static final class SHA512WithPKCS1Padding extends PKCS1Padding {
         public SHA512WithPKCS1Padding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_512);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA512withRSA";
+        }
     }
 
     abstract static class PSSPadding extends AndroidKeyStoreRSASignatureSpi {
@@ -103,30 +131,50 @@
         public SHA1WithPSSPadding() {
             super(KeymasterDefs.KM_DIGEST_SHA1);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA1withRSA/PSS";
+        }
     }
 
     public static final class SHA224WithPSSPadding extends PSSPadding {
         public SHA224WithPSSPadding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_224);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA224withRSA/PSS";
+        }
     }
 
     public static final class SHA256WithPSSPadding extends PSSPadding {
         public SHA256WithPSSPadding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_256);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA256withRSA/PSS";
+        }
     }
 
     public static final class SHA384WithPSSPadding extends PSSPadding {
         public SHA384WithPSSPadding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_384);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA384withRSA/PSS";
+        }
     }
 
     public static final class SHA512WithPSSPadding extends PSSPadding {
         public SHA512WithPSSPadding() {
             super(KeymasterDefs.KM_DIGEST_SHA_2_512);
         }
+        @Override
+        protected String getAlgorithm() {
+            return "SHA512withRSA/PSS";
+        }
     }
 
     private final int mKeymasterDigest;
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSecretKeyFactorySpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSecretKeyFactorySpi.java
index 9d3b970..74503e1 100644
--- a/keystore/java/android/security/keystore2/AndroidKeyStoreSecretKeyFactorySpi.java
+++ b/keystore/java/android/security/keystore2/AndroidKeyStoreSecretKeyFactorySpi.java
@@ -102,7 +102,8 @@
                         insideSecureHardware =
                                 KeyStore2ParameterUtils.isSecureHardware(a.securityLevel);
                         securityLevel = a.securityLevel;
-                        origin = KeyProperties.Origin.fromKeymaster(a.keyParameter.integer);
+                        origin = KeyProperties.Origin.fromKeymaster(
+                                a.keyParameter.value.getOrigin());
                         break;
                     case KeymasterDefs.KM_TAG_KEY_SIZE:
                         long keySizeUnsigned = KeyStore2ParameterUtils.getUnsignedInt(a);
@@ -113,45 +114,51 @@
                         keySize = (int) keySizeUnsigned;
                         break;
                     case KeymasterDefs.KM_TAG_PURPOSE:
-                        purposes |= KeyProperties.Purpose.fromKeymaster(a.keyParameter.integer);
+                        purposes |= KeyProperties.Purpose.fromKeymaster(
+                                a.keyParameter.value.getKeyPurpose());
                         break;
                     case KeymasterDefs.KM_TAG_PADDING:
+                        int paddingMode = a.keyParameter.value.getPaddingMode();
                         try {
-                            if (a.keyParameter.integer == KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN
-                                    || a.keyParameter.integer == KeymasterDefs.KM_PAD_RSA_PSS) {
+                            if (paddingMode == KeymasterDefs.KM_PAD_RSA_PKCS1_1_5_SIGN
+                                    || paddingMode == KeymasterDefs.KM_PAD_RSA_PSS) {
                                 @KeyProperties.SignaturePaddingEnum String padding =
                                         KeyProperties.SignaturePadding.fromKeymaster(
-                                                a.keyParameter.integer);
+                                                paddingMode);
                                 signaturePaddingsList.add(padding);
                             } else {
                                 @KeyProperties.EncryptionPaddingEnum String jcaPadding =
                                         KeyProperties.EncryptionPadding.fromKeymaster(
-                                                a.keyParameter.integer);
+                                                paddingMode);
                                 encryptionPaddingsList.add(jcaPadding);
                             }
                         } catch (IllegalArgumentException e) {
                             throw new ProviderException("Unsupported padding: "
-                                                + a.keyParameter.integer);
+                                                + paddingMode);
                         }
                         break;
                     case KeymasterDefs.KM_TAG_DIGEST:
-                        digestsList.add(KeyProperties.Digest.fromKeymaster(a.keyParameter.integer));
+                        digestsList.add(KeyProperties.Digest.fromKeymaster(
+                                a.keyParameter.value.getDigest()));
                         break;
                     case KeymasterDefs.KM_TAG_BLOCK_MODE:
                         blockModesList.add(
-                                KeyProperties.BlockMode.fromKeymaster(a.keyParameter.integer)
+                                KeyProperties.BlockMode.fromKeymaster(
+                                        a.keyParameter.value.getBlockMode())
                         );
                         break;
                     case KeymasterDefs.KM_TAG_USER_AUTH_TYPE:
+                        int authenticatorType = a.keyParameter.value.getHardwareAuthenticatorType();
                         if (KeyStore2ParameterUtils.isSecureHardware(a.securityLevel)) {
-                            keymasterHwEnforcedUserAuthenticators = a.keyParameter.integer;
+                            keymasterHwEnforcedUserAuthenticators = authenticatorType;
                         } else {
-                            keymasterSwEnforcedUserAuthenticators = a.keyParameter.integer;
+                            keymasterSwEnforcedUserAuthenticators = authenticatorType;
                         }
                         break;
                     case KeymasterDefs.KM_TAG_USER_SECURE_ID:
                         keymasterSecureUserIds.add(
-                                KeymasterArguments.toUint64(a.keyParameter.longInteger));
+                                KeymasterArguments.toUint64(
+                                        a.keyParameter.value.getLongInteger()));
                         break;
                     case KeymasterDefs.KM_TAG_ACTIVE_DATETIME:
                         keyValidityStart = KeyStore2ParameterUtils.getDate(a);
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSignatureSpiBase.java
index a168f8f..96da1e0 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;
@@ -30,10 +30,12 @@
 import java.nio.ByteBuffer;
 import java.security.InvalidKeyException;
 import java.security.InvalidParameterException;
+import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.ProviderException;
 import java.security.PublicKey;
 import java.security.SecureRandom;
+import java.security.Signature;
 import java.security.SignatureException;
 import java.security.SignatureSpi;
 import java.util.ArrayList;
@@ -76,6 +78,13 @@
      */
     private Exception mCachedException;
 
+    /**
+     * This signature object is used for public key operations, i.e, signatrue verification.
+     * The Android Keystore backend does not perform public key operations and defers to the
+     * Highest priority provider.
+     */
+    private Signature mSignature;
+
     AndroidKeyStoreSignatureSpiBase() {
         mOperation = null;
         mOperationChallenge = 0;
@@ -84,6 +93,7 @@
         appRandom = null;
         mMessageStreamer = null;
         mCachedException = null;
+        mSignature = null;
     }
 
     @Override
@@ -123,27 +133,13 @@
     protected final void engineInitVerify(PublicKey publicKey) throws InvalidKeyException {
         resetAll();
 
-        boolean success = false;
         try {
-            if (publicKey == null) {
-                throw new InvalidKeyException("Unsupported key: null");
-            }
-            AndroidKeyStoreKey keystoreKey;
-            if (publicKey instanceof AndroidKeyStorePublicKey) {
-                keystoreKey = (AndroidKeyStorePublicKey) publicKey;
-            } else {
-                throw new InvalidKeyException("Unsupported public key type: " + publicKey);
-            }
-            mSigning = false;
-            initKey(keystoreKey);
-            appRandom = null;
-            ensureKeystoreOperationInitialized();
-            success = true;
-        } finally {
-            if (!success) {
-                resetAll();
-            }
+            mSignature = Signature.getInstance(getAlgorithm());
+        } catch (NoSuchAlgorithmException e) {
+            throw new InvalidKeyException(e);
         }
+
+        mSignature.initVerify(publicKey);
     }
 
     /**
@@ -251,6 +247,11 @@
 
     @Override
     protected final void engineUpdate(byte[] b, int off, int len) throws SignatureException {
+        if (mSignature != null) {
+            mSignature.update(b, off, len);
+            return;
+        }
+
         if (mCachedException != null) {
             throw new SignatureException(mCachedException);
         }
@@ -337,39 +338,10 @@
 
     @Override
     protected final boolean engineVerify(byte[] signature) throws SignatureException {
-        if (mCachedException != null) {
-            throw new SignatureException(mCachedException);
+        if (mSignature != null) {
+            return mSignature.verify(signature);
         }
-
-        try {
-            ensureKeystoreOperationInitialized();
-        } catch (InvalidKeyException e) {
-            throw new SignatureException(e);
-        }
-
-        boolean verified;
-        try {
-            byte[] output = mMessageStreamer.doFinal(
-                    EmptyArray.BYTE, 0, 0,
-                    signature);
-            if (output.length != 0) {
-                throw new ProviderException(
-                        "Signature verification unexpected produced output: " + output.length
-                        + " bytes");
-            }
-            verified = true;
-        } catch (KeyStoreException e) {
-            switch (e.getErrorCode()) {
-                case KeymasterDefs.KM_ERROR_VERIFICATION_FAILED:
-                    verified = false;
-                    break;
-                default:
-                    throw new SignatureException(e);
-            }
-        }
-
-        resetWhilePreservingInitState();
-        return verified;
+        throw new IllegalStateException("Not initialised.");
     }
 
     @Override
@@ -392,6 +364,13 @@
     }
 
     /**
+     * Implementations need to report the algorithm they implement so that we can delegate to the
+     * highest priority provider.
+     * @return Algorithm string.
+     */
+    protected abstract String getAlgorithm();
+
+    /**
      * Returns {@code true} if this signature is initialized for signing, {@code false} if this
      * signature is initialized for verification.
      */
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreSpi.java
index 9790a4a..5e7f648 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;
@@ -219,7 +219,7 @@
         return null;
     }
 
-    private static X509Certificate toCertificate(byte[] bytes) {
+    static X509Certificate toCertificate(byte[] bytes) {
         try {
             final CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
             return (X509Certificate) certFactory.generateCertificate(
@@ -250,13 +250,10 @@
             return null;
         }
 
-
-        // TODO add modification time to key metadata.
-        return null;
-        // if (response.metadata.modificationTime == -1) {
-        //     return null;
-        // }
-        // return new Date(response.metadata.modificationTime);
+        if (response.metadata.modificationTimeMs == -1) {
+            return null;
+        }
+        return new Date(response.metadata.modificationTimeMs);
     }
 
     @Override
diff --git a/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java b/keystore/java/android/security/keystore2/AndroidKeyStoreUnauthenticatedAESCipherSpi.java
index a2d4528..5c048a1 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;
@@ -42,7 +42,7 @@
  *
  * @hide
  */
-class AndroidKeyStoreUnauthenticatedAESCipherSpi extends AndroidKeyStoreCipherSpiBase {
+abstract class AndroidKeyStoreUnauthenticatedAESCipherSpi extends AndroidKeyStoreCipherSpiBase {
 
     abstract static class ECB extends AndroidKeyStoreUnauthenticatedAESCipherSpi {
         protected ECB(int keymasterPadding) {
@@ -53,12 +53,22 @@
             public NoPadding() {
                 super(KeymasterDefs.KM_PAD_NONE);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "AES/ECB/NoPadding";
+            }
         }
 
         public static class PKCS7Padding extends ECB {
             public PKCS7Padding() {
                 super(KeymasterDefs.KM_PAD_PKCS7);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "AES/ECB/PKCS7Padding";
+            }
         }
     }
 
@@ -71,12 +81,22 @@
             public NoPadding() {
                 super(KeymasterDefs.KM_PAD_NONE);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "AES/CBC/NoPadding";
+            }
         }
 
         public static class PKCS7Padding extends CBC {
             public PKCS7Padding() {
                 super(KeymasterDefs.KM_PAD_PKCS7);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "AES/CBC/PKCS7Padding";
+            }
         }
     }
 
@@ -89,6 +109,11 @@
             public NoPadding() {
                 super(KeymasterDefs.KM_PAD_NONE);
             }
+
+            @Override
+            protected final String getTransform() {
+                return "AES/CTR/NoPadding";
+            }
         }
     }
 
@@ -275,7 +300,7 @@
         if (parameters != null) {
             for (KeyParameter p : parameters) {
                 if (p.tag == KeymasterDefs.KM_TAG_NONCE) {
-                    returnedIv = p.blob;
+                    returnedIv = p.value.getBlob();
                     break;
                 }
             }
diff --git a/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java b/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
index 8fa532b..4c8ab8d 100644
--- a/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
+++ b/keystore/java/android/security/keystore2/KeyStore2ParameterUtils.java
@@ -18,8 +18,10 @@
 
 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.KeyParameterValue;
+import android.hardware.security.keymint.SecurityLevel;
+import android.hardware.security.keymint.Tag;
 import android.security.GateKeeper;
 import android.security.keymaster.KeymasterDefs;
 import android.security.keystore.KeyProperties;
@@ -50,7 +52,7 @@
         }
         KeyParameter p = new KeyParameter();
         p.tag = tag;
-        p.boolValue = true;
+        p.value = KeyParameterValue.boolValue(true);
         return p;
     }
 
@@ -62,14 +64,40 @@
      * @hide
      */
     static @NonNull KeyParameter makeEnum(int tag, int v) {
-        int type = KeymasterDefs.getTagType(tag);
-        if (type != KeymasterDefs.KM_ENUM && type != KeymasterDefs.KM_ENUM_REP) {
-            throw new IllegalArgumentException("Not an enum or repeatable enum tag: " + tag);
+        KeyParameter kp = new KeyParameter();
+        kp.tag = tag;
+        switch (tag) {
+            case Tag.PURPOSE:
+                kp.value = KeyParameterValue.keyPurpose(v);
+                break;
+            case Tag.ALGORITHM:
+                kp.value = KeyParameterValue.algorithm(v);
+                break;
+            case Tag.BLOCK_MODE:
+                kp.value = KeyParameterValue.blockMode(v);
+                break;
+            case Tag.DIGEST:
+                kp.value = KeyParameterValue.digest(v);
+                break;
+            case Tag.EC_CURVE:
+                kp.value = KeyParameterValue.ecCurve(v);
+                break;
+            case Tag.ORIGIN:
+                kp.value = KeyParameterValue.origin(v);
+                break;
+            case Tag.PADDING:
+                kp.value = KeyParameterValue.paddingMode(v);
+                break;
+            case Tag.USER_AUTH_TYPE:
+                kp.value = KeyParameterValue.hardwareAuthenticatorType(v);
+                break;
+            case Tag.HARDWARE_TYPE:
+                kp.value = KeyParameterValue.securityLevel(v);
+                break;
+            default:
+                throw new IllegalArgumentException("Not an enum or repeatable enum tag: " + tag);
         }
-        KeyParameter p = new KeyParameter();
-        p.tag = tag;
-        p.integer = v;
-        return p;
+        return kp;
     }
 
     /**
@@ -86,7 +114,7 @@
         }
         KeyParameter p = new KeyParameter();
         p.tag = tag;
-        p.integer = v;
+        p.value = KeyParameterValue.integer(v);
         return p;
     }
 
@@ -104,7 +132,7 @@
         }
         KeyParameter p = new KeyParameter();
         p.tag = tag;
-        p.longInteger = v;
+        p.value = KeyParameterValue.longInteger(v);
         return p;
     }
 
@@ -121,7 +149,7 @@
         }
         KeyParameter p = new KeyParameter();
         p.tag = tag;
-        p.blob = b;
+        p.value = KeyParameterValue.blob(b);
         return p;
     }
 
@@ -138,9 +166,10 @@
         }
         KeyParameter p = new KeyParameter();
         p.tag = tag;
-        p.longInteger = date.getTime();
-        if (p.longInteger < 0) {
-            throw new IllegalArgumentException("Date tag value out of range: " + p.longInteger);
+        p.value = KeyParameterValue.dateTime(date.getTime());
+        if (p.value.getDateTime() < 0) {
+            throw new IllegalArgumentException("Date tag value out of range: "
+                    + p.value.getDateTime());
         }
         return p;
     }
@@ -160,24 +189,24 @@
             throw new IllegalArgumentException("Not an int tag: " + param.keyParameter.tag);
         }
         // KM_UINT is 32 bits wide so we must suppress sign extension.
-        return ((long) param.keyParameter.integer) & 0xffffffffL;
+        return ((long) param.keyParameter.value.getInteger()) & 0xffffffffL;
     }
 
     static @NonNull Date getDate(@NonNull Authorization param) {
         if (KeymasterDefs.getTagType(param.keyParameter.tag) != KeymasterDefs.KM_DATE) {
             throw new IllegalArgumentException("Not a date tag: " + param.keyParameter.tag);
         }
-        if (param.keyParameter.longInteger < 0) {
+        if (param.keyParameter.value.getDateTime() < 0) {
             throw new IllegalArgumentException("Date Value too large: "
-                    + param.keyParameter.longInteger);
+                    + param.keyParameter.value.getDateTime());
         }
-        return new Date(param.keyParameter.longInteger);
+        return new Date(param.keyParameter.value.getDateTime());
     }
 
     static void forEachSetFlag(int flags, Consumer<Integer> consumer) {
         int offset = 0;
         while (flags != 0) {
-            if ((flags & 1) == 0) {
+            if ((flags & 1) == 1) {
                 consumer.accept(1 << offset);
             }
             offset += 1;
diff --git a/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java b/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
index 3b11854..f87a3d2 100644
--- a/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
+++ b/keystore/java/android/security/keystore2/KeyStoreCryptoOperationUtils.java
@@ -57,7 +57,7 @@
         for (Authorization p : key.getAuthorizations()) {
             switch(p.keyParameter.tag) {
                 case KeymasterDefs.KM_TAG_USER_SECURE_ID:
-                    keySids.add(p.keyParameter.longInteger);
+                    keySids.add(p.keyParameter.value.getLongInteger());
                     break;
                 default:
                     break;
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/androidfw/Android.bp b/libs/androidfw/Android.bp
index aa34edf..6a7df94 100644
--- a/libs/androidfw/Android.bp
+++ b/libs/androidfw/Android.bp
@@ -61,6 +61,9 @@
     ],
     export_include_dirs: ["include"],
     export_shared_lib_headers: ["libz"],
+    static_libs: ["libincfs-utils"],
+    whole_static_libs: ["libincfs-utils"],
+    export_static_lib_headers: ["libincfs-utils"],
     target: {
         android: {
             srcs: [
@@ -69,13 +72,14 @@
                 "CursorWindow.cpp",
             ],
             shared_libs: [
-                "libziparchive",
                 "libbase",
                 "libbinder",
                 "liblog",
                 "libcutils",
+                "libincfs",
                 "libutils",
                 "libz",
+                "libziparchive",
             ],
             static: {
                 enabled: false,
@@ -86,11 +90,11 @@
                 enabled: false,
             },
             static_libs: [
-                "libziparchive",
                 "libbase",
-                "liblog",
                 "libcutils",
+                "liblog",
                 "libutils",
+                "libziparchive",
             ],
             shared_libs: [
                 "libz",
diff --git a/libs/androidfw/ApkAssets.cpp b/libs/androidfw/ApkAssets.cpp
index e15b42d..cb56a51 100755
--- a/libs/androidfw/ApkAssets.cpp
+++ b/libs/androidfw/ApkAssets.cpp
@@ -25,13 +25,11 @@
 #include "android-base/unique_fd.h"
 #include "android-base/utf8.h"
 #include "utils/Compat.h"
-#include "utils/FileMap.h"
 #include "ziparchive/zip_archive.h"
 
 #include "androidfw/Asset.h"
 #include "androidfw/Idmap.h"
 #include "androidfw/misc.h"
-#include "androidfw/ResourceTypes.h"
 #include "androidfw/Util.h"
 
 namespace android {
@@ -161,50 +159,46 @@
     }
 
     const int fd = ::GetFileDescriptor(zip_handle_.get());
-     const off64_t fd_offset = ::GetFileDescriptorOffset(zip_handle_.get());
+    const off64_t fd_offset = ::GetFileDescriptorOffset(zip_handle_.get());
+    incfs::IncFsFileMap asset_map;
     if (entry.method == kCompressDeflated) {
-      std::unique_ptr<FileMap> map = util::make_unique<FileMap>();
-      if (!map->create(GetPath(), fd, entry.offset + fd_offset, entry.compressed_length,
-                       true /*readOnly*/)) {
+      if (!asset_map.Create(fd, entry.offset + fd_offset, entry.compressed_length, GetPath())) {
         LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << friendly_name_ << "'";
         return {};
       }
 
       std::unique_ptr<Asset> asset =
-          Asset::createFromCompressedMap(std::move(map), entry.uncompressed_length, mode);
+          Asset::createFromCompressedMap(std::move(asset_map), entry.uncompressed_length, mode);
       if (asset == nullptr) {
         LOG(ERROR) << "Failed to decompress '" << path << "' in APK '" << friendly_name_ << "'";
         return {};
       }
       return asset;
-    } else {
-      std::unique_ptr<FileMap> map = util::make_unique<FileMap>();
-      if (!map->create(GetPath(), fd, entry.offset + fd_offset, entry.uncompressed_length,
-                       true /*readOnly*/)) {
-        LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << friendly_name_ << "'";
-        return {};
-      }
-
-      unique_fd ufd;
-      if (!GetPath()) {
-        // If the `path` is not set, create a new `fd` for the new Asset to own in order to create
-        // new file descriptors using Asset::openFileDescriptor. If the path is set, it will be used
-        // to create new file descriptors.
-        ufd = unique_fd(dup(fd));
-        if (!ufd.ok()) {
-          LOG(ERROR) << "Unable to dup fd '" << path << "' in APK '" << friendly_name_ << "'";
-          return {};
-        }
-      }
-
-      std::unique_ptr<Asset> asset = Asset::createFromUncompressedMap(std::move(map),
-          std::move(ufd), mode);
-      if (asset == nullptr) {
-        LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << friendly_name_ << "'";
-        return {};
-      }
-      return asset;
     }
+
+    if (!asset_map.Create(fd, entry.offset + fd_offset, entry.uncompressed_length, GetPath())) {
+      LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << friendly_name_ << "'";
+      return {};
+    }
+
+    unique_fd ufd;
+    if (!GetPath()) {
+      // If the `path` is not set, create a new `fd` for the new Asset to own in order to create
+      // new file descriptors using Asset::openFileDescriptor. If the path is set, it will be used
+      // to create new file descriptors.
+      ufd = unique_fd(dup(fd));
+      if (!ufd.ok()) {
+        LOG(ERROR) << "Unable to dup fd '" << path << "' in APK '" << friendly_name_ << "'";
+        return {};
+      }
+    }
+
+    auto asset = Asset::createFromUncompressedMap(std::move(asset_map), mode, std::move(ufd));
+    if (asset == nullptr) {
+      LOG(ERROR) << "Failed to mmap file '" << path << "' in APK '" << friendly_name_ << "'";
+      return {};
+    }
+    return asset;
   }
 
  private:
@@ -446,8 +440,8 @@
     }
   }
 
-  std::unique_ptr<FileMap> file_map = util::make_unique<FileMap>();
-  if (!file_map->create(path, fd, offset, static_cast<size_t>(length), true /*readOnly*/)) {
+  incfs::IncFsFileMap file_map;
+  if (!file_map.Create(fd, offset, static_cast<size_t>(length), path)) {
     LOG(ERROR) << "Failed to mmap file '" << ((path) ? path : "anon") << "': "
                << SystemErrorCodeToString(errno);
     return {};
@@ -456,8 +450,8 @@
   // If `path` is set, do not pass ownership of the `fd` to the new Asset since
   // Asset::openFileDescriptor can use `path` to create new file descriptors.
   return Asset::createFromUncompressedMap(std::move(file_map),
-                                          (path) ? base::unique_fd(-1) : std::move(fd),
-                                          Asset::AccessMode::ACCESS_RANDOM);
+                                          Asset::AccessMode::ACCESS_RANDOM,
+                                          (path) ? base::unique_fd(-1) : std::move(fd));
 }
 
 std::unique_ptr<const ApkAssets> ApkAssets::LoadImpl(
@@ -493,15 +487,14 @@
   loaded_apk->idmap_asset_ = std::move(idmap_asset);
   loaded_apk->loaded_idmap_ = std::move(idmap);
 
-  const StringPiece data(
-      reinterpret_cast<const char*>(loaded_apk->resources_asset_->getBuffer(true /*wordAligned*/)),
-      loaded_apk->resources_asset_->getLength());
-  if (data.data() == nullptr || data.empty()) {
+  const auto data = loaded_apk->resources_asset_->getIncFsBuffer(true /* aligned */);
+  const size_t length = loaded_apk->resources_asset_->getLength();
+  if (!data || length == 0) {
     LOG(ERROR) << "Failed to read '" << kResourcesArsc << "' data in APK '" << path << "'.";
     return {};
   }
 
-  loaded_apk->loaded_arsc_ = LoadedArsc::Load(data, loaded_apk->loaded_idmap_.get(),
+  loaded_apk->loaded_arsc_ = LoadedArsc::Load(data, length, loaded_apk->loaded_idmap_.get(),
                                               property_flags);
   if (!loaded_apk->loaded_arsc_) {
     LOG(ERROR) << "Failed to load '" << kResourcesArsc << "' in APK '" << path << "'.";
@@ -525,15 +518,15 @@
       new ApkAssets(std::move(assets), path, last_mod_time, property_flags));
   loaded_apk->resources_asset_ = std::move(resources_asset);
 
-  const StringPiece data(
-      reinterpret_cast<const char*>(loaded_apk->resources_asset_->getBuffer(true /*wordAligned*/)),
-      loaded_apk->resources_asset_->getLength());
-  if (data.data() == nullptr || data.empty()) {
+  const auto data = loaded_apk->resources_asset_->getIncFsBuffer(true /* aligned */);
+  const size_t length = loaded_apk->resources_asset_->getLength();
+  if (!data || length == 0) {
     LOG(ERROR) << "Failed to read resources table data in '" << path << "'.";
     return {};
   }
 
-  loaded_apk->loaded_arsc_ = LoadedArsc::Load(data, nullptr, property_flags);
+  loaded_apk->loaded_arsc_ = LoadedArsc::Load(data, length, nullptr /* loaded_idmap */,
+                                              property_flags);
   if (loaded_apk->loaded_arsc_ == nullptr) {
     LOG(ERROR) << "Failed to read resources table in '" << path << "'.";
     return {};
@@ -550,7 +543,6 @@
   }
   return (!loaded_idmap_ || loaded_idmap_->IsUpToDate()) &&
       last_mod_time_ == getFileModDate(path_.c_str());
-
 }
 
 }  // namespace android
diff --git a/libs/androidfw/Asset.cpp b/libs/androidfw/Asset.cpp
index cd30c18..4fbe4a3 100644
--- a/libs/androidfw/Asset.cpp
+++ b/libs/androidfw/Asset.cpp
@@ -298,34 +298,18 @@
 /*
  * Create a new Asset from a memory mapping.
  */
-/*static*/ Asset* Asset::createFromUncompressedMap(FileMap* dataMap, AccessMode mode)
+/*static*/ std::unique_ptr<Asset> Asset::createFromUncompressedMap(incfs::IncFsFileMap&& dataMap,
+                                                                   AccessMode mode,
+                                                                   base::unique_fd fd)
 {
-    _FileAsset* pAsset;
-    status_t result;
+    auto pAsset = util::make_unique<_FileAsset>();
 
-    pAsset = new _FileAsset;
-    result = pAsset->openChunk(dataMap, base::unique_fd(-1));
-    if (result != NO_ERROR) {
-        delete pAsset;
-        return NULL;
-    }
-
-    pAsset->mAccessMode = mode;
-    return pAsset;
-}
-
-/*static*/ std::unique_ptr<Asset> Asset::createFromUncompressedMap(std::unique_ptr<FileMap> dataMap,
-    base::unique_fd fd, AccessMode mode)
-{
-    std::unique_ptr<_FileAsset> pAsset = util::make_unique<_FileAsset>();
-
-    status_t result = pAsset->openChunk(dataMap.get(), std::move(fd));
+    status_t result = pAsset->openChunk(std::move(dataMap), std::move(fd));
     if (result != NO_ERROR) {
         return NULL;
     }
 
     // We succeeded, so relinquish control of dataMap
-    (void) dataMap.release();
     pAsset->mAccessMode = mode;
     return std::move(pAsset);
 }
@@ -333,35 +317,18 @@
 /*
  * Create a new Asset from compressed data in a memory mapping.
  */
-/*static*/ Asset* Asset::createFromCompressedMap(FileMap* dataMap,
-    size_t uncompressedLen, AccessMode mode)
+/*static*/ std::unique_ptr<Asset> Asset::createFromCompressedMap(incfs::IncFsFileMap&& dataMap,
+                                                                 size_t uncompressedLen,
+                                                                 AccessMode mode)
 {
-    _CompressedAsset* pAsset;
-    status_t result;
+  auto pAsset = util::make_unique<_CompressedAsset>();
 
-    pAsset = new _CompressedAsset;
-    result = pAsset->openChunk(dataMap, uncompressedLen);
-    if (result != NO_ERROR) {
-        delete pAsset;
-        return NULL;
-    }
-
-    pAsset->mAccessMode = mode;
-    return pAsset;
-}
-
-/*static*/ std::unique_ptr<Asset> Asset::createFromCompressedMap(std::unique_ptr<FileMap> dataMap,
-    size_t uncompressedLen, AccessMode mode)
-{
-  std::unique_ptr<_CompressedAsset> pAsset = util::make_unique<_CompressedAsset>();
-
-  status_t result = pAsset->openChunk(dataMap.get(), uncompressedLen);
+  status_t result = pAsset->openChunk(std::move(dataMap), uncompressedLen);
   if (result != NO_ERROR) {
       return NULL;
   }
 
   // We succeeded, so relinquish control of dataMap
-  (void) dataMap.release();
   pAsset->mAccessMode = mode;
   return std::move(pAsset);
 }
@@ -414,7 +381,7 @@
  * Constructor.
  */
 _FileAsset::_FileAsset(void)
-    : mStart(0), mLength(0), mOffset(0), mFp(NULL), mFileName(NULL), mFd(-1), mMap(NULL), mBuf(NULL)
+    : mStart(0), mLength(0), mOffset(0), mFp(NULL), mFileName(NULL), mFd(-1), mBuf(NULL)
 {
     // Register the Asset with the global list here after it is fully constructed and its
     // vtable pointer points to this concrete type. b/31113965
@@ -441,7 +408,7 @@
 status_t _FileAsset::openChunk(const char* fileName, int fd, off64_t offset, size_t length)
 {
     assert(mFp == NULL);    // no reopen
-    assert(mMap == NULL);
+    assert(!mMap.has_value());
     assert(fd >= 0);
     assert(offset >= 0);
 
@@ -484,15 +451,15 @@
 /*
  * Create the chunk from the map.
  */
-status_t _FileAsset::openChunk(FileMap* dataMap, base::unique_fd fd)
+status_t _FileAsset::openChunk(incfs::IncFsFileMap&& dataMap, base::unique_fd fd)
 {
     assert(mFp == NULL);    // no reopen
-    assert(mMap == NULL);
+    assert(!mMap.has_value());
     assert(dataMap != NULL);
 
-    mMap = dataMap;
+    mMap = std::move(dataMap);
     mStart = -1;            // not used
-    mLength = dataMap->getDataLength();
+    mLength = mMap->length();
     mFd = std::move(fd);
     assert(mOffset == 0);
 
@@ -528,10 +495,15 @@
     if (!count)
         return 0;
 
-    if (mMap != NULL) {
+    if (mMap.has_value()) {
         /* copy from mapped area */
         //printf("map read\n");
-        memcpy(buf, (char*)mMap->getDataPtr() + mOffset, count);
+        const auto readPos = mMap->data().offset(mOffset).convert<char>();
+        if (!readPos.verify(count)) {
+            return -1;
+        }
+
+        memcpy(buf, readPos.unsafe_ptr(), count);
         actual = count;
     } else if (mBuf != NULL) {
         /* copy from buffer */
@@ -594,10 +566,6 @@
  */
 void _FileAsset::close(void)
 {
-    if (mMap != NULL) {
-        delete mMap;
-        mMap = NULL;
-    }
     if (mBuf != NULL) {
         delete[] mBuf;
         mBuf = NULL;
@@ -624,16 +592,21 @@
  * level and we'd be using a different object, but we didn't, so we
  * deal with it here.
  */
-const void* _FileAsset::getBuffer(bool wordAligned)
+const void* _FileAsset::getBuffer(bool aligned)
+{
+    return getIncFsBuffer(aligned).unsafe_ptr();
+}
+
+incfs::map_ptr<void> _FileAsset::getIncFsBuffer(bool aligned)
 {
     /* subsequent requests just use what we did previously */
     if (mBuf != NULL)
         return mBuf;
-    if (mMap != NULL) {
-        if (!wordAligned) {
-            return  mMap->getDataPtr();
+    if (mMap.has_value()) {
+        if (!aligned) {
+            return mMap->data();
         }
-        return ensureAlignment(mMap);
+        return ensureAlignment(*mMap);
     }
 
     assert(mFp != NULL);
@@ -671,47 +644,44 @@
         mBuf = buf;
         return mBuf;
     } else {
-        FileMap* map;
-
-        map = new FileMap;
-        if (!map->create(NULL, fileno(mFp), mStart, mLength, true)) {
-            delete map;
+        incfs::IncFsFileMap map;
+        if (!map.Create(fileno(mFp), mStart, mLength, NULL /* file_name */ )) {
             return NULL;
         }
 
         ALOGV(" getBuffer: mapped\n");
 
-        mMap = map;
-        if (!wordAligned) {
-            return  mMap->getDataPtr();
+        mMap = std::move(map);
+        if (!aligned) {
+            return mMap->data();
         }
-        return ensureAlignment(mMap);
+        return ensureAlignment(*mMap);
     }
 }
 
 int _FileAsset::openFileDescriptor(off64_t* outStart, off64_t* outLength) const
 {
-    if (mMap != NULL) {
+    if (mMap.has_value()) {
         if (mFd.ok()) {
-          *outStart = mMap->getDataOffset();
-          *outLength = mMap->getDataLength();
-          const int fd = dup(mFd);
-          if (fd < 0) {
-            ALOGE("Unable to dup fd (%d).", mFd.get());
-            return -1;
-          }
-          lseek64(fd, 0, SEEK_SET);
-          return fd;
+            *outStart = mMap->offset();
+            *outLength = mMap->length();
+            const int fd = dup(mFd);
+            if (fd < 0) {
+                ALOGE("Unable to dup fd (%d).", mFd.get());
+                return -1;
+            }
+            lseek64(fd, 0, SEEK_SET);
+            return fd;
         }
-        const char* fname = mMap->getFileName();
+        const char* fname = mMap->file_name();
         if (fname == NULL) {
             fname = mFileName;
         }
         if (fname == NULL) {
             return -1;
         }
-        *outStart = mMap->getDataOffset();
-        *outLength = mMap->getDataLength();
+        *outStart = mMap->offset();
+        *outLength = mMap->length();
         return open(fname, O_RDONLY | O_BINARY);
     }
     if (mFileName == NULL) {
@@ -722,16 +692,21 @@
     return open(mFileName, O_RDONLY | O_BINARY);
 }
 
-const void* _FileAsset::ensureAlignment(FileMap* map)
+incfs::map_ptr<void> _FileAsset::ensureAlignment(const incfs::IncFsFileMap& map)
 {
-    void* data = map->getDataPtr();
-    if ((((size_t)data)&0x3) == 0) {
+    const auto data = map.data();
+    if (util::IsFourByteAligned(data)) {
         // We can return this directly if it is aligned on a word
         // boundary.
         ALOGV("Returning aligned FileAsset %p (%s).", this,
                 getAssetSource());
         return data;
     }
+
+     if (!data.convert<uint8_t>().verify(mLength)) {
+        return NULL;
+    }
+
     // If not aligned on a word boundary, then we need to copy it into
     // our own buffer.
     ALOGV("Copying FileAsset %p (%s) to buffer size %d to make it aligned.", this,
@@ -741,7 +716,8 @@
         ALOGE("alloc of %ld bytes failed\n", (long) mLength);
         return NULL;
     }
-    memcpy(buf, data, mLength);
+
+    memcpy(buf, data.unsafe_ptr(), mLength);
     mBuf = buf;
     return buf;
 }
@@ -757,7 +733,7 @@
  */
 _CompressedAsset::_CompressedAsset(void)
     : mStart(0), mCompressedLen(0), mUncompressedLen(0), mOffset(0),
-      mMap(NULL), mFd(-1), mZipInflater(NULL), mBuf(NULL)
+      mFd(-1), mZipInflater(NULL), mBuf(NULL)
 {
     // Register the Asset with the global list here after it is fully constructed and its
     // vtable pointer points to this concrete type. b/31113965
@@ -786,7 +762,7 @@
     int compressionMethod, size_t uncompressedLen, size_t compressedLen)
 {
     assert(mFd < 0);        // no re-open
-    assert(mMap == NULL);
+    assert(!mMap.has_value());
     assert(fd >= 0);
     assert(offset >= 0);
     assert(compressedLen > 0);
@@ -815,20 +791,20 @@
  *
  * Nothing is expanded until the first read call.
  */
-status_t _CompressedAsset::openChunk(FileMap* dataMap, size_t uncompressedLen)
+status_t _CompressedAsset::openChunk(incfs::IncFsFileMap&& dataMap, size_t uncompressedLen)
 {
     assert(mFd < 0);        // no re-open
-    assert(mMap == NULL);
+    assert(!mMap.has_value());
     assert(dataMap != NULL);
 
-    mMap = dataMap;
+    mMap = std::move(dataMap);
     mStart = -1;        // not used
-    mCompressedLen = dataMap->getDataLength();
+    mCompressedLen = mMap->length();
     mUncompressedLen = uncompressedLen;
     assert(mOffset == 0);
 
     if (uncompressedLen > StreamingZipInflater::OUTPUT_CHUNK_SIZE) {
-        mZipInflater = new StreamingZipInflater(dataMap, uncompressedLen);
+        mZipInflater = new StreamingZipInflater(&(*mMap), uncompressedLen);
     }
     return NO_ERROR;
 }
@@ -901,11 +877,6 @@
  */
 void _CompressedAsset::close(void)
 {
-    if (mMap != NULL) {
-        delete mMap;
-        mMap = NULL;
-    }
-
     delete[] mBuf;
     mBuf = NULL;
 
@@ -940,8 +911,8 @@
         goto bail;
     }
 
-    if (mMap != NULL) {
-        if (!ZipUtils::inflateToBuffer(mMap->getDataPtr(), buf,
+    if (mMap.has_value()) {
+        if (!ZipUtils::inflateToBuffer(mMap->data(), buf,
                 mUncompressedLen, mCompressedLen))
             goto bail;
     } else {
@@ -976,3 +947,6 @@
     return mBuf;
 }
 
+incfs::map_ptr<void> _CompressedAsset::getIncFsBuffer(bool aligned) {
+    return incfs::map_ptr<void>(getBuffer(aligned));
+}
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index f7c8337..fb2b571 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -917,7 +917,7 @@
 Asset* AssetManager::openAssetFromZipLocked(const ZipFileRO* pZipFile,
     const ZipEntryRO entry, AccessMode mode, const String8& entryName)
 {
-    Asset* pAsset = NULL;
+    std::unique_ptr<Asset> pAsset;
 
     // TODO: look for previously-created shared memory slice?
     uint16_t method;
@@ -932,28 +932,28 @@
         return NULL;
     }
 
-    FileMap* dataMap = pZipFile->createEntryFileMap(entry);
-    if (dataMap == NULL) {
+    std::optional<incfs::IncFsFileMap> dataMap = pZipFile->createEntryIncFsFileMap(entry);
+    if (!dataMap.has_value()) {
         ALOGW("create map from entry failed\n");
         return NULL;
     }
 
     if (method == ZipFileRO::kCompressStored) {
-        pAsset = Asset::createFromUncompressedMap(dataMap, mode);
+        pAsset = Asset::createFromUncompressedMap(std::move(*dataMap), mode);
         ALOGV("Opened uncompressed entry %s in zip %s mode %d: %p", entryName.string(),
-                dataMap->getFileName(), mode, pAsset);
+                dataMap->file_name(), mode, pAsset.get());
     } else {
-        pAsset = Asset::createFromCompressedMap(dataMap,
+        pAsset = Asset::createFromCompressedMap(std::move(*dataMap),
             static_cast<size_t>(uncompressedLen), mode);
         ALOGV("Opened compressed entry %s in zip %s mode %d: %p", entryName.string(),
-                dataMap->getFileName(), mode, pAsset);
+                dataMap->file_name(), mode, pAsset.get());
     }
     if (pAsset == NULL) {
         /* unexpected */
         ALOGW("create from segment failed\n");
     }
 
-    return pAsset;
+    return pAsset.release();
 }
 
 /*
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index 99dd313..bec80a7 100644
--- a/libs/androidfw/AssetManager2.cpp
+++ b/libs/androidfw/AssetManager2.cpp
@@ -38,9 +38,43 @@
 
 namespace android {
 
+namespace {
+
+using EntryValue = std::variant<Res_value, incfs::verified_map_ptr<ResTable_map_entry>>;
+
+base::expected<EntryValue, IOError> GetEntryValue(
+    incfs::verified_map_ptr<ResTable_entry> table_entry) {
+  const uint16_t entry_size = dtohs(table_entry->size);
+
+  // Check if the entry represents a bag value.
+  if (entry_size >= sizeof(ResTable_map_entry) &&
+      (dtohs(table_entry->flags) & ResTable_entry::FLAG_COMPLEX)) {
+    const auto map_entry = table_entry.convert<ResTable_map_entry>();
+    if (!map_entry) {
+      return base::unexpected(IOError::PAGES_MISSING);
+    }
+    return map_entry.verified();
+  }
+
+  // The entry represents a non-bag value.
+  const auto entry_value = table_entry.offset(entry_size).convert<Res_value>();
+  if (!entry_value) {
+    return base::unexpected(IOError::PAGES_MISSING);
+  }
+  Res_value value;
+  value.copyFrom_dtoh(entry_value.value());
+  return value;
+}
+
+} // namespace
+
 struct FindEntryResult {
-  // A pointer to the value of the resource table entry.
-  std::variant<Res_value, const ResTable_map_entry*> entry;
+  // The cookie representing the ApkAssets in which the value resides.
+  ApkAssetsCookie cookie;
+
+  // The value of the resource table entry. Either an android::Res_value for non-bag types or an
+  // incfs::verified_map_ptr<ResTable_map_entry> for bag types.
+  EntryValue entry;
 
   // The configuration for which the resulting entry was defined. This is already swapped to host
   // endianness.
@@ -265,7 +299,7 @@
   }
 
   const PackageGroup& package_group = package_groups_[idx];
-  if (package_group.packages_.size() == 0) {
+  if (package_group.packages_.empty()) {
     return nullptr;
   }
 
@@ -310,14 +344,14 @@
     for (auto it = loaded_package->begin(); it != loaded_package->end(); it++) {
       const OverlayableInfo* info = loaded_package->GetOverlayableInfo(*it);
       if (info != nullptr) {
-        ResourceName res_name;
-        if (!GetResourceName(*it, &res_name)) {
+        auto res_name = GetResourceName(*it);
+        if (!res_name.has_value()) {
           ANDROID_LOG(ERROR) << base::StringPrintf(
               "Unable to retrieve name of overlayable resource 0x%08x", *it);
           return false;
         }
 
-        const std::string name = ToFormattedResourceString(&res_name);
+        const std::string name = ToFormattedResourceString(*res_name);
         output.append(base::StringPrintf(
             "resource='%s' overlayable='%s' actor='%s' policy='0x%08x'\n",
             name.c_str(), info->name.c_str(), info->actor.c_str(), info->policy_flags));
@@ -365,8 +399,8 @@
   return non_system_overlays;
 }
 
-std::set<ResTable_config> AssetManager2::GetResourceConfigurations(bool exclude_system,
-                                                                   bool exclude_mipmap) const {
+base::expected<std::set<ResTable_config>, IOError> AssetManager2::GetResourceConfigurations(
+    bool exclude_system, bool exclude_mipmap) const {
   ATRACE_NAME("AssetManager::GetResourceConfigurations");
   const auto non_system_overlays =
       (exclude_system) ? GetNonSystemOverlayPaths() : std::set<std::string>();
@@ -386,7 +420,10 @@
         continue;
       }
 
-      package.loaded_package_->CollectConfigurations(exclude_mipmap, &configurations);
+      auto result = package.loaded_package_->CollectConfigurations(exclude_mipmap, &configurations);
+      if (UNLIKELY(!result.has_value())) {
+        return base::unexpected(result.error());
+      }
     }
   }
   return configurations;
@@ -501,11 +538,11 @@
   return apk_assets_[cookie]->GetAssetsProvider()->Open(filename, mode);
 }
 
-ApkAssetsCookie AssetManager2::FindEntry(uint32_t resid, uint16_t density_override,
-                                         bool /*stop_at_first_match*/,
-                                         bool ignore_configuration,
-                                         FindEntryResult* out_entry) const {
-  if (resource_resolution_logging_enabled_) {
+base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntry(
+    uint32_t resid, uint16_t density_override, bool stop_at_first_match,
+    bool ignore_configuration) const {
+  const bool logging_enabled = resource_resolution_logging_enabled_;
+  if (UNLIKELY(logging_enabled)) {
     // Clear the last logged resource resolution.
     ResetResourceResolution();
     last_resolution_.resid = resid;
@@ -523,94 +560,96 @@
   }
 
   // Retrieve the package group from the package id of the resource id.
-  if (!is_valid_resid(resid)) {
+  if (UNLIKELY(!is_valid_resid(resid))) {
     LOG(ERROR) << base::StringPrintf("Invalid ID 0x%08x.", resid);
-    return kInvalidCookie;
+    return base::unexpected(std::nullopt);
   }
 
   const uint32_t package_id = get_package_id(resid);
   const uint8_t type_idx = get_type_id(resid) - 1;
   const uint16_t entry_idx = get_entry_id(resid);
   uint8_t package_idx = package_ids_[package_id];
-  if (package_idx == 0xff) {
+  if (UNLIKELY(package_idx == 0xff)) {
     ANDROID_LOG(ERROR) << base::StringPrintf("No package ID %02x found for ID 0x%08x.",
                                              package_id, resid);
-    return kInvalidCookie;
+    return base::unexpected(std::nullopt);
   }
 
   const PackageGroup& package_group = package_groups_[package_idx];
-  ApkAssetsCookie cookie = FindEntryInternal(package_group, type_idx, entry_idx, *desired_config,
-                                             false /* stop_at_first_match */,
-                                             ignore_configuration, out_entry);
-  if (UNLIKELY(cookie == kInvalidCookie)) {
-    return kInvalidCookie;
+  auto result = FindEntryInternal(package_group, type_idx, entry_idx, *desired_config,
+                                 stop_at_first_match, ignore_configuration);
+  if (UNLIKELY(!result.has_value())) {
+    return base::unexpected(result.error());
   }
 
-  if (!apk_assets_[cookie]->IsLoader()) {
+  if (!stop_at_first_match && !ignore_configuration && !apk_assets_[result->cookie]->IsLoader()) {
     for (const auto& id_map : package_group.overlays_) {
       auto overlay_entry = id_map.overlay_res_maps_.Lookup(resid);
       if (!overlay_entry) {
         // No id map entry exists for this target resource.
         continue;
-      } else if (overlay_entry.IsInlineValue()) {
+      }
+      if (overlay_entry.IsInlineValue()) {
         // The target resource is overlaid by an inline value not represented by a resource.
-        out_entry->entry = overlay_entry.GetInlineValue();
-        out_entry->dynamic_ref_table = id_map.overlay_res_maps_.GetOverlayDynamicRefTable();
-        cookie = id_map.cookie;
+        result->entry = overlay_entry.GetInlineValue();
+        result->dynamic_ref_table = id_map.overlay_res_maps_.GetOverlayDynamicRefTable();
+        result->cookie = id_map.cookie;
         continue;
       }
 
-      FindEntryResult overlay_result;
-      ApkAssetsCookie overlay_cookie = FindEntry(overlay_entry.GetResourceId(), density_override,
-                                                 false /* stop_at_first_match */,
-                                                 ignore_configuration, &overlay_result);
-      if (UNLIKELY(overlay_cookie == kInvalidCookie)) {
+      auto overlay_result = FindEntry(overlay_entry.GetResourceId(), density_override,
+                                      false /* stop_at_first_match */,
+                                      false /* ignore_configuration */);
+      if (UNLIKELY(IsIOError(overlay_result))) {
+        return base::unexpected(overlay_result.error());
+      }
+      if (!overlay_result.has_value()) {
         continue;
       }
 
-      if (!overlay_result.config.isBetterThan(out_entry->config, desired_config)
-          && overlay_result.config.compare(out_entry->config) != 0) {
+      if (!overlay_result->config.isBetterThan(result->config, desired_config)
+          && overlay_result->config.compare(result->config) != 0) {
         // The configuration of the entry for the overlay must be equal to or better than the target
         // configuration to be chosen as the better value.
         continue;
       }
 
-      cookie = overlay_cookie;
-      out_entry->entry = overlay_result.entry;
-      out_entry->config = overlay_result.config;
-      out_entry->dynamic_ref_table = id_map.overlay_res_maps_.GetOverlayDynamicRefTable();
-      if (resource_resolution_logging_enabled_) {
+      result->cookie = overlay_result->cookie;
+      result->entry = overlay_result->entry;
+      result->config = overlay_result->config;
+      result->dynamic_ref_table = id_map.overlay_res_maps_.GetOverlayDynamicRefTable();
+
+      if (UNLIKELY(logging_enabled)) {
         last_resolution_.steps.push_back(
-            Resolution::Step{Resolution::Step::Type::OVERLAID, overlay_result.config.toString(),
-                             overlay_result.package_name});
+            Resolution::Step{Resolution::Step::Type::OVERLAID, overlay_result->config.toString(),
+                             overlay_result->package_name});
       }
     }
   }
 
-  if (resource_resolution_logging_enabled_) {
-    last_resolution_.cookie = cookie;
-    last_resolution_.type_string_ref = out_entry->type_string_ref;
-    last_resolution_.entry_string_ref = out_entry->entry_string_ref;
+  if (UNLIKELY(logging_enabled)) {
+    last_resolution_.cookie = result->cookie;
+    last_resolution_.type_string_ref = result->type_string_ref;
+    last_resolution_.entry_string_ref = result->entry_string_ref;
   }
 
-  return cookie;
+  return result;
 }
 
-ApkAssetsCookie AssetManager2::FindEntryInternal(const PackageGroup& package_group,
-                                                 uint8_t type_idx, uint16_t entry_idx,
-                                                 const ResTable_config& desired_config,
-                                                 bool /*stop_at_first_match*/,
-                                                 bool ignore_configuration,
-                                                 FindEntryResult* out_entry) const {
+base::expected<FindEntryResult, NullOrIOError> AssetManager2::FindEntryInternal(
+    const PackageGroup& package_group, uint8_t type_idx, uint16_t entry_idx,
+    const ResTable_config& desired_config, bool stop_at_first_match,
+    bool ignore_configuration) const {
+  const bool logging_enabled = resource_resolution_logging_enabled_;
   ApkAssetsCookie best_cookie = kInvalidCookie;
   const LoadedPackage* best_package = nullptr;
-  const ResTable_type* best_type = nullptr;
+  incfs::verified_map_ptr<ResTable_type> best_type;
   const ResTable_config* best_config = nullptr;
   ResTable_config best_config_copy;
-  uint32_t best_offset = 0u;
-  uint32_t type_flags = 0u;
+  uint32_t best_offset = 0U;
+  uint32_t type_flags = 0U;
 
-  Resolution::Step::Type resolution_type = Resolution::Step::Type::NO_ENTRY;
+  auto resolution_type = Resolution::Step::Type::NO_ENTRY;
   std::vector<Resolution::Step> resolution_steps;
 
   // If desired_config is the same as the set configuration, then we can use our filtered list
@@ -630,17 +669,20 @@
       continue;
     }
 
+    auto entry_flags = type_spec->GetFlagsForEntryIndex(entry_idx);
+    if (UNLIKELY(!entry_flags.has_value())) {
+      return base::unexpected(entry_flags.error());
+    }
+    type_flags |= entry_flags.value();
+
     // If the package is an overlay or custom loader,
     // then even configurations that are the same MUST be chosen.
     const bool package_is_loader = loaded_package->IsCustomLoader();
-    type_flags |= type_spec->GetFlagsForEntryIndex(entry_idx);
 
     if (use_fast_path) {
       const FilteredConfigGroup& filtered_group = loaded_package_impl.filtered_configs_[type_idx];
-      const std::vector<ResTable_config>& candidate_configs = filtered_group.configurations;
-      const size_t type_count = candidate_configs.size();
-      for (uint32_t i = 0; i < type_count; i++) {
-        const ResTable_config& this_config = candidate_configs[i];
+      for (const auto& type_config : filtered_group.type_configs) {
+        const ResTable_config& this_config = type_config.config;
 
         // We can skip calling ResTable_config::match() because we know that all candidate
         // configurations that do NOT match have been filtered-out.
@@ -652,7 +694,7 @@
         } else if (package_is_loader && this_config.compare(*best_config) == 0) {
           resolution_type = Resolution::Step::Type::OVERLAID_LOADER;
         } else {
-          if (resource_resolution_logging_enabled_) {
+          if (UNLIKELY(logging_enabled)) {
             resolution_type = (package_is_loader) ? Resolution::Step::Type::SKIPPED_LOADER
                                                   : Resolution::Step::Type::SKIPPED;
             resolution_steps.push_back(Resolution::Step{resolution_type,
@@ -664,10 +706,13 @@
 
         // The configuration matches and is better than the previous selection.
         // Find the entry value if it exists for this configuration.
-        const ResTable_type* type = filtered_group.types[i];
-        const uint32_t offset = LoadedPackage::GetEntryOffset(type, entry_idx);
-        if (offset == ResTable_type::NO_ENTRY) {
-          if (resource_resolution_logging_enabled_) {
+        const auto& type = type_config.type;
+        const auto offset = LoadedPackage::GetEntryOffset(type, entry_idx);
+        if (UNLIKELY(IsIOError(offset))) {
+          return base::unexpected(offset.error());
+        }
+        if (!offset.has_value()) {
+          if (UNLIKELY(logging_enabled)) {
             if (package_is_loader) {
               resolution_type = Resolution::Step::Type::NO_ENTRY_LOADER;
             } else {
@@ -684,9 +729,9 @@
         best_package = loaded_package;
         best_type = type;
         best_config = &this_config;
-        best_offset = offset;
+        best_offset = offset.value();
 
-        if (resource_resolution_logging_enabled_) {
+        if (UNLIKELY(logging_enabled)) {
           last_resolution_.steps.push_back(Resolution::Step{resolution_type,
                                                             this_config.toString(),
                                                             &loaded_package->GetPackageName()});
@@ -700,10 +745,11 @@
       // ResTable_config, we must copy it.
       const auto iter_end = type_spec->types + type_spec->type_count;
       for (auto iter = type_spec->types; iter != iter_end; ++iter) {
-        ResTable_config this_config{};
+        const incfs::verified_map_ptr<ResTable_type>& type = *iter;
 
+        ResTable_config this_config{};
         if (!ignore_configuration) {
-          this_config.copyFromDtoH((*iter)->config);
+          this_config.copyFromDtoH(type->config);
           if (!this_config.match(desired_config)) {
             continue;
           }
@@ -722,24 +768,27 @@
 
         // The configuration matches and is better than the previous selection.
         // Find the entry value if it exists for this configuration.
-        const uint32_t offset = LoadedPackage::GetEntryOffset(*iter, entry_idx);
-        if (offset == ResTable_type::NO_ENTRY) {
+        const auto offset = LoadedPackage::GetEntryOffset(type, entry_idx);
+        if (UNLIKELY(IsIOError(offset))) {
+          return base::unexpected(offset.error());
+        }
+        if (!offset.has_value()) {
           continue;
         }
 
         best_cookie = cookie;
         best_package = loaded_package;
-        best_type = *iter;
+        best_type = type;
         best_config_copy = this_config;
         best_config = &best_config_copy;
-        best_offset = offset;
+        best_offset = offset.value();
 
-        if (ignore_configuration) {
+        if (stop_at_first_match) {
           // Any configuration will suffice, so break.
           break;
         }
 
-        if (resource_resolution_logging_enabled_) {
+        if (UNLIKELY(logging_enabled)) {
           last_resolution_.steps.push_back(Resolution::Step{resolution_type,
                                                             this_config.toString(),
                                                             &loaded_package->GetPackageName()});
@@ -749,36 +798,35 @@
   }
 
   if (UNLIKELY(best_cookie == kInvalidCookie)) {
-    return kInvalidCookie;
+    return base::unexpected(std::nullopt);
   }
 
-  const ResTable_entry* best_entry = LoadedPackage::GetEntryFromOffset(best_type, best_offset);
-  if (UNLIKELY(best_entry == nullptr)) {
-    return kInvalidCookie;
+  auto best_entry_result = LoadedPackage::GetEntryFromOffset(best_type, best_offset);
+  if (!best_entry_result.has_value()) {
+    return base::unexpected(best_entry_result.error());
   }
 
-  const uint16_t entry_size = dtohs(best_entry->size);
-  if (entry_size >= sizeof(ResTable_map_entry) &&
-      (dtohs(best_entry->flags) & ResTable_entry::FLAG_COMPLEX)) {
-    // The entry represents a bag/map.
-    out_entry->entry = reinterpret_cast<const ResTable_map_entry*>(best_entry);
-  } else {
-    // The entry represents a value.
-    Res_value value;
-    value.copyFrom_dtoh(*reinterpret_cast<const Res_value*>(
-        reinterpret_cast<const uint8_t*>(best_entry) + entry_size));
-    out_entry->entry = value;
+  const incfs::map_ptr<ResTable_entry> best_entry = *best_entry_result;
+  if (!best_entry) {
+    return base::unexpected(IOError::PAGES_MISSING);
   }
 
-  out_entry->config = *best_config;
-  out_entry->type_flags = type_flags;
-  out_entry->package_name = &best_package->GetPackageName();
-  out_entry->type_string_ref = StringPoolRef(best_package->GetTypeStringPool(), best_type->id - 1);
-  out_entry->entry_string_ref =
-          StringPoolRef(best_package->GetKeyStringPool(), best_entry->key.index);
-  out_entry->dynamic_ref_table = package_group.dynamic_ref_table.get();
+  const auto entry = GetEntryValue(best_entry.verified());
+  if (!entry.has_value()) {
+    return base::unexpected(entry.error());
+  }
 
-  return best_cookie;
+  return FindEntryResult{
+    .cookie = best_cookie,
+    .entry = *entry,
+    .config = *best_config,
+    .type_flags = type_flags,
+    .package_name = &best_package->GetPackageName(),
+    .type_string_ref = StringPoolRef(best_package->GetTypeStringPool(), best_type->id - 1),
+    .entry_string_ref = StringPoolRef(best_package->GetKeyStringPool(),
+                                      best_entry->key.index),
+    .dynamic_ref_table = package_group.dynamic_ref_table.get(),
+  };
 }
 
 void AssetManager2::ResetResourceResolution() const {
@@ -799,30 +847,28 @@
 std::string AssetManager2::GetLastResourceResolution() const {
   if (!resource_resolution_logging_enabled_) {
     LOG(ERROR) << "Must enable resource resolution logging before getting path.";
-    return std::string();
+    return {};
   }
 
   auto cookie = last_resolution_.cookie;
   if (cookie == kInvalidCookie) {
     LOG(ERROR) << "AssetManager hasn't resolved a resource to read resolution path.";
-    return std::string();
+    return {};
   }
 
   uint32_t resid = last_resolution_.resid;
   std::vector<Resolution::Step>& steps = last_resolution_.steps;
-
-  ResourceName resource_name;
   std::string resource_name_string;
 
   const LoadedPackage* package =
           apk_assets_[cookie]->GetLoadedArsc()->GetPackageById(get_package_id(resid));
 
   if (package != nullptr) {
-    ToResourceName(last_resolution_.type_string_ref,
-                   last_resolution_.entry_string_ref,
-                   package->GetPackageName(),
-                   &resource_name);
-    resource_name_string = ToFormattedResourceString(&resource_name);
+    auto resource_name = ToResourceName(last_resolution_.type_string_ref,
+                                        last_resolution_.entry_string_ref,
+                                        package->GetPackageName());
+    resource_name_string = resource_name.has_value() ?
+        ToFormattedResourceString(resource_name.value()) : "<unknown>";
   }
 
   std::stringstream log_stream;
@@ -875,200 +921,208 @@
   return log_stream.str();
 }
 
-bool AssetManager2::GetResourceName(uint32_t resid, ResourceName* out_name) const {
-  FindEntryResult entry;
-  ApkAssetsCookie cookie = FindEntry(resid, 0u /* density_override */,
-                                     true /* stop_at_first_match */,
-                                     true /* ignore_configuration */, &entry);
-  if (cookie == kInvalidCookie) {
-    return false;
+base::expected<AssetManager2::ResourceName, NullOrIOError> AssetManager2::GetResourceName(
+    uint32_t resid) const {
+  auto result = FindEntry(resid, 0u /* density_override */, true /* stop_at_first_match */,
+                          true /* ignore_configuration */);
+  if (!result.has_value()) {
+    return base::unexpected(result.error());
   }
 
-  return ToResourceName(entry.type_string_ref,
-                        entry.entry_string_ref,
-                        *entry.package_name,
-                        out_name);
+  return ToResourceName(result->type_string_ref,
+                        result->entry_string_ref,
+                        *result->package_name);
 }
 
-bool AssetManager2::GetResourceFlags(uint32_t resid, uint32_t* out_flags) const {
-  FindEntryResult entry;
-  ApkAssetsCookie cookie = FindEntry(resid, 0u /* density_override */,
-                                     false /* stop_at_first_match */,
-                                     true /* ignore_configuration */, &entry);
-  if (cookie != kInvalidCookie) {
-    *out_flags = entry.type_flags;
-    return true;
-  }
-  return false;
-}
-
-ApkAssetsCookie AssetManager2::GetResource(uint32_t resid, bool may_be_bag,
-                                           uint16_t density_override, Res_value* out_value,
-                                           ResTable_config* out_selected_config,
-                                           uint32_t* out_flags) const {
-  FindEntryResult entry;
-  ApkAssetsCookie cookie = FindEntry(resid, density_override, false /* stop_at_first_match */,
-                                     false /* ignore_configuration */, &entry);
-  if (cookie == kInvalidCookie) {
-    return kInvalidCookie;
+base::expected<AssetManager2::SelectedValue, NullOrIOError> AssetManager2::GetResource(
+    uint32_t resid, bool may_be_bag, uint16_t density_override) const {
+  auto result = FindEntry(resid, density_override, false /* stop_at_first_match */,
+                          false /* ignore_configuration */);
+  if (!result.has_value()) {
+    return base::unexpected(result.error());
   }
 
-  auto result_map_entry = std::get_if<const ResTable_map_entry*>(&entry.entry);
+  auto result_map_entry = std::get_if<incfs::verified_map_ptr<ResTable_map_entry>>(&result->entry);
   if (result_map_entry != nullptr) {
     if (!may_be_bag) {
       LOG(ERROR) << base::StringPrintf("Resource %08x is a complex map type.", resid);
-      return kInvalidCookie;
+      return base::unexpected(std::nullopt);
     }
 
     // Create a reference since we can't represent this complex type as a Res_value.
-    out_value->dataType = Res_value::TYPE_REFERENCE;
-    out_value->data = resid;
-    *out_selected_config = entry.config;
-    *out_flags = entry.type_flags;
-    return cookie;
+    return SelectedValue(Res_value::TYPE_REFERENCE, resid, result->cookie, result->type_flags,
+                         resid, result->config);
   }
 
   // Convert the package ID to the runtime assigned package ID.
-  *out_value = std::get<Res_value>(entry.entry);
-  entry.dynamic_ref_table->lookupResourceValue(out_value);
+  Res_value value = std::get<Res_value>(result->entry);
+  result->dynamic_ref_table->lookupResourceValue(&value);
 
-  *out_selected_config = entry.config;
-  *out_flags = entry.type_flags;
-  return cookie;
+  return SelectedValue(value.dataType, value.data, result->cookie, result->type_flags,
+                       resid, result->config);
 }
 
-ApkAssetsCookie AssetManager2::ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value,
-                                                ResTable_config* in_out_selected_config,
-                                                uint32_t* in_out_flags,
-                                                uint32_t* out_last_reference) const {
-  constexpr const int kMaxIterations = 20;
+base::expected<std::monostate, NullOrIOError> AssetManager2::ResolveReference(
+    AssetManager2::SelectedValue& value, bool cache_value) const {
+  if (value.type != Res_value::TYPE_REFERENCE || value.data == 0U) {
+    // Not a reference. Nothing to do.
+    return {};
+  }
 
-  for (size_t iteration = 0u; in_out_value->dataType == Res_value::TYPE_REFERENCE &&
-                              in_out_value->data != 0u && iteration < kMaxIterations;
-       iteration++) {
-    *out_last_reference = in_out_value->data;
-    uint32_t new_flags = 0u;
-    cookie = GetResource(in_out_value->data, true /*may_be_bag*/, 0u /*density_override*/,
-                         in_out_value, in_out_selected_config, &new_flags);
-    if (cookie == kInvalidCookie) {
-      return kInvalidCookie;
-    }
-    if (in_out_flags != nullptr) {
-      *in_out_flags |= new_flags;
-    }
-    if (*out_last_reference == in_out_value->data) {
-      // This reference can't be resolved, so exit now and let the caller deal with it.
-      return cookie;
+  const uint32_t original_flags = value.flags;
+  const uint32_t original_resid = value.data;
+  if (cache_value) {
+    auto cached_value = cached_resolved_values_.find(value.data);
+    if (cached_value != cached_resolved_values_.end()) {
+      value = cached_value->second;
+      value.flags |= original_flags;
+      return {};
     }
   }
-  return cookie;
+
+  uint32_t combined_flags = 0U;
+  uint32_t resolve_resid = original_resid;
+  constexpr const uint32_t kMaxIterations = 20;
+  for (uint32_t i = 0U;; i++) {
+    auto result = GetResource(resolve_resid, true /*may_be_bag*/);
+    if (!result.has_value()) {
+      value.resid = resolve_resid;
+      return base::unexpected(result.error());
+    }
+
+    // If resource resolution fails, the value should be set to the last reference that was able to
+    // be resolved successfully.
+    value = *result;
+    value.flags |= combined_flags;
+
+    if (result->type != Res_value::TYPE_REFERENCE ||
+        result->data == Res_value::DATA_NULL_UNDEFINED ||
+        result->data == resolve_resid || i == kMaxIterations) {
+      // This reference can't be resolved, so exit now and let the caller deal with it.
+      if (cache_value) {
+        cached_resolved_values_[original_resid] = value;
+      }
+
+      // Above value is cached without original_flags to ensure they don't get included in future
+      // queries that hit the cache
+      value.flags |= original_flags;
+      return {};
+    }
+
+    combined_flags = result->flags;
+    resolve_resid = result->data;
+  }
 }
 
-const std::vector<uint32_t> AssetManager2::GetBagResIdStack(uint32_t resid) {
+const std::vector<uint32_t> AssetManager2::GetBagResIdStack(uint32_t resid) const {
   auto cached_iter = cached_bag_resid_stacks_.find(resid);
   if (cached_iter != cached_bag_resid_stacks_.end()) {
     return cached_iter->second;
-  } else {
-    auto found_resids = std::vector<uint32_t>();
-    GetBag(resid, found_resids);
-    // Cache style stacks if they are not already cached.
-    cached_bag_resid_stacks_[resid] = found_resids;
-    return found_resids;
   }
+
+  std::vector<uint32_t> found_resids;
+  GetBag(resid, found_resids);
+  cached_bag_resid_stacks_.emplace(resid, found_resids);
+  return found_resids;
 }
 
-const ResolvedBag* AssetManager2::GetBag(uint32_t resid) {
-  auto found_resids = std::vector<uint32_t>();
-  auto bag = GetBag(resid, found_resids);
+base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::ResolveBag(
+    AssetManager2::SelectedValue& value) const {
+  if (UNLIKELY(value.type != Res_value::TYPE_REFERENCE)) {
+    return base::unexpected(std::nullopt);
+  }
 
-  // Cache style stacks if they are not already cached.
-  auto cached_iter = cached_bag_resid_stacks_.find(resid);
-  if (cached_iter == cached_bag_resid_stacks_.end()) {
-    cached_bag_resid_stacks_[resid] = found_resids;
+  auto bag = GetBag(value.data);
+  if (bag.has_value()) {
+    value.flags |= (*bag)->type_spec_flags;
   }
   return bag;
 }
 
-static bool compare_bag_entries(const ResolvedBag::Entry& entry1,
-    const ResolvedBag::Entry& entry2) {
-  return entry1.key < entry2.key;
+base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(uint32_t resid) const {
+  std::vector<uint32_t> found_resids;
+  const auto bag = GetBag(resid, found_resids);
+  cached_bag_resid_stacks_.emplace(resid, found_resids);
+  return bag;
 }
 
-const ResolvedBag* AssetManager2::GetBag(uint32_t resid, std::vector<uint32_t>& child_resids) {
-  auto cached_iter = cached_bags_.find(resid);
-  if (cached_iter != cached_bags_.end()) {
+base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(
+    uint32_t resid, std::vector<uint32_t>& child_resids) const {
+  if (auto cached_iter = cached_bags_.find(resid); cached_iter != cached_bags_.end()) {
     return cached_iter->second.get();
   }
 
-  FindEntryResult entry;
-  ApkAssetsCookie cookie = FindEntry(resid, 0u /* density_override */,
-                                     false /* stop_at_first_match */,
-                                     false /* ignore_configuration */,
-                                     &entry);
-  if (cookie == kInvalidCookie) {
-    return nullptr;
+  auto entry = FindEntry(resid, 0u /* density_override */, false /* stop_at_first_match */,
+                         false /* ignore_configuration */);
+  if (!entry.has_value()) {
+    return base::unexpected(entry.error());
   }
 
-  auto result_map_entry = std::get_if<const ResTable_map_entry*>(&entry.entry);
-  if (result_map_entry == nullptr) {
+  auto entry_map = std::get_if<incfs::verified_map_ptr<ResTable_map_entry>>(&entry->entry);
+  if (entry_map == nullptr) {
     // Not a bag, nothing to do.
-    return nullptr;
+    return base::unexpected(std::nullopt);
   }
 
-  auto map = reinterpret_cast<const ResTable_map_entry*>(*result_map_entry);
-  auto map_entry = reinterpret_cast<const ResTable_map*>(
-      reinterpret_cast<const uint8_t*>(map) + map->size);
-  const ResTable_map* const map_entry_end = map_entry + dtohl(map->count);
+  auto map = *entry_map;
+  auto map_entry = map.offset(dtohs(map->size)).convert<ResTable_map>();
+  const auto map_entry_end = map_entry + dtohl(map->count);
 
   // Keep track of ids that have already been seen to prevent infinite loops caused by circular
-  // dependencies between bags
+  // dependencies between bags.
   child_resids.push_back(resid);
 
   uint32_t parent_resid = dtohl(map->parent.ident);
-  if (parent_resid == 0U || std::find(child_resids.begin(), child_resids.end(), parent_resid)
-      != child_resids.end()) {
-    // There is no parent or a circular dependency exist, meaning there is nothing to inherit and
-    // we can do a simple copy of the entries in the map.
+  if (parent_resid == 0U ||
+      std::find(child_resids.begin(), child_resids.end(), parent_resid) != child_resids.end()) {
+    // There is no parent or a circular parental dependency exist, meaning there is nothing to
+    // inherit and we can do a simple copy of the entries in the map.
     const size_t entry_count = map_entry_end - map_entry;
     util::unique_cptr<ResolvedBag> new_bag{reinterpret_cast<ResolvedBag*>(
         malloc(sizeof(ResolvedBag) + (entry_count * sizeof(ResolvedBag::Entry))))};
 
     bool sort_entries = false;
-    ResolvedBag::Entry* new_entry = new_bag->entries;
-    for (; map_entry != map_entry_end; ++map_entry) {
+    for (auto new_entry = new_bag->entries; map_entry != map_entry_end; ++map_entry) {
+      if (UNLIKELY(!map_entry)) {
+        return base::unexpected(IOError::PAGES_MISSING);
+      }
+
       uint32_t new_key = dtohl(map_entry->name.ident);
       if (!is_internal_resid(new_key)) {
         // Attributes, arrays, etc don't have a resource id as the name. They specify
         // other data, which would be wrong to change via a lookup.
-        if (entry.dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR) {
+        if (UNLIKELY(entry->dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR)) {
           LOG(ERROR) << base::StringPrintf("Failed to resolve key 0x%08x in bag 0x%08x.", new_key,
                                            resid);
-          return nullptr;
+          return base::unexpected(std::nullopt);
         }
       }
-      new_entry->cookie = cookie;
+
+      new_entry->cookie = entry->cookie;
       new_entry->key = new_key;
       new_entry->key_pool = nullptr;
       new_entry->type_pool = nullptr;
       new_entry->style = resid;
       new_entry->value.copyFrom_dtoh(map_entry->value);
-      status_t err = entry.dynamic_ref_table->lookupResourceValue(&new_entry->value);
-      if (err != NO_ERROR) {
+      status_t err = entry->dynamic_ref_table->lookupResourceValue(&new_entry->value);
+      if (UNLIKELY(err != NO_ERROR)) {
         LOG(ERROR) << base::StringPrintf(
             "Failed to resolve value t=0x%02x d=0x%08x for key 0x%08x.", new_entry->value.dataType,
             new_entry->value.data, new_key);
-        return nullptr;
+        return base::unexpected(std::nullopt);
       }
+
       sort_entries = sort_entries ||
           (new_entry != new_bag->entries && (new_entry->key < (new_entry - 1U)->key));
       ++new_entry;
     }
 
     if (sort_entries) {
-      std::sort(new_bag->entries, new_bag->entries + entry_count, compare_bag_entries);
+      std::sort(new_bag->entries, new_bag->entries + entry_count,
+                [](auto&& lhs, auto&& rhs) { return lhs.key < rhs.key; });
     }
 
-    new_bag->type_spec_flags = entry.type_flags;
+    new_bag->type_spec_flags = entry->type_flags;
     new_bag->entry_count = static_cast<uint32_t>(entry_count);
     ResolvedBag* result = new_bag.get();
     cached_bags_[resid] = std::move(new_bag);
@@ -1076,54 +1130,58 @@
   }
 
   // In case the parent is a dynamic reference, resolve it.
-  entry.dynamic_ref_table->lookupResourceId(&parent_resid);
+  entry->dynamic_ref_table->lookupResourceId(&parent_resid);
 
   // Get the parent and do a merge of the keys.
-  const ResolvedBag* parent_bag = GetBag(parent_resid, child_resids);
-  if (parent_bag == nullptr) {
+  const auto parent_bag = GetBag(parent_resid, child_resids);
+  if (UNLIKELY(!parent_bag.has_value())) {
     // Failed to get the parent that should exist.
     LOG(ERROR) << base::StringPrintf("Failed to find parent 0x%08x of bag 0x%08x.", parent_resid,
                                      resid);
-    return nullptr;
+    return base::unexpected(parent_bag.error());
   }
 
   // Create the max possible entries we can make. Once we construct the bag,
   // we will realloc to fit to size.
-  const size_t max_count = parent_bag->entry_count + dtohl(map->count);
+  const size_t max_count = (*parent_bag)->entry_count + dtohl(map->count);
   util::unique_cptr<ResolvedBag> new_bag{reinterpret_cast<ResolvedBag*>(
       malloc(sizeof(ResolvedBag) + (max_count * sizeof(ResolvedBag::Entry))))};
   ResolvedBag::Entry* new_entry = new_bag->entries;
 
-  const ResolvedBag::Entry* parent_entry = parent_bag->entries;
-  const ResolvedBag::Entry* const parent_entry_end = parent_entry + parent_bag->entry_count;
+  const ResolvedBag::Entry* parent_entry = (*parent_bag)->entries;
+  const ResolvedBag::Entry* const parent_entry_end = parent_entry + (*parent_bag)->entry_count;
 
   // The keys are expected to be in sorted order. Merge the two bags.
   bool sort_entries = false;
   while (map_entry != map_entry_end && parent_entry != parent_entry_end) {
+    if (UNLIKELY(!map_entry)) {
+      return base::unexpected(IOError::PAGES_MISSING);
+    }
+
     uint32_t child_key = dtohl(map_entry->name.ident);
     if (!is_internal_resid(child_key)) {
-      if (entry.dynamic_ref_table->lookupResourceId(&child_key) != NO_ERROR) {
+      if (UNLIKELY(entry->dynamic_ref_table->lookupResourceId(&child_key) != NO_ERROR)) {
         LOG(ERROR) << base::StringPrintf("Failed to resolve key 0x%08x in bag 0x%08x.", child_key,
                                          resid);
-        return nullptr;
+        return base::unexpected(std::nullopt);
       }
     }
 
     if (child_key <= parent_entry->key) {
       // Use the child key if it comes before the parent
       // or is equal to the parent (overrides).
-      new_entry->cookie = cookie;
+      new_entry->cookie = entry->cookie;
       new_entry->key = child_key;
       new_entry->key_pool = nullptr;
       new_entry->type_pool = nullptr;
       new_entry->value.copyFrom_dtoh(map_entry->value);
       new_entry->style = resid;
-      status_t err = entry.dynamic_ref_table->lookupResourceValue(&new_entry->value);
-      if (err != NO_ERROR) {
+      status_t err = entry->dynamic_ref_table->lookupResourceValue(&new_entry->value);
+      if (UNLIKELY(err != NO_ERROR)) {
         LOG(ERROR) << base::StringPrintf(
             "Failed to resolve value t=0x%02x d=0x%08x for key 0x%08x.", new_entry->value.dataType,
             new_entry->value.data, child_key);
-        return nullptr;
+        return base::unexpected(std::nullopt);
       }
       ++map_entry;
     } else {
@@ -1143,25 +1201,29 @@
 
   // Finish the child entries if they exist.
   while (map_entry != map_entry_end) {
+    if (UNLIKELY(!map_entry)) {
+      return base::unexpected(IOError::PAGES_MISSING);
+    }
+
     uint32_t new_key = dtohl(map_entry->name.ident);
     if (!is_internal_resid(new_key)) {
-      if (entry.dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR) {
+      if (UNLIKELY(entry->dynamic_ref_table->lookupResourceId(&new_key) != NO_ERROR)) {
         LOG(ERROR) << base::StringPrintf("Failed to resolve key 0x%08x in bag 0x%08x.", new_key,
                                          resid);
-        return nullptr;
+        return base::unexpected(std::nullopt);
       }
     }
-    new_entry->cookie = cookie;
+    new_entry->cookie = entry->cookie;
     new_entry->key = new_key;
     new_entry->key_pool = nullptr;
     new_entry->type_pool = nullptr;
     new_entry->value.copyFrom_dtoh(map_entry->value);
     new_entry->style = resid;
-    status_t err = entry.dynamic_ref_table->lookupResourceValue(&new_entry->value);
-    if (err != NO_ERROR) {
+    status_t err = entry->dynamic_ref_table->lookupResourceValue(&new_entry->value);
+    if (UNLIKELY(err != NO_ERROR)) {
       LOG(ERROR) << base::StringPrintf("Failed to resolve value t=0x%02x d=0x%08x for key 0x%08x.",
                                        new_entry->value.dataType, new_entry->value.data, new_key);
-      return nullptr;
+      return base::unexpected(std::nullopt);
     }
     sort_entries = sort_entries ||
         (new_entry != new_bag->entries && (new_entry->key < (new_entry - 1U)->key));
@@ -1185,11 +1247,12 @@
   }
 
   if (sort_entries) {
-    std::sort(new_bag->entries, new_bag->entries + actual_count, compare_bag_entries);
+    std::sort(new_bag->entries, new_bag->entries + actual_count,
+              [](auto&& lhs, auto&& rhs) { return lhs.key < rhs.key; });
   }
 
   // Combine flags from the parent and our own bag.
-  new_bag->type_spec_flags = entry.type_flags | parent_bag->type_spec_flags;
+  new_bag->type_spec_flags = entry->type_flags | (*parent_bag)->type_spec_flags;
   new_bag->entry_count = static_cast<uint32_t>(actual_count);
   ResolvedBag* result = new_bag.get();
   cached_bags_[resid] = std::move(new_bag);
@@ -1208,16 +1271,16 @@
   return true;
 }
 
-uint32_t AssetManager2::GetResourceId(const std::string& resource_name,
-                                      const std::string& fallback_type,
-                                      const std::string& fallback_package) const {
+base::expected<uint32_t, NullOrIOError> AssetManager2::GetResourceId(
+    const std::string& resource_name, const std::string& fallback_type,
+    const std::string& fallback_package) const {
   StringPiece package_name, type, entry;
   if (!ExtractResourceName(resource_name, &package_name, &type, &entry)) {
-    return 0u;
+    return base::unexpected(std::nullopt);
   }
 
   if (entry.empty()) {
-    return 0u;
+    return base::unexpected(std::nullopt);
   }
 
   if (package_name.empty()) {
@@ -1230,12 +1293,12 @@
 
   std::u16string type16;
   if (!Utf8ToUtf16(type, &type16)) {
-    return 0u;
+    return base::unexpected(std::nullopt);
   }
 
   std::u16string entry16;
   if (!Utf8ToUtf16(entry, &entry16)) {
-    return 0u;
+    return base::unexpected(std::nullopt);
   }
 
   const StringPiece16 kAttr16 = u"attr";
@@ -1249,20 +1312,24 @@
         break;
       }
 
-      uint32_t resid = package->FindEntryByName(type16, entry16);
-      if (resid == 0u && kAttr16 == type16) {
+      base::expected<uint32_t, NullOrIOError> resid = package->FindEntryByName(type16, entry16);
+      if (UNLIKELY(IsIOError(resid))) {
+         return base::unexpected(resid.error());
+       }
+
+      if (!resid.has_value() && kAttr16 == type16) {
         // Private attributes in libraries (such as the framework) are sometimes encoded
         // under the type '^attr-private' in order to leave the ID space of public 'attr'
         // free for future additions. Check '^attr-private' for the same name.
         resid = package->FindEntryByName(kAttrPrivate16, entry16);
       }
 
-      if (resid != 0u) {
-        return fix_package_id(resid, package_group.dynamic_ref_table->mAssignedPackageId);
+      if (resid.has_value()) {
+        return fix_package_id(*resid, package_group.dynamic_ref_table->mAssignedPackageId);
       }
     }
   }
-  return 0u;
+  return base::unexpected(std::nullopt);
 }
 
 void AssetManager2::RebuildFilterList(bool filter_incompatible_configs) {
@@ -1282,8 +1349,7 @@
           ResTable_config this_config;
           this_config.copyFromDtoH((*iter)->config);
           if (!filter_incompatible_configs || this_config.match(configuration_)) {
-            group.configurations.push_back(this_config);
-            group.types.push_back(*iter);
+            group.type_configs.push_back(TypeConfig{*iter, this_config});
           }
         }
       });
@@ -1309,6 +1375,8 @@
       ++iter;
     }
   }
+
+  cached_resolved_values_.clear();
 }
 
 uint8_t AssetManager2::GetAssignedPackageId(const LoadedPackage* package) const {
@@ -1354,16 +1422,16 @@
   std::array<util::unique_cptr<ThemeType>, kTypeCount> types;
 };
 
-bool Theme::ApplyStyle(uint32_t resid, bool force) {
+base::expected<std::monostate, NullOrIOError> Theme::ApplyStyle(uint32_t resid, bool force) {
   ATRACE_NAME("Theme::ApplyStyle");
 
-  const ResolvedBag* bag = asset_manager_->GetBag(resid);
-  if (bag == nullptr) {
-    return false;
+  auto bag = asset_manager_->GetBag(resid);
+  if (!bag.has_value()) {
+    return base::unexpected(bag.error());
   }
 
   // Merge the flags from this style.
-  type_spec_flags_ |= bag->type_spec_flags;
+  type_spec_flags_ |= (*bag)->type_spec_flags;
 
   int last_type_idx = -1;
   int last_package_idx = -1;
@@ -1373,14 +1441,14 @@
   // Iterate backwards, because each bag is sorted in ascending key ID order, meaning we will only
   // need to perform one resize per type.
   using reverse_bag_iterator = std::reverse_iterator<const ResolvedBag::Entry*>;
-  const auto bag_iter_end = reverse_bag_iterator(begin(bag));
-  for (auto bag_iter = reverse_bag_iterator(end(bag)); bag_iter != bag_iter_end; ++bag_iter) {
-    const uint32_t attr_resid = bag_iter->key;
+  const auto rbegin = reverse_bag_iterator(begin(*bag));
+  for (auto it = reverse_bag_iterator(end(*bag)); it != rbegin; ++it) {
+    const uint32_t attr_resid = it->key;
 
     // If the resource ID passed in is not a style, the key can be some other identifier that is not
     // a resource ID. We should fail fast instead of operating with strange resource IDs.
     if (!is_valid_resid(attr_resid)) {
-      return false;
+      return base::unexpected(std::nullopt);
     }
 
     // We don't use the 0-based index for the type so that we can avoid doing ID validation
@@ -1428,20 +1496,18 @@
     ThemeEntry& entry = last_type->entries[entry_idx];
     if (force || (entry.value.dataType == Res_value::TYPE_NULL &&
                   entry.value.data != Res_value::DATA_NULL_EMPTY)) {
-      entry.cookie = bag_iter->cookie;
-      entry.type_spec_flags |= bag->type_spec_flags;
-      entry.value = bag_iter->value;
+      entry.cookie = it->cookie;
+      entry.type_spec_flags |= (*bag)->type_spec_flags;
+      entry.value = it->value;
     }
   }
-  return true;
+  return {};
 }
 
-ApkAssetsCookie Theme::GetAttribute(uint32_t resid, Res_value* out_value,
-                                    uint32_t* out_flags) const {
+std::optional<AssetManager2::SelectedValue> Theme::GetAttribute(uint32_t resid) const {
+
   int cnt = 20;
-
   uint32_t type_spec_flags = 0u;
-
   do {
     const int package_idx = get_package_id(resid);
     const Package* package = packages_[package_idx].get();
@@ -1461,43 +1527,42 @@
               resid = entry.value.data;
               continue;
             }
-            return kInvalidCookie;
+            return std::nullopt;
           }
 
           // @null is different than @empty.
           if (entry.value.dataType == Res_value::TYPE_NULL &&
               entry.value.data != Res_value::DATA_NULL_EMPTY) {
-            return kInvalidCookie;
+            return std::nullopt;
           }
 
-          *out_value = entry.value;
-          *out_flags = type_spec_flags;
-          return entry.cookie;
+          return AssetManager2::SelectedValue(entry.value.dataType, entry.value.data, entry.cookie,
+                                              type_spec_flags, 0U /* resid */, {} /* config */);
         }
       }
     }
     break;
   } while (true);
-  return kInvalidCookie;
+  return std::nullopt;
 }
 
-ApkAssetsCookie Theme::ResolveAttributeReference(ApkAssetsCookie cookie, Res_value* in_out_value,
-                                                 ResTable_config* in_out_selected_config,
-                                                 uint32_t* in_out_type_spec_flags,
-                                                 uint32_t* out_last_ref) const {
-  if (in_out_value->dataType == Res_value::TYPE_ATTRIBUTE) {
-    uint32_t new_flags;
-    cookie = GetAttribute(in_out_value->data, in_out_value, &new_flags);
-    if (cookie == kInvalidCookie) {
-      return kInvalidCookie;
-    }
-
-    if (in_out_type_spec_flags != nullptr) {
-      *in_out_type_spec_flags |= new_flags;
-    }
+base::expected<std::monostate, NullOrIOError> Theme::ResolveAttributeReference(
+      AssetManager2::SelectedValue& value) const {
+  if (value.type != Res_value::TYPE_ATTRIBUTE) {
+    return asset_manager_->ResolveReference(value);
   }
-  return asset_manager_->ResolveReference(cookie, in_out_value, in_out_selected_config,
-                                          in_out_type_spec_flags, out_last_ref);
+
+  std::optional<AssetManager2::SelectedValue> result = GetAttribute(value.data);
+  if (!result.has_value()) {
+    return base::unexpected(std::nullopt);
+  }
+
+  auto resolve_result = asset_manager_->ResolveReference(*result, true /* cache_value */);
+  if (resolve_result.has_value()) {
+    result->flags |= value.flags;
+    value = *result;
+  }
+  return resolve_result;
 }
 
 void Theme::Clear() {
@@ -1507,9 +1572,9 @@
   }
 }
 
-void Theme::SetTo(const Theme& o) {
+base::expected<std::monostate, IOError> Theme::SetTo(const Theme& o) {
   if (this == &o) {
-    return;
+    return {};
   }
 
   type_spec_flags_ = o.type_spec_flags_;
@@ -1560,10 +1625,8 @@
 
         // Map the runtime package of the source apk asset to the destination apk asset.
         if (src_asset->GetPath() == dest_asset->GetPath()) {
-          const std::vector<std::unique_ptr<const LoadedPackage>>& src_packages =
-              src_asset->GetLoadedArsc()->GetPackages();
-          const std::vector<std::unique_ptr<const LoadedPackage>>& dest_packages =
-              dest_asset->GetLoadedArsc()->GetPackages();
+          const auto& src_packages = src_asset->GetLoadedArsc()->GetPackages();
+          const auto& dest_packages = dest_asset->GetLoadedArsc()->GetPackages();
 
           SourceToDestinationRuntimePackageMap package_map;
 
@@ -1660,15 +1723,20 @@
           int attribute_dest_package_id = p;
           if (attribute_dest_package_id != 0x01) {
             // Find the cookie of the attribute resource id in the source AssetManager
-            FindEntryResult attribute_entry_result;
-            ApkAssetsCookie attribute_cookie =
+            base::expected<FindEntryResult, NullOrIOError> attribute_entry_result =
                 o.asset_manager_->FindEntry(make_resid(p, t, e), 0 /* density_override */ ,
                                             true /* stop_at_first_match */,
-                                            true /* ignore_configuration */,
-                                            &attribute_entry_result);
+                                            true /* ignore_configuration */);
+            if (UNLIKELY(IsIOError(attribute_entry_result))) {
+              return base::unexpected(GetIOError(attribute_entry_result.error()));
+            }
+            if (!attribute_entry_result.has_value()) {
+              continue;
+            }
 
             // Determine the package id of the attribute in the destination AssetManager.
-            auto attribute_package_map = src_asset_cookie_id_map.find(attribute_cookie);
+            auto attribute_package_map = src_asset_cookie_id_map.find(
+                attribute_entry_result->cookie);
             if (attribute_package_map == src_asset_cookie_id_map.end()) {
               continue;
             }
@@ -1712,6 +1780,7 @@
       }
     }
   }
+  return {};
 }
 
 void Theme::Dump() const {
diff --git a/libs/androidfw/AttributeResolution.cpp b/libs/androidfw/AttributeResolution.cpp
index e62fb61..c188712 100644
--- a/libs/androidfw/AttributeResolution.cpp
+++ b/libs/androidfw/AttributeResolution.cpp
@@ -24,9 +24,12 @@
 #include "androidfw/AttributeFinder.h"
 
 constexpr bool kDebugStyles = false;
+#define DEBUG_LOG(...) do { if (kDebugStyles) { ALOGI(__VA_ARGS__); } } while(0)
 
 namespace android {
 
+namespace {
+
 // Java asset cookies have 0 as an invalid cookie, but TypedArray expects < 0.
 static uint32_t ApkAssetsCookieToJavaCookie(ApkAssetsCookie cookie) {
   return cookie != kInvalidCookie ? static_cast<uint32_t>(cookie + 1) : static_cast<uint32_t>(-1);
@@ -36,8 +39,7 @@
     : public BackTrackingAttributeFinder<XmlAttributeFinder, size_t> {
  public:
   explicit XmlAttributeFinder(const ResXMLParser* parser)
-      : BackTrackingAttributeFinder(
-            0, parser != nullptr ? parser->getAttributeCount() : 0),
+      : BackTrackingAttributeFinder(0, parser != nullptr ? parser->getAttributeCount() : 0),
         parser_(parser) {}
 
   inline uint32_t GetAttribute(size_t index) const {
@@ -61,136 +63,149 @@
   }
 };
 
-bool ResolveAttrs(Theme* theme, uint32_t def_style_attr, uint32_t def_style_res,
-                  uint32_t* src_values, size_t src_values_length, uint32_t* attrs,
-                  size_t attrs_length, uint32_t* out_values, uint32_t* out_indices) {
-  if (kDebugStyles) {
-    ALOGI("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x", theme,
-          def_style_attr, def_style_res);
-  }
-
-  AssetManager2* assetmanager = theme->GetAssetManager();
-  ResTable_config config;
-  Res_value value;
-
-  int indices_idx = 0;
-
-  // Load default style from attribute, if specified...
-  uint32_t def_style_flags = 0u;
-  if (def_style_attr != 0) {
-    Res_value value;
-    if (theme->GetAttribute(def_style_attr, &value, &def_style_flags) != kInvalidCookie) {
-      if (value.dataType == Res_value::TYPE_REFERENCE) {
-        def_style_res = value.data;
+base::expected<const ResolvedBag*, NullOrIOError> GetStyleBag(Theme* theme,
+                                                              uint32_t theme_attribute_resid,
+                                                              uint32_t fallback_resid,
+                                                              uint32_t* out_theme_flags) {
+  // Load the style from the attribute if specified.
+  if (theme_attribute_resid != 0U) {
+    std::optional<AssetManager2::SelectedValue> value = theme->GetAttribute(theme_attribute_resid);
+    if (value.has_value()) {
+      *out_theme_flags |= value->flags;
+      auto result = theme->GetAssetManager()->ResolveBag(*value);
+      if (result.has_value() || IsIOError(result)) {
+        return result;
       }
     }
   }
 
-  // Retrieve the default style bag, if requested.
-  const ResolvedBag* default_style_bag = nullptr;
-  if (def_style_res != 0) {
-    default_style_bag = assetmanager->GetBag(def_style_res);
-    if (default_style_bag != nullptr) {
-      def_style_flags |= default_style_bag->type_spec_flags;
+  // Fallback to loading the style from the resource id if specified.
+  if (fallback_resid != 0U) {
+    return theme->GetAssetManager()->GetBag(fallback_resid);
+  }
+
+  return base::unexpected(std::nullopt);
+}
+
+base::expected<const ResolvedBag*, NullOrIOError> GetXmlStyleBag(Theme* theme,
+                                                                 ResXMLParser* xml_parser,
+                                                                 uint32_t* out_theme_flags) {
+  if (xml_parser == nullptr) {
+    return base::unexpected(std::nullopt);
+  }
+
+  // Retrieve the style resource ID associated with the current XML tag's style attribute.
+  Res_value value;
+  const ssize_t idx = xml_parser->indexOfStyle();
+  if (idx < 0 || xml_parser->getAttributeValue(idx, &value) < 0) {
+    return base::unexpected(std::nullopt);
+  }
+
+  if (value.dataType == Res_value::TYPE_ATTRIBUTE) {
+    // Resolve the attribute with out theme.
+    if (std::optional<AssetManager2::SelectedValue> result = theme->GetAttribute(value.data)) {
+      *out_theme_flags |= result->flags;
+      return theme->GetAssetManager()->ResolveBag(*result);
     }
   }
 
-  BagAttributeFinder def_style_attr_finder(default_style_bag);
+  if (value.dataType == Res_value::TYPE_REFERENCE) {
+    return theme->GetAssetManager()->GetBag(value.data);
+  }
+
+  return base::unexpected(std::nullopt);
+}
+
+} // namespace
+
+base::expected<std::monostate, IOError> ResolveAttrs(Theme* theme, uint32_t def_style_attr,
+                                                     uint32_t def_style_res, uint32_t* src_values,
+                                                     size_t src_values_length, uint32_t* attrs,
+                                                     size_t attrs_length, uint32_t* out_values,
+                                                     uint32_t* out_indices) {
+  DEBUG_LOG("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x", theme, def_style_attr,
+            def_style_res);
+
+  int indices_idx = 0;
+  const AssetManager2* assetmanager = theme->GetAssetManager();
+
+  // Load default style from attribute or resource id, if specified...
+  uint32_t def_style_theme_flags = 0U;
+  const auto default_style_bag = GetStyleBag(theme, def_style_attr, def_style_res,
+                                             &def_style_theme_flags);
+  if (UNLIKELY(IsIOError(default_style_bag))) {
+    return base::unexpected(GetIOError(default_style_bag.error()));
+  }
+
+  BagAttributeFinder def_style_attr_finder(default_style_bag.value_or(nullptr));
 
   // Now iterate through all of the attributes that the client has requested,
   // filling in each with whatever data we can find.
   for (size_t ii = 0; ii < attrs_length; ii++) {
     const uint32_t cur_ident = attrs[ii];
-
-    if (kDebugStyles) {
-      ALOGI("RETRIEVING ATTR 0x%08x...", cur_ident);
-    }
-
-    ApkAssetsCookie cookie = kInvalidCookie;
-    uint32_t type_set_flags = 0;
-
-    value.dataType = Res_value::TYPE_NULL;
-    value.data = Res_value::DATA_NULL_UNDEFINED;
-    config.density = 0;
+    DEBUG_LOG("RETRIEVING ATTR 0x%08x...", cur_ident);
 
     // Try to find a value for this attribute...  we prioritize values
     // coming from, first XML attributes, then XML style, then default
     // style, and finally the theme.
 
     // Retrieve the current input value if available.
+    AssetManager2::SelectedValue value{};
     if (src_values_length > 0 && src_values[ii] != 0) {
-      value.dataType = Res_value::TYPE_ATTRIBUTE;
+      value.type = Res_value::TYPE_ATTRIBUTE;
       value.data = src_values[ii];
-      if (kDebugStyles) {
-        ALOGI("-> From values: type=0x%x, data=0x%08x", value.dataType, value.data);
-      }
+      DEBUG_LOG("-> From values: type=0x%x, data=0x%08x", value.type, value.data);
     } else {
       const ResolvedBag::Entry* const entry = def_style_attr_finder.Find(cur_ident);
       if (entry != def_style_attr_finder.end()) {
-        cookie = entry->cookie;
-        type_set_flags = def_style_flags;
-        value = entry->value;
-        if (kDebugStyles) {
-          ALOGI("-> From def style: type=0x%x, data=0x%08x", value.dataType, value.data);
-        }
+        value = AssetManager2::SelectedValue(*default_style_bag, *entry);
+        value.flags |= def_style_theme_flags;
+        DEBUG_LOG("-> From def style: type=0x%x, data=0x%08x", value.type, value.data);
       }
     }
 
-    uint32_t resid = 0;
-    if (value.dataType != Res_value::TYPE_NULL) {
+    if (value.type != Res_value::TYPE_NULL) {
       // Take care of resolving the found resource to its final value.
-      ApkAssetsCookie new_cookie =
-          theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid);
-      if (new_cookie != kInvalidCookie) {
-        cookie = new_cookie;
+      const auto result = theme->ResolveAttributeReference(value);
+      if (UNLIKELY(IsIOError(result))) {
+        return base::unexpected(GetIOError(result.error()));
       }
-      if (kDebugStyles) {
-        ALOGI("-> Resolved attr: type=0x%x, data=0x%08x", value.dataType, value.data);
-      }
+      DEBUG_LOG("-> Resolved attr: type=0x%x, data=0x%08x", value.type, value.data);
     } else if (value.data != Res_value::DATA_NULL_EMPTY) {
       // If we still don't have a value for this attribute, try to find it in the theme!
-      ApkAssetsCookie new_cookie = theme->GetAttribute(cur_ident, &value, &type_set_flags);
-      if (new_cookie != kInvalidCookie) {
-        if (kDebugStyles) {
-          ALOGI("-> From theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+      if (auto attr_value = theme->GetAttribute(cur_ident)) {
+        value = *attr_value;
+        DEBUG_LOG("-> From theme: type=0x%x, data=0x%08x", value.type, value.data);
+
+        const auto result = assetmanager->ResolveReference(value, true /* cache_value */);
+        if (UNLIKELY(IsIOError(result))) {
+          return base::unexpected(GetIOError(result.error()));
         }
-        new_cookie =
-            assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid);
-        if (new_cookie != kInvalidCookie) {
-          cookie = new_cookie;
-        }
-        if (kDebugStyles) {
-          ALOGI("-> Resolved theme: type=0x%x, data=0x%08x", value.dataType, value.data);
-        }
+        DEBUG_LOG("-> Resolved theme: type=0x%x, data=0x%08x", value.type, value.data);
       }
     }
 
     // Deal with the special @null value -- it turns back to TYPE_NULL.
-    if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
-      if (kDebugStyles) {
-        ALOGI("-> Setting to @null!");
-      }
-      value.dataType = Res_value::TYPE_NULL;
+    if (value.type == Res_value::TYPE_REFERENCE && value.data == 0) {
+      DEBUG_LOG("-> Setting to @null!");
+      value.type = Res_value::TYPE_NULL;
       value.data = Res_value::DATA_NULL_UNDEFINED;
-      cookie = kInvalidCookie;
+      value.cookie = kInvalidCookie;
     }
 
-    if (kDebugStyles) {
-      ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x", cur_ident, value.dataType, value.data);
-    }
+    DEBUG_LOG("Attribute 0x%08x: type=0x%x, data=0x%08x", cur_ident, value.type, value.data);
 
     // Write the final value back to Java.
-    out_values[STYLE_TYPE] = value.dataType;
+    out_values[STYLE_TYPE] = value.type;
     out_values[STYLE_DATA] = value.data;
-    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(cookie);
-    out_values[STYLE_RESOURCE_ID] = resid;
-    out_values[STYLE_CHANGING_CONFIGURATIONS] = type_set_flags;
-    out_values[STYLE_DENSITY] = config.density;
+    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(value.cookie);
+    out_values[STYLE_RESOURCE_ID] = value.resid;
+    out_values[STYLE_CHANGING_CONFIGURATIONS] = value.flags;
+    out_values[STYLE_DENSITY] = value.config.density;
 
     if (out_indices != nullptr &&
-        (value.dataType != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY)) {
-      indices_idx++;
-      out_indices[indices_idx] = ii;
+        (value.type != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY)) {
+      out_indices[++indices_idx] = ii;
     }
 
     out_values += STYLE_NUM_ENTRIES;
@@ -199,93 +214,46 @@
   if (out_indices != nullptr) {
     out_indices[0] = indices_idx;
   }
-  return true;
+  return {};
 }
 
-void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr,
-                uint32_t def_style_resid, const uint32_t* attrs, size_t attrs_length,
-                uint32_t* out_values, uint32_t* out_indices) {
-  if (kDebugStyles) {
-    ALOGI("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x xml=0x%p", theme,
-          def_style_attr, def_style_resid, xml_parser);
-  }
-
-  AssetManager2* assetmanager = theme->GetAssetManager();
-  ResTable_config config;
-  Res_value value;
+base::expected<std::monostate, IOError> ApplyStyle(Theme* theme, ResXMLParser* xml_parser,
+                                                   uint32_t def_style_attr,
+                                                   uint32_t def_style_resid,
+                                                   const uint32_t* attrs, size_t attrs_length,
+                                                   uint32_t* out_values, uint32_t* out_indices) {
+  DEBUG_LOG("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x xml=0x%p", theme,
+            def_style_attr, def_style_resid, xml_parser);
 
   int indices_idx = 0;
+  const AssetManager2* assetmanager = theme->GetAssetManager();
 
   // Load default style from attribute, if specified...
-  uint32_t def_style_flags = 0u;
-  if (def_style_attr != 0) {
-    Res_value value;
-    if (theme->GetAttribute(def_style_attr, &value, &def_style_flags) != kInvalidCookie) {
-      if (value.dataType == Res_value::TYPE_REFERENCE) {
-        def_style_resid = value.data;
-      }
-    }
+  uint32_t def_style_theme_flags = 0U;
+  const auto default_style_bag = GetStyleBag(theme, def_style_attr, def_style_resid,
+                                             &def_style_theme_flags);
+  if (IsIOError(default_style_bag)) {
+    return base::unexpected(GetIOError(default_style_bag.error()));
   }
 
   // Retrieve the style resource ID associated with the current XML tag's style attribute.
-  uint32_t style_resid = 0u;
-  uint32_t style_flags = 0u;
-  if (xml_parser != nullptr) {
-    ssize_t idx = xml_parser->indexOfStyle();
-    if (idx >= 0 && xml_parser->getAttributeValue(idx, &value) >= 0) {
-      if (value.dataType == value.TYPE_ATTRIBUTE) {
-        // Resolve the attribute with out theme.
-        if (theme->GetAttribute(value.data, &value, &style_flags) == kInvalidCookie) {
-          value.dataType = Res_value::TYPE_NULL;
-        }
-      }
-
-      if (value.dataType == value.TYPE_REFERENCE) {
-        style_resid = value.data;
-      }
-    }
+  uint32_t xml_style_theme_flags = 0U;
+  const auto xml_style_bag = GetXmlStyleBag(theme, xml_parser, &def_style_theme_flags);
+  if (IsIOError(xml_style_bag)) {
+    return base::unexpected(GetIOError(xml_style_bag.error()));
   }
 
-  // Retrieve the default style bag, if requested.
-  const ResolvedBag* default_style_bag = nullptr;
-  if (def_style_resid != 0) {
-    default_style_bag = assetmanager->GetBag(def_style_resid);
-    if (default_style_bag != nullptr) {
-      def_style_flags |= default_style_bag->type_spec_flags;
-    }
-  }
-
-  BagAttributeFinder def_style_attr_finder(default_style_bag);
-
-  // Retrieve the style class bag, if requested.
-  const ResolvedBag* xml_style_bag = nullptr;
-  if (style_resid != 0) {
-    xml_style_bag = assetmanager->GetBag(style_resid);
-    if (xml_style_bag != nullptr) {
-      style_flags |= xml_style_bag->type_spec_flags;
-    }
-  }
-
-  BagAttributeFinder xml_style_attr_finder(xml_style_bag);
-
-  // Retrieve the XML attributes, if requested.
+  BagAttributeFinder def_style_attr_finder(default_style_bag.value_or(nullptr));
+  BagAttributeFinder xml_style_attr_finder(xml_style_bag.value_or(nullptr));
   XmlAttributeFinder xml_attr_finder(xml_parser);
 
   // Now iterate through all of the attributes that the client has requested,
   // filling in each with whatever data we can find.
   for (size_t ii = 0; ii < attrs_length; ii++) {
     const uint32_t cur_ident = attrs[ii];
+    DEBUG_LOG("RETRIEVING ATTR 0x%08x...", cur_ident);
 
-    if (kDebugStyles) {
-      ALOGI("RETRIEVING ATTR 0x%08x...", cur_ident);
-    }
-
-    ApkAssetsCookie cookie = kInvalidCookie;
-    uint32_t type_set_flags = 0u;
-
-    value.dataType = Res_value::TYPE_NULL;
-    value.data = Res_value::DATA_NULL_UNDEFINED;
-    config.density = 0;
+    AssetManager2::SelectedValue value{};
     uint32_t value_source_resid = 0;
 
     // Try to find a value for this attribute...  we prioritize values
@@ -296,178 +264,152 @@
     const size_t xml_attr_idx = xml_attr_finder.Find(cur_ident);
     if (xml_attr_idx != xml_attr_finder.end()) {
       // We found the attribute we were looking for.
-      xml_parser->getAttributeValue(xml_attr_idx, &value);
-      if (kDebugStyles) {
-        ALOGI("-> From XML: type=0x%x, data=0x%08x", value.dataType, value.data);
-      }
+      Res_value attribute_value{};
+      xml_parser->getAttributeValue(xml_attr_idx, &attribute_value);
+      value.type = attribute_value.dataType;
+      value.data = attribute_value.data;
       value_source_resid = xml_parser->getSourceResourceId();
+      DEBUG_LOG("-> From XML: type=0x%x, data=0x%08x", value.type, value.data);
     }
 
-    if (value.dataType == Res_value::TYPE_NULL && value.data != Res_value::DATA_NULL_EMPTY) {
+    if (value.type == Res_value::TYPE_NULL && value.data != Res_value::DATA_NULL_EMPTY) {
       // Walk through the style class values looking for the requested attribute.
       const ResolvedBag::Entry* entry = xml_style_attr_finder.Find(cur_ident);
       if (entry != xml_style_attr_finder.end()) {
-        // We found the attribute we were looking for.
-        cookie = entry->cookie;
-        type_set_flags = style_flags;
-        value = entry->value;
+        value = AssetManager2::SelectedValue(*xml_style_bag, *entry);
+        value.flags |= xml_style_theme_flags;
         value_source_resid = entry->style;
-        if (kDebugStyles) {
-          ALOGI("-> From style: type=0x%x, data=0x%08x, style=0x%08x", value.dataType, value.data,
-              entry->style);
-        }
+        DEBUG_LOG("-> From style: type=0x%x, data=0x%08x, style=0x%08x", value.type, value.data,
+                  value_source_resid);
       }
     }
 
-    if (value.dataType == Res_value::TYPE_NULL && value.data != Res_value::DATA_NULL_EMPTY) {
+    if (value.type == Res_value::TYPE_NULL && value.data != Res_value::DATA_NULL_EMPTY) {
       // Walk through the default style values looking for the requested attribute.
       const ResolvedBag::Entry* entry = def_style_attr_finder.Find(cur_ident);
       if (entry != def_style_attr_finder.end()) {
-        // We found the attribute we were looking for.
-        cookie = entry->cookie;
-        type_set_flags = def_style_flags;
-        value = entry->value;
-        if (kDebugStyles) {
-          ALOGI("-> From def style: type=0x%x, data=0x%08x, style=0x%08x", value.dataType, value.data,
-              entry->style);
-        }
+        value = AssetManager2::SelectedValue(*default_style_bag, *entry);
+        value.flags |= def_style_theme_flags;
         value_source_resid = entry->style;
+        DEBUG_LOG("-> From def style: type=0x%x, data=0x%08x, style=0x%08x", value.type, value.data,
+                  entry->style);
       }
     }
 
-    uint32_t resid = 0u;
-    if (value.dataType != Res_value::TYPE_NULL) {
+    if (value.type != Res_value::TYPE_NULL) {
       // Take care of resolving the found resource to its final value.
-      ApkAssetsCookie new_cookie =
-          theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid);
-      if (new_cookie != kInvalidCookie) {
-        cookie = new_cookie;
+      auto result = theme->ResolveAttributeReference(value);
+      if (UNLIKELY(IsIOError(result))) {
+        return base::unexpected(GetIOError(result.error()));
       }
-
-      if (kDebugStyles) {
-        ALOGI("-> Resolved attr: type=0x%x, data=0x%08x", value.dataType, value.data);
-      }
+      DEBUG_LOG("-> Resolved attr: type=0x%x, data=0x%08x", value.type, value.data);
     } else if (value.data != Res_value::DATA_NULL_EMPTY) {
       // If we still don't have a value for this attribute, try to find it in the theme!
-      ApkAssetsCookie new_cookie = theme->GetAttribute(cur_ident, &value, &type_set_flags);
-      // TODO: set value_source_resid for the style in the theme that was used.
-      if (new_cookie != kInvalidCookie) {
-        if (kDebugStyles) {
-          ALOGI("-> From theme: type=0x%x, data=0x%08x", value.dataType, value.data);
-        }
-        new_cookie =
-            assetmanager->ResolveReference(new_cookie, &value, &config, &type_set_flags, &resid);
-        if (new_cookie != kInvalidCookie) {
-          cookie = new_cookie;
-        }
+      if (auto attr_value = theme->GetAttribute(cur_ident)) {
+        value = *attr_value;
+        DEBUG_LOG("-> From theme: type=0x%x, data=0x%08x", value.type, value.data);
 
-        if (kDebugStyles) {
-          ALOGI("-> Resolved theme: type=0x%x, data=0x%08x", value.dataType, value.data);
+        auto result = assetmanager->ResolveReference(value, true /* cache_value */);
+        if (UNLIKELY(IsIOError(result))) {
+          return base::unexpected(GetIOError(result.error()));
         }
+        DEBUG_LOG("-> Resolved theme: type=0x%x, data=0x%08x", value.type, value.data);
+        // TODO: set value_source_resid for the style in the theme that was used.
       }
     }
 
     // Deal with the special @null value -- it turns back to TYPE_NULL.
-    if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
-      if (kDebugStyles) {
-        ALOGI("-> Setting to @null!");
-      }
-      value.dataType = Res_value::TYPE_NULL;
+    if (value.type == Res_value::TYPE_REFERENCE && value.data == 0U) {
+      DEBUG_LOG("-> Setting to @null!");
+      value.type = Res_value::TYPE_NULL;
       value.data = Res_value::DATA_NULL_UNDEFINED;
-      cookie = kInvalidCookie;
+      value.cookie = kInvalidCookie;
     }
 
-    if (kDebugStyles) {
-      ALOGI("Attribute 0x%08x: type=0x%x, data=0x%08x", cur_ident, value.dataType, value.data);
-    }
+    DEBUG_LOG("Attribute 0x%08x: type=0x%x, data=0x%08x", cur_ident, value.type, value.data);
 
     // Write the final value back to Java.
-    out_values[STYLE_TYPE] = value.dataType;
+    out_values[STYLE_TYPE] = value.type;
     out_values[STYLE_DATA] = value.data;
-    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(cookie);
-    out_values[STYLE_RESOURCE_ID] = resid;
-    out_values[STYLE_CHANGING_CONFIGURATIONS] = type_set_flags;
-    out_values[STYLE_DENSITY] = config.density;
+    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(value.cookie);
+    out_values[STYLE_RESOURCE_ID] = value.resid;
+    out_values[STYLE_CHANGING_CONFIGURATIONS] = value.flags;
+    out_values[STYLE_DENSITY] = value.config.density;
     out_values[STYLE_SOURCE_RESOURCE_ID] = value_source_resid;
 
-    if (value.dataType != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY) {
-      indices_idx++;
-
+    if (value.type != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY) {
       // out_indices must NOT be nullptr.
-      out_indices[indices_idx] = ii;
+      out_indices[++indices_idx] = ii;
     }
     out_values += STYLE_NUM_ENTRIES;
   }
 
   // out_indices must NOT be nullptr.
   out_indices[0] = indices_idx;
+  return {};
 }
 
-bool RetrieveAttributes(AssetManager2* assetmanager, ResXMLParser* xml_parser, uint32_t* attrs,
-                        size_t attrs_length, uint32_t* out_values, uint32_t* out_indices) {
-  ResTable_config config;
-  Res_value value;
-
+base::expected<std::monostate, IOError> RetrieveAttributes(AssetManager2* assetmanager,
+                                                           ResXMLParser* xml_parser,
+                                                           uint32_t* attrs,
+                                                           size_t attrs_length,
+                                                           uint32_t* out_values,
+                                                           uint32_t* out_indices) {
   int indices_idx = 0;
 
   // Retrieve the XML attributes, if requested.
-  const size_t xml_attr_count = xml_parser->getAttributeCount();
   size_t ix = 0;
+  const size_t xml_attr_count = xml_parser->getAttributeCount();
   uint32_t cur_xml_attr = xml_parser->getAttributeNameResID(ix);
 
   // Now iterate through all of the attributes that the client has requested,
   // filling in each with whatever data we can find.
   for (size_t ii = 0; ii < attrs_length; ii++) {
     const uint32_t cur_ident = attrs[ii];
-    ApkAssetsCookie cookie = kInvalidCookie;
-    uint32_t type_set_flags = 0u;
-
-    value.dataType = Res_value::TYPE_NULL;
-    value.data = Res_value::DATA_NULL_UNDEFINED;
-    config.density = 0;
+     AssetManager2::SelectedValue value{};
 
     // Try to find a value for this attribute...
     // Skip through XML attributes until the end or the next possible match.
     while (ix < xml_attr_count && cur_ident > cur_xml_attr) {
-      ix++;
-      cur_xml_attr = xml_parser->getAttributeNameResID(ix);
-    }
-    // Retrieve the current XML attribute if it matches, and step to next.
-    if (ix < xml_attr_count && cur_ident == cur_xml_attr) {
-      xml_parser->getAttributeValue(ix, &value);
-      ix++;
-      cur_xml_attr = xml_parser->getAttributeNameResID(ix);
+      cur_xml_attr = xml_parser->getAttributeNameResID(++ix);
     }
 
-    uint32_t resid = 0u;
-    if (value.dataType != Res_value::TYPE_NULL) {
+    // Retrieve the current XML attribute if it matches, and step to next.
+    if (ix < xml_attr_count && cur_ident == cur_xml_attr) {
+      Res_value attribute_value{};
+      xml_parser->getAttributeValue(ix, &attribute_value);
+      value.type = attribute_value.dataType;
+      value.data = attribute_value.data;
+      cur_xml_attr = xml_parser->getAttributeNameResID(++ix);
+    }
+
+    if (value.type != Res_value::TYPE_NULL) {
       // Take care of resolving the found resource to its final value.
-      ApkAssetsCookie new_cookie =
-          assetmanager->ResolveReference(cookie, &value, &config, &type_set_flags, &resid);
-      if (new_cookie != kInvalidCookie) {
-        cookie = new_cookie;
+      auto result = assetmanager->ResolveReference(value);
+      if (UNLIKELY(IsIOError(result))) {
+        return base::unexpected(GetIOError(result.error()));
       }
     }
 
     // Deal with the special @null value -- it turns back to TYPE_NULL.
-    if (value.dataType == Res_value::TYPE_REFERENCE && value.data == 0) {
-      value.dataType = Res_value::TYPE_NULL;
+    if (value.type == Res_value::TYPE_REFERENCE && value.data == 0U) {
+      value.type = Res_value::TYPE_NULL;
       value.data = Res_value::DATA_NULL_UNDEFINED;
-      cookie = kInvalidCookie;
+      value.cookie = kInvalidCookie;
     }
 
     // Write the final value back to Java.
-    out_values[STYLE_TYPE] = value.dataType;
+    out_values[STYLE_TYPE] = value.type;
     out_values[STYLE_DATA] = value.data;
-    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(cookie);
-    out_values[STYLE_RESOURCE_ID] = resid;
-    out_values[STYLE_CHANGING_CONFIGURATIONS] = type_set_flags;
-    out_values[STYLE_DENSITY] = config.density;
+    out_values[STYLE_ASSET_COOKIE] = ApkAssetsCookieToJavaCookie(value.cookie);
+    out_values[STYLE_RESOURCE_ID] = value.resid;
+    out_values[STYLE_CHANGING_CONFIGURATIONS] = value.flags;
+    out_values[STYLE_DENSITY] = value.config.density;
 
     if (out_indices != nullptr &&
-        (value.dataType != Res_value::TYPE_NULL || value.data == Res_value::DATA_NULL_EMPTY)) {
-      indices_idx++;
-      out_indices[indices_idx] = ii;
+        (value.type != Res_value::TYPE_NULL ||
+         value.data == Res_value::DATA_NULL_EMPTY)) {
+      out_indices[++indices_idx] = ii;
     }
 
     out_values += STYLE_NUM_ENTRIES;
@@ -476,7 +418,7 @@
   if (out_indices != nullptr) {
     out_indices[0] = indices_idx;
   }
-  return true;
+  return {};
 }
 
 }  // namespace android
diff --git a/libs/androidfw/ChunkIterator.cpp b/libs/androidfw/ChunkIterator.cpp
index 8fc3219..25c8aa6 100644
--- a/libs/androidfw/ChunkIterator.cpp
+++ b/libs/androidfw/ChunkIterator.cpp
@@ -15,6 +15,7 @@
  */
 
 #include "androidfw/Chunk.h"
+#include "androidfw/Util.h"
 
 #include "android-base/logging.h"
 
@@ -23,11 +24,11 @@
 Chunk ChunkIterator::Next() {
   CHECK(len_ != 0) << "called Next() after last chunk";
 
-  const ResChunk_header* this_chunk = next_chunk_;
+  const incfs::map_ptr<ResChunk_header> this_chunk = next_chunk_;
+  CHECK((bool) this_chunk) << "Next() called without verifying next chunk";
 
   // We've already checked the values of this_chunk, so safely increment.
-  next_chunk_ = reinterpret_cast<const ResChunk_header*>(
-      reinterpret_cast<const uint8_t*>(this_chunk) + dtohl(this_chunk->size));
+  next_chunk_ = this_chunk.offset(dtohl(this_chunk->size)).convert<ResChunk_header>();
   len_ -= dtohl(this_chunk->size);
 
   if (len_ != 0) {
@@ -36,7 +37,7 @@
       VerifyNextChunk();
     }
   }
-  return Chunk(this_chunk);
+  return Chunk(this_chunk.verified());
 }
 
 // TODO(b/111401637) remove this and have full resource file verification
@@ -47,6 +48,13 @@
     last_error_was_fatal_ = false;
     return false;
   }
+
+  if (!next_chunk_) {
+    last_error_ = "failed to read chunk from data";
+    last_error_was_fatal_ = false;
+    return false;
+  }
+
   const size_t size = dtohl(next_chunk_->size);
   if (size > len_) {
     last_error_ = "chunk size is bigger than given data";
@@ -58,12 +66,10 @@
 
 // Returns false if there was an error.
 bool ChunkIterator::VerifyNextChunk() {
-  const uintptr_t header_start = reinterpret_cast<uintptr_t>(next_chunk_);
-
   // This data must be 4-byte aligned, since we directly
   // access 32-bit words, which must be aligned on
   // certain architectures.
-  if (header_start & 0x03) {
+  if (!util::IsFourByteAligned(next_chunk_)) {
     last_error_ = "header not aligned on 4-byte boundary";
     return false;
   }
@@ -73,6 +79,11 @@
     return false;
   }
 
+  if (!next_chunk_) {
+    last_error_ = "failed to read chunk from data";
+    return false;
+  }
+
   const size_t header_size = dtohs(next_chunk_->headerSize);
   const size_t size = dtohl(next_chunk_->size);
   if (header_size < sizeof(ResChunk_header)) {
@@ -90,7 +101,7 @@
     return false;
   }
 
-  if ((size | header_size) & 0x03) {
+  if ((size | header_size) & 0x03U) {
     last_error_ = "header sizes are not aligned on 4-byte boundary";
     return false;
   }
diff --git a/libs/androidfw/Idmap.cpp b/libs/androidfw/Idmap.cpp
index 4e03ce5..a613095 100644
--- a/libs/androidfw/Idmap.cpp
+++ b/libs/androidfw/Idmap.cpp
@@ -52,22 +52,22 @@
   uninit();
 }
 
-const char16_t* OverlayStringPool::stringAt(size_t idx, size_t* outLen) const {
+base::expected<StringPiece16, NullOrIOError> OverlayStringPool::stringAt(size_t idx) const {
   const size_t offset = dtohl(data_header_->string_pool_index_offset);
   if (idmap_string_pool_ != nullptr && idx >= ResStringPool::size() && idx >= offset) {
-    return idmap_string_pool_->stringAt(idx - offset, outLen);
+    return idmap_string_pool_->stringAt(idx - offset);
   }
 
-  return ResStringPool::stringAt(idx, outLen);
+  return ResStringPool::stringAt(idx);
 }
 
-const char* OverlayStringPool::string8At(size_t idx, size_t* outLen) const {
+base::expected<StringPiece, NullOrIOError> OverlayStringPool::string8At(size_t idx) const {
   const size_t offset = dtohl(data_header_->string_pool_index_offset);
   if (idmap_string_pool_ != nullptr && idx >= ResStringPool::size() && idx >= offset) {
-    return idmap_string_pool_->string8At(idx - offset, outLen);
+    return idmap_string_pool_->string8At(idx - offset);
   }
 
-  return ResStringPool::string8At(idx, outLen);
+  return ResStringPool::string8At(idx);
 }
 
 size_t OverlayStringPool::size() const {
diff --git a/libs/androidfw/LoadedArsc.cpp b/libs/androidfw/LoadedArsc.cpp
index 70bb441..2fc3b05 100644
--- a/libs/androidfw/LoadedArsc.cpp
+++ b/libs/androidfw/LoadedArsc.cpp
@@ -38,7 +38,7 @@
 #include "androidfw/ResourceUtils.h"
 #include "androidfw/Util.h"
 
-using ::android::base::StringPrintf;
+using android::base::StringPrintf;
 
 namespace android {
 
@@ -51,17 +51,17 @@
 // the Type structs.
 class TypeSpecPtrBuilder {
  public:
-  explicit TypeSpecPtrBuilder(const ResTable_typeSpec* header)
+  explicit TypeSpecPtrBuilder(incfs::verified_map_ptr<ResTable_typeSpec> header)
       : header_(header) {
   }
 
-  void AddType(const ResTable_type* type) {
+  void AddType(incfs::verified_map_ptr<ResTable_type> type) {
     types_.push_back(type);
   }
 
   TypeSpecPtr Build() {
     // Check for overflow.
-    using ElementType = const ResTable_type*;
+    using ElementType = incfs::verified_map_ptr<ResTable_type>;
     if ((std::numeric_limits<size_t>::max() - sizeof(TypeSpec)) / sizeof(ElementType) <
         types_.size()) {
       return {};
@@ -77,8 +77,8 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(TypeSpecPtrBuilder);
 
-  const ResTable_typeSpec* header_;
-  std::vector<const ResTable_type*> types_;
+  incfs::verified_map_ptr<ResTable_typeSpec> header_;
+  std::vector<incfs::verified_map_ptr<ResTable_type>> types_;
 };
 
 }  // namespace
@@ -88,7 +88,7 @@
 
 // Precondition: The header passed in has already been verified, so reading any fields and trusting
 // the ResChunk_header is safe.
-static bool VerifyResTableType(const ResTable_type* header) {
+static bool VerifyResTableType(incfs::map_ptr<ResTable_type> header) {
   if (header->id == 0) {
     LOG(ERROR) << "RES_TABLE_TYPE_TYPE has invalid ID 0.";
     return false;
@@ -115,89 +115,99 @@
     return false;
   }
 
-  if (entries_offset & 0x03) {
+  if (entries_offset & 0x03U) {
     LOG(ERROR) << "RES_TABLE_TYPE_TYPE entries start at unaligned address.";
     return false;
   }
   return true;
 }
 
-static bool VerifyResTableEntry(const ResTable_type* type, uint32_t entry_offset) {
+static base::expected<std::monostate, NullOrIOError> VerifyResTableEntry(
+    incfs::verified_map_ptr<ResTable_type> type, uint32_t entry_offset) {
   // Check that the offset is aligned.
-  if (entry_offset & 0x03) {
+  if (UNLIKELY(entry_offset & 0x03U)) {
     LOG(ERROR) << "Entry at offset " << entry_offset << " is not 4-byte aligned.";
-    return false;
+    return base::unexpected(std::nullopt);
   }
 
   // Check that the offset doesn't overflow.
-  if (entry_offset > std::numeric_limits<uint32_t>::max() - dtohl(type->entriesStart)) {
+  if (UNLIKELY(entry_offset > std::numeric_limits<uint32_t>::max() - dtohl(type->entriesStart))) {
     // Overflow in offset.
     LOG(ERROR) << "Entry at offset " << entry_offset << " is too large.";
-    return false;
+    return base::unexpected(std::nullopt);
   }
 
   const size_t chunk_size = dtohl(type->header.size);
 
   entry_offset += dtohl(type->entriesStart);
-  if (entry_offset > chunk_size - sizeof(ResTable_entry)) {
+  if (UNLIKELY(entry_offset > chunk_size - sizeof(ResTable_entry))) {
     LOG(ERROR) << "Entry at offset " << entry_offset
                << " is too large. No room for ResTable_entry.";
-    return false;
+    return base::unexpected(std::nullopt);
   }
 
-  const ResTable_entry* entry = reinterpret_cast<const ResTable_entry*>(
-      reinterpret_cast<const uint8_t*>(type) + entry_offset);
+  auto entry = type.offset(entry_offset).convert<ResTable_entry>();
+  if (UNLIKELY(!entry)) {
+    return base::unexpected(IOError::PAGES_MISSING);
+  }
 
   const size_t entry_size = dtohs(entry->size);
-  if (entry_size < sizeof(*entry)) {
+  if (UNLIKELY(entry_size < sizeof(entry.value()))) {
     LOG(ERROR) << "ResTable_entry size " << entry_size << " at offset " << entry_offset
                << " is too small.";
-    return false;
+    return base::unexpected(std::nullopt);
   }
 
-  if (entry_size > chunk_size || entry_offset > chunk_size - entry_size) {
+  if (UNLIKELY(entry_size > chunk_size || entry_offset > chunk_size - entry_size)) {
     LOG(ERROR) << "ResTable_entry size " << entry_size << " at offset " << entry_offset
                << " is too large.";
-    return false;
+    return base::unexpected(std::nullopt);
   }
 
   if (entry_size < sizeof(ResTable_map_entry)) {
     // There needs to be room for one Res_value struct.
-    if (entry_offset + entry_size > chunk_size - sizeof(Res_value)) {
+    if (UNLIKELY(entry_offset + entry_size > chunk_size - sizeof(Res_value))) {
       LOG(ERROR) << "No room for Res_value after ResTable_entry at offset " << entry_offset
                  << " for type " << (int)type->id << ".";
-      return false;
+      return base::unexpected(std::nullopt);
     }
 
-    const Res_value* value =
-        reinterpret_cast<const Res_value*>(reinterpret_cast<const uint8_t*>(entry) + entry_size);
+    auto value = entry.offset(entry_size).convert<Res_value>();
+    if (UNLIKELY(!value)) {
+       return base::unexpected(IOError::PAGES_MISSING);
+    }
+
     const size_t value_size = dtohs(value->size);
-    if (value_size < sizeof(Res_value)) {
+    if (UNLIKELY(value_size < sizeof(Res_value))) {
       LOG(ERROR) << "Res_value at offset " << entry_offset << " is too small.";
-      return false;
+      return base::unexpected(std::nullopt);
     }
 
-    if (value_size > chunk_size || entry_offset + entry_size > chunk_size - value_size) {
+    if (UNLIKELY(value_size > chunk_size || entry_offset + entry_size > chunk_size - value_size)) {
       LOG(ERROR) << "Res_value size " << value_size << " at offset " << entry_offset
                  << " is too large.";
-      return false;
+      return base::unexpected(std::nullopt);
     }
   } else {
-    const ResTable_map_entry* map = reinterpret_cast<const ResTable_map_entry*>(entry);
+    auto map = entry.convert<ResTable_map_entry>();
+    if (UNLIKELY(!map)) {
+      return base::unexpected(IOError::PAGES_MISSING);
+    }
+
     const size_t map_entry_count = dtohl(map->count);
     size_t map_entries_start = entry_offset + entry_size;
-    if (map_entries_start & 0x03) {
+    if (UNLIKELY(map_entries_start & 0x03U)) {
       LOG(ERROR) << "Map entries at offset " << entry_offset << " start at unaligned offset.";
-      return false;
+      return base::unexpected(std::nullopt);
     }
 
     // Each entry is sizeof(ResTable_map) big.
-    if (map_entry_count > ((chunk_size - map_entries_start) / sizeof(ResTable_map))) {
+    if (UNLIKELY(map_entry_count > ((chunk_size - map_entries_start) / sizeof(ResTable_map)))) {
       LOG(ERROR) << "Too many map entries in ResTable_map_entry at offset " << entry_offset << ".";
-      return false;
+      return base::unexpected(std::nullopt);
     }
   }
-  return true;
+  return {};
 }
 
 LoadedPackage::iterator::iterator(const LoadedPackage* lp, size_t ti, size_t ei)
@@ -233,99 +243,125 @@
           entryIndex_);
 }
 
-const ResTable_entry* LoadedPackage::GetEntry(const ResTable_type* type_chunk,
-                                              uint16_t entry_index) {
-  uint32_t entry_offset = GetEntryOffset(type_chunk, entry_index);
-  if (entry_offset == ResTable_type::NO_ENTRY) {
-    return nullptr;
+base::expected<incfs::map_ptr<ResTable_entry>, NullOrIOError> LoadedPackage::GetEntry(
+    incfs::verified_map_ptr<ResTable_type> type_chunk, uint16_t entry_index) {
+  base::expected<uint32_t, NullOrIOError> entry_offset = GetEntryOffset(type_chunk, entry_index);
+  if (UNLIKELY(!entry_offset.has_value())) {
+    return base::unexpected(entry_offset.error());
   }
-  return GetEntryFromOffset(type_chunk, entry_offset);
+  return GetEntryFromOffset(type_chunk, entry_offset.value());
 }
 
-uint32_t LoadedPackage::GetEntryOffset(const ResTable_type* type_chunk, uint16_t entry_index) {
+base::expected<uint32_t, NullOrIOError> LoadedPackage::GetEntryOffset(
+    incfs::verified_map_ptr<ResTable_type> type_chunk, uint16_t entry_index) {
   // The configuration matches and is better than the previous selection.
   // Find the entry value if it exists for this configuration.
   const size_t entry_count = dtohl(type_chunk->entryCount);
   const size_t offsets_offset = dtohs(type_chunk->header.headerSize);
 
   // Check if there is the desired entry in this type.
-
   if (type_chunk->flags & ResTable_type::FLAG_SPARSE) {
     // This is encoded as a sparse map, so perform a binary search.
-    const ResTable_sparseTypeEntry* sparse_indices =
-        reinterpret_cast<const ResTable_sparseTypeEntry*>(
-            reinterpret_cast<const uint8_t*>(type_chunk) + offsets_offset);
-    const ResTable_sparseTypeEntry* sparse_indices_end = sparse_indices + entry_count;
-    const ResTable_sparseTypeEntry* result =
-        std::lower_bound(sparse_indices, sparse_indices_end, entry_index,
-                         [](const ResTable_sparseTypeEntry& entry, uint16_t entry_idx) {
-                           return dtohs(entry.idx) < entry_idx;
-                         });
+    bool error = false;
+    auto sparse_indices = type_chunk.offset(offsets_offset)
+                                    .convert<ResTable_sparseTypeEntry>().iterator();
+    auto sparse_indices_end = sparse_indices + entry_count;
+    auto result = std::lower_bound(sparse_indices, sparse_indices_end, entry_index,
+                                   [&error](const incfs::map_ptr<ResTable_sparseTypeEntry>& entry,
+                                            uint16_t entry_idx) {
+      if (UNLIKELY(!entry)) {
+        return error = true;
+      }
+      return dtohs(entry->idx) < entry_idx;
+    });
 
-    if (result == sparse_indices_end || dtohs(result->idx) != entry_index) {
+    if (result == sparse_indices_end) {
       // No entry found.
-      return ResTable_type::NO_ENTRY;
+      return base::unexpected(std::nullopt);
+    }
+
+    const incfs::verified_map_ptr<ResTable_sparseTypeEntry> entry = (*result).verified();
+    if (dtohs(entry->idx) != entry_index) {
+      if (error) {
+        return base::unexpected(IOError::PAGES_MISSING);
+      }
+      return base::unexpected(std::nullopt);
     }
 
     // Extract the offset from the entry. Each offset must be a multiple of 4 so we store it as
     // the real offset divided by 4.
-    return uint32_t{dtohs(result->offset)} * 4u;
+    return uint32_t{dtohs(entry->offset)} * 4u;
   }
 
   // This type is encoded as a dense array.
   if (entry_index >= entry_count) {
     // This entry cannot be here.
-    return ResTable_type::NO_ENTRY;
+    return base::unexpected(std::nullopt);
   }
 
-  const uint32_t* entry_offsets = reinterpret_cast<const uint32_t*>(
-      reinterpret_cast<const uint8_t*>(type_chunk) + offsets_offset);
-  return dtohl(entry_offsets[entry_index]);
-}
-
-const ResTable_entry* LoadedPackage::GetEntryFromOffset(const ResTable_type* type_chunk,
-                                                        uint32_t offset) {
-  if (UNLIKELY(!VerifyResTableEntry(type_chunk, offset))) {
-    return nullptr;
+  const auto entry_offset_ptr = type_chunk.offset(offsets_offset).convert<uint32_t>() + entry_index;
+  if (UNLIKELY(!entry_offset_ptr)) {
+    return base::unexpected(IOError::PAGES_MISSING);
   }
-  return reinterpret_cast<const ResTable_entry*>(reinterpret_cast<const uint8_t*>(type_chunk) +
-                                                 offset + dtohl(type_chunk->entriesStart));
+
+  const uint32_t value = dtohl(entry_offset_ptr.value());
+  if (value == ResTable_type::NO_ENTRY) {
+    return base::unexpected(std::nullopt);
+  }
+
+  return value;
 }
 
-void LoadedPackage::CollectConfigurations(bool exclude_mipmap,
-                                          std::set<ResTable_config>* out_configs) const {
-  const static std::u16string kMipMap = u"mipmap";
+base::expected<incfs::map_ptr<ResTable_entry>, NullOrIOError> LoadedPackage::GetEntryFromOffset(
+    incfs::verified_map_ptr<ResTable_type> type_chunk, uint32_t offset) {
+  auto valid = VerifyResTableEntry(type_chunk, offset);
+  if (UNLIKELY(!valid.has_value())) {
+    return base::unexpected(valid.error());
+  }
+  return type_chunk.offset(offset + dtohl(type_chunk->entriesStart)).convert<ResTable_entry>();
+}
+
+base::expected<std::monostate, IOError> LoadedPackage::CollectConfigurations(
+    bool exclude_mipmap, std::set<ResTable_config>* out_configs) const {
   const size_t type_count = type_specs_.size();
   for (size_t i = 0; i < type_count; i++) {
     const TypeSpecPtr& type_spec = type_specs_[i];
-    if (type_spec != nullptr) {
-      if (exclude_mipmap) {
-        const int type_idx = type_spec->type_spec->id - 1;
-        size_t type_name_len;
-        const char16_t* type_name16 = type_string_pool_.stringAt(type_idx, &type_name_len);
-        if (type_name16 != nullptr) {
-          if (kMipMap.compare(0, std::u16string::npos, type_name16, type_name_len) == 0) {
-            // This is a mipmap type, skip collection.
-            continue;
-          }
-        }
-        const char* type_name = type_string_pool_.string8At(type_idx, &type_name_len);
-        if (type_name != nullptr) {
-          if (strncmp(type_name, "mipmap", type_name_len) == 0) {
-            // This is a mipmap type, skip collection.
-            continue;
-          }
+    if (type_spec == nullptr) {
+      continue;
+    }
+    if (exclude_mipmap) {
+      const int type_idx = type_spec->type_spec->id - 1;
+      const auto type_name16 = type_string_pool_.stringAt(type_idx);
+      if (UNLIKELY(IsIOError(type_name16))) {
+        return base::unexpected(GetIOError(type_name16.error()));
+      }
+      if (type_name16.has_value()) {
+        if (strncmp16(type_name16->data(), u"mipmap", type_name16->size()) == 0) {
+          // This is a mipmap type, skip collection.
+          continue;
         }
       }
 
-      const auto iter_end = type_spec->types + type_spec->type_count;
-      for (auto iter = type_spec->types; iter != iter_end; ++iter) {
-        ResTable_config config;
-        config.copyFromDtoH((*iter)->config);
-        out_configs->insert(config);
+      const auto type_name = type_string_pool_.string8At(type_idx);
+      if (UNLIKELY(IsIOError(type_name))) {
+        return base::unexpected(GetIOError(type_name.error()));
+      }
+      if (type_name.has_value()) {
+        if (strncmp(type_name->data(), "mipmap", type_name->size()) == 0) {
+          // This is a mipmap type, skip collection.
+          continue;
+        }
       }
     }
+
+    const auto iter_end = type_spec->types + type_spec->type_count;
+    for (auto iter = type_spec->types; iter != iter_end; ++iter) {
+      ResTable_config config;
+      config.copyFromDtoH((*iter)->config);
+      out_configs->insert(config);
+    }
   }
+  return {};
 }
 
 void LoadedPackage::CollectLocales(bool canonicalize, std::set<std::string>* out_locales) const {
@@ -348,43 +384,53 @@
   }
 }
 
-uint32_t LoadedPackage::FindEntryByName(const std::u16string& type_name,
-                                        const std::u16string& entry_name) const {
-  ssize_t type_idx = type_string_pool_.indexOfString(type_name.data(), type_name.size());
-  if (type_idx < 0) {
-    return 0u;
+base::expected<uint32_t, NullOrIOError> LoadedPackage::FindEntryByName(
+    const std::u16string& type_name, const std::u16string& entry_name) const {
+  const base::expected<size_t, NullOrIOError> type_idx = type_string_pool_.indexOfString(
+      type_name.data(), type_name.size());
+  if (!type_idx.has_value()) {
+    return base::unexpected(type_idx.error());
   }
 
-  ssize_t key_idx = key_string_pool_.indexOfString(entry_name.data(), entry_name.size());
-  if (key_idx < 0) {
-    return 0u;
+  const base::expected<size_t, NullOrIOError> key_idx = key_string_pool_.indexOfString(
+      entry_name.data(), entry_name.size());
+  if (!key_idx.has_value()) {
+    return base::unexpected(key_idx.error());
   }
 
-  const TypeSpec* type_spec = type_specs_[type_idx].get();
+  const TypeSpec* type_spec = type_specs_[*type_idx].get();
   if (type_spec == nullptr) {
-    return 0u;
+    return base::unexpected(std::nullopt);
   }
 
   const auto iter_end = type_spec->types + type_spec->type_count;
   for (auto iter = type_spec->types; iter != iter_end; ++iter) {
-    const ResTable_type* type = *iter;
+    const incfs::verified_map_ptr<ResTable_type>& type = *iter;
+
     size_t entry_count = dtohl(type->entryCount);
     for (size_t entry_idx = 0; entry_idx < entry_count; entry_idx++) {
-      const uint32_t* entry_offsets = reinterpret_cast<const uint32_t*>(
-          reinterpret_cast<const uint8_t*>(type) + dtohs(type->header.headerSize));
-      const uint32_t offset = dtohl(entry_offsets[entry_idx]);
+      auto entry_offset_ptr = type.offset(dtohs(type->header.headerSize)).convert<uint32_t>() +
+          entry_idx;
+      if (!entry_offset_ptr) {
+        return base::unexpected(IOError::PAGES_MISSING);
+      }
+
+      auto offset = dtohl(entry_offset_ptr.value());
       if (offset != ResTable_type::NO_ENTRY) {
-        const ResTable_entry* entry = reinterpret_cast<const ResTable_entry*>(
-            reinterpret_cast<const uint8_t*>(type) + dtohl(type->entriesStart) + offset);
-        if (dtohl(entry->key.index) == static_cast<uint32_t>(key_idx)) {
+        auto entry = type.offset(dtohl(type->entriesStart) + offset).convert<ResTable_entry>();
+        if (!entry) {
+          return base::unexpected(IOError::PAGES_MISSING);
+        }
+
+        if (dtohl(entry->key.index) == static_cast<uint32_t>(*key_idx)) {
           // The package ID will be overridden by the caller (due to runtime assignment of package
           // IDs for shared libraries).
-          return make_resid(0x00, type_idx + type_id_offset_ + 1, entry_idx);
+          return make_resid(0x00, *type_idx + type_id_offset_ + 1, entry_idx);
         }
       }
     }
   }
-  return 0u;
+  return base::unexpected(std::nullopt);
 }
 
 const LoadedPackage* LoadedArsc::GetPackageById(uint8_t package_id) const {
@@ -405,8 +451,8 @@
   // was added.
   constexpr size_t kMinPackageSize =
       sizeof(ResTable_package) - sizeof(ResTable_package::typeIdOffset);
-  const ResTable_package* header = chunk.header<ResTable_package, kMinPackageSize>();
-  if (header == nullptr) {
+  const incfs::map_ptr<ResTable_package> header = chunk.header<ResTable_package, kMinPackageSize>();
+  if (!header) {
     LOG(ERROR) << "RES_TABLE_PACKAGE_TYPE too small.";
     return {};
   }
@@ -453,10 +499,13 @@
     const Chunk child_chunk = iter.Next();
     switch (child_chunk.type()) {
       case RES_STRING_POOL_TYPE: {
-        const uintptr_t pool_address =
-            reinterpret_cast<uintptr_t>(child_chunk.header<ResChunk_header>());
-        const uintptr_t header_address = reinterpret_cast<uintptr_t>(header);
-        if (pool_address == header_address + dtohl(header->typeStrings)) {
+        const auto pool_address = child_chunk.header<ResChunk_header>();
+        if (!pool_address) {
+          LOG(ERROR) << "RES_STRING_POOL_TYPE is incomplete due to incremental installation.";
+          return {};
+        }
+
+        if (pool_address == header.offset(dtohl(header->typeStrings)).convert<ResChunk_header>()) {
           // This string pool is the type string pool.
           status_t err = loaded_package->type_string_pool_.setTo(
               child_chunk.header<ResStringPool_header>(), child_chunk.size());
@@ -464,7 +513,8 @@
             LOG(ERROR) << "RES_STRING_POOL_TYPE for types corrupt.";
             return {};
           }
-        } else if (pool_address == header_address + dtohl(header->keyStrings)) {
+        } else if (pool_address == header.offset(dtohl(header->keyStrings))
+                                         .convert<ResChunk_header>()) {
           // This string pool is the key string pool.
           status_t err = loaded_package->key_string_pool_.setTo(
               child_chunk.header<ResStringPool_header>(), child_chunk.size());
@@ -478,8 +528,8 @@
       } break;
 
       case RES_TABLE_TYPE_SPEC_TYPE: {
-        const ResTable_typeSpec* type_spec = child_chunk.header<ResTable_typeSpec>();
-        if (type_spec == nullptr) {
+        const auto type_spec = child_chunk.header<ResTable_typeSpec>();
+        if (!type_spec) {
           LOG(ERROR) << "RES_TABLE_TYPE_SPEC_TYPE too small.";
           return {};
         }
@@ -514,7 +564,7 @@
 
         std::unique_ptr<TypeSpecPtrBuilder>& builder_ptr = type_builder_map[type_spec->id - 1];
         if (builder_ptr == nullptr) {
-          builder_ptr = util::make_unique<TypeSpecPtrBuilder>(type_spec);
+          builder_ptr = util::make_unique<TypeSpecPtrBuilder>(type_spec.verified());
           loaded_package->resource_ids_.set(type_spec->id, entry_count);
         } else {
           LOG(WARNING) << StringPrintf("RES_TABLE_TYPE_SPEC_TYPE already defined for ID %02x",
@@ -523,8 +573,8 @@
       } break;
 
       case RES_TABLE_TYPE_TYPE: {
-        const ResTable_type* type = child_chunk.header<ResTable_type, kResTableTypeMinSize>();
-        if (type == nullptr) {
+        const auto type = child_chunk.header<ResTable_type, kResTableTypeMinSize>();
+        if (!type) {
           LOG(ERROR) << "RES_TABLE_TYPE_TYPE too small.";
           return {};
         }
@@ -536,7 +586,7 @@
         // Type chunks must be preceded by their TypeSpec chunks.
         std::unique_ptr<TypeSpecPtrBuilder>& builder_ptr = type_builder_map[type->id - 1];
         if (builder_ptr != nullptr) {
-          builder_ptr->AddType(type);
+          builder_ptr->AddType(type.verified());
         } else {
           LOG(ERROR) << StringPrintf(
               "RES_TABLE_TYPE_TYPE with ID %02x found without preceding RES_TABLE_TYPE_SPEC_TYPE.",
@@ -546,8 +596,8 @@
       } break;
 
       case RES_TABLE_LIBRARY_TYPE: {
-        const ResTable_lib_header* lib = child_chunk.header<ResTable_lib_header>();
-        if (lib == nullptr) {
+        const auto lib = child_chunk.header<ResTable_lib_header>();
+        if (!lib) {
           LOG(ERROR) << "RES_TABLE_LIBRARY_TYPE too small.";
           return {};
         }
@@ -559,10 +609,13 @@
 
         loaded_package->dynamic_package_map_.reserve(dtohl(lib->count));
 
-        const ResTable_lib_entry* const entry_begin =
-            reinterpret_cast<const ResTable_lib_entry*>(child_chunk.data_ptr());
-        const ResTable_lib_entry* const entry_end = entry_begin + dtohl(lib->count);
+        const auto entry_begin = child_chunk.data_ptr().convert<ResTable_lib_entry>();
+        const auto entry_end = entry_begin + dtohl(lib->count);
         for (auto entry_iter = entry_begin; entry_iter != entry_end; ++entry_iter) {
+          if (!entry_iter) {
+            return {};
+          }
+
           std::string package_name;
           util::ReadUtf16StringFromDevice(entry_iter->packageName,
                                           arraysize(entry_iter->packageName), &package_name);
@@ -580,17 +633,16 @@
       } break;
 
       case RES_TABLE_OVERLAYABLE_TYPE: {
-        const ResTable_overlayable_header* header =
-            child_chunk.header<ResTable_overlayable_header>();
-        if (header == nullptr) {
+        const auto overlayable = child_chunk.header<ResTable_overlayable_header>();
+        if (!overlayable) {
           LOG(ERROR) << "RES_TABLE_OVERLAYABLE_TYPE too small.";
           return {};
         }
 
         std::string name;
-        util::ReadUtf16StringFromDevice(header->name, arraysize(header->name), &name);
+        util::ReadUtf16StringFromDevice(overlayable->name, arraysize(overlayable->name), &name);
         std::string actor;
-        util::ReadUtf16StringFromDevice(header->actor, arraysize(header->actor), &actor);
+        util::ReadUtf16StringFromDevice(overlayable->actor, arraysize(overlayable->actor), &actor);
 
         if (loaded_package->overlayable_map_.find(name) !=
             loaded_package->overlayable_map_.end()) {
@@ -606,9 +658,9 @@
 
           switch (overlayable_child_chunk.type()) {
             case RES_TABLE_OVERLAYABLE_POLICY_TYPE: {
-              const ResTable_overlayable_policy_header* policy_header =
+              const auto policy_header =
                   overlayable_child_chunk.header<ResTable_overlayable_policy_header>();
-              if (policy_header == nullptr) {
+              if (!policy_header) {
                 LOG(ERROR) << "RES_TABLE_OVERLAYABLE_POLICY_TYPE too small.";
                 return {};
               }
@@ -621,10 +673,12 @@
 
               // Retrieve all the resource ids belonging to this policy chunk
               std::unordered_set<uint32_t> ids;
-              const auto ids_begin =
-                  reinterpret_cast<const ResTable_ref*>(overlayable_child_chunk.data_ptr());
+              const auto ids_begin = overlayable_child_chunk.data_ptr().convert<ResTable_ref>();
               const auto ids_end = ids_begin + dtohl(policy_header->entry_count);
               for (auto id_iter = ids_begin; id_iter != ids_end; ++id_iter) {
+                if (!id_iter) {
+                  return {};
+                }
                 ids.insert(dtohl(id_iter->ident));
               }
 
@@ -633,7 +687,7 @@
               overlayable_info.name = name;
               overlayable_info.actor = actor;
               overlayable_info.policy_flags = policy_header->policy_flags;
-              loaded_package->overlayable_infos_.push_back(std::make_pair(overlayable_info, ids));
+              loaded_package->overlayable_infos_.emplace_back(overlayable_info, ids);
               loaded_package->defines_overlayable_ = true;
               break;
             }
@@ -683,8 +737,8 @@
 
 bool LoadedArsc::LoadTable(const Chunk& chunk, const LoadedIdmap* loaded_idmap,
                            package_property_t property_flags) {
-  const ResTable_header* header = chunk.header<ResTable_header>();
-  if (header == nullptr) {
+  incfs::map_ptr<ResTable_header> header = chunk.header<ResTable_header>();
+  if (!header) {
     LOG(ERROR) << "RES_TABLE_TYPE too small.";
     return false;
   }
@@ -747,7 +801,8 @@
   return true;
 }
 
-std::unique_ptr<const LoadedArsc> LoadedArsc::Load(const StringPiece& data,
+std::unique_ptr<const LoadedArsc> LoadedArsc::Load(incfs::map_ptr<void> data,
+                                                   const size_t length,
                                                    const LoadedIdmap* loaded_idmap,
                                                    const package_property_t property_flags) {
   ATRACE_NAME("LoadedArsc::Load");
@@ -755,7 +810,7 @@
   // Not using make_unique because the constructor is private.
   std::unique_ptr<LoadedArsc> loaded_arsc(new LoadedArsc());
 
-  ChunkIterator iter(data.data(), data.size());
+  ChunkIterator iter(data, length);
   while (iter.HasNext()) {
     const Chunk chunk = iter.Next();
     switch (chunk.type()) {
diff --git a/libs/androidfw/ResourceTypes.cpp b/libs/androidfw/ResourceTypes.cpp
index dfb4009..bce70e2 100644
--- a/libs/androidfw/ResourceTypes.cpp
+++ b/libs/androidfw/ResourceTypes.cpp
@@ -104,22 +104,26 @@
     *dst = 0;
 }
 
-static status_t validate_chunk(const ResChunk_header* chunk,
+static status_t validate_chunk(const incfs::map_ptr<ResChunk_header>& chunk,
                                size_t minSize,
-                               const uint8_t* dataEnd,
+                               const incfs::map_ptr<uint8_t> dataEnd,
                                const char* name)
 {
+    if (!chunk) {
+      return BAD_TYPE;
+    }
+
     const uint16_t headerSize = dtohs(chunk->headerSize);
     const uint32_t size = dtohl(chunk->size);
 
     if (headerSize >= minSize) {
         if (headerSize <= size) {
             if (((headerSize|size)&0x3) == 0) {
-                if ((size_t)size <= (size_t)(dataEnd-((const uint8_t*)chunk))) {
+                if ((size_t)size <= (size_t)(dataEnd-chunk.convert<uint8_t>())) {
                     return NO_ERROR;
                 }
                 ALOGW("%s data size 0x%x extends beyond resource end %p.",
-                     name, size, (void*)(dataEnd-((const uint8_t*)chunk)));
+                     name, size, (void*)(dataEnd-chunk.convert<uint8_t>()));
                 return BAD_TYPE;
             }
             ALOGW("%s size 0x%x or headerSize 0x%x is not on an integer boundary.",
@@ -450,7 +454,7 @@
     mHeader = (const ResStringPool_header*) header;
 }
 
-status_t ResStringPool::setTo(const void* data, size_t size, bool copyData)
+status_t ResStringPool::setTo(incfs::map_ptr<void> data, size_t size, bool copyData)
 {
     if (!data || !size) {
         return (mError=BAD_TYPE);
@@ -467,8 +471,8 @@
     // The data is at least as big as a ResChunk_header, so we can safely validate the other
     // header fields.
     // `data + size` is safe because the source of `size` comes from the kernel/filesystem.
-    if (validate_chunk(reinterpret_cast<const ResChunk_header*>(data), sizeof(ResStringPool_header),
-                       reinterpret_cast<const uint8_t*>(data) + size,
+    const auto chunk_header = data.convert<ResChunk_header>();
+    if (validate_chunk(chunk_header, sizeof(ResStringPool_header), data.convert<uint8_t>() + size,
                        "ResStringPool_header") != NO_ERROR) {
         ALOGW("Bad string block: malformed block dimensions");
         return (mError=BAD_TYPE);
@@ -481,16 +485,25 @@
         if (mOwnedData == NULL) {
             return (mError=NO_MEMORY);
         }
-        memcpy(mOwnedData, data, size);
+
+        if (!data.convert<uint8_t>().verify(size)) {
+            return (mError=NO_MEMORY);
+        }
+
+        memcpy(mOwnedData, data.unsafe_ptr(), size);
         data = mOwnedData;
     }
 
     // The size has been checked, so it is safe to read the data in the ResStringPool_header
     // data structure.
-    mHeader = (const ResStringPool_header*)data;
+    const auto header = data.convert<ResStringPool_header>();
+    if (!header) {
+      return (mError=BAD_TYPE);
+    }
 
+    mHeader = header.verified();
     if (notDeviceEndian) {
-        ResStringPool_header* h = const_cast<ResStringPool_header*>(mHeader);
+        ResStringPool_header* h = const_cast<ResStringPool_header*>(mHeader.unsafe_ptr());
         h->header.headerSize = dtohs(mHeader->header.headerSize);
         h->header.type = dtohs(mHeader->header.type);
         h->header.size = dtohl(mHeader->header.size);
@@ -508,8 +521,7 @@
         return (mError=BAD_TYPE);
     }
     mSize = mHeader->header.size;
-    mEntries = (const uint32_t*)
-        (((const uint8_t*)data)+mHeader->header.headerSize);
+    mEntries = data.offset(mHeader->header.headerSize).convert<uint32_t>();
 
     if (mHeader->stringCount > 0) {
         if ((mHeader->stringCount*sizeof(uint32_t) < mHeader->stringCount)  // uint32 overflow?
@@ -536,9 +548,7 @@
             return (mError=BAD_TYPE);
         }
 
-        mStrings = (const void*)
-            (((const uint8_t*)data) + mHeader->stringsStart);
-
+        mStrings = data.offset(mHeader->stringsStart).convert<void>();
         if (mHeader->styleCount == 0) {
             mStringPoolSize = (mSize - mHeader->stringsStart) / charSize;
         } else {
@@ -560,31 +570,37 @@
 
         // check invariant: stringCount > 0 requires a string pool to exist
         if (mStringPoolSize == 0) {
-            ALOGW("Bad string block: stringCount is %d but pool size is 0\n", (int)mHeader->stringCount);
+            ALOGW("Bad string block: stringCount is %d but pool size is 0\n",
+                  (int)mHeader->stringCount);
             return (mError=BAD_TYPE);
         }
 
         if (notDeviceEndian) {
             size_t i;
-            uint32_t* e = const_cast<uint32_t*>(mEntries);
+            auto e = const_cast<uint32_t*>(mEntries.unsafe_ptr());
             for (i=0; i<mHeader->stringCount; i++) {
-                e[i] = dtohl(mEntries[i]);
+                e[i] = dtohl(e[i]);
             }
             if (!(mHeader->flags&ResStringPool_header::UTF8_FLAG)) {
-                const uint16_t* strings = (const uint16_t*)mStrings;
-                uint16_t* s = const_cast<uint16_t*>(strings);
+                uint16_t* s = const_cast<uint16_t*>(mStrings.convert<uint16_t>().unsafe_ptr());
                 for (i=0; i<mStringPoolSize; i++) {
-                    s[i] = dtohs(strings[i]);
+                    s[i] = dtohs(s[i]);
                 }
             }
         }
 
-        if ((mHeader->flags&ResStringPool_header::UTF8_FLAG &&
-                ((uint8_t*)mStrings)[mStringPoolSize-1] != 0) ||
-                (!(mHeader->flags&ResStringPool_header::UTF8_FLAG) &&
-                ((uint16_t*)mStrings)[mStringPoolSize-1] != 0)) {
-            ALOGW("Bad string block: last string is not 0-terminated\n");
-            return (mError=BAD_TYPE);
+        if (mHeader->flags&ResStringPool_header::UTF8_FLAG) {
+            auto end = mStrings.convert<uint8_t>() + (mStringPoolSize-1);
+            if (!end || end.value() != 0) {
+                ALOGW("Bad string block: last string is not 0-terminated\n");
+                return (mError=BAD_TYPE);
+            }
+        } else {
+            auto end = mStrings.convert<uint16_t>() + (mStringPoolSize-1);
+            if (!end || end.value() != 0) {
+                ALOGW("Bad string block: last string is not 0-terminated\n");
+                return (mError=BAD_TYPE);
+            }
         }
     } else {
         mStrings = NULL;
@@ -599,14 +615,13 @@
             return (mError=BAD_TYPE);
         }
 
-        if (((const uint8_t*)mEntryStyles-(const uint8_t*)mHeader) > (int)size) {
+        if ((mEntryStyles.convert<uint8_t>() - mHeader.convert<uint8_t>()) > (int)size) {
             ALOGW("Bad string block: entry of %d styles extends past data size %d\n",
-                    (int)((const uint8_t*)mEntryStyles-(const uint8_t*)mHeader),
+                    (int)(mEntryStyles.convert<uint8_t>()-mHeader.convert<uint8_t>()),
                     (int)size);
             return (mError=BAD_TYPE);
         }
-        mStyles = (const uint32_t*)
-            (((const uint8_t*)data)+mHeader->stylesStart);
+        mStyles = data.offset(mHeader->stylesStart).convert<uint32_t>();
         if (mHeader->stylesStart >= mHeader->header.size) {
             ALOGW("Bad string block: style pool starts %d, after total size %d\n",
                     (int)mHeader->stylesStart, (int)mHeader->header.size);
@@ -617,13 +632,13 @@
 
         if (notDeviceEndian) {
             size_t i;
-            uint32_t* e = const_cast<uint32_t*>(mEntryStyles);
+            uint32_t* e = const_cast<uint32_t*>(mEntryStyles.unsafe_ptr());
             for (i=0; i<mHeader->styleCount; i++) {
-                e[i] = dtohl(mEntryStyles[i]);
+                e[i] = dtohl(e[i]);
             }
-            uint32_t* s = const_cast<uint32_t*>(mStyles);
+            uint32_t* s = const_cast<uint32_t*>(mStyles.unsafe_ptr());
             for (i=0; i<mStylePoolSize; i++) {
-                s[i] = dtohl(mStyles[i]);
+                s[i] = dtohl(s[i]);
             }
         }
 
@@ -631,8 +646,9 @@
             { htodl(ResStringPool_span::END) },
             htodl(ResStringPool_span::END), htodl(ResStringPool_span::END)
         };
-        if (memcmp(&mStyles[mStylePoolSize-(sizeof(endSpan)/sizeof(uint32_t))],
-                   &endSpan, sizeof(endSpan)) != 0) {
+
+        auto stylesEnd = mStyles + (mStylePoolSize-(sizeof(endSpan)/sizeof(uint32_t)));
+        if (!stylesEnd || memcmp(stylesEnd.unsafe_ptr(), &endSpan, sizeof(endSpan)) != 0) {
             ALOGW("Bad string block: last style is not 0xFFFFFFFF-terminated\n");
             return (mError=BAD_TYPE);
         }
@@ -653,7 +669,7 @@
 void ResStringPool::uninit()
 {
     mError = NO_INIT;
-    if (mHeader != NULL && mCache != NULL) {
+    if (mHeader && mCache != NULL) {
         for (size_t x = 0; x < mHeader->stringCount; x++) {
             if (mCache[x] != NULL) {
                 free(mCache[x]);
@@ -679,15 +695,21 @@
  * data encoded. In that case, drop the high bit of the first character and
  * add it together with the next character.
  */
-static inline size_t
-decodeLength(const uint16_t** str)
+static inline base::expected<size_t, IOError> decodeLength(incfs::map_ptr<uint16_t>* str)
 {
-    size_t len = **str;
-    if ((len & 0x8000) != 0) {
-        (*str)++;
-        len = ((len & 0x7FFF) << 16) | **str;
+    if (UNLIKELY(!*str)) {
+        return base::unexpected(IOError::PAGES_MISSING);
     }
-    (*str)++;
+
+    size_t len = str->value();
+    if ((len & 0x8000U) != 0) {
+        ++(*str);
+        if (UNLIKELY(!*str)) {
+            return base::unexpected(IOError::PAGES_MISSING);
+        }
+        len = ((len & 0x7FFFU) << 16U) | str->value();
+    }
+    ++(*str);
     return len;
 }
 
@@ -701,82 +723,119 @@
  * data encoded. In that case, drop the high bit of the first character and
  * add it together with the next character.
  */
-static inline size_t
-decodeLength(const uint8_t** str)
+static inline base::expected<size_t, IOError> decodeLength(incfs::map_ptr<uint8_t>* str)
 {
-    size_t len = **str;
-    if ((len & 0x80) != 0) {
-        (*str)++;
-        len = ((len & 0x7F) << 8) | **str;
+    if (UNLIKELY(!*str)) {
+        return base::unexpected(IOError::PAGES_MISSING);
     }
-    (*str)++;
+
+    size_t len = str->value();
+    if ((len & 0x80U) != 0) {
+        ++(*str);
+        if (UNLIKELY(!*str)) {
+            return base::unexpected(IOError::PAGES_MISSING);
+        }
+        len = ((len & 0x7FU) << 8U) | str->value();
+    }
+    ++(*str);
     return len;
 }
 
-const char16_t* ResStringPool::stringAt(size_t idx, size_t* u16len) const
+base::expected<StringPiece16, NullOrIOError> ResStringPool::stringAt(size_t idx) const
 {
     if (mError == NO_ERROR && idx < mHeader->stringCount) {
         const bool isUTF8 = (mHeader->flags&ResStringPool_header::UTF8_FLAG) != 0;
-        const uint32_t off = mEntries[idx]/(isUTF8?sizeof(uint8_t):sizeof(uint16_t));
+        auto offPtr = mEntries + idx;
+        if (UNLIKELY(!offPtr)) {
+           return base::unexpected(IOError::PAGES_MISSING);
+        }
+
+        const uint32_t off = (offPtr.value())/(isUTF8?sizeof(uint8_t):sizeof(uint16_t));
         if (off < (mStringPoolSize-1)) {
             if (!isUTF8) {
-                const uint16_t* strings = (uint16_t*)mStrings;
-                const uint16_t* str = strings+off;
+                auto strings = mStrings.convert<uint16_t>();
+                auto str = strings+off;
 
-                *u16len = decodeLength(&str);
+                const base::expected<size_t, IOError> u16len = decodeLength(&str);
+                if (UNLIKELY(!u16len.has_value())) {
+                    return base::unexpected(u16len.error());
+                }
+
                 if ((uint32_t)(str+*u16len-strings) < mStringPoolSize) {
                     // Reject malformed (non null-terminated) strings
-                    if (str[*u16len] != 0x0000) {
-                        ALOGW("Bad string block: string #%d is not null-terminated",
-                              (int)idx);
-                        return NULL;
+                    const auto nullAddress = str + (*u16len);
+                    if (UNLIKELY(!nullAddress)) {
+                       return base::unexpected(IOError::PAGES_MISSING);
                     }
-                    return reinterpret_cast<const char16_t*>(str);
+
+                    if (nullAddress.value() != 0x0000) {
+                        ALOGW("Bad string block: string #%d is not null-terminated", (int)idx);
+                        return base::unexpected(std::nullopt);
+                    }
+
+                    if (UNLIKELY(!str.verify(*u16len + 1U))) {
+                      return base::unexpected(IOError::PAGES_MISSING);
+                    }
+
+                    return StringPiece16(reinterpret_cast<const char16_t*>(str.unsafe_ptr()),
+                                         *u16len);
                 } else {
                     ALOGW("Bad string block: string #%d extends to %d, past end at %d\n",
                             (int)idx, (int)(str+*u16len-strings), (int)mStringPoolSize);
                 }
             } else {
-                const uint8_t* strings = (uint8_t*)mStrings;
-                const uint8_t* u8str = strings+off;
+                auto strings = mStrings.convert<uint8_t>();
+                auto u8str = strings+off;
 
-                *u16len = decodeLength(&u8str);
-                size_t u8len = decodeLength(&u8str);
+                base::expected<size_t, IOError> u16len = decodeLength(&u8str);
+                if (UNLIKELY(!u16len.has_value())) {
+                    return base::unexpected(u16len.error());
+                }
+
+                const base::expected<size_t, IOError> u8len = decodeLength(&u8str);
+                if (UNLIKELY(!u8len.has_value())) {
+                    return base::unexpected(u8len.error());
+                }
 
                 // encLen must be less than 0x7FFF due to encoding.
-                if ((uint32_t)(u8str+u8len-strings) < mStringPoolSize) {
+                if ((uint32_t)(u8str+*u8len-strings) < mStringPoolSize) {
                     AutoMutex lock(mDecodeLock);
 
                     if (mCache != NULL && mCache[idx] != NULL) {
-                        return mCache[idx];
+                        return StringPiece16(mCache[idx], *u16len);
                     }
 
                     // Retrieve the actual length of the utf8 string if the
                     // encoded length was truncated
-                    if (stringDecodeAt(idx, u8str, u8len, &u8len) == NULL) {
-                        return NULL;
+                    auto decodedString = stringDecodeAt(idx, u8str, *u8len);
+                    if (!decodedString.has_value()) {
+                        return base::unexpected(decodedString.error());
                     }
 
                     // Since AAPT truncated lengths longer than 0x7FFF, check
                     // that the bits that remain after truncation at least match
                     // the bits of the actual length
-                    ssize_t actualLen = utf8_to_utf16_length(u8str, u8len);
-                    if (actualLen < 0 || ((size_t)actualLen & 0x7FFF) != *u16len) {
+                    ssize_t actualLen = utf8_to_utf16_length(
+                        reinterpret_cast<const uint8_t*>(decodedString->data()),
+                        decodedString->size());
+
+                    if (actualLen < 0 || ((size_t)actualLen & 0x7FFFU) != *u16len) {
                         ALOGW("Bad string block: string #%lld decoded length is not correct "
                                 "%lld vs %llu\n",
                                 (long long)idx, (long long)actualLen, (long long)*u16len);
-                        return NULL;
+                        return base::unexpected(std::nullopt);
                     }
 
-                    *u16len = (size_t) actualLen;
-                    char16_t *u16str = (char16_t *)calloc(*u16len+1, sizeof(char16_t));
+                    u16len = (size_t) actualLen;
+                    auto u16str = (char16_t *)calloc(*u16len+1, sizeof(char16_t));
                     if (!u16str) {
                         ALOGW("No memory when trying to allocate decode cache for string #%d\n",
                                 (int)idx);
-                        return NULL;
+                        return base::unexpected(std::nullopt);
                     }
 
-                    utf8_to_utf16(u8str, u8len, u16str, *u16len + 1);
+                    utf8_to_utf16(reinterpret_cast<const uint8_t*>(decodedString->data()),
+                                  decodedString->size(), u16str, *u16len + 1);
 
                     if (mCache == NULL) {
 #ifndef __ANDROID__
@@ -793,19 +852,19 @@
                         if (mCache == NULL) {
                             ALOGW("No memory trying to allocate decode cache table of %d bytes\n",
                                   (int)(mHeader->stringCount*sizeof(char16_t**)));
-                            return NULL;
+                            return base::unexpected(std::nullopt);
                         }
                     }
 
                     if (kDebugStringPoolNoisy) {
-                      ALOGI("Caching UTF8 string: %s", u8str);
+                      ALOGI("Caching UTF8 string: %s", u8str.unsafe_ptr());
                     }
 
                     mCache[idx] = u16str;
-                    return u16str;
+                    return StringPiece16(u16str, *u16len);
                 } else {
                     ALOGW("Bad string block: string #%lld extends to %lld, past end at %lld\n",
-                            (long long)idx, (long long)(u8str+u8len-strings),
+                            (long long)idx, (long long)(u8str+*u8len-strings),
                             (long long)mStringPoolSize);
                 }
             }
@@ -815,33 +874,43 @@
                     (int)(mStringPoolSize*sizeof(uint16_t)));
         }
     }
-    return NULL;
+    return base::unexpected(std::nullopt);
 }
 
-const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
+base::expected<StringPiece, NullOrIOError> ResStringPool::string8At(size_t idx) const
 {
     if (mError == NO_ERROR && idx < mHeader->stringCount) {
         if ((mHeader->flags&ResStringPool_header::UTF8_FLAG) == 0) {
-            return NULL;
+            return base::unexpected(std::nullopt);
         }
-        const uint32_t off = mEntries[idx]/sizeof(char);
+
+        auto offPtr = mEntries + idx;
+        if (UNLIKELY(!offPtr)) {
+           return base::unexpected(IOError::PAGES_MISSING);
+        }
+
+        const uint32_t off = (offPtr.value())/sizeof(char);
         if (off < (mStringPoolSize-1)) {
-            const uint8_t* strings = (uint8_t*)mStrings;
-            const uint8_t* str = strings+off;
+            auto strings = mStrings.convert<uint8_t>();
+            auto str = strings+off;
 
             // Decode the UTF-16 length. This is not used if we're not
             // converting to UTF-16 from UTF-8.
-            decodeLength(&str);
+            const base::expected<size_t, IOError> u16len = decodeLength(&str);
+            if (UNLIKELY(!u16len.has_value())) {
+                return base::unexpected(u16len.error());
+            }
 
-            const size_t encLen = decodeLength(&str);
-            *outLen = encLen;
+            const base::expected<size_t, IOError> u8len = decodeLength(&str);
+            if (UNLIKELY(!u8len.has_value())) {
+                return base::unexpected(u8len.error());
+            }
 
-            if ((uint32_t)(str+encLen-strings) < mStringPoolSize) {
-                return stringDecodeAt(idx, str, encLen, outLen);
-
+            if ((uint32_t)(str+*u8len-strings) < mStringPoolSize) {
+                return stringDecodeAt(idx, str, *u8len);
             } else {
                 ALOGW("Bad string block: string #%d extends to %d, past end at %d\n",
-                        (int)idx, (int)(str+encLen-strings), (int)mStringPoolSize);
+                        (int)idx, (int)(str+*u8len-strings), (int)mStringPoolSize);
             }
         } else {
             ALOGW("Bad string block: string #%d entry is at %d, past end at %d\n",
@@ -849,7 +918,7 @@
                     (int)(mStringPoolSize*sizeof(uint16_t)));
         }
     }
-    return NULL;
+    return base::unexpected(std::nullopt);
 }
 
 /**
@@ -859,74 +928,93 @@
  * bits. Strings that exceed the maximum encode length are not placed into
  * StringPools in AAPT2.
  **/
-const char* ResStringPool::stringDecodeAt(size_t idx, const uint8_t* str,
-                                          const size_t encLen, size_t* outLen) const {
-    const uint8_t* strings = (uint8_t*)mStrings;
-
+base::expected<StringPiece, NullOrIOError> ResStringPool::stringDecodeAt(
+      size_t idx, incfs::map_ptr<uint8_t> str, size_t encLen) const
+{
+    const auto strings = mStrings.convert<uint8_t>();
     size_t i = 0, end = encLen;
     while ((uint32_t)(str+end-strings) < mStringPoolSize) {
-        if (str[end] == 0x00) {
+        const auto nullAddress = str + end;
+        if (UNLIKELY(!nullAddress)) {
+            return base::unexpected(IOError::PAGES_MISSING);
+        }
+
+        if (nullAddress.value() == 0x00) {
             if (i != 0) {
                 ALOGW("Bad string block: string #%d is truncated (actual length is %d)",
                       (int)idx, (int)end);
             }
 
-            *outLen = end;
-            return (const char*)str;
+            if (UNLIKELY(!str.verify(end + 1U))) {
+              return base::unexpected(IOError::PAGES_MISSING);
+            }
+
+            return StringPiece((const char*) str.unsafe_ptr(), end);
         }
 
         end = (++i << (sizeof(uint8_t) * 8 * 2 - 1)) | encLen;
     }
 
     // Reject malformed (non null-terminated) strings
-    ALOGW("Bad string block: string #%d is not null-terminated",
-          (int)idx);
-    return NULL;
+    ALOGW("Bad string block: string #%d is not null-terminated", (int)idx);
+    return base::unexpected(std::nullopt);
 }
 
-const String8 ResStringPool::string8ObjectAt(size_t idx) const
+base::expected<String8, IOError> ResStringPool::string8ObjectAt(size_t idx) const
 {
-    size_t len;
-    const char *str = string8At(idx, &len);
-    if (str != NULL) {
-        return String8(str, len);
+    const base::expected<StringPiece, NullOrIOError> str = string8At(idx);
+    if (UNLIKELY(IsIOError(str))) {
+        return base::unexpected(GetIOError(str.error()));
+    }
+    if (str.has_value()) {
+        return String8(str->data(), str->size());
     }
 
-    const char16_t *str16 = stringAt(idx, &len);
-    if (str16 != NULL) {
-        return String8(str16, len);
+    const base::expected<StringPiece16, NullOrIOError> str16 = stringAt(idx);
+    if (UNLIKELY(IsIOError(str16))) {
+        return base::unexpected(GetIOError(str16.error()));
     }
+    if (str16.has_value()) {
+        return String8(str16->data(), str16->size());
+    }
+
     return String8();
 }
 
-const ResStringPool_span* ResStringPool::styleAt(const ResStringPool_ref& ref) const
+base::expected<incfs::map_ptr<ResStringPool_span>, NullOrIOError> ResStringPool::styleAt(
+    const ResStringPool_ref& ref) const
 {
     return styleAt(ref.index);
 }
 
-const ResStringPool_span* ResStringPool::styleAt(size_t idx) const
+base::expected<incfs::map_ptr<ResStringPool_span>, NullOrIOError> ResStringPool::styleAt(
+    size_t idx) const
 {
     if (mError == NO_ERROR && idx < mHeader->styleCount) {
-        const uint32_t off = (mEntryStyles[idx]/sizeof(uint32_t));
+        auto offPtr = mEntryStyles + idx;
+        if (UNLIKELY(!offPtr)) {
+           return base::unexpected(IOError::PAGES_MISSING);
+        }
+
+        const uint32_t off = ((offPtr.value())/sizeof(uint32_t));
         if (off < mStylePoolSize) {
-            return (const ResStringPool_span*)(mStyles+off);
+            return (mStyles+off).convert<ResStringPool_span>();
         } else {
             ALOGW("Bad string block: style #%d entry is at %d, past end at %d\n",
                     (int)idx, (int)(off*sizeof(uint32_t)),
                     (int)(mStylePoolSize*sizeof(uint32_t)));
         }
     }
-    return NULL;
+    return base::unexpected(std::nullopt);
 }
 
-ssize_t ResStringPool::indexOfString(const char16_t* str, size_t strLen) const
+base::expected<size_t, NullOrIOError> ResStringPool::indexOfString(const char16_t* str,
+                                                                   size_t strLen) const
 {
     if (mError != NO_ERROR) {
-        return mError;
+        return base::unexpected(std::nullopt);
     }
 
-    size_t len;
-
     if ((mHeader->flags&ResStringPool_header::UTF8_FLAG) != 0) {
         if (kDebugStringPoolNoisy) {
             ALOGI("indexOfString UTF-8: %s", String8(str, strLen).string());
@@ -948,17 +1036,19 @@
             ssize_t mid;
             while (l <= h) {
                 mid = l + (h - l)/2;
-                const uint8_t* s = (const uint8_t*)string8At(mid, &len);
-                int c;
-                if (s != NULL) {
-                    char16_t* end = utf8_to_utf16(s, len, convBuffer, convBufferLen);
+                int c = -1;
+                const base::expected<StringPiece, NullOrIOError> s = string8At(mid);
+                if (UNLIKELY(IsIOError(s))) {
+                    return base::unexpected(s.error());
+                }
+                if (s.has_value()) {
+                    char16_t* end = utf8_to_utf16(reinterpret_cast<const uint8_t*>(s->data()),
+                                                  s->size(), convBuffer, convBufferLen);
                     c = strzcmp16(convBuffer, end-convBuffer, str, strLen);
-                } else {
-                    c = -1;
                 }
                 if (kDebugStringPoolNoisy) {
                     ALOGI("Looking at %s, cmp=%d, l/mid/h=%d/%d/%d\n",
-                            (const char*)s, c, (int)l, (int)mid, (int)h);
+                          s->data(), c, (int)l, (int)mid, (int)h);
                 }
                 if (c == 0) {
                     if (kDebugStringPoolNoisy) {
@@ -981,15 +1071,21 @@
             String8 str8(str, strLen);
             const size_t str8Len = str8.size();
             for (int i=mHeader->stringCount-1; i>=0; i--) {
-                const char* s = string8At(i, &len);
-                if (kDebugStringPoolNoisy) {
-                    ALOGI("Looking at %s, i=%d\n", String8(s).string(), i);
+                const base::expected<StringPiece, NullOrIOError> s = string8At(i);
+                if (UNLIKELY(IsIOError(s))) {
+                    return base::unexpected(s.error());
                 }
-                if (s && str8Len == len && memcmp(s, str8.string(), str8Len) == 0) {
+                if (s.has_value()) {
                     if (kDebugStringPoolNoisy) {
-                        ALOGI("MATCH!");
+                        ALOGI("Looking at %s, i=%d\n", s->data(), i);
                     }
-                    return i;
+                    if (str8Len == s->size()
+                            && memcmp(s->data(), str8.string(), str8Len) == 0) {
+                        if (kDebugStringPoolNoisy) {
+                            ALOGI("MATCH!");
+                        }
+                        return i;
+                    }
                 }
             }
         }
@@ -1007,11 +1103,14 @@
             ssize_t mid;
             while (l <= h) {
                 mid = l + (h - l)/2;
-                const char16_t* s = stringAt(mid, &len);
-                int c = s ? strzcmp16(s, len, str, strLen) : -1;
+                const base::expected<StringPiece16, NullOrIOError> s = stringAt(mid);
+                if (UNLIKELY(IsIOError(s))) {
+                    return base::unexpected(s.error());
+                }
+                int c = s.has_value() ? strzcmp16(s->data(), s->size(), str, strLen) : -1;
                 if (kDebugStringPoolNoisy) {
                     ALOGI("Looking at %s, cmp=%d, l/mid/h=%d/%d/%d\n",
-                            String8(s).string(), c, (int)l, (int)mid, (int)h);
+                          String8(s->data(), s->size()).string(), c, (int)l, (int)mid, (int)h);
                 }
                 if (c == 0) {
                     if (kDebugStringPoolNoisy) {
@@ -1030,11 +1129,15 @@
             // span tags; since those always appear at the end of the string
             // block, start searching at the back.
             for (int i=mHeader->stringCount-1; i>=0; i--) {
-                const char16_t* s = stringAt(i, &len);
-                if (kDebugStringPoolNoisy) {
-                    ALOGI("Looking at %s, i=%d\n", String8(s).string(), i);
+                const base::expected<StringPiece16, NullOrIOError> s = stringAt(i);
+                if (UNLIKELY(IsIOError(s))) {
+                    return base::unexpected(s.error());
                 }
-                if (s && strLen == len && strzcmp16(s, len, str, strLen) == 0) {
+                if (kDebugStringPoolNoisy) {
+                    ALOGI("Looking at %s, i=%d\n", String8(s->data(), s->size()).string(), i);
+                }
+                if (s.has_value() && strLen == s->size() &&
+                        strzcmp16(s->data(), s->size(), str, strLen) == 0) {
                     if (kDebugStringPoolNoisy) {
                         ALOGI("MATCH!");
                     }
@@ -1043,8 +1146,7 @@
             }
         }
     }
-
-    return NAME_NOT_FOUND;
+    return base::unexpected(std::nullopt);
 }
 
 size_t ResStringPool::size() const
@@ -1062,9 +1164,10 @@
     return (mError == NO_ERROR) ? mHeader->header.size : 0;
 }
 
-const void* ResStringPool::data() const
+incfs::map_ptr<void> ResStringPool::data() const
 {
-    return mHeader;
+
+    return mHeader.unsafe_ptr();
 }
 
 bool ResStringPool::isSorted() const
@@ -1121,7 +1224,7 @@
 const char16_t* ResXMLParser::getComment(size_t* outLen) const
 {
     int32_t id = getCommentID();
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 uint32_t ResXMLParser::getLineNumber() const
@@ -1140,7 +1243,7 @@
 const char16_t* ResXMLParser::getText(size_t* outLen) const
 {
     int32_t id = getTextID();
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 ssize_t ResXMLParser::getTextValue(Res_value* outValue) const
@@ -1164,7 +1267,7 @@
 {
     int32_t id = getNamespacePrefixID();
     //printf("prefix=%d  event=%p\n", id, mEventCode);
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 int32_t ResXMLParser::getNamespaceUriID() const
@@ -1179,7 +1282,7 @@
 {
     int32_t id = getNamespaceUriID();
     //printf("uri=%d  event=%p\n", id, mEventCode);
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 int32_t ResXMLParser::getElementNamespaceID() const
@@ -1196,7 +1299,7 @@
 const char16_t* ResXMLParser::getElementNamespace(size_t* outLen) const
 {
     int32_t id = getElementNamespaceID();
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 int32_t ResXMLParser::getElementNameID() const
@@ -1213,7 +1316,7 @@
 const char16_t* ResXMLParser::getElementName(size_t* outLen) const
 {
     int32_t id = getElementNameID();
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 size_t ResXMLParser::getAttributeCount() const
@@ -1246,7 +1349,7 @@
     if (kDebugXMLNoisy) {
         printf("getAttributeNamespace 0x%zx=0x%x\n", idx, id);
     }
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 const char* ResXMLParser::getAttributeNamespace8(size_t idx, size_t* outLen) const
@@ -1256,7 +1359,7 @@
     if (kDebugXMLNoisy) {
         printf("getAttributeNamespace 0x%zx=0x%x\n", idx, id);
     }
-    return id >= 0 ? mTree.mStrings.string8At(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.string8At(id), outLen) : NULL;
 }
 
 int32_t ResXMLParser::getAttributeNameID(size_t idx) const
@@ -1281,7 +1384,7 @@
     if (kDebugXMLNoisy) {
         printf("getAttributeName 0x%zx=0x%x\n", idx, id);
     }
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 const char* ResXMLParser::getAttributeName8(size_t idx, size_t* outLen) const
@@ -1291,7 +1394,7 @@
     if (kDebugXMLNoisy) {
         printf("getAttributeName 0x%zx=0x%x\n", idx, id);
     }
-    return id >= 0 ? mTree.mStrings.string8At(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.string8At(id), outLen) : NULL;
 }
 
 uint32_t ResXMLParser::getAttributeNameResID(size_t idx) const
@@ -1328,7 +1431,7 @@
     if (kDebugXMLNoisy) {
         printf("getAttributeValue 0x%zx=0x%x\n", idx, id);
     }
-    return id >= 0 ? mTree.mStrings.stringAt(id, outLen) : NULL;
+    return id >= 0 ? UnpackOptionalString(mTree.mStrings.stringAt(id), outLen) : NULL;
 }
 
 int32_t ResXMLParser::getAttributeDataType(size_t idx) const
@@ -3596,9 +3699,10 @@
     ssize_t findType16(const char16_t* type, size_t len) const {
         const size_t N = packages.size();
         for (size_t i = 0; i < N; i++) {
-            ssize_t index = packages[i]->typeStrings.indexOfString(type, len);
-            if (index >= 0) {
-                return index + packages[i]->typeIdOffset;
+            const base::expected<size_t, NullOrIOError> index =
+                packages[i]->typeStrings.indexOfString(type, len);
+            if (index.has_value()) {
+                return *index + packages[i]->typeIdOffset;
             }
         }
         return -1;
@@ -4304,21 +4408,21 @@
     outName->package = grp->name.string();
     outName->packageLen = grp->name.size();
     if (allowUtf8) {
-        outName->type8 = entry.typeStr.string8(&outName->typeLen);
-        outName->name8 = entry.keyStr.string8(&outName->nameLen);
+        outName->type8 = UnpackOptionalString(entry.typeStr.string8(), &outName->typeLen);
+        outName->name8 = UnpackOptionalString(entry.keyStr.string8(), &outName->nameLen);
     } else {
         outName->type8 = NULL;
         outName->name8 = NULL;
     }
     if (outName->type8 == NULL) {
-        outName->type = entry.typeStr.string16(&outName->typeLen);
+        outName->type = UnpackOptionalString(entry.typeStr.string16(), &outName->typeLen);
         // If we have a bad index for some reason, we should abort.
         if (outName->type == NULL) {
             return false;
         }
     }
     if (outName->name8 == NULL) {
-        outName->name = entry.keyStr.string16(&outName->nameLen);
+        outName->name = UnpackOptionalString(entry.keyStr.string16(), &outName->nameLen);
         // If we have a bad index for some reason, we should abort.
         if (outName->name == NULL) {
             return false;
@@ -4406,7 +4510,8 @@
                 entry.package->header->index,
                 outValue->dataType,
                 outValue->dataType == Res_value::TYPE_STRING ?
-                    String8(entry.package->header->values.stringAt(outValue->data, &len)).string() :
+                    String8(UnpackOptionalString(
+                        entry.package->header->values.stringAt(outValue->data), &len)).string() :
                     "",
                 outValue->data);
     }
@@ -4462,7 +4567,8 @@
         return NULL;
     }
     if (value->dataType == value->TYPE_STRING) {
-        return getTableStringBlock(stringBlock)->stringAt(value->data, outLen);
+        return UnpackOptionalString(getTableStringBlock(stringBlock)->stringAt(value->data),
+                                    outLen);
     }
     // XXX do int to string conversions.
     return NULL;
@@ -4978,15 +5084,13 @@
             size_t targetTypeLen = typeLen;
 
             do {
-                ssize_t ti = group->packages[pi]->typeStrings.indexOfString(
-                        targetType, targetTypeLen);
-                if (ti < 0) {
+                auto ti = group->packages[pi]->typeStrings.indexOfString(targetType, targetTypeLen);
+                if (!ti.has_value()) {
                     continue;
                 }
 
-                ti += group->packages[pi]->typeIdOffset;
-
-                const uint32_t identifier = findEntry(group, ti, name, nameLen,
+                *ti += group->packages[pi]->typeIdOffset;
+                const uint32_t identifier = findEntry(group, *ti, name, nameLen,
                         outTypeSpecFlags);
                 if (identifier != 0) {
                     if (fakePublic && outTypeSpecFlags) {
@@ -5009,8 +5113,9 @@
     const size_t typeCount = typeList.size();
     for (size_t i = 0; i < typeCount; i++) {
         const Type* t = typeList[i];
-        const ssize_t ei = t->package->keyStrings.indexOfString(name, nameLen);
-        if (ei < 0) {
+        const base::expected<size_t, NullOrIOError> ei =
+            t->package->keyStrings.indexOfString(name, nameLen);
+        if (!ei.has_value()) {
             continue;
         }
 
@@ -5025,7 +5130,7 @@
                     continue;
                 }
 
-                if (dtohl(entry->key.index) == (size_t) ei) {
+                if (dtohl(entry->key.index) == (size_t) *ei) {
                     uint32_t resId = Res_MAKEID(group->id - 1, typeIndex, iter.index());
                     if (outTypeSpecFlags) {
                         Entry result;
@@ -6187,8 +6292,9 @@
             for (size_t k = 0; k < numTypes; k++) {
                 const Type* type = typeList[k];
                 const ResStringPool& typeStrings = type->package->typeStrings;
-                if (ignoreMipmap && typeStrings.string8ObjectAt(
-                            type->typeSpec->id - 1) == "mipmap") {
+                const base::expected<String8, NullOrIOError> typeStr = typeStrings.string8ObjectAt(
+                    type->typeSpec->id - 1);
+                if (ignoreMipmap && typeStr.has_value() && *typeStr == "mipmap") {
                     continue;
                 }
 
@@ -6244,24 +6350,18 @@
 StringPoolRef::StringPoolRef(const ResStringPool* pool, uint32_t index)
     : mPool(pool), mIndex(index) {}
 
-const char* StringPoolRef::string8(size_t* outLen) const {
-    if (mPool != NULL) {
-        return mPool->string8At(mIndex, outLen);
+base::expected<StringPiece, NullOrIOError> StringPoolRef::string8() const {
+    if (LIKELY(mPool != NULL)) {
+        return mPool->string8At(mIndex);
     }
-    if (outLen != NULL) {
-        *outLen = 0;
-    }
-    return NULL;
+    return base::unexpected(std::nullopt);
 }
 
-const char16_t* StringPoolRef::string16(size_t* outLen) const {
-    if (mPool != NULL) {
-        return mPool->stringAt(mIndex, outLen);
+base::expected<StringPiece16, NullOrIOError> StringPoolRef::string16() const {
+    if (LIKELY(mPool != NULL)) {
+        return mPool->stringAt(mIndex);
     }
-    if (outLen != NULL) {
-        *outLen = 0;
-    }
-    return NULL;
+    return base::unexpected(std::nullopt);
 }
 
 bool ResTable::getResourceFlags(uint32_t resID, uint32_t* outFlags) const {
@@ -7380,13 +7480,13 @@
         printf("(dynamic attribute) 0x%08x\n", value.data);
     } else if (value.dataType == Res_value::TYPE_STRING) {
         size_t len;
-        const char* str8 = pkg->header->values.string8At(
-                value.data, &len);
+        const char* str8 = UnpackOptionalString(pkg->header->values.string8At(
+                value.data), &len);
         if (str8 != NULL) {
             printf("(string8) \"%s\"\n", normalizeForOutput(str8).string());
         } else {
-            const char16_t* str16 = pkg->header->values.stringAt(
-                    value.data, &len);
+            const char16_t* str16 = UnpackOptionalString(pkg->header->values.stringAt(
+                    value.data), &len);
             if (str16 != NULL) {
                 printf("(string16) \"%s\"\n",
                     normalizeForOutput(String8(str16, len).string()).string());
diff --git a/libs/androidfw/ResourceUtils.cpp b/libs/androidfw/ResourceUtils.cpp
index c63dff8..87fb2c0 100644
--- a/libs/androidfw/ResourceUtils.cpp
+++ b/libs/androidfw/ResourceUtils.cpp
@@ -48,61 +48,80 @@
          !(has_type_separator && out_type->empty());
 }
 
-bool ToResourceName(const StringPoolRef& type_string_ref,
-                    const StringPoolRef& entry_string_ref,
-                    const StringPiece& package_name,
-                    AssetManager2::ResourceName* out_name) {
-  out_name->package = package_name.data();
-  out_name->package_len = package_name.size();
+base::expected<AssetManager2::ResourceName, NullOrIOError> ToResourceName(
+    const StringPoolRef& type_string_ref, const StringPoolRef& entry_string_ref,
+    const StringPiece& package_name) {
+  AssetManager2::ResourceName name{
+    .package = package_name.data(),
+    .package_len = package_name.size(),
+  };
 
-  out_name->type = type_string_ref.string8(&out_name->type_len);
-  out_name->type16 = nullptr;
-  if (out_name->type == nullptr) {
-    out_name->type16 = type_string_ref.string16(&out_name->type_len);
-    if (out_name->type16 == nullptr) {
-      return false;
+  if (base::expected<StringPiece, NullOrIOError> type_str = type_string_ref.string8();
+      type_str.ok()) {
+    name.type = type_str->data();
+    name.type_len = type_str->size();
+  } else if (UNLIKELY(IsIOError(type_str))) {
+    return base::unexpected(type_str.error());
+  }
+
+  if (name.type == nullptr) {
+    if (base::expected<StringPiece16, NullOrIOError> type16_str = type_string_ref.string16();
+        type16_str.ok()) {
+      name.type16 = type16_str->data();
+      name.type_len = type16_str->size();
+    } else if (!type16_str.has_value()) {
+      return base::unexpected(type16_str.error());
     }
   }
 
-  out_name->entry = entry_string_ref.string8(&out_name->entry_len);
-  out_name->entry16 = nullptr;
-  if (out_name->entry == nullptr) {
-    out_name->entry16 = entry_string_ref.string16(&out_name->entry_len);
-    if (out_name->entry16 == nullptr) {
-      return false;
+  if (base::expected<StringPiece, NullOrIOError> entry_str = entry_string_ref.string8();
+      entry_str.ok()) {
+    name.entry = entry_str->data();
+    name.entry_len = entry_str->size();
+  } else if (UNLIKELY(IsIOError(entry_str))) {
+    return base::unexpected(entry_str.error());
+  }
+
+  if (name.entry == nullptr) {
+    if (base::expected<StringPiece16, NullOrIOError> entry16_str = entry_string_ref.string16();
+        entry16_str.ok()) {
+      name.entry16 = entry16_str->data();
+      name.entry_len = entry16_str->size();
+    } else if (!entry16_str.has_value()) {
+      return base::unexpected(entry16_str.error());
     }
   }
 
-  return true;
+  return name;
 }
 
-std::string ToFormattedResourceString(AssetManager2::ResourceName* resource_name) {
+std::string ToFormattedResourceString(const AssetManager2::ResourceName& resource_name) {
   std::string result;
-  if (resource_name->package != nullptr) {
-    result.append(resource_name->package, resource_name->package_len);
+  if (resource_name.package != nullptr) {
+    result.append(resource_name.package, resource_name.package_len);
   }
 
-  if (resource_name->type != nullptr || resource_name->type16 != nullptr) {
+  if (resource_name.type != nullptr || resource_name.type16 != nullptr) {
     if (!result.empty()) {
       result += ":";
     }
 
-    if (resource_name->type != nullptr) {
-      result.append(resource_name->type, resource_name->type_len);
+    if (resource_name.type != nullptr) {
+      result.append(resource_name.type, resource_name.type_len);
     } else {
-      result += util::Utf16ToUtf8(StringPiece16(resource_name->type16, resource_name->type_len));
+      result += util::Utf16ToUtf8(StringPiece16(resource_name.type16, resource_name.type_len));
     }
   }
 
-  if (resource_name->entry != nullptr || resource_name->entry16 != nullptr) {
+  if (resource_name.entry != nullptr || resource_name.entry16 != nullptr) {
     if (!result.empty()) {
       result += "/";
     }
 
-    if (resource_name->entry != nullptr) {
-      result.append(resource_name->entry, resource_name->entry_len);
+    if (resource_name.entry != nullptr) {
+      result.append(resource_name.entry, resource_name.entry_len);
     } else {
-      result += util::Utf16ToUtf8(StringPiece16(resource_name->entry16, resource_name->entry_len));
+      result += util::Utf16ToUtf8(StringPiece16(resource_name.entry16, resource_name.entry_len));
     }
   }
 
diff --git a/libs/androidfw/StreamingZipInflater.cpp b/libs/androidfw/StreamingZipInflater.cpp
index b39b5f0..1c5e5d4 100644
--- a/libs/androidfw/StreamingZipInflater.cpp
+++ b/libs/androidfw/StreamingZipInflater.cpp
@@ -70,13 +70,13 @@
 /*
  * Streaming access to compressed data held in an mmapped region of memory
  */
-StreamingZipInflater::StreamingZipInflater(FileMap* dataMap, size_t uncompSize) {
+StreamingZipInflater::StreamingZipInflater(const incfs::IncFsFileMap* dataMap, size_t uncompSize) {
     mFd = -1;
     mDataMap = dataMap;
     mOutTotalSize = uncompSize;
-    mInTotalSize = dataMap->getDataLength();
+    mInTotalSize = dataMap->length();
 
-    mInBuf = (uint8_t*) dataMap->getDataPtr();
+    mInBuf = (uint8_t*) dataMap->unsafe_data(); // IncFs safety handled in zlib.
     mInBufSize = mInTotalSize;
 
     mOutBufSize = StreamingZipInflater::OUTPUT_CHUNK_SIZE;
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index e77ac3d..52e7a70 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -233,6 +233,29 @@
 }
 
 /*
+ * Create a new incfs::IncFsFileMap object that spans the data in "entry".
+ */
+std::optional<incfs::IncFsFileMap> ZipFileRO::createEntryIncFsFileMap(ZipEntryRO entry) const
+{
+    const _ZipEntryRO *zipEntry = reinterpret_cast<_ZipEntryRO*>(entry);
+    const ZipEntry& ze = zipEntry->entry;
+    int fd = GetFileDescriptor(mHandle);
+    size_t actualLen = 0;
+
+    if (ze.method == kCompressStored) {
+        actualLen = ze.uncompressed_length;
+    } else {
+        actualLen = ze.compressed_length;
+    }
+
+    incfs::IncFsFileMap newMap;
+    if (!newMap.Create(fd, ze.offset, actualLen, mFileName)) {
+        return std::nullopt;
+    }
+    return std::move(newMap);
+}
+
+/*
  * Uncompress an entry, in its entirety, into the provided output buffer.
  *
  * This doesn't verify the data's CRC, which might be useful for
diff --git a/libs/androidfw/ZipUtils.cpp b/libs/androidfw/ZipUtils.cpp
index 568e3b6..58fc5bb 100644
--- a/libs/androidfw/ZipUtils.cpp
+++ b/libs/androidfw/ZipUtils.cpp
@@ -40,7 +40,7 @@
     explicit FileReader(FILE* fp) : Reader(), mFp(fp), mCurrentOffset(0) {
     }
 
-    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const {
+    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override {
         // Data is usually requested sequentially, so this helps avoid pointless
         // fseeks every time we perform a read. There's an impedence mismatch
         // here because the original API was designed around pread and pwrite.
@@ -71,7 +71,7 @@
     explicit FdReader(int fd) : mFd(fd) {
     }
 
-    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const {
+    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override {
       return android::base::ReadFullyAtOffset(mFd, buf, len, offset);
     }
 
@@ -81,22 +81,27 @@
 
 class BufferReader : public zip_archive::Reader {
   public:
-    BufferReader(const void* input, size_t inputSize) : Reader(),
-        mInput(reinterpret_cast<const uint8_t*>(input)),
+    BufferReader(incfs::map_ptr<void> input, size_t inputSize) : Reader(),
+        mInput(input.convert<uint8_t>()),
         mInputSize(inputSize) {
     }
 
-    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const {
+    bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const override {
         if (mInputSize < len || offset > mInputSize - len) {
             return false;
         }
 
-        memcpy(buf, mInput + offset, len);
+        const incfs::map_ptr<uint8_t> pos = mInput.offset(offset);
+        if (!pos.verify(len)) {
+          return false;
+        }
+
+        memcpy(buf, pos.unsafe_ptr(), len);
         return true;
     }
 
   private:
-    const uint8_t* mInput;
+    const incfs::map_ptr<uint8_t> mInput;
     const size_t mInputSize;
 };
 
@@ -138,7 +143,7 @@
     return (zip_archive::Inflate(reader, compressedLen, uncompressedLen, &writer, nullptr) == 0);
 }
 
-/*static*/ bool ZipUtils::inflateToBuffer(const void* in, void* buf,
+/*static*/ bool ZipUtils::inflateToBuffer(incfs::map_ptr<void> in, void* buf,
     long uncompressedLen, long compressedLen)
 {
     BufferReader reader(in, compressedLen);
diff --git a/libs/androidfw/fuzz/resourcefile_fuzzer/resourcefile_fuzzer.cpp b/libs/androidfw/fuzz/resourcefile_fuzzer/resourcefile_fuzzer.cpp
index 96d44ab..5309ab2 100644
--- a/libs/androidfw/fuzz/resourcefile_fuzzer/resourcefile_fuzzer.cpp
+++ b/libs/androidfw/fuzz/resourcefile_fuzzer/resourcefile_fuzzer.cpp
@@ -31,9 +31,6 @@
 using android::StringPiece;
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
-
-  std::unique_ptr<const LoadedArsc> loaded_arsc =
-      LoadedArsc::Load(StringPiece(reinterpret_cast<const char*>(data), size));
-
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(data, size);
   return 0;
 }
\ No newline at end of file
diff --git a/libs/androidfw/include/androidfw/Asset.h b/libs/androidfw/include/androidfw/Asset.h
index 298509e..80bae20 100644
--- a/libs/androidfw/include/androidfw/Asset.h
+++ b/libs/androidfw/include/androidfw/Asset.h
@@ -23,18 +23,18 @@
 
 #include <stdio.h>
 #include <sys/types.h>
-
 #include <memory>
+#include <optional>
 
 #include <android-base/unique_fd.h>
+#include <util/map_ptr.h>
+
 #include <utils/Compat.h>
 #include <utils/Errors.h>
 #include <utils/String8.h>
 
 namespace android {
 
-class FileMap;
-
 /*
  * Instances of this class provide read-only operations on a byte stream.
  *
@@ -49,6 +49,8 @@
 class Asset {
 public:
     virtual ~Asset(void) = default;
+    Asset(const Asset& src) = delete;
+    Asset& operator=(const Asset& src) = delete;
 
     static int32_t getGlobalCount();
     static String8 getAssetAllocations();
@@ -87,8 +89,19 @@
 
     /*
      * Get a pointer to a buffer with the entire contents of the file.
+     * If `aligned` is true, the buffer data will be aligned to a 4-byte boundary.
+     *
+     * Use this function if the asset can never reside on IncFs.
      */
-    virtual const void* getBuffer(bool wordAligned) = 0;
+    virtual const void* getBuffer(bool aligned) = 0;
+
+    /*
+     * Get a incfs::map_ptr<void> to a buffer with the entire contents of the file.
+     * If `aligned` is true, the buffer data will be aligned to a 4-byte boundary.
+     *
+     * Use this function if the asset can potentially reside on IncFs.
+     */
+    virtual incfs::map_ptr<void> getIncFsBuffer(bool aligned) = 0;
 
     /*
      * Get the total amount of data that can be read.
@@ -152,10 +165,6 @@
     AccessMode getAccessMode(void) const { return mAccessMode; }
 
 private:
-    /* these operations are not implemented */
-    Asset(const Asset& src);
-    Asset& operator=(const Asset& src);
-
     /* AssetManager needs access to our "create" functions */
     friend class AssetManager;
     friend class ApkAssets;
@@ -169,8 +178,7 @@
     /*
      * Create the asset from a named, compressed file on disk (e.g. ".gz").
      */
-    static Asset* createFromCompressedFile(const char* fileName,
-        AccessMode mode);
+    static Asset* createFromCompressedFile(const char* fileName, AccessMode mode);
 
 #if 0
     /*
@@ -200,31 +208,21 @@
     /*
      * Create the asset from a memory-mapped file segment.
      *
-     * The asset takes ownership of the FileMap.
+     * The asset takes ownership of the incfs::IncFsFileMap and the file descriptor "fd". The
+     * file descriptor is used to request new file descriptors using "openFileDescriptor".
      */
-    static Asset* createFromUncompressedMap(FileMap* dataMap, AccessMode mode);
-
-    /*
-     * Create the asset from a memory-mapped file segment.
-     *
-     * The asset takes ownership of the FileMap and the file descriptor "fd". The file descriptor is
-     * used to request new file descriptors using "openFileDescriptor".
-     */
-    static std::unique_ptr<Asset> createFromUncompressedMap(std::unique_ptr<FileMap> dataMap,
-        base::unique_fd fd, AccessMode mode);
+    static std::unique_ptr<Asset> createFromUncompressedMap(incfs::IncFsFileMap&& dataMap,
+                                                            AccessMode mode,
+                                                            base::unique_fd fd = {});
 
     /*
      * Create the asset from a memory-mapped file segment with compressed
      * data.
      *
-     * The asset takes ownership of the FileMap.
+     * The asset takes ownership of the incfs::IncFsFileMap.
      */
-    static Asset* createFromCompressedMap(FileMap* dataMap,
-        size_t uncompressedLen, AccessMode mode);
-
-    static std::unique_ptr<Asset> createFromCompressedMap(std::unique_ptr<FileMap> dataMap,
-        size_t uncompressedLen, AccessMode mode);
-
+    static std::unique_ptr<Asset> createFromCompressedMap(incfs::IncFsFileMap&& dataMap,
+                                                          size_t uncompressedLen, AccessMode mode);
 
     /*
      * Create from a reference-counted chunk of shared memory.
@@ -252,7 +250,7 @@
 class _FileAsset : public Asset {
 public:
     _FileAsset(void);
-    virtual ~_FileAsset(void);
+    ~_FileAsset(void) override;
 
     /*
      * Use a piece of an already-open file.
@@ -266,21 +264,24 @@
      *
      * On success, the object takes ownership of "dataMap" and "fd".
      */
-    status_t openChunk(FileMap* dataMap, base::unique_fd fd);
+    status_t openChunk(incfs::IncFsFileMap&& dataMap, base::unique_fd fd);
 
     /*
      * Standard Asset interfaces.
      */
-    virtual ssize_t read(void* buf, size_t count);
-    virtual off64_t seek(off64_t offset, int whence);
-    virtual void close(void);
-    virtual const void* getBuffer(bool wordAligned);
-    virtual off64_t getLength(void) const { return mLength; }
-    virtual off64_t getRemainingLength(void) const { return mLength-mOffset; }
-    virtual int openFileDescriptor(off64_t* outStart, off64_t* outLength) const;
-    virtual bool isAllocated(void) const { return mBuf != NULL; }
+    ssize_t read(void* buf, size_t count) override;
+    off64_t seek(off64_t offset, int whence) override;
+    void close(void) override;
+    const void* getBuffer(bool aligned) override;
+    incfs::map_ptr<void> getIncFsBuffer(bool aligned) override;
+    off64_t getLength(void) const override { return mLength; }
+    off64_t getRemainingLength(void) const override { return mLength-mOffset; }
+    int openFileDescriptor(off64_t* outStart, off64_t* outLength) const override;
+    bool isAllocated(void) const override { return mBuf != NULL; }
 
 private:
+    incfs::map_ptr<void> ensureAlignment(const incfs::IncFsFileMap& map);
+
     off64_t         mStart;         // absolute file offset of start of chunk
     off64_t         mLength;        // length of the chunk
     off64_t         mOffset;        // current local offset, 0 == mStart
@@ -295,10 +296,8 @@
      */
     enum { kReadVsMapThreshold = 4096 };
 
-    FileMap*    mMap;           // for memory map
-    unsigned char* mBuf;        // for read
-
-    const void* ensureAlignment(FileMap* map);
+    unsigned char*                      mBuf;     // for read
+    std::optional<incfs::IncFsFileMap>  mMap;     // for memory map
 };
 
 
@@ -323,7 +322,7 @@
      *
      * On success, the object takes ownership of "fd".
      */
-    status_t openChunk(FileMap* dataMap, size_t uncompressedLen);
+    status_t openChunk(incfs::IncFsFileMap&& dataMap, size_t uncompressedLen);
 
     /*
      * Standard Asset interfaces.
@@ -331,24 +330,23 @@
     virtual ssize_t read(void* buf, size_t count);
     virtual off64_t seek(off64_t offset, int whence);
     virtual void close(void);
-    virtual const void* getBuffer(bool wordAligned);
+    virtual const void* getBuffer(bool aligned);
+    virtual incfs::map_ptr<void> getIncFsBuffer(bool aligned);
     virtual off64_t getLength(void) const { return mUncompressedLen; }
     virtual off64_t getRemainingLength(void) const { return mUncompressedLen-mOffset; }
     virtual int openFileDescriptor(off64_t* /* outStart */, off64_t* /* outLength */) const { return -1; }
     virtual bool isAllocated(void) const { return mBuf != NULL; }
 
 private:
-    off64_t     mStart;         // offset to start of compressed data
-    off64_t     mCompressedLen; // length of the compressed data
-    off64_t     mUncompressedLen; // length of the uncompressed data
-    off64_t     mOffset;        // current offset, 0 == start of uncomp data
+    off64_t mStart;           // offset to start of compressed data
+    off64_t mCompressedLen;   // length of the compressed data
+    off64_t mUncompressedLen; // length of the uncompressed data
+    off64_t mOffset;          // current offset, 0 == start of uncomp data
+    int     mFd;              // for file input
 
-    FileMap*    mMap;           // for memory-mapped input
-    int         mFd;            // for file input
-
-    class StreamingZipInflater* mZipInflater;  // for streaming large compressed assets
-
-    unsigned char*  mBuf;       // for getBuffer()
+    class StreamingZipInflater*         mZipInflater; // for streaming large compressed assets
+    unsigned char*                      mBuf;         // for getBuffer()
+    std::optional<incfs::IncFsFileMap>  mMap;         // for memory-mapped input
 };
 
 // need: shared mmap version?
diff --git a/libs/androidfw/include/androidfw/AssetManager2.h b/libs/androidfw/include/androidfw/AssetManager2.h
index 30ef25c..a92694c 100644
--- a/libs/androidfw/include/androidfw/AssetManager2.h
+++ b/libs/androidfw/include/androidfw/AssetManager2.h
@@ -131,8 +131,8 @@
   bool GetOverlayablesToString(const android::StringPiece& package_name,
                                std::string* out) const;
 
-  const std::unordered_map<std::string, std::string>*
-    GetOverlayableMapForPackage(uint32_t package_id) const;
+  const std::unordered_map<std::string, std::string>* GetOverlayableMapForPackage(
+      uint32_t package_id) const;
 
   // Returns whether the resources.arsc of any loaded apk assets is allocated in RAM (not mmapped).
   bool ContainsAllocatedTable() const;
@@ -145,14 +145,16 @@
     return configuration_;
   }
 
-  // Returns all configurations for which there are resources defined. This includes resource
-  // configurations in all the ApkAssets set for this AssetManager.
+  // Returns all configurations for which there are resources defined, or an I/O error if reading
+  // resource data failed.
+  //
+  // This includes resource configurations in all the ApkAssets set for this AssetManager.
   // If `exclude_system` is set to true, resource configurations from system APKs
   // ('android' package, other libraries) will be excluded from the list.
   // If `exclude_mipmap` is set to true, resource configurations defined for resource type 'mipmap'
   // will be excluded from the list.
-  std::set<ResTable_config> GetResourceConfigurations(bool exclude_system = false,
-                                                      bool exclude_mipmap = false) const;
+  base::expected<std::set<ResTable_config>, IOError> GetResourceConfigurations(
+      bool exclude_system = false, bool exclude_mipmap = false) const;
 
   // Returns all the locales for which there are resources defined. This includes resource
   // locales in all the ApkAssets set for this AssetManager.
@@ -194,53 +196,109 @@
   std::unique_ptr<Asset> OpenNonAsset(const std::string& filename, ApkAssetsCookie cookie,
                                       Asset::AccessMode mode) const;
 
-  // Populates the `out_name` parameter with resource name information.
-  // Utf8 strings are preferred, and only if they are unavailable are
-  // the Utf16 variants populated.
-  // Returns false if the resource was not found or the name was missing/corrupt.
-  bool GetResourceName(uint32_t resid, ResourceName* out_name) const;
-
-  // Populates `out_flags` with the bitmask of configuration axis that this resource varies with.
-  // See ResTable_config for the list of configuration axis.
-  // Returns false if the resource was not found.
-  bool GetResourceFlags(uint32_t resid, uint32_t* out_flags) const;
+  // Returns the resource name of the specified resource ID.
+  //
+  // Utf8 strings are preferred, and only if they are unavailable are the Utf16 variants populated.
+  //
+  // Returns a null error if the name is missing/corrupt, or an I/O error if reading resource data
+  // failed.
+  base::expected<ResourceName, NullOrIOError> GetResourceName(uint32_t resid) const;
 
   // Finds the resource ID assigned to `resource_name`.
+  //
   // `resource_name` must be of the form '[package:][type/]entry'.
   // If no package is specified in `resource_name`, then `fallback_package` is used as the package.
   // If no type is specified in `resource_name`, then `fallback_type` is used as the type.
-  // Returns 0x0 if no resource by that name was found.
-  uint32_t GetResourceId(const std::string& resource_name, const std::string& fallback_type = {},
-                         const std::string& fallback_package = {}) const;
-
-  // Retrieves the best matching resource with ID `resid`. The resource value is filled into
-  // `out_value` and the configuration for the selected value is populated in `out_selected_config`.
-  // `out_flags` holds the same flags as retrieved with GetResourceFlags().
-  // If `density_override` is non-zero, the configuration to match against is overridden with that
-  // density.
   //
-  // Returns a valid cookie if the resource was found. If the resource was not found, or if the
-  // resource was a map/bag type, then kInvalidCookie is returned. If `may_be_bag` is false,
-  // this function logs if the resource was a map/bag type before returning kInvalidCookie.
-  ApkAssetsCookie GetResource(uint32_t resid, bool may_be_bag, uint16_t density_override,
-                              Res_value* out_value, ResTable_config* out_selected_config,
-                              uint32_t* out_flags) const;
+  // Returns a null error if no resource by that name was found, or an I/O error if reading resource
+  // data failed.
+  base::expected<uint32_t, NullOrIOError> GetResourceId(
+      const std::string& resource_name, const std::string& fallback_type = {},
+      const std::string& fallback_package = {}) const;
 
-  // Resolves the resource reference in `in_out_value` if the data type is
-  // Res_value::TYPE_REFERENCE.
-  // `cookie` is the ApkAssetsCookie of the reference in `in_out_value`.
-  // `in_out_value` is the reference to resolve. The result is placed back into this object.
-  // `in_out_flags` is the type spec flags returned from calls to GetResource() or
-  // GetResourceFlags(). Configuration flags of the values pointed to by the reference
-  // are OR'd together with `in_out_flags`.
-  // `in_out_config` is populated with the configuration for which the resolved value was defined.
-  // `out_last_reference` is populated with the last reference ID before resolving to an actual
-  // value. This is only initialized if the passed in `in_out_value` is a reference.
-  // Returns the cookie of the APK the resolved resource was defined in, or kInvalidCookie if
-  // it was not found.
-  ApkAssetsCookie ResolveReference(ApkAssetsCookie cookie, Res_value* in_out_value,
-                                   ResTable_config* in_out_selected_config, uint32_t* in_out_flags,
-                                   uint32_t* out_last_reference) const;
+  struct SelectedValue {
+    friend AssetManager2;
+    friend Theme;
+    SelectedValue() = default;
+    SelectedValue(const ResolvedBag* bag, const ResolvedBag::Entry& entry) :
+        cookie(entry.cookie), data(entry.value.data), type(entry.value.dataType),
+        flags(bag->type_spec_flags), resid(0U), config({}) {};
+
+    // The cookie representing the ApkAssets in which the value resides.
+    ApkAssetsCookie cookie = kInvalidCookie;
+
+    // The data for this value, as interpreted according to `type`.
+    Res_value::data_type data;
+
+    // Type of the data value.
+    uint8_t type;
+
+    // The bitmask of configuration axis that this resource varies with.
+    // See ResTable_config::CONFIG_*.
+    uint32_t flags;
+
+    // The resource ID from which this value was resolved.
+    uint32_t resid;
+
+    // The configuration for which the resolved value was defined.
+    ResTable_config config;
+
+   private:
+    SelectedValue(uint8_t value_type, Res_value::data_type value_data, ApkAssetsCookie cookie,
+                  uint32_t type_flags, uint32_t resid, const ResTable_config& config) :
+                  cookie(cookie), data(value_data), type(value_type), flags(type_flags),
+                  resid(resid), config(config) {};
+  };
+
+  // Retrieves the best matching resource value with ID `resid`.
+  //
+  // If `may_be_bag` is false, this function logs if the resource was a map/bag type and returns a
+  // null result. If `density_override` is non-zero, the configuration to match against is
+  // overridden with that density.
+  //
+  // Returns a null error if a best match could not be found, or an I/O error if reading resource
+  // data failed.
+  base::expected<SelectedValue, NullOrIOError> GetResource(uint32_t resid, bool may_be_bag = false,
+                                                           uint16_t density_override = 0U) const;
+
+  // Resolves the resource referenced in `value` if the type is Res_value::TYPE_REFERENCE.
+  //
+  // If the data type is not Res_value::TYPE_REFERENCE, no work is done. Configuration flags of the
+  // values pointed to by the reference are OR'd into `value.flags`. If `cache_value` is true, then
+  // the resolved value will be cached and used when attempting to resolve the resource id specified
+  // in `value`.
+  //
+  // Returns a null error if the resource could not be resolved, or an I/O error if reading
+  // resource data failed.
+  base::expected<std::monostate, NullOrIOError> ResolveReference(SelectedValue& value,
+                                                                 bool cache_value = false) const;
+
+  // Retrieves the best matching bag/map resource with ID `resid`.
+  //
+  // This method will resolve all parent references for this bag and merge keys with the child.
+  // To iterate over the keys, use the following idiom:
+  //
+  //  base::expected<const ResolvedBag*, NullOrIOError> bag = asset_manager->GetBag(id);
+  //  if (bag.has_value()) {
+  //    for (auto iter = begin(*bag); iter != end(*bag); ++iter) {
+  //      ...
+  //    }
+  //  }
+  //
+  // Returns a null error if a best match could not be found, or an I/O error if reading resource
+  // data failed.
+  base::expected<const ResolvedBag*, NullOrIOError> GetBag(uint32_t resid) const;
+
+  // Retrieves the best matching bag/map resource of the resource referenced in `value`.
+  //
+  // If `value.type` is not Res_value::TYPE_REFERENCE, a null result is returned.
+  // Configuration flags of the bag pointed to by the reference are OR'd into `value.flags`.
+  //
+  // Returns a null error if a best match could not be found, or an I/O error if reading resource
+  // data failed.
+  base::expected<const ResolvedBag*, NullOrIOError> ResolveBag(SelectedValue& value) const;
+
+  const std::vector<uint32_t> GetBagResIdStack(uint32_t resid) const;
 
   // Resets the resource resolution structures in preparation for the next resource retrieval.
   void ResetResourceResolution() const;
@@ -252,20 +310,6 @@
   // resolved yet.
   std::string GetLastResourceResolution() const;
 
-  const std::vector<uint32_t> GetBagResIdStack(uint32_t resid);
-
-  // Retrieves the best matching bag/map resource with ID `resid`.
-  // This method will resolve all parent references for this bag and merge keys with the child.
-  // To iterate over the keys, use the following idiom:
-  //
-  //  const AssetManager2::ResolvedBag* bag = asset_manager->GetBag(id);
-  //  if (bag != nullptr) {
-  //    for (auto iter = begin(bag); iter != end(bag); ++iter) {
-  //      ...
-  //    }
-  //  }
-  const ResolvedBag* GetBag(uint32_t resid);
-
   // Creates a new Theme from this AssetManager.
   std::unique_ptr<Theme> NewTheme();
 
@@ -286,11 +330,15 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(AssetManager2);
 
+  struct TypeConfig {
+    incfs::verified_map_ptr<ResTable_type> type;
+    ResTable_config config;
+  };
+
   // A collection of configurations and their associated ResTable_type that match the current
   // AssetManager configuration.
   struct FilteredConfigGroup {
-      std::vector<ResTable_config> configurations;
-      std::vector<const ResTable_type*> types;
+      std::vector<TypeConfig> type_configs;
   };
 
   // Represents an single package.
@@ -331,9 +379,7 @@
   };
 
   // Finds the best entry for `resid` from the set of ApkAssets. The entry can be a simple
-  // Res_value, or a complex map/bag type. If successful, it is available in `out_entry`.
-  // Returns kInvalidCookie on failure. Otherwise, the return value is the cookie associated with
-  // the ApkAssets in which the entry was found.
+  // Res_value, or a complex map/bag type. Returns a null result if a best entry cannot be found.
   //
   // `density_override` overrides the density of the current configuration when doing a search.
   //
@@ -347,13 +393,15 @@
   //
   // NOTE: FindEntry takes care of ensuring that structs within FindEntryResult have been properly
   // bounds-checked. Callers of FindEntry are free to trust the data if this method succeeds.
-  ApkAssetsCookie FindEntry(uint32_t resid, uint16_t density_override, bool stop_at_first_match,
-                            bool ignore_configuration, FindEntryResult* out_entry) const;
+  base::expected<FindEntryResult, NullOrIOError> FindEntry(uint32_t resid,
+                                                           uint16_t density_override,
+                                                           bool stop_at_first_match,
+                                                           bool ignore_configuration) const;
 
-  ApkAssetsCookie FindEntryInternal(const PackageGroup& package_group, uint8_t type_idx,
-                                    uint16_t entry_idx, const ResTable_config& desired_config,
-                                    bool /*stop_at_first_match*/,
-                                    bool ignore_configuration, FindEntryResult* out_entry) const;
+  base::expected<FindEntryResult, NullOrIOError> FindEntryInternal(
+      const PackageGroup& package_group, uint8_t type_idx, uint16_t entry_idx,
+      const ResTable_config& desired_config, bool stop_at_first_match,
+      bool ignore_configuration) const;
 
   // Assigns package IDs to all shared library ApkAssets.
   // Should be called whenever the ApkAssets are changed.
@@ -372,7 +420,8 @@
 
   // AssetManager2::GetBag(resid) wraps this function to track which resource ids have already
   // been seen while traversing bag parents.
-  const ResolvedBag* GetBag(uint32_t resid, std::vector<uint32_t>& child_resids);
+  base::expected<const ResolvedBag*, NullOrIOError> GetBag(
+      uint32_t resid, std::vector<uint32_t>& child_resids) const;
 
   // The ordered list of ApkAssets to search. These are not owned by the AssetManager, and must
   // have a longer lifetime.
@@ -394,19 +443,20 @@
 
   // Cached set of bags. These are cached because they can inherit keys from parent bags,
   // which involves some calculation.
-  std::unordered_map<uint32_t, util::unique_cptr<ResolvedBag>> cached_bags_;
+  mutable std::unordered_map<uint32_t, util::unique_cptr<ResolvedBag>> cached_bags_;
 
   // Cached set of bag resid stacks for each bag. These are cached because they might be requested
   // a number of times for each view during View inspection.
-  std::unordered_map<uint32_t, std::vector<uint32_t>> cached_bag_resid_stacks_;
+  mutable std::unordered_map<uint32_t, std::vector<uint32_t>> cached_bag_resid_stacks_;
+
+  // Cached set of resolved resource values.
+  mutable std::unordered_map<uint32_t, SelectedValue> cached_resolved_values_;
 
   // Whether or not to save resource resolution steps
   bool resource_resolution_logging_enabled_ = false;
 
   struct Resolution {
-
     struct Step {
-
       enum class Type {
         INITIAL,
         BETTER_MATCH,
@@ -455,55 +505,53 @@
  public:
   ~Theme();
 
-  // Applies the style identified by `resid` to this theme. This can be called
-  // multiple times with different styles. By default, any theme attributes that
-  // are already defined before this call are not overridden. If `force` is set
-  // to true, this behavior is changed and all theme attributes from the style at
-  // `resid` are applied.
-  // Returns false if the style failed to apply.
-  bool ApplyStyle(uint32_t resid, bool force = false);
+  // Applies the style identified by `resid` to this theme.
+  //
+  // This can be called multiple times with different styles. By default, any theme attributes that
+  // are already defined before this call are not overridden. If `force` is set to true, this
+  // behavior is changed and all theme attributes from the style at `resid` are applied.
+  //
+  // Returns a null error if the style could not be applied, or an I/O error if reading resource
+  // data failed.
+  base::expected<std::monostate, NullOrIOError> ApplyStyle(uint32_t resid, bool force = false);
 
-  // Sets this Theme to be a copy of `o` if `o` has the same AssetManager as this Theme.
-  // If `o` does not have the same AssetManager as this theme, only attributes from ApkAssets loaded
-  // into both AssetManagers will be copied to this theme.
-  void SetTo(const Theme& o);
+  // Sets this Theme to be a copy of `other` if `other` has the same AssetManager as this Theme.
+  //
+  // If `other` does not have the same AssetManager as this theme, only attributes from ApkAssets
+  // loaded into both AssetManagers will be copied to this theme.
+  //
+  // Returns an I/O error if reading resource data failed.
+  base::expected<std::monostate, IOError> SetTo(const Theme& other);
 
   void Clear();
 
-  void Dump() const;
+  // Retrieves the value of attribute ID `resid` in the theme.
+  //
+  // NOTE: This function does not do reference traversal. If you want to follow references to other
+  // resources to get the "real" value to use, you need to call ResolveReference() after this
+  // function.
+  std::optional<AssetManager2::SelectedValue> GetAttribute(uint32_t resid) const;
 
-  inline const AssetManager2* GetAssetManager() const {
+  // This is like AssetManager2::ResolveReference(), but also takes care of resolving attribute
+  // references to the theme.
+  base::expected<std::monostate, NullOrIOError> ResolveAttributeReference(
+      AssetManager2::SelectedValue& value) const;
+
+  AssetManager2* GetAssetManager() {
     return asset_manager_;
   }
 
-  inline AssetManager2* GetAssetManager() {
+  const AssetManager2* GetAssetManager() const {
     return asset_manager_;
   }
 
   // Returns a bit mask of configuration changes that will impact this
   // theme (and thus require completely reloading it).
-  inline uint32_t GetChangingConfigurations() const {
+  uint32_t GetChangingConfigurations() const {
     return type_spec_flags_;
   }
 
-  // Retrieve a value in the theme. If the theme defines this value, returns an asset cookie
-  // indicating which ApkAssets it came from and populates `out_value` with the value.
-  // `out_flags` is populated with a bitmask of the configuration axis with which the resource
-  // varies.
-  //
-  // If the attribute is not found, returns kInvalidCookie.
-  //
-  // NOTE: This function does not do reference traversal. If you want to follow references to other
-  // resources to get the "real" value to use, you need to call ResolveReference() after this
-  // function.
-  ApkAssetsCookie GetAttribute(uint32_t resid, Res_value* out_value, uint32_t* out_flags) const;
-
-  // This is like AssetManager2::ResolveReference(), but also takes
-  // care of resolving attribute references to the theme.
-  ApkAssetsCookie ResolveAttributeReference(ApkAssetsCookie cookie, Res_value* in_out_value,
-                                            ResTable_config* in_out_selected_config = nullptr,
-                                            uint32_t* in_out_type_spec_flags = nullptr,
-                                            uint32_t* out_last_ref = nullptr) const;
+  void Dump() const;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(Theme);
diff --git a/libs/androidfw/include/androidfw/AttributeResolution.h b/libs/androidfw/include/androidfw/AttributeResolution.h
index d71aad2..1a69a30 100644
--- a/libs/androidfw/include/androidfw/AttributeResolution.h
+++ b/libs/androidfw/include/androidfw/AttributeResolution.h
@@ -45,20 +45,28 @@
 
 // `out_values` must NOT be nullptr.
 // `out_indices` may be nullptr.
-bool ResolveAttrs(Theme* theme, uint32_t def_style_attr, uint32_t def_style_resid,
-                  uint32_t* src_values, size_t src_values_length, uint32_t* attrs,
-                  size_t attrs_length, uint32_t* out_values, uint32_t* out_indices);
+base::expected<std::monostate, IOError> ResolveAttrs(Theme* theme, uint32_t def_style_attr,
+                                                     uint32_t def_style_resid, uint32_t* src_values,
+                                                     size_t src_values_length, uint32_t* attrs,
+                                                     size_t attrs_length, uint32_t* out_values,
+                                                     uint32_t* out_indices);
 
 // `out_values` must NOT be nullptr.
 // `out_indices` is NOT optional and must NOT be nullptr.
-void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr,
-                uint32_t def_style_resid, const uint32_t* attrs, size_t attrs_length,
-                uint32_t* out_values, uint32_t* out_indices);
+base::expected<std::monostate, IOError> ApplyStyle(Theme* theme, ResXMLParser* xml_parser,
+                                                   uint32_t def_style_attr,
+                                                   uint32_t def_style_resid,
+                                                   const uint32_t* attrs, size_t attrs_length,
+                                                   uint32_t* out_values, uint32_t* out_indices);
 
 // `out_values` must NOT be nullptr.
 // `out_indices` may be nullptr.
-bool RetrieveAttributes(AssetManager2* assetmanager, ResXMLParser* xml_parser, uint32_t* attrs,
-                        size_t attrs_length, uint32_t* out_values, uint32_t* out_indices);
+base::expected<std::monostate, IOError> RetrieveAttributes(AssetManager2* assetmanager,
+                                                           ResXMLParser* xml_parser,
+                                                           uint32_t* attrs,
+                                                           size_t attrs_length,
+                                                           uint32_t* out_values,
+                                                           uint32_t* out_indices);
 
 }  // namespace android
 
diff --git a/libs/androidfw/include/androidfw/Chunk.h b/libs/androidfw/include/androidfw/Chunk.h
index a0f2343..f1c43b2 100644
--- a/libs/androidfw/include/androidfw/Chunk.h
+++ b/libs/androidfw/include/androidfw/Chunk.h
@@ -36,7 +36,7 @@
 // of the chunk.
 class Chunk {
  public:
-  explicit Chunk(const ResChunk_header* chunk) : device_chunk_(chunk) {}
+  explicit Chunk(incfs::verified_map_ptr<ResChunk_header> chunk) : device_chunk_(chunk) {}
 
   // Returns the type of the chunk. Caller need not worry about endianness.
   inline int type() const { return dtohs(device_chunk_->type); }
@@ -49,21 +49,18 @@
   inline size_t header_size() const { return dtohs(device_chunk_->headerSize); }
 
   template <typename T, size_t MinSize = sizeof(T)>
-  inline const T* header() const {
-    if (header_size() >= MinSize) {
-      return reinterpret_cast<const T*>(device_chunk_);
-    }
-    return nullptr;
+  inline incfs::map_ptr<T> header() const {
+    return (header_size() >= MinSize) ? device_chunk_.convert<T>() : nullptr;
   }
 
-  inline const void* data_ptr() const {
-    return reinterpret_cast<const uint8_t*>(device_chunk_) + header_size();
+  inline incfs::map_ptr<void> data_ptr() const {
+    return device_chunk_.offset(header_size());
   }
 
   inline size_t data_size() const { return size() - header_size(); }
 
  private:
-  const ResChunk_header* device_chunk_;
+  const incfs::verified_map_ptr<ResChunk_header> device_chunk_;
 };
 
 // Provides a Java style iterator over an array of ResChunk_header's.
@@ -84,11 +81,11 @@
 //
 class ChunkIterator {
  public:
-  ChunkIterator(const void* data, size_t len)
-      : next_chunk_(reinterpret_cast<const ResChunk_header*>(data)),
+  ChunkIterator(incfs::map_ptr<void> data, size_t len)
+      : next_chunk_(data.convert<ResChunk_header>()),
         len_(len),
         last_error_(nullptr) {
-    CHECK(next_chunk_ != nullptr) << "data can't be nullptr";
+    CHECK((bool) next_chunk_) << "data can't be null";
     if (len_ != 0) {
       VerifyNextChunk();
     }
@@ -113,7 +110,7 @@
   // Returns false if there was an error. For legacy purposes.
   bool VerifyNextChunkNonFatal();
 
-  const ResChunk_header* next_chunk_;
+  incfs::map_ptr<ResChunk_header> next_chunk_;
   size_t len_;
   const char* last_error_;
   bool last_error_was_fatal_ = true;
diff --git a/libs/androidfw/include/androidfw/Errors.h b/libs/androidfw/include/androidfw/Errors.h
new file mode 100644
index 0000000..948162d
--- /dev/null
+++ b/libs/androidfw/include/androidfw/Errors.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROIDFW_ERRORS_H_
+#define ANDROIDFW_ERRORS_H_
+
+#include <optional>
+#include <variant>
+
+#include <android-base/result.h>
+
+namespace android {
+
+enum class IOError {
+  // Used when reading a file residing on an IncFs file-system times out.
+  PAGES_MISSING = -1,
+};
+
+// Represents an absent result or an I/O error.
+using NullOrIOError = std::variant<std::nullopt_t, IOError>;
+
+// Checks whether the result holds an unexpected I/O error.
+template <typename T>
+static inline bool IsIOError(const base::expected<T, NullOrIOError> result) {
+  return !result.has_value() && std::holds_alternative<IOError>(result.error());
+}
+
+static inline IOError GetIOError(const NullOrIOError& error) {
+  return std::get<IOError>(error);
+}
+
+} // namespace android
+
+#endif //ANDROIDFW_ERRORS_H_
diff --git a/libs/androidfw/include/androidfw/Idmap.h b/libs/androidfw/include/androidfw/Idmap.h
index ab0f47f..fdab03b 100644
--- a/libs/androidfw/include/androidfw/Idmap.h
+++ b/libs/androidfw/include/androidfw/Idmap.h
@@ -40,8 +40,8 @@
 class OverlayStringPool : public ResStringPool {
  public:
   virtual ~OverlayStringPool();
-  const char16_t* stringAt(size_t idx, size_t* outLen) const override;
-  const char* string8At(size_t idx, size_t* outLen) const override;
+  base::expected<StringPiece16, NullOrIOError> stringAt(size_t idx) const override;
+  base::expected<StringPiece, NullOrIOError> string8At(size_t idx) const override;
   size_t size() const override;
 
   explicit OverlayStringPool(const LoadedIdmap* loaded_idmap);
diff --git a/libs/androidfw/include/androidfw/LoadedArsc.h b/libs/androidfw/include/androidfw/LoadedArsc.h
index 89ff9f5..17d97a2 100644
--- a/libs/androidfw/include/androidfw/LoadedArsc.h
+++ b/libs/androidfw/include/androidfw/LoadedArsc.h
@@ -23,7 +23,8 @@
 #include <unordered_map>
 #include <unordered_set>
 
-#include "android-base/macros.h"
+#include <android-base/macros.h>
+#include <android-base/result.h>
 
 #include "androidfw/ByteBucketArray.h"
 #include "androidfw/Chunk.h"
@@ -49,7 +50,7 @@
   // Pointer to the mmapped data where flags are kept.
   // Flags denote whether the resource entry is public
   // and under which configurations it varies.
-  const ResTable_typeSpec* type_spec;
+  incfs::verified_map_ptr<ResTable_typeSpec> type_spec;
 
   // The number of types that follow this struct.
   // There is a type for each configuration that entries are defined for.
@@ -57,15 +58,17 @@
 
   // Trick to easily access a variable number of Type structs
   // proceeding this struct, and to ensure their alignment.
-  const ResTable_type* types[0];
+  incfs::verified_map_ptr<ResTable_type> types[0];
 
-  inline uint32_t GetFlagsForEntryIndex(uint16_t entry_index) const {
+  base::expected<uint32_t, NullOrIOError> GetFlagsForEntryIndex(uint16_t entry_index) const {
     if (entry_index >= dtohl(type_spec->entryCount)) {
-      return 0u;
+      return 0U;
     }
-
-    const uint32_t* flags = reinterpret_cast<const uint32_t*>(type_spec + 1);
-    return flags[entry_index];
+    const auto entry_flags_ptr = ((type_spec + 1).convert<uint32_t>() + entry_index);
+    if (!entry_flags_ptr) {
+      return base::unexpected(IOError::PAGES_MISSING);
+    }
+    return entry_flags_ptr.value();
   }
 };
 
@@ -161,13 +164,17 @@
   // the default policy in AAPT2 is to build UTF-8 string pools, this needs to change.
   // Returns a partial resource ID, with the package ID left as 0x00. The caller is responsible
   // for patching the correct package ID to the resource ID.
-  uint32_t FindEntryByName(const std::u16string& type_name, const std::u16string& entry_name) const;
+  base::expected<uint32_t, NullOrIOError> FindEntryByName(const std::u16string& type_name,
+                                                          const std::u16string& entry_name) const;
 
-  static const ResTable_entry* GetEntry(const ResTable_type* type_chunk, uint16_t entry_index);
+  static base::expected<incfs::map_ptr<ResTable_entry>, NullOrIOError> GetEntry(
+      incfs::verified_map_ptr<ResTable_type> type_chunk, uint16_t entry_index);
 
-  static uint32_t GetEntryOffset(const ResTable_type* type_chunk, uint16_t entry_index);
+  static base::expected<uint32_t, NullOrIOError> GetEntryOffset(
+      incfs::verified_map_ptr<ResTable_type> type_chunk, uint16_t entry_index);
 
-  static const ResTable_entry* GetEntryFromOffset(const ResTable_type* type_chunk, uint32_t offset);
+  static base::expected<incfs::map_ptr<ResTable_entry>, NullOrIOError> GetEntryFromOffset(
+      incfs::verified_map_ptr<ResTable_type> type_chunk, uint32_t offset);
 
   // Returns the string pool where type names are stored.
   inline const ResStringPool* GetTypeStringPool() const {
@@ -220,7 +227,8 @@
 
   // Populates a set of ResTable_config structs, possibly excluding configurations defined for
   // the mipmap type.
-  void CollectConfigurations(bool exclude_mipmap, std::set<ResTable_config>* out_configs) const;
+  base::expected<std::monostate, IOError> CollectConfigurations(
+      bool exclude_mipmap, std::set<ResTable_config>* out_configs) const;
 
   // Populates a set of strings representing locales.
   // If `canonicalize` is set to true, each locale is transformed into its canonical format
@@ -300,7 +308,8 @@
   // If `load_as_shared_library` is set to true, the application package (0x7f) is treated
   // as a shared library (0x00). When loaded into an AssetManager, the package will be assigned an
   // ID.
-  static std::unique_ptr<const LoadedArsc> Load(const StringPiece& data,
+  static std::unique_ptr<const LoadedArsc> Load(incfs::map_ptr<void> data,
+                                                size_t length,
                                                 const LoadedIdmap* loaded_idmap = nullptr,
                                                 package_property_t property_flags = 0U);
 
diff --git a/libs/androidfw/include/androidfw/ResourceTypes.h b/libs/androidfw/include/androidfw/ResourceTypes.h
index 04ba78b..fb5f864 100644
--- a/libs/androidfw/include/androidfw/ResourceTypes.h
+++ b/libs/androidfw/include/androidfw/ResourceTypes.h
@@ -20,7 +20,10 @@
 #ifndef _LIBS_UTILS_RESOURCE_TYPES_H
 #define _LIBS_UTILS_RESOURCE_TYPES_H
 
+#include <android-base/expected.h>
+
 #include <androidfw/Asset.h>
+#include <androidfw/Errors.h>
 #include <androidfw/LocaleData.h>
 #include <androidfw/StringPiece.h>
 #include <utils/Errors.h>
@@ -497,7 +500,7 @@
     virtual ~ResStringPool();
 
     void setToEmpty();
-    status_t setTo(const void* data, size_t size, bool copyData=false);
+    status_t setTo(incfs::map_ptr<void> data, size_t size, bool copyData=false);
 
     status_t getError() const;
 
@@ -505,48 +508,49 @@
 
     // Return string entry as UTF16; if the pool is UTF8, the string will
     // be converted before returning.
-    inline const char16_t* stringAt(const ResStringPool_ref& ref, size_t* outLen) const {
-        return stringAt(ref.index, outLen);
+    inline base::expected<StringPiece16, NullOrIOError> stringAt(
+            const ResStringPool_ref& ref) const {
+        return stringAt(ref.index);
     }
-    virtual const char16_t* stringAt(size_t idx, size_t* outLen) const;
+    virtual base::expected<StringPiece16, NullOrIOError> stringAt(size_t idx) const;
 
     // Note: returns null if the string pool is not UTF8.
-    virtual const char* string8At(size_t idx, size_t* outLen) const;
+    virtual base::expected<StringPiece, NullOrIOError> string8At(size_t idx) const;
 
     // Return string whether the pool is UTF8 or UTF16.  Does not allow you
     // to distinguish null.
-    const String8 string8ObjectAt(size_t idx) const;
+    base::expected<String8, IOError> string8ObjectAt(size_t idx) const;
 
-    const ResStringPool_span* styleAt(const ResStringPool_ref& ref) const;
-    const ResStringPool_span* styleAt(size_t idx) const;
+    base::expected<incfs::map_ptr<ResStringPool_span>, NullOrIOError> styleAt(
+        const ResStringPool_ref& ref) const;
+    base::expected<incfs::map_ptr<ResStringPool_span>, NullOrIOError> styleAt(size_t idx) const;
 
-    ssize_t indexOfString(const char16_t* str, size_t strLen) const;
+    base::expected<size_t, NullOrIOError> indexOfString(const char16_t* str, size_t strLen) const;
 
     virtual size_t size() const;
     size_t styleCount() const;
     size_t bytes() const;
-    const void* data() const;
-
+    incfs::map_ptr<void> data() const;
 
     bool isSorted() const;
     bool isUTF8() const;
 
 private:
-    status_t                    mError;
-    void*                       mOwnedData;
-    const ResStringPool_header* mHeader;
-    size_t                      mSize;
-    mutable Mutex               mDecodeLock;
-    const uint32_t*             mEntries;
-    const uint32_t*             mEntryStyles;
-    const void*                 mStrings;
-    char16_t mutable**          mCache;
-    uint32_t                    mStringPoolSize;    // number of uint16_t
-    const uint32_t*             mStyles;
-    uint32_t                    mStylePoolSize;    // number of uint32_t
+    status_t                                      mError;
+    void*                                         mOwnedData;
+    incfs::verified_map_ptr<ResStringPool_header> mHeader;
+    size_t                                        mSize;
+    mutable Mutex                                 mDecodeLock;
+    incfs::map_ptr<uint32_t>                      mEntries;
+    incfs::map_ptr<uint32_t>                      mEntryStyles;
+    incfs::map_ptr<void>                          mStrings;
+    char16_t mutable**                            mCache;
+    uint32_t                                      mStringPoolSize;    // number of uint16_t
+    incfs::map_ptr<uint32_t>                      mStyles;
+    uint32_t                                      mStylePoolSize;    // number of uint32_t
 
-    const char* stringDecodeAt(size_t idx, const uint8_t* str, const size_t encLen,
-                               size_t* outLen) const;
+    base::expected<StringPiece, NullOrIOError> stringDecodeAt(
+        size_t idx, incfs::map_ptr<uint8_t> str, size_t encLen) const;
 };
 
 /**
@@ -558,8 +562,8 @@
  StringPoolRef() = default;
  StringPoolRef(const ResStringPool* pool, uint32_t index);
 
- const char* string8(size_t* outLen) const;
- const char16_t* string16(size_t* outLen) const;
+ base::expected<StringPiece, NullOrIOError> string8() const;
+ base::expected<StringPiece16, NullOrIOError> string16() const;
 
 private:
  const ResStringPool* mPool = nullptr;
@@ -1797,6 +1801,16 @@
 
 bool U16StringToInt(const char16_t* s, size_t len, Res_value* outValue);
 
+template<typename TChar, typename E>
+static const TChar* UnpackOptionalString(base::expected<BasicStringPiece<TChar>, E>&& result,
+                                         size_t* outLen) {
+  if (result.has_value()) {
+    *outLen = result->size();
+    return result->data();
+  }
+  return NULL;
+}
+
 /**
  * Convenience class for accessing data in a ResTable resource.
  */
diff --git a/libs/androidfw/include/androidfw/ResourceUtils.h b/libs/androidfw/include/androidfw/ResourceUtils.h
index e649940..bd1c440 100644
--- a/libs/androidfw/include/androidfw/ResourceUtils.h
+++ b/libs/androidfw/include/androidfw/ResourceUtils.h
@@ -30,13 +30,12 @@
 
 // Convert a type_string_ref, entry_string_ref, and package to AssetManager2::ResourceName.
 // Useful for getting resource name without re-running AssetManager2::FindEntry searches.
-bool ToResourceName(const StringPoolRef& type_string_ref,
-                    const StringPoolRef& entry_string_ref,
-                    const StringPiece& package_name,
-                    AssetManager2::ResourceName* out_name);
+base::expected<AssetManager2::ResourceName, NullOrIOError> ToResourceName(
+    const StringPoolRef& type_string_ref, const StringPoolRef& entry_string_ref,
+    const StringPiece& package_name);
 
 // Formats a ResourceName to "package:type/entry_name".
-std::string ToFormattedResourceString(AssetManager2::ResourceName* resource_name);
+std::string ToFormattedResourceString(const AssetManager2::ResourceName& resource_name);
 
 inline uint32_t fix_package_id(uint32_t resid, uint8_t package_id) {
   return (resid & 0x00ffffffu) | (static_cast<uint32_t>(package_id) << 24);
diff --git a/libs/androidfw/include/androidfw/StreamingZipInflater.h b/libs/androidfw/include/androidfw/StreamingZipInflater.h
index 3ace5d5..472b794b 100644
--- a/libs/androidfw/include/androidfw/StreamingZipInflater.h
+++ b/libs/androidfw/include/androidfw/StreamingZipInflater.h
@@ -19,6 +19,8 @@
 
 #include <unistd.h>
 #include <inttypes.h>
+
+#include <util/map_ptr.h>
 #include <zlib.h>
 
 #include <utils/Compat.h>
@@ -34,7 +36,7 @@
     StreamingZipInflater(int fd, off64_t compDataStart, size_t uncompSize, size_t compSize);
 
     // Flavor that gets the compressed data from an in-memory buffer
-    StreamingZipInflater(class FileMap* dataMap, size_t uncompSize);
+    StreamingZipInflater(const incfs::IncFsFileMap* dataMap, size_t uncompSize);
 
     ~StreamingZipInflater();
 
@@ -54,7 +56,7 @@
     // where to find the uncompressed data
     int mFd;
     off64_t mInFileStart;         // where the compressed data lives in the file
-    class FileMap* mDataMap;
+    const incfs::IncFsFileMap* mDataMap;
 
     z_stream mInflateState;
     bool mStreamNeedsInit;
diff --git a/libs/androidfw/include/androidfw/Util.h b/libs/androidfw/include/androidfw/Util.h
index 9a3646b..aceeecc 100644
--- a/libs/androidfw/include/androidfw/Util.h
+++ b/libs/androidfw/include/androidfw/Util.h
@@ -22,7 +22,8 @@
 #include <sstream>
 #include <vector>
 
-#include "android-base/macros.h"
+#include <android-base/macros.h>
+#include <util/map_ptr.h>
 
 #include "androidfw/StringPiece.h"
 
@@ -126,6 +127,11 @@
 
 std::vector<std::string> SplitAndLowercase(const android::StringPiece& str, char sep);
 
+template <typename T>
+bool IsFourByteAligned(const incfs::map_ptr<T>& data) {
+  return ((size_t)data.unsafe_ptr() & 0x3U) == 0;
+}
+
 }  // namespace util
 }  // namespace android
 
diff --git a/libs/androidfw/include/androidfw/ZipFileRO.h b/libs/androidfw/include/androidfw/ZipFileRO.h
index c221e3b..10f6d06 100644
--- a/libs/androidfw/include/androidfw/ZipFileRO.h
+++ b/libs/androidfw/include/androidfw/ZipFileRO.h
@@ -30,17 +30,20 @@
 #ifndef __LIBS_ZIPFILERO_H
 #define __LIBS_ZIPFILERO_H
 
-#include <utils/Compat.h>
-#include <utils/Errors.h>
-#include <utils/FileMap.h>
-#include <utils/threads.h>
-
+#include <optional>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <time.h>
 
+#include <util/map_ptr.h>
+
+#include <utils/Compat.h>
+#include <utils/Errors.h>
+#include <utils/FileMap.h>
+#include <utils/threads.h>
+
 struct ZipArchive;
 typedef ZipArchive* ZipArchiveHandle;
 
@@ -136,14 +139,26 @@
         uint32_t* pCrc32) const;
 
     /*
-     * Create a new FileMap object that maps a subset of the archive.  For
+     * Create a new FileMap object that maps a subset of the archive. For
      * an uncompressed entry this effectively provides a pointer to the
      * actual data, for a compressed entry this provides the input buffer
      * for inflate().
+     *
+     * Use this function if the archive can never reside on IncFs.
      */
     FileMap* createEntryFileMap(ZipEntryRO entry) const;
 
     /*
+     * Create a new incfs::IncFsFileMap object that maps a subset of the archive. For
+     * an uncompressed entry this effectively provides a pointer to the
+     * actual data, for a compressed entry this provides the input buffer
+     * for inflate().
+     *
+     * Use this function if the archive can potentially reside on IncFs.
+     */
+    std::optional<incfs::IncFsFileMap> createEntryIncFsFileMap(ZipEntryRO entry) const;
+
+    /*
      * Uncompress the data into a buffer.  Depending on the compression
      * format, this is either an "inflate" operation or a memcpy.
      *
diff --git a/libs/androidfw/include/androidfw/ZipUtils.h b/libs/androidfw/include/androidfw/ZipUtils.h
index 4d35e99..dbfec34 100644
--- a/libs/androidfw/include/androidfw/ZipUtils.h
+++ b/libs/androidfw/include/androidfw/ZipUtils.h
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <time.h>
 
+#include "util/map_ptr.h"
+
 namespace android {
 
 /*
@@ -40,8 +42,8 @@
         long compressedLen);
     static bool inflateToBuffer(int fd, void* buf, long uncompressedLen,
         long compressedLen);
-    static bool inflateToBuffer(const void *in, void* buf, long uncompressedLen,
-        long compressedLen);
+    static bool inflateToBuffer(incfs::map_ptr<void> in, void* buf,
+        long uncompressedLen, long compressedLen);
 
     /*
      * Someday we might want to make this generic and handle bzip2 ".bz2"
diff --git a/libs/androidfw/tests/AssetManager2_bench.cpp b/libs/androidfw/tests/AssetManager2_bench.cpp
index 437e147..c7ae618 100644
--- a/libs/androidfw/tests/AssetManager2_bench.cpp
+++ b/libs/androidfw/tests/AssetManager2_bench.cpp
@@ -139,9 +139,13 @@
   assets.SetApkAssets({apk.get()});
 
   while (state.KeepRunning()) {
-    const ResolvedBag* bag = assets.GetBag(app::R::style::StyleTwo);
-    const auto bag_end = end(bag);
-    for (auto iter = begin(bag); iter != bag_end; ++iter) {
+    auto bag = assets.GetBag(app::R::style::StyleTwo);
+    if (!bag.has_value()) {
+      state.SkipWithError("Failed to load get bag");
+      return;
+    }
+    const auto bag_end = end(*bag);
+    for (auto iter = begin(*bag); iter != bag_end; ++iter) {
       uint32_t key = iter->key;
       Res_value value = iter->value;
       benchmark::DoNotOptimize(key);
diff --git a/libs/androidfw/tests/AssetManager2_test.cpp b/libs/androidfw/tests/AssetManager2_test.cpp
index 8c255d1..471b0ee 100644
--- a/libs/androidfw/tests/AssetManager2_test.cpp
+++ b/libs/androidfw/tests/AssetManager2_test.cpp
@@ -108,24 +108,18 @@
   assetmanager.SetConfiguration(desired_config);
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   // Came from our ApkAssets.
-  EXPECT_EQ(0, cookie);
+  EXPECT_EQ(0, value->cookie);
 
   // It is the default config.
-  EXPECT_EQ(0, selected_config.language[0]);
-  EXPECT_EQ(0, selected_config.language[1]);
+  EXPECT_EQ(0, value->config.language[0]);
+  EXPECT_EQ(0, value->config.language[1]);
 
   // It is a string.
-  EXPECT_EQ(Res_value::TYPE_STRING, value.dataType);
+  EXPECT_EQ(Res_value::TYPE_STRING, value->type);
 }
 
 TEST_F(AssetManager2Test, FindsResourceFromMultipleApkAssets) {
@@ -138,24 +132,18 @@
   assetmanager.SetConfiguration(desired_config);
   assetmanager.SetApkAssets({basic_assets_.get(), basic_de_fr_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   // Came from our de_fr ApkAssets.
-  EXPECT_EQ(1, cookie);
+  EXPECT_EQ(1, value->cookie);
 
   // The configuration is German.
-  EXPECT_EQ('d', selected_config.language[0]);
-  EXPECT_EQ('e', selected_config.language[1]);
+  EXPECT_EQ('d', value->config.language[0]);
+  EXPECT_EQ('e', value->config.language[1]);
 
   // It is a string.
-  EXPECT_EQ(Res_value::TYPE_STRING, value.dataType);
+  EXPECT_EQ(Res_value::TYPE_STRING, value->type);
 }
 
 TEST_F(AssetManager2Test, FindsResourceFromSharedLibrary) {
@@ -166,44 +154,35 @@
   assetmanager.SetApkAssets(
       {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(libclient::R::string::foo_one, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(libclient::R::string::foo_one);
+  ASSERT_TRUE(value.has_value());
 
   // Reference comes from libclient.
-  EXPECT_EQ(2, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  EXPECT_EQ(2, value->cookie);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
 
   // Lookup the reference.
-  cookie = assetmanager.GetResource(value.data, false /* may_be_bag */, 0 /* density_override*/,
-                                    &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(1, cookie);
-  EXPECT_EQ(Res_value::TYPE_STRING, value.dataType);
+  value = assetmanager.GetResource(value->data);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(1, value->cookie);
+  EXPECT_EQ(Res_value::TYPE_STRING, value->type);
   EXPECT_EQ(std::string("Foo from lib_one"),
-            GetStringFromPool(assetmanager.GetStringPoolForCookie(cookie), value.data));
+            GetStringFromPool(assetmanager.GetStringPoolForCookie(value->cookie), value->data));
 
-  cookie = assetmanager.GetResource(libclient::R::string::foo_two, false /*may_be_bag*/,
-                                    0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  value = assetmanager.GetResource(libclient::R::string::foo_two);
+  ASSERT_TRUE(value.has_value());
 
   // Reference comes from libclient.
-  EXPECT_EQ(2, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  EXPECT_EQ(2, value->cookie);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
 
   // Lookup the reference.
-  cookie = assetmanager.GetResource(value.data, false /* may_be_bag */, 0 /* density_override*/,
-                                    &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(0, cookie);
-  EXPECT_EQ(Res_value::TYPE_STRING, value.dataType);
+  value = assetmanager.GetResource(value->data);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(0, value->cookie);
+  EXPECT_EQ(Res_value::TYPE_STRING, value->type);
   EXPECT_EQ(std::string("Foo from lib_two"),
-            GetStringFromPool(assetmanager.GetStringPoolForCookie(cookie), value.data));
+            GetStringFromPool(assetmanager.GetStringPoolForCookie(value->cookie), value->data));
 }
 
 TEST_F(AssetManager2Test, FindsResourceFromAppLoadedAsSharedLibrary) {
@@ -211,16 +190,10 @@
   assetmanager.SetApkAssets({appaslib_assets_.get()});
 
   // The appaslib package will have been assigned the package ID 0x02.
-
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = assetmanager.GetResource(
-      fix_package_id(appaslib::R::integer::number1, 0x02), false /*may_be_bag*/,
-      0u /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(fix_package_id(appaslib::R::array::integerArray1, 0x02), value.data);
+  auto value = assetmanager.GetResource(fix_package_id(appaslib::R::integer::number1, 0x02));
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(fix_package_id(appaslib::R::array::integerArray1, 0x02), value->data);
 }
 
 TEST_F(AssetManager2Test, AssignsOverlayPackageIdLast) {
@@ -238,40 +211,40 @@
     return assetmanager.GetAssignedPackageId(apkAssets->GetLoadedArsc()->GetPackages()[0].get());
   };
 
-  ASSERT_EQ(get_first_package_id(overlayable_assets_.get()), 0x7f);
-  ASSERT_EQ(get_first_package_id(overlay_assets_.get()), 0x03);
-  ASSERT_EQ(get_first_package_id(lib_one_assets_.get()), 0x02);
+  ASSERT_EQ(0x7f, get_first_package_id(overlayable_assets_.get()));
+  ASSERT_EQ(0x03, get_first_package_id(overlay_assets_.get()));
+  ASSERT_EQ(0x02, get_first_package_id(lib_one_assets_.get()));
 }
 
 TEST_F(AssetManager2Test, GetSharedLibraryResourceName) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({lib_one_assets_.get()});
 
-  AssetManager2::ResourceName name;
-  ASSERT_TRUE(assetmanager.GetResourceName(lib_one::R::string::foo, &name));
-  std::string formatted_name = ToFormattedResourceString(&name);
-  ASSERT_EQ(formatted_name, "com.android.lib_one:string/foo");
+  auto name = assetmanager.GetResourceName(lib_one::R::string::foo);
+  ASSERT_TRUE(name.has_value());
+  ASSERT_EQ("com.android.lib_one:string/foo", ToFormattedResourceString(*name));
 }
 
 TEST_F(AssetManager2Test, FindsBagResourceFromSingleApkAssets) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  const ResolvedBag* bag = assetmanager.GetBag(basic::R::array::integerArray1);
-  ASSERT_NE(nullptr, bag);
-  ASSERT_EQ(3u, bag->entry_count);
+  auto bag = assetmanager.GetBag(basic::R::array::integerArray1);
+  ASSERT_TRUE(bag.has_value());
 
-  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), bag->entries[0].value.dataType);
-  EXPECT_EQ(1u, bag->entries[0].value.data);
-  EXPECT_EQ(0, bag->entries[0].cookie);
+  ASSERT_EQ(3u, (*bag)->entry_count);
 
-  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), bag->entries[1].value.dataType);
-  EXPECT_EQ(2u, bag->entries[1].value.data);
-  EXPECT_EQ(0, bag->entries[1].cookie);
+  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[0].value.dataType);
+  EXPECT_EQ(1u, (*bag)->entries[0].value.data);
+  EXPECT_EQ(0, (*bag)->entries[0].cookie);
 
-  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), bag->entries[2].value.dataType);
-  EXPECT_EQ(3u, bag->entries[2].value.data);
-  EXPECT_EQ(0, bag->entries[2].cookie);
+  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[1].value.dataType);
+  EXPECT_EQ(2u, (*bag)->entries[1].value.data);
+  EXPECT_EQ(0, (*bag)->entries[1].cookie);
+
+  EXPECT_EQ(static_cast<uint8_t>(Res_value::TYPE_INT_DEC), (*bag)->entries[2].value.dataType);
+  EXPECT_EQ(3u, (*bag)->entries[2].value.data);
+  EXPECT_EQ(0, (*bag)->entries[2].cookie);
 }
 
 TEST_F(AssetManager2Test, FindsBagResourceFromMultipleApkAssets) {}
@@ -284,15 +257,16 @@
   assetmanager.SetApkAssets(
       {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()});
 
-  const ResolvedBag* bag = assetmanager.GetBag(fix_package_id(lib_one::R::style::Theme, 0x03));
-  ASSERT_NE(nullptr, bag);
-  ASSERT_GE(bag->entry_count, 2u);
+  auto bag = assetmanager.GetBag(fix_package_id(lib_one::R::style::Theme, 0x03));
+  ASSERT_TRUE(bag.has_value());
+
+  ASSERT_GE((*bag)->entry_count, 2u);
 
   // First two attributes come from lib_one.
-  EXPECT_EQ(1, bag->entries[0].cookie);
-  EXPECT_EQ(0x03, get_package_id(bag->entries[0].key));
-  EXPECT_EQ(1, bag->entries[1].cookie);
-  EXPECT_EQ(0x03, get_package_id(bag->entries[1].key));
+  EXPECT_EQ(1, (*bag)->entries[0].cookie);
+  EXPECT_EQ(0x03, get_package_id((*bag)->entries[0].key));
+  EXPECT_EQ(1, (*bag)->entries[1].cookie);
+  EXPECT_EQ(0x03, get_package_id((*bag)->entries[1].key));
 }
 
 TEST_F(AssetManager2Test, FindsBagResourceFromMultipleSharedLibraries) {
@@ -303,17 +277,17 @@
   assetmanager.SetApkAssets(
       {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()});
 
-  const ResolvedBag* bag = assetmanager.GetBag(libclient::R::style::ThemeMultiLib);
-  ASSERT_NE(nullptr, bag);
-  ASSERT_EQ(bag->entry_count, 2u);
+  auto bag = assetmanager.GetBag(libclient::R::style::ThemeMultiLib);
+  ASSERT_TRUE(bag.has_value());
+  ASSERT_EQ((*bag)->entry_count, 2u);
 
   // First attribute comes from lib_two.
-  EXPECT_EQ(2, bag->entries[0].cookie);
-  EXPECT_EQ(0x02, get_package_id(bag->entries[0].key));
+  EXPECT_EQ(2, (*bag)->entries[0].cookie);
+  EXPECT_EQ(0x02, get_package_id((*bag)->entries[0].key));
 
   // The next two attributes come from lib_one.
-  EXPECT_EQ(2, bag->entries[1].cookie);
-  EXPECT_EQ(0x03, get_package_id(bag->entries[1].key));
+  EXPECT_EQ(2, (*bag)->entries[1].cookie);
+  EXPECT_EQ(0x03, get_package_id((*bag)->entries[1].key));
 }
 
 TEST_F(AssetManager2Test, FindsStyleResourceWithParentFromSharedLibrary) {
@@ -324,79 +298,79 @@
   assetmanager.SetApkAssets(
       {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()});
 
-  const ResolvedBag* bag = assetmanager.GetBag(libclient::R::style::Theme);
-  ASSERT_NE(nullptr, bag);
-  ASSERT_GE(bag->entry_count, 2u);
+  auto bag = assetmanager.GetBag(libclient::R::style::Theme);
+  ASSERT_TRUE(bag.has_value());
+  ASSERT_GE((*bag)->entry_count, 2u);
 
   // First two attributes come from lib_one.
-  EXPECT_EQ(1, bag->entries[0].cookie);
-  EXPECT_EQ(0x03, get_package_id(bag->entries[0].key));
-  EXPECT_EQ(1, bag->entries[1].cookie);
-  EXPECT_EQ(0x03, get_package_id(bag->entries[1].key));
+  EXPECT_EQ(1, (*bag)->entries[0].cookie);
+  EXPECT_EQ(0x03, get_package_id((*bag)->entries[0].key));
+  EXPECT_EQ(1, (*bag)->entries[1].cookie);
+  EXPECT_EQ(0x03, get_package_id((*bag)->entries[1].key));
 }
 
 TEST_F(AssetManager2Test, MergesStylesWithParentFromSingleApkAssets) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({style_assets_.get()});
 
-  const ResolvedBag* bag_one = assetmanager.GetBag(app::R::style::StyleOne);
-  ASSERT_NE(nullptr, bag_one);
-  ASSERT_EQ(2u, bag_one->entry_count);
+  auto bag_one = assetmanager.GetBag(app::R::style::StyleOne);
+  ASSERT_TRUE(bag_one.has_value());
+  ASSERT_EQ(2u, (*bag_one)->entry_count);
 
-  EXPECT_EQ(app::R::attr::attr_one, bag_one->entries[0].key);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, bag_one->entries[0].value.dataType);
-  EXPECT_EQ(1u, bag_one->entries[0].value.data);
-  EXPECT_EQ(0, bag_one->entries[0].cookie);
+  EXPECT_EQ(app::R::attr::attr_one, (*bag_one)->entries[0].key);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, (*bag_one)->entries[0].value.dataType);
+  EXPECT_EQ(1u, (*bag_one)->entries[0].value.data);
+  EXPECT_EQ(0, (*bag_one)->entries[0].cookie);
 
-  EXPECT_EQ(app::R::attr::attr_two, bag_one->entries[1].key);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, bag_one->entries[1].value.dataType);
-  EXPECT_EQ(2u, bag_one->entries[1].value.data);
-  EXPECT_EQ(0, bag_one->entries[1].cookie);
+  EXPECT_EQ(app::R::attr::attr_two, (*bag_one)->entries[1].key);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, (*bag_one)->entries[1].value.dataType);
+  EXPECT_EQ(2u, (*bag_one)->entries[1].value.data);
+  EXPECT_EQ(0, (*bag_one)->entries[1].cookie);
 
-  const ResolvedBag* bag_two = assetmanager.GetBag(app::R::style::StyleTwo);
-  ASSERT_NE(nullptr, bag_two);
-  ASSERT_EQ(6u, bag_two->entry_count);
+  auto bag_two = assetmanager.GetBag(app::R::style::StyleTwo);
+  ASSERT_TRUE(bag_two.has_value());
+  ASSERT_EQ(6u, (*bag_two)->entry_count);
 
   // attr_one is inherited from StyleOne.
-  EXPECT_EQ(app::R::attr::attr_one, bag_two->entries[0].key);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, bag_two->entries[0].value.dataType);
-  EXPECT_EQ(1u, bag_two->entries[0].value.data);
-  EXPECT_EQ(0, bag_two->entries[0].cookie);
-  EXPECT_EQ(app::R::style::StyleOne, bag_two->entries[0].style);
+  EXPECT_EQ(app::R::attr::attr_one, (*bag_two)->entries[0].key);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, (*bag_two)->entries[0].value.dataType);
+  EXPECT_EQ(1u, (*bag_two)->entries[0].value.data);
+  EXPECT_EQ(0, (*bag_two)->entries[0].cookie);
+  EXPECT_EQ(app::R::style::StyleOne, (*bag_two)->entries[0].style);
 
   // attr_two should be overridden from StyleOne by StyleTwo.
-  EXPECT_EQ(app::R::attr::attr_two, bag_two->entries[1].key);
-  EXPECT_EQ(Res_value::TYPE_STRING, bag_two->entries[1].value.dataType);
-  EXPECT_EQ(0, bag_two->entries[1].cookie);
-  EXPECT_EQ(app::R::style::StyleTwo, bag_two->entries[1].style);
+  EXPECT_EQ(app::R::attr::attr_two, (*bag_two)->entries[1].key);
+  EXPECT_EQ(Res_value::TYPE_STRING, (*bag_two)->entries[1].value.dataType);
+  EXPECT_EQ(0, (*bag_two)->entries[1].cookie);
+  EXPECT_EQ(app::R::style::StyleTwo, (*bag_two)->entries[1].style);
   EXPECT_EQ(std::string("string"), GetStringFromPool(assetmanager.GetStringPoolForCookie(0),
-                                                     bag_two->entries[1].value.data));
+                                                     (*bag_two)->entries[1].value.data));
 
   // The rest are new attributes.
 
-  EXPECT_EQ(app::R::attr::attr_three, bag_two->entries[2].key);
-  EXPECT_EQ(Res_value::TYPE_ATTRIBUTE, bag_two->entries[2].value.dataType);
-  EXPECT_EQ(app::R::attr::attr_indirect, bag_two->entries[2].value.data);
-  EXPECT_EQ(0, bag_two->entries[2].cookie);
-  EXPECT_EQ(app::R::style::StyleTwo, bag_two->entries[2].style);
+  EXPECT_EQ(app::R::attr::attr_three, (*bag_two)->entries[2].key);
+  EXPECT_EQ(Res_value::TYPE_ATTRIBUTE, (*bag_two)->entries[2].value.dataType);
+  EXPECT_EQ(app::R::attr::attr_indirect, (*bag_two)->entries[2].value.data);
+  EXPECT_EQ(0, (*bag_two)->entries[2].cookie);
+  EXPECT_EQ(app::R::style::StyleTwo, (*bag_two)->entries[2].style);
 
-  EXPECT_EQ(app::R::attr::attr_five, bag_two->entries[3].key);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, bag_two->entries[3].value.dataType);
-  EXPECT_EQ(app::R::string::string_one, bag_two->entries[3].value.data);
-  EXPECT_EQ(0, bag_two->entries[3].cookie);
-  EXPECT_EQ(app::R::style::StyleTwo, bag_two->entries[3].style);
+  EXPECT_EQ(app::R::attr::attr_five, (*bag_two)->entries[3].key);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, (*bag_two)->entries[3].value.dataType);
+  EXPECT_EQ(app::R::string::string_one, (*bag_two)->entries[3].value.data);
+  EXPECT_EQ(0, (*bag_two)->entries[3].cookie);
+  EXPECT_EQ(app::R::style::StyleTwo, (*bag_two)->entries[3].style);
 
-  EXPECT_EQ(app::R::attr::attr_indirect, bag_two->entries[4].key);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, bag_two->entries[4].value.dataType);
-  EXPECT_EQ(3u, bag_two->entries[4].value.data);
-  EXPECT_EQ(0, bag_two->entries[4].cookie);
-  EXPECT_EQ(app::R::style::StyleTwo, bag_two->entries[4].style);
+  EXPECT_EQ(app::R::attr::attr_indirect, (*bag_two)->entries[4].key);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, (*bag_two)->entries[4].value.dataType);
+  EXPECT_EQ(3u, (*bag_two)->entries[4].value.data);
+  EXPECT_EQ(0, (*bag_two)->entries[4].cookie);
+  EXPECT_EQ(app::R::style::StyleTwo, (*bag_two)->entries[4].style);
 
-  EXPECT_EQ(app::R::attr::attr_empty, bag_two->entries[5].key);
-  EXPECT_EQ(Res_value::TYPE_NULL, bag_two->entries[5].value.dataType);
-  EXPECT_EQ(Res_value::DATA_NULL_EMPTY, bag_two->entries[5].value.data);
-  EXPECT_EQ(0, bag_two->entries[5].cookie);
-  EXPECT_EQ(app::R::style::StyleTwo, bag_two->entries[5].style);
+  EXPECT_EQ(app::R::attr::attr_empty, (*bag_two)->entries[5].key);
+  EXPECT_EQ(Res_value::TYPE_NULL, (*bag_two)->entries[5].value.dataType);
+  EXPECT_EQ(Res_value::DATA_NULL_EMPTY, (*bag_two)->entries[5].value.data);
+  EXPECT_EQ(0, (*bag_two)->entries[5].cookie);
+  EXPECT_EQ(app::R::style::StyleTwo, (*bag_two)->entries[5].style);
 }
 
 TEST_F(AssetManager2Test, MergeStylesCircularDependency) {
@@ -405,55 +379,41 @@
 
   // GetBag should stop traversing the parents of styles when a circular
   // dependency is detected
-  const ResolvedBag* bag_one = assetmanager.GetBag(app::R::style::StyleFour);
-  ASSERT_NE(nullptr, bag_one);
-  ASSERT_EQ(3u, bag_one->entry_count);
+  auto bag = assetmanager.GetBag(app::R::style::StyleFour);
+  ASSERT_TRUE(bag.has_value());
+  ASSERT_EQ(3u, (*bag)->entry_count);
 }
 
 TEST_F(AssetManager2Test, ResolveReferenceToResource) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::integer::ref1, false /*may_be_bag*/,
-                               0u /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::integer::ref1);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(basic::R::integer::ref2, value->data);
 
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(basic::R::integer::ref2, value.data);
-
-  uint32_t last_ref = 0u;
-  cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(12000u, value.data);
-  EXPECT_EQ(basic::R::integer::ref2, last_ref);
+  auto result = assetmanager.ResolveReference(*value);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(12000u, value->data);
+  EXPECT_EQ(basic::R::integer::ref2, value->resid);
 }
 
 TEST_F(AssetManager2Test, ResolveReferenceToBag) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::integer::number2, true /*may_be_bag*/,
-                               0u /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::integer::number2, true /*may_be_bag*/);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(basic::R::array::integerArray1, value->data);
 
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(basic::R::array::integerArray1, value.data);
-
-  uint32_t last_ref = 0u;
-  cookie = assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_ref);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(basic::R::array::integerArray1, value.data);
-  EXPECT_EQ(basic::R::array::integerArray1, last_ref);
+  auto result = assetmanager.ResolveReference(*value);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(basic::R::array::integerArray1, value->data);
+  EXPECT_EQ(basic::R::array::integerArray1, value->resid);
 }
 
 TEST_F(AssetManager2Test, ResolveDeepIdReference) {
@@ -461,50 +421,107 @@
   assetmanager.SetApkAssets({basic_assets_.get()});
 
   // Set up the resource ids
-  const uint32_t high_ref = assetmanager
-      .GetResourceId("@id/high_ref", "values", "com.android.basic");
-  ASSERT_NE(high_ref, 0u);
-  const uint32_t middle_ref = assetmanager
-      .GetResourceId("@id/middle_ref", "values", "com.android.basic");
-  ASSERT_NE(middle_ref, 0u);
-  const uint32_t low_ref = assetmanager
-      .GetResourceId("@id/low_ref", "values", "com.android.basic");
-  ASSERT_NE(low_ref, 0u);
+  auto high_ref = assetmanager.GetResourceId("@id/high_ref", "values", "com.android.basic");
+  ASSERT_TRUE(high_ref.has_value());
+
+  auto middle_ref = assetmanager.GetResourceId("@id/middle_ref", "values", "com.android.basic");
+  ASSERT_TRUE(middle_ref.has_value());
+
+  auto low_ref = assetmanager.GetResourceId("@id/low_ref", "values", "com.android.basic");
+  ASSERT_TRUE(low_ref.has_value());
 
   // Retrieve the most shallow resource
-  Res_value value;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = assetmanager.GetResource(high_ref, false /*may_be_bag*/,
-                                                    0 /*density_override*/,
-                                                    &value, &config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(middle_ref, value.data);
+  auto value = assetmanager.GetResource(*high_ref);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(*middle_ref, value->data);;
 
   // Check that resolving the reference resolves to the deepest id
-  uint32_t last_ref = high_ref;
-  assetmanager.ResolveReference(cookie, &value, &config, &flags, &last_ref);
-  EXPECT_EQ(last_ref, low_ref);
+  auto result = assetmanager.ResolveReference(*value);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(*low_ref, value->resid);
 }
 
 TEST_F(AssetManager2Test, KeepLastReferenceIdUnmodifiedIfNoReferenceIsResolved) {
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  ResTable_config selected_config;
-  memset(&selected_config, 0, sizeof(selected_config));
+  // Create some kind of value that is NOT a reference.
+  AssetManager2::SelectedValue value{};
+  value.cookie = 1;
+  value.type = Res_value::TYPE_STRING;
+  value.resid = basic::R::string::test1;
 
-  uint32_t flags = 0u;
+  auto result = assetmanager.ResolveReference(value);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(1, value.cookie);
+  EXPECT_EQ(basic::R::string::test1, value.resid);
+}
 
-  // Create some kind of Res_value that is NOT a reference.
-  Res_value value;
-  value.dataType = Res_value::TYPE_STRING;
-  value.data = 0;
+TEST_F(AssetManager2Test, ResolveReferenceMissingResourceDoNotCacheFlags) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({basic_assets_.get()});
+  {
+    AssetManager2::SelectedValue value{};
+    value.data = basic::R::string::test1;
+    value.type = Res_value::TYPE_REFERENCE;
+    value.flags = ResTable_config::CONFIG_KEYBOARD;
 
-  uint32_t last_ref = basic::R::string::test1;
-  EXPECT_EQ(1, assetmanager.ResolveReference(1, &value, &selected_config, &flags, &last_ref));
-  EXPECT_EQ(basic::R::string::test1, last_ref);
+    auto result = assetmanager.ResolveReference(value);
+    ASSERT_TRUE(result.has_value());
+    EXPECT_EQ(Res_value::TYPE_STRING, value.type);
+    EXPECT_EQ(0, value.cookie);
+    EXPECT_EQ(basic::R::string::test1, value.resid);
+    EXPECT_EQ(ResTable_typeSpec::SPEC_PUBLIC | ResTable_config::CONFIG_KEYBOARD, value.flags);
+  }
+  {
+    AssetManager2::SelectedValue value{};
+    value.data = basic::R::string::test1;
+    value.type = Res_value::TYPE_REFERENCE;
+    value.flags = ResTable_config::CONFIG_COLOR_MODE;
+
+    auto result = assetmanager.ResolveReference(value);
+    ASSERT_TRUE(result.has_value());
+    EXPECT_EQ(Res_value::TYPE_STRING, value.type);
+    EXPECT_EQ(0, value.cookie);
+    EXPECT_EQ(basic::R::string::test1, value.resid);
+    EXPECT_EQ(ResTable_typeSpec::SPEC_PUBLIC | ResTable_config::CONFIG_COLOR_MODE, value.flags);
+  }
+}
+
+TEST_F(AssetManager2Test, ResolveReferenceMissingResource) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({basic_assets_.get()});
+
+  const uint32_t kMissingResId = 0x8001ffff;
+  AssetManager2::SelectedValue value{};
+  value.type = Res_value::TYPE_REFERENCE;
+  value.data = kMissingResId;
+
+  auto result = assetmanager.ResolveReference(value);
+  ASSERT_FALSE(result.has_value());
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.type);
+  EXPECT_EQ(kMissingResId, value.data);
+  EXPECT_EQ(kMissingResId, value.resid);
+  EXPECT_EQ(-1, value.cookie);
+  EXPECT_EQ(0, value.flags);
+}
+
+TEST_F(AssetManager2Test, ResolveReferenceMissingResourceLib) {
+  AssetManager2 assetmanager;
+  assetmanager.SetApkAssets({libclient_assets_.get()});
+
+  AssetManager2::SelectedValue value{};
+  value.type = Res_value::TYPE_REFERENCE;
+  value.data = libclient::R::string::foo_one;
+
+  auto result = assetmanager.ResolveReference(value);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(Res_value::TYPE_DYNAMIC_REFERENCE, value.type);
+  EXPECT_EQ(lib_one::R::string::foo, value.data);
+  EXPECT_EQ(libclient::R::string::foo_one, value.resid);
+  EXPECT_EQ(0, value.cookie);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value.flags);
 }
 
 static bool IsConfigurationPresent(const std::set<ResTable_config>& configurations,
@@ -516,43 +533,45 @@
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({system_assets_.get(), basic_de_fr_assets_.get()});
 
-  std::set<ResTable_config> configurations = assetmanager.GetResourceConfigurations();
+  auto configurations = assetmanager.GetResourceConfigurations();
+  ASSERT_TRUE(configurations.has_value());
 
   // We expect the locale sv from the system assets, and de and fr from basic_de_fr assets.
   // And one extra for the default configuration.
-  EXPECT_EQ(4u, configurations.size());
+  EXPECT_EQ(4u, configurations->size());
 
   ResTable_config expected_config;
   memset(&expected_config, 0, sizeof(expected_config));
   expected_config.language[0] = 's';
   expected_config.language[1] = 'v';
-  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_TRUE(IsConfigurationPresent(*configurations, expected_config));
 
   expected_config.language[0] = 'd';
   expected_config.language[1] = 'e';
-  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_TRUE(IsConfigurationPresent(*configurations, expected_config));
 
   expected_config.language[0] = 'f';
   expected_config.language[1] = 'r';
-  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_TRUE(IsConfigurationPresent(*configurations, expected_config));
 
   // Take out the system assets.
   configurations = assetmanager.GetResourceConfigurations(true /* exclude_system */);
+  ASSERT_TRUE(configurations.has_value());
 
   // We expect de and fr from basic_de_fr assets.
-  EXPECT_EQ(2u, configurations.size());
+  EXPECT_EQ(2u, configurations->size());
 
   expected_config.language[0] = 's';
   expected_config.language[1] = 'v';
-  EXPECT_FALSE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_FALSE(IsConfigurationPresent(*configurations, expected_config));
 
   expected_config.language[0] = 'd';
   expected_config.language[1] = 'e';
-  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_TRUE(IsConfigurationPresent(*configurations, expected_config));
 
   expected_config.language[0] = 'f';
   expected_config.language[1] = 'r';
-  EXPECT_TRUE(IsConfigurationPresent(configurations, expected_config));
+  EXPECT_TRUE(IsConfigurationPresent(*configurations, expected_config));
 }
 
 TEST_F(AssetManager2Test, GetResourceLocales) {
@@ -578,12 +597,17 @@
   AssetManager2 assetmanager;
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  EXPECT_EQ(basic::R::layout::main,
-            assetmanager.GetResourceId("com.android.basic:layout/main", "", ""));
-  EXPECT_EQ(basic::R::layout::main,
-            assetmanager.GetResourceId("layout/main", "", "com.android.basic"));
-  EXPECT_EQ(basic::R::layout::main,
-            assetmanager.GetResourceId("main", "layout", "com.android.basic"));
+  auto resid = assetmanager.GetResourceId("com.android.basic:layout/main", "", "");
+  ASSERT_TRUE(resid.has_value());
+  EXPECT_EQ(basic::R::layout::main, *resid);
+
+  resid = assetmanager.GetResourceId("layout/main", "", "com.android.basic");
+  ASSERT_TRUE(resid.has_value());
+  EXPECT_EQ(basic::R::layout::main, *resid);
+
+  resid = assetmanager.GetResourceId("main", "layout", "com.android.basic");
+  ASSERT_TRUE(resid.has_value());
+  EXPECT_EQ(basic::R::layout::main, *resid);
 }
 
 TEST_F(AssetManager2Test, OpensFileFromSingleApkAssets) {
@@ -658,14 +682,8 @@
   assetmanager.SetApkAssets({basic_assets_.get()});
   assetmanager.SetResourceResolutionLoggingEnabled(false);
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   auto result = assetmanager.GetLastResourceResolution();
   EXPECT_EQ("", result);
@@ -693,17 +711,12 @@
   assetmanager.SetConfiguration(desired_config);
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   auto result = assetmanager.GetLastResourceResolution();
-  EXPECT_EQ("Resolution for 0x7f030000 com.android.basic:string/test1\n\tFor config -de\n\tFound initial: com.android.basic", result);
+  EXPECT_EQ("Resolution for 0x7f030000 com.android.basic:string/test1\n"
+            "\tFor config -de\n\tFound initial: com.android.basic", result);
 }
 
 TEST_F(AssetManager2Test, GetLastPathWithMultipleApkAssets) {
@@ -717,17 +730,14 @@
   assetmanager.SetConfiguration(desired_config);
   assetmanager.SetApkAssets({basic_assets_.get(), basic_de_fr_assets_.get()});
 
-  Res_value value = Res_value();
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   auto result = assetmanager.GetLastResourceResolution();
-  EXPECT_EQ("Resolution for 0x7f030000 com.android.basic:string/test1\n\tFor config -de\n\tFound initial: com.android.basic\n\tFound better: com.android.basic -de", result);
+  EXPECT_EQ("Resolution for 0x7f030000 com.android.basic:string/test1\n"
+            "\tFor config -de\n"
+            "\tFound initial: com.android.basic\n"
+            "\tFound better: com.android.basic -de", result);
 }
 
 TEST_F(AssetManager2Test, GetLastPathAfterDisablingReturnsEmpty) {
@@ -739,14 +749,8 @@
   assetmanager.SetConfiguration(desired_config);
   assetmanager.SetApkAssets({basic_assets_.get()});
 
-  Res_value value = Res_value();
-  ResTable_config selected_config;
-  uint32_t flags;
-
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::string::test1, false /*may_be_bag*/,
-                               0 /*density_override*/, &value, &selected_config, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
+  auto value = assetmanager.GetResource(basic::R::string::test1);
+  ASSERT_TRUE(value.has_value());
 
   auto resultEnabled = assetmanager.GetLastResourceResolution();
   ASSERT_NE("", resultEnabled);
diff --git a/libs/androidfw/tests/AttributeResolution_bench.cpp b/libs/androidfw/tests/AttributeResolution_bench.cpp
index fa300c5..ddd8ab8 100644
--- a/libs/androidfw/tests/AttributeResolution_bench.cpp
+++ b/libs/androidfw/tests/AttributeResolution_bench.cpp
@@ -108,27 +108,20 @@
   device_config.screenHeightDp = 1024;
   device_config.sdkVersion = 27;
 
-  Res_value value;
-  ResTable_config config;
-  uint32_t flags = 0u;
-  ApkAssetsCookie cookie =
-      assetmanager.GetResource(basic::R::layout::layoutt, false /*may_be_bag*/,
-                               0u /*density_override*/, &value, &config, &flags);
-  if (cookie == kInvalidCookie) {
+  auto value = assetmanager.GetResource(basic::R::layout::layoutt);
+  if (!value.has_value()) {
     state.SkipWithError("failed to find R.layout.layout");
     return;
   }
 
-  size_t len = 0u;
-  const char* layout_path =
-      assetmanager.GetStringPoolForCookie(cookie)->string8At(value.data, &len);
-  if (layout_path == nullptr || len == 0u) {
+  auto layout_path = assetmanager.GetStringPoolForCookie(value->cookie)->string8At(value->data);
+  if (!layout_path.has_value()) {
     state.SkipWithError("failed to lookup layout path");
     return;
   }
 
-  std::unique_ptr<Asset> asset = assetmanager.OpenNonAsset(
-      StringPiece(layout_path, len).to_string(), cookie, Asset::ACCESS_BUFFER);
+  std::unique_ptr<Asset> asset = assetmanager.OpenNonAsset(layout_path->to_string(), value->cookie,
+                                                           Asset::ACCESS_BUFFER);
   if (asset == nullptr) {
     state.SkipWithError("failed to load layout");
     return;
diff --git a/libs/androidfw/tests/AttributeResolution_test.cpp b/libs/androidfw/tests/AttributeResolution_test.cpp
index 24361b5..bb9129a 100644
--- a/libs/androidfw/tests/AttributeResolution_test.cpp
+++ b/libs/androidfw/tests/AttributeResolution_test.cpp
@@ -77,9 +77,9 @@
       {fix_package_id(R::attr::attr_one, 0x02), fix_package_id(R::attr::attr_two, 0x02)}};
   std::array<uint32_t, attrs.size() * STYLE_NUM_ENTRIES> values;
   std::array<uint32_t, attrs.size() + 1> indices;
-  ApplyStyle(theme.get(), nullptr /*xml_parser*/, 0u /*def_style_attr*/,
-             fix_package_id(R::style::StyleOne, 0x02), attrs.data(), attrs.size(), values.data(),
-             indices.data());
+  ASSERT_TRUE(ApplyStyle(theme.get(), nullptr /*xml_parser*/, 0u /*def_style_attr*/,
+                         fix_package_id(R::style::StyleOne, 0x02), attrs.data(), attrs.size(),
+                         values.data(), indices.data()).has_value());
 
   const uint32_t public_flag = ResTable_typeSpec::SPEC_PUBLIC;
 
@@ -102,7 +102,7 @@
 
 TEST_F(AttributeResolutionTest, Theme) {
   std::unique_ptr<Theme> theme = assetmanager_.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(R::style::StyleTwo));
+  ASSERT_TRUE(theme->ApplyStyle(R::style::StyleTwo).has_value());
 
   std::array<uint32_t, 5> attrs{{R::attr::attr_one, R::attr::attr_two, R::attr::attr_three,
                                  R::attr::attr_four, R::attr::attr_empty}};
@@ -110,7 +110,7 @@
 
   ASSERT_TRUE(ResolveAttrs(theme.get(), 0u /*def_style_attr*/, 0u /*def_style_res*/,
                            nullptr /*src_values*/, 0 /*src_values_length*/, attrs.data(),
-                           attrs.size(), values.data(), nullptr /*out_indices*/));
+                           attrs.size(), values.data(), nullptr /*out_indices*/).has_value());
 
   const uint32_t public_flag = ResTable_typeSpec::SPEC_PUBLIC;
 
@@ -162,7 +162,7 @@
   std::array<uint32_t, attrs.size() * STYLE_NUM_ENTRIES> values;
 
   ASSERT_TRUE(RetrieveAttributes(&assetmanager_, &xml_parser_, attrs.data(), attrs.size(),
-                                 values.data(), nullptr /*out_indices*/));
+                                 values.data(), nullptr /*out_indices*/).has_value());
 
   uint32_t* values_cursor = values.data();
   EXPECT_EQ(Res_value::TYPE_NULL, values_cursor[STYLE_TYPE]);
@@ -207,15 +207,15 @@
 
 TEST_F(AttributeResolutionXmlTest, ThemeAndXmlParser) {
   std::unique_ptr<Theme> theme = assetmanager_.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(R::style::StyleTwo));
+  ASSERT_TRUE(theme->ApplyStyle(R::style::StyleTwo).has_value());
 
   std::array<uint32_t, 6> attrs{{R::attr::attr_one, R::attr::attr_two, R::attr::attr_three,
                                  R::attr::attr_four, R::attr::attr_five, R::attr::attr_empty}};
   std::array<uint32_t, attrs.size() * STYLE_NUM_ENTRIES> values;
   std::array<uint32_t, attrs.size() + 1> indices;
 
-  ApplyStyle(theme.get(), &xml_parser_, 0u /*def_style_attr*/, 0u /*def_style_res*/, attrs.data(),
-             attrs.size(), values.data(), indices.data());
+  ASSERT_TRUE(ApplyStyle(theme.get(), &xml_parser_, 0u /*def_style_attr*/, 0u /*def_style_res*/,
+                         attrs.data(), attrs.size(), values.data(), indices.data()).has_value());
 
   const uint32_t public_flag = ResTable_typeSpec::SPEC_PUBLIC;
 
diff --git a/libs/androidfw/tests/BenchmarkHelpers.cpp b/libs/androidfw/tests/BenchmarkHelpers.cpp
index faddfe5..0fa0573 100644
--- a/libs/androidfw/tests/BenchmarkHelpers.cpp
+++ b/libs/androidfw/tests/BenchmarkHelpers.cpp
@@ -71,15 +71,9 @@
     assetmanager.SetConfiguration(*config);
   }
 
-  Res_value value;
-  ResTable_config selected_config;
-  uint32_t flags;
-  uint32_t last_id = 0u;
-
   while (state.KeepRunning()) {
-    ApkAssetsCookie cookie = assetmanager.GetResource(
-        resid, false /* may_be_bag */, 0u /* density_override */, &value, &selected_config, &flags);
-    assetmanager.ResolveReference(cookie, &value, &selected_config, &flags, &last_id);
+    auto value = assetmanager.GetResource(resid);
+    assetmanager.ResolveReference(*value);
   }
 }
 
diff --git a/libs/androidfw/tests/CommonHelpers.cpp b/libs/androidfw/tests/CommonHelpers.cpp
index faa5350..3396729 100644
--- a/libs/androidfw/tests/CommonHelpers.cpp
+++ b/libs/androidfw/tests/CommonHelpers.cpp
@@ -58,8 +58,9 @@
 }
 
 std::string GetStringFromPool(const ResStringPool* pool, uint32_t idx) {
-  String8 str = pool->string8ObjectAt(idx);
-  return std::string(str.string(), str.length());
+  auto str = pool->string8ObjectAt(idx);
+  CHECK(str.has_value()) << "failed to find string entry";
+  return std::string(str->string(), str->length());
 }
 
 }  // namespace android
diff --git a/libs/androidfw/tests/Idmap_test.cpp b/libs/androidfw/tests/Idmap_test.cpp
index 7aa0dbb..3f0c7cb 100644
--- a/libs/androidfw/tests/Idmap_test.cpp
+++ b/libs/androidfw/tests/Idmap_test.cpp
@@ -62,10 +62,10 @@
   std::unique_ptr<const ApkAssets> overlayable_assets_;
 };
 
-std::string GetStringFromApkAssets(const AssetManager2& asset_manager, const Res_value& value,
-                                   ApkAssetsCookie cookie) {
+std::string GetStringFromApkAssets(const AssetManager2& asset_manager,
+                                   const AssetManager2::SelectedValue& value) {
   auto assets = asset_manager.GetApkAssets();
-  const ResStringPool* string_pool = assets[cookie]->GetLoadedArsc()->GetStringPool();
+  const ResStringPool* string_pool = assets[value.cookie]->GetLoadedArsc()->GetStringPool();
   return GetStringFromPool(string_pool, value.data);
 }
 
@@ -75,117 +75,88 @@
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable5,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_STRING);
-  ASSERT_EQ(GetStringFromApkAssets(asset_manager, val, cookie), "Overlay One");
+
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable5);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_STRING);
+  ASSERT_EQ("Overlay One", GetStringFromApkAssets(asset_manager, *value));
 }
 
 TEST_F(IdmapTest, OverlayOverridesResourceValueUsingDifferentPackage) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable10,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  ASSERT_EQ(cookie, 0U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_STRING);
-  ASSERT_EQ(GetStringFromApkAssets(asset_manager, val, cookie), "yes");
+
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable10);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 0U);
+  ASSERT_EQ(value->type, Res_value::TYPE_STRING);
+  ASSERT_EQ("yes", GetStringFromApkAssets(asset_manager, *value));
 }
 
 TEST_F(IdmapTest, OverlayOverridesResourceValueUsingInternalResource) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable8,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_REFERENCE);
-  ASSERT_EQ(val.data, (overlay::R::string::internal & 0x00ffffff) | (0x02 << 24));
+
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable8);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_REFERENCE);
+  ASSERT_EQ(value->data, (overlay::R::string::internal & 0x00ffffffU) | (0x02U << 24));
 }
 
 TEST_F(IdmapTest, OverlayOverridesResourceValueUsingInlineInteger) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::integer::config_integer,
-                                                  false /* may_be_bag */,
-                                                  0 /* density_override */, &val, &config,
-                                                  &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_INT_DEC);
-  ASSERT_EQ(val.data, 42);
+
+  auto value = asset_manager.GetResource(overlayable::R::integer::config_integer);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_INT_DEC);
+  ASSERT_EQ(value->data, 42);
 }
 
 TEST_F(IdmapTest, OverlayOverridesResourceValueUsingInlineString) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
 
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable11,
-                                                  false /* may_be_bag */,
-                                                  0 /* density_override */, &val, &config,
-                                                  &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_STRING);
-  ASSERT_EQ(GetStringFromApkAssets(asset_manager, val, cookie), "Hardcoded string");
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable11);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_STRING);
+  ASSERT_EQ("Hardcoded string", GetStringFromApkAssets(asset_manager, *value));
 }
 
 TEST_F(IdmapTest, OverlayOverridesResourceValueUsingOverlayingResource) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable9,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_REFERENCE);
-  ASSERT_EQ(val.data, overlayable::R::string::overlayable7);
+
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable9);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_REFERENCE);
+  ASSERT_EQ(value->data, overlayable::R::string::overlayable7);
 }
 
 TEST_F(IdmapTest, OverlayOverridesXmlParser) {
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::layout::hello_view,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  ASSERT_EQ(cookie, 2U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_STRING);
-  ASSERT_EQ(GetStringFromApkAssets(asset_manager, val, cookie), "res/layout/hello_view.xml");
 
-  auto asset = asset_manager.OpenNonAsset("res/layout/hello_view.xml", cookie,
+  auto value = asset_manager.GetResource(overlayable::R::layout::hello_view);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(value->cookie, 2U);
+  ASSERT_EQ(value->type, Res_value::TYPE_STRING);
+  ASSERT_EQ("res/layout/hello_view.xml", GetStringFromApkAssets(asset_manager, *value));
+
+  auto asset = asset_manager.OpenNonAsset("res/layout/hello_view.xml", value->cookie,
                                           Asset::ACCESS_RANDOM);
-  auto dynamic_ref_table = asset_manager.GetDynamicRefTableForCookie(cookie);
+  auto dynamic_ref_table = asset_manager.GetDynamicRefTableForCookie(value->cookie);
   auto xml_tree = util::make_unique<ResXMLTree>(std::move(dynamic_ref_table));
   status_t err = xml_tree->setTo(asset->getBuffer(true), asset->getLength(), false);
   ASSERT_EQ(err, NO_ERROR);
@@ -216,32 +187,24 @@
   asset_manager.SetApkAssets({system_assets_.get(), overlayable_assets_.get(),
                               overlay_assets_.get()});
 
-  AssetManager2::ResourceName name;
-  ASSERT_TRUE(asset_manager.GetResourceName(overlayable::R::string::overlayable9, &name));
-  ASSERT_EQ(std::string(name.package), "com.android.overlayable");
-  ASSERT_EQ(String16(name.type16), u"string");
-  ASSERT_EQ(std::string(name.entry), "overlayable9");
+  auto name = asset_manager.GetResourceName(overlayable::R::string::overlayable9);
+  ASSERT_TRUE(name.has_value());
+  ASSERT_EQ("com.android.overlayable", std::string(name->package));
+  ASSERT_EQ(std::u16string(u"string"), std::u16string(name->type16));
+  ASSERT_EQ("overlayable9", std::string(name->entry));
 }
 
 TEST_F(IdmapTest, OverlayLoaderInterop) {
-  std::string contents;
   auto loader_assets = ApkAssets::LoadTable("loader/resources.arsc", PROPERTY_LOADER);
-
   AssetManager2 asset_manager;
   asset_manager.SetApkAssets({overlayable_assets_.get(), loader_assets.get(),
                               overlay_assets_.get()});
 
-  Res_value val;
-  ResTable_config config;
-  uint32_t flags;
-  ApkAssetsCookie cookie = asset_manager.GetResource(overlayable::R::string::overlayable11,
-                                                    false /* may_be_bag */,
-                                                    0 /* density_override */, &val, &config,
-                                                    &flags);
-  std::cout << asset_manager.GetLastResourceResolution();
-  ASSERT_EQ(cookie, 1U);
-  ASSERT_EQ(val.dataType, Res_value::TYPE_STRING);
-  ASSERT_EQ(GetStringFromApkAssets(asset_manager, val, cookie), "loader");
+  auto value = asset_manager.GetResource(overlayable::R::string::overlayable11);
+  ASSERT_TRUE(value.has_value());
+  ASSERT_EQ(1U, value->cookie);
+  ASSERT_EQ(Res_value::TYPE_STRING, value->type);
+  ASSERT_EQ("loader", GetStringFromApkAssets(asset_manager, *value));
 }
 
 TEST_F(IdmapTest, OverlayAssetsIsUpToDate) {
diff --git a/libs/androidfw/tests/LoadedArsc_test.cpp b/libs/androidfw/tests/LoadedArsc_test.cpp
index 2d69dfe..6357411 100644
--- a/libs/androidfw/tests/LoadedArsc_test.cpp
+++ b/libs/androidfw/tests/LoadedArsc_test.cpp
@@ -50,7 +50,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/styles/styles.apk", "resources.arsc",
                                       &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  auto loaded_arsc = LoadedArsc::Load(reinterpret_cast<const void*>(contents.data()),
+                                                                    contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const LoadedPackage* package =
@@ -66,9 +67,8 @@
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
 
-  const ResTable_type* type = type_spec->types[0];
-  ASSERT_THAT(type, NotNull());
-  ASSERT_THAT(LoadedPackage::GetEntry(type, entry_index), NotNull());
+  auto type = type_spec->types[0];
+  ASSERT_TRUE(LoadedPackage::GetEntry(type, entry_index).has_value());
 }
 
 TEST(LoadedArscTest, LoadSparseEntryApp) {
@@ -76,7 +76,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/sparse/sparse.apk", "resources.arsc",
                                       &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const LoadedPackage* package =
@@ -90,9 +91,8 @@
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
 
-  const ResTable_type* type = type_spec->types[0];
-  ASSERT_THAT(type, NotNull());
-  ASSERT_THAT(LoadedPackage::GetEntry(type, entry_index), NotNull());
+  auto type = type_spec->types[0];
+  ASSERT_TRUE(LoadedPackage::GetEntry(type, entry_index).has_value());
 }
 
 TEST(LoadedArscTest, LoadSharedLibrary) {
@@ -100,7 +100,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/lib_one/lib_one.apk", "resources.arsc",
                                       &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -120,7 +121,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/libclient/libclient.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -145,8 +147,10 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/appaslib/appaslib.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc =
-      LoadedArsc::Load(StringPiece(contents), nullptr /* loaded_idmap */, PROPERTY_DYNAMIC);
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length(),
+                                                                   nullptr /* loaded_idmap */,
+                                                                   PROPERTY_DYNAMIC);
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const auto& packages = loaded_arsc->GetPackages();
@@ -159,7 +163,8 @@
   std::string contents;
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/feature/feature.apk", "resources.arsc",
                                       &contents));
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const LoadedPackage* package =
@@ -172,15 +177,12 @@
   const TypeSpec* type_spec = package->GetTypeSpecByTypeIndex(type_index);
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
-  ASSERT_THAT(type_spec->types[0], NotNull());
 
-  size_t len;
-  const char16_t* type_name16 =
-      package->GetTypeStringPool()->stringAt(type_spec->type_spec->id - 1, &len);
-  ASSERT_THAT(type_name16, NotNull());
-  EXPECT_THAT(util::Utf16ToUtf8(StringPiece16(type_name16, len)), StrEq("string"));
+  auto type_name16 = package->GetTypeStringPool()->stringAt(type_spec->type_spec->id - 1);
+  ASSERT_TRUE(type_name16.has_value());
+  EXPECT_THAT(util::Utf16ToUtf8(*type_name16), StrEq("string"));
 
-  ASSERT_THAT(LoadedPackage::GetEntry(type_spec->types[0], entry_index), NotNull());
+  ASSERT_TRUE(LoadedPackage::GetEntry(type_spec->types[0], entry_index).has_value());
 }
 
 // AAPT(2) generates resource tables with chunks in a certain order. The rule is that
@@ -205,7 +207,8 @@
       ReadFileFromZipToString(GetTestDataPath() + "/out_of_order_types/out_of_order_types.apk",
                               "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_THAT(loaded_arsc, NotNull());
 
   ASSERT_THAT(loaded_arsc->GetPackages(), SizeIs(1u));
@@ -215,12 +218,10 @@
   const TypeSpec* type_spec = package->GetTypeSpecByTypeIndex(0);
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
-  ASSERT_THAT(type_spec->types[0], NotNull());
 
   type_spec = package->GetTypeSpecByTypeIndex(1);
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
-  ASSERT_THAT(type_spec->types[0], NotNull());
 }
 
 TEST(LoadedArscTest, LoadOverlayable) {
@@ -228,7 +229,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/overlayable/overlayable.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
 
   ASSERT_THAT(loaded_arsc, NotNull());
   const LoadedPackage* package = loaded_arsc->GetPackageById(
@@ -272,7 +274,8 @@
   ASSERT_TRUE(
       ReadFileFromZipToString(GetTestDataPath() + "/basic/basic.apk", "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_NE(nullptr, loaded_arsc);
 
   const std::vector<std::unique_ptr<const LoadedPackage>>& packages = loaded_arsc->GetPackages();
@@ -320,7 +323,8 @@
   ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/overlayable/overlayable.apk",
                                       "resources.arsc", &contents));
 
-  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(StringPiece(contents));
+  std::unique_ptr<const LoadedArsc> loaded_arsc = LoadedArsc::Load(contents.data(),
+                                                                   contents.length());
   ASSERT_NE(nullptr, loaded_arsc);
 
   const std::vector<std::unique_ptr<const LoadedPackage>>& packages = loaded_arsc->GetPackages();
@@ -345,7 +349,7 @@
       asset->getLength());
 
   std::unique_ptr<const LoadedArsc> loaded_arsc =
-      LoadedArsc::Load(data, nullptr, PROPERTY_LOADER);
+      LoadedArsc::Load(data.data(), data.length(), nullptr, PROPERTY_LOADER);
   ASSERT_THAT(loaded_arsc, NotNull());
 
   const LoadedPackage* package =
@@ -361,9 +365,8 @@
   ASSERT_THAT(type_spec, NotNull());
   ASSERT_THAT(type_spec->type_count, Ge(1u));
 
-  const ResTable_type* type = type_spec->types[0];
-  ASSERT_THAT(type, NotNull());
-  ASSERT_THAT(LoadedPackage::GetEntry(type, entry_index), NotNull());
+  auto type = type_spec->types[0];
+  ASSERT_TRUE(LoadedPackage::GetEntry(type, entry_index).has_value());
 }
 
 // structs with size fields (like Res_value, ResTable_entry) should be
diff --git a/libs/androidfw/tests/ResTable_test.cpp b/libs/androidfw/tests/ResTable_test.cpp
index 326474e..9aeb00c 100644
--- a/libs/androidfw/tests/ResTable_test.cpp
+++ b/libs/androidfw/tests/ResTable_test.cpp
@@ -442,22 +442,22 @@
   ASSERT_LT(val.data, pool->size());
 
   // Make sure a string with a truncated length is read to its correct length
-  size_t str_len;
-  const char* target_str8 = pool->string8At(val.data, &str_len);
-  ASSERT_TRUE(target_str8 != NULL);
-  ASSERT_EQ(size_t(40076), String8(target_str8, str_len).size());
-  ASSERT_EQ(target_str8[40075], ']');
+  auto target_str8 = pool->string8At(val.data);
+  ASSERT_TRUE(target_str8.has_value());
+  ASSERT_EQ(size_t(40076), String8(target_str8->data(), target_str8->size()).size());
+  ASSERT_EQ(target_str8->data()[40075], ']');
 
-  const char16_t* target_str16 = pool->stringAt(val.data, &str_len);
-  ASSERT_TRUE(target_str16 != NULL);
-  ASSERT_EQ(size_t(40076), String16(target_str16, str_len).size());
-  ASSERT_EQ(target_str8[40075], (char16_t) ']');
+  auto target_str16 = pool->stringAt(val.data);
+  ASSERT_TRUE(target_str16.has_value());
+  ASSERT_EQ(size_t(40076), String16(target_str16->data(), target_str16->size()).size());
+  ASSERT_EQ(target_str8->data()[40075], (char16_t) ']');
 
   // Load an edited apk with the null terminator removed from the end of the
   // string
   std::string invalid_contents;
-  ASSERT_TRUE(ReadFileFromZipToString(GetTestDataPath() + "/length_decode/length_decode_invalid.apk",
-                                      "resources.arsc", &invalid_contents));
+  ASSERT_TRUE(ReadFileFromZipToString(
+      GetTestDataPath() + "/length_decode/length_decode_invalid.apk", "resources.arsc",
+      &invalid_contents));
   ResTable invalid_table;
   ASSERT_EQ(NO_ERROR, invalid_table.add(invalid_contents.data(), invalid_contents.size()));
 
@@ -472,8 +472,8 @@
 
   // Make sure a string with a truncated length that is not null terminated errors
   // and does not return the string
-  ASSERT_TRUE(invalid_pool->string8At(invalid_val.data, &str_len) == NULL);
-  ASSERT_TRUE(invalid_pool->stringAt(invalid_val.data, &str_len) == NULL);
+  ASSERT_FALSE(invalid_pool->string8At(invalid_val.data).has_value());
+  ASSERT_FALSE(invalid_pool->stringAt(invalid_val.data).has_value());
 }
 
 }  // namespace android
diff --git a/libs/androidfw/tests/TestHelpers.cpp b/libs/androidfw/tests/TestHelpers.cpp
index a81bb6f..10c0a4f 100644
--- a/libs/androidfw/tests/TestHelpers.cpp
+++ b/libs/androidfw/tests/TestHelpers.cpp
@@ -73,11 +73,15 @@
     return AssertionFailure() << "table has no string pool for block " << block;
   }
 
-  const String8 actual_str = pool->string8ObjectAt(val.data);
-  if (String8(expected_str) != actual_str) {
-    return AssertionFailure() << actual_str.string();
+  auto actual_str = pool->string8ObjectAt(val.data);
+  if (!actual_str.has_value()) {
+    return AssertionFailure() << "could not find string entry";
   }
-  return AssertionSuccess() << actual_str.string();
+
+  if (String8(expected_str) != *actual_str) {
+    return AssertionFailure() << actual_str->string();
+  }
+  return AssertionSuccess() << actual_str->string();
 }
 
 }  // namespace android
diff --git a/libs/androidfw/tests/Theme_bench.cpp b/libs/androidfw/tests/Theme_bench.cpp
index 594c39e..f3d60bb 100644
--- a/libs/androidfw/tests/Theme_bench.cpp
+++ b/libs/androidfw/tests/Theme_bench.cpp
@@ -70,11 +70,8 @@
   auto theme = assets.NewTheme();
   theme->ApplyStyle(kStyleId, false /* force */);
 
-  Res_value value;
-  uint32_t flags;
-
   while (state.KeepRunning()) {
-    theme->GetAttribute(kAttrId, &value, &flags);
+    theme->GetAttribute(kAttrId);
   }
 }
 BENCHMARK(BM_ThemeGetAttribute);
diff --git a/libs/androidfw/tests/Theme_test.cpp b/libs/androidfw/tests/Theme_test.cpp
index 16b9c75..f658735 100644
--- a/libs/androidfw/tests/Theme_test.cpp
+++ b/libs/androidfw/tests/Theme_test.cpp
@@ -67,10 +67,7 @@
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
   EXPECT_EQ(0u, theme->GetChangingConfigurations());
   EXPECT_EQ(&assetmanager, theme->GetAssetManager());
-
-  Res_value value;
-  uint32_t flags;
-  EXPECT_EQ(kInvalidCookie, theme->GetAttribute(app::R::attr::attr_one, &value, &flags));
+  EXPECT_FALSE(theme->GetAttribute(app::R::attr::attr_one).has_value());
 }
 
 TEST_F(ThemeTest, SingleThemeNoParent) {
@@ -78,23 +75,19 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne));
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne).has_value());
 
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  auto value = theme->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(1u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
-  cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(1u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
-
-  cookie = theme->GetAttribute(app::R::attr::attr_two, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(2u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_two);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(2u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 }
 
 TEST_F(ThemeTest, SingleThemeWithParent) {
@@ -102,32 +95,28 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo));
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value());
 
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  auto value = theme->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(1u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
-  cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(1u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
-
-  cookie = theme->GetAttribute(app::R::attr::attr_two, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_STRING, value.dataType);
-  EXPECT_EQ(0, cookie);
+  value = theme->GetAttribute(app::R::attr::attr_two);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_STRING, value->type);
+  EXPECT_EQ(0, value->cookie);
   EXPECT_EQ(std::string("string"),
-            GetStringFromPool(assetmanager.GetStringPoolForCookie(0), value.data));
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+            GetStringFromPool(assetmanager.GetStringPoolForCookie(0), value->data));
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // This attribute should point to an attr_indirect, so the result should be 3.
-  cookie = theme->GetAttribute(app::R::attr::attr_three, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(3u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_three);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(3u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 }
 
 TEST_F(ThemeTest, TryToUseBadResourceId) {
@@ -135,11 +124,8 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo));
-
-  Res_value value;
-  uint32_t flags;
-  ASSERT_EQ(kInvalidCookie, theme->GetAttribute(0x7f000001, &value, &flags));
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value());
+  ASSERT_FALSE(theme->GetAttribute(0x7f000001));
 }
 
 TEST_F(ThemeTest, MultipleThemesOverlaidNotForce) {
@@ -147,33 +133,29 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo));
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree));
-
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value());
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree).has_value());
 
   // attr_one is still here from the base.
-  cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(1u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  auto value = theme->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(1u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // check for the new attr_six
-  cookie = theme->GetAttribute(app::R::attr::attr_six, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(6u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_six);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(6u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // check for the old attr_five (force=true was not used).
-  cookie = theme->GetAttribute(app::R::attr::attr_five, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
-  EXPECT_EQ(app::R::string::string_one, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_five);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
+  EXPECT_EQ(app::R::string::string_one, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 }
 
 TEST_F(ThemeTest, MultipleThemesOverlaidForced) {
@@ -181,33 +163,29 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo));
-  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree, true /* force */));
-
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value());
+  ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleThree, true /* force */).has_value());
 
   // attr_one is still here from the base.
-  cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(1u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  auto value = theme->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(1u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // check for the new attr_six
-  cookie = theme->GetAttribute(app::R::attr::attr_six, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(6u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_six);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(6u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // check for the new attr_five (force=true was used).
-  cookie = theme->GetAttribute(app::R::attr::attr_five, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(5u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme->GetAttribute(app::R::attr::attr_five);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(5u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 }
 
 TEST_F(ThemeTest, ResolveDynamicAttributesAndReferencesToSharedLibrary) {
@@ -216,28 +194,24 @@
       {lib_two_assets_.get(), lib_one_assets_.get(), libclient_assets_.get()});
 
   std::unique_ptr<Theme> theme = assetmanager.NewTheme();
-  ASSERT_TRUE(theme->ApplyStyle(libclient::R::style::Theme, false /*force*/));
-
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  ASSERT_TRUE(theme->ApplyStyle(libclient::R::style::Theme, false /*force*/).has_value());
 
   // The attribute should be resolved to the final value.
-  cookie = theme->GetAttribute(libclient::R::attr::foo, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(700u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  auto value = theme->GetAttribute(libclient::R::attr::foo);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(700u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // The reference should be resolved to a TYPE_REFERENCE.
-  cookie = theme->GetAttribute(libclient::R::attr::bar, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_REFERENCE, value.dataType);
+  value = theme->GetAttribute(libclient::R::attr::bar);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_REFERENCE, value->type);
 
   // lib_one is assigned package ID 0x03.
-  EXPECT_EQ(3u, get_package_id(value.data));
-  EXPECT_EQ(get_type_id(lib_one::R::string::foo), get_type_id(value.data));
-  EXPECT_EQ(get_entry_id(lib_one::R::string::foo), get_entry_id(value.data));
+  EXPECT_EQ(3u, get_package_id(value->data));
+  EXPECT_EQ(get_type_id(lib_one::R::string::foo), get_type_id(value->data));
+  EXPECT_EQ(get_entry_id(lib_one::R::string::foo), get_entry_id(value->data));
 }
 
 TEST_F(ThemeTest, CopyThemeSameAssetManager) {
@@ -245,24 +219,20 @@
   assetmanager.SetApkAssets({style_assets_.get()});
 
   std::unique_ptr<Theme> theme_one = assetmanager.NewTheme();
-  ASSERT_TRUE(theme_one->ApplyStyle(app::R::style::StyleOne));
-
-  Res_value value;
-  uint32_t flags;
-  ApkAssetsCookie cookie;
+  ASSERT_TRUE(theme_one->ApplyStyle(app::R::style::StyleOne).has_value());
 
   // attr_one is still here from the base.
-  cookie = theme_one->GetAttribute(app::R::attr::attr_one, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(1u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  auto value = theme_one->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(1u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 
   // attr_six is not here.
-  EXPECT_EQ(kInvalidCookie, theme_one->GetAttribute(app::R::attr::attr_six, &value, &flags));
+  ASSERT_FALSE(theme_one->GetAttribute(app::R::attr::attr_six).has_value());
 
   std::unique_ptr<Theme> theme_two = assetmanager.NewTheme();
-  ASSERT_TRUE(theme_two->ApplyStyle(app::R::style::StyleThree));
+  ASSERT_TRUE(theme_two->ApplyStyle(app::R::style::StyleThree).has_value());
 
   // Copy the theme to theme_one.
   theme_one->SetTo(*theme_two);
@@ -271,14 +241,14 @@
   theme_two->Clear();
 
   // attr_one is now not here.
-  EXPECT_EQ(kInvalidCookie, theme_one->GetAttribute(app::R::attr::attr_one, &value, &flags));
+  ASSERT_FALSE(theme_one->GetAttribute(app::R::attr::attr_one).has_value());
 
   // attr_six is now here because it was copied.
-  cookie = theme_one->GetAttribute(app::R::attr::attr_six, &value, &flags);
-  ASSERT_NE(kInvalidCookie, cookie);
-  EXPECT_EQ(Res_value::TYPE_INT_DEC, value.dataType);
-  EXPECT_EQ(6u, value.data);
-  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), flags);
+  value = theme_one->GetAttribute(app::R::attr::attr_six);
+  ASSERT_TRUE(value);
+  EXPECT_EQ(Res_value::TYPE_INT_DEC, value->type);
+  EXPECT_EQ(6u, value->data);
+  EXPECT_EQ(static_cast<uint32_t>(ResTable_typeSpec::SPEC_PUBLIC), value->flags);
 }
 
 TEST_F(ThemeTest, OnlyCopySameAssetsThemeWhenAssetManagersDiffer) {
@@ -291,39 +261,43 @@
                                  style_assets_.get()});
 
   auto theme_dst = assetmanager_dst.NewTheme();
-  ASSERT_TRUE(theme_dst->ApplyStyle(app::R::style::StyleOne));
+  ASSERT_TRUE(theme_dst->ApplyStyle(app::R::style::StyleOne).has_value());
 
   auto theme_src = assetmanager_src.NewTheme();
-  ASSERT_TRUE(theme_src->ApplyStyle(R::style::Theme_One));
-  ASSERT_TRUE(theme_src->ApplyStyle(app::R::style::StyleTwo));
+  ASSERT_TRUE(theme_src->ApplyStyle(R::style::Theme_One).has_value());
+  ASSERT_TRUE(theme_src->ApplyStyle(app::R::style::StyleTwo).has_value());
   ASSERT_TRUE(theme_src->ApplyStyle(fix_package_id(lib_one::R::style::Theme, 0x03),
-                                    false /*force*/));
+                                    false /*force*/).has_value());
   ASSERT_TRUE(theme_src->ApplyStyle(fix_package_id(lib_two::R::style::Theme, 0x02),
-                                    false /*force*/));
+                                    false /*force*/).has_value());
 
   theme_dst->SetTo(*theme_src);
 
-  Res_value value;
-  uint32_t flags;
-
   // System resources (present in destination asset manager).
-  EXPECT_EQ(0, theme_dst->GetAttribute(R::attr::foreground, &value, &flags));
+  auto value = theme_dst->GetAttribute(R::attr::foreground);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(0, value->cookie);
 
   // The cookie of the style asset is 3 in the source and 2 in the destination.
   // Check that the cookie has been rewritten to the destination values.
-  EXPECT_EQ(2, theme_dst->GetAttribute(app::R::attr::attr_one, &value, &flags));
+  value = theme_dst->GetAttribute(app::R::attr::attr_one);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(2, value->cookie);
 
   // The cookie of the lib_one asset is 2 in the source and 1 in the destination.
   // The package id of the lib_one package is 0x03 in the source and 0x02 in the destination
   // Check that the cookie and packages have been rewritten to the destination values.
-  EXPECT_EQ(1, theme_dst->GetAttribute(fix_package_id(lib_one::R::attr::attr1, 0x02), &value,
-                                       &flags));
-  EXPECT_EQ(1, theme_dst->GetAttribute(fix_package_id(lib_one::R::attr::attr2, 0x02), &value,
-                                       &flags));
+  value = theme_dst->GetAttribute(fix_package_id(lib_one::R::attr::attr1, 0x02));
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(1, value->cookie);
+
+  value = theme_dst->GetAttribute(fix_package_id(lib_one::R::attr::attr2, 0x02));
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(1, value->cookie);
 
   // attr2 references an attribute in lib_one. Check that the resolution of the attribute value is
   // correct after the value of attr2 had its package id rewritten to the destination package id.
-  EXPECT_EQ(700, value.data);
+  EXPECT_EQ(700, value->data);
 }
 
 TEST_F(ThemeTest, CopyNonReferencesWhenPackagesDiffer) {
@@ -335,28 +309,32 @@
 
   auto theme_dst = assetmanager_dst.NewTheme();
   auto theme_src = assetmanager_src.NewTheme();
-  ASSERT_TRUE(theme_src->ApplyStyle(app::R::style::StyleSeven));
+  ASSERT_TRUE(theme_src->ApplyStyle(app::R::style::StyleSeven).has_value());
   theme_dst->SetTo(*theme_src);
 
-  Res_value value;
-  uint32_t flags;
-
   // Allow inline resource values to be copied even if the source apk asset is not present in the
   // destination.
-  EXPECT_EQ(0, theme_dst->GetAttribute(0x0101021b /* android:versionCode */, &value, &flags));
+  auto value = theme_dst->GetAttribute(0x0101021b /* android:versionCode */);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(0, value->cookie);
 
   // Do not copy strings since the data is an index into the values string pool of the source apk
   // asset.
-  EXPECT_EQ(-1, theme_dst->GetAttribute(0x01010001 /* android:label */, &value, &flags));
+  EXPECT_FALSE(theme_dst->GetAttribute(0x01010001 /* android:label */).has_value());
 
   // Do not copy values that reference another resource if the resource is not present in the
   // destination.
-  EXPECT_EQ(-1, theme_dst->GetAttribute(0x01010002 /* android:icon */, &value, &flags));
-  EXPECT_EQ(-1, theme_dst->GetAttribute(0x010100d1 /* android:tag */, &value, &flags));
+  EXPECT_FALSE(theme_dst->GetAttribute(0x01010002 /* android:icon */).has_value());
+  EXPECT_FALSE(theme_dst->GetAttribute(0x010100d1 /* android:tag */).has_value());
 
   // Allow @empty to and @null to be copied.
-  EXPECT_EQ(0, theme_dst->GetAttribute(0x010100d0 /* android:id */, &value, &flags));
-  EXPECT_EQ(0, theme_dst->GetAttribute(0x01010000 /* android:theme */, &value, &flags));
+  value = theme_dst->GetAttribute(0x010100d0 /* android:id */);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(0, value->cookie);
+
+  value = theme_dst->GetAttribute(0x01010000 /* android:theme */);
+  ASSERT_TRUE(value.has_value());
+  EXPECT_EQ(0, value->cookie);
 }
 
 }  // namespace android
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/lowpan/java/android/net/lowpan/LowpanManager.java b/lowpan/java/android/net/lowpan/LowpanManager.java
index 76876ce..33b35e6 100644
--- a/lowpan/java/android/net/lowpan/LowpanManager.java
+++ b/lowpan/java/android/net/lowpan/LowpanManager.java
@@ -24,6 +24,10 @@
 import android.os.Looper;
 import android.os.RemoteException;
 import android.os.ServiceManager;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.os.BackgroundThread;
+
 import java.lang.ref.WeakReference;
 import java.util.HashMap;
 import java.util.Map;
@@ -97,10 +101,14 @@
      *
      * @param context the application context
      * @param service the Binder interface
-     * @param looper the default Looper to run callbacks on
      * @hide - hide this because it takes in a parameter of type ILowpanManager, which is a system
      *     private class.
      */
+    public LowpanManager(Context context, ILowpanManager service) {
+        this(context, service, BackgroundThread.get().getLooper());
+    }
+
+    @VisibleForTesting
     public LowpanManager(Context context, ILowpanManager service, Looper looper) {
         mContext = context;
         mService = service;
diff --git a/media/java/android/media/AudioDeviceAttributes.java b/media/java/android/media/AudioDeviceAttributes.java
index 0ab62c1..7caac89 100644
--- a/media/java/android/media/AudioDeviceAttributes.java
+++ b/media/java/android/media/AudioDeviceAttributes.java
@@ -72,6 +72,11 @@
     private final @Role int mRole;
 
     /**
+     * The internal audio device type
+     */
+    private final int mNativeType;
+
+    /**
      * @hide
      * Constructor from a valid {@link AudioDeviceInfo}
      * @param deviceInfo the connected audio device from which to obtain the device-identifying
@@ -83,6 +88,7 @@
         mRole = deviceInfo.isSink() ? ROLE_OUTPUT : ROLE_INPUT;
         mType = deviceInfo.getType();
         mAddress = deviceInfo.getAddress();
+        mNativeType = deviceInfo.getInternalType();
     }
 
     /**
@@ -101,9 +107,12 @@
         }
         if (role == ROLE_OUTPUT) {
             AudioDeviceInfo.enforceValidAudioDeviceTypeOut(type);
-        }
-        if (role == ROLE_INPUT) {
+            mNativeType = AudioDeviceInfo.convertDeviceTypeToInternalDevice(type);
+        } else if (role == ROLE_INPUT) {
             AudioDeviceInfo.enforceValidAudioDeviceTypeIn(type);
+            mNativeType = AudioDeviceInfo.convertDeviceTypeToInternalInputDevice(type);
+        } else {
+            mNativeType = AudioSystem.DEVICE_NONE;
         }
 
         mRole = role;
@@ -111,10 +120,17 @@
         mAddress = address;
     }
 
-    /*package*/ AudioDeviceAttributes(int nativeType, @NonNull String address) {
+    /**
+     * @hide
+     * Constructor from internal device type and address
+     * @param type the internal device type, as defined in {@link AudioSystem}
+     * @param address the address of the device, or an empty string for devices without one
+     */
+    public AudioDeviceAttributes(int nativeType, @NonNull String address) {
         mRole = (nativeType & AudioSystem.DEVICE_BIT_IN) != 0 ? ROLE_INPUT : ROLE_OUTPUT;
         mType = AudioDeviceInfo.convertInternalDeviceToDeviceType(nativeType);
         mAddress = address;
+        mNativeType = nativeType;
     }
 
     /**
@@ -147,6 +163,15 @@
         return mAddress;
     }
 
+    /**
+     * @hide
+     * Returns the internal device type of a device
+     * @return the internal device type
+     */
+    public int getInternalType() {
+        return mNativeType;
+    }
+
     @Override
     public int hashCode() {
         return Objects.hash(mRole, mType, mAddress);
@@ -172,10 +197,8 @@
     public String toString() {
         return new String("AudioDeviceAttributes:"
                 + " role:" + roleToString(mRole)
-                + " type:" + (mRole == ROLE_OUTPUT ? AudioSystem.getOutputDeviceName(
-                        AudioDeviceInfo.convertDeviceTypeToInternalDevice(mType))
-                        : AudioSystem.getInputDeviceName(
-                                AudioDeviceInfo.convertDeviceTypeToInternalDevice(mType)))
+                + " type:" + (mRole == ROLE_OUTPUT ? AudioSystem.getOutputDeviceName(mNativeType)
+                        : AudioSystem.getInputDeviceName(mNativeType))
                 + " addr:" + mAddress);
     }
 
@@ -189,12 +212,14 @@
         dest.writeInt(mRole);
         dest.writeInt(mType);
         dest.writeString(mAddress);
+        dest.writeInt(mNativeType);
     }
 
     private AudioDeviceAttributes(@NonNull Parcel in) {
         mRole = in.readInt();
         mType = in.readInt();
         mAddress = in.readString();
+        mNativeType = in.readInt();
     }
 
     public static final @NonNull Parcelable.Creator<AudioDeviceAttributes> CREATOR =
diff --git a/media/java/android/media/AudioDeviceInfo.java b/media/java/android/media/AudioDeviceInfo.java
index ff4a256..f79fc92 100644
--- a/media/java/android/media/AudioDeviceInfo.java
+++ b/media/java/android/media/AudioDeviceInfo.java
@@ -350,6 +350,14 @@
     }
 
     /**
+     * @hide
+     * @return the internal device tyoe
+     */
+    public int getInternalType() {
+        return mPort.type();
+    }
+
+    /**
      * @return The internal device ID.
      */
     public int getId() {
@@ -512,10 +520,21 @@
         return INT_TO_EXT_DEVICE_MAPPING.get(intDevice, TYPE_UNKNOWN);
     }
 
+    /** @hide */
+    public static int convertDeviceTypeToInternalInputDevice(int deviceType) {
+        return EXT_TO_INT_INPUT_DEVICE_MAPPING.get(deviceType, AudioSystem.DEVICE_NONE);
+    }
+
     private static final SparseIntArray INT_TO_EXT_DEVICE_MAPPING;
 
     private static final SparseIntArray EXT_TO_INT_DEVICE_MAPPING;
 
+    /**
+     * EXT_TO_INT_INPUT_DEVICE_MAPPING aims at mapping external device type to internal input device
+     * type.
+     */
+    private static final SparseIntArray EXT_TO_INT_INPUT_DEVICE_MAPPING;
+
     static {
         INT_TO_EXT_DEVICE_MAPPING = new SparseIntArray();
         INT_TO_EXT_DEVICE_MAPPING.put(AudioSystem.DEVICE_OUT_EARPIECE, TYPE_BUILTIN_EARPIECE);
@@ -600,6 +619,32 @@
         EXT_TO_INT_DEVICE_MAPPING.put(TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_OUT_REMOTE_SUBMIX);
         EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_OUT_BLE_HEADSET);
         EXT_TO_INT_DEVICE_MAPPING.put(TYPE_BLE_SPEAKER, AudioSystem.DEVICE_OUT_BLE_SPEAKER);
+
+        // privileges mapping to input device
+        EXT_TO_INT_INPUT_DEVICE_MAPPING = new SparseIntArray();
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUILTIN_MIC, AudioSystem.DEVICE_IN_BUILTIN_MIC);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(
+                TYPE_BLUETOOTH_SCO, AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(
+                TYPE_WIRED_HEADSET, AudioSystem.DEVICE_IN_WIRED_HEADSET);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_HDMI, AudioSystem.DEVICE_IN_HDMI);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TELEPHONY, AudioSystem.DEVICE_IN_TELEPHONY_RX);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_DOCK, AudioSystem.DEVICE_IN_ANLG_DOCK_HEADSET);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(
+                TYPE_USB_ACCESSORY, AudioSystem.DEVICE_IN_USB_ACCESSORY);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_DEVICE, AudioSystem.DEVICE_IN_USB_DEVICE);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_USB_HEADSET, AudioSystem.DEVICE_IN_USB_HEADSET);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_FM_TUNER, AudioSystem.DEVICE_IN_FM_TUNER);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_TV_TUNER, AudioSystem.DEVICE_IN_TV_TUNER);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_ANALOG, AudioSystem.DEVICE_IN_LINE);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_LINE_DIGITAL, AudioSystem.DEVICE_IN_SPDIF);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(
+                TYPE_BLUETOOTH_A2DP, AudioSystem.DEVICE_IN_BLUETOOTH_A2DP);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_IP, AudioSystem.DEVICE_IN_IP);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BUS, AudioSystem.DEVICE_IN_BUS);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(
+                TYPE_REMOTE_SUBMIX, AudioSystem.DEVICE_IN_REMOTE_SUBMIX);
+        EXT_TO_INT_INPUT_DEVICE_MAPPING.put(TYPE_BLE_HEADSET, AudioSystem.DEVICE_IN_BLE_HEADSET);
     }
 }
 
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 107d656..7dff0c2 100755
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -75,6 +75,7 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -1598,21 +1599,14 @@
     @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
     public boolean setPreferredDeviceForStrategy(@NonNull AudioProductStrategy strategy,
             @NonNull AudioDeviceAttributes device) {
-        Objects.requireNonNull(strategy);
-        Objects.requireNonNull(device);
-        try {
-            final int status =
-                    getService().setPreferredDeviceForStrategy(strategy.getId(), device);
-            return status == AudioSystem.SUCCESS;
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
+        return setPreferredDevicesForStrategy(strategy, Arrays.asList(device));
     }
 
     /**
      * @hide
-     * Removes the preferred audio device previously set with
-     * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)}.
+     * Removes the preferred audio device(s) previously set with
+     * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)} or
+     * {@link #setPreferredDevicesForStrategy(AudioProductStrategy, List<AudioDeviceAttributes>)}.
      * @param strategy the audio strategy whose routing will be affected
      * @return true if the operation was successful, false otherwise (invalid strategy, or no
      *     device set for example)
@@ -1623,7 +1617,7 @@
         Objects.requireNonNull(strategy);
         try {
             final int status =
-                    getService().removePreferredDeviceForStrategy(strategy.getId());
+                    getService().removePreferredDevicesForStrategy(strategy.getId());
             return status == AudioSystem.SUCCESS;
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
@@ -1633,18 +1627,74 @@
     /**
      * @hide
      * Return the preferred device for an audio strategy, previously set with
+     * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)} or
+     * {@link #setPreferredDevicesForStrategy(AudioProductStrategy, List<AudioDeviceAttributes>)}
+     * @param strategy the strategy to query
+     * @return the preferred device for that strategy, if multiple devices are set as preferred
+     *    devices, the first one in the list will be returned. Null will be returned if none was
+     *    ever set or if the strategy is invalid
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    @Nullable
+    public AudioDeviceAttributes getPreferredDeviceForStrategy(
+            @NonNull AudioProductStrategy strategy) {
+        List<AudioDeviceAttributes> devices = getPreferredDevicesForStrategy(strategy);
+        return devices.isEmpty() ? null : devices.get(0);
+    }
+
+    /**
+     * @hide
+     * Set the preferred devices for a given strategy, i.e. the audio routing to be used by
+     * this audio strategy. Note that the devices may not be available at the time the preferred
+     * devices is set, but it will be used once made available.
+     * <p>Use {@link #removePreferredDeviceForStrategy(AudioProductStrategy)} to cancel setting
+     * this preference for this strategy.</p>
+     * Note that the list of devices is not a list ranked by preference, but a list of one or more
+     * devices used simultaneously to output the same audio signal.
+     * @param strategy the audio strategy whose routing will be affected
+     * @param devices a non-empty list of the audio devices to route to when available
+     * @return true if the operation was successful, false otherwise
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public boolean setPreferredDevicesForStrategy(@NonNull AudioProductStrategy strategy,
+                                                  @NonNull List<AudioDeviceAttributes> devices) {
+        Objects.requireNonNull(strategy);
+        Objects.requireNonNull(devices);
+        if (devices.isEmpty()) {
+            throw new IllegalArgumentException(
+                    "Tried to set preferred devices for strategy with a empty list");
+        }
+        for (AudioDeviceAttributes device : devices) {
+            Objects.requireNonNull(device);
+        }
+        try {
+            final int status =
+                    getService().setPreferredDevicesForStrategy(strategy.getId(), devices);
+            return status == AudioSystem.SUCCESS;
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     * Return the preferred devices for an audio strategy, previously set with
      * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)}
+     * {@link #setPreferredDevicesForStrategy(AudioProductStrategy, List<AudioDeviceAttributes>)}
      * @param strategy the strategy to query
      * @return the preferred device for that strategy, or null if none was ever set or if the
      *    strategy is invalid
      */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-    public @Nullable AudioDeviceAttributes getPreferredDeviceForStrategy(
+    @NonNull
+    public List<AudioDeviceAttributes> getPreferredDevicesForStrategy(
             @NonNull AudioProductStrategy strategy) {
         Objects.requireNonNull(strategy);
         try {
-            return getService().getPreferredDeviceForStrategy(strategy.getId());
+            return getService().getPreferredDevicesForStrategy(strategy.getId());
         } catch (RemoteException e) {
             throw e.rethrowFromSystemServer();
         }
@@ -1656,6 +1706,7 @@
      * strategy.
      * <p>Note that this listener will only be invoked whenever
      * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)} or
+     * {@link #setPreferredDevicesForStrategy(AudioProductStrategy, List<AudioDeviceAttributes>)}
      * {@link #removePreferredDeviceForStrategy(AudioProductStrategy)} causes a change in
      * preferred device. It will not be invoked directly after registration with
      * {@link #addOnPreferredDeviceForStrategyChangedListener(Executor, OnPreferredDeviceForStrategyChangedListener)}
@@ -1663,8 +1714,10 @@
      * @see #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)
      * @see #removePreferredDeviceForStrategy(AudioProductStrategy)
      * @see #getPreferredDeviceForStrategy(AudioProductStrategy)
+     * @deprecated use #OnPreferredDevicesForStrategyChangedListener
      */
     @SystemApi
+    @Deprecated
     public interface OnPreferredDeviceForStrategyChangedListener {
         /**
          * Called on the listener to indicate that the preferred audio device for the given
@@ -1679,6 +1732,70 @@
 
     /**
      * @hide
+     * Interface to be notified of changes in the preferred audio devices set for a given audio
+     * strategy.
+     * <p>Note that this listener will only be invoked whenever
+     * {@link #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)} or
+     * {@link #setPreferredDevicesForStrategy(AudioProductStrategy, List<AudioDeviceAttributes>)}
+     * {@link #removePreferredDeviceForStrategy(AudioProductStrategy)} causes a change in
+     * preferred device(s). It will not be invoked directly after registration with
+     * {@link #addOnPreferredDevicesForStrategyChangedListener(
+     * Executor, OnPreferredDevicesForStrategyChangedListener)}
+     * to indicate which strategies had preferred devices at the time of registration.</p>
+     * @see #setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)
+     * @see #setPreferredDevicesForStrategy(AudioProductStrategy, List)
+     * @see #removePreferredDeviceForStrategy(AudioProductStrategy)
+     * @see #getPreferredDeviceForStrategy(AudioProductStrategy)
+     * @see #getPreferredDevicesForStrategy(AudioProductStrategy)
+     */
+    @SystemApi
+    public interface OnPreferredDevicesForStrategyChangedListener {
+        /**
+         * Called on the listener to indicate that the preferred audio devices for the given
+         * strategy has changed.
+         * @param strategy the {@link AudioProductStrategy} whose preferred device changed
+         * @param devices a list of newly set preferred audio devices
+         */
+        void onPreferredDevicesForStrategyChanged(@NonNull AudioProductStrategy strategy,
+                                                  @NonNull List<AudioDeviceAttributes> devices);
+    }
+
+    /**
+     * @hide
+     * Adds a listener for being notified of changes to the strategy-preferred audio device.
+     * @param executor
+     * @param listener
+     * @throws SecurityException if the caller doesn't hold the required permission
+     * @deprecated use {@link #addOnPreferredDevicesForStrategyChangedListener(
+     *             Executor, AudioManager.OnPreferredDevicesForStrategyChangedListener)} instead
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    @Deprecated
+    public void addOnPreferredDeviceForStrategyChangedListener(
+            @NonNull @CallbackExecutor Executor executor,
+            @NonNull OnPreferredDeviceForStrategyChangedListener listener)
+            throws SecurityException {
+        // No-op, the method is deprecated.
+    }
+
+    /**
+     * @hide
+     * Removes a previously added listener of changes to the strategy-preferred audio device.
+     * @param listener
+     * @deprecated use {@link #removeOnPreferredDevicesForStrategyChangedListener(
+     *             AudioManager.OnPreferredDevicesForStrategyChangedListener)} instead
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    @Deprecated
+    public void removeOnPreferredDeviceForStrategyChangedListener(
+            @NonNull OnPreferredDeviceForStrategyChangedListener listener) {
+        // No-op, the method is deprecated.
+    }
+
+    /**
+     * @hide
      * Adds a listener for being notified of changes to the strategy-preferred audio device.
      * @param executor
      * @param listener
@@ -1686,16 +1803,16 @@
      */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-    public void addOnPreferredDeviceForStrategyChangedListener(
+    public void addOnPreferredDevicesForStrategyChangedListener(
             @NonNull @CallbackExecutor Executor executor,
-            @NonNull OnPreferredDeviceForStrategyChangedListener listener)
+            @NonNull OnPreferredDevicesForStrategyChangedListener listener)
             throws SecurityException {
         Objects.requireNonNull(executor);
         Objects.requireNonNull(listener);
         synchronized (mPrefDevListenerLock) {
             if (hasPrefDevListener(listener)) {
                 throw new IllegalArgumentException(
-                        "attempt to call addOnPreferredDeviceForStrategyChangedListener() "
+                        "attempt to call addOnPreferredDevicesForStrategyChangedListener() "
                                 + "on a previously registered listener");
             }
             // lazy initialization of the list of strategy-preferred device listener
@@ -1707,10 +1824,10 @@
             if (oldCbCount == 0 && mPrefDevListeners.size() > 0) {
                 // register binder for callbacks
                 if (mPrefDevDispatcherStub == null) {
-                    mPrefDevDispatcherStub = new StrategyPreferredDeviceDispatcherStub();
+                    mPrefDevDispatcherStub = new StrategyPreferredDevicesDispatcherStub();
                 }
                 try {
-                    getService().registerStrategyPreferredDeviceDispatcher(mPrefDevDispatcherStub);
+                    getService().registerStrategyPreferredDevicesDispatcher(mPrefDevDispatcherStub);
                 } catch (RemoteException e) {
                     throw e.rethrowFromSystemServer();
                 }
@@ -1725,8 +1842,8 @@
      */
     @SystemApi
     @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
-    public void removeOnPreferredDeviceForStrategyChangedListener(
-            @NonNull OnPreferredDeviceForStrategyChangedListener listener) {
+    public void removeOnPreferredDevicesForStrategyChangedListener(
+            @NonNull OnPreferredDevicesForStrategyChangedListener listener) {
         Objects.requireNonNull(listener);
         synchronized (mPrefDevListenerLock) {
             if (!removePrefDevListener(listener)) {
@@ -1737,7 +1854,7 @@
             if (mPrefDevListeners.size() == 0) {
                 // unregister binder for callbacks
                 try {
-                    getService().unregisterStrategyPreferredDeviceDispatcher(
+                    getService().unregisterStrategyPreferredDevicesDispatcher(
                             mPrefDevDispatcherStub);
                 } catch (RemoteException e) {
                     throw e.rethrowFromSystemServer();
@@ -1759,23 +1876,23 @@
     private @Nullable ArrayList<PrefDevListenerInfo> mPrefDevListeners;
 
     private static class PrefDevListenerInfo {
-        final @NonNull OnPreferredDeviceForStrategyChangedListener mListener;
+        final @NonNull OnPreferredDevicesForStrategyChangedListener mListener;
         final @NonNull Executor mExecutor;
-        PrefDevListenerInfo(OnPreferredDeviceForStrategyChangedListener listener, Executor exe) {
+        PrefDevListenerInfo(OnPreferredDevicesForStrategyChangedListener listener, Executor exe) {
             mListener = listener;
             mExecutor = exe;
         }
     }
 
     @GuardedBy("mPrefDevListenerLock")
-    private StrategyPreferredDeviceDispatcherStub mPrefDevDispatcherStub;
+    private StrategyPreferredDevicesDispatcherStub mPrefDevDispatcherStub;
 
-    private final class StrategyPreferredDeviceDispatcherStub
-            extends IStrategyPreferredDeviceDispatcher.Stub {
+    private final class StrategyPreferredDevicesDispatcherStub
+            extends IStrategyPreferredDevicesDispatcher.Stub {
 
         @Override
-        public void dispatchPrefDeviceChanged(int strategyId,
-                                              @Nullable AudioDeviceAttributes device) {
+        public void dispatchPrefDevicesChanged(int strategyId,
+                                               @NonNull List<AudioDeviceAttributes> devices) {
             // make a shallow copy of listeners so callback is not executed under lock
             final ArrayList<PrefDevListenerInfo> prefDevListeners;
             synchronized (mPrefDevListenerLock) {
@@ -1790,7 +1907,7 @@
             try {
                 for (PrefDevListenerInfo info : prefDevListeners) {
                     info.mExecutor.execute(() ->
-                            info.mListener.onPreferredDeviceForStrategyChanged(strategy, device));
+                            info.mListener.onPreferredDevicesForStrategyChanged(strategy, devices));
                 }
             } finally {
                 Binder.restoreCallingIdentity(ident);
@@ -1800,7 +1917,7 @@
 
     @GuardedBy("mPrefDevListenerLock")
     private @Nullable PrefDevListenerInfo getPrefDevListenerInfo(
-            OnPreferredDeviceForStrategyChangedListener listener) {
+            OnPreferredDevicesForStrategyChangedListener listener) {
         if (mPrefDevListeners == null) {
             return null;
         }
@@ -1813,7 +1930,7 @@
     }
 
     @GuardedBy("mPrefDevListenerLock")
-    private boolean hasPrefDevListener(OnPreferredDeviceForStrategyChangedListener listener) {
+    private boolean hasPrefDevListener(OnPreferredDevicesForStrategyChangedListener listener) {
         return getPrefDevListenerInfo(listener) != null;
     }
 
@@ -1821,7 +1938,7 @@
     /**
      * @return true if the listener was removed from the list
      */
-    private boolean removePrefDevListener(OnPreferredDeviceForStrategyChangedListener listener) {
+    private boolean removePrefDevListener(OnPreferredDevicesForStrategyChangedListener listener) {
         final PrefDevListenerInfo infoToRemove = getPrefDevListenerInfo(listener);
         if (infoToRemove != null) {
             mPrefDevListeners.remove(infoToRemove);
@@ -1831,6 +1948,349 @@
     }
 
     //====================================================================
+    // Audio Capture Preset routing
+
+    /**
+     * @hide
+     * Set the preferred device for a given capture preset, i.e. the audio routing to be used by
+     * this capture preset. Note that the device may not be available at the time the preferred
+     * device is set, but it will be used once made available.
+     * <p>Use {@link #clearPreferredDevicesForCapturePreset(int)} to cancel setting this preference
+     * for this capture preset.</p>
+     * @param capturePreset the audio capture preset whose routing will be affected
+     * @param device the audio device to route to when available
+     * @return true if the operation was successful, false otherwise
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public boolean setPreferredDeviceForCapturePreset(int capturePreset,
+                                                      @NonNull AudioDeviceAttributes device) {
+        return setPreferredDevicesForCapturePreset(capturePreset, Arrays.asList(device));
+    }
+
+    /**
+     * @hide
+     * Remove all the preferred audio devices previously set
+     * @param capturePreset the audio capture preset whose routing will be affected
+     * @return true if the operation was successful, false otherwise (invalid capture preset, or no
+     *     device set for example)
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public boolean clearPreferredDevicesForCapturePreset(int capturePreset) {
+        if (!MediaRecorder.isValidAudioSource(capturePreset)) {
+            return false;
+        }
+        try {
+            final int status = getService().clearPreferredDevicesForCapturePreset(capturePreset);
+            return status == AudioSystem.SUCCESS;
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     * Return the preferred devices for an audio capture preset, previously set with
+     * {@link #setPreferredDeviceForCapturePreset(int, AudioDeviceAttributes)}
+     * @param capturePreset the capture preset to query
+     * @return a list that contains preferred devices for that capture preset.
+     */
+    @NonNull
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public List<AudioDeviceAttributes> getPreferredDevicesForCapturePreset(int capturePreset) {
+        if (!MediaRecorder.isValidAudioSource(capturePreset)) {
+            return new ArrayList<AudioDeviceAttributes>();
+        }
+        try {
+            return getService().getPreferredDevicesForCapturePreset(capturePreset);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    private boolean setPreferredDevicesForCapturePreset(
+            int capturePreset, @NonNull List<AudioDeviceAttributes> devices) {
+        Objects.requireNonNull(devices);
+        if (!MediaRecorder.isValidAudioSource(capturePreset)) {
+            return false;
+        }
+        if (devices.size() != 1) {
+            throw new IllegalArgumentException(
+                    "Only support setting one preferred devices for capture preset");
+        }
+        for (AudioDeviceAttributes device : devices) {
+            Objects.requireNonNull(device);
+        }
+        try {
+            final int status =
+                    getService().setPreferredDevicesForCapturePreset(capturePreset, devices);
+            return status == AudioSystem.SUCCESS;
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     * Interface to be notified of changes in the preferred audio devices set for a given capture
+     * preset.
+     * <p>Note that this listener will only be invoked whenever
+     * {@link #setPreferredDeviceForCapturePreset(int, AudioDeviceAttributes)} or
+     * {@link #clearPreferredDevicesForCapturePreset(int)} causes a change in
+     * preferred device. It will not be invoked directly after registration with
+     * {@link #addOnPreferredDevicesForCapturePresetChangedListener(
+     * Executor, OnPreferredDevicesForCapturePresetChangedListener)}
+     * to indicate which strategies had preferred devices at the time of registration.</p>
+     * @see #setPreferredDeviceForCapturePreset(int, AudioDeviceAttributes)
+     * @see #clearPreferredDevicesForCapturePreset(int)
+     * @see #getPreferredDevicesForCapturePreset(int)
+     */
+    @SystemApi
+    public interface OnPreferredDevicesForCapturePresetChangedListener {
+        /**
+         * Called on the listener to indicate that the preferred audio devices for the given
+         * capture preset has changed.
+         * @param capturePreset the capture preset whose preferred device changed
+         * @param devices a list of newly set preferred audio devices
+         */
+        void onPreferredDevicesForCapturePresetChanged(
+                int capturePreset, @NonNull List<AudioDeviceAttributes> devices);
+    }
+
+    /**
+     * @hide
+     * Adds a listener for being notified of changes to the capture-preset-preferred audio device.
+     * @param executor
+     * @param listener
+     * @throws SecurityException if the caller doesn't hold the required permission
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public void addOnPreferredDevicesForCapturePresetChangedListener(
+            @NonNull @CallbackExecutor Executor executor,
+            @NonNull OnPreferredDevicesForCapturePresetChangedListener listener)
+            throws SecurityException {
+        Objects.requireNonNull(executor);
+        Objects.requireNonNull(listener);
+        int status = addOnDevRoleForCapturePresetChangedListener(
+                executor, listener, AudioSystem.DEVICE_ROLE_PREFERRED);
+        if (status == AudioSystem.ERROR) {
+            // This must not happen
+            throw new RuntimeException("Unknown error happened");
+        }
+        if (status == AudioSystem.BAD_VALUE) {
+            throw new IllegalArgumentException(
+                    "attempt to call addOnPreferredDevicesForCapturePresetChangedListener() "
+                            + "on a previously registered listener");
+        }
+    }
+
+    /**
+     * @hide
+     * Removes a previously added listener of changes to the capture-preset-preferred audio device.
+     * @param listener
+     */
+    @SystemApi
+    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
+    public void removeOnPreferredDevicesForCapturePresetChangedListener(
+            @NonNull OnPreferredDevicesForCapturePresetChangedListener listener) {
+        Objects.requireNonNull(listener);
+        int status = removeOnDevRoleForCapturePresetChangedListener(
+                listener, AudioSystem.DEVICE_ROLE_PREFERRED);
+        if (status == AudioSystem.ERROR) {
+            // This must not happen
+            throw new RuntimeException("Unknown error happened");
+        }
+        if (status == AudioSystem.BAD_VALUE) {
+            throw new IllegalArgumentException(
+                    "attempt to call removeOnPreferredDevicesForCapturePresetChangedListener() "
+                            + "on an unregistered listener");
+        }
+    }
+
+    private <T> int addOnDevRoleForCapturePresetChangedListener(
+            @NonNull @CallbackExecutor Executor executor,
+            @NonNull T listener, int deviceRole) {
+        Objects.requireNonNull(executor);
+        Objects.requireNonNull(listener);
+        DevRoleListeners<T> devRoleListeners =
+                (DevRoleListeners<T>) mDevRoleForCapturePresetListeners.get(deviceRole);
+        if (devRoleListeners == null) {
+            return AudioSystem.ERROR;
+        }
+        synchronized (devRoleListeners.mDevRoleListenersLock) {
+            if (devRoleListeners.hasDevRoleListener(listener)) {
+                return AudioSystem.BAD_VALUE;
+            }
+            // lazy initialization of the list of device role listener
+            if (devRoleListeners.mListenerInfos == null) {
+                devRoleListeners.mListenerInfos = new ArrayList<>();
+            }
+            final int oldCbCount = devRoleListeners.mListenerInfos.size();
+            devRoleListeners.mListenerInfos.add(new DevRoleListenerInfo<T>(executor, listener));
+            if (oldCbCount == 0 && devRoleListeners.mListenerInfos.size() > 0) {
+                // register binder for callbacks
+                synchronized (mDevRoleForCapturePresetListenersLock) {
+                    int deviceRoleListenerStatus = mDeviceRoleListenersStatus;
+                    mDeviceRoleListenersStatus |= (1 << deviceRole);
+                    if (deviceRoleListenerStatus != 0) {
+                        // There are already device role changed listeners active.
+                        return AudioSystem.SUCCESS;
+                    }
+                    if (mDevicesRoleForCapturePresetDispatcherStub == null) {
+                        mDevicesRoleForCapturePresetDispatcherStub =
+                                new CapturePresetDevicesRoleDispatcherStub();
+                    }
+                    try {
+                        getService().registerCapturePresetDevicesRoleDispatcher(
+                                mDevicesRoleForCapturePresetDispatcherStub);
+                    } catch (RemoteException e) {
+                        throw e.rethrowFromSystemServer();
+                    }
+                }
+            }
+        }
+        return AudioSystem.SUCCESS;
+    }
+
+    private <T> int removeOnDevRoleForCapturePresetChangedListener(
+            @NonNull T listener, int deviceRole) {
+        Objects.requireNonNull(listener);
+        DevRoleListeners<T> devRoleListeners =
+                (DevRoleListeners<T>) mDevRoleForCapturePresetListeners.get(deviceRole);
+        if (devRoleListeners == null) {
+            return AudioSystem.ERROR;
+        }
+        synchronized (devRoleListeners.mDevRoleListenersLock) {
+            if (!devRoleListeners.removeDevRoleListener(listener)) {
+                return AudioSystem.BAD_VALUE;
+            }
+            if (devRoleListeners.mListenerInfos.size() == 0) {
+                // unregister binder for callbacks
+                synchronized (mDevRoleForCapturePresetListenersLock) {
+                    mDeviceRoleListenersStatus ^= (1 << deviceRole);
+                    if (mDeviceRoleListenersStatus != 0) {
+                        // There are some other device role changed listeners active.
+                        return AudioSystem.SUCCESS;
+                    }
+                    try {
+                        getService().unregisterCapturePresetDevicesRoleDispatcher(
+                                mDevicesRoleForCapturePresetDispatcherStub);
+                    } catch (RemoteException e) {
+                        throw e.rethrowFromSystemServer();
+                    }
+                }
+            }
+        }
+        return AudioSystem.SUCCESS;
+    }
+
+    private final Map<Integer, Object> mDevRoleForCapturePresetListeners = new HashMap<>(){{
+            put(AudioSystem.DEVICE_ROLE_PREFERRED,
+                    new DevRoleListeners<OnPreferredDevicesForCapturePresetChangedListener>());
+        }};
+
+    private class DevRoleListenerInfo<T> {
+        final @NonNull Executor mExecutor;
+        final @NonNull T mListener;
+        DevRoleListenerInfo(Executor executor, T listener) {
+            mExecutor = executor;
+            mListener = listener;
+        }
+    }
+
+    private class DevRoleListeners<T> {
+        private final Object mDevRoleListenersLock = new Object();
+        @GuardedBy("mDevRoleListenersLock")
+        private @Nullable ArrayList<DevRoleListenerInfo<T>> mListenerInfos;
+
+        @GuardedBy("mDevRoleListenersLock")
+        private @Nullable DevRoleListenerInfo<T> getDevRoleListenerInfo(T listener) {
+            if (mListenerInfos == null) {
+                return null;
+            }
+            for (DevRoleListenerInfo<T> listenerInfo : mListenerInfos) {
+                if (listenerInfo.mListener == listener) {
+                    return listenerInfo;
+                }
+            }
+            return null;
+        }
+
+        @GuardedBy("mDevRoleListenersLock")
+        private boolean hasDevRoleListener(T listener) {
+            return getDevRoleListenerInfo(listener) != null;
+        }
+
+        @GuardedBy("mDevRoleListenersLock")
+        private boolean removeDevRoleListener(T listener) {
+            final DevRoleListenerInfo<T> infoToRemove = getDevRoleListenerInfo(listener);
+            if (infoToRemove != null) {
+                mListenerInfos.remove(infoToRemove);
+                return true;
+            }
+            return false;
+        }
+    }
+
+    private final Object mDevRoleForCapturePresetListenersLock = new Object();
+    /**
+     * Record if there is a listener added for device role change. If there is a listener added for
+     * a specified device role change, the bit at position `1 << device_role` is set.
+     */
+    @GuardedBy("mDevRoleForCapturePresetListenersLock")
+    private int mDeviceRoleListenersStatus = 0;
+    @GuardedBy("mDevRoleForCapturePresetListenersLock")
+    private CapturePresetDevicesRoleDispatcherStub mDevicesRoleForCapturePresetDispatcherStub;
+
+    private final class CapturePresetDevicesRoleDispatcherStub
+            extends ICapturePresetDevicesRoleDispatcher.Stub {
+
+        @Override
+        public void dispatchDevicesRoleChanged(
+                int capturePreset, int role, List<AudioDeviceAttributes> devices) {
+            final Object listenersObj = mDevRoleForCapturePresetListeners.get(role);
+            if (listenersObj == null) {
+                return;
+            }
+            switch (role) {
+                case AudioSystem.DEVICE_ROLE_PREFERRED: {
+                    final DevRoleListeners<OnPreferredDevicesForCapturePresetChangedListener>
+                            listeners =
+                            (DevRoleListeners<OnPreferredDevicesForCapturePresetChangedListener>)
+                            listenersObj;
+                    final ArrayList<DevRoleListenerInfo<
+                            OnPreferredDevicesForCapturePresetChangedListener>> prefDevListeners;
+                    synchronized (listeners.mDevRoleListenersLock) {
+                        if (listeners.mListenerInfos.isEmpty()) {
+                            return;
+                        }
+                        prefDevListeners = (ArrayList<DevRoleListenerInfo<
+                                OnPreferredDevicesForCapturePresetChangedListener>>)
+                                listeners.mListenerInfos.clone();
+                    }
+                    final long ident = Binder.clearCallingIdentity();
+                    try {
+                        for (DevRoleListenerInfo<
+                                OnPreferredDevicesForCapturePresetChangedListener> info :
+                                prefDevListeners) {
+                            info.mExecutor.execute(() ->
+                                    info.mListener.onPreferredDevicesForCapturePresetChanged(
+                                            capturePreset, devices));
+                        }
+                    } finally {
+                        Binder.restoreCallingIdentity(ident);
+                    }
+                } break;
+                default:
+                    break;
+            }
+        }
+    }
+
+    //====================================================================
     // Offload query
     /**
      * Returns whether offloaded playback of an audio format is supported on the device.
@@ -5664,6 +6124,29 @@
     }
 
     /**
+     * Returns an {@link AudioDeviceInfo} corresponding to the specified {@link AudioPort} ID.
+     * @param portId The audio port ID to look up for.
+     * @param flags A set of bitflags specifying the criteria to test.
+     * @see #GET_DEVICES_OUTPUTS
+     * @see #GET_DEVICES_INPUTS
+     * @see #GET_DEVICES_ALL
+     * @return An AudioDeviceInfo or null if no device with matching port ID is found.
+     * @hide
+     */
+    public static AudioDeviceInfo getDeviceForPortId(int portId, int flags) {
+        if (portId == 0) {
+            return null;
+        }
+        AudioDeviceInfo[] devices = getDevicesStatic(flags);
+        for (AudioDeviceInfo device : devices) {
+            if (device.getId() == portId) {
+                return device;
+            }
+        }
+        return null;
+    }
+
+    /**
      * Registers an {@link AudioDeviceCallback} object to receive notifications of changes
      * to the set of connected audio devices.
      * @param callback The {@link AudioDeviceCallback} object to receive connect/disconnect
@@ -6206,6 +6689,297 @@
         }
     }
 
+    /**
+     * Selects the audio device that should be used for communication use cases, for instance voice
+     * or video calls. This method can be used by voice or video chat applications to select a
+     * different audio device than the one selected by default by the platform.
+     * <p>The device selection is expressed as an {@link AudioDeviceInfo}, of role sink
+     * ({@link AudioDeviceInfo#isSink()} is <code>true</code>) and of one of the following types:
+     * <ul>
+     *   <li> {@link AudioDeviceInfo#TYPE_BUILTIN_EARPIECE}
+     *   <li> {@link AudioDeviceInfo#TYPE_BUILTIN_SPEAKER}
+     *   <li> {@link AudioDeviceInfo#TYPE_WIRED_HEADSET}
+     *   <li> {@link AudioDeviceInfo#TYPE_BLUETOOTH_SCO}
+     *   <li> {@link AudioDeviceInfo#TYPE_USB_HEADSET}
+     *   <li> {@link AudioDeviceInfo#TYPE_BLE_HEADSET}
+     * </ul>
+     * The selection is active as long as the requesting application lives, until
+     * {@link #clearDeviceForCommunication} is called or until the device is disconnected.
+     * It is therefore important for applications to clear the request when a call ends or the
+     * application is paused.
+     * <p>In case of simultaneous requests by multiple applications the priority is given to the
+     * application currently controlling the audio mode (see {@link #setMode(int)}). This is the
+     * latest application having selected mode {@link #MODE_IN_COMMUNICATION} or mode
+     * {@link #MODE_IN_CALL}. Note that <code>MODE_IN_CALL</code> can only be selected by the main
+     * telephony application with permission
+     * {@link android.Manifest.permission#MODIFY_PHONE_STATE}.
+     * <p> If the requested devices is not currently available, the request will be rejected and
+     * the method will return false.
+     * <p>This API replaces the following deprecated APIs:
+     * <ul>
+     *   <li> {@link #startBluetoothSco()}
+     *   <li> {@link #stopBluetoothSco()}
+     *   <li> {@link #setSpeakerphoneOn(boolean)}
+     * </ul>
+     * <h4>Example</h4>
+     * <p>The example below shows how to enable and disable speakerphone mode.
+     * <pre class="prettyprint">
+     * // Get an AudioManager instance
+     * AudioManager audioManager = Context.getSystemService(AudioManager.class);
+     * try {
+     *     AudioDeviceInfo speakerDevice = null;
+     *     AudioDeviceInfo[] devices = audioManager.getDevices(GET_DEVICES_OUTPUTS);
+     *     for (AudioDeviceInfo device : devices) {
+     *         if (device.getType() == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER) {
+     *             speakerDevice = device;
+     *             break;
+     *         }
+     *     }
+     *     if (speakerDevice != null) {
+     *         // Turn speakerphone ON.
+     *         boolean result = audioManager.setDeviceForCommunication(speakerDevice);
+     *         if (!result) {
+     *             // Handle error.
+     *         }
+     *         // Turn speakerphone OFF.
+     *         audioManager.clearDeviceForCommunication();
+     *     }
+     * } catch (IllegalArgumentException e) {
+     *     // Handle exception.
+     * }
+     * </pre>
+     * @param device the requested audio device.
+     * @return <code>true</code> if the request was accepted, <code>false</code> otherwise.
+     * @throws IllegalArgumentException If an invalid device is specified.
+     */
+    public boolean setDeviceForCommunication(@NonNull AudioDeviceInfo device) {
+        Objects.requireNonNull(device);
+        try {
+            if (device.getId() == 0) {
+                throw new IllegalArgumentException("In valid device: " + device);
+            }
+            return getService().setDeviceForCommunication(mICallBack, device.getId());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Cancels previous communication device selection made with
+     * {@link #setDeviceForCommunication(AudioDeviceInfo)}.
+     */
+    public void clearDeviceForCommunication() {
+        try {
+            getService().setDeviceForCommunication(mICallBack, 0);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * Returns currently selected audio device for communication.
+     * <p>This API replaces the following deprecated APIs:
+     * <ul>
+     *   <li> {@link #isBluetoothScoOn()}
+     *   <li> {@link #isSpeakerphoneOn()}
+     * </ul>
+     * @return an {@link AudioDeviceInfo} indicating which audio device is
+     * currently selected or communication use cases or null if default selection
+     * is used.
+     */
+    @Nullable
+    public AudioDeviceInfo getDeviceForCommunication() {
+        try {
+            return getDeviceForPortId(
+                    getService().getDeviceForCommunication(), GET_DEVICES_OUTPUTS);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    /**
+     * @hide
+     * Returns an {@link AudioDeviceInfo} corresponding to a connected device of the type provided.
+     * The type must be a valid output type defined in <code>AudioDeviceInfo</code> class,
+     * for instance {@link AudioDeviceInfo#TYPE_BUILTIN_SPEAKER}.
+     * The method will return null if no device of the provided type is connected.
+     * If more than one device of the provided type is connected, an object corresponding to the
+     * first device encountered in the enumeration list will be returned.
+     * @param deviceType The device device for which an <code>AudioDeviceInfo</code>
+     * object is queried.
+     * @return An AudioDeviceInfo object or null if no device with the requested type is connected.
+     * @throws IllegalArgumentException If an invalid device type is specified.
+     */
+    @TestApi
+    @Nullable
+    public static AudioDeviceInfo getDeviceInfoFromType(
+            @AudioDeviceInfo.AudioDeviceTypeOut int deviceType) {
+        AudioDeviceInfo[] devices = getDevicesStatic(GET_DEVICES_OUTPUTS);
+        for (AudioDeviceInfo device : devices) {
+            if (device.getType() == deviceType) {
+                return device;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Listener registered by client to be notified upon communication audio device change.
+     * See {@link #setDeviceForCommunication(AudioDeviceInfo)}.
+     */
+    public interface OnCommunicationDeviceChangedListener {
+        /**
+         * Callback method called upon communication audio device change.
+         * @param device the audio device selected for communication use cases
+         */
+        void onCommunicationDeviceChanged(@Nullable AudioDeviceInfo device);
+    }
+
+    /**
+     * Adds a listener for being notified of changes to the communication audio device.
+     * See {@link #setDeviceForCommunication(AudioDeviceInfo)}.
+     * @param executor
+     * @param listener
+     */
+    public void addOnCommunicationDeviceChangedListener(
+            @NonNull @CallbackExecutor Executor executor,
+            @NonNull OnCommunicationDeviceChangedListener listener) {
+        Objects.requireNonNull(executor);
+        Objects.requireNonNull(listener);
+        synchronized (mCommDevListenerLock) {
+            if (hasCommDevListener(listener)) {
+                throw new IllegalArgumentException(
+                        "attempt to call addOnCommunicationDeviceChangedListener() "
+                                + "on a previously registered listener");
+            }
+            // lazy initialization of the list of strategy-preferred device listener
+            if (mCommDevListeners == null) {
+                mCommDevListeners = new ArrayList<>();
+            }
+            final int oldCbCount = mCommDevListeners.size();
+            mCommDevListeners.add(new CommDevListenerInfo(listener, executor));
+            if (oldCbCount == 0 && mCommDevListeners.size() > 0) {
+                // register binder for callbacks
+                if (mCommDevDispatcherStub == null) {
+                    mCommDevDispatcherStub = new CommunicationDeviceDispatcherStub();
+                }
+                try {
+                    getService().registerCommunicationDeviceDispatcher(mCommDevDispatcherStub);
+                } catch (RemoteException e) {
+                    throw e.rethrowFromSystemServer();
+                }
+            }
+        }
+    }
+
+    /**
+     * Removes a previously added listener of changes to the communication audio device.
+     * See {@link #setDeviceForCommunication(AudioDeviceInfo)}.
+     * @param listener
+     */
+    public void removeOnCommunicationDeviceChangedListener(
+            @NonNull OnCommunicationDeviceChangedListener listener) {
+        Objects.requireNonNull(listener);
+        synchronized (mCommDevListenerLock) {
+            if (!removeCommDevListener(listener)) {
+                throw new IllegalArgumentException(
+                        "attempt to call removeOnCommunicationDeviceChangedListener() "
+                                + "on an unregistered listener");
+            }
+            if (mCommDevListeners.size() == 0) {
+                // unregister binder for callbacks
+                try {
+                    getService().unregisterCommunicationDeviceDispatcher(
+                            mCommDevDispatcherStub);
+                } catch (RemoteException e) {
+                    throw e.rethrowFromSystemServer();
+                } finally {
+                    mCommDevDispatcherStub = null;
+                    mCommDevListeners = null;
+                }
+            }
+        }
+    }
+
+    private final Object mCommDevListenerLock = new Object();
+    /**
+     * List of listeners for preferred device for strategy and their associated Executor.
+     * List is lazy-initialized on first registration
+     */
+    @GuardedBy("mCommDevListenerLock")
+    private @Nullable ArrayList<CommDevListenerInfo> mCommDevListeners;
+
+    private static class CommDevListenerInfo {
+        final @NonNull OnCommunicationDeviceChangedListener mListener;
+        final @NonNull Executor mExecutor;
+
+        CommDevListenerInfo(OnCommunicationDeviceChangedListener listener, Executor exe) {
+            mListener = listener;
+            mExecutor = exe;
+        }
+    }
+
+    @GuardedBy("mCommDevListenerLock")
+    private CommunicationDeviceDispatcherStub mCommDevDispatcherStub;
+
+    private final class CommunicationDeviceDispatcherStub
+            extends ICommunicationDeviceDispatcher.Stub {
+
+        @Override
+        public void dispatchCommunicationDeviceChanged(int portId) {
+            // make a shallow copy of listeners so callback is not executed under lock
+            final ArrayList<CommDevListenerInfo> commDevListeners;
+            synchronized (mCommDevListenerLock) {
+                if (mCommDevListeners == null || mCommDevListeners.size() == 0) {
+                    return;
+                }
+                commDevListeners = (ArrayList<CommDevListenerInfo>) mCommDevListeners.clone();
+            }
+            AudioDeviceInfo device = getDeviceForPortId(portId, GET_DEVICES_OUTPUTS);
+            final long ident = Binder.clearCallingIdentity();
+            try {
+                for (CommDevListenerInfo info : commDevListeners) {
+                    info.mExecutor.execute(() ->
+                            info.mListener.onCommunicationDeviceChanged(device));
+                }
+            } finally {
+                Binder.restoreCallingIdentity(ident);
+            }
+        }
+    }
+
+    @GuardedBy("mCommDevListenerLock")
+    private @Nullable CommDevListenerInfo getCommDevListenerInfo(
+            OnCommunicationDeviceChangedListener listener) {
+        if (mCommDevListeners == null) {
+            return null;
+        }
+        for (CommDevListenerInfo info : mCommDevListeners) {
+            if (info.mListener == listener) {
+                return info;
+            }
+        }
+        return null;
+    }
+
+    @GuardedBy("mCommDevListenerLock")
+    private boolean hasCommDevListener(OnCommunicationDeviceChangedListener listener) {
+        return getCommDevListenerInfo(listener) != null;
+    }
+
+    @GuardedBy("mCommDevListenerLock")
+    /**
+     * @return true if the listener was removed from the list
+     */
+    private boolean removeCommDevListener(OnCommunicationDeviceChangedListener listener) {
+        final CommDevListenerInfo infoToRemove = getCommDevListenerInfo(listener);
+        if (infoToRemove != null) {
+            mCommDevListeners.remove(infoToRemove);
+            return true;
+        }
+        return false;
+    }
+
     //---------------------------------------------------------
     // Inner classes
     //--------------------
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index f1eb53d..18c8a72 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -28,11 +28,13 @@
 import android.os.Build;
 import android.telephony.TelephonyManager;
 import android.util.Log;
+import android.util.Pair;
 
 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.Map;
 import java.util.Objects;
 import java.util.Set;
@@ -1371,6 +1373,11 @@
     /** @hide */ public static final int FOR_VIBRATE_RINGING = 7;
     private static final int NUM_FORCE_USE = 8;
 
+    // Device role in audio policy
+    public static final int DEVICE_ROLE_NONE = 0;
+    public static final int DEVICE_ROLE_PREFERRED = 1;
+    public static final int DEVICE_ROLE_DISABLED = 2;
+
     /** @hide */
     public static String forceUseUsageToString(int usage) {
         switch (usage) {
@@ -1691,47 +1698,186 @@
 
     /**
      * @hide
-     * Sets the preferred device to use for a given audio strategy in the audio policy engine
+     * Set device as role for product strategy.
      * @param strategy the id of the strategy to configure
-     * @param device the device type and address to route to when available
+     * @param role the role of the devices
+     * @param devices the list of devices to be set as role for the given strategy
      * @return {@link #SUCCESS} if successfully set
      */
-    public static int setPreferredDeviceForStrategy(
-            int strategy, @NonNull AudioDeviceAttributes device) {
-        return setPreferredDeviceForStrategy(strategy,
-                AudioDeviceInfo.convertDeviceTypeToInternalDevice(device.getType()),
-                device.getAddress());
+    public static int setDevicesRoleForStrategy(
+            int strategy, int role, @NonNull List<AudioDeviceAttributes> devices) {
+        if (devices.isEmpty()) {
+            return BAD_VALUE;
+        }
+        int[] types = new int[devices.size()];
+        String[] addresses = new String[devices.size()];
+        for (int i = 0; i < devices.size(); ++i) {
+            types[i] = devices.get(i).getInternalType();
+            addresses[i] = devices.get(i).getAddress();
+        }
+        return setDevicesRoleForStrategy(strategy, role, types, addresses);
     }
-    /**
-     * @hide
-     * Set device routing per product strategy.
-     * @param strategy the id of the strategy to configure
-     * @param deviceType the native device type, NOT AudioDeviceInfo types
-     * @param deviceAddress the address of the device
-     * @return {@link #SUCCESS} if successfully set
-     */
-    private static native int setPreferredDeviceForStrategy(
-            int strategy, int deviceType, String deviceAddress);
 
     /**
      * @hide
-     * Remove preferred routing for the strategy
+     * Set device as role for product strategy.
      * @param strategy the id of the strategy to configure
+     * @param role the role of the devices
+     * @param types all device types
+     * @param addresses all device addresses
+     * @return {@link #SUCCESS} if successfully set
+     */
+    private static native int setDevicesRoleForStrategy(
+            int strategy, int role, @NonNull int[] types, @NonNull String[] addresses);
+
+    /**
+     * @hide
+     * Remove devices as role for the strategy
+     * @param strategy the id of the strategy to configure
+     * @param role the role of the devices
      * @return {@link #SUCCESS} if successfully removed
      */
-    public static native int removePreferredDeviceForStrategy(int strategy);
+    public static native int removeDevicesRoleForStrategy(int strategy, int role);
 
     /**
      * @hide
-     * Query previously set preferred device for a strategy
+     * Query previously set devices as role for a strategy
      * @param strategy the id of the strategy to query for
-     * @param device an array of size 1 that will contain the preferred device, or null if
-     *               none was set
+     * @param role the role of the devices
+     * @param devices a list that will contain the devices of role
      * @return {@link #SUCCESS} if there is a preferred device and it was successfully retrieved
      *     and written to the array
      */
-    public static native int getPreferredDeviceForStrategy(int strategy,
-                                                           AudioDeviceAttributes[] device);
+    public static native int getDevicesForRoleAndStrategy(
+            int strategy, int role, @NonNull List<AudioDeviceAttributes> devices);
+
+    // use case routing by capture preset
+
+    private static Pair<int[], String[]> populateInputDevicesTypeAndAddress(
+            @NonNull List<AudioDeviceAttributes> devices) {
+        int[] types = new int[devices.size()];
+        String[] addresses = new String[devices.size()];
+        for (int i = 0; i < devices.size(); ++i) {
+            types[i] = devices.get(i).getInternalType();
+            if (types[i] == AudioSystem.DEVICE_NONE) {
+                types[i] = AudioDeviceInfo.convertDeviceTypeToInternalInputDevice(
+                        devices.get(i).getType());
+            }
+            addresses[i] = devices.get(i).getAddress();
+        }
+        return new Pair<int[], String[]>(types, addresses);
+    }
+
+    /**
+     * @hide
+     * Set devices as role for capture preset.
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param devices the list of devices to be set as role for the given capture preset
+     * @return {@link #SUCCESS} if successfully set
+     */
+    public static int setDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devices) {
+        if (devices.isEmpty()) {
+            return BAD_VALUE;
+        }
+        Pair<int[], String[]> typeAddresses = populateInputDevicesTypeAndAddress(devices);
+        return setDevicesRoleForCapturePreset(
+                capturePreset, role, typeAddresses.first, typeAddresses.second);
+    }
+
+    /**
+     * @hide
+     * Set devices as role for capture preset.
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param types all device types
+     * @param addresses all device addresses
+     * @return {@link #SUCCESS} if successfully set
+     */
+    private static native int setDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull int[] types, @NonNull String[] addresses);
+
+    /**
+     * @hide
+     * Add devices as role for capture preset.
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param devices the list of devices to be added as role for the given capture preset
+     * @return {@link #SUCCESS} if successfully add
+     */
+    public static int addDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devices) {
+        if (devices.isEmpty()) {
+            return BAD_VALUE;
+        }
+        Pair<int[], String[]> typeAddresses = populateInputDevicesTypeAndAddress(devices);
+        return addDevicesRoleForCapturePreset(
+                capturePreset, role, typeAddresses.first, typeAddresses.second);
+    }
+
+    /**
+     * @hide
+     * Add devices as role for capture preset.
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param types all device types
+     * @param addresses all device addresses
+     * @return {@link #SUCCESS} if successfully set
+     */
+    private static native int addDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull int[] types, @NonNull String[] addresses);
+
+    /**
+     * @hide
+     * Remove devices as role for the capture preset
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param devices the devices to be removed
+     * @return {@link #SUCCESS} if successfully removed
+     */
+    public static int removeDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devices) {
+        if (devices.isEmpty()) {
+            return BAD_VALUE;
+        }
+        Pair<int[], String[]> typeAddresses = populateInputDevicesTypeAndAddress(devices);
+        return removeDevicesRoleForCapturePreset(
+                capturePreset, role, typeAddresses.first, typeAddresses.second);
+    }
+
+    /**
+     * @hide
+     * Remove devices as role for capture preset.
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @param types all device types
+     * @param addresses all device addresses
+     * @return {@link #SUCCESS} if successfully set
+     */
+    private static native int removeDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull int[] types, @NonNull String[] addresses);
+
+    /**
+     * @hide
+     * Remove all devices as role for the capture preset
+     * @param capturePreset the capture preset to configure
+     * @param role the role of the devices
+     * @return {@link #SUCCESS} if successfully removed
+     */
+    public static native int clearDevicesRoleForCapturePreset(int capturePreset, int role);
+
+    /**
+     * @hide
+     * Query previously set devices as role for a capture preset
+     * @param capturePreset the capture preset to query for
+     * @param role the role of the devices
+     * @param devices a list that will contain the devices of role
+     * @return {@link #SUCCESS} if there is a preferred device and it was successfully retrieved
+     *     and written to the array
+     */
+    public static native int getDevicesForRoleAndCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devices);
 
     // Items shared with audio service
 
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/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index 78806eb..ebaa316 100755
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -26,10 +26,12 @@
 import android.media.IAudioFocusDispatcher;
 import android.media.IAudioRoutesObserver;
 import android.media.IAudioServerStateDispatcher;
+import android.media.ICapturePresetDevicesRoleDispatcher;
+import android.media.ICommunicationDeviceDispatcher;
 import android.media.IPlaybackConfigDispatcher;
 import android.media.IRecordingConfigDispatcher;
 import android.media.IRingtonePlayer;
-import android.media.IStrategyPreferredDeviceDispatcher;
+import android.media.IStrategyPreferredDevicesDispatcher;
 import android.media.IVolumeController;
 import android.media.IVolumeController;
 import android.media.PlayerBase;
@@ -279,11 +281,11 @@
 
     boolean isCallScreeningModeSupported();
 
-    int setPreferredDeviceForStrategy(in int strategy, in AudioDeviceAttributes device);
+    int setPreferredDevicesForStrategy(in int strategy, in List<AudioDeviceAttributes> device);
 
-    int removePreferredDeviceForStrategy(in int strategy);
+    int removePreferredDevicesForStrategy(in int strategy);
 
-    AudioDeviceAttributes getPreferredDeviceForStrategy(in int strategy);
+    List<AudioDeviceAttributes> getPreferredDevicesForStrategy(in int strategy);
 
     List<AudioDeviceAttributes> getDevicesForAttributes(in AudioAttributes attributes);
 
@@ -291,10 +293,10 @@
 
     int getAllowedCapturePolicy();
 
-    void registerStrategyPreferredDeviceDispatcher(IStrategyPreferredDeviceDispatcher dispatcher);
+    void registerStrategyPreferredDevicesDispatcher(IStrategyPreferredDevicesDispatcher dispatcher);
 
-    oneway void unregisterStrategyPreferredDeviceDispatcher(
-            IStrategyPreferredDeviceDispatcher dispatcher);
+    oneway void unregisterStrategyPreferredDevicesDispatcher(
+            IStrategyPreferredDevicesDispatcher dispatcher);
 
     oneway void setRttEnabled(in boolean rttEnabled);
 
@@ -307,4 +309,25 @@
     // code via IAudioManager.h need to be added to the top section.
 
     oneway void setMultiAudioFocusEnabled(in boolean enabled);
+
+    int setPreferredDevicesForCapturePreset(
+            in int capturePreset, in List<AudioDeviceAttributes> devices);
+
+    int clearPreferredDevicesForCapturePreset(in int capturePreset);
+
+    List<AudioDeviceAttributes> getPreferredDevicesForCapturePreset(in int capturePreset);
+
+    void registerCapturePresetDevicesRoleDispatcher(ICapturePresetDevicesRoleDispatcher dispatcher);
+
+    oneway void unregisterCapturePresetDevicesRoleDispatcher(
+            ICapturePresetDevicesRoleDispatcher dispatcher);
+
+    boolean setDeviceForCommunication(IBinder cb, int portId);
+
+    int getDeviceForCommunication();
+
+    void registerCommunicationDeviceDispatcher(ICommunicationDeviceDispatcher dispatcher);
+
+    oneway void unregisterCommunicationDeviceDispatcher(
+            ICommunicationDeviceDispatcher dispatcher);
 }
diff --git a/media/java/android/media/ICapturePresetDevicesRoleDispatcher.aidl b/media/java/android/media/ICapturePresetDevicesRoleDispatcher.aidl
new file mode 100644
index 0000000..5e03e63
--- /dev/null
+++ b/media/java/android/media/ICapturePresetDevicesRoleDispatcher.aidl
@@ -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.
+ */
+
+package android.media;
+
+import android.media.AudioDeviceAttributes;
+
+/**
+ * AIDL for AudioService to signal devices role for capture preset updates.
+ *
+ * {@hide}
+ */
+oneway interface ICapturePresetDevicesRoleDispatcher {
+
+    void dispatchDevicesRoleChanged(
+            int capturePreset, int role, in List<AudioDeviceAttributes> devices);
+
+}
diff --git a/media/java/android/media/ICommunicationDeviceDispatcher.aidl b/media/java/android/media/ICommunicationDeviceDispatcher.aidl
new file mode 100644
index 0000000..429f934
--- /dev/null
+++ b/media/java/android/media/ICommunicationDeviceDispatcher.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media;
+
+/**
+ * AIDL for AudioService to signal audio communication device updates.
+ *
+ * {@hide}
+ */
+oneway interface ICommunicationDeviceDispatcher {
+
+    void dispatchCommunicationDeviceChanged(int portId);
+
+}
diff --git a/media/java/android/media/IStrategyPreferredDeviceDispatcher.aidl b/media/java/android/media/IStrategyPreferredDeviceDispatcher.aidl
deleted file mode 100644
index b1f99e6..0000000
--- a/media/java/android/media/IStrategyPreferredDeviceDispatcher.aidl
+++ /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.
- */
-
-package android.media;
-
-import android.media.AudioDeviceAttributes;
-
-/**
- * AIDL for AudioService to signal audio strategy-preferred device updates.
- *
- * {@hide}
- */
-oneway interface IStrategyPreferredDeviceDispatcher {
-
-    void dispatchPrefDeviceChanged(int strategyId, in AudioDeviceAttributes device);
-
-}
diff --git a/media/java/android/media/IStrategyPreferredDevicesDispatcher.aidl b/media/java/android/media/IStrategyPreferredDevicesDispatcher.aidl
new file mode 100644
index 0000000..db674c3
--- /dev/null
+++ b/media/java/android/media/IStrategyPreferredDevicesDispatcher.aidl
@@ -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 android.media;
+
+import android.media.AudioDeviceAttributes;
+
+/**
+ * AIDL for AudioService to signal audio strategy-preferred devices updates.
+ *
+ * {@hide}
+ */
+oneway interface IStrategyPreferredDevicesDispatcher {
+
+    void dispatchPrefDevicesChanged(int strategyId, in List<AudioDeviceAttributes> devices);
+
+}
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index c2168f1..9657b25e 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;
@@ -1997,6 +2005,12 @@
          * 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>
+         * 32-bit processes will not support resolutions larger than 4096x4096 due to
+         * the limited address space, but performance points will be presented as is.
+         * In other words, even though a component publishes a performance point for
+         * a resolution higher than 4096x4096, it does not mean that the resolution is supported
+         * for 32-bit processes.
          */
         @Nullable
         public List<PerformancePoint> getSupportedPerformancePoints() {
@@ -2164,6 +2178,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 +2213,7 @@
                                (a.getMaxMacroBlockRate() < b.getMaxMacroBlockRate() ? -1 : 1) :
                        (a.getMaxFrameRate() != b.getMaxFrameRate()) ?
                                (a.getMaxFrameRate() < b.getMaxFrameRate() ? -1 : 1) : 0));
+
             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/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 73ef315..c61a2eb 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -404,6 +404,32 @@
         }
     }
 
+    /**
+     * @hide
+     * @param source An audio source to test
+     * @return true if the source is a valid one
+     */
+    public static boolean isValidAudioSource(int source) {
+        switch(source) {
+            case AudioSource.MIC:
+            case AudioSource.VOICE_UPLINK:
+            case AudioSource.VOICE_DOWNLINK:
+            case AudioSource.VOICE_CALL:
+            case AudioSource.CAMCORDER:
+            case AudioSource.VOICE_RECOGNITION:
+            case AudioSource.VOICE_COMMUNICATION:
+            case AudioSource.REMOTE_SUBMIX:
+            case AudioSource.UNPROCESSED:
+            case AudioSource.VOICE_PERFORMANCE:
+            case AudioSource.ECHO_REFERENCE:
+            case AudioSource.RADIO_TUNER:
+            case AudioSource.HOTWORD:
+                return true;
+            default:
+                return false;
+        }
+    }
+
     /** @hide */
     public static final String toLogFriendlyAudioSource(int source) {
         switch(source) {
diff --git a/media/java/android/media/OWNERS b/media/java/android/media/OWNERS
new file mode 100644
index 0000000..cf06fad
--- /dev/null
+++ b/media/java/android/media/OWNERS
@@ -0,0 +1,9 @@
+# Bug component: 1344
+
+fgoldfain@google.com
+elaurent@google.com
+lajos@google.com
+olly@google.com
+andrewlewis@google.com
+sungsoo@google.com
+jmtrivi@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/java/android/media/tv/tuner/Tuner.java b/media/java/android/media/tv/tuner/Tuner.java
index 8bf688d..b743a95 100644
--- a/media/java/android/media/tv/tuner/Tuner.java
+++ b/media/java/android/media/tv/tuner/Tuner.java
@@ -60,6 +60,7 @@
 
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -210,6 +211,7 @@
     @Nullable
     private FrontendInfo mFrontendInfo;
     private Integer mFrontendHandle;
+    private Boolean mIsSharedFrontend = false;
     private int mFrontendType = FrontendSettings.TYPE_UNDEFINED;
     private int mUserId;
     private Lnb mLnb;
@@ -228,8 +230,8 @@
     private Executor mOnResourceLostListenerExecutor;
 
     private Integer mDemuxHandle;
-    private Map<Integer, Descrambler> mDescramblers = new HashMap<>();
-    private List<Filter> mFilters = new ArrayList<>();
+    private Map<Integer, WeakReference<Descrambler>> mDescramblers = new HashMap<>();
+    private List<WeakReference<Filter>> mFilters = new ArrayList<WeakReference<Filter>>();
 
     private final TunerResourceManager.ResourcesReclaimListener mResourceListener =
             new TunerResourceManager.ResourcesReclaimListener() {
@@ -240,6 +242,7 @@
                                 .write(FrameworkStatsLog.TV_TUNER_STATE_CHANGED, mUserId,
                                     FrameworkStatsLog.TV_TUNER_STATE_CHANGED__STATE__UNKNOWN);
                     }
+                    releaseAll();
                     mHandler.sendMessage(mHandler.obtainMessage(MSG_RESOURCE_LOST));
                 }
             };
@@ -336,8 +339,11 @@
      */
     public void shareFrontendFromTuner(@NonNull Tuner tuner) {
         mTunerResourceManager.shareFrontend(mClientId, tuner.mClientId);
-        mFrontendHandle = tuner.mFrontendHandle;
-        mFrontend = nativeOpenFrontendByHandle(mFrontendHandle);
+        synchronized (mIsSharedFrontend) {
+            mFrontendHandle = tuner.mFrontendHandle;
+            mFrontend = tuner.mFrontend;
+            mIsSharedFrontend = true;
+        }
     }
 
     /**
@@ -362,33 +368,53 @@
      */
     @Override
     public void close() {
+        releaseAll();
+        TunerUtils.throwExceptionForResult(nativeClose(), "failed to close tuner");
+    }
+
+    private void releaseAll() {
         if (mFrontendHandle != null) {
-            int res = nativeCloseFrontend(mFrontendHandle);
-            if (res != Tuner.RESULT_SUCCESS) {
-                TunerUtils.throwExceptionForResult(res, "failed to close frontend");
+            synchronized (mIsSharedFrontend) {
+                if (!mIsSharedFrontend) {
+                    int res = nativeCloseFrontend(mFrontendHandle);
+                    if (res != Tuner.RESULT_SUCCESS) {
+                        TunerUtils.throwExceptionForResult(res, "failed to close frontend");
+                    }
+                }
+                mIsSharedFrontend = false;
             }
             mTunerResourceManager.releaseFrontend(mFrontendHandle, mClientId);
             FrameworkStatsLog
                     .write(FrameworkStatsLog.TV_TUNER_STATE_CHANGED, mUserId,
-                        FrameworkStatsLog.TV_TUNER_STATE_CHANGED__STATE__UNKNOWN);
+                    FrameworkStatsLog.TV_TUNER_STATE_CHANGED__STATE__UNKNOWN);
             mFrontendHandle = null;
             mFrontend = null;
         }
         if (mLnb != null) {
             mLnb.close();
         }
-        if (!mDescramblers.isEmpty()) {
-            for (Map.Entry<Integer, Descrambler> d : mDescramblers.entrySet()) {
-                d.getValue().close();
-                mTunerResourceManager.releaseDescrambler(d.getKey(), mClientId);
+        synchronized (mDescramblers) {
+            if (!mDescramblers.isEmpty()) {
+                for (Map.Entry<Integer, WeakReference<Descrambler>> d : mDescramblers.entrySet()) {
+                    Descrambler descrambler = d.getValue().get();
+                    if (descrambler != null) {
+                        descrambler.close();
+                    }
+                    mTunerResourceManager.releaseDescrambler(d.getKey(), mClientId);
+                }
+                mDescramblers.clear();
             }
-            mDescramblers.clear();
         }
-        if (!mFilters.isEmpty()) {
-            for (Filter f : mFilters) {
-                f.close();
+        synchronized (mFilters) {
+            if (!mFilters.isEmpty()) {
+                for (WeakReference<Filter> weakFilter : mFilters) {
+                    Filter filter = weakFilter.get();
+                    if (filter != null) {
+                        filter.close();
+                    }
+                }
+                mFilters.clear();
             }
-            mFilters.clear();
         }
         if (mDemuxHandle != null) {
             int res = nativeCloseDemux(mDemuxHandle);
@@ -396,9 +422,9 @@
                 TunerUtils.throwExceptionForResult(res, "failed to close demux");
             }
             mTunerResourceManager.releaseDemux(mDemuxHandle, mClientId);
-            mFrontendHandle = null;
+            mDemuxHandle = null;
         }
-        TunerUtils.throwExceptionForResult(nativeClose(), "failed to close tuner");
+
     }
 
     /**
@@ -610,10 +636,14 @@
     @Result
     public int scan(@NonNull FrontendSettings settings, @ScanType int scanType,
             @NonNull @CallbackExecutor Executor executor, @NonNull ScanCallback scanCallback) {
-        if (mScanCallback != null || mScanCallbackExecutor != null) {
+        /**
+         * Scan can be called again for blink scan if scanCallback and executor are same as before.
+         */
+        if (((mScanCallback != null) && (mScanCallback != scanCallback))
+                || ((mScanCallbackExecutor != null) && (mScanCallbackExecutor != executor))) {
             throw new IllegalStateException(
-                    "Scan already in progress.  stopScan must be called before a new scan can be "
-                            + "started.");
+                    "Different Scan session already in progress.  stopScan must be called "
+                        + "before a new scan session can be " + "started.");
         }
         mFrontendType = settings.getType();
         if (checkResource(TunerResourceManager.TUNER_RESOURCE_TYPE_FRONTEND)) {
@@ -944,7 +974,10 @@
             if (mHandler == null) {
                 mHandler = createEventHandler();
             }
-            mFilters.add(filter);
+            synchronized (mFilters) {
+                WeakReference<Filter> weakFilter = new WeakReference<Filter>(filter);
+                mFilters.add(weakFilter);
+            }
         }
         return filter;
     }
@@ -1112,7 +1145,10 @@
         int handle = descramblerHandle[0];
         Descrambler descrambler = nativeOpenDescramblerByHandle(handle);
         if (descrambler != null) {
-            mDescramblers.put(handle, descrambler);
+            synchronized (mDescramblers) {
+                WeakReference weakDescrambler = new WeakReference<Descrambler>(descrambler);
+                mDescramblers.put(handle, weakDescrambler);
+            }
         } else {
             mTunerResourceManager.releaseDescrambler(handle, mClientId);
         }
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/android_media_tv_Tuner.cpp b/media/jni/android_media_tv_Tuner.cpp
index 515d610..5daf8b0 100644
--- a/media/jni/android_media_tv_Tuner.cpp
+++ b/media/jni/android_media_tv_Tuner.cpp
@@ -171,6 +171,12 @@
 
 void DestroyCallback(const C2Buffer * /* buf */, void *arg) {
     android::sp<android::MediaEvent> event = (android::MediaEvent *)arg;
+    if (event->mLinearBlockObj != NULL) {
+        JNIEnv *env = android::AndroidRuntime::getJNIEnv();
+        env->DeleteWeakGlobalRef(event->mLinearBlockObj);
+        event->mLinearBlockObj = NULL;
+    }
+
     event->mAvHandleRefCnt--;
     event->finalize();
 }
@@ -182,6 +188,12 @@
     mLnb = env->NewWeakGlobalRef(lnbObj);
 }
 
+LnbCallback::~LnbCallback() {
+    JNIEnv *env = AndroidRuntime::getJNIEnv();
+    env->DeleteWeakGlobalRef(mLnb);
+    mLnb = NULL;
+}
+
 Return<void> LnbCallback::onEvent(LnbEventType lnbEventType) {
     ALOGD("LnbCallback::onEvent, type=%d", lnbEventType);
     JNIEnv *env = AndroidRuntime::getJNIEnv();
@@ -291,8 +303,9 @@
 C2DataIdInfo::C2DataIdInfo(uint32_t index, uint64_t value) : C2Param(kParamSize, index) {
     CHECK(isGlobal());
     CHECK_EQ(C2Param::INFO, kind());
-    DummyInfo info{value};
-    memcpy(this + 1, static_cast<C2Param *>(&info) + 1, kParamSize - sizeof(C2Param));
+    mInfo = StubInfo(value);
+    memcpy(static_cast<C2Param *>(this) + 1, static_cast<C2Param *>(&mInfo) + 1,
+            kParamSize - sizeof(C2Param));
 }
 
 /////////////// MediaEvent ///////////////////////
@@ -304,6 +317,7 @@
     JNIEnv *env = AndroidRuntime::getJNIEnv();
     mMediaEventObj = env->NewWeakGlobalRef(obj);
     mAvHandle = native_handle_clone(avHandle.getNativeHandle());
+    mLinearBlockObj = NULL;
 }
 
 MediaEvent::~MediaEvent() {
@@ -337,33 +351,44 @@
     }
     mIonHandle = new C2HandleIon(dup(mAvHandle->data[0]), mDataLength);
     std::shared_ptr<C2LinearBlock> block = _C2BlockFactory::CreateLinearBlock(mIonHandle);
-
-    JNIEnv *env = AndroidRuntime::getJNIEnv();
-    std::unique_ptr<JMediaCodecLinearBlock> context{new JMediaCodecLinearBlock};
-    context->mBlock = block;
-    std::shared_ptr<C2Buffer> pC2Buffer = context->toC2Buffer(0, mDataLength);
-    context->mBuffer = pC2Buffer;
-    mC2Buffer = pC2Buffer;
-    if (mAvHandle->numInts > 0) {
-        // use first int in the native_handle as the index
-        int index = mAvHandle->data[mAvHandle->numFds];
-        std::shared_ptr<C2Param> c2param = std::make_shared<C2DataIdInfo>(index, mDataId);
-        std::shared_ptr<C2Info> info(std::static_pointer_cast<C2Info>(c2param));
-        pC2Buffer->setInfo(info);
+    if (block != nullptr) {
+        // CreateLinearBlock delete mIonHandle after it create block successfully.
+        // ToDo: coordinate who is response to delete mIonHandle
+        mIonHandle = NULL;
+        JNIEnv *env = AndroidRuntime::getJNIEnv();
+        std::unique_ptr<JMediaCodecLinearBlock> context{new JMediaCodecLinearBlock};
+        context->mBlock = block;
+        std::shared_ptr<C2Buffer> pC2Buffer = context->toC2Buffer(0, mDataLength);
+        context->mBuffer = pC2Buffer;
+        mC2Buffer = pC2Buffer;
+        if (mAvHandle->numInts > 0) {
+            // use first int in the native_handle as the index
+            int index = mAvHandle->data[mAvHandle->numFds];
+            std::shared_ptr<C2Param> c2param = std::make_shared<C2DataIdInfo>(index, mDataId);
+            std::shared_ptr<C2Info> info(std::static_pointer_cast<C2Info>(c2param));
+            pC2Buffer->setInfo(info);
+        }
+        pC2Buffer->registerOnDestroyNotify(&DestroyCallback, this);
+        jobject linearBlock =
+                env->NewObject(
+                        env->FindClass("android/media/MediaCodec$LinearBlock"),
+                        gFields.linearBlockInitID);
+        env->CallVoidMethod(
+                linearBlock,
+                gFields.linearBlockSetInternalStateID,
+                (jlong)context.release(),
+                true);
+        mLinearBlockObj = env->NewWeakGlobalRef(linearBlock);
+        mAvHandleRefCnt++;
+        return linearBlock;
+    } else {
+        native_handle_close(const_cast<native_handle_t*>(
+                    reinterpret_cast<const native_handle_t*>(mIonHandle)));
+        native_handle_delete(const_cast<native_handle_t*>(
+                    reinterpret_cast<const native_handle_t*>(mIonHandle)));
+        mIonHandle = NULL;
+        return NULL;
     }
-    pC2Buffer->registerOnDestroyNotify(&DestroyCallback, this);
-    jobject linearBlock =
-            env->NewObject(
-                    env->FindClass("android/media/MediaCodec$LinearBlock"),
-                    gFields.linearBlockInitID);
-    env->CallVoidMethod(
-            linearBlock,
-            gFields.linearBlockSetInternalStateID,
-            (jlong)context.release(),
-            true);
-    mLinearBlockObj = env->NewWeakGlobalRef(linearBlock);
-    mAvHandleRefCnt++;
-    return mLinearBlockObj;
 }
 
 uint64_t MediaEvent::getAudioHandle() {
@@ -447,7 +472,7 @@
         if (mediaEvent.avMemory.getNativeHandle() != NULL || mediaEvent.avDataId != 0) {
             sp<MediaEvent> mediaEventSp =
                            new MediaEvent(mIFilter, mediaEvent.avMemory,
-                               mediaEvent.avDataId, dataLength, obj);
+                               mediaEvent.avDataId, dataLength + offset, obj);
             mediaEventSp->mAvHandleRefCnt++;
             env->SetLongField(obj, eventContext, (jlong) mediaEventSp.get());
             mediaEventSp->incStrong(obj);
@@ -2048,7 +2073,7 @@
                     env->GetIntField(settings, env->GetFieldID(clazz, "mModulation", "I")));
     FrontendInnerFec innerFec =
             static_cast<FrontendInnerFec>(
-                    env->GetLongField(settings, env->GetFieldID(clazz, "mFec", "J")));
+                    env->GetLongField(settings, env->GetFieldID(clazz, "mInnerFec", "J")));
     uint32_t symbolRate =
             static_cast<uint32_t>(
                     env->GetIntField(settings, env->GetFieldID(clazz, "mSymbolRate", "I")));
@@ -2057,7 +2082,7 @@
                     env->GetIntField(settings, env->GetFieldID(clazz, "mOuterFec", "I")));
     FrontendDvbcAnnex annex =
             static_cast<FrontendDvbcAnnex>(
-                    env->GetByteField(settings, env->GetFieldID(clazz, "mAnnex", "B")));
+                    env->GetIntField(settings, env->GetFieldID(clazz, "mAnnex", "I")));
     FrontendDvbcSpectralInversion spectralInversion =
             static_cast<FrontendDvbcSpectralInversion>(
                     env->GetIntField(
@@ -3497,6 +3522,10 @@
     } else {
         ALOGE("dvrMq.beginWrite failed");
     }
+
+    if (ret > 0) {
+        dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_READY));
+    }
     return (jlong) ret;
 }
 
@@ -3524,7 +3553,7 @@
 
     if (dvrSp->mDvrMQ->write(reinterpret_cast<unsigned char*>(src) + offset, size)) {
         env->ReleaseByteArrayElements(buffer, src, 0);
-        dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_CONSUMED));
+        dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_READY));
     } else {
         ALOGD("Failed to write FMQ");
         env->ReleaseByteArrayElements(buffer, src, 0);
@@ -3585,6 +3614,9 @@
     } else {
         ALOGE("dvrMq.beginRead failed");
     }
+    if (ret > 0) {
+        dvrSp->mDvrMQEventFlag->wake(static_cast<uint32_t>(DemuxQueueNotifyBits::DATA_CONSUMED));
+    }
 
     return (jlong) ret;
 }
diff --git a/media/jni/android_media_tv_Tuner.h b/media/jni/android_media_tv_Tuner.h
index 83e9db7..c4deeaf 100644
--- a/media/jni/android_media_tv_Tuner.h
+++ b/media/jni/android_media_tv_Tuner.h
@@ -73,6 +73,7 @@
 
 struct LnbCallback : public ILnbCallback {
     LnbCallback(jweak tunerObj, LnbId id);
+    ~LnbCallback();
     virtual Return<void> onEvent(LnbEventType lnbEventType);
     virtual Return<void> onDiseqcMessage(const hidl_vec<uint8_t>& diseqcMessage);
     jweak mLnb;
@@ -250,8 +251,9 @@
 public:
     C2DataIdInfo(uint32_t index, uint64_t value);
 private:
-    typedef C2GlobalParam<C2Info, C2Int64Value, 0> DummyInfo;
-    static const size_t kParamSize = sizeof(DummyInfo);
+    typedef C2GlobalParam<C2Info, C2Int64Value, 0> StubInfo;
+    StubInfo mInfo;
+    static const size_t kParamSize = sizeof(StubInfo);
 };
 
 }  // namespace android
diff --git a/media/jni/audioeffect/android_media_AudioEffect.cpp b/media/jni/audioeffect/android_media_AudioEffect.cpp
index d55e9d0..0d53ab1 100644
--- a/media/jni/audioeffect/android_media_AudioEffect.cpp
+++ b/media/jni/audioeffect/android_media_AudioEffect.cpp
@@ -333,7 +333,7 @@
     if (deviceType != AUDIO_DEVICE_NONE) {
         device.mType = (audio_devices_t)deviceType;
         ScopedUtfChars address(env, deviceAddress);
-        device.mAddress = address.c_str();
+        device.setAddress(address.c_str());
     }
 
     // create the native AudioEffect object
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/mime/OWNERS b/mime/OWNERS
new file mode 100644
index 0000000..2357979
--- /dev/null
+++ b/mime/OWNERS
@@ -0,0 +1,2 @@
+include platform/libcore:/OWNERS
+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/OWNERS b/native/android/OWNERS
index 266764a..ac5a895 100644
--- a/native/android/OWNERS
+++ b/native/android/OWNERS
@@ -1,4 +1,3 @@
-set noparent
-
+per-file libandroid_net.map.txt, net.c = set noparent
 per-file libandroid_net.map.txt, net.c = codewiz@google.com, jchalard@google.com, junyulai@google.com
 per-file libandroid_net.map.txt, net.c = lorenzo@google.com, reminv@google.com, satk@google.com
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..d81ea2c
--- /dev/null
+++ b/native/graphics/OWNERS
@@ -0,0 +1 @@
+include /graphics/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/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/Connectivity/service/Android.bp b/packages/Connectivity/service/Android.bp
new file mode 100644
index 0000000..a26f715
--- /dev/null
+++ b/packages/Connectivity/service/Android.bp
@@ -0,0 +1,79 @@
+//
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_defaults {
+    name: "libservice-connectivity-defaults",
+    // TODO: build against the NDK (sdk_version: "30" for example)
+    cflags: [
+        "-Wall",
+        "-Werror",
+        "-Wno-unused-parameter",
+        "-Wthread-safety",
+    ],
+    srcs: [
+        "jni/com_android_server_TestNetworkService.cpp",
+        "jni/com_android_server_connectivity_Vpn.cpp",
+    ],
+    shared_libs: [
+        "libbase",
+        "liblog",
+        "libnativehelper",
+        // TODO: remove dependency on ifc_[add/del]_address by having Java code to add/delete
+        // addresses, and remove dependency on libnetutils.
+        "libnetutils",
+    ],
+}
+
+cc_library_shared {
+    name: "libservice-connectivity",
+    defaults: ["libservice-connectivity-defaults"],
+    srcs: [
+        "jni/onload.cpp",
+    ],
+    apex_available: [
+        // TODO: move this library to the tethering APEX and remove libservice-connectivity-static
+        // "com.android.tethering",
+    ],
+}
+
+// Static library linked into libservices.core until libservice-connectivity can be loaded from
+// the tethering APEX instead.
+cc_library_static {
+    name: "libservice-connectivity-static",
+    defaults: ["libservice-connectivity-defaults"],
+}
+
+java_library {
+    name: "service-connectivity",
+    srcs: [
+        ":connectivity-service-srcs",
+    ],
+    installable: true,
+    jarjar_rules: "jarjar-rules.txt",
+    libs: [
+        "android.net.ipsec.ike",
+        "services.core",
+        "services.net",
+        "unsupportedappusage",
+    ],
+    static_libs: [
+        "net-utils-device-common",
+        "net-utils-framework-common",
+    ],
+    apex_available: [
+        "//apex_available:platform",
+    ],
+}
diff --git a/packages/Connectivity/service/jarjar-rules.txt b/packages/Connectivity/service/jarjar-rules.txt
new file mode 100644
index 0000000..ef53ebb
--- /dev/null
+++ b/packages/Connectivity/service/jarjar-rules.txt
@@ -0,0 +1 @@
+rule com.android.net.module.util.** com.android.connectivity.util.@1
\ No newline at end of file
diff --git a/services/core/jni/com_android_server_TestNetworkService.cpp b/packages/Connectivity/service/jni/com_android_server_TestNetworkService.cpp
similarity index 100%
rename from services/core/jni/com_android_server_TestNetworkService.cpp
rename to packages/Connectivity/service/jni/com_android_server_TestNetworkService.cpp
diff --git a/packages/Connectivity/service/jni/com_android_server_connectivity_Vpn.cpp b/packages/Connectivity/service/jni/com_android_server_connectivity_Vpn.cpp
new file mode 100644
index 0000000..ea5e718
--- /dev/null
+++ b/packages/Connectivity/service/jni/com_android_server_connectivity_Vpn.cpp
@@ -0,0 +1,377 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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_NDEBUG 0
+
+#define LOG_TAG "VpnJni"
+
+#include <arpa/inet.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <linux/if.h>
+#include <linux/if_tun.h>
+#include <linux/route.h>
+#include <linux/ipv6_route.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <log/log.h>
+#include <android/log.h>
+
+#include "netutils/ifc.h"
+
+#include "jni.h"
+#include <nativehelper/JNIHelp.h>
+
+namespace android
+{
+
+static int inet4 = -1;
+static int inet6 = -1;
+
+static inline in_addr_t *as_in_addr(sockaddr *sa) {
+    return &((sockaddr_in *)sa)->sin_addr.s_addr;
+}
+
+//------------------------------------------------------------------------------
+
+#define SYSTEM_ERROR (-1)
+#define BAD_ARGUMENT (-2)
+
+static int create_interface(int mtu)
+{
+    int tun = open("/dev/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC);
+
+    ifreq ifr4;
+    memset(&ifr4, 0, sizeof(ifr4));
+
+    // Allocate interface.
+    ifr4.ifr_flags = IFF_TUN | IFF_NO_PI;
+    if (ioctl(tun, TUNSETIFF, &ifr4)) {
+        ALOGE("Cannot allocate TUN: %s", strerror(errno));
+        goto error;
+    }
+
+    // Activate interface.
+    ifr4.ifr_flags = IFF_UP;
+    if (ioctl(inet4, SIOCSIFFLAGS, &ifr4)) {
+        ALOGE("Cannot activate %s: %s", ifr4.ifr_name, strerror(errno));
+        goto error;
+    }
+
+    // Set MTU if it is specified.
+    ifr4.ifr_mtu = mtu;
+    if (mtu > 0 && ioctl(inet4, SIOCSIFMTU, &ifr4)) {
+        ALOGE("Cannot set MTU on %s: %s", ifr4.ifr_name, strerror(errno));
+        goto error;
+    }
+
+    return tun;
+
+error:
+    close(tun);
+    return SYSTEM_ERROR;
+}
+
+static int get_interface_name(char *name, int tun)
+{
+    ifreq ifr4;
+    if (ioctl(tun, TUNGETIFF, &ifr4)) {
+        ALOGE("Cannot get interface name: %s", strerror(errno));
+        return SYSTEM_ERROR;
+    }
+    strncpy(name, ifr4.ifr_name, IFNAMSIZ);
+    return 0;
+}
+
+static int get_interface_index(const char *name)
+{
+    ifreq ifr4;
+    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
+    if (ioctl(inet4, SIOGIFINDEX, &ifr4)) {
+        ALOGE("Cannot get index of %s: %s", name, strerror(errno));
+        return SYSTEM_ERROR;
+    }
+    return ifr4.ifr_ifindex;
+}
+
+static int set_addresses(const char *name, const char *addresses)
+{
+    int index = get_interface_index(name);
+    if (index < 0) {
+        return index;
+    }
+
+    ifreq ifr4;
+    memset(&ifr4, 0, sizeof(ifr4));
+    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
+    ifr4.ifr_addr.sa_family = AF_INET;
+    ifr4.ifr_netmask.sa_family = AF_INET;
+
+    in6_ifreq ifr6;
+    memset(&ifr6, 0, sizeof(ifr6));
+    ifr6.ifr6_ifindex = index;
+
+    char address[65];
+    int prefix;
+    int chars;
+    int count = 0;
+
+    while (sscanf(addresses, " %64[^/]/%d %n", address, &prefix, &chars) == 2) {
+        addresses += chars;
+
+        if (strchr(address, ':')) {
+            // Add an IPv6 address.
+            if (inet_pton(AF_INET6, address, &ifr6.ifr6_addr) != 1 ||
+                    prefix < 0 || prefix > 128) {
+                count = BAD_ARGUMENT;
+                break;
+            }
+
+            ifr6.ifr6_prefixlen = prefix;
+            if (ioctl(inet6, SIOCSIFADDR, &ifr6)) {
+                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
+                break;
+            }
+        } else {
+            // Add an IPv4 address.
+            if (inet_pton(AF_INET, address, as_in_addr(&ifr4.ifr_addr)) != 1 ||
+                    prefix < 0 || prefix > 32) {
+                count = BAD_ARGUMENT;
+                break;
+            }
+
+            if (count) {
+                snprintf(ifr4.ifr_name, sizeof(ifr4.ifr_name), "%s:%d", name, count);
+            }
+            if (ioctl(inet4, SIOCSIFADDR, &ifr4)) {
+                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
+                break;
+            }
+
+            in_addr_t mask = prefix ? (~0 << (32 - prefix)) : 0;
+            *as_in_addr(&ifr4.ifr_netmask) = htonl(mask);
+            if (ioctl(inet4, SIOCSIFNETMASK, &ifr4)) {
+                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
+                break;
+            }
+        }
+        ALOGD("Address added on %s: %s/%d", name, address, prefix);
+        ++count;
+    }
+
+    if (count == BAD_ARGUMENT) {
+        ALOGE("Invalid address: %s/%d", address, prefix);
+    } else if (count == SYSTEM_ERROR) {
+        ALOGE("Cannot add address: %s/%d: %s", address, prefix, strerror(errno));
+    } else if (*addresses) {
+        ALOGE("Invalid address: %s", addresses);
+        count = BAD_ARGUMENT;
+    }
+
+    return count;
+}
+
+static int reset_interface(const char *name)
+{
+    ifreq ifr4;
+    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
+    ifr4.ifr_flags = 0;
+
+    if (ioctl(inet4, SIOCSIFFLAGS, &ifr4) && errno != ENODEV) {
+        ALOGE("Cannot reset %s: %s", name, strerror(errno));
+        return SYSTEM_ERROR;
+    }
+    return 0;
+}
+
+static int check_interface(const char *name)
+{
+    ifreq ifr4;
+    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
+    ifr4.ifr_flags = 0;
+
+    if (ioctl(inet4, SIOCGIFFLAGS, &ifr4) && errno != ENODEV) {
+        ALOGE("Cannot check %s: %s", name, strerror(errno));
+    }
+    return ifr4.ifr_flags;
+}
+
+static bool modifyAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
+                          jint jPrefixLength, bool add)
+{
+    int error = SYSTEM_ERROR;
+    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
+    const char *address = jAddress ? env->GetStringUTFChars(jAddress, NULL) : NULL;
+
+    if (!name) {
+        jniThrowNullPointerException(env, "name");
+    } else if (!address) {
+        jniThrowNullPointerException(env, "address");
+    } else {
+        if (add) {
+            if ((error = ifc_add_address(name, address, jPrefixLength)) != 0) {
+                ALOGE("Cannot add address %s/%d on interface %s (%s)", address, jPrefixLength, name,
+                      strerror(-error));
+            }
+        } else {
+            if ((error = ifc_del_address(name, address, jPrefixLength)) != 0) {
+                ALOGE("Cannot del address %s/%d on interface %s (%s)", address, jPrefixLength, name,
+                      strerror(-error));
+            }
+        }
+    }
+
+    if (name) {
+        env->ReleaseStringUTFChars(jName, name);
+    }
+    if (address) {
+        env->ReleaseStringUTFChars(jAddress, address);
+    }
+    return !error;
+}
+
+//------------------------------------------------------------------------------
+
+static void throwException(JNIEnv *env, int error, const char *message)
+{
+    if (error == SYSTEM_ERROR) {
+        jniThrowException(env, "java/lang/IllegalStateException", message);
+    } else {
+        jniThrowException(env, "java/lang/IllegalArgumentException", message);
+    }
+}
+
+static jint create(JNIEnv *env, jobject /* thiz */, jint mtu)
+{
+    int tun = create_interface(mtu);
+    if (tun < 0) {
+        throwException(env, tun, "Cannot create interface");
+        return -1;
+    }
+    return tun;
+}
+
+static jstring getName(JNIEnv *env, jobject /* thiz */, jint tun)
+{
+    char name[IFNAMSIZ];
+    if (get_interface_name(name, tun) < 0) {
+        throwException(env, SYSTEM_ERROR, "Cannot get interface name");
+        return NULL;
+    }
+    return env->NewStringUTF(name);
+}
+
+static jint setAddresses(JNIEnv *env, jobject /* thiz */, jstring jName,
+        jstring jAddresses)
+{
+    const char *name = NULL;
+    const char *addresses = NULL;
+    int count = -1;
+
+    name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
+    if (!name) {
+        jniThrowNullPointerException(env, "name");
+        goto error;
+    }
+    addresses = jAddresses ? env->GetStringUTFChars(jAddresses, NULL) : NULL;
+    if (!addresses) {
+        jniThrowNullPointerException(env, "addresses");
+        goto error;
+    }
+    count = set_addresses(name, addresses);
+    if (count < 0) {
+        throwException(env, count, "Cannot set address");
+        count = -1;
+    }
+
+error:
+    if (name) {
+        env->ReleaseStringUTFChars(jName, name);
+    }
+    if (addresses) {
+        env->ReleaseStringUTFChars(jAddresses, addresses);
+    }
+    return count;
+}
+
+static void reset(JNIEnv *env, jobject /* thiz */, jstring jName)
+{
+    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
+    if (!name) {
+        jniThrowNullPointerException(env, "name");
+        return;
+    }
+    if (reset_interface(name) < 0) {
+        throwException(env, SYSTEM_ERROR, "Cannot reset interface");
+    }
+    env->ReleaseStringUTFChars(jName, name);
+}
+
+static jint check(JNIEnv *env, jobject /* thiz */, jstring jName)
+{
+    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
+    if (!name) {
+        jniThrowNullPointerException(env, "name");
+        return 0;
+    }
+    int flags = check_interface(name);
+    env->ReleaseStringUTFChars(jName, name);
+    return flags;
+}
+
+static bool addAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
+                       jint jPrefixLength)
+{
+    return modifyAddress(env, thiz, jName, jAddress, jPrefixLength, true);
+}
+
+static bool delAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
+                       jint jPrefixLength)
+{
+    return modifyAddress(env, thiz, jName, jAddress, jPrefixLength, false);
+}
+
+//------------------------------------------------------------------------------
+
+static const JNINativeMethod gMethods[] = {
+    {"jniCreate", "(I)I", (void *)create},
+    {"jniGetName", "(I)Ljava/lang/String;", (void *)getName},
+    {"jniSetAddresses", "(Ljava/lang/String;Ljava/lang/String;)I", (void *)setAddresses},
+    {"jniReset", "(Ljava/lang/String;)V", (void *)reset},
+    {"jniCheck", "(Ljava/lang/String;)I", (void *)check},
+    {"jniAddAddress", "(Ljava/lang/String;Ljava/lang/String;I)Z", (void *)addAddress},
+    {"jniDelAddress", "(Ljava/lang/String;Ljava/lang/String;I)Z", (void *)delAddress},
+};
+
+int register_android_server_connectivity_Vpn(JNIEnv *env)
+{
+    if (inet4 == -1) {
+        inet4 = socket(AF_INET, SOCK_DGRAM, 0);
+    }
+    if (inet6 == -1) {
+        inet6 = socket(AF_INET6, SOCK_DGRAM, 0);
+    }
+    return jniRegisterNativeMethods(env, "com/android/server/connectivity/Vpn",
+            gMethods, NELEM(gMethods));
+}
+
+};
diff --git a/packages/Connectivity/service/jni/onload.cpp b/packages/Connectivity/service/jni/onload.cpp
new file mode 100644
index 0000000..3afcb0e
--- /dev/null
+++ b/packages/Connectivity/service/jni/onload.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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 <nativehelper/JNIHelp.h>
+#include <log/log.h>
+
+namespace android {
+
+int register_android_server_connectivity_Vpn(JNIEnv* env);
+int register_android_server_TestNetworkService(JNIEnv* env);
+
+extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
+    JNIEnv *env;
+    if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
+        ALOGE("GetEnv failed");
+        return JNI_ERR;
+    }
+
+    if (register_android_server_connectivity_Vpn(env) < 0
+        || register_android_server_TestNetworkService(env) < 0) {
+        return JNI_ERR;
+    }
+
+    return JNI_VERSION_1_6;
+}
+
+};
\ No newline at end of file
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/OWNERS b/packages/DynamicSystemInstallationService/OWNERS
new file mode 100644
index 0000000..c1b7ec4
--- /dev/null
+++ b/packages/DynamicSystemInstallationService/OWNERS
@@ -0,0 +1,3 @@
+howardsoc@google.com
+pchsueh@google.com
+yochiang@google.com
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
index ac27580..a4896cb2 100644
--- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
+++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java
@@ -211,10 +211,10 @@
 
     @Override
     public void onProgressUpdate(InstallationAsyncTask.Progress progress) {
-        mCurrentPartitionName = progress.mPartitionName;
-        mCurrentPartitionSize = progress.mPartitionSize;
-        mCurrentPartitionInstalledSize = progress.mInstalledSize;
-        mNumInstalledPartitions = progress.mNumInstalledPartitions;
+        mCurrentPartitionName = progress.partitionName;
+        mCurrentPartitionSize = progress.partitionSize;
+        mCurrentPartitionInstalledSize = progress.installedSize;
+        mNumInstalledPartitions = progress.numInstalledPartitions;
 
         postStatus(STATUS_IN_PROGRESS, CAUSE_NOT_SPECIFIED, null);
     }
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
index 4d31ce9..ac73f35 100644
--- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
+++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/InstallationAsyncTask.java
@@ -102,20 +102,16 @@
     static final int RESULT_ERROR_UNSUPPORTED_FORMAT = 5;
     static final int RESULT_ERROR_EXCEPTION = 6;
 
-    class Progress {
-        String mPartitionName;
-        long mPartitionSize;
-        long mInstalledSize;
+    static class Progress {
+        public final String partitionName;
+        public final long partitionSize;
+        public final int numInstalledPartitions;
+        public long installedSize;
 
-        int mNumInstalledPartitions;
-
-        Progress(String partitionName, long partitionSize, long installedSize,
-                int numInstalled) {
-            mPartitionName = partitionName;
-            mPartitionSize = partitionSize;
-            mInstalledSize = installedSize;
-
-            mNumInstalledPartitions = numInstalled;
+        Progress(String partitionName, long partitionSize, int numInstalledPartitions) {
+            this.partitionName = partitionName;
+            this.partitionSize = partitionSize;
+            this.numInstalledPartitions = numInstalledPartitions;
         }
     }
 
@@ -141,6 +137,8 @@
     private boolean mIsZip;
     private boolean mIsCompleted;
 
+    private int mNumInstalledPartitions;
+
     private InputStream mStream;
     private ZipFile mZipFile;
 
@@ -312,18 +310,17 @@
         Log.d(TAG, "Creating partition: userdata");
         thread.start();
 
-        long installedSize = 0;
-        Progress progress = new Progress("userdata", mUserdataSize, installedSize, 0);
+        Progress progress = new Progress("userdata", mUserdataSize, mNumInstalledPartitions++);
 
         while (thread.isAlive()) {
             if (isCancelled()) {
                 return;
             }
 
-            installedSize = mDynSystem.getInstallationProgress().bytes_processed;
+            final long installedSize = mDynSystem.getInstallationProgress().bytes_processed;
 
-            if (installedSize > progress.mInstalledSize + MIN_PROGRESS_TO_PUBLISH) {
-                progress.mInstalledSize = installedSize;
+            if (installedSize > progress.installedSize + MIN_PROGRESS_TO_PUBLISH) {
+                progress.installedSize = installedSize;
                 publishProgress(progress);
             }
 
@@ -357,7 +354,7 @@
     private void installStreamingGzUpdate()
             throws IOException, InterruptedException, ImageValidationException {
         Log.d(TAG, "To install a streaming GZ update");
-        installImage("system", mSystemSize, new GZIPInputStream(mStream), 1);
+        installImage("system", mSystemSize, new GZIPInputStream(mStream));
     }
 
     private void installStreamingZipUpdate()
@@ -367,12 +364,8 @@
         ZipInputStream zis = new ZipInputStream(mStream);
         ZipEntry zipEntry = null;
 
-        int numInstalledPartitions = 1;
-
         while ((zipEntry = zis.getNextEntry()) != null) {
-            if (installImageFromAnEntry(zipEntry, zis, numInstalledPartitions)) {
-                numInstalledPartitions++;
-            }
+            installImageFromAnEntry(zipEntry, zis);
 
             if (isCancelled()) {
                 break;
@@ -385,14 +378,10 @@
         Log.d(TAG, "To install a local ZIP update");
 
         Enumeration<? extends ZipEntry> entries = mZipFile.entries();
-        int numInstalledPartitions = 1;
 
         while (entries.hasMoreElements()) {
             ZipEntry entry = entries.nextElement();
-            if (installImageFromAnEntry(
-                    entry, mZipFile.getInputStream(entry), numInstalledPartitions)) {
-                numInstalledPartitions++;
-            }
+            installImageFromAnEntry(entry, mZipFile.getInputStream(entry));
 
             if (isCancelled()) {
                 break;
@@ -400,8 +389,7 @@
         }
     }
 
-    private boolean installImageFromAnEntry(
-            ZipEntry entry, InputStream is, int numInstalledPartitions)
+    private boolean installImageFromAnEntry(ZipEntry entry, InputStream is)
             throws IOException, InterruptedException, ImageValidationException {
         String name = entry.getName();
 
@@ -420,13 +408,12 @@
 
         long uncompressedSize = entry.getSize();
 
-        installImage(partitionName, uncompressedSize, is, numInstalledPartitions);
+        installImage(partitionName, uncompressedSize, is);
 
         return true;
     }
 
-    private void installImage(
-            String partitionName, long uncompressedSize, InputStream is, int numInstalledPartitions)
+    private void installImage(String partitionName, long uncompressedSize, InputStream is)
             throws IOException, InterruptedException, ImageValidationException {
 
         SparseInputStream sis = new SparseInputStream(new BufferedInputStream(is));
@@ -473,10 +460,9 @@
 
         mInstallationSession.setAshmem(pfd, READ_BUFFER_SIZE);
 
-        long installedSize = 0;
-        Progress progress = new Progress(
-                partitionName, partitionSize, installedSize, numInstalledPartitions);
+        Progress progress = new Progress(partitionName, partitionSize, mNumInstalledPartitions++);
 
+        long installedSize = 0;
         byte[] bytes = new byte[READ_BUFFER_SIZE];
         int numBytesRead;
 
@@ -493,8 +479,8 @@
 
             installedSize += numBytesRead;
 
-            if (installedSize > progress.mInstalledSize + MIN_PROGRESS_TO_PUBLISH) {
-                progress.mInstalledSize = installedSize;
+            if (installedSize > progress.installedSize + MIN_PROGRESS_TO_PUBLISH) {
+                progress.installedSize = installedSize;
                 publishProgress(progress);
             }
         }
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/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/OsuLogin/Android.bp b/packages/OsuLogin/Android.bp
deleted file mode 100644
index 445c81b..0000000
--- a/packages/OsuLogin/Android.bp
+++ /dev/null
@@ -1,18 +0,0 @@
-android_app {
-    name: "OsuLogin",
-    defaults: ["wifi-module-sdk-version-defaults"],
-    static_libs: ["androidx.legacy_legacy-support-v4"],
-    resource_dirs: ["res"],
-    srcs: ["src/**/*.java"],
-    sdk_version: "system_current",
-    certificate: ":com.android.hotspot2.osulogin.certificate",
-    apex_available: [
-        "com.android.wifi",
-        "test_com.android.wifi",
-    ],
-}
-
-android_app_certificate {
-    name: "com.android.hotspot2.osulogin.certificate",
-    certificate: "certs/com.android.hotspot2.osulogin"
-}
diff --git a/packages/OsuLogin/AndroidManifest.xml b/packages/OsuLogin/AndroidManifest.xml
deleted file mode 100644
index a428cb3..0000000
--- a/packages/OsuLogin/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * 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.
- */
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.android.hotspot2.osulogin">
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.INTERNET"/>
-
-    <application
-        android:networkSecurityConfig="@xml/network_security_config"
-        android:enabled="true"
-        android:label="@string/app_name"
-        android:configChanges="keyboardHidden|orientation|screenSize"
-        android:supportsRtl="true">
-        <activity android:name="com.android.hotspot2.osulogin.OsuLoginActivity"
-                  android:label="@string/action_bar_label"
-                  android:theme="@style/AppTheme"
-                  android:configChanges="keyboardHidden|orientation|screenSize">
-            <intent-filter>
-                <action android:name="android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW"/>
-                <category android:name="android.intent.category.DEFAULT"/>
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/packages/OsuLogin/OWNERS b/packages/OsuLogin/OWNERS
deleted file mode 100644
index aa7c3e6..0000000
--- a/packages/OsuLogin/OWNERS
+++ /dev/null
@@ -1,2 +0,0 @@
-satk@google.com
-etancohen@google.com
diff --git a/packages/OsuLogin/certs/com.android.hotspot2.osulogin.pk8 b/packages/OsuLogin/certs/com.android.hotspot2.osulogin.pk8
deleted file mode 100644
index 87fd622..0000000
--- a/packages/OsuLogin/certs/com.android.hotspot2.osulogin.pk8
+++ /dev/null
Binary files differ
diff --git a/packages/OsuLogin/certs/com.android.hotspot2.osulogin.x509.pem b/packages/OsuLogin/certs/com.android.hotspot2.osulogin.x509.pem
deleted file mode 100644
index 1dfe701..0000000
--- a/packages/OsuLogin/certs/com.android.hotspot2.osulogin.x509.pem
+++ /dev/null
@@ -1,35 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIGDzCCA/egAwIBAgIUHzkh0UCF/H+1mZZp0ROX4nXKOUowDQYJKoZIhvcNAQEL
-BQAwgZUxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQH
-DA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYDVQQLDAdBbmRy
-b2lkMREwDwYDVQQDDAhPc3VMb2dpbjEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBh
-bmRyb2lkLmNvbTAgFw0yMDAzMjUwMjQ5MTNaGA80NzU4MDIxOTAyNDkxM1owgZUx
-CzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3Vu
-dGFpbiBWaWV3MRAwDgYDVQQKDAdBbmRyb2lkMRAwDgYDVQQLDAdBbmRyb2lkMREw
-DwYDVQQDDAhPc3VMb2dpbjEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lk
-LmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMJDnjAeIZ2KUvKc
-ONwxuzIhLvXr6LRm+Uz0ebjz++5IzQJLwr/COPBG9zbIm8izj2acp+l4WVEYT6I4
-Es5LEp556ySCuZx8IjOd0Zd6NCdaKmYouDTjYTrELWUlZjfA7Km2L5x2M6ArnDO5
-zJ1BIsQ06S3C7iR3ktAQ1cFdidg6Ha2gainS0A1JKN3kL9BL1pvHRLzWZX4gsNhB
-C/6Ue3W3Sx2JRQkaaLksDdoKq0QswEk5tGfKbVr9+hHv/pztaaqEXSeV6f305cAx
-Hzd6+QJ8f8AJz2Rhnv43y72UO8b02CSP3laUj8geidR8XXw+R7Kzu8NfFDL7uVIh
-ktPaBxfWPNYtedp3JrGeZhkzljsushY+bVHECEzROhY2CiUZBEn+wwZLWe2W7oee
-VCL1EZBYctK5CfrrV6x0wvbBUF/ViwV+2LQXQNp08xB8bJBqoBn4KZjK0tTN86Dq
-qRALyoVIVh5VDU9Wbi3vrJb0/9TEQtMjuo0DS3hdtnowdRyAyhwbQHO26dqnnzBI
-XtTAve4RkOwnb8QzZde56qvRgweDE9Im1jpx4E+MMGqVYs8Txurmd/t6bCjTvp1P
-4i88crk/zqCoHEQEbiaNdfkULJAWg9wqxPjqPCTVNtOXoJwuHsNymQVSztIUSySz
-ZQ8Trk0ApqQf8yH2mjM6HJJZoNpBAgMBAAGjUzBRMB0GA1UdDgQWBBRdpduh1P+I
-BMbg5S4n1kbj5hQsOzAfBgNVHSMEGDAWgBRdpduh1P+IBMbg5S4n1kbj5hQsOzAP
-BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4ICAQB+FzSuoA7LCvn8l86V
-sSI4lH1KLLH+wrXp20w/wYcBY+s4hYPpAJ8YbEMOT9uibK/HpEWYFqiVCqk4gKXr
-Qraxvmtqq0WNSwkjeopTYlZeBzTC/If3UoOCp7KCfMdydIcxvk6LNokMWWqSCNP8
-QiD872XuBvj/uQeBsbHZTqruqPnu+LZwpuHFVRp/Pyj9rT61PsvGitb7q/chW0G7
-7csHOc5q2223LKlNknPsfbcR6nVEg4KfN7kPKny8iJtl2pdbfBjFDp+73nzW8qZU
-5JWO5nWL7cJh4mt5sPGrzpt/Hf8/Dngg69sImRqjv/6/wCV0pEmmNjKJkXcMaZ0T
-2TSs+A7K6l15NYk8exkMymTU7jk+iDud3tnQ68YHf/A9pDu15OCw6U/pTgOgu9co
-rBLLhGV0Tb6XAnsWKe9tsLcumQXU5ZUn9m5VJl58wQHNhUqpT7L0fWtpiTMTStVA
-/yZbndPO4SbjR5rjcAk1xge8lyIIp0WBWmwoQ/1y4DXF/yPaX733wO7uWUljgKuy
-MM/zM4zklB8nFjXfPNf3j24Bzqmy7rqy4XB64enVmYQ2mVNqfwXvINoo2XOrAmj/
-bhSWXiCFltJFM7fmJGOMEEHBt9QfbmCgmM4aoWMgH7P+HxGW+Vc3tGixBbsxNRC+
-/VrPAINQV4x5q8zGYNQBqNFn/A==
------END CERTIFICATE-----
diff --git a/packages/OsuLogin/certs/key.pem b/packages/OsuLogin/certs/key.pem
deleted file mode 100644
index f560a8d..0000000
--- a/packages/OsuLogin/certs/key.pem
+++ /dev/null
@@ -1,52 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQDCQ54wHiGdilLy
-nDjcMbsyIS716+i0ZvlM9Hm48/vuSM0CS8K/wjjwRvc2yJvIs49mnKfpeFlRGE+i
-OBLOSxKeeeskgrmcfCIzndGXejQnWipmKLg042E6xC1lJWY3wOypti+cdjOgK5wz
-ucydQSLENOktwu4kd5LQENXBXYnYOh2toGop0tANSSjd5C/QS9abx0S81mV+ILDY
-QQv+lHt1t0sdiUUJGmi5LA3aCqtELMBJObRnym1a/foR7/6c7WmqhF0nlen99OXA
-MR83evkCfH/ACc9kYZ7+N8u9lDvG9Ngkj95WlI/IHonUfF18Pkeys7vDXxQy+7lS
-IZLT2gcX1jzWLXnadyaxnmYZM5Y7LrIWPm1RxAhM0ToWNgolGQRJ/sMGS1ntlu6H
-nlQi9RGQWHLSuQn661esdML2wVBf1YsFfti0F0DadPMQfGyQaqAZ+CmYytLUzfOg
-6qkQC8qFSFYeVQ1PVm4t76yW9P/UxELTI7qNA0t4XbZ6MHUcgMocG0Bztunap58w
-SF7UwL3uEZDsJ2/EM2XXueqr0YMHgxPSJtY6ceBPjDBqlWLPE8bq5nf7emwo076d
-T+IvPHK5P86gqBxEBG4mjXX5FCyQFoPcKsT46jwk1TbTl6CcLh7DcpkFUs7SFEsk
-s2UPE65NAKakH/Mh9pozOhySWaDaQQIDAQABAoICAGgX7XKhIqgVD59aoIk0yLby
-2wQBdf780ocu1O6LJiqnrdqWF/PCsdnmXN9pHTitJqD4Pm03BL0Uhs9ItqL9zStH
-7vzwY177kSQRY9aEL+AKS3/UP+hvEpF3v09ce+pSIT5LFjYDjGQ+GgQJgh+dYHC8
-XVodAphdzjhZXQCxC4TmlzKLK3ffs4X69r/3XruBd6yfWTDKvTWZdMlcCX5Pt9v6
-7HAWNvzKvuTCO2Xjo6PzStGx7v5SlMhWISJtdARInv80z+m/RdPD3zxd1flXloiD
-h7yyRQPn31cfNLgP7vwMBKmKwbuo/WZhHr/SKBHEGY0jC/CDSQKMqd/dh5ynTnbC
-vi/qjKFIHofmhzgQ+fiHMeMsAO1c9eYs8a6bDeJjhA5qJP1HjSie9Ss9z94mp6Ww
-TRkU93yVX04DU4TCCf0IcFpKdbtKp84i6iLV9lKGh9juM42hSOFUV6bhxmlJ9zvM
-yl7vfhhuFHy1SypmaK/oJ+nwac4vIMaHCX9ifl6hm/z4PrGFSYJGQoJtVOz0vT15
-lSwCJVdHkGAe0LI+3iFn5jJlluD7TqsLmZLxqTTmzDZ3U9WhAslmn5TcZd92mL0i
-ZVTfCkjyl1wUHeif2992oTUH6CFZ1jKd8xwdWvyKkvQcjhiS9GUsm7j6jolR/QI7
-VPQlocM/vCCusrMWnR7xAoIBAQDv9O8kboz6WzN6Xw5UC7MWpi2jZg1bTs/uKcfz
-biAEC96iJQ33YSkYi6QzV4jSaackU99vGkHbQIdaBTkudz+FK5XqH0auImB2xxcR
-Xu9G2j2fhzESchVTtOnotVgjiuv18SLZ/GQoSIccs0QxcisPiTa5Ij9pl8xVoS6J
-sxfqAe15hASqLh+9Ula3+Orb1kCkqK0UwU0nM9nfUH88BKvUwQIMA7kipTA8jJog
-MJOlYPQUGxkltlim8Vip//P336E7CWT6fWbfo62US6IEu6HcC6T8u8jcLjIKsmjJ
-YJyqrepZqAVMPlv2Z+mNhxRR0ct6blfjJSrEZEtxBRn98kZ1AoIBAQDPQJ1z7Mfy
-AOfjSO6Dlfr7V9SWmGvexosH0gu6H8KO+n1/ZPH5fHGt7ORubUDhkNI/fqZK0Hls
-Q9Jwgq1QI9UwMTogF8DgmZ6L6jiXhUScIk0BFhUxOBoplugaI0jdTW350D2quFUJ
-LjYo+VcRapTfXXVehHSjbUh3nmTWj0WboA+//7xq8q9KHPb1Sbiwjf7N1iYD5R8p
-PaaG0DMET+l90bxI+QVX1enwjZGcFjo8VI+qXGGkpB/1zK5yWm29ZWypLw8TZreM
-7rLUdBY1/m7MB54zOaJ2jSsxLQSXIVSGPI1ugkmFr6OxeuLdcCLN4yca3+HYHewa
-w3GCBP3kfYMdAoIBAAxG0slhYpMYgWy8WkZQhuwcum8GtJ48TQUZXCKHOtoaJVzU
-Wn+SmACqfE8oJlblkuiX5fGQPVhTV9lyNPe8oCJXFYdx7DLSjW7mRrbbzZApcEeu
-KgOQlKjAs8r1JDpFTEc7/BV9BT7OXyNHxLBm7+8OjR8xsl7bplenNHNVF18glB7I
-c1ilnXgZM1icQp/WuV3zR0+tiB3+WCJFwwy2DHiJG2qz8g/ktbATXXtSIOuwJyy0
-Kjg0uRppdKjV8Ix5A426sFDkg5PjkujoabSmSOSyL9HCZcdmEadcc2ICMGHHHhtS
-Lls1QY08ycU06QQ6oJd198cmSqbbnsR8h1TnxVUCggEBAI2zF/QSiAImLGVxj+HX
-wWnneyobvGTsSlJmgi4XWOZ4zSU011xEgVTxCp2VhS6z3YwcA4ZTUzF6jX7vWZ/Z
-YAE7JwqaMv1dCtGOqnKuY2J88Tk05/hm6zxUOQzl4wOr1O1gO0lmDn3gYpdRIv59
-aJvvQjgFR9oU9d8TJM6t1mG45gvXxfM5Si/Z7d93MBdGflgteoBfPxbrV9gEsVzZ
-ZkLoC1u5JrYPQ4t8v3mAmQB2sGNCFmCC9ncQIpV8zlsX5VsnGZ+iMwzghtRLKoRw
-GUDWVIuhdDqp+kX9CY5q82d0Lx7HZY1JsRm/cy0DZkhubmYpfDhO/QavagQDdbOr
-POECggEAXOliqX4yFvy6USXihHVM44s63gK+yH0+0iRppqoB3+E5tDyhvvvBMPLZ
-7EBkhd7ILTDXbc0c8nSl8I/556YSlIaOB4Xbf4UQbsmD4fNGEnNWFbCzcEWYOjpQ
-5QyXjIzK/k8eg22OZlC3XNjGHgb/mA5f+v2enGQNuy7WRTl1mKYZB2h/2p6xy+jV
-CGhd4btB2bOu+1XR/B2KFvI5NdtPPti05LmsYgsU00yYJfQkpc7VvOSH5Jyy3eZL
-L9xTAy7NWBQ3LGdIpX+V1jcn3SzVits0m6hOUCtJLT1snMXAKFweTvWAQynuGomc
-VPf88ITMTOBjOH6YC8jKd/n2lVWLjw==
------END PRIVATE KEY-----
diff --git a/packages/OsuLogin/res/layout/osu_web_view.xml b/packages/OsuLogin/res/layout/osu_web_view.xml
deleted file mode 100644
index 4436aab..0000000
--- a/packages/OsuLogin/res/layout/osu_web_view.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-             xmlns:tools="http://schemas.android.com/tools"
-             android:id="@+id/container"
-             android:layout_width="match_parent"
-             android:layout_height="match_parent"
-             tools:context="com.android.hotspot2.osulogin.OsuLoginActivity">
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical">
-        <FrameLayout
-            android:layout_width="match_parent"
-            android:layout_height="4dp">
-
-            <!-- Eliminates ProgressBar padding by boxing it into a 4dp high container -->
-            <ProgressBar
-                android:id="@+id/progress_bar"
-                style="@android:style/Widget.Material.Light.ProgressBar.Horizontal"
-                android:indeterminate="false"
-                android:max="100"
-                android:progress="0"
-                android:layout_gravity="center"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"/>
-        </FrameLayout>
-        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
-            android:id="@+id/swipe_refresh"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent">
-        <WebView
-            android:id="@+id/webview"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:layout_alignParentBottom="false"
-            android:layout_alignParentRight="false"/>
-        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
-    </LinearLayout>
-</FrameLayout>
diff --git a/packages/OsuLogin/res/values-af/strings.xml b/packages/OsuLogin/res/values-af/strings.xml
deleted file mode 100644
index bfeee10..0000000
--- a/packages/OsuLogin/res/values-af/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Sluit aanlyn aan"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Kon nie aanmeld nie"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-am/strings.xml b/packages/OsuLogin/res/values-am/strings.xml
deleted file mode 100644
index e27c578..0000000
--- a/packages/OsuLogin/res/values-am/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"የመስመር ላይ ምዝገባ"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ምዝገባ አልተሳካም"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ar/strings.xml b/packages/OsuLogin/res/values-ar/strings.xml
deleted file mode 100644
index b72d7c1..0000000
--- a/packages/OsuLogin/res/values-ar/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"الاشتراك على الإنترنت"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"تعذّر الاشتراك."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-as/strings.xml b/packages/OsuLogin/res/values-as/strings.xml
deleted file mode 100644
index 422de32..0000000
--- a/packages/OsuLogin/res/values-as/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"অনলাইনত ছাই আপ কৰক"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ছাইন আপ কৰিব পৰা নগ’ল"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-az/strings.xml b/packages/OsuLogin/res/values-az/strings.xml
deleted file mode 100644
index 977f939..0000000
--- a/packages/OsuLogin/res/values-az/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Onlayn Qeydiyyat"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Qeydiyyat alınmadı"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-b+sr+Latn/strings.xml b/packages/OsuLogin/res/values-b+sr+Latn/strings.xml
deleted file mode 100644
index 6eb2cc1..0000000
--- a/packages/OsuLogin/res/values-b+sr+Latn/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Onlajn registracija"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registracija nije uspela"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-be/strings.xml b/packages/OsuLogin/res/values-be/strings.xml
deleted file mode 100644
index 158c3f2..0000000
--- a/packages/OsuLogin/res/values-be/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Зарэгістравацца ў інтэрнэце"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Не ўдалося зарэгістравацца"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-bg/strings.xml b/packages/OsuLogin/res/values-bg/strings.xml
deleted file mode 100644
index ea3145d..0000000
--- a/packages/OsuLogin/res/values-bg/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлайн регистрация"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Регистрацията не бе успешна"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-bn/strings.xml b/packages/OsuLogin/res/values-bn/strings.xml
deleted file mode 100644
index c9f615e..0000000
--- a/packages/OsuLogin/res/values-bn/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"অনলাইনে সাইন-আপ করুন"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"সাইন-আপ করা যায়নি"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-bs/strings.xml b/packages/OsuLogin/res/values-bs/strings.xml
deleted file mode 100644
index e9b9751..0000000
--- a/packages/OsuLogin/res/values-bs/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online registracija"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registracija nije uspjela"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ca/strings.xml b/packages/OsuLogin/res/values-ca/strings.xml
deleted file mode 100644
index 7d93096..0000000
--- a/packages/OsuLogin/res/values-ca/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registre en línia"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Ha fallat el registre"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-cs/strings.xml b/packages/OsuLogin/res/values-cs/strings.xml
deleted file mode 100644
index b9cb794..0000000
--- a/packages/OsuLogin/res/values-cs/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online registrace"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registrace selhala"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-da/strings.xml b/packages/OsuLogin/res/values-da/strings.xml
deleted file mode 100644
index 68c93b7..0000000
--- a/packages/OsuLogin/res/values-da/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online registrering"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registrering mislykkedes"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-de/strings.xml b/packages/OsuLogin/res/values-de/strings.xml
deleted file mode 100644
index 7e5a310..0000000
--- a/packages/OsuLogin/res/values-de/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online-Registrierung"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registrierung fehlgeschlagen"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-el/strings.xml b/packages/OsuLogin/res/values-el/strings.xml
deleted file mode 100644
index a58e481..0000000
--- a/packages/OsuLogin/res/values-el/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Εγγραφή στο διαδίκτυο"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Αποτυχία εγγραφής"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-en-rAU/strings.xml b/packages/OsuLogin/res/values-en-rAU/strings.xml
deleted file mode 100644
index fbbcab1..0000000
--- a/packages/OsuLogin/res/values-en-rAU/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online sign-up"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Sign-up failed"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-en-rCA/strings.xml b/packages/OsuLogin/res/values-en-rCA/strings.xml
deleted file mode 100644
index fbbcab1..0000000
--- a/packages/OsuLogin/res/values-en-rCA/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online sign-up"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Sign-up failed"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-en-rGB/strings.xml b/packages/OsuLogin/res/values-en-rGB/strings.xml
deleted file mode 100644
index fbbcab1..0000000
--- a/packages/OsuLogin/res/values-en-rGB/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online sign-up"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Sign-up failed"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-en-rIN/strings.xml b/packages/OsuLogin/res/values-en-rIN/strings.xml
deleted file mode 100644
index fbbcab1..0000000
--- a/packages/OsuLogin/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online sign-up"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Sign-up failed"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-en-rXC/strings.xml b/packages/OsuLogin/res/values-en-rXC/strings.xml
deleted file mode 100644
index af7ff67..0000000
--- a/packages/OsuLogin/res/values-en-rXC/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‎‎‎‎‏‎‏‏‏‎‏‏‎‏‎‏‏‏‏‎‎‏‏‏‎‏‎‏‎‏‏‎‎‎‏‎‏‎‏‏‎‎‎‎‏‎‏‏‎‏‎‎‏‎‏‎OsuLogin‎‏‎‎‏‎"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‎‎‎‏‏‏‏‎‎‎‏‎‏‎‏‏‏‏‎‏‏‎‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‎‎‏‎‏‎‏‎‏‎Online Sign Up‎‏‎‎‏‎"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‏‏‎‎‏‏‏‏‎‎‏‏‎‎‎‏‏‏‎‏‏‏‏‎‏‎‎‎‏‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‎‎‎‏‏‎‏‏‎‎‎‎‎Sign-up failed‎‏‎‎‏‎"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-es-rUS/strings.xml b/packages/OsuLogin/res/values-es-rUS/strings.xml
deleted file mode 100644
index 144804c..0000000
--- a/packages/OsuLogin/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registrarse en línea"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Se produjo un error de registro"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-es/strings.xml b/packages/OsuLogin/res/values-es/strings.xml
deleted file mode 100644
index 3ad95cd..0000000
--- a/packages/OsuLogin/res/values-es/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registro online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Error al completar el registro"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-et/strings.xml b/packages/OsuLogin/res/values-et/strings.xml
deleted file mode 100644
index 94c5cea..0000000
--- a/packages/OsuLogin/res/values-et/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Veebis registreerimine"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registreerimine ebaõnnestus"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-eu/strings.xml b/packages/OsuLogin/res/values-eu/strings.xml
deleted file mode 100644
index 30caa87..0000000
--- a/packages/OsuLogin/res/values-eu/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Sarean izen-ematea"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Ezin izan da eman izena"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-fa/strings.xml b/packages/OsuLogin/res/values-fa/strings.xml
deleted file mode 100644
index 3005203..0000000
--- a/packages/OsuLogin/res/values-fa/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ثبت‌نام آنلاین"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ثبت‌نام انجام نشد"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-fi/strings.xml b/packages/OsuLogin/res/values-fi/strings.xml
deleted file mode 100644
index 24eac8a..0000000
--- a/packages/OsuLogin/res/values-fi/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Rekisteröidy verkossa"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Rekisteröityminen ei onnistunut"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-fr-rCA/strings.xml b/packages/OsuLogin/res/values-fr-rCA/strings.xml
deleted file mode 100644
index bcaa662..0000000
--- a/packages/OsuLogin/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Inscription en ligne"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Échec de l\'inscription"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-fr/strings.xml b/packages/OsuLogin/res/values-fr/strings.xml
deleted file mode 100644
index bcaa662..0000000
--- a/packages/OsuLogin/res/values-fr/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Inscription en ligne"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Échec de l\'inscription"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-gl/strings.xml b/packages/OsuLogin/res/values-gl/strings.xml
deleted file mode 100644
index 5fc4444..0000000
--- a/packages/OsuLogin/res/values-gl/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Rexistro en liña"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Produciuse un erro co rexistro"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-gu/strings.xml b/packages/OsuLogin/res/values-gu/strings.xml
deleted file mode 100644
index 8449963..0000000
--- a/packages/OsuLogin/res/values-gu/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ઑનલાઇન સાઇન અપ કરો"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"સાઇન અપ નિષ્ફળ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-hi/strings.xml b/packages/OsuLogin/res/values-hi/strings.xml
deleted file mode 100644
index 9e07438..0000000
--- a/packages/OsuLogin/res/values-hi/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ऑनलाइन साइन अप करें"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"साइन अप नहीं किया जा सका"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-hr/strings.xml b/packages/OsuLogin/res/values-hr/strings.xml
deleted file mode 100644
index e9b9751..0000000
--- a/packages/OsuLogin/res/values-hr/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online registracija"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registracija nije uspjela"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-hu/strings.xml b/packages/OsuLogin/res/values-hu/strings.xml
deleted file mode 100644
index cb0e036..0000000
--- a/packages/OsuLogin/res/values-hu/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online regisztráció"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"A regisztráció nem sikerült"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-hy/strings.xml b/packages/OsuLogin/res/values-hy/strings.xml
deleted file mode 100644
index ae1c36a..0000000
--- a/packages/OsuLogin/res/values-hy/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Առցանց գրանցում"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Չհաջողվեց գրանցվել"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-in/strings.xml b/packages/OsuLogin/res/values-in/strings.xml
deleted file mode 100644
index 6aaf694..0000000
--- a/packages/OsuLogin/res/values-in/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Pendaftaran Online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Pendaftaran gagal"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-is/strings.xml b/packages/OsuLogin/res/values-is/strings.xml
deleted file mode 100644
index f1ae520..0000000
--- a/packages/OsuLogin/res/values-is/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Skráning á netinu"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Skráning mistókst"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-it/strings.xml b/packages/OsuLogin/res/values-it/strings.xml
deleted file mode 100644
index fbff7b0..0000000
--- a/packages/OsuLogin/res/values-it/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registrazione online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registrazione non riuscita"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-iw/strings.xml b/packages/OsuLogin/res/values-iw/strings.xml
deleted file mode 100644
index 866ef88..0000000
--- a/packages/OsuLogin/res/values-iw/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"הרשמה אונליין"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ההרשמה נכשלה"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ja/strings.xml b/packages/OsuLogin/res/values-ja/strings.xml
deleted file mode 100644
index 8a220d6..0000000
--- a/packages/OsuLogin/res/values-ja/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"オンライン登録"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"登録できませんでした"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ka/strings.xml b/packages/OsuLogin/res/values-ka/strings.xml
deleted file mode 100644
index bf08006..0000000
--- a/packages/OsuLogin/res/values-ka/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ონლაინ რეგისტრაცია"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"რეგისტრაცია ვერ მოხერხდა"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-kk/strings.xml b/packages/OsuLogin/res/values-kk/strings.xml
deleted file mode 100644
index 8b87356..0000000
--- a/packages/OsuLogin/res/values-kk/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлайн тіркелу"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Тіркелмеді."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-km/strings.xml b/packages/OsuLogin/res/values-km/strings.xml
deleted file mode 100644
index f58ccc3..0000000
--- a/packages/OsuLogin/res/values-km/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ការចុះឈ្មោះ​លើអ៊ីនធឺណិត"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ការចុះឈ្មោះ​មិនបានសម្រេច"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-kn/strings.xml b/packages/OsuLogin/res/values-kn/strings.xml
deleted file mode 100644
index 49a6562..0000000
--- a/packages/OsuLogin/res/values-kn/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ಆನ್‌ಲೈನ್ ಸೈನ್ ಅಪ್"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ಸೈನ್ ಅಪ್ ವಿಫಲವಾಗಿದೆ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ko/strings.xml b/packages/OsuLogin/res/values-ko/strings.xml
deleted file mode 100644
index e647ca0..0000000
--- a/packages/OsuLogin/res/values-ko/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"온라인 가입"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"가입에 실패했습니다."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ky/strings.xml b/packages/OsuLogin/res/values-ky/strings.xml
deleted file mode 100644
index 42da248..0000000
--- a/packages/OsuLogin/res/values-ky/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Интернет аркылуу катталуу"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Катталган жоксуз"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-lo/strings.xml b/packages/OsuLogin/res/values-lo/strings.xml
deleted file mode 100644
index 9ff2241..0000000
--- a/packages/OsuLogin/res/values-lo/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ສະໝັກອອນລາຍ"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ສະໝັກບໍ່ສຳເລັດ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-lt/strings.xml b/packages/OsuLogin/res/values-lt/strings.xml
deleted file mode 100644
index 1a4c06e..0000000
--- a/packages/OsuLogin/res/values-lt/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Internetinis prisiregistravimas"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Nepavyko prisiregistruoti"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-lv/strings.xml b/packages/OsuLogin/res/values-lv/strings.xml
deleted file mode 100644
index 11cdb97..0000000
--- a/packages/OsuLogin/res/values-lv/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Reģistrācija tiešsaistē"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Reģistrācija neizdevās."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-mk/strings.xml b/packages/OsuLogin/res/values-mk/strings.xml
deleted file mode 100644
index de608e1..0000000
--- a/packages/OsuLogin/res/values-mk/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлајн регистрација"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Регистрацијата не успеа"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ml/strings.xml b/packages/OsuLogin/res/values-ml/strings.xml
deleted file mode 100644
index 8e797c8..0000000
--- a/packages/OsuLogin/res/values-ml/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ഓൺലെെൻ സെെൻ അപ്പ്"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"സൈൻ അപ്പ് ചെയ്യാനായില്ല"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-mn/strings.xml b/packages/OsuLogin/res/values-mn/strings.xml
deleted file mode 100644
index 59d79d0..0000000
--- a/packages/OsuLogin/res/values-mn/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлайнаар бүртгүүлэх"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Бүртгүүлж чадсангүй"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-mr/strings.xml b/packages/OsuLogin/res/values-mr/strings.xml
deleted file mode 100644
index 15479a6..0000000
--- a/packages/OsuLogin/res/values-mr/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ऑनलाइन साइन अप करा"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"साइन-अप करता आले नाही"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ms/strings.xml b/packages/OsuLogin/res/values-ms/strings.xml
deleted file mode 100644
index 7e1cf95..0000000
--- a/packages/OsuLogin/res/values-ms/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Pendaftaran Dalam Talian"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Pendaftaran gagal"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-my/strings.xml b/packages/OsuLogin/res/values-my/strings.xml
deleted file mode 100644
index 1bd992e..0000000
--- a/packages/OsuLogin/res/values-my/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"အွန်လိုင်း အကောင့်ဖွင့်ရန်"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"အကောင့်ဖွင့်၍ မရပါ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-nb/strings.xml b/packages/OsuLogin/res/values-nb/strings.xml
deleted file mode 100644
index 2e0c47a1..0000000
--- a/packages/OsuLogin/res/values-nb/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registrering på nettet"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registreringen mislyktes"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ne/strings.xml b/packages/OsuLogin/res/values-ne/strings.xml
deleted file mode 100644
index 16bd92f..0000000
--- a/packages/OsuLogin/res/values-ne/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"अनलाइन साइन अप"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"साइन अप गर्न सकिएन"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-nl/strings.xml b/packages/OsuLogin/res/values-nl/strings.xml
deleted file mode 100644
index 7cf8bd2..0000000
--- a/packages/OsuLogin/res/values-nl/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online aanmelding"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Aanmelding mislukt"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-or/strings.xml b/packages/OsuLogin/res/values-or/strings.xml
deleted file mode 100644
index e0584d7..0000000
--- a/packages/OsuLogin/res/values-or/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ଅନଲାଇନ୍ ସାଇନ୍ ଅପ୍ କରନ୍ତୁ"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ସାଇନ୍ ଅପ୍ ବିଫଳ ହୋଇଛି"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-pa/strings.xml b/packages/OsuLogin/res/values-pa/strings.xml
deleted file mode 100644
index 7e47d0e..0000000
--- a/packages/OsuLogin/res/values-pa/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ਆਨਲਾਈਨ ਸਾਈਨ-ਅੱਪ ਕਰੋ"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ਸਾਈਨ-ਅੱਪ ਕਰਨਾ ਅਸਫਲ ਰਿਹਾ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-pl/strings.xml b/packages/OsuLogin/res/values-pl/strings.xml
deleted file mode 100644
index c0722ab..0000000
--- a/packages/OsuLogin/res/values-pl/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Rejestracja online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Nie udało się zarejestrować"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-pt-rBR/strings.xml b/packages/OsuLogin/res/values-pt-rBR/strings.xml
deleted file mode 100644
index c9fe377..0000000
--- a/packages/OsuLogin/res/values-pt-rBR/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Inscrição on-line"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Falha na inscrição"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-pt-rPT/strings.xml b/packages/OsuLogin/res/values-pt-rPT/strings.xml
deleted file mode 100644
index 0059281..0000000
--- a/packages/OsuLogin/res/values-pt-rPT/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Inscrição online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Falha na inscrição."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-pt/strings.xml b/packages/OsuLogin/res/values-pt/strings.xml
deleted file mode 100644
index c9fe377..0000000
--- a/packages/OsuLogin/res/values-pt/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Inscrição on-line"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Falha na inscrição"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ro/strings.xml b/packages/OsuLogin/res/values-ro/strings.xml
deleted file mode 100644
index eead127..0000000
--- a/packages/OsuLogin/res/values-ro/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Înscriere online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Nu s-a înscris"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ru/strings.xml b/packages/OsuLogin/res/values-ru/strings.xml
deleted file mode 100644
index a271ef7..0000000
--- a/packages/OsuLogin/res/values-ru/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Регистрация в Интернете"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Не удалось зарегистрироваться."</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-si/strings.xml b/packages/OsuLogin/res/values-si/strings.xml
deleted file mode 100644
index 52e5979..0000000
--- a/packages/OsuLogin/res/values-si/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"සබැඳි ලියාපදිංචිය"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ලියාපදිංචිය අසාර්ථක විය"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sk/strings.xml b/packages/OsuLogin/res/values-sk/strings.xml
deleted file mode 100644
index f6b9f70..0000000
--- a/packages/OsuLogin/res/values-sk/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online registrácia"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registrácia zlyhala"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sl/strings.xml b/packages/OsuLogin/res/values-sl/strings.xml
deleted file mode 100644
index 6e6b95c..0000000
--- a/packages/OsuLogin/res/values-sl/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Spletna registracija"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registracija ni uspela"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sq/strings.xml b/packages/OsuLogin/res/values-sq/strings.xml
deleted file mode 100644
index f67a238..0000000
--- a/packages/OsuLogin/res/values-sq/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Regjistrimi në linjë"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Regjistrimi dështoi"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sr/strings.xml b/packages/OsuLogin/res/values-sr/strings.xml
deleted file mode 100644
index 14e0828..0000000
--- a/packages/OsuLogin/res/values-sr/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлајн регистрација"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Регистрација није успела"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sv/strings.xml b/packages/OsuLogin/res/values-sv/strings.xml
deleted file mode 100644
index ea5fdfd..0000000
--- a/packages/OsuLogin/res/values-sv/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Registrering online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registreringen misslyckades"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-sw/strings.xml b/packages/OsuLogin/res/values-sw/strings.xml
deleted file mode 100644
index c20a402..0000000
--- a/packages/OsuLogin/res/values-sw/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Kujisajili Mtandaoni"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Imeshindwa kukusajili"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ta/strings.xml b/packages/OsuLogin/res/values-ta/strings.xml
deleted file mode 100644
index e2eb567..0000000
--- a/packages/OsuLogin/res/values-ta/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ஆன்லைனில் பதிவு செய்"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"பதிவு செய்ய முடியவில்லை"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-te/strings.xml b/packages/OsuLogin/res/values-te/strings.xml
deleted file mode 100644
index 56b0b44..0000000
--- a/packages/OsuLogin/res/values-te/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"ఆన్‌లైన్ సైన్ అప్"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"సైన్-అప్ విఫలమయ్యింది"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-th/strings.xml b/packages/OsuLogin/res/values-th/strings.xml
deleted file mode 100644
index 552dca2..0000000
--- a/packages/OsuLogin/res/values-th/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"การลงชื่อสมัครใช้ออนไลน์"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"ลงชื่อสมัครใช้ไม่สำเร็จ"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-tl/strings.xml b/packages/OsuLogin/res/values-tl/strings.xml
deleted file mode 100644
index ba89e96..0000000
--- a/packages/OsuLogin/res/values-tl/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Pag-sign Up Online"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Hindi nakapag-sign up"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-tr/strings.xml b/packages/OsuLogin/res/values-tr/strings.xml
deleted file mode 100644
index 1d927fe..0000000
--- a/packages/OsuLogin/res/values-tr/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Online Kaydolma"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Kaydolma işlemi başarısız oldu"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-uk/strings.xml b/packages/OsuLogin/res/values-uk/strings.xml
deleted file mode 100644
index 6e60ff0..0000000
--- a/packages/OsuLogin/res/values-uk/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Онлайн-реєстрація"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Не вдалося зареєструватись"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-ur/strings.xml b/packages/OsuLogin/res/values-ur/strings.xml
deleted file mode 100644
index eed7686..0000000
--- a/packages/OsuLogin/res/values-ur/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"آن لائن سائن اپ کریں"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"سائن اپ ناکام ہو گیا"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-uz/strings.xml b/packages/OsuLogin/res/values-uz/strings.xml
deleted file mode 100644
index 152d129..0000000
--- a/packages/OsuLogin/res/values-uz/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Onlayn registratsiya"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Registratsiya qilinmadi"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-vi/strings.xml b/packages/OsuLogin/res/values-vi/strings.xml
deleted file mode 100644
index 84558076..0000000
--- a/packages/OsuLogin/res/values-vi/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Đăng ký trực tuyến"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Không đăng ký được"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-zh-rCN/strings.xml b/packages/OsuLogin/res/values-zh-rCN/strings.xml
deleted file mode 100644
index 7f13647..0000000
--- a/packages/OsuLogin/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"在线注册"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"注册失败"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-zh-rHK/strings.xml b/packages/OsuLogin/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 8731791..0000000
--- a/packages/OsuLogin/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"網上申請"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"無法申請"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-zh-rTW/strings.xml b/packages/OsuLogin/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 79208c8..0000000
--- a/packages/OsuLogin/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"線上註冊"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"註冊失敗"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values-zu/strings.xml b/packages/OsuLogin/res/values-zu/strings.xml
deleted file mode 100644
index 27ac6bb..0000000
--- a/packages/OsuLogin/res/values-zu/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name" msgid="8288271429327488421">"I-OsuLogin"</string>
-    <string name="action_bar_label" msgid="550995560341508693">"Ukubhalisa Okuku-inthanethi"</string>
-    <string name="sign_up_failed" msgid="837216244603867568">"Ukubhalisa kuhlulekile"</string>
-</resources>
diff --git a/packages/OsuLogin/res/values/dimens.xml b/packages/OsuLogin/res/values/dimens.xml
deleted file mode 100644
index 47c8224..0000000
--- a/packages/OsuLogin/res/values/dimens.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<resources>
-    <!-- Default screen margins, per the Android Design guidelines. -->
-    <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="activity_vertical_margin">16dp</dimen>
-</resources>
diff --git a/packages/OsuLogin/res/values/strings.xml b/packages/OsuLogin/res/values/strings.xml
deleted file mode 100644
index 14de0f5..0000000
--- a/packages/OsuLogin/res/values/strings.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<resources>
-    <!-- application name [CHAR LIMIT=32] -->
-    <string name="app_name">OsuLogin</string>
-    <!-- action bar label [CHAR LIMIT=32] -->
-    <string name="action_bar_label">Online Sign Up</string>
-    <!-- toast message [CHAR LIMIT=32] -->
-    <string name="sign_up_failed">Sign-up failed</string>
-</resources>
diff --git a/packages/OsuLogin/res/values/styles.xml b/packages/OsuLogin/res/values/styles.xml
deleted file mode 100644
index f6c2339..0000000
--- a/packages/OsuLogin/res/values/styles.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<resources>
-
-    <!--
-        Base application theme, dependent on API level. This theme is replaced
-        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-    -->
-    <style name="AppBaseTheme" parent="@android:style/Theme.DeviceDefault.Settings">
-        <!--
-            Theme customizations available in newer API levels can go in
-            res/values-vXX/styles.xml, while customizations related to
-            backward-compatibility can go here.
-        -->
-    </style>
-
-    <!-- Application theme. -->
-    <style name="AppTheme" parent="AppBaseTheme">
-        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
-    </style>
-</resources>
diff --git a/packages/OsuLogin/res/xml/network_security_config.xml b/packages/OsuLogin/res/xml/network_security_config.xml
deleted file mode 100644
index 3ef4b84..0000000
--- a/packages/OsuLogin/res/xml/network_security_config.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<network-security-config>
-<base-config cleartextTrafficPermitted="true">
-    <trust-anchors>
-        <certificates src="system" />
-        <certificates src="wfa" />
-    </trust-anchors>
-</base-config>
-</network-security-config>
diff --git a/packages/OsuLogin/src/com/android/hotspot2/osulogin/OsuLoginActivity.java b/packages/OsuLogin/src/com/android/hotspot2/osulogin/OsuLoginActivity.java
deleted file mode 100644
index 9797846..0000000
--- a/packages/OsuLogin/src/com/android/hotspot2/osulogin/OsuLoginActivity.java
+++ /dev/null
@@ -1,281 +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.hotspot2.osulogin;
-
-import static android.net.NetworkCapabilities.NET_CAPABILITY_TRUSTED;
-
-import android.app.Activity;
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.NetworkCapabilities;
-import android.net.NetworkRequest;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.webkit.WebChromeClient;
-import android.webkit.WebResourceError;
-import android.webkit.WebResourceRequest;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-import android.widget.ProgressBar;
-import android.widget.Toast;
-
-import androidx.annotation.Nullable;
-import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Online Sign Up Login Web View launched during Provision Process of Hotspot 2.0 rel2.
- */
-public class OsuLoginActivity extends Activity {
-    private static final String TAG = "OsuLogin";
-    private static final boolean DBG = true;
-
-    private String mUrl;
-    private String mHostName;
-    private Network mNetwork;
-    private ConnectivityManager mCm;
-    private ConnectivityManager.NetworkCallback mNetworkCallback;
-    private WifiManager mWifiManager;
-    private WebView mWebView;
-    private SwipeRefreshLayout mSwipeRefreshLayout;
-    private ProgressBar mProgressBar;
-    private boolean mForceDisconnect = true;
-    boolean mRedirectResponseReceived = false;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        if (DBG) {
-            Log.d(TAG, "onCreate: Opening OSU Web View");
-        }
-
-        mWifiManager = (WifiManager) getApplicationContext().getSystemService(Context.WIFI_SERVICE);
-        if (mWifiManager == null) {
-            Log.e(TAG, "Cannot get wifi service");
-            finishAndRemoveTask();
-            return;
-        }
-
-        if (getIntent() == null) {
-            Log.e(TAG, "Intent is null");
-            finishAndRemoveTask();
-            return;
-        }
-
-        mNetwork = getIntent().getParcelableExtra(WifiManager.EXTRA_OSU_NETWORK);
-        if (mNetwork == null) {
-            Log.e(TAG, "Cannot get the network instance for OSU from intent");
-            finishAndRemoveTask();
-            return;
-        }
-
-        mUrl = getIntent().getStringExtra(WifiManager.EXTRA_URL);
-        if (mUrl == null) {
-            Log.e(TAG, "Cannot get OSU server url from intent");
-            finishAndRemoveTask();
-            return;
-        }
-
-        mHostName = getHost(mUrl);
-        if (mHostName == null) {
-            Log.e(TAG, "Cannot get host from the url");
-            finishAndRemoveTask();
-            return;
-        }
-
-        mCm = (ConnectivityManager) getApplicationContext().getSystemService(
-                Context.CONNECTIVITY_SERVICE);
-        if (mCm == null) {
-            Log.e(TAG, "Cannot get connectivity service");
-            finishAndRemoveTask();
-            return;
-        }
-
-        if (!mCm.bindProcessToNetwork(mNetwork)) {
-            Log.e(TAG, "Network is no longer valid");
-            finishAndRemoveTask();
-            return;
-        }
-
-        final NetworkCapabilities networkCapabilities = mCm.getNetworkCapabilities(mNetwork);
-        if (networkCapabilities == null || !networkCapabilities.hasTransport(
-                NetworkCapabilities.TRANSPORT_WIFI)) {
-            Log.e(TAG, "WiFi is not supported for the Network");
-            finishAndRemoveTask();
-            return;
-        }
-
-        getActionBar().setDisplayShowHomeEnabled(false);
-        getActionBar().setElevation(0); // remove shadow
-        getActionBar().setTitle(getString(R.string.action_bar_label));
-        getActionBar().setSubtitle("");
-        setContentView(R.layout.osu_web_view);
-
-        // Exit this app if network disappeared.
-        mNetworkCallback = new ConnectivityManager.NetworkCallback() {
-            @Override
-            public void onLost(Network network) {
-                if (DBG) {
-                    Log.d(TAG, "Lost for the current Network, close the browser");
-                }
-                mForceDisconnect = false; // It is already disconnected.
-                if (!mRedirectResponseReceived) {
-                    showSignUpFailedToast();
-                }
-                if (mNetwork.equals(network)) {
-                    finishAndRemoveTask();
-                }
-            }
-        };
-
-        mCm.registerNetworkCallback(
-                new NetworkRequest.Builder().addTransportType(
-                        NetworkCapabilities.TRANSPORT_WIFI).removeCapability(
-                        NET_CAPABILITY_TRUSTED).build(),
-                mNetworkCallback);
-
-        mWebView = findViewById(R.id.webview);
-        mWebView.clearCache(true);
-        WebSettings webSettings = mWebView.getSettings();
-        webSettings.setJavaScriptEnabled(true);
-        webSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
-        webSettings.setUseWideViewPort(true);
-        webSettings.setLoadWithOverviewMode(true);
-        webSettings.setSupportZoom(true);
-        webSettings.setBuiltInZoomControls(true);
-        webSettings.setDisplayZoomControls(false);
-        mProgressBar = findViewById(R.id.progress_bar);
-        mWebView.setWebViewClient(new OsuWebViewClient());
-        mWebView.setWebChromeClient(new WebChromeClient() {
-            @Override
-            public void onProgressChanged(WebView view, int newProgress) {
-                mProgressBar.setProgress(newProgress);
-            }
-        });
-
-        if (DBG) {
-            Log.d(TAG, "OSU Web View to " + mUrl);
-        }
-
-        mWebView.loadUrl(mUrl);
-        mSwipeRefreshLayout = findViewById(R.id.swipe_refresh);
-        mSwipeRefreshLayout.setOnRefreshListener(() -> {
-            mWebView.reload();
-            mSwipeRefreshLayout.setRefreshing(true);
-        });
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        // Check if the key event was the Back button.
-        if ((keyCode == KeyEvent.KEYCODE_BACK)) {
-            // If there is a history to move back
-            if (mWebView.canGoBack()) {
-                mWebView.goBack();
-                return true;
-            }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @Override
-    protected void onDestroy() {
-        if (mNetworkCallback != null) {
-            mCm.unregisterNetworkCallback(mNetworkCallback);
-            mNetworkCallback = null;
-        }
-        if (mWifiManager != null && mForceDisconnect) {
-            mWifiManager.disconnect();
-            mWifiManager = null;
-        }
-        super.onDestroy();
-    }
-
-    private String getHost(String url) {
-        try {
-            return new URL(url).getHost();
-        } catch (MalformedURLException e) {
-            Log.e(TAG, "Invalid URL " + url);
-        }
-        return null;
-    }
-
-    private String getHeaderSubtitle(String urlString) {
-        try {
-            URL url = new URL(urlString);
-            return url.getProtocol() + "://" +  url.getHost();
-        } catch (MalformedURLException e) {
-            Log.e(TAG, "Invalid URL " + urlString);
-        }
-        return "";
-    }
-
-    private void showSignUpFailedToast() {
-        Toast.makeText(getApplicationContext(), R.string.sign_up_failed,
-                Toast.LENGTH_SHORT).show();
-    }
-
-    private class OsuWebViewClient extends WebViewClient {
-        boolean mPageError = false;
-
-        @Override
-        public void onPageStarted(WebView view, String urlString, Bitmap favicon) {
-            String subtitle = getHeaderSubtitle(urlString);
-            getActionBar().setSubtitle(subtitle);
-            mProgressBar.setVisibility(View.VISIBLE);
-        }
-
-        @Override
-        public void onPageFinished(WebView view, String url) {
-            mProgressBar.setVisibility(View.INVISIBLE);
-            mSwipeRefreshLayout.setRefreshing(false);
-
-            // Do not show the page error on UI.
-            if (mPageError) {
-                if (mRedirectResponseReceived) {
-                    // Do not disconnect current connection while provisioning is in progress.
-                    mForceDisconnect = false;
-                }
-                finishAndRemoveTask();
-            }
-        }
-
-        @Override
-        public void onReceivedError(WebView view, WebResourceRequest request,
-                WebResourceError error) {
-            if (request.getUrl().toString().startsWith("http://127.0.0.1")) {
-                mRedirectResponseReceived = true;
-                view.stopLoading();
-            }
-
-            if (request.isForMainFrame()) {
-                // This happens right after getting HTTP redirect response from an OSU server
-                // since no more Http request is allowed to send to the OSU server.
-                mPageError = true;
-                Log.e(TAG, "onReceived Error for MainFrame: " + error.getErrorCode());
-            }
-        }
-    }
-}
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 082c148..3b7775a 100644
--- a/packages/PrintSpooler/res/values-fr-rCA/strings.xml
+++ b/packages/PrintSpooler/res/values-fr-rCA/strings.xml
@@ -57,7 +57,6 @@
     <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>
@@ -78,7 +77,6 @@
     <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 560c5dc..f6e901d 100644
--- a/packages/PrintSpooler/res/values-fr/strings.xml
+++ b/packages/PrintSpooler/res/values-fr/strings.xml
@@ -57,7 +57,6 @@
     <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>
@@ -78,7 +77,6 @@
     <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/SettingsLib/HelpUtils/res/values-uz/strings.xml b/packages/SettingsLib/HelpUtils/res/values-uz/strings.xml
index 81d0dd9..cb56912 100644
--- a/packages/SettingsLib/HelpUtils/res/values-uz/strings.xml
+++ b/packages/SettingsLib/HelpUtils/res/values-uz/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">"Yordam va fikr-mulohaza"</string>
+    <string name="help_feedback_label" msgid="7106780063063027882">"Yordam/fikr-mulohaza"</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-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 671461b..e4ba93a 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"Greška u konfiguraciji IP-a"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Niste povezani zbog slabog kvaliteta mreže"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Greška pri povezivanju na WiFi"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problem pri autentifikaciji."</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problem pri autentifikaciji"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Nije se moguće povezati"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"Nije se moguće povezati na aplikaciju \'<xliff:g id="AP_NAME">%1$s</xliff:g>\'"</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Provjerite lozinku i pokušajte ponovo"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index b040958..c45255c 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -409,7 +409,7 @@
     <string name="convert_to_file_encryption_done" msgid="8965831011811180627">"El fitxer ja està encriptat"</string>
     <string name="title_convert_fbe" msgid="5780013350366495149">"S\'està convertint en l\'encriptació basada en fitxers"</string>
     <string name="convert_to_fbe_warning" msgid="34294381569282109">"Converteix la partició de dades en una encriptació basada en fitxers.\n Advertiment: s\'esborraran totes les teves dades.\n Aquesta funció és alfa i és possible que no funcioni correctament.\n Per continuar, prem Esborra i converteix…"</string>
-    <string name="button_convert_fbe" msgid="1159861795137727671">"Esborra i converteix…"</string>
+    <string name="button_convert_fbe" msgid="1159861795137727671">"Neteja i converteix…"</string>
     <string name="picture_color_mode" msgid="1013807330552931903">"Mode de color de la imatge"</string>
     <string name="picture_color_mode_desc" msgid="151780973768136200">"Utilitza sRGB"</string>
     <string name="daltonizer_mode_disabled" msgid="403424372812399228">"Desactivat"</string>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 121da7b..19ba5d0 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -34,7 +34,7 @@
     <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" msgid="1774198889176926299">"بدون دسترسی به اینترنت"</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>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 3d28f1d..0854e8d 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -487,8 +487,8 @@
     <string name="status_unavailable" msgid="5279036186589861608">"Ei käytettävissä"</string>
     <string name="wifi_status_mac_randomized" msgid="466382542497832189">"MAC-osoite satunnaistetaan"</string>
     <plurals name="wifi_tether_connected_summary" formatted="false" msgid="6317236306047306139">
-      <item quantity="other">%1$d laitetta liitetty</item>
-      <item quantity="one">%1$d laite liitetty</item>
+      <item quantity="other">%1$d laitetta yhdistettynä</item>
+      <item quantity="one">%1$d laite yhdistettynä</item>
     </plurals>
     <string name="accessibility_manual_zen_more_time" msgid="5141801092071134235">"Enemmän aikaa"</string>
     <string name="accessibility_manual_zen_less_time" msgid="6828877595848229965">"Vähemmän aikaa"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 6bb1a3a..bdbfbc6 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -488,7 +488,6 @@
     <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>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index 8690dd8..4509b09 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"Échec de configuration de l\'adresse IP"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Non connecté en raison de la faible qualité du réseau"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Échec de la connexion Wi-Fi"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problème d\'authentification."</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problème d\'authentification"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Connexion impossible"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"Impossible de se connecter au réseau \"<xliff:g id="AP_NAME">%1$s</xliff:g>\""</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Vérifiez le mot de passe et réessayez"</string>
@@ -251,7 +251,7 @@
     <string name="wifi_display_certification" msgid="1805579519992520381">"Certification affichage sans fil"</string>
     <string name="wifi_verbose_logging" msgid="1785910450009679371">"Autoriser l\'enregistrement d\'infos Wi-Fi détaillées"</string>
     <string name="wifi_scan_throttling" msgid="2985624788509913617">"Limiter la recherche Wi‑Fi"</string>
-    <string name="wifi_enhanced_mac_randomization" msgid="5437378364995776979">"Chgt aléatoire d\'adresse MAC en Wi-Fi"</string>
+    <string name="wifi_enhanced_mac_randomization" msgid="5437378364995776979">"Changement aléatoire d\'adresse MAC en Wi-Fi"</string>
     <string name="mobile_data_always_on" msgid="8275958101875563572">"Données mobiles toujours actives"</string>
     <string name="tethering_hardware_offload" msgid="4116053719006939161">"Accélération matérielle pour le partage de connexion"</string>
     <string name="bluetooth_show_devices_without_names" msgid="923584526471885819">"Afficher les appareils Bluetooth sans nom"</string>
@@ -488,7 +488,6 @@
     <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-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 6e734bc..4ba2961 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/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">"वाईफ़ाई कनेक्‍शन विफलता"</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>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index ec2429b..3e06a3a 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -207,7 +207,7 @@
     <string name="enable_adb_summary" msgid="3711526030096574316">"Mode debug ketika USB tersambung"</string>
     <string name="clear_adb_keys" msgid="3010148733140369917">"Cabut otorisasi debug USB"</string>
     <string name="enable_adb_wireless" msgid="6973226350963971018">"Proses debug nirkabel"</string>
-    <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Mode debug saat Wi-Fi tersambung"</string>
+    <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Mode debug saat Wi-Fi terhubung"</string>
     <string name="adb_wireless_error" msgid="721958772149779856">"Error"</string>
     <string name="adb_wireless_settings" msgid="2295017847215680229">"Proses debug nirkabel"</string>
     <string name="adb_wireless_list_empty_off" msgid="1713707973837255490">"Untuk melihat dan menggunakan perangkat yang tersedia, aktifkan proses debug nirkabel"</string>
@@ -225,13 +225,13 @@
     <string name="adb_pairing_device_dialog_title" msgid="7141739231018530210">"Sambungkan dengan perangkat"</string>
     <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"Kode penyambungan Wi-Fi"</string>
     <string name="adb_pairing_device_dialog_failed_title" msgid="3426758947882091735">"Penyambungan perangkat gagal"</string>
-    <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"Pastikan perangkat tersambung ke jaringan yang sama."</string>
-    <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"Menyambungkan perangkat melalui Wi‑Fi dengan memindai Kode QR"</string>
+    <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"Pastikan perangkat terhubung ke jaringan yang sama."</string>
+    <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"Sambungkan perangkat melalui Wi‑Fi dengan memindai Kode QR"</string>
     <string name="adb_wireless_verifying_qrcode_text" msgid="6123192424916029207">"Menyambungkan perangkat…"</string>
     <string name="adb_qrcode_pairing_device_failed_msg" msgid="6936292092592914132">"Gagal menyambungkan perangkat. Kode QR salah, atau perangkat tidak tersambung ke jaringan yang sama."</string>
     <string name="adb_wireless_ip_addr_preference_title" msgid="8335132107715311730">"Alamat IP &amp; Port"</string>
     <string name="adb_wireless_qrcode_pairing_title" msgid="1906409667944674707">"Memindai kode QR"</string>
-    <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"Menyambungkan perangkat melalui Wi‑Fi dengan memindai Kode QR"</string>
+    <string name="adb_wireless_qrcode_pairing_description" msgid="6014121407143607851">"Sambungkan perangkat melalui Wi‑Fi dengan memindai Kode QR"</string>
     <string name="adb_wireless_no_network_msg" msgid="2365795244718494658">"Harap sambungkan ke jaringan Wi-Fi"</string>
     <string name="keywords_adb_wireless" msgid="6507505581882171240">"adb, debug, dev"</string>
     <string name="bugreport_in_power" msgid="8664089072534638709">"Pintasan laporan bug"</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index fff881c..a65fc19 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -212,9 +212,9 @@
     <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_summary" msgid="7130694277228970888">"‏התאמת מכשירים חדשים באמצעות סורק של קודי 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_summary" msgid="6370414511333685185">"התאמת מכשירים חדשים באמצעות קוד בן שש ספרות"</string>
+    <string name="adb_pair_method_code_summary" msgid="6370414511333685185">"התאמת מכשירים חדשים באמצעות קוד בן 6 ספרות"</string>
     <string name="adb_paired_devices_title" msgid="5268997341526217362">"מכשירים מותאמים"</string>
     <string name="adb_wireless_device_connected_summary" msgid="3039660790249148713">"מחובר עכשיו"</string>
     <string name="adb_wireless_device_details_title" msgid="7129369670526565786">"פרטי מכשיר"</string>
@@ -226,12 +226,12 @@
     <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>
+    <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"‏כדי להתאים מכשיר דרך Wi‑Fi, יש לסרוק קוד 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 כדי להתאים מכשיר באמצעות Wi‑Fi"</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="keywords_adb_wireless" msgid="6507505581882171240">"‏adb, ניפוי באגים, פיתוח"</string>
     <string name="bugreport_in_power" msgid="8664089072534638709">"קיצור של דוח באגים"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 3c281c8..11506a4 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -145,7 +145,7 @@
     <string name="data_usage_ota" msgid="7984667793701597001">"സിസ്‌റ്റം അപ്‌ഡേറ്റുകൾ"</string>
     <string name="tether_settings_title_usb" msgid="3728686573430917722">"USB ടെതറിംഗ്"</string>
     <string name="tether_settings_title_wifi" msgid="4803402057533895526">"പോർട്ടബിൾ ഹോട്ട്സ്‌പോട്ട്"</string>
-    <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"ബ്ലൂടൂത്ത് ടെതറിംഗ്"</string>
+    <string name="tether_settings_title_bluetooth" msgid="916519902721399656">"Bluetooth ടെതറിംഗ്"</string>
     <string name="tether_settings_title_usb_bluetooth" msgid="1727111807207577322">"ടെതറിംഗ്"</string>
     <string name="tether_settings_title_all" msgid="8910259483383010470">"ടെതറിംഗും പോർട്ടബിൾ ഹോട്ട്സ്‌പോട്ടും"</string>
     <string name="managed_user_title" msgid="449081789742645723">"എല്ലാ ഔദ്യോഗിക ആപ്‌സും"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 3729a83..d62d944 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/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>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 0e0e761..d567ee2 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -34,7 +34,7 @@
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Sjekk passordet og prøv igjen"</string>
     <string name="wifi_not_in_range" msgid="1541760821805777772">"Utenfor område"</string>
     <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"Kobler ikke til automatisk"</string>
-    <string name="wifi_no_internet" msgid="1774198889176926299">"Ingen Internett-tilgang"</string>
+    <string name="wifi_no_internet" msgid="1774198889176926299">"Ingen internettilgang"</string>
     <string name="saved_network" msgid="7143698034077223645">"Lagret av <xliff:g id="NAME">%1$s</xliff:g>"</string>
     <string name="connected_via_network_scorer" msgid="7665725527352893558">"Automatisk tilkoblet via %1$s"</string>
     <string name="connected_via_network_scorer_default" msgid="7973529709744526285">"Automatisk tilkoblet via leverandør av nettverksvurdering"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index d200f50..c9bbe71 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/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">"ୱାଇଫାଇ ସଂଯୋଗ ବିଫଳ ହୋଇଛି"</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>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index cc1626c..737c000 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"Zlyhanie konfigurácie adresy IP"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Nepripojené z dôvodu siete nízkej kvality"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Zlyhanie pripojenia Wi‑Fi"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problém s overením totožnosti"</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problém s overením"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Nedá sa pripojiť"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"K sieti <xliff:g id="AP_NAME">%1$s</xliff:g> sa nedá pripojiť"</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Skontrolujte heslo a skúste to znova"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 002c7fc..9ebab4d 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -203,9 +203,9 @@
     <string name="vpn_settings_not_available" msgid="2894137119965668920">"Cilësimet e VPN-së nuk ofrohen për këtë përdorues"</string>
     <string name="tethering_settings_not_available" msgid="266821736434699780">"Cilësimet e ndarjes nuk ofrohen për këtë përdorues"</string>
     <string name="apn_settings_not_available" msgid="1147111671403342300">"Cilësimet e \"Emrit të pikës së qasjes\" nuk mund të përdoren për këtë përdorues"</string>
-    <string name="enable_adb" msgid="8072776357237289039">"Korrigjimi i USB-së"</string>
+    <string name="enable_adb" msgid="8072776357237289039">"Korrigjimi përmes USB-së"</string>
     <string name="enable_adb_summary" msgid="3711526030096574316">"Korrigjo gabimet e modalitetit kur UBS-ja është e lidhur"</string>
-    <string name="clear_adb_keys" msgid="3010148733140369917">"Anulo autorizimet e korrigjimeve të gabimeve të USB-së"</string>
+    <string name="clear_adb_keys" msgid="3010148733140369917">"Anulo autorizimet e korrigjimeve përmes USB-së"</string>
     <string name="enable_adb_wireless" msgid="6973226350963971018">"Korrigjimi përmes Wi-Fi"</string>
     <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Modaliteti i korrigjimit kur Wi‑Fi është i lidhur"</string>
     <string name="adb_wireless_error" msgid="721958772149779856">"Gabim"</string>
@@ -225,7 +225,7 @@
     <string name="adb_pairing_device_dialog_title" msgid="7141739231018530210">"Çifto me pajisjen"</string>
     <string name="adb_pairing_device_dialog_pairing_code_label" msgid="3639239786669722731">"Kodi i çiftimit të Wi‑Fi"</string>
     <string name="adb_pairing_device_dialog_failed_title" msgid="3426758947882091735">"Çiftimi ishte i pasuksesshëm"</string>
-    <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"Sigurohu që pajisja të jetë e lidhur me të njëjtin rrjet"</string>
+    <string name="adb_pairing_device_dialog_failed_msg" msgid="6611097519661997148">"Sigurohu që pajisja të jetë e lidhur me të njëjtin rrjet."</string>
     <string name="adb_wireless_qrcode_summary" msgid="8051414549011801917">"Çifto pajisjen përmes Wi‑Fi duke skanuar një kod QR"</string>
     <string name="adb_wireless_verifying_qrcode_text" msgid="6123192424916029207">"Po çifton pajisjen…"</string>
     <string name="adb_qrcode_pairing_device_failed_msg" msgid="6936292092592914132">"Çiftimi i pajisjes dështoi. Ose kodi QR nuk ishte i saktë, ose pajisja nuk është e lidhur me të njëjtin rrjet."</string>
@@ -299,11 +299,11 @@
     <string name="debug_view_attributes" msgid="3539609843984208216">"Aktivizo shikimin e inspektimit të atributeve"</string>
     <string name="mobile_data_always_on_summary" msgid="1112156365594371019">"Mbaji të dhënat celulare gjithmonë aktive edhe kur Wi‑Fi është aktiv (për ndërrim të shpejtë të rrjetit)."</string>
     <string name="tethering_hardware_offload_summary" msgid="7801345335142803029">"Përdor përshpejtimin e harduerit për ndarjen e lidhjes (internet) nëse është i disponueshëm"</string>
-    <string name="adb_warning_title" msgid="7708653449506485728">"Të lejohet korrigjimi i USB-së?"</string>
-    <string name="adb_warning_message" msgid="8145270656419669221">"Korrigjuesi i USB-së është vetëm për qëllime zhvillimore. Përdore për të kopjuar të dhëna mes kompjuterit dhe pajisjes tënde, për të instaluar aplikacione në pajisjen tënde pa asnjë njoftim si dhe për të lexuar të dhënat e ditarit."</string>
+    <string name="adb_warning_title" msgid="7708653449506485728">"Të lejohet korrigjimi përmes USB-së?"</string>
+    <string name="adb_warning_message" msgid="8145270656419669221">"Korrigjuesi përmes USB-së është vetëm për qëllime zhvillimore. Përdore për të kopjuar të dhëna mes kompjuterit dhe pajisjes tënde, për të instaluar aplikacione në pajisjen tënde pa asnjë njoftim si dhe për të lexuar të dhënat e evidencave."</string>
     <string name="adbwifi_warning_title" msgid="727104571653031865">"Të lejohet korrigjimi përmes Wi-Fi?"</string>
     <string name="adbwifi_warning_message" msgid="8005936574322702388">"Korrigjimin përmes Wi-Fi është vetëm për qëllime zhvillimore. Përdore për të kopjuar të dhëna mes kompjuterit dhe pajisjes sate, për të instaluar aplikacione në pajisjen tënde pa asnjë njoftim si dhe për të lexuar të dhënat e regjistrit."</string>
-    <string name="adb_keys_warning_message" msgid="2968555274488101220">"Të bllokohet qasja për korrigjim të USB-së nga të gjithë kompjuterët që ke autorizuar më parë?"</string>
+    <string name="adb_keys_warning_message" msgid="2968555274488101220">"Të bllokohet qasja për korrigjim përmes USB-së nga të gjithë kompjuterët që ke autorizuar më parë?"</string>
     <string name="dev_settings_warning_title" msgid="8251234890169074553">"Të lejohen cilësimet e zhvillimit?"</string>
     <string name="dev_settings_warning_message" msgid="37741686486073668">"Këto cilësime janë të projektuara vetëm për përdorim në programim. Ato mund të shkaktojnë që pajisja dhe aplikacionet në të, të mos punojnë ose të veprojnë në mënyrë të gabuar."</string>
     <string name="verify_apps_over_usb_title" msgid="6031809675604442636">"Verifiko apl. përmes USB-së"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index e944c64..5a3b872 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -210,7 +210,7 @@
     <string name="enable_adb_wireless_summary" msgid="7344391423657093011">"Hali ya utatuzi wakati Wi-Fi imeunganishwa"</string>
     <string name="adb_wireless_error" msgid="721958772149779856">"Hitilafu"</string>
     <string name="adb_wireless_settings" msgid="2295017847215680229">"Utatuzi usiotumia waya"</string>
-    <string name="adb_wireless_list_empty_off" msgid="1713707973837255490">"Ili kungalia na kutumia vifaa vinavyopatikana, washa utatuzi usiotumia waya"</string>
+    <string name="adb_wireless_list_empty_off" msgid="1713707973837255490">"Ili kuangalia na kutumia vifaa vinavyopatikana, washa utatuzi usiotumia waya"</string>
     <string name="adb_pair_method_qrcode_title" msgid="6982904096137468634">"Oanisha kifaa ukitumia msimbo wa QR"</string>
     <string name="adb_pair_method_qrcode_summary" msgid="7130694277228970888">"Oanisha vifaa vipya ukitumia kichanganuzi cha Msimbo wa QR"</string>
     <string name="adb_pair_method_code_title" msgid="1122590300445142904">"Oanisha kifaa ukitumia msimbo wa kuoanisha"</string>
@@ -487,8 +487,8 @@
     <string name="status_unavailable" msgid="5279036186589861608">"Hamna"</string>
     <string name="wifi_status_mac_randomized" msgid="466382542497832189">"Imechagua anwani ya MAC kwa nasibu"</string>
     <plurals name="wifi_tether_connected_summary" formatted="false" msgid="6317236306047306139">
-      <item quantity="other">Imeunganisha vifaa %1$d</item>
-      <item quantity="one">Imeunganisha kifaa %1$d</item>
+      <item quantity="other">Vifaa %1$d vimeunganishwa</item>
+      <item quantity="one">Kifaa %1$d kimeunganishwa</item>
     </plurals>
     <string name="accessibility_manual_zen_more_time" msgid="5141801092071134235">"Muda zaidi."</string>
     <string name="accessibility_manual_zen_less_time" msgid="6828877595848229965">"Muda kidogo."</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index 7468d04..4ba1c7a 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -284,7 +284,7 @@
     <string name="wifi_verbose_logging_summary" msgid="4993823188807767892">"เพิ่มระดับการบันทึก Wi‑Fi แสดงต่อ SSID RSSI ในตัวเลือก Wi‑Fi"</string>
     <string name="wifi_scan_throttling_summary" msgid="2577105472017362814">"ลดการเปลืองแบตเตอรี่และเพิ่มประสิทธิภาพเครือข่าย"</string>
     <string name="wifi_enhanced_mac_randomization_summary" msgid="1210663439867489931">"เมื่อเปิดใช้โหมดนี้ ที่อยู่ MAC ของอุปกรณ์นี้อาจเปลี่ยนทุกครั้งที่เชื่อมต่อกับเครือข่ายที่มีการเปิดใช้การสุ่ม MAC"</string>
-    <string name="wifi_metered_label" msgid="8737187690304098638">"มีการวัดปริมาณอินเทอร์เน็ต"</string>
+    <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">"เลือกขนาด Logger ต่อบัฟเฟอร์ไฟล์บันทึก"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 5d4e975..1a2d5e2 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"Pagkabigo ng Configuration ng IP"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Hindi nakakonekta dahil mababa ang kalidad ng network"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Pagkabigo ng Koneksyon sa WiFi"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problema sa pagpapatotoo"</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Problema sa pag-authenticate"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Hindi makakonekta"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"Hindi makakonekta sa \'<xliff:g id="AP_NAME">%1$s</xliff:g>\'"</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Suriin ang password at subukang muli"</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index de90c9a..b14049a 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -31,7 +31,7 @@
     <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>
+    <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" msgid="1774198889176926299">"انٹرنیٹ تک کوئی رسائی نہیں"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index 2ae55fe..1347cdd 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -28,7 +28,7 @@
     <string name="wifi_disabled_network_failure" msgid="2660396183242399585">"IP manzilini sozlab bo‘lmadi"</string>
     <string name="wifi_disabled_by_recommendation_provider" msgid="1302938248432705534">"Sifatsiz tarmoq sababli ulanib bo‘lmadi"</string>
     <string name="wifi_disabled_wifi_failure" msgid="8819554899148331100">"Wi-Fi ulanishini o‘rnatib bo‘lmadi"</string>
-    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Tasdiqdan o‘tishda muammo"</string>
+    <string name="wifi_disabled_password_failure" msgid="6892387079613226738">"Tekshiruvda muammo"</string>
     <string name="wifi_cant_connect" msgid="5718417542623056783">"Tarmoqqa ulanilmadi"</string>
     <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"“<xliff:g id="AP_NAME">%1$s</xliff:g>” nomli tarmoqqa ulanilmadi"</string>
     <string name="wifi_check_password_try_again" msgid="8817789642851605628">"Parolni tekshirib, qaytadan urining"</string>
@@ -423,12 +423,12 @@
     <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string>
     <string name="power_remaining_duration_only" msgid="8264199158671531431">"Taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi"</string>
     <string name="power_discharging_duration" msgid="1076561255466053220">"Taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
-    <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Joriy holatda taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi"</string>
-    <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Joriy holatda taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
+    <string name="power_remaining_duration_only_enhanced" msgid="2527842780666073218">"Quvvati tugashiga taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi"</string>
+    <string name="power_discharging_duration_enhanced" msgid="1800465736237672323">"Quvvati tugahsiga taxminan <xliff:g id="TIME_REMAINING">%1$s</xliff:g> qoldi (<xliff:g id="LEVEL">%2$s</xliff:g>)"</string>
     <!-- no translation found for power_remaining_duration_only_short (7438846066602840588) -->
     <skip />
-    <string name="power_discharge_by_enhanced" msgid="563438403581662942">"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_enhanced" msgid="563438403581662942">"Shunday ishlatishda 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_enhanced" msgid="3268796172652988877">"Quvvati tugashiga taxminan <xliff:g id="TIME">%1$s</xliff:g> qoldi"</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>
@@ -510,7 +510,7 @@
     <string name="media_transfer_this_device_name" msgid="2716555073132169240">"Telefon karnayi"</string>
     <string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"Ulanishda muammo yuz berdi. Qurilmani oʻchiring va yoqing"</string>
     <string name="media_transfer_wired_device_name" msgid="4447880899964056007">"Simli audio qurilma"</string>
-    <string name="help_label" msgid="3528360748637781274">"Yordam va fikr-mulohaza"</string>
+    <string name="help_label" msgid="3528360748637781274">"Yordam/fikr-mulohaza"</string>
     <string name="storage_category" msgid="2287342585424631813">"Xotira"</string>
     <string name="shared_data_title" msgid="1017034836800864953">"Umumiy maʼlumotlar"</string>
     <string name="shared_data_summary" msgid="5516326713822885652">"Umumiy maʼlumotlarni ochish va oʻzgartirish"</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/OWNERS b/packages/SettingsProvider/OWNERS
index b2ac4f4..cf9799c 100644
--- a/packages/SettingsProvider/OWNERS
+++ b/packages/SettingsProvider/OWNERS
@@ -1,3 +1,4 @@
+hackbod@android.com
 hackbod@google.com
 narayan@google.com
 svetoslavganov@google.com
diff --git a/packages/SettingsProvider/res/values-iw/strings.xml b/packages/SettingsProvider/res/values-iw/strings.xml
index 8d8594d..10765fe 100644
--- a/packages/SettingsProvider/res/values-iw/strings.xml
+++ b/packages/SettingsProvider/res/values-iw/strings.xml
@@ -20,6 +20,6 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label" msgid="4567566098528588863">"אחסון הגדרות"</string>
-    <string name="wifi_softap_config_change" msgid="5688373762357941645">"ההגדרות של הנקודה לשיתוף אינטרנט השתנו"</string>
+    <string name="wifi_softap_config_change" msgid="5688373762357941645">"‏הגדרות נקודת האינטרנט (hotspot) השתנו"</string>
     <string name="wifi_softap_config_change_summary" msgid="8946397286141531087">"יש להקיש להצגת פרטים"</string>
 </resources>
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 51f69a9..2eba38e 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -180,7 +180,7 @@
     <!-- Default state of tap to wake -->
     <bool name="def_double_tap_to_wake">true</bool>
 
-    <!-- Default for Settings.Secure.NFC_PAYMENT_COMPONENT -->
+    <!-- Default for Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT -->
     <string name="def_nfc_payment_component"></string>
 
     <!-- Default setting for ability to add users from the lock screen -->
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 757bbda..ea20be7 100644
--- a/packages/Shell/AndroidManifest.xml
+++ b/packages/Shell/AndroidManifest.xml
@@ -154,6 +154,7 @@
     <uses-permission android:name="android.permission.MANAGE_CONTENT_CAPTURE" />
     <uses-permission android:name="android.permission.MANAGE_CONTENT_SUGGESTIONS" />
     <uses-permission android:name="android.permission.MANAGE_APP_PREDICTIONS" />
+    <uses-permission android:name="android.permission.MANAGE_SEARCH_UI" />
     <uses-permission android:name="android.permission.NETWORK_SETTINGS" />
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
     <uses-permission android:name="android.permission.SET_TIME" />
@@ -290,6 +291,9 @@
     <uses-permission android:name="android.permission.UPGRADE_RUNTIME_PERMISSIONS" />
 
     <!-- Permission needed to read wifi network credentials for CtsNetTestCases -->
+    <uses-permission android:name="android.permission.NETWORK_AIRPLANE_MODE" />
+
+    <!-- Permission needed to read wifi network credentials for CtsNetTestCases -->
     <uses-permission android:name="android.permission.READ_WIFI_CREDENTIAL" />
 
     <!-- Permission needed to use wifi usability API's for CtsNetTestCases -->
@@ -333,6 +337,9 @@
     <!-- Permission needed for CTS test - TimeManagerTest -->
     <uses-permission android:name="android.permission.MANAGE_TIME_AND_ZONE_DETECTION" />
 
+    <!-- Permission needed for CTS test - CtsHdmiCecHostTestCases -->
+    <uses-permission android:name="android.permission.HDMI_CEC" />
+
     <application android:label="@string/app_label"
                 android:theme="@android:style/Theme.DeviceDefault.DayNight"
                 android:defaultToDeviceProtectedStorage="true"
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java
index 02815a57..63b9bb3 100644
--- a/packages/Shell/src/com/android/shell/BugreportProgressService.java
+++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java
@@ -378,6 +378,9 @@
             }
         }
 
+        @Override
+        public void onEarlyReportFinished() {}
+
         /**
          * Reads bugreport id and links it to the bugreport info to track a bugreport that is in
          * process. id is incremented in the dumpstate code.
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/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 2eafc2f..3e858c2 100644
--- a/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-fr-rCA/strings.xml
@@ -65,7 +65,6 @@
     <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>
@@ -89,13 +88,11 @@
     <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>
@@ -117,29 +114,24 @@
     <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 824ea41..8551fab 100644
--- a/packages/SystemUI/res-keyguard/values-fr/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-fr/strings.xml
@@ -65,7 +65,6 @@
     <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>
@@ -89,13 +88,11 @@
     <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>
@@ -117,29 +114,24 @@
     <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-ur/strings.xml b/packages/SystemUI/res-keyguard/values-ur/strings.xml
index 0fd5e17..7f8d160 100644
--- a/packages/SystemUI/res-keyguard/values-ur/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-ur/strings.xml
@@ -25,7 +25,7 @@
     <string name="keyguard_password_enter_puk_code" msgid="3813154965969758868">"‏SIM PUK اور نیا PIN کوڈ ٹائپ کریں"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="3529260761374385243">"‏SIM PUK کوڈ"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="2304037870481240781">"‏نیا SIM PIN کوڈ"</string>
-    <string name="keyguard_password_entry_touch_hint" msgid="6180028658339706333"><font size="17">"پاسورڈ ٹائپ کرنے کیلئے ٹچ کریں"</font></string>
+    <string name="keyguard_password_entry_touch_hint" msgid="6180028658339706333"><font size="17">"پاس ورڈ ٹائپ کرنے کیلئے ٹچ کریں"</font></string>
     <string name="keyguard_password_enter_password_code" msgid="7393393239623946777">"غیر مقفل کرنے کیلئے پاس ورڈ ٹائپ کریں"</string>
     <string name="keyguard_password_enter_pin_password_code" msgid="3692259677395250509">"‏غیر مقفل کرنے کیلئے PIN ٹائپ کریں"</string>
     <string name="keyguard_enter_your_pin" msgid="5429932527814874032">"‏اپنا PIN درج کریں"</string>
@@ -72,7 +72,7 @@
     <string name="kg_sim_pin_instructions_multi" msgid="3639863309953109649">"‏\"<xliff:g id="CARRIER">%1$s</xliff:g>\" کیلئے SIM PIN درج کریں۔"</string>
     <string name="kg_sim_lock_esim_instructions" msgid="5577169988158738030">"‏<xliff:g id="PREVIOUS_MSG">%1$s</xliff:g> موبائل سروس کے بغیر آلہ کا استعمال کرنے کیلئے eSIM غیر فعال کریں۔"</string>
     <string name="kg_pin_instructions" msgid="822353548385014361">"‏‫PIN درج کریں"</string>
-    <string name="kg_password_instructions" msgid="324455062831719903">"پاسورڈ درج کریں"</string>
+    <string name="kg_password_instructions" msgid="324455062831719903">"پاس ورڈ درج کریں"</string>
     <string name="kg_puk_enter_puk_hint" msgid="3005288372875367017">"‏SIM اب غیر فعال ہوگیا ہے۔ جاری رکھنے کیلئے PUK کوڈ درج کریں۔ تفصیلات کیلئے کیریئر سے رابطہ کریں۔"</string>
     <string name="kg_puk_enter_puk_hint_multi" msgid="4876780689904862943">"‏SIM \"<xliff:g id="CARRIER">%1$s</xliff:g>\" اب غیر فعال ہے۔ جاری رکھنے کیلئے PUK کوڈ درج کریں۔ تفصیلات کیلئے کیریئر سے رابطہ کریں۔"</string>
     <string name="kg_puk_enter_pin_hint" msgid="6028432138916150399">"‏پسندیدہ PIN کوڈ درج کریں"</string>
@@ -83,7 +83,7 @@
     <string name="kg_invalid_puk" msgid="1774337070084931186">"‏صحیح PUK کوڈ دوبارہ درج کریں۔ بار بار کی کوششیں SIM کو مستقل طور پر غیر فعال کر دیں گی۔"</string>
     <string name="kg_login_too_many_attempts" msgid="4519957179182578690">"پیٹرن کی بہت ساری کوششیں"</string>
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="544687656831558971">"‏آپ نے اپنا PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ٹائپ کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
-    <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="190984061975729494">"آپ نے اپنا پاسورڈ <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="190984061975729494">"آپ نے اپنا پاس ورڈ <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ٹائپ کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
     <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="4252405904570284368">"آپ نے اپنا غیر مقفل کرنے کا پیٹرن <xliff:g id="NUMBER_0">%1$d</xliff:g> بار غلط طریقے سے ڈرا کیا ہے۔ \n\n <xliff:g id="NUMBER_1">%2$d</xliff:g> سیکنڈ میں دوبارہ کوشش کریں۔"</string>
     <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"‏غلط SIM PIN کوڈ، اب آپ کو اپنا آلہ غیر مقفل کرنے کیلئے اپنے کیریئر سے رابطہ کرنا ہوگا۔"</string>
     <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="7030584350995485026">
@@ -103,13 +103,13 @@
     <string name="airplane_mode" msgid="2528005343938497866">"ہوائی جہاز وضع"</string>
     <string name="kg_prompt_reason_restart_pattern" msgid="4720554342633852066">"آلہ دوبارہ چالو ہونے کے بعد پیٹرن درکار ہوتا ہے"</string>
     <string name="kg_prompt_reason_restart_pin" msgid="1587671566498057656">"‏آلہ دوبارہ چالو ہونے کے بعد PIN درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="8061279087240952002">"آلہ دوبارہ چالو ہونے کے بعد پاسورڈ درکار ہوتا ہے"</string>
+    <string name="kg_prompt_reason_restart_password" msgid="8061279087240952002">"آلہ دوبارہ چالو ہونے کے بعد پاس ورڈ درکار ہوتا ہے"</string>
     <string name="kg_prompt_reason_timeout_pattern" msgid="9170360502528959889">"اضافی سیکیورٹی کیلئے پیٹرن درکار ہے"</string>
     <string name="kg_prompt_reason_timeout_pin" msgid="5945186097160029201">"‏اضافی سیکیورٹی کیلئے PIN درکار ہے"</string>
-    <string name="kg_prompt_reason_timeout_password" msgid="2258263949430384278">"اضافی سیکیورٹی کیلئے پاسورڈ درکار ہے"</string>
+    <string name="kg_prompt_reason_timeout_password" msgid="2258263949430384278">"اضافی سیکیورٹی کیلئے پاس ورڈ درکار ہے"</string>
     <string name="kg_prompt_reason_switch_profiles_pattern" msgid="1922016914701991230">"جب آپ پروفائل سوئچ کرتے ہیں تو پیٹرن درکار ہوتا ہے"</string>
     <string name="kg_prompt_reason_switch_profiles_pin" msgid="6490434826361055400">"‏جب آپ پروفائل سوئچ کرتے ہیں تو PIN درکار ہوتا ہے"</string>
-    <string name="kg_prompt_reason_switch_profiles_password" msgid="1680374696393804441">"جب آپ پروفائل سوئچ کرتے ہیں تو پاسورڈ درکار ہوتا ہے"</string>
+    <string name="kg_prompt_reason_switch_profiles_password" msgid="1680374696393804441">"جب آپ پروفائل سوئچ کرتے ہیں تو پاس ورڈ درکار ہوتا ہے"</string>
     <string name="kg_prompt_reason_device_admin" msgid="6961159596224055685">"آلہ منتظم کی جانب سے مقفل ہے"</string>
     <string name="kg_prompt_reason_user_request" msgid="6015774877733717904">"آلہ کو دستی طور پر مقفل کیا گیا تھا"</string>
     <plurals name="kg_prompt_reason_time_pattern" formatted="false" msgid="1337428979661197957">
@@ -121,8 +121,8 @@
       <item quantity="one">‏آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹہ سے غیر مقفل نہیں کیا گیا۔ PIN کی توثیق کریں۔</item>
     </plurals>
     <plurals name="kg_prompt_reason_time_password" formatted="false" msgid="5343961527665116914">
-      <item quantity="other">آلہ <xliff:g id="NUMBER_1">%d</xliff:g> گھنٹوں سے غیر مقفل نہیں کیا گيا۔ پاسورڈ کی توثیق کریں۔</item>
-      <item quantity="one">آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹہ سے غیر مقفل نہیں کیا گیا۔ پاسورڈ کی توثیق کریں۔</item>
+      <item quantity="other">آلہ <xliff:g id="NUMBER_1">%d</xliff:g> گھنٹوں سے غیر مقفل نہیں کیا گيا۔ پاس ورڈ کی توثیق کریں۔</item>
+      <item quantity="one">آلہ <xliff:g id="NUMBER_0">%d</xliff:g> گھنٹہ سے غیر مقفل نہیں کیا گیا۔ پاس ورڈ کی توثیق کریں۔</item>
     </plurals>
     <string name="kg_fingerprint_not_recognized" msgid="5982606907039479545">"تسلیم شدہ نہیں ہے"</string>
     <string name="kg_face_not_recognized" msgid="7903950626744419160">"تسلیم شدہ نہیں ہے"</string>
diff --git a/packages/SystemUI/res-keyguard/values-uz/strings.xml b/packages/SystemUI/res-keyguard/values-uz/strings.xml
index 323fea5..d19f30e 100644
--- a/packages/SystemUI/res-keyguard/values-uz/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-uz/strings.xml
@@ -101,9 +101,9 @@
     <string name="keyguard_carrier_default" msgid="6359808469637388586">"Aloqa yo‘q."</string>
     <string name="accessibility_ime_switch_button" msgid="9082358310194861329">"Matn kiritish usulini almashtirish"</string>
     <string name="airplane_mode" msgid="2528005343938497866">"Parvoz rejimi"</string>
-    <string name="kg_prompt_reason_restart_pattern" msgid="4720554342633852066">"Qurilma o‘chirib yoqilgandan keyin grafik kalit talab qilinadi"</string>
-    <string name="kg_prompt_reason_restart_pin" msgid="1587671566498057656">"Qurilma o‘chirib yoqilgandan keyin PIN kod talab qilinadi"</string>
-    <string name="kg_prompt_reason_restart_password" msgid="8061279087240952002">"Qurilma o‘chirib yoqilgandan keyin parol talab qilinadi"</string>
+    <string name="kg_prompt_reason_restart_pattern" msgid="4720554342633852066">"Qurilma qayta ishga tushganidan keyin grafik kalitni kiritish zarur"</string>
+    <string name="kg_prompt_reason_restart_pin" msgid="1587671566498057656">"Qurilma qayta ishga tushganidan keyin PIN kodni kiritish zarur"</string>
+    <string name="kg_prompt_reason_restart_password" msgid="8061279087240952002">"Qurilma qayta ishga tushganidan keyin parolni kiritish zarur"</string>
     <string name="kg_prompt_reason_timeout_pattern" msgid="9170360502528959889">"Qo‘shimcha xavfsizlik chorasi sifatida grafik kalit talab qilinadi"</string>
     <string name="kg_prompt_reason_timeout_pin" msgid="5945186097160029201">"Qo‘shimcha xavfsizlik chorasi sifatida PIN kod talab qilinadi"</string>
     <string name="kg_prompt_reason_timeout_password" msgid="2258263949430384278">"Qo‘shimcha xavfsizlik chorasi sifatida parol talab qilinadi"</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/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 94be2e1..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>
@@ -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 e526114..0a6a1b0 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/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">"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>
@@ -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>
@@ -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-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 37f9095..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>
@@ -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 25c01f6..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>
@@ -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 5656620..f457492 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -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>
@@ -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 edee95f..090698c 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -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>
@@ -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>
@@ -988,6 +989,13 @@
     <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 1cca167..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>
@@ -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 6c05d6c..6baa848 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,7 +325,6 @@
     <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>
@@ -403,7 +400,6 @@
     <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>
@@ -496,7 +492,6 @@
     <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>
@@ -763,12 +758,10 @@
     <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>
@@ -889,12 +882,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>
@@ -927,11 +921,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>
@@ -993,6 +989,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>
@@ -1037,7 +1040,6 @@
     <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>
@@ -1072,7 +1074,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 55e7bf4..ad258b2 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,7 +325,6 @@
     <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>
@@ -403,7 +400,6 @@
     <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>
@@ -496,7 +492,6 @@
     <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>
@@ -763,12 +758,10 @@
     <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>
@@ -889,12 +882,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>
@@ -927,11 +921,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>
@@ -993,6 +989,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>
@@ -1037,7 +1040,6 @@
     <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>
@@ -1072,7 +1074,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 2f7a26b..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>
@@ -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>
@@ -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 9d74592..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>
@@ -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..88bb88c 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -35,7 +35,7 @@
     <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_ok" msgid="5042136476802816494">"הפעל"</string>
+    <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>
@@ -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>
@@ -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">"‏נקודת האינטרנט (hotspot) כבויה."</string>
+    <string name="accessibility_quick_settings_hotspot_changed_on" msgid="2576895346762408840">"‏נקודת האינטרנט (hotspot) מופעלת."</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>
@@ -399,7 +397,7 @@
     <string name="quick_settings_connected_battery_level" msgid="1322075669498906959">"מחובר, הסוללה ב-<xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g>"</string>
     <string name="quick_settings_connecting" msgid="2381969772953268809">"מתחבר..."</string>
     <string name="quick_settings_tethering_label" msgid="5257299852322475780">"שיתוף אינטרנט בין ניידים"</string>
-    <string name="quick_settings_hotspot_label" msgid="1199196300038363424">"נקודה לשיתוף אינטרנט"</string>
+    <string name="quick_settings_hotspot_label" msgid="1199196300038363424">"‏נקודת אינטרנט (hotspot)"</string>
     <string name="quick_settings_hotspot_secondary_label_transient" msgid="7585604088079160564">"ההפעלה מתבצעת…"</string>
     <string name="quick_settings_hotspot_secondary_label_data_saver_enabled" msgid="1280433136266439372">"חוסך הנתונים פועל"</string>
     <plurals name="quick_settings_hotspot_secondary_label_num_devices" formatted="false" msgid="3142308865165871976">
@@ -668,7 +666,7 @@
     <string name="alarm_template" msgid="2234991538018805736">"בשעה <xliff:g id="WHEN">%1$s</xliff:g>"</string>
     <string name="alarm_template_far" msgid="3561752195856839456">"ב-<xliff:g id="WHEN">%1$s</xliff:g>"</string>
     <string name="accessibility_quick_settings_detail" msgid="544463655956179791">"הגדרות מהירות, <xliff:g id="TITLE">%s</xliff:g>."</string>
-    <string name="accessibility_status_bar_hotspot" msgid="2888479317489131669">"נקודה לשיתוף אינטרנט"</string>
+    <string name="accessibility_status_bar_hotspot" msgid="2888479317489131669">"‏נקודת אינטרנט (hotspot)"</string>
     <string name="accessibility_managed_profile" msgid="4703836746209377356">"פרופיל עבודה"</string>
     <string name="tuner_warning_title" msgid="7721976098452135267">"מהנה בשביל חלק מהאנשים, אבל לא בשביל כולם"</string>
     <string name="tuner_warning" msgid="1861736288458481650">"‏System UI Tuner מספק לך דרכים נוספות להתאים אישית את ממשק המשתמש של Android. התכונות הניסיוניות האלה עשויות להשתנות, להתקלקל או להיעלם בגרסאות עתידיות. המשך בזהירות."</string>
@@ -685,7 +683,7 @@
     <string name="experimental" msgid="3549865454812314826">"ניסיוני"</string>
     <string name="enable_bluetooth_title" msgid="866883307336662596">"‏האם להפעיל את ה-Bluetooth?"</string>
     <string name="enable_bluetooth_message" msgid="6740938333772779717">"‏כדי לחבר את המקלדת לטאבלט, תחילה עליך להפעיל את ה-Bluetooth."</string>
-    <string name="enable_bluetooth_confirmation_ok" msgid="2866408183324184876">"הפעל"</string>
+    <string name="enable_bluetooth_confirmation_ok" msgid="2866408183324184876">"הפעלה"</string>
     <string name="show_silently" msgid="5629369640872236299">"הצגת התראות בלי להשמיע צליל"</string>
     <string name="block" msgid="188483833983476566">"חסימת כל ההתראות"</string>
     <string name="do_not_silence" msgid="4982217934250511227">"לא להשתיק"</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 42c8f58..47e38f9 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/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-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 8901a646..7ceeceb 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/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-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index d4d57ce..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>
@@ -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 8cef142..08612d7 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/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-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index 389fb14..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>
@@ -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>
@@ -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-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index fa0319a..f6b71e4 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/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>
@@ -778,7 +776,7 @@
     <string name="keyboard_key_dpad_left" msgid="8329738048908755640">"Зүүн"</string>
     <string name="keyboard_key_dpad_right" msgid="6282105433822321767">"Баруун"</string>
     <string name="keyboard_key_dpad_center" msgid="4079412840715672825">"Гол хэсэг"</string>
-    <string name="keyboard_key_tab" msgid="4592772350906496730">"Чихтэй хуудас"</string>
+    <string name="keyboard_key_tab" msgid="4592772350906496730">"Таб"</string>
     <string name="keyboard_key_space" msgid="6980847564173394012">"Зай"</string>
     <string name="keyboard_key_enter" msgid="8633362970109751646">"Оруулах"</string>
     <string name="keyboard_key_backspace" msgid="4095278312039628074">"Арилгах"</string>
@@ -828,7 +826,7 @@
     <string name="switch_bar_on" msgid="1770868129120096114">"Идэвхтэй"</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" msgid="4642708685386136807">"Навигацын самбар"</string>
     <string name="nav_bar_layout" msgid="4716392484772899544">"Бүдүүвч"</string>
     <string name="left_nav_bar_button_type" msgid="2634852842345192790">"Нэмэлт зүүн товчлуураар шивэх"</string>
     <string name="right_nav_bar_button_type" msgid="4472566498647364715">"Нэмэлт баруун товчлуураар шивэх"</string>
@@ -850,7 +848,7 @@
     <string name="reset" msgid="8715144064608810383">"Шинэчлэх"</string>
     <string name="adjust_button_width" msgid="8313444823666482197">"Товчлуурын өргөнг тохируулах"</string>
     <string name="clipboard" msgid="8517342737534284617">"Түр санах ой"</string>
-    <string name="accessibility_key" msgid="3471162841552818281">"Навигацийн товчлуурыг өөрчлөх"</string>
+    <string name="accessibility_key" msgid="3471162841552818281">"Навигацын товчлуурыг өөрчлөх"</string>
     <string name="left_keycode" msgid="8211040899126637342">"Зүүн түлхүүрийн код"</string>
     <string name="right_keycode" msgid="2480715509844798438">"Баруун түлхүүрийн код"</string>
     <string name="left_icon" msgid="5036278531966897006">"Зүүн дүрс тэмдэг"</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-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 26a3203..30ecf7a 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -63,7 +63,7 @@
     <string name="usb_debugging_allow" msgid="1722643858015321328">"अनुमती द्या"</string>
     <string name="usb_debugging_secondary_user_title" msgid="7843050591380107998">"USB डीबग करण्‍यास अनुमती नाही"</string>
     <string name="usb_debugging_secondary_user_message" msgid="3740347841470403244">"सध्‍या या डीव्हाइसमध्‍ये साइन इन केलेला वापरकर्ता USB डीबग करणे सुरू करू शकत नाही. हे वैशिष्‍ट्य वापरण्‍यासाठी, प्राथमिक वापरकर्त्‍यावर स्विच करा."</string>
-    <string name="wifi_debugging_title" msgid="7300007687492186076">"या नेटवर्कवर वायरलेस डीबगिंग करण्याला अनुमती द्यायची का?"</string>
+    <string name="wifi_debugging_title" msgid="7300007687492186076">"या नेटवर्कवर वायरलेस डीबगिंग करण्यासाठी अनुमती द्यायची का?"</string>
     <string name="wifi_debugging_message" msgid="5461204211731802995">"नेटवर्कचे नाव (SSID)\n<xliff:g id="SSID_0">%1$s</xliff:g>\n\nवाय-फाय ॲड्रेस (BSSID)\n<xliff:g id="BSSID_1">%2$s</xliff:g>"</string>
     <string name="wifi_debugging_always" msgid="2968383799517975155">"या नेटवर्कवर नेहमी अनुमती द्या"</string>
     <string name="wifi_debugging_allow" msgid="4573224609684957886">"अनुमती द्या"</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">"शीर्ष 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>
@@ -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 937e3d3..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>
@@ -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 3c2824f..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>
@@ -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 6cdd56f..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>
@@ -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 a245769..d304098 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>
@@ -424,7 +422,7 @@
     <string name="quick_settings_night_secondary_label_until_sunrise" msgid="4063448287758262485">"Do wschodu słońca"</string>
     <string name="quick_settings_night_secondary_label_on_at" msgid="3584738542293528235">"Włącz o <xliff:g id="TIME">%s</xliff:g>"</string>
     <string name="quick_settings_secondary_label_until" msgid="1883981263191927372">"Do <xliff:g id="TIME">%s</xliff:g>"</string>
-    <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Tryb ciemny"</string>
+    <string name="quick_settings_ui_mode_night_label" msgid="1398928270610780470">"Ciemny motyw"</string>
     <string name="quick_settings_dark_mode_secondary_label_battery_saver" msgid="4990712734503013251">"Oszczędzanie baterii"</string>
     <string name="quick_settings_dark_mode_secondary_label_on_at_sunset" msgid="6017379738102015710">"Włącz o zachodzie"</string>
     <string name="quick_settings_dark_mode_secondary_label_until_sunrise" msgid="4404885070316716472">"Do wschodu słońca"</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..555b1c0 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>
@@ -565,9 +563,9 @@
     <string name="monitoring_description_vpn_settings" msgid="5264167033247632071">"Abrir as definições de VPN"</string>
     <string name="monitoring_description_ca_cert_settings_separator" msgid="7107390013344435439">" "</string>
     <string name="monitoring_description_ca_cert_settings" msgid="8329781950135541003">"Abrir credenciais fidedignas"</string>
-    <string name="monitoring_description_network_logging" msgid="577305979174002252">"O seu gestor ativou os registos de rede, que monitorizam o tráfego no seu dispositivo.\n\nPara obter mais informações, contacte o gestor."</string>
+    <string name="monitoring_description_network_logging" msgid="577305979174002252">"O seu gestor ativou os registos de rede, que monitorizam o tráfego no seu dispositivo.\n\nPara mais informações, contacte o gestor."</string>
     <string name="monitoring_description_vpn" msgid="1685428000684586870">"Concedeu autorização a uma app para configurar uma ligação VPN.\n\nEsta app pode monitorizar a atividade do dispositivo e da rede, incluindo emails, aplicações e Sites."</string>
-    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"O seu perfil de trabalho é gerido por <xliff:g id="ORGANIZATION">%1$s</xliff:g>.\n\nO seu gestor tem a capacidade de monitorizar a sua atividade da rede, incluindo emails, aplicações e Sites.\n\nPara obter mais informações, contacte o gestor.\n\nAlém disso, está ligado a uma VPN, que pode monitorizar a sua atividade da rede."</string>
+    <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"O seu perfil de trabalho é gerido por <xliff:g id="ORGANIZATION">%1$s</xliff:g>.\n\nO seu gestor tem a capacidade de monitorizar a sua atividade da rede, incluindo emails, aplicações e Sites.\n\nPara mais informações, contacte o gestor.\n\nAlém disso, está ligado a uma VPN, que pode monitorizar a sua atividade da rede."</string>
     <string name="legacy_vpn_name" msgid="4174223520162559145">"VPN"</string>
     <string name="monitoring_description_app" msgid="376868879287922929">"Está associado à app <xliff:g id="APPLICATION">%1$s</xliff:g>, que pode monitorizar a sua atividade de rede, incluindo emails, aplicações e Sites."</string>
     <string name="monitoring_description_app_personal" msgid="1970094872688265987">"Está ligado a <xliff:g id="APPLICATION">%1$s</xliff:g>, que pode monitorizar a atividade da rede pessoal, incluindo emails, aplicações e Sites."</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..5b186fa 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -57,15 +57,15 @@
     <string name="label_view" msgid="6815442985276363364">"Pamje"</string>
     <string name="always_use_device" msgid="210535878779644679">"Hap gjithmonë <xliff:g id="APPLICATION">%1$s</xliff:g> kur lidhet <xliff:g id="USB_DEVICE">%2$s</xliff:g>"</string>
     <string name="always_use_accessory" msgid="1977225429341838444">"Hap gjithmonë <xliff:g id="APPLICATION">%1$s</xliff:g> kur lidhet <xliff:g id="USB_ACCESSORY">%2$s</xliff:g>"</string>
-    <string name="usb_debugging_title" msgid="8274884945238642726">"Të lejohet korrigjimi i USB-së?"</string>
+    <string name="usb_debugging_title" msgid="8274884945238642726">"Të lejohet korrigjimi përmes USB-së?"</string>
     <string name="usb_debugging_message" msgid="5794616114463921773">"Gjurma e gishtit të tastit \"RSA\" së kompjuterit është:\n<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string>
     <string name="usb_debugging_always" msgid="4003121804294739548">"Lejo gjithmonë nga ky kompjuter"</string>
     <string name="usb_debugging_allow" msgid="1722643858015321328">"Lejo"</string>
-    <string name="usb_debugging_secondary_user_title" msgid="7843050591380107998">"Korrigjimi i USB-së nuk lejohet"</string>
-    <string name="usb_debugging_secondary_user_message" msgid="3740347841470403244">"Përdoruesi i identifikuar aktualisht në këtë pajisje nuk mund ta aktivizojë korrigjimin e USB-së. Për ta përdorur këtë funksion, kalo te përdoruesi parësor."</string>
+    <string name="usb_debugging_secondary_user_title" msgid="7843050591380107998">"Korrigjimi përmes USB-së nuk lejohet"</string>
+    <string name="usb_debugging_secondary_user_message" msgid="3740347841470403244">"Përdoruesi i identifikuar aktualisht në këtë pajisje nuk mund ta aktivizojë korrigjimin përmes USB-së. Për ta përdorur këtë veçori, kalo te përdoruesi parësor."</string>
     <string name="wifi_debugging_title" msgid="7300007687492186076">"Do ta lejosh korrigjimin përmes Wi-Fi në këtë rrjet?"</string>
     <string name="wifi_debugging_message" msgid="5461204211731802995">"Emri i rrjetit (SSID)\n<xliff:g id="SSID_0">%1$s</xliff:g>\n\nAdresa Wi‑Fi (BSSID)\n<xliff:g id="BSSID_1">%2$s</xliff:g>"</string>
-    <string name="wifi_debugging_always" msgid="2968383799517975155">"Shfaq gjithmonë në këtë rrjet"</string>
+    <string name="wifi_debugging_always" msgid="2968383799517975155">"Lejo gjithmonë në këtë rrjet"</string>
     <string name="wifi_debugging_allow" msgid="4573224609684957886">"Lejo"</string>
     <string name="wifi_debugging_secondary_user_title" msgid="2493201475880517725">"Korrigjimi përmes Wi-Fi nuk lejohet"</string>
     <string name="wifi_debugging_secondary_user_message" msgid="4492383073970079751">"Përdoruesi i identifikuar aktualisht në këtë pajisje nuk mund ta aktivizojë korrigjimin përmes Wi-Fi. Për ta përdorur këtë veçori, kalo te përdoruesi parësor."</string>
@@ -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 61a2303..9b812df 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/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>
@@ -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>
@@ -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 1952d42..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>
@@ -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 3c6b936..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>
@@ -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>
@@ -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 d85bb0c..b0123bb 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -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>
@@ -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>
@@ -988,6 +989,13 @@
     <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 3d0b89c..5689891 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/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">"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 ffa72cf..06eeb0d 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -26,7 +26,7 @@
     <string name="status_bar_latest_events_title" msgid="202755896454005436">"Eslatmalar"</string>
     <string name="battery_low_title" msgid="6891106956328275225">"Batareya tez orada tugaydi"</string>
     <string name="battery_low_percent_format" msgid="4276661262843170964">"<xliff:g id="PERCENTAGE">%s</xliff:g> qoldi"</string>
-    <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> (joriy holatda taxminan <xliff:g id="TIME">%2$s</xliff:g> qoldi)"</string>
+    <string name="battery_low_percent_format_hybrid" msgid="3985614339605686167">"Batareya qivvati – <xliff:g id="PERCENTAGE">%1$s</xliff:g>, tugashiga taxminan <xliff:g id="TIME">%2$s</xliff:g> qoldi"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="5917433188456218857">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> (taxminan <xliff:g id="TIME">%2$s</xliff:g> qoldi)"</string>
     <string name="battery_low_percent_format_saver_started" msgid="4968468824040940688">"<xliff:g id="PERCENTAGE">%s</xliff:g> qoldi. Quvvat tejash rejimi yoniq."</string>
     <string name="invalid_charger" msgid="4370074072117767416">"USB orqali quvvatlash imkonsiz. Qurilmangiz bilan kelgan quvvatlash moslamasidan foydalaning."</string>
@@ -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>
@@ -702,13 +700,13 @@
     <string name="inline_block_button" msgid="479892866568378793">"Bloklash"</string>
     <string name="inline_keep_button" msgid="299631874103662170">"Ha"</string>
     <string name="inline_minimize_button" msgid="1474436209299333445">"Kichraytirish"</string>
-    <string name="inline_silent_button_silent" msgid="525243786649275816">"Tovushsiz"</string>
+    <string name="inline_silent_button_silent" msgid="525243786649275816">"Sokin"</string>
     <string name="inline_silent_button_stay_silent" msgid="2129254868305468743">"Ovozsiz qolsin"</string>
     <string name="inline_silent_button_alert" msgid="5705343216858250354">"Ogohlantirish"</string>
     <string name="inline_silent_button_keep_alerting" msgid="6577845442184724992">"Signal berishda davom etilsin"</string>
     <string name="inline_turn_off_notifications" msgid="8543989584403106071">"Bildirishnoma kelmasin"</string>
     <string name="inline_keep_showing_app" msgid="4393429060390649757">"Bu ilovadan keladigan bildirishnomalar chiqaversinmi?"</string>
-    <string name="notification_silence_title" msgid="8608090968400832335">"Tovushsiz"</string>
+    <string name="notification_silence_title" msgid="8608090968400832335">"Sokin"</string>
     <string name="notification_alert_title" msgid="3656229781017543655">"Standart"</string>
     <string name="notification_bubble_title" msgid="8330481035191903164">"Pufaklar"</string>
     <string name="notification_channel_summary_low" msgid="4860617986908931158">"Tovush yoki tebranishsiz"</string>
@@ -720,8 +718,8 @@
     <string name="notification_conversation_channel_settings" msgid="2409977688430606835">"Sozlamalar"</string>
     <string name="notification_priority_title" msgid="2079708866333537093">"Muhim"</string>
     <string name="no_shortcut" msgid="8257177117568230126">"<xliff:g id="APP_NAME">%1$s</xliff:g> ilovasida suhbat funksiyalari ishlamaydi"</string>
-    <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Avvalgi bulutchalar topilmadi"</string>
-    <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Bu yerda oxirgi va yopilgan bulutcha shaklidagi bildirishnomalar chiqadi"</string>
+    <string name="bubble_overflow_empty_title" msgid="3120029421991510842">"Hech qanday bulutcha topilmadi"</string>
+    <string name="bubble_overflow_empty_subtitle" msgid="2030874469510497397">"Eng oxirgi va yopilgan bulutchali chatlar shu yerda chiqadi"</string>
     <string name="notification_unblockable_desc" msgid="2073030886006190804">"Bu bildirishnomalarni tahrirlash imkonsiz."</string>
     <string name="notification_multichannel_desc" msgid="7414593090056236179">"Ushbu bildirishnomalar guruhi bu yerda sozlanmaydi"</string>
     <string name="notification_delegate_header" msgid="1264510071031479920">"Ishonchli bildirishnoma"</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/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
index 48161f1..31fc760 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java
@@ -435,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/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/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/Android.bp b/services/core/Android.bp
index 4b9d0f1..6adf66c 100644
--- a/services/core/Android.bp
+++ b/services/core/Android.bp
@@ -196,7 +196,6 @@
         "java/com/android/server/connectivity/KeepaliveTracker.java",
         "java/com/android/server/connectivity/LingerMonitor.java",
         "java/com/android/server/connectivity/MockableSystemProperties.java",
-        "java/com/android/server/connectivity/MultipathPolicyTracker.java",
         "java/com/android/server/connectivity/Nat464Xlat.java",
         "java/com/android/server/connectivity/NetdEventListenerService.java",
         "java/com/android/server/connectivity/NetworkAgentInfo.java",
@@ -211,17 +210,3 @@
         "java/com/android/server/net/LockdownVpnTracker.java",
     ],
 }
-
-java_library {
-    name: "service-connectivity",
-    srcs: [
-        ":connectivity-service-srcs",
-    ],
-    installable: true,
-    libs: [
-        "android.net.ipsec.ike",
-        "services.core",
-        "services.net",
-        "unsupportedappusage",
-    ],
-}
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/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index 651f941..d09f44f 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -3369,7 +3369,9 @@
                     if (mMaxDelayTime < thisDelayTime) {
                         mMaxDelayTime = thisDelayTime;
                     }
-                    deliverAlarmsLocked(mPendingNonWakeupAlarms, nowELAPSED);
+                    ArrayList<Alarm> triggerList =
+                            (ArrayList<Alarm>) mPendingNonWakeupAlarms.clone();
+                    deliverAlarmsLocked(triggerList, nowELAPSED);
                     mPendingNonWakeupAlarms.clear();
                 }
                 if (mNonInteractiveStartTime > 0) {
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 9dbdc14..26c0e59 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -83,6 +83,7 @@
 import android.net.ConnectivityDiagnosticsManager.DataStallReport;
 import android.net.ConnectivityManager;
 import android.net.DataStallReportParcelable;
+import android.net.DnsResolverServiceManager;
 import android.net.ICaptivePortal;
 import android.net.IConnectivityDiagnosticsCallback;
 import android.net.IConnectivityManager;
@@ -113,7 +114,6 @@
 import android.net.NetworkMonitorManager;
 import android.net.NetworkPolicyManager;
 import android.net.NetworkProvider;
-import android.net.NetworkQuotaInfo;
 import android.net.NetworkRequest;
 import android.net.NetworkSpecifier;
 import android.net.NetworkStack;
@@ -129,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;
@@ -136,8 +137,6 @@
 import android.net.metrics.NetworkEvent;
 import android.net.netlink.InetDiagMessage;
 import android.net.shared.PrivateDnsConfig;
-import android.net.util.LinkPropertiesUtils.CompareOrUpdateResult;
-import android.net.util.LinkPropertiesUtils.CompareResult;
 import android.net.util.MultinetworkPolicyTracker;
 import android.net.util.NetdService;
 import android.os.Binder;
@@ -146,6 +145,7 @@
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.IBinder;
+import android.os.INetworkActivityListener;
 import android.os.INetworkManagementService;
 import android.os.Looper;
 import android.os.Message;
@@ -186,12 +186,13 @@
 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;
 import com.android.internal.util.XmlUtils;
 import com.android.modules.utils.BasicShellCommandHandler;
+import com.android.net.module.util.LinkPropertiesUtils.CompareOrUpdateResult;
+import com.android.net.module.util.LinkPropertiesUtils.CompareResult;
 import com.android.server.am.BatteryStatsService;
 import com.android.server.connectivity.AutodestructReference;
 import com.android.server.connectivity.DataConnectionStats;
@@ -201,7 +202,6 @@
 import com.android.server.connectivity.KeepaliveTracker;
 import com.android.server.connectivity.LingerMonitor;
 import com.android.server.connectivity.MockableSystemProperties;
-import com.android.server.connectivity.MultipathPolicyTracker;
 import com.android.server.connectivity.NetworkAgentInfo;
 import com.android.server.connectivity.NetworkDiagnostics;
 import com.android.server.connectivity.NetworkNotificationManager;
@@ -442,11 +442,6 @@
     private static final int EVENT_EXPIRE_NET_TRANSITION_WAKELOCK = 24;
 
     /**
-     * Used internally to indicate the system is ready.
-     */
-    private static final int EVENT_SYSTEM_READY = 25;
-
-    /**
      * used to add a network request with a pending intent
      * obj = NetworkRequestInfo
      */
@@ -577,9 +572,8 @@
         return sMagicDecoderRing.get(what, Integer.toString(what));
     }
 
-    private static IDnsResolver getDnsResolver() {
-        return IDnsResolver.Stub
-                .asInterface(ServiceManager.getService("dnsresolver"));
+    private static IDnsResolver getDnsResolver(Context context) {
+        return IDnsResolver.Stub.asInterface(DnsResolverServiceManager.getService(context));
     }
 
     /** Handler thread used for all of the handlers below. */
@@ -661,9 +655,6 @@
     final MultinetworkPolicyTracker mMultinetworkPolicyTracker;
 
     @VisibleForTesting
-    final MultipathPolicyTracker mMultipathPolicyTracker;
-
-    @VisibleForTesting
     final Map<IBinder, ConnectivityDiagnosticsCallbackInfo> mConnectivityDiagnosticsCallbacks =
             new HashMap<>();
 
@@ -877,6 +868,10 @@
      */
     @VisibleForTesting
     public static class Dependencies {
+        public int getCallingUid() {
+            return Binder.getCallingUid();
+        }
+
         /**
          * Get system properties to use in ConnectivityService.
          */
@@ -951,7 +946,7 @@
 
     public ConnectivityService(Context context, INetworkManagementService netManager,
             INetworkStatsService statsService, INetworkPolicyManager policyManager) {
-        this(context, netManager, statsService, policyManager, getDnsResolver(),
+        this(context, netManager, statsService, policyManager, getDnsResolver(context),
                 new IpConnectivityLog(), NetdService.getInstance(), new Dependencies());
     }
 
@@ -1163,8 +1158,6 @@
                 mContext, mHandler, () -> rematchForAvoidBadWifiUpdate());
         mMultinetworkPolicyTracker.start();
 
-        mMultipathPolicyTracker = new MultipathPolicyTracker(mContext, mHandler);
-
         mDnsManager = new DnsManager(mContext, mDnsResolver);
         registerPrivateDnsSettingsCallbacks();
     }
@@ -1287,7 +1280,7 @@
         if (network == null) {
             return null;
         }
-        return getNetworkAgentInfoForNetId(network.netId);
+        return getNetworkAgentInfoForNetId(network.getNetId());
     }
 
     private NetworkAgentInfo getNetworkAgentInfoForNetId(int netId) {
@@ -1377,8 +1370,11 @@
             return;
         }
         final String action = blocked ? "BLOCKED" : "UNBLOCKED";
+        final NetworkRequest satisfiedRequest = nri.getSatisfiedRequest();
+        final int requestId =  satisfiedRequest != null
+                ? satisfiedRequest.requestId : nri.mRequests.get(0).requestId;
         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, requestId, net.getNetId()));
     }
 
     /**
@@ -1409,7 +1405,7 @@
     @Override
     public NetworkInfo getActiveNetworkInfo() {
         enforceAccessPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         final NetworkState state = getUnfilteredActiveNetworkState(uid);
         filterNetworkStateForUid(state, uid, false);
         maybeLogBlockedNetworkInfo(state.networkInfo, uid);
@@ -1419,7 +1415,7 @@
     @Override
     public Network getActiveNetwork() {
         enforceAccessPermission();
-        return getActiveNetworkForUidInternal(Binder.getCallingUid(), false);
+        return getActiveNetworkForUidInternal(mDeps.getCallingUid(), false);
     }
 
     @Override
@@ -1459,7 +1455,7 @@
     // Public because it's used by mLockdownTracker.
     public NetworkInfo getActiveNetworkInfoUnfiltered() {
         enforceAccessPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         NetworkState state = getUnfilteredActiveNetworkState(uid);
         return state.networkInfo;
     }
@@ -1475,7 +1471,7 @@
     @Override
     public NetworkInfo getNetworkInfo(int networkType) {
         enforceAccessPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         if (getVpnUnderlyingNetworks(uid) != null) {
             // A VPN is active, so we may need to return one of its underlying networks. This
             // information is not available in LegacyTypeTracker, so we have to get it from
@@ -1520,7 +1516,7 @@
     @Override
     public Network getNetworkForType(int networkType) {
         enforceAccessPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         NetworkState state = getFilteredNetworkState(networkType, uid);
         if (!isNetworkWithLinkPropertiesBlocked(state.linkProperties, uid, false)) {
             return state.network;
@@ -1567,7 +1563,7 @@
             result.put(
                     nai.network,
                     maybeSanitizeLocationInfoForCaller(
-                            nc, Binder.getCallingUid(), callingPackageName));
+                            nc, mDeps.getCallingUid(), callingPackageName));
         }
 
         synchronized (mVpns) {
@@ -1582,7 +1578,7 @@
                                 result.put(
                                         network,
                                         maybeSanitizeLocationInfoForCaller(
-                                                nc, Binder.getCallingUid(), callingPackageName));
+                                                nc, mDeps.getCallingUid(), callingPackageName));
                             }
                         }
                     }
@@ -1612,7 +1608,7 @@
     @Override
     public LinkProperties getActiveLinkProperties() {
         enforceAccessPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         NetworkState state = getUnfilteredActiveNetworkState(uid);
         if (state.linkProperties == null) return null;
         return linkPropertiesRestrictedForCallerPermissions(state.linkProperties,
@@ -1626,7 +1622,7 @@
         final LinkProperties lp = getLinkProperties(nai);
         if (lp == null) return null;
         return linkPropertiesRestrictedForCallerPermissions(
-                lp, Binder.getCallingPid(), Binder.getCallingUid());
+                lp, Binder.getCallingPid(), mDeps.getCallingUid());
     }
 
     // TODO - this should be ALL networks
@@ -1636,7 +1632,7 @@
         final LinkProperties lp = getLinkProperties(getNetworkAgentInfoForNetwork(network));
         if (lp == null) return null;
         return linkPropertiesRestrictedForCallerPermissions(
-                lp, Binder.getCallingPid(), Binder.getCallingUid());
+                lp, Binder.getCallingPid(), mDeps.getCallingUid());
     }
 
     @Nullable
@@ -1658,17 +1654,17 @@
         synchronized (nai) {
             if (nai.networkCapabilities == null) return null;
             return networkCapabilitiesRestrictedForCallerPermissions(
-                    nai.networkCapabilities, Binder.getCallingPid(), Binder.getCallingUid());
+                    nai.networkCapabilities, Binder.getCallingPid(), mDeps.getCallingUid());
         }
     }
 
     @Override
     public NetworkCapabilities getNetworkCapabilities(Network network, String callingPackageName) {
-        mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackageName);
+        mAppOpsManager.checkPackage(mDeps.getCallingUid(), callingPackageName);
         enforceAccessPermission();
         return maybeSanitizeLocationInfoForCaller(
                 getNetworkCapabilitiesInternal(network),
-                Binder.getCallingUid(), callingPackageName);
+                mDeps.getCallingUid(), callingPackageName);
     }
 
     @VisibleForTesting
@@ -1706,16 +1702,17 @@
             return newNc;
         }
 
-        Binder.withCleanCallingIdentity(
-                () -> {
-                    if (!mLocationPermissionChecker.checkLocationPermission(
-                            callerPkgName, null /* featureId */, callerUid, null /* message */)) {
-                        // Caller does not have the requisite location permissions. Reset the
-                        // owner's UID in the NetworkCapabilities.
-                        newNc.setOwnerUid(INVALID_UID);
-                    }
-                }
-        );
+        final long token = Binder.clearCallingIdentity();
+        try {
+            if (!mLocationPermissionChecker.checkLocationPermission(
+                    callerPkgName, null /* featureId */, callerUid, null /* message */)) {
+                // Caller does not have the requisite location permissions. Reset the
+                // owner's UID in the NetworkCapabilities.
+                newNc.setOwnerUid(INVALID_UID);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
 
         return newNc;
     }
@@ -1756,7 +1753,7 @@
     }
 
     private void restrictBackgroundRequestForCaller(NetworkCapabilities nc) {
-        if (!mPermissionMonitor.hasUseBackgroundNetworksPermission(Binder.getCallingUid())) {
+        if (!mPermissionMonitor.hasUseBackgroundNetworksPermission(mDeps.getCallingUid())) {
             nc.addCapability(NET_CAPABILITY_FOREGROUND);
         }
     }
@@ -1781,14 +1778,6 @@
     }
 
     @Override
-    @Deprecated
-    public NetworkQuotaInfo getActiveNetworkQuotaInfo() {
-        Log.w(TAG, "Shame on UID " + Binder.getCallingUid()
-                + " for calling the hidden API getNetworkQuotaInfo(). Shame!");
-        return new NetworkQuotaInfo();
-    }
-
-    @Override
     public boolean isActiveNetworkMetered() {
         enforceAccessPermission();
 
@@ -1803,9 +1792,9 @@
 
     private INetworkManagementEventObserver mDataActivityObserver = new BaseNetworkObserver() {
         @Override
-        public void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos) {
-            int deviceType = Integer.parseInt(label);
-            sendDataActivityBroadcast(deviceType, active, tsNanos);
+        public void interfaceClassDataActivityChanged(int networkType, boolean active, long tsNanos,
+                int uid) {
+            sendDataActivityBroadcast(networkType, active, tsNanos);
         }
     };
 
@@ -1817,7 +1806,7 @@
         // requestRouteToHost. In Q, GnssLocationProvider is changed to not call requestRouteToHost
         // for devices launched with Q and above. However, existing devices upgrading to Q and
         // above must continued to be supported for few more releases.
-        if (isSystem(Binder.getCallingUid()) && SystemProperties.getInt(
+        if (isSystem(mDeps.getCallingUid()) && SystemProperties.getInt(
                 "ro.product.first_api_level", 0) > Build.VERSION_CODES.P) {
             log("This method exists only for app backwards compatibility"
                     + " and must not be called by system services.");
@@ -1883,14 +1872,14 @@
             return false;
         }
 
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         final long token = Binder.clearCallingIdentity();
         try {
             LinkProperties lp;
             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);
@@ -2303,7 +2292,7 @@
      */
     @Override
     public void systemReady() {
-        if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+        if (mDeps.getCallingUid() != Process.SYSTEM_UID) {
             throw new SecurityException("Calling Uid is not system uid.");
         }
         systemReadyInternal();
@@ -2314,10 +2303,13 @@
      */
     @VisibleForTesting
     public void systemReadyInternal() {
-        // Let PermissionMonitor#startMonitoring() running in the beginning of the systemReady
-        // before MultipathPolicyTracker.start(). Since mApps in PermissionMonitor needs to be
-        // populated first to ensure that listening network request which is sent by
-        // MultipathPolicyTracker won't be added NET_CAPABILITY_FOREGROUND capability.
+        // Since mApps in PermissionMonitor needs to be populated first to ensure that
+        // listening network request which is sent by MultipathPolicyTracker won't be added
+        // NET_CAPABILITY_FOREGROUND capability. Thus, MultipathPolicyTracker.start() must
+        // be called after PermissionMonitor#startMonitoring().
+        // Calling PermissionMonitor#startMonitoring() in systemReadyInternal() and the
+        // MultipathPolicyTracker.start() is called in NetworkPolicyManagerService#systemReady()
+        // to ensure the tracking will be initialized correctly.
         mPermissionMonitor.startMonitoring();
         mProxyTracker.loadGlobalProxy();
         registerNetdEventCallback();
@@ -2336,8 +2328,31 @@
 
         // Create network requests for always-on networks.
         mHandler.sendMessage(mHandler.obtainMessage(EVENT_CONFIGURE_ALWAYS_ON_NETWORKS));
+    }
 
-        mHandler.sendMessage(mHandler.obtainMessage(EVENT_SYSTEM_READY));
+    /**
+     * Start listening for default data network activity state changes.
+     */
+    @Override
+    public void registerNetworkActivityListener(@NonNull INetworkActivityListener l) {
+        // TODO: Replace network activity listener registry in ConnectivityManager from NMS to here
+    }
+
+    /**
+     * Stop listening for default data network activity state changes.
+     */
+    @Override
+    public void unregisterNetworkActivityListener(@NonNull INetworkActivityListener l) {
+        // TODO: Replace network activity listener registry in ConnectivityManager from NMS to here
+    }
+
+    /**
+     * Check whether the default network radio is currently active.
+     */
+    @Override
+    public boolean isDefaultNetworkActive() {
+        // TODO: Replace isNetworkActive() in NMS.
+        return false;
     }
 
     /**
@@ -2525,9 +2540,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=" + mDeps.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 +2580,7 @@
         if (defaultNai == null) {
             pw.println("none");
         } else {
-            pw.println(defaultNai.network.netId);
+            pw.println(defaultNai.network.getNetId());
         }
         pw.println();
 
@@ -2600,7 +2627,6 @@
         dumpAvoidBadWifiSettings(pw);
 
         pw.println();
-        mMultipathPolicyTracker.dump(pw);
 
         if (ArrayUtils.contains(args, SHORT_ARG) == false) {
             pw.println();
@@ -2690,7 +2716,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;
     }
 
@@ -2698,7 +2724,7 @@
      * Return an array of all current NetworkRequest sorted by request id.
      */
     @VisibleForTesting
-    protected NetworkRequestInfo[] requestsSortedById() {
+    NetworkRequestInfo[] requestsSortedById() {
         NetworkRequestInfo[] requests = new NetworkRequestInfo[0];
         requests = mNetworkRequests.values().toArray(requests);
         // Sort the array based off the NRI containing the min requestId in its requests.
@@ -2811,6 +2837,7 @@
                     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;
@@ -2831,7 +2858,7 @@
                             log(nai.toShortString() + " changed underlying networks to "
                                     + Arrays.toString(nai.declaredUnderlyingNetworks));
                         }
-                        updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+                        updateCapabilitiesForNetwork(nai);
                         notifyIfacesChangedForNetworkStats();
                     }
                 }
@@ -2855,8 +2882,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.
@@ -2871,8 +2897,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;
@@ -2893,7 +2918,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 &&
@@ -2904,7 +2928,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
@@ -2974,13 +2998,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
@@ -2988,7 +3012,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
@@ -3051,7 +3075,7 @@
         private final AutodestructReference<NetworkAgentInfo> mNai;
 
         private NetworkMonitorCallbacks(NetworkAgentInfo nai) {
-            mNetId = nai.network.netId;
+            mNetId = nai.network.getNetId();
             mNai = new AutodestructReference<>(nai);
         }
 
@@ -3201,7 +3225,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());
         }
     }
 
@@ -3234,7 +3258,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) {
@@ -3330,9 +3354,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);
                 }
@@ -3362,7 +3386,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)
@@ -3399,19 +3423,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);
@@ -3419,9 +3445,6 @@
             ensureNetworkTransitionWakelock(nai.toShortString());
         }
         mLegacyTypeTracker.remove(nai, wasDefault);
-        if (!nai.networkCapabilities.hasTransport(TRANSPORT_VPN)) {
-            propagateUnderlyingNetworkCapabilities();
-        }
         rematchAllNetworksAndRequests();
         mLingerMonitor.noteDisconnect(nai);
         if (nai.created) {
@@ -3436,26 +3459,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;
         }
@@ -3463,8 +3486,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);
         }
@@ -3551,30 +3574,58 @@
             return false;
         }
         for (NetworkRequestInfo nri : mNetworkRequests.values()) {
-            if (reason == UnneededFor.LINGER && nri.request.isBackgroundRequest()) {
+            if (reason == UnneededFor.LINGER
+                    && !nri.isMultilayerRequest()
+                    && nri.mRequests.get(0).isBackgroundRequest()) {
                 // Background requests don't affect lingering.
                 continue;
             }
 
-            // If this Network is already the highest scoring Network for a request, or if
-            // there is hope for it to become one if it validated, then it is needed.
-            if (nri.request.isRequest() && nai.satisfies(nri.request) &&
-                    (nai.isSatisfyingRequest(nri.request.requestId) ||
-                    // Note that this catches two important cases:
-                    // 1. Unvalidated cellular will not be reaped when unvalidated WiFi
-                    //    is currently satisfying the request.  This is desirable when
-                    //    cellular ends up validating but WiFi does not.
-                    // 2. Unvalidated WiFi will not be reaped when validated cellular
-                    //    is currently satisfying the request.  This is desirable when
-                    //    WiFi ends up validating and out scoring cellular.
-                    nri.mSatisfier.getCurrentScore()
-                            < nai.getCurrentScoreAsValidated())) {
+            if (isNetworkPotentialSatisfier(nai, nri)) {
                 return false;
             }
         }
         return true;
     }
 
+    private boolean isNetworkPotentialSatisfier(
+            @NonNull final NetworkAgentInfo candidate, @NonNull final NetworkRequestInfo nri) {
+        // listen requests won't keep up a network satisfying it. If this is not a multilayer
+        // request, we can return immediately. For multilayer requests, we have to check to see if
+        // any of the multilayer requests may have a potential satisfier.
+        if (!nri.isMultilayerRequest() && nri.mRequests.get(0).isListen()) {
+            return false;
+        }
+        for (final NetworkRequest req : nri.mRequests) {
+            // As non-multilayer listen requests have already returned, the below would only happen
+            // for a multilayer request therefore continue to the next request if available.
+            if (req.isListen()) {
+                continue;
+            }
+            // If this Network is already the highest scoring Network for a request, or if
+            // there is hope for it to become one if it validated, then it is needed.
+            if (candidate.satisfies(req)) {
+                // As soon as a network is found that satisfies a request, return. Specifically for
+                // multilayer requests, returning as soon as a NetworkAgentInfo satisfies a request
+                // is important so as to not evaluate lower priority requests further in
+                // nri.mRequests.
+                final boolean isNetworkNeeded = candidate.isSatisfyingRequest(req.requestId)
+                        // Note that this catches two important cases:
+                        // 1. Unvalidated cellular will not be reaped when unvalidated WiFi
+                        //    is currently satisfying the request.  This is desirable when
+                        //    cellular ends up validating but WiFi does not.
+                        // 2. Unvalidated WiFi will not be reaped when validated cellular
+                        //    is currently satisfying the request.  This is desirable when
+                        //    WiFi ends up validating and out scoring cellular.
+                        || nri.mSatisfier.getCurrentScore()
+                        < candidate.getCurrentScoreAsValidated();
+                return isNetworkNeeded;
+            }
+        }
+
+        return false;
+    }
+
     private NetworkRequestInfo getNriForAppRequest(
             NetworkRequest request, int callingUid, String requestedOperation) {
         final NetworkRequestInfo nri = mNetworkRequests.get(request);
@@ -3656,7 +3707,7 @@
                 nri.mSatisfier = null;
                 if (!wasBackgroundNetwork && nai.isBackgroundNetwork()) {
                     // Went from foreground to background.
-                    updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+                    updateCapabilitiesForNetwork(nai);
                 }
             }
 
@@ -3871,8 +3922,12 @@
                 new CaptivePortal(new CaptivePortalImpl(network).asBinder()));
         appIntent.setFlags(Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
 
-        Binder.withCleanCallingIdentity(() ->
-                mContext.startActivityAsUser(appIntent, UserHandle.CURRENT));
+        final long token = Binder.clearCallingIdentity();
+        try {
+            mContext.startActivityAsUser(appIntent, UserHandle.CURRENT);
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
     }
 
     private class CaptivePortalImpl extends ICaptivePortal.Stub {
@@ -3900,7 +3955,7 @@
 
             if (request == CaptivePortal.APP_REQUEST_REEVALUATION_REQUIRED) {
                 checkNetworkStackPermission();
-                nm.forceReevaluation(Binder.getCallingUid());
+                nm.forceReevaluation(mDeps.getCallingUid());
             }
         }
 
@@ -4026,7 +4081,7 @@
 
         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".
@@ -4041,7 +4096,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) {
@@ -4118,11 +4174,13 @@
             return ConnectivityManager.MULTIPATH_PREFERENCE_UNMETERED;
         }
 
-        Integer networkPreference = mMultipathPolicyTracker.getMultipathPreference(network);
-        if (networkPreference != null) {
+        final NetworkPolicyManager netPolicyManager =
+                 mContext.getSystemService(NetworkPolicyManager.class);
+
+        final int networkPreference = netPolicyManager.getMultipathPreference(network);
+        if (networkPreference != 0) {
             return networkPreference;
         }
-
         return mMultinetworkPolicyTracker.getMeteredMultipathPreference();
     }
 
@@ -4226,10 +4284,6 @@
                     mKeepaliveTracker.handleStopKeepalive(nai, slot, reason);
                     break;
                 }
-                case EVENT_SYSTEM_READY: {
-                    mMultipathPolicyTracker.start();
-                    break;
-                }
                 case EVENT_REVALIDATE_NETWORK: {
                     handleReportNetworkConnectivity((Network) msg.obj, msg.arg1, toBool(msg.arg2));
                     break;
@@ -4366,7 +4420,7 @@
     public void reportNetworkConnectivity(Network network, boolean hasConnectivity) {
         enforceAccessPermission();
         enforceInternetPermission();
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         final int connectivityInfo = encodeBool(hasConnectivity);
 
         // Handle ConnectivityDiagnostics event before attempting to revalidate the network. This
@@ -4407,7 +4461,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
@@ -4436,13 +4490,13 @@
         if (globalProxy != null) return globalProxy;
         if (network == null) {
             // Get the network associated with the calling UID.
-            final Network activeNetwork = getActiveNetworkForUidInternal(Binder.getCallingUid(),
+            final Network activeNetwork = getActiveNetworkForUidInternal(mDeps.getCallingUid(),
                     true);
             if (activeNetwork == null) {
                 return null;
             }
             return getLinkPropertiesProxyInfo(activeNetwork);
-        } else if (mDeps.queryUserAccess(Binder.getCallingUid(), network.netId)) {
+        } else if (mDeps.queryUserAccess(mDeps.getCallingUid(), network.getNetId())) {
             // Don't call getLinkProperties() as it requires ACCESS_NETWORK_STATE permission, which
             // caller may not have.
             return getLinkPropertiesProxyInfo(network);
@@ -4611,7 +4665,7 @@
      */
     @Override
     public ParcelFileDescriptor establishVpn(VpnConfig config) {
-        int user = UserHandle.getUserId(Binder.getCallingUid());
+        int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             throwIfLockdownEnabled();
             return mVpns.get(user).establish(config);
@@ -4632,7 +4686,7 @@
      */
     @Override
     public boolean provisionVpnProfile(@NonNull VpnProfile profile, @NonNull String packageName) {
-        final int user = UserHandle.getUserId(Binder.getCallingUid());
+        final int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             return mVpns.get(user).provisionVpnProfile(packageName, profile, mKeyStore);
         }
@@ -4650,7 +4704,7 @@
      */
     @Override
     public void deleteVpnProfile(@NonNull String packageName) {
-        final int user = UserHandle.getUserId(Binder.getCallingUid());
+        final int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             mVpns.get(user).deleteVpnProfile(packageName, mKeyStore);
         }
@@ -4667,7 +4721,7 @@
      */
     @Override
     public void startVpnProfile(@NonNull String packageName) {
-        final int user = UserHandle.getUserId(Binder.getCallingUid());
+        final int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             throwIfLockdownEnabled();
             mVpns.get(user).startVpnProfile(packageName, mKeyStore);
@@ -4684,7 +4738,7 @@
      */
     @Override
     public void stopVpnProfile(@NonNull String packageName) {
-        final int user = UserHandle.getUserId(Binder.getCallingUid());
+        final int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             mVpns.get(user).stopVpnProfile(packageName);
         }
@@ -4696,7 +4750,7 @@
      */
     @Override
     public void startLegacyVpn(VpnProfile profile) {
-        int user = UserHandle.getUserId(Binder.getCallingUid());
+        int user = UserHandle.getUserId(mDeps.getCallingUid());
         final LinkProperties egress = getActiveLinkProperties();
         if (egress == null) {
             throw new IllegalStateException("Missing active network connection");
@@ -4809,25 +4863,43 @@
         }
     }
 
+    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;
+    }
+
+    // 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);
+    }
+
     /**
-     * Ask all networks with underlying networks to recompute and update their capabilities.
+     * 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() {
+    private void propagateUnderlyingNetworkCapabilities(Network updatedNetwork) {
         ensureRunningOnConnectivityServiceThread();
         for (NetworkAgentInfo nai : mNetworkAgentInfos.values()) {
-            if (nai.supportsUnderlyingNetworks()) {
-                updateCapabilities(nai.getCurrentScore(), nai, nai.networkCapabilities);
+            if (updatedNetwork == null || hasUnderlyingNetwork(nai, updatedNetwork)) {
+                updateCapabilitiesForNetwork(nai);
             }
         }
     }
 
     @Override
     public boolean updateLockdownVpn() {
-        if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+        if (mDeps.getCallingUid() != Process.SYSTEM_UID) {
             logw("Lockdown VPN only available to AID_SYSTEM");
             return false;
         }
@@ -4849,7 +4921,7 @@
                     setLockdownTracker(null);
                     return true;
                 }
-                int user = UserHandle.getUserId(Binder.getCallingUid());
+                int user = UserHandle.getUserId(mDeps.getCallingUid());
                 Vpn vpn = mVpns.get(user);
                 if (vpn == null) {
                     logw("VPN for user " + user + " not ready yet. Skipping lockdown");
@@ -5142,7 +5214,7 @@
                 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();
@@ -5414,7 +5486,7 @@
             messenger = null;
             mBinder = null;
             mPid = getCallingPid();
-            mUid = getCallingUid();
+            mUid = mDeps.getCallingUid();
             enforceRequestCountLimit();
         }
 
@@ -5426,7 +5498,7 @@
             ensureAllNetworkRequestsHaveType(mRequests);
             mBinder = binder;
             mPid = getCallingPid();
-            mUid = getCallingUid();
+            mUid = mDeps.getCallingUid();
             mPendingIntent = null;
             enforceRequestCountLimit();
 
@@ -5441,6 +5513,10 @@
             this(r, null);
         }
 
+        boolean isMultilayerRequest() {
+            return mRequests.size() > 1;
+        }
+
         private List<NetworkRequest> initializeRequests(NetworkRequest r) {
             final ArrayList<NetworkRequest> tempRequests = new ArrayList<>();
             tempRequests.add(new NetworkRequest(r));
@@ -5482,7 +5558,7 @@
         public void binderDied() {
             log("ConnectivityService NetworkRequestInfo binderDied(" +
                     mRequests + ", " + mBinder + ")");
-            releaseNetworkRequest(mRequests);
+            releaseNetworkRequests(mRequests);
         }
 
         @Override
@@ -5515,13 +5591,15 @@
         mAppOpsManager.checkPackage(callerUid, callerPackageName);
     }
 
-    private ArrayList<Integer> getSignalStrengthThresholds(NetworkAgentInfo nai) {
+    private ArrayList<Integer> getSignalStrengthThresholds(@NonNull final NetworkAgentInfo nai) {
         final SortedSet<Integer> thresholds = new TreeSet<>();
         synchronized (nai) {
-            for (NetworkRequestInfo nri : mNetworkRequests.values()) {
-                if (nri.request.networkCapabilities.hasSignalStrength() &&
-                        nai.satisfiesImmutableCapabilitiesOf(nri.request)) {
-                    thresholds.add(nri.request.networkCapabilities.getSignalStrength());
+            for (final NetworkRequestInfo nri : mNetworkRequests.values()) {
+                for (final NetworkRequest req : nri.mRequests) {
+                    if (req.networkCapabilities.hasSignalStrength()
+                            && nai.satisfiesImmutableCapabilitiesOf(req)) {
+                        thresholds.add(req.networkCapabilities.getSignalStrength());
+                    }
                 }
             }
         }
@@ -5569,11 +5647,12 @@
     }
 
     private boolean checkUnsupportedStartingFrom(int version, String callingPackageName) {
-        final PackageManager pm = mContext.getPackageManager();
-        final int userId = UserHandle.getCallingUserId();
+        final UserHandle user = UserHandle.getUserHandleForUid(mDeps.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;
@@ -5588,7 +5667,7 @@
                 throw new SecurityException("Insufficient permissions to specify legacy type");
             }
         }
-        final int callingUid = Binder.getCallingUid();
+        final int callingUid = mDeps.getCallingUid();
         final NetworkRequest.Type type = (networkCapabilities == null)
                 ? NetworkRequest.Type.TRACK_DEFAULT
                 : NetworkRequest.Type.REQUEST;
@@ -5653,12 +5732,12 @@
             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);
             synchronized (mBandwidthRequests) {
-                final int uid = Binder.getCallingUid();
+                final int uid = mDeps.getCallingUid();
                 Integer uidReqs = mBandwidthRequests.get(uid);
                 if (uidReqs == null) {
                     uidReqs = 0;
@@ -5675,7 +5754,7 @@
     }
 
     private void enforceMeteredApnPolicy(NetworkCapabilities networkCapabilities) {
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         if (isSystem(uid)) {
             // Exemption for system uid.
             return;
@@ -5695,7 +5774,7 @@
             PendingIntent operation, @NonNull String callingPackageName,
             @Nullable String callingAttributionTag) {
         Objects.requireNonNull(operation, "PendingIntent cannot be null.");
-        final int callingUid = Binder.getCallingUid();
+        final int callingUid = mDeps.getCallingUid();
         networkCapabilities = new NetworkCapabilities(networkCapabilities);
         enforceNetworkRequestPermissions(networkCapabilities, callingPackageName,
                 callingAttributionTag);
@@ -5754,7 +5833,7 @@
     @Override
     public NetworkRequest listenForNetwork(NetworkCapabilities networkCapabilities,
             Messenger messenger, IBinder binder, @NonNull String callingPackageName) {
-        final int callingUid = Binder.getCallingUid();
+        final int callingUid = mDeps.getCallingUid();
         if (!hasWifiNetworkListenPermission(networkCapabilities)) {
             enforceAccessPermission();
         }
@@ -5784,7 +5863,7 @@
     public void pendingListenForNetwork(NetworkCapabilities networkCapabilities,
             PendingIntent operation, @NonNull String callingPackageName) {
         Objects.requireNonNull(operation, "PendingIntent cannot be null.");
-        final int callingUid = Binder.getCallingUid();
+        final int callingUid = mDeps.getCallingUid();
         if (!hasWifiNetworkListenPermission(networkCapabilities)) {
             enforceAccessPermission();
         }
@@ -5807,7 +5886,7 @@
         return mNextNetworkProviderId.getAndIncrement();
     }
 
-    private void releaseNetworkRequest(List<NetworkRequest> networkRequests) {
+    private void releaseNetworkRequests(List<NetworkRequest> networkRequests) {
         for (int i = 0; i < networkRequests.size(); i++) {
             releaseNetworkRequest(networkRequests.get(i));
         }
@@ -5885,7 +5964,7 @@
         } else {
             enforceNetworkFactoryPermission();
         }
-        mHandler.post(() -> handleReleaseNetworkRequest(request, Binder.getCallingUid(), true));
+        mHandler.post(() -> handleReleaseNetworkRequest(request, mDeps.getCallingUid(), true));
     }
 
     // NOTE: Accessed on multiple threads, must be synchronized on itself.
@@ -5979,7 +6058,7 @@
             enforceNetworkFactoryPermission();
         }
 
-        final int uid = Binder.getCallingUid();
+        final int uid = mDeps.getCallingUid();
         final long token = Binder.clearCallingIdentity();
         try {
             return registerNetworkAgentInternal(messenger, networkInfo, linkProperties,
@@ -6033,7 +6112,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 {
@@ -6061,7 +6140,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
@@ -6342,7 +6421,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);
             }
@@ -6357,22 +6436,28 @@
      * This method should never alter the agent's NetworkCapabilities, only store data in |nai|.
      */
     private void processCapabilitiesFromAgent(NetworkAgentInfo nai, NetworkCapabilities nc) {
-        nai.declaredMetered = !nc.hasCapability(NET_CAPABILITY_NOT_METERED);
+        // 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 |caps| based on the capabilities of the specified underlying networks. */
+    /** Modifies |newNc| based on the capabilities of |underlyingNetworks| and |agentCaps|. */
     @VisibleForTesting
     void applyUnderlyingCapabilities(@Nullable Network[] underlyingNetworks,
-            @NonNull NetworkCapabilities caps,  boolean declaredMetered) {
-        final Network defaultNetwork = getNetwork(getDefaultNetwork());
-        if (underlyingNetworks == null && defaultNetwork != null) {
-            // null underlying networks means to track the default.
-            underlyingNetworks = new Network[] { defaultNetwork };
-        }
-        int[] transportTypes = new int[] { NetworkCapabilities.TRANSPORT_VPN };
+            @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;
-        boolean metered = declaredMetered; // metered if any underlying is metered, or agentMetered
+        // 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
@@ -6418,13 +6503,13 @@
             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);
+        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);
     }
 
     /**
@@ -6481,7 +6566,8 @@
         }
 
         if (nai.supportsUnderlyingNetworks()) {
-            applyUnderlyingCapabilities(nai.declaredUnderlyingNetworks, newNc, nai.declaredMetered);
+            applyUnderlyingCapabilities(nai.declaredUnderlyingNetworks, nai.declaredCapabilities,
+                    newNc);
         }
 
         return newNc;
@@ -6560,17 +6646,20 @@
             }
         }
 
-        if (!newNc.hasTransport(TRANSPORT_VPN)) {
-            // Tell VPNs about updated capabilities, since they may need to
-            // bubble those changes through.
-            propagateUnderlyingNetworkCapabilities();
-        }
+        // 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.
@@ -6600,6 +6689,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();
@@ -6619,14 +6718,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);
@@ -6657,7 +6753,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;
         }
@@ -6856,8 +6952,7 @@
             teardownUnneededNetwork(oldNetwork);
         } else {
             // Put the network in the background.
-            updateCapabilities(oldNetwork.getCurrentScore(), oldNetwork,
-                    oldNetwork.networkCapabilities);
+            updateCapabilitiesForNetwork(oldNetwork);
         }
     }
 
@@ -6868,7 +6963,7 @@
 
         try {
             if (null != newNetwork) {
-                mNetd.networkSetDefault(newNetwork.network.netId);
+                mNetd.networkSetDefault(newNetwork.network.getNetId());
             } else {
                 mNetd.networkClearDefault();
             }
@@ -6882,8 +6977,10 @@
         updateTcpBufferSizes(null != newNetwork
                 ? newNetwork.linkProperties.getTcpBufferSizes() : null);
         notifyIfacesChangedForNetworkStats();
-        // Fix up the NetworkCapabilities of any VPNs that don't specify underlying networks.
-        propagateUnderlyingNetworkCapabilities();
+        // 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) {
@@ -6931,8 +7028,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");
             }
         }
 
@@ -7339,13 +7436,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.
-                propagateUnderlyingNetworkCapabilities();
+            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;
         }
@@ -7387,10 +7482,6 @@
             // doing.
             updateSignalStrengthThresholds(networkAgent, "CONNECT", null);
 
-            if (networkAgent.supportsUnderlyingNetworks()) {
-                propagateUnderlyingNetworkCapabilities();
-            }
-
             // Consider network even though it is not yet validated.
             rematchAllNetworksAndRequests();
 
@@ -7621,7 +7712,7 @@
 
     @Override
     public boolean addVpnAddress(String address, int prefixLength) {
-        int user = UserHandle.getUserId(Binder.getCallingUid());
+        int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             throwIfLockdownEnabled();
             return mVpns.get(user).addAddress(address, prefixLength);
@@ -7630,7 +7721,7 @@
 
     @Override
     public boolean removeVpnAddress(String address, int prefixLength) {
-        int user = UserHandle.getUserId(Binder.getCallingUid());
+        int user = UserHandle.getUserId(mDeps.getCallingUid());
         synchronized (mVpns) {
             throwIfLockdownEnabled();
             return mVpns.get(user).removeAddress(address, prefixLength);
@@ -7639,7 +7730,7 @@
 
     @Override
     public boolean setUnderlyingNetworksForVpn(Network[] networks) {
-        int user = UserHandle.getUserId(Binder.getCallingUid());
+        int user = UserHandle.getUserId(mDeps.getCallingUid());
         final boolean success;
         synchronized (mVpns) {
             throwIfLockdownEnabled();
@@ -7727,10 +7818,13 @@
 
         final int userId = UserHandle.getCallingUserId();
 
-        Binder.withCleanCallingIdentity(() -> {
+        final long token = Binder.clearCallingIdentity();
+        try {
             final IpMemoryStore ipMemoryStore = IpMemoryStore.getMemoryStore(mContext);
             ipMemoryStore.factoryReset();
-        });
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
 
         // Turn airplane mode off
         setAirplaneMode(false);
@@ -7796,7 +7890,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) {
@@ -7866,7 +7960,7 @@
 
     @GuardedBy("mVpns")
     private Vpn getVpnIfOwner() {
-        return getVpnIfOwner(Binder.getCallingUid());
+        return getVpnIfOwner(mDeps.getCallingUid());
     }
 
     @GuardedBy("mVpns")
@@ -8344,7 +8438,7 @@
             throw new IllegalArgumentException("ConnectivityManager.TYPE_* are deprecated."
                     + " Please use NetworkCapabilities instead.");
         }
-        final int callingUid = Binder.getCallingUid();
+        final int callingUid = mDeps.getCallingUid();
         mAppOpsManager.checkPackage(callingUid, callingPackageName);
 
         // This NetworkCapabilities is only used for matching to Networks. Clear out its owner uid
@@ -8379,7 +8473,7 @@
                 mConnectivityDiagnosticsHandler.obtainMessage(
                         ConnectivityDiagnosticsHandler
                                 .EVENT_UNREGISTER_CONNECTIVITY_DIAGNOSTICS_CALLBACK,
-                        Binder.getCallingUid(),
+                        mDeps.getCallingUid(),
                         0,
                         callback));
     }
@@ -8395,7 +8489,7 @@
         }
 
         final NetworkAgentInfo nai = getNetworkAgentInfoForNetwork(network);
-        if (nai == null || nai.creatorUid != Binder.getCallingUid()) {
+        if (nai == null || nai.creatorUid != mDeps.getCallingUid()) {
             throw new SecurityException("Data Stall simulation is only possible for network "
                 + "creators");
         }
@@ -8418,6 +8512,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 821a967..1ea4a89 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -58,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;
@@ -92,7 +90,6 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.app.IBatteryStats;
 import com.android.internal.util.DumpUtils;
-import com.android.internal.util.FrameworkStatsLog;
 import com.android.internal.util.HexDump;
 import com.android.internal.util.Preconditions;
 
@@ -190,10 +187,10 @@
     /** Set of interfaces with active alerts. */
     @GuardedBy("mQuotaLock")
     private HashMap<String, Long> mActiveAlerts = Maps.newHashMap();
-    /** Set of UIDs denylisted on metered networks. */
+    /** Set of UIDs denied on metered networks. */
     @GuardedBy("mRulesLock")
     private SparseBooleanArray mUidRejectOnMetered = new SparseBooleanArray();
-    /** Set of UIDs allowlisted on metered networks. */
+    /** Set of UIDs allowed on metered networks. */
     @GuardedBy("mRulesLock")
     private SparseBooleanArray mUidAllowOnMetered = new SparseBooleanArray();
     /** Set of UIDs with cleartext penalties. */
@@ -399,30 +396,18 @@
      * Notify our observers of a change in the data activity state of the interface
      */
     private void notifyInterfaceClassActivity(int type, boolean isActive, long tsNanos,
-            int uid, boolean fromRadio) {
+            int uid) {
         final boolean isMobile = ConnectivityManager.isNetworkTypeMobile(type);
         int powerState = isActive
                 ? DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH
                 : DataConnectionRealTimeInfo.DC_POWER_STATE_LOW;
         if (isMobile) {
-            if (!fromRadio) {
-                if (mMobileActivityFromRadio) {
-                    // If this call is not coming from a report from the radio itself, but we
-                    // have previously received reports from the radio, then we will take the
-                    // power state to just be whatever the radio last reported.
-                    powerState = mLastPowerStateFromRadio;
-                }
-            } else {
-                mMobileActivityFromRadio = true;
-            }
             if (mLastPowerStateFromRadio != powerState) {
                 mLastPowerStateFromRadio = powerState;
                 try {
                     getBatteryStats().noteMobileRadioPowerState(powerState, tsNanos, uid);
                 } catch (RemoteException e) {
                 }
-                FrameworkStatsLog.write_non_chained(
-                        FrameworkStatsLog.MOBILE_RADIO_POWER_STATE_CHANGED, uid, null, powerState);
             }
         }
 
@@ -433,20 +418,12 @@
                     getBatteryStats().noteWifiRadioPowerState(powerState, tsNanos, uid);
                 } catch (RemoteException e) {
                 }
-                FrameworkStatsLog.write_non_chained(
-                        FrameworkStatsLog.WIFI_RADIO_POWER_STATE_CHANGED, uid, null, powerState);
             }
         }
 
-        if (!isMobile || fromRadio || !mMobileActivityFromRadio) {
-            // Report the change in data activity.  We don't do this if this is a change
-            // on the mobile network, that is not coming from the radio itself, and we
-            // have previously seen change reports from the radio.  In that case only
-            // the radio is the authority for the current state.
-            final boolean active = isActive;
-            invokeForAllObservers(o -> o.interfaceClassDataActivityChanged(
-                    Integer.toString(type), active, tsNanos));
-        }
+        final boolean active = isActive;
+        invokeForAllObservers(o -> o.interfaceClassDataActivityChanged(
+                type, active, tsNanos, uid));
 
         boolean report = false;
         synchronized (mIdleTimerLock) {
@@ -584,13 +561,13 @@
             }
             if (uidRejectOnQuota != null) {
                 for (int i = 0; i < uidRejectOnQuota.size(); i++) {
-                    setUidMeteredNetworkDenylist(uidRejectOnQuota.keyAt(i),
+                    setUidOnMeteredNetworkDenylist(uidRejectOnQuota.keyAt(i),
                             uidRejectOnQuota.valueAt(i));
                 }
             }
             if (uidAcceptOnQuota != null) {
                 for (int i = 0; i < uidAcceptOnQuota.size(); i++) {
-                    setUidMeteredNetworkAllowlist(uidAcceptOnQuota.keyAt(i),
+                    setUidOnMeteredNetworkAllowlist(uidAcceptOnQuota.keyAt(i),
                             uidAcceptOnQuota.valueAt(i));
                 }
             }
@@ -678,7 +655,7 @@
                 timestampNanos = timestamp;
             }
             mDaemonHandler.post(() ->
-                    notifyInterfaceClassActivity(label, isActive, timestampNanos, uid, false));
+                    notifyInterfaceClassActivity(label, isActive, timestampNanos, uid));
         }
 
         @Override
@@ -803,7 +780,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);
@@ -1164,7 +1141,7 @@
                 mNetworkActive = false;
             }
             mDaemonHandler.post(() -> notifyInterfaceClassActivity(type, true,
-                    SystemClock.elapsedRealtimeNanos(), -1, false));
+                    SystemClock.elapsedRealtimeNanos(), -1));
         }
     }
 
@@ -1188,7 +1165,7 @@
             }
             mActiveIdleTimers.remove(iface);
             mDaemonHandler.post(() -> notifyInterfaceClassActivity(params.type, false,
-                    SystemClock.elapsedRealtimeNanos(), -1, false));
+                    SystemClock.elapsedRealtimeNanos(), -1));
         }
     }
 
@@ -1311,14 +1288,14 @@
         }
     }
 
-    private void setUidOnMeteredNetworkList(int uid, boolean denylist, boolean enable) {
+    private void setUidOnMeteredNetworkList(int uid, boolean allowlist, boolean enable) {
         NetworkStack.checkNetworkStackPermission(mContext);
 
         synchronized (mQuotaLock) {
             boolean oldEnable;
             SparseBooleanArray quotaList;
             synchronized (mRulesLock) {
-                quotaList = denylist ? mUidRejectOnMetered : mUidAllowOnMetered;
+                quotaList = allowlist ?  mUidAllowOnMetered : mUidRejectOnMetered;
                 oldEnable = quotaList.get(uid, false);
             }
             if (oldEnable == enable) {
@@ -1328,18 +1305,18 @@
 
             Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "inetd bandwidth");
             try {
-                if (denylist) {
-                    if (enable) {
-                        mNetdService.bandwidthAddNaughtyApp(uid);
-                    } else {
-                        mNetdService.bandwidthRemoveNaughtyApp(uid);
-                    }
-                } else {
+                if (allowlist) {
                     if (enable) {
                         mNetdService.bandwidthAddNiceApp(uid);
                     } else {
                         mNetdService.bandwidthRemoveNiceApp(uid);
                     }
+                } else {
+                    if (enable) {
+                        mNetdService.bandwidthAddNaughtyApp(uid);
+                    } else {
+                        mNetdService.bandwidthRemoveNaughtyApp(uid);
+                    }
                 }
                 synchronized (mRulesLock) {
                     if (enable) {
@@ -1357,13 +1334,13 @@
     }
 
     @Override
-    public void setUidMeteredNetworkDenylist(int uid, boolean enable) {
-        setUidOnMeteredNetworkList(uid, true, enable);
+    public void setUidOnMeteredNetworkDenylist(int uid, boolean enable) {
+        setUidOnMeteredNetworkList(uid, false, enable);
     }
 
     @Override
-    public void setUidMeteredNetworkAllowlist(int uid, boolean enable) {
-        setUidOnMeteredNetworkList(uid, false, enable);
+    public void setUidOnMeteredNetworkAllowlist(int uid, boolean enable) {
+        setUidOnMeteredNetworkList(uid, true, enable);
     }
 
     @Override
@@ -1394,38 +1371,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) {
@@ -1554,27 +1499,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 {
@@ -1617,7 +1541,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) {
@@ -1648,7 +1572,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++;
                     }
                 }
@@ -1839,7 +1763,7 @@
             } else {
                 ruleName = "deny";
             }
-        } else { // Denylist mode
+        } else { // Deny mode
             if (rule == FIREWALL_RULE_DENY) {
                 ruleName = "deny";
             } else {
@@ -1926,8 +1850,8 @@
             pw.print("Active alert ifaces: "); pw.println(mActiveAlerts.toString());
             pw.print("Data saver mode: "); pw.println(mDataSaverMode);
             synchronized (mRulesLock) {
-                dumpUidRuleOnQuotaLocked(pw, "denylist", mUidRejectOnMetered);
-                dumpUidRuleOnQuotaLocked(pw, "allowlist", mUidAllowOnMetered);
+                dumpUidRuleOnQuotaLocked(pw, "denied UIDs", mUidRejectOnMetered);
+                dumpUidRuleOnQuotaLocked(pw, "allowed UIDs", mUidAllowOnMetered);
             }
         }
 
@@ -1980,7 +1904,7 @@
     private void dumpUidRuleOnQuotaLocked(PrintWriter pw, String name, SparseBooleanArray list) {
         pw.print("UID bandwith control ");
         pw.print(name);
-        pw.print(" rule: [");
+        pw.print(": [");
         final int size = list.size();
         for (int i = 0; i < size; i++) {
             pw.print(list.keyAt(i));
diff --git a/services/core/java/com/android/server/NsdService.java b/services/core/java/com/android/server/NsdService.java
index 4a1820a..d907505 100644
--- a/services/core/java/com/android/server/NsdService.java
+++ b/services/core/java/com/android/server/NsdService.java
@@ -25,7 +25,6 @@
 import android.net.nsd.INsdManager;
 import android.net.nsd.NsdManager;
 import android.net.nsd.NsdServiceInfo;
-import android.net.util.nsd.DnsSdTxtRecord;
 import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Message;
@@ -42,6 +41,7 @@
 import com.android.internal.util.DumpUtils;
 import com.android.internal.util.State;
 import com.android.internal.util.StateMachine;
+import com.android.net.module.util.DnsSdTxtRecord;
 
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
diff --git a/services/core/java/com/android/server/OWNERS b/services/core/java/com/android/server/OWNERS
index 3d1e709a..a82e146 100644
--- a/services/core/java/com/android/server/OWNERS
+++ b/services/core/java/com/android/server/OWNERS
@@ -10,3 +10,25 @@
 
 # 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 DynamicSystemService.java = file:/packages/DynamicSystemInstallationService/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 70ef44c..c8d457d 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -3298,6 +3298,9 @@
             try {
                 mVold.unlockUserKey(userId, serialNumber, encodeBytes(token),
                         encodeBytes(secret));
+            } catch (ServiceSpecificException sse) {
+                Slog.d(TAG, "Expected if the user has not unlocked the device.", sse);
+                return;
             } catch (Exception e) {
                 Slog.wtf(TAG, e);
                 return;
@@ -4612,14 +4615,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);
@@ -4746,15 +4742,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/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 a45466d..e8687e5 100644
--- a/services/core/java/com/android/server/TestNetworkService.java
+++ b/services/core/java/com/android/server/TestNetworkService.java
@@ -61,9 +61,8 @@
 
 /** @hide */
 class TestNetworkService extends ITestNetworkManager.Stub {
-    @NonNull private static final String TAG = TestNetworkService.class.getSimpleName();
     @NonNull private static final String TEST_NETWORK_LOGTAG = "TestNetworkAgent";
-    @NonNull private static final String TEST_NETWORK_PROVIDER_NAME = TAG;
+    @NonNull private static final String TEST_NETWORK_PROVIDER_NAME = "TestNetworkProvider";
     @NonNull private static final AtomicInteger sTestTunIndex = new AtomicInteger();
 
     @NonNull private final Context mContext;
@@ -108,23 +107,23 @@
 
         String ifacePrefix = isTun ? TEST_TUN_PREFIX : TEST_TAP_PREFIX;
         String iface = ifacePrefix + sTestTunIndex.getAndIncrement();
-        return Binder.withCleanCallingIdentity(
-                () -> {
-                    try {
-                        ParcelFileDescriptor tunIntf =
-                                ParcelFileDescriptor.adoptFd(jniCreateTunTap(isTun, iface));
-                        for (LinkAddress addr : linkAddrs) {
-                            mNetd.interfaceAddAddress(
-                                    iface,
-                                    addr.getAddress().getHostAddress(),
-                                    addr.getPrefixLength());
-                        }
+        final long token = Binder.clearCallingIdentity();
+        try {
+            ParcelFileDescriptor tunIntf =
+                    ParcelFileDescriptor.adoptFd(jniCreateTunTap(isTun, iface));
+            for (LinkAddress addr : linkAddrs) {
+                mNetd.interfaceAddAddress(
+                        iface,
+                        addr.getAddress().getHostAddress(),
+                        addr.getPrefixLength());
+            }
 
-                        return new TestNetworkInterface(tunIntf, iface);
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                });
+            return new TestNetworkInterface(tunIntf, iface);
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        } finally {
+            Binder.restoreCallingIdentity(token);
+        }
     }
 
     /**
@@ -168,17 +167,15 @@
         private TestNetworkAgent(
                 @NonNull Context context,
                 @NonNull Looper looper,
-                @NonNull NetworkAgentConfig config,
                 @NonNull NetworkCapabilities nc,
                 @NonNull LinkProperties lp,
+                @NonNull NetworkAgentConfig config,
                 int uid,
                 @NonNull IBinder binder,
                 @NonNull NetworkProvider np)
                 throws RemoteException {
             super(context, looper, TEST_NETWORK_LOGTAG, nc, lp, NETWORK_SCORE, config, np);
-
             mUid = uid;
-
             synchronized (mBinderLock) {
                 mBinder = binder; // Binder null-checks in create()
 
@@ -220,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());
             }
         }
     }
@@ -286,8 +283,8 @@
             lp.addRoute(new RouteInfo(new IpPrefix(Inet6Address.ANY, 0), null, iface));
         }
 
-        final TestNetworkAgent agent = new TestNetworkAgent(context, looper,
-                new NetworkAgentConfig.Builder().build(), nc, lp, callingUid, binder,
+        final TestNetworkAgent agent = new TestNetworkAgent(context, looper, nc, lp,
+                new NetworkAgentConfig.Builder().build(), callingUid, binder,
                 mNetworkProvider);
         agent.register();
         agent.markConnected();
@@ -320,7 +317,12 @@
 
         try {
             // This requires NETWORK_STACK privileges.
-            Binder.withCleanCallingIdentity(() -> mNMS.setInterfaceUp(iface));
+            final long token = Binder.clearCallingIdentity();
+            try {
+                mNMS.setInterfaceUp(iface);
+            } finally {
+                Binder.restoreCallingIdentity(token);
+            }
 
             // Synchronize all accesses to mTestNetworkTracker to prevent the case where:
             // 1. TestNetworkAgent successfully binds to death of binder
@@ -339,7 +341,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/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java
index 165b6a1..74e3851 100644
--- a/services/core/java/com/android/server/VcnManagementService.java
+++ b/services/core/java/com/android/server/VcnManagementService.java
@@ -25,24 +25,44 @@
 import android.net.NetworkRequest;
 import android.net.vcn.IVcnManagementService;
 import android.net.vcn.VcnConfig;
+import android.os.Binder;
+import android.os.Handler;
 import android.os.HandlerThread;
 import android.os.Looper;
 import android.os.ParcelUuid;
+import android.os.PersistableBundle;
+import android.os.Process;
+import android.os.ServiceSpecificException;
+import android.os.UserHandle;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+import android.util.ArrayMap;
+import android.util.Slog;
 
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.annotations.VisibleForTesting.Visibility;
+import com.android.server.vcn.util.PersistableBundleUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
 
 /**
  * VcnManagementService manages Virtual Carrier Network profiles and lifecycles.
  *
  * <pre>The internal structure of the VCN Management subsystem is as follows:
  *
- * +------------------------+ 1:1                                 +--------------------------------+
- * |  VcnManagementService  | ------------ Creates -------------> |  TelephonySubscriptionManager  |
- * |                        |                                     |                                |
- * | Manages configs and    |                                     | Tracks subscriptions, carrier  |
- * | VcnInstance lifecycles | <--- Notifies of subscription & --- | privilege changes, caches maps |
- * +------------------------+      carrier privilege changes      +--------------------------------+
+ * +-------------------------+ 1:1                                +--------------------------------+
+ * |  VcnManagementService   | ------------ Creates ------------> |  TelephonySubscriptionManager  |
+ * |                         |                                    |                                |
+ * |   Manages configs and   |                                    | Tracks subscriptions, carrier  |
+ * | Vcn instance lifecycles | <--- Notifies of subscription & -- | privilege changes, caches maps |
+ * +-------------------------+      carrier privilege changes     +--------------------------------+
  *      | 1:N          ^
  *      |              |
  *      |              +-------------------------------+
@@ -54,19 +74,19 @@
  *                      |                      mode state changes
  *                      v                              |
  * +-----------------------------------------------------------------------+
- * |                              VcnInstance                              |
+ * |                                  Vcn                                  |
  * |                                                                       |
- * |   Manages tunnel lifecycles based on fulfillable NetworkRequest(s)    |
- * |                        and overall safe-mode                          |
+ * |       Manages GatewayConnection lifecycles based on fulfillable       |
+ * |                NetworkRequest(s) and overall safe-mode                |
  * +-----------------------------------------------------------------------+
  *                      | 1:N                          ^
  *              Creates to fulfill                     |
- *           NetworkRequest(s), tears        Notifies of VcnTunnel
+ *           NetworkRequest(s), tears   Notifies of VcnGatewayConnection
  *          down when no longer needed   teardown (e.g. Network reaped)
  *                      |                 and safe-mode timer changes
  *                      v                              |
  * +-----------------------------------------------------------------------+
- * |                               VcnTunnel                               |
+ * |                          VcnGatewayConnection                         |
  * |                                                                       |
  * |       Manages a single (IKEv2) tunnel session and NetworkAgent,       |
  * |  handles mobility events, (IPsec) Tunnel setup and safe-mode timers   |
@@ -92,20 +112,72 @@
 
     public static final boolean VDBG = false; // STOPSHIP: if true
 
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    static final String VCN_CONFIG_FILE = "/data/system/vcn/configs.xml";
+
     /* Binder context for this service */
     @NonNull private final Context mContext;
     @NonNull private final Dependencies mDeps;
 
     @NonNull private final Looper mLooper;
+    @NonNull private final Handler mHandler;
     @NonNull private final VcnNetworkProvider mNetworkProvider;
 
+    @GuardedBy("mLock")
+    @NonNull
+    private final Map<ParcelUuid, VcnConfig> mConfigs = new ArrayMap<>();
+
+    @NonNull private final Object mLock = new Object();
+
+    @NonNull private final PersistableBundleUtils.LockingReadWriteHelper mConfigDiskRwHelper;
+
     @VisibleForTesting(visibility = Visibility.PRIVATE)
     VcnManagementService(@NonNull Context context, @NonNull Dependencies deps) {
         mContext = requireNonNull(context, "Missing context");
         mDeps = requireNonNull(deps, "Missing dependencies");
 
         mLooper = mDeps.getLooper();
+        mHandler = new Handler(mLooper);
         mNetworkProvider = new VcnNetworkProvider(mContext, mLooper);
+
+        mConfigDiskRwHelper = mDeps.newPersistableBundleLockingReadWriteHelper(VCN_CONFIG_FILE);
+
+        // Run on handler to ensure I/O does not block system server startup
+        mHandler.post(() -> {
+            PersistableBundle configBundle = null;
+            try {
+                configBundle = mConfigDiskRwHelper.readFromDisk();
+            } catch (IOException e1) {
+                Slog.e(TAG, "Failed to read configs from disk; retrying", e1);
+
+                // Retry immediately. The IOException may have been transient.
+                try {
+                    configBundle = mConfigDiskRwHelper.readFromDisk();
+                } catch (IOException e2) {
+                    Slog.wtf(TAG, "Failed to read configs from disk", e2);
+                    return;
+                }
+            }
+
+            if (configBundle != null) {
+                final Map<ParcelUuid, VcnConfig> configs =
+                        PersistableBundleUtils.toMap(
+                                configBundle,
+                                PersistableBundleUtils::toParcelUuid,
+                                VcnConfig::new);
+
+                synchronized (mLock) {
+                    for (Entry<ParcelUuid, VcnConfig> entry : configs.entrySet()) {
+                        // Ensure no new configs are overwritten; a carrier app may have added a new
+                        // config.
+                        if (!mConfigs.containsKey(entry.getKey())) {
+                            mConfigs.put(entry.getKey(), entry.getValue());
+                        }
+                    }
+                    // TODO: Trigger re-evaluation of active VCNs; start/stop VCNs as needed.
+                }
+            }
+        });
     }
 
     // Package-visibility for SystemServer to create instances.
@@ -130,16 +202,81 @@
             }
             return mHandlerThread.getLooper();
         }
+
+        /**
+         * Retrieves the caller's UID
+         *
+         * <p>This call MUST be made before calling {@link Binder#clearCallingIdentity}, otherwise
+         * this will not work properly.
+         *
+         * @return
+         */
+        public int getBinderCallingUid() {
+            return Binder.getCallingUid();
+        }
+
+        /**
+         * Creates and returns a new {@link PersistableBundle.LockingReadWriteHelper}
+         *
+         * @param path the file path to read/write from/to.
+         * @return the {@link PersistableBundleUtils.LockingReadWriteHelper} instance
+         */
+        public PersistableBundleUtils.LockingReadWriteHelper
+                newPersistableBundleLockingReadWriteHelper(@NonNull String path) {
+            return new PersistableBundleUtils.LockingReadWriteHelper(path);
+        }
     }
 
     /** Notifies the VcnManagementService that external dependencies can be set up. */
     public void systemReady() {
-        // TODO: Retrieve existing profiles from KeyStore
-
         mContext.getSystemService(ConnectivityManager.class)
                 .registerNetworkProvider(mNetworkProvider);
     }
 
+    private void enforcePrimaryUser() {
+        final int uid = mDeps.getBinderCallingUid();
+        if (uid == Process.SYSTEM_UID) {
+            throw new IllegalStateException(
+                    "Calling identity was System Server. Was Binder calling identity cleared?");
+        }
+
+        if (!UserHandle.getUserHandleForUid(uid).isSystem()) {
+            throw new SecurityException(
+                    "VcnManagementService can only be used by callers running as the primary user");
+        }
+    }
+
+    private void enforceCallingUserAndCarrierPrivilege(ParcelUuid subscriptionGroup) {
+        // Only apps running in the primary (system) user are allowed to configure the VCN. This is
+        // in line with Telephony's behavior with regards to binding to a Carrier App provided
+        // CarrierConfigService.
+        enforcePrimaryUser();
+
+        // TODO (b/172619301): Check based on events propagated from CarrierPrivilegesTracker
+        final SubscriptionManager subMgr = mContext.getSystemService(SubscriptionManager.class);
+        final List<SubscriptionInfo> subscriptionInfos = new ArrayList<>();
+        Binder.withCleanCallingIdentity(
+                () -> {
+                    subscriptionInfos.addAll(subMgr.getSubscriptionsInGroup(subscriptionGroup));
+                });
+
+        final TelephonyManager telMgr = mContext.getSystemService(TelephonyManager.class);
+        for (SubscriptionInfo info : subscriptionInfos) {
+            // Check subscription is active first; much cheaper/faster check, and an app (currently)
+            // cannot be carrier privileged for inactive subscriptions.
+            if (subMgr.isValidSlotIndex(info.getSimSlotIndex())
+                    && telMgr.hasCarrierPrivileges(info.getSubscriptionId())) {
+                // TODO (b/173717728): Allow configuration for inactive, but manageable
+                // subscriptions.
+                // TODO (b/173718661): Check for whole subscription groups at a time.
+                return;
+            }
+        }
+
+        throw new SecurityException(
+                "Carrier privilege required for subscription group to set VCN Config");
+    }
+
     /**
      * Sets a VCN config for a given subscription group.
      *
@@ -150,7 +287,17 @@
         requireNonNull(subscriptionGroup, "subscriptionGroup was null");
         requireNonNull(config, "config was null");
 
-        // TODO: Store VCN configuration, trigger startup as necessary
+        enforceCallingUserAndCarrierPrivilege(subscriptionGroup);
+
+        synchronized (mLock) {
+            mConfigs.put(subscriptionGroup, config);
+
+            // Must be done synchronously to ensure that writes do not happen out-of-order.
+            writeConfigsToDiskLocked();
+        }
+
+        // TODO: Clear Binder calling identity
+        // TODO: Trigger startup as necessary
     }
 
     /**
@@ -162,7 +309,40 @@
     public void clearVcnConfig(@NonNull ParcelUuid subscriptionGroup) {
         requireNonNull(subscriptionGroup, "subscriptionGroup was null");
 
-        // TODO: Clear VCN configuration, trigger teardown as necessary
+        enforceCallingUserAndCarrierPrivilege(subscriptionGroup);
+
+        synchronized (mLock) {
+            mConfigs.remove(subscriptionGroup);
+
+            // Must be done synchronously to ensure that writes do not happen out-of-order.
+            writeConfigsToDiskLocked();
+        }
+
+        // TODO: Clear Binder calling identity
+        // TODO: Trigger teardown as necessary
+    }
+
+    @GuardedBy("mLock")
+    private void writeConfigsToDiskLocked() {
+        try {
+            PersistableBundle bundle =
+                    PersistableBundleUtils.fromMap(
+                            mConfigs,
+                            PersistableBundleUtils::fromParcelUuid,
+                            VcnConfig::toPersistableBundle);
+            mConfigDiskRwHelper.writeToDisk(bundle);
+        } catch (IOException e) {
+            Slog.e(TAG, "Failed to save configs to disk", e);
+            throw new ServiceSpecificException(0, "Failed to save configs");
+        }
+    }
+
+    /** Get current configuration list for testing purposes */
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    Map<ParcelUuid, VcnConfig> getConfigs() {
+        synchronized (mLock) {
+            return Collections.unmodifiableMap(mConfigs);
+        }
     }
 
     /**
diff --git a/services/core/java/com/android/server/VibratorService.java b/services/core/java/com/android/server/VibratorService.java
index 9340be1..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
@@ -1780,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"
@@ -1788,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..40f2428 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 */);
                 }
             }
         }
@@ -13759,6 +13744,10 @@
                 // set on ION VMAs, therefore consider the entire ION heap as used kernel memory
                 kernelUsed += ionHeap;
             }
+            final long gpuUsage = Debug.getGpuTotalUsageKb();
+            if (gpuUsage >= 0) {
+                pw.print("      GPU: "); pw.println(stringifyKBSize(gpuUsage));
+            }
             final long lostRAM = memInfo.getTotalSizeKb() - (totalPss - totalSwapPss)
                     - memInfo.getFreeSizeKb() - memInfo.getCachedSizeKb()
                     - kernelUsed - memInfo.getZramTotalSizeKb();
@@ -14567,6 +14556,12 @@
             // set on ION VMAs, therefore consider the entire ION heap as used kernel memory
             kernelUsed += ionHeap;
         }
+        final long gpuUsage = Debug.getGpuTotalUsageKb();
+        if (gpuUsage >= 0) {
+            memInfoBuilder.append("       GPU: ");
+            memInfoBuilder.append(stringifyKBSize(gpuUsage));
+            memInfoBuilder.append("\n");
+        }
         memInfoBuilder.append("  Used RAM: ");
         memInfoBuilder.append(stringifyKBSize(
                                   totalPss - cachedPss + kernelUsed));
@@ -18604,14 +18599,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 +20368,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/BatteryStatsService.java b/services/core/java/com/android/server/am/BatteryStatsService.java
index 090ac54..1ade8e7 100644
--- a/services/core/java/com/android/server/am/BatteryStatsService.java
+++ b/services/core/java/com/android/server/am/BatteryStatsService.java
@@ -688,6 +688,8 @@
         if (update) {
             mWorker.scheduleSync("modem-data", BatteryExternalStatsWorker.UPDATE_RADIO);
         }
+        FrameworkStatsLog.write_non_chained(
+                FrameworkStatsLog.MOBILE_RADIO_POWER_STATE_CHANGED, uid, null, powerState);
     }
 
     public void notePhoneOn() {
@@ -869,6 +871,8 @@
             }
             mStats.noteWifiRadioPowerState(powerState, tsNanos, uid);
         }
+        FrameworkStatsLog.write_non_chained(
+                FrameworkStatsLog.WIFI_RADIO_POWER_STATE_CHANGED, uid, null, powerState);
     }
 
     public void noteWifiRunning(WorkSource ws) {
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/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index a2e8216..58f3894 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -387,7 +387,7 @@
                 ActiveUids uids = mTmpUidRecords;
                 uids.clear();
                 uids.put(uidRec.uid, uidRec);
-                updateUidsLocked(uids, now);
+                updateUidsLocked(uids, SystemClock.elapsedRealtime());
                 mProcessList.incrementProcStateSeqAndNotifyAppsLocked(uids);
             }
         }
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..26f5c4c 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java
@@ -16,6 +16,7 @@
 package com.android.server.audio;
 
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.bluetooth.BluetoothA2dp;
 import android.bluetooth.BluetoothDevice;
 import android.bluetooth.BluetoothHeadset;
@@ -25,19 +26,26 @@
 import android.content.Context;
 import android.content.Intent;
 import android.media.AudioDeviceAttributes;
+import android.media.AudioDeviceInfo;
+import android.media.AudioManager;
 import android.media.AudioRoutesInfo;
 import android.media.AudioSystem;
 import android.media.IAudioRoutesObserver;
-import android.media.IStrategyPreferredDeviceDispatcher;
+import android.media.ICapturePresetDevicesRoleDispatcher;
+import android.media.ICommunicationDeviceDispatcher;
+import android.media.IStrategyPreferredDevicesDispatcher;
 import android.media.MediaMetrics;
+import android.media.audiopolicy.AudioProductStrategy;
 import android.os.Binder;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
 import android.os.PowerManager;
+import android.os.RemoteCallbackList;
 import android.os.RemoteException;
 import android.os.SystemClock;
+import android.os.UserHandle;
 import android.text.TextUtils;
 import android.util.Log;
 import android.util.PrintWriterPrinter;
@@ -45,8 +53,10 @@
 import com.android.internal.annotations.GuardedBy;
 
 import java.io.PrintWriter;
-import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -70,11 +80,8 @@
     private final @NonNull Context mContext;
 
     /** Forced device usage for communications sent to AudioSystem */
-    private int mForcedUseForComm;
-    /**
-     * Externally reported force device usage state returned by getters: always consistent
-     * with requests by setters */
-    private int mForcedUseForCommExt;
+    private AudioDeviceAttributes mPreferredDeviceforComm;
+    private int mCommunicationStrategyId = -1;
 
     // Manages all connected devices, only ever accessed on the message loop
     private final AudioDeviceInventory mDeviceInventory;
@@ -130,11 +137,23 @@
         init();
     }
 
+    private void initCommunicationStrategyId() {
+        List<AudioProductStrategy> strategies = AudioProductStrategy.getAudioProductStrategies();
+        for (AudioProductStrategy strategy : strategies) {
+            if (strategy.getAudioAttributesForLegacyStreamType(AudioSystem.STREAM_VOICE_CALL)
+                    != null) {
+                mCommunicationStrategyId = strategy.getId();
+                return;
+            }
+        }
+        mCommunicationStrategyId = -1;
+    }
+
     private void init() {
         setupMessaging(mContext);
 
-        mForcedUseForComm = AudioSystem.FORCE_NONE;
-        mForcedUseForCommExt = mForcedUseForComm;
+        mPreferredDeviceforComm = null;
+        initCommunicationStrategyId();
     }
 
     /*package*/ Context getContext() {
@@ -157,15 +176,6 @@
     }
 
     /*package*/ void onAudioServerDied() {
-        // Restore forced usage for communications and record
-        synchronized (mDeviceStateLock) {
-            AudioSystem.setParameters(
-                    "BT_SCO=" + (mForcedUseForComm == AudioSystem.FORCE_BT_SCO ? "on" : "off"));
-            onSetForceUse(AudioSystem.FOR_COMMUNICATION, mForcedUseForComm,
-                          false /*fromA2dp*/, "onAudioServerDied");
-            onSetForceUse(AudioSystem.FOR_RECORD, mForcedUseForComm,
-                          false /*fromA2dp*/, "onAudioServerDied");
-        }
         // restore devices
         sendMsgNoDelay(MSG_RESTORE_DEVICES, SENDMSG_REPLACE);
     }
@@ -217,62 +227,210 @@
      * Turns speakerphone on/off
      * @param on
      * @param eventSource for logging purposes
-     * @return true if speakerphone state changed
      */
-    /*package*/ boolean setSpeakerphoneOn(IBinder cb, int pid, boolean on, String eventSource) {
-        synchronized (mDeviceStateLock) {
-            if (!addSpeakerphoneClient(cb, pid, on)) {
-                return false;
-            }
-            final boolean wasOn = isSpeakerphoneOn();
-            updateSpeakerphoneOn(eventSource);
-            return (wasOn != isSpeakerphoneOn());
-        }
-    }
+    /*package*/ void setSpeakerphoneOn(IBinder cb, int pid, boolean on, String eventSource) {
 
-    @GuardedBy("mDeviceStateLock")
-    private void updateSpeakerphoneOn(String eventSource) {
-        if (isSpeakerphoneOnRequested()) {
-            if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) {
-                setForceUse_Async(AudioSystem.FOR_RECORD, AudioSystem.FORCE_NONE, eventSource);
-            }
-            mForcedUseForComm = AudioSystem.FORCE_SPEAKER;
-        } else if (mForcedUseForComm == AudioSystem.FORCE_SPEAKER) {
-            if (mBtHelper.isBluetoothScoOn()) {
-                mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
-                setForceUse_Async(
-                        AudioSystem.FOR_RECORD, AudioSystem.FORCE_BT_SCO, eventSource);
-            } else {
-                mForcedUseForComm = AudioSystem.FORCE_NONE;
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "setSpeakerphoneOn, on: " + on + " pid: " + pid);
+        }
+
+        synchronized (mSetModeLock) {
+            synchronized (mDeviceStateLock) {
+                AudioDeviceAttributes device = null;
+                if (on) {
+                    device = new AudioDeviceAttributes(AudioSystem.DEVICE_OUT_SPEAKER, "");
+                } else {
+                    CommunicationRouteClient client = getCommunicationRouteClientForPid(pid);
+                    if (client == null || !client.requestsSpeakerphone()) {
+                        return;
+                    }
+                }
+                setCommunicationRouteForClient(
+                        cb, pid, device, BtHelper.SCO_MODE_UNDEFINED, eventSource);
             }
         }
-        mForcedUseForCommExt = mForcedUseForComm;
-        setForceUse_Async(AudioSystem.FOR_COMMUNICATION, mForcedUseForComm, eventSource);
     }
 
     /**
-     * Returns if speakerphone is requested ON or OFF.
-     * If the current audio mode owner is in the speakerphone client list, use this preference.
-     * Otherwise use first client's preference (first client corresponds to latest request).
-     * Speakerphone is requested OFF if no client is in the list.
-     * @return true if speakerphone is requested ON, false otherwise
+     * Select device for use for communication use cases.
+     * @param cb Client binder for death detection
+     * @param pid Client pid
+     * @param device Device selected or null to unselect.
+     * @param eventSource for logging purposes
      */
-    @GuardedBy("mDeviceStateLock")
-    private boolean isSpeakerphoneOnRequested() {
-        if (mSpeakerphoneClients.isEmpty()) {
-            return false;
+    /*package*/ boolean setDeviceForCommunication(
+            IBinder cb, int pid, AudioDeviceInfo device, String eventSource) {
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "setDeviceForCommunication, device: " + device + ", pid: " + pid);
         }
-        for (SpeakerphoneClient cl : mSpeakerphoneClients) {
-            if (cl.getPid() == mModeOwnerPid) {
-                return cl.isOn();
+
+        synchronized (mSetModeLock) {
+            synchronized (mDeviceStateLock) {
+                AudioDeviceAttributes deviceAttr = null;
+                if (device != null) {
+                    deviceAttr = new AudioDeviceAttributes(device);
+                } else {
+                    CommunicationRouteClient client = getCommunicationRouteClientForPid(pid);
+                    if (client == null) {
+                        return false;
+                    }
+                }
+                setCommunicationRouteForClient(
+                        cb, pid, deviceAttr, BtHelper.SCO_MODE_UNDEFINED, eventSource);
             }
         }
-        return mSpeakerphoneClients.get(0).isOn();
+        return true;
     }
 
-    /*package*/ boolean isSpeakerphoneOn() {
+    @GuardedBy("mDeviceStateLock")
+    /*package*/ void setCommunicationRouteForClient(
+                            IBinder cb, int pid, AudioDeviceAttributes device,
+                            int scoAudioMode, String eventSource) {
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "setCommunicationRouteForClient: device: " + device);
+        }
+        AudioService.sDeviceLogger.log((new AudioEventLogger.StringEvent(
+                                        "setCommunicationRouteForClient for pid: " + pid
+                                        + " device: " + device
+                                        + " from API: " + eventSource)).printLog(TAG));
+
+        final boolean wasBtScoRequested = isBluetoothScoRequested();
+        final boolean wasSpeakerphoneRequested = isSpeakerphoneRequested();
+        CommunicationRouteClient client;
+
+
+        // Save previous client route in case of failure to start BT SCO audio
+        AudioDeviceAttributes prevClientDevice = null;
+        client = getCommunicationRouteClientForPid(pid);
+        if (client != null) {
+            prevClientDevice = client.getDevice();
+        }
+
+        if (device != null) {
+            client = addCommunicationRouteClient(cb, pid, device);
+            if (client == null) {
+                Log.w(TAG, "setCommunicationRouteForClient: could not add client for pid: "
+                        + pid + " and device: " + device);
+            }
+        } else {
+            client = removeCommunicationRouteClient(cb, true);
+        }
+        if (client == null) {
+            return;
+        }
+
+        boolean isBtScoRequested = isBluetoothScoRequested();
+        if (isBtScoRequested && !wasBtScoRequested) {
+            if (!mBtHelper.startBluetoothSco(scoAudioMode, eventSource)) {
+                Log.w(TAG, "setCommunicationRouteForClient: failure to start BT SCO for pid: "
+                        + pid);
+                // clean up or restore previous client selection
+                if (prevClientDevice != null) {
+                    addCommunicationRouteClient(cb, pid, prevClientDevice);
+                } else {
+                    removeCommunicationRouteClient(cb, true);
+                }
+                postBroadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+            }
+        } else if (!isBtScoRequested && wasBtScoRequested) {
+            mBtHelper.stopBluetoothSco(eventSource);
+        }
+
+        if (wasSpeakerphoneRequested != isSpeakerphoneRequested()) {
+            try {
+                mContext.sendBroadcastAsUser(
+                        new Intent(AudioManager.ACTION_SPEAKERPHONE_STATE_CHANGED)
+                                .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), UserHandle.ALL);
+            } catch (Exception e) {
+                Log.w(TAG, "failed to broadcast ACTION_SPEAKERPHONE_STATE_CHANGED: " + e);
+            }
+        }
+
+        sendLMsgNoDelay(MSG_L_UPDATE_COMMUNICATION_ROUTE, SENDMSG_QUEUE, eventSource);
+    }
+
+    /**
+     * Returns the device currently requested for communication use case.
+     * If the current audio mode owner is in the communication route client list,
+     * use this preference.
+     * Otherwise use first client's preference (first client corresponds to latest request).
+     * null is returned if no client is in the list.
+     * @return AudioDeviceAttributes the requested device for communication.
+     */
+
+    @GuardedBy("mDeviceStateLock")
+    private AudioDeviceAttributes requestedCommunicationDevice() {
+        AudioDeviceAttributes device = null;
+        for (CommunicationRouteClient cl : mCommunicationRouteClients) {
+            if (cl.getPid() == mModeOwnerPid) {
+                device = cl.getDevice();
+            }
+        }
+        if (!mCommunicationRouteClients.isEmpty() && mModeOwnerPid == 0) {
+            device = mCommunicationRouteClients.get(0).getDevice();
+        }
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "requestedCommunicationDevice, device: "
+                    + device + " mode owner pid: " + mModeOwnerPid);
+        }
+        return device;
+    }
+
+    /**
+     * Returns the device currently requested for communication use case.
+     * @return AudioDeviceInfo the requested device for communication.
+     */
+    AudioDeviceInfo getDeviceForCommunication() {
         synchronized (mDeviceStateLock) {
-            return (mForcedUseForCommExt == AudioSystem.FORCE_SPEAKER);
+            AudioDeviceAttributes device = requestedCommunicationDevice();
+            if (device == null) {
+                return null;
+            }
+            return AudioManager.getDeviceInfoFromType(device.getType());
+        }
+    }
+
+    /**
+     * Helper method on top of requestedCommunicationDevice() indicating if
+     * speakerphone ON is currently requested or not.
+     * @return true if speakerphone ON requested, false otherwise.
+     */
+
+    private boolean isSpeakerphoneRequested() {
+        synchronized (mDeviceStateLock) {
+            AudioDeviceAttributes device = requestedCommunicationDevice();
+            return device != null
+                    && device.getType()
+                        == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER;
+        }
+    }
+
+    /**
+     * Indicates if active route selection for communication is speakerphone.
+     * @return true if speakerphone is active, false otherwise.
+     */
+    /*package*/ boolean isSpeakerphoneOn() {
+        AudioDeviceAttributes device = getPreferredDeviceForComm();
+        if (device == null) {
+            return false;
+        }
+        return device.getInternalType() == AudioSystem.DEVICE_OUT_SPEAKER;
+    }
+
+    /**
+     * Helper method on top of requestedCommunicationDevice() indicating if
+     * Bluetooth SCO ON is currently requested or not.
+     * @return true if Bluetooth SCO ON is requested, false otherwise.
+     */
+    /*package*/ boolean isBluetoothScoRequested() {
+        synchronized (mDeviceStateLock) {
+            AudioDeviceAttributes device = requestedCommunicationDevice();
+            return device != null
+                    && device.getType()
+                        == AudioDeviceInfo.TYPE_BLUETOOTH_SCO;
         }
     }
 
@@ -323,7 +481,6 @@
         }
     }
 
-
     /*package*/ void postBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
             @NonNull BluetoothDevice device, @AudioService.BtProfileConnectionState int state,
             int profile, boolean suppressNoisyIntent, int a2dpVolume) {
@@ -406,42 +563,32 @@
         sendLMsgNoDelay(MSG_L_HEARING_AID_DEVICE_CONNECTION_CHANGE_EXT, SENDMSG_QUEUE, info);
     }
 
-    // never called by system components
-    /*package*/ void setBluetoothScoOnByApp(boolean on) {
-        synchronized (mDeviceStateLock) {
-            mForcedUseForCommExt = on ? AudioSystem.FORCE_BT_SCO : AudioSystem.FORCE_NONE;
-        }
-    }
 
-    /*package*/ boolean isBluetoothScoOnForApp() {
-        synchronized (mDeviceStateLock) {
-            return mForcedUseForCommExt == AudioSystem.FORCE_BT_SCO;
-        }
-    }
+    /**
+     * Current Bluetooth SCO audio active state indicated by BtHelper via setBluetoothScoOn().
+     */
+    private boolean mBluetoothScoOn;
 
     /*package*/ void setBluetoothScoOn(boolean on, String eventSource) {
-        //Log.i(TAG, "setBluetoothScoOn: " + on + " " + eventSource);
-        synchronized (mDeviceStateLock) {
-            if (on) {
-                // do not accept SCO ON if SCO audio is not connected
-                if (!mBtHelper.isBluetoothScoOn()) {
-                    mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
-                    return;
-                }
-                mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
-            } else if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) {
-                mForcedUseForComm = isSpeakerphoneOnRequested()
-                        ? AudioSystem.FORCE_SPEAKER : AudioSystem.FORCE_NONE;
-            }
-            mForcedUseForCommExt = mForcedUseForComm;
-            AudioSystem.setParameters("BT_SCO=" + (on ? "on" : "off"));
-            sendIILMsgNoDelay(MSG_IIL_SET_FORCE_USE, SENDMSG_QUEUE,
-                    AudioSystem.FOR_COMMUNICATION, mForcedUseForComm, eventSource);
-            sendIILMsgNoDelay(MSG_IIL_SET_FORCE_USE, SENDMSG_QUEUE,
-                    AudioSystem.FOR_RECORD, mForcedUseForComm, eventSource);
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "setBluetoothScoOn: " + on + " " + eventSource);
         }
-        // Un-mute ringtone stream volume
-        mAudioService.postUpdateRingerModeServiceInt();
+        synchronized (mDeviceStateLock) {
+            mBluetoothScoOn = on;
+            sendLMsgNoDelay(MSG_L_UPDATE_COMMUNICATION_ROUTE, SENDMSG_QUEUE, eventSource);
+        }
+    }
+
+    /**
+     * Indicates if active route selection for communication is Bluetooth SCO.
+     * @return true if Bluetooth SCO is active , false otherwise.
+     */
+    /*package*/ boolean isBluetoothScoOn() {
+        AudioDeviceAttributes device = getPreferredDeviceForComm();
+        if (device == null) {
+            return false;
+        }
+        return AudioSystem.DEVICE_OUT_ALL_SCO_SET.contains(device.getInternalType());
     }
 
     /*package*/ AudioRoutesInfo startWatchingRoutes(IAudioRoutesObserver observer) {
@@ -476,46 +623,133 @@
         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) {
         sendLMsgNoDelay(MSG_L_A2DP_DEVICE_CONFIG_CHANGE, SENDMSG_QUEUE, device);
     }
 
-    @GuardedBy("mSetModeLock")
-    /*package*/ void startBluetoothScoForClient_Sync(IBinder cb, int scoAudioMode,
+    /*package*/ void startBluetoothScoForClient(IBinder cb, int pid, int scoAudioMode,
                 @NonNull String eventSource) {
-        synchronized (mDeviceStateLock) {
-            mBtHelper.startBluetoothScoForClient(cb, scoAudioMode, eventSource);
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "startBluetoothScoForClient_Sync, pid: " + pid);
+        }
+
+        synchronized (mSetModeLock) {
+            synchronized (mDeviceStateLock) {
+                AudioDeviceAttributes device =
+                        new AudioDeviceAttributes(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, "");
+                setCommunicationRouteForClient(cb, pid, device, scoAudioMode, eventSource);
+            }
         }
     }
 
-    @GuardedBy("mSetModeLock")
-    /*package*/ void stopBluetoothScoForClient_Sync(IBinder cb, @NonNull String eventSource) {
-        synchronized (mDeviceStateLock) {
-            mBtHelper.stopBluetoothScoForClient(cb, eventSource);
+    /*package*/ void stopBluetoothScoForClient(
+                        IBinder cb, int pid, @NonNull String eventSource) {
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "stopBluetoothScoForClient_Sync, pid: " + pid);
+        }
+
+        synchronized (mSetModeLock) {
+            synchronized (mDeviceStateLock) {
+                CommunicationRouteClient client = getCommunicationRouteClientForPid(pid);
+                if (client == null || !client.requestsBluetoothSco()) {
+                    return;
+                }
+                setCommunicationRouteForClient(
+                        cb, pid, null, BtHelper.SCO_MODE_UNDEFINED, eventSource);
+            }
         }
     }
 
-    /*package*/ int setPreferredDeviceForStrategySync(int strategy,
-                                                      @NonNull AudioDeviceAttributes device) {
-        return mDeviceInventory.setPreferredDeviceForStrategySync(strategy, device);
+    /*package*/ int setPreferredDevicesForStrategySync(int strategy,
+            @NonNull List<AudioDeviceAttributes> devices) {
+        return mDeviceInventory.setPreferredDevicesForStrategySync(strategy, devices);
     }
 
-    /*package*/ int removePreferredDeviceForStrategySync(int strategy) {
-        return mDeviceInventory.removePreferredDeviceForStrategySync(strategy);
+    /*package*/ void postSetPreferredDevicesForStrategy(int strategy,
+            @NonNull List<AudioDeviceAttributes> devices) {
+        sendILMsgNoDelay(MSG_IL_SET_PREF_DEVICES_FOR_STRATEGY, SENDMSG_REPLACE, strategy, devices);
     }
 
-    /*package*/ void registerStrategyPreferredDeviceDispatcher(
-            @NonNull IStrategyPreferredDeviceDispatcher dispatcher) {
-        mDeviceInventory.registerStrategyPreferredDeviceDispatcher(dispatcher);
+    /*package*/ int removePreferredDevicesForStrategySync(int strategy) {
+        return mDeviceInventory.removePreferredDevicesForStrategySync(strategy);
     }
 
-    /*package*/ void unregisterStrategyPreferredDeviceDispatcher(
-            @NonNull IStrategyPreferredDeviceDispatcher dispatcher) {
-        mDeviceInventory.unregisterStrategyPreferredDeviceDispatcher(dispatcher);
+    /*package*/ void postRemovePreferredDevicesForStrategy(int strategy) {
+        sendIMsgNoDelay(MSG_I_REMOVE_PREF_DEVICES_FOR_STRATEGY, SENDMSG_REPLACE, strategy);
+    }
+
+    /*package*/ void registerStrategyPreferredDevicesDispatcher(
+            @NonNull IStrategyPreferredDevicesDispatcher dispatcher) {
+        mDeviceInventory.registerStrategyPreferredDevicesDispatcher(dispatcher);
+    }
+
+    /*package*/ void unregisterStrategyPreferredDevicesDispatcher(
+            @NonNull IStrategyPreferredDevicesDispatcher dispatcher) {
+        mDeviceInventory.unregisterStrategyPreferredDevicesDispatcher(dispatcher);
+    }
+
+    /*package*/ int setPreferredDevicesForCapturePresetSync(int capturePreset,
+            @NonNull List<AudioDeviceAttributes> devices) {
+        return mDeviceInventory.setPreferredDevicesForCapturePresetSync(capturePreset, devices);
+    }
+
+    /*package*/ int clearPreferredDevicesForCapturePresetSync(int capturePreset) {
+        return mDeviceInventory.clearPreferredDevicesForCapturePresetSync(capturePreset);
+    }
+
+    /*package*/ void registerCapturePresetDevicesRoleDispatcher(
+            @NonNull ICapturePresetDevicesRoleDispatcher dispatcher) {
+        mDeviceInventory.registerCapturePresetDevicesRoleDispatcher(dispatcher);
+    }
+
+    /*package*/ void unregisterCapturePresetDevicesRoleDispatcher(
+            @NonNull ICapturePresetDevicesRoleDispatcher dispatcher) {
+        mDeviceInventory.unregisterCapturePresetDevicesRoleDispatcher(dispatcher);
+    }
+
+    /*package*/ void registerCommunicationDeviceDispatcher(
+            @NonNull ICommunicationDeviceDispatcher dispatcher) {
+        mCommDevDispatchers.register(dispatcher);
+    }
+
+    /*package*/ void unregisterCommunicationDeviceDispatcher(
+            @NonNull ICommunicationDeviceDispatcher dispatcher) {
+        mCommDevDispatchers.unregister(dispatcher);
+    }
+
+    // Monitoring of communication device
+    final RemoteCallbackList<ICommunicationDeviceDispatcher> mCommDevDispatchers =
+            new RemoteCallbackList<ICommunicationDeviceDispatcher>();
+
+    // portId of the device currently selected for communication: avoids broadcasting changes
+    // when same communication route is applied
+    @GuardedBy("mDeviceStateLock")
+    int mCurCommunicationPortId = -1;
+
+    @GuardedBy("mDeviceStateLock")
+    private void dispatchCommunicationDevice() {
+        AudioDeviceInfo device = getDeviceForCommunication();
+        int portId = (getDeviceForCommunication() == null) ? 0 : device.getId();
+        if (portId == mCurCommunicationPortId) {
+            return;
+        }
+        mCurCommunicationPortId = portId;
+
+        final int nbDispatchers = mCommDevDispatchers.beginBroadcast();
+        for (int i = 0; i < nbDispatchers; i++) {
+            try {
+                mCommDevDispatchers.getBroadcastItem(i)
+                        .dispatchCommunicationDeviceChanged(portId);
+            } catch (RemoteException e) {
+            }
+        }
+        mCommDevDispatchers.finishBroadcast();
     }
 
     //---------------------------------------------------------------------
@@ -648,22 +882,29 @@
                 hearingAidProfile);
     }
 
-    /*package*/ void postScoClientDied(Object obj) {
-        sendLMsgNoDelay(MSG_L_SCOCLIENT_DIED, SENDMSG_QUEUE, obj);
+    /*package*/ void postCommunicationRouteClientDied(CommunicationRouteClient client) {
+        sendLMsgNoDelay(MSG_L_COMMUNICATION_ROUTE_CLIENT_DIED, SENDMSG_QUEUE, client);
     }
 
-    /*package*/ void postSpeakerphoneClientDied(Object obj) {
-        sendLMsgNoDelay(MSG_L_SPEAKERPHONE_CLIENT_DIED, SENDMSG_QUEUE, obj);
-    }
-
-    /*package*/ void postSaveSetPreferredDeviceForStrategy(int strategy,
-                                                           AudioDeviceAttributes device)
+    /*package*/ void postSaveSetPreferredDevicesForStrategy(int strategy,
+                                                            List<AudioDeviceAttributes> devices)
     {
-        sendILMsgNoDelay(MSG_IL_SAVE_PREF_DEVICE_FOR_STRATEGY, SENDMSG_QUEUE, strategy, device);
+        sendILMsgNoDelay(MSG_IL_SAVE_PREF_DEVICES_FOR_STRATEGY, SENDMSG_QUEUE, strategy, devices);
     }
 
-    /*package*/ void postSaveRemovePreferredDeviceForStrategy(int strategy) {
-        sendIMsgNoDelay(MSG_I_SAVE_REMOVE_PREF_DEVICE_FOR_STRATEGY, SENDMSG_QUEUE, strategy);
+    /*package*/ void postSaveRemovePreferredDevicesForStrategy(int strategy) {
+        sendIMsgNoDelay(MSG_I_SAVE_REMOVE_PREF_DEVICES_FOR_STRATEGY, SENDMSG_QUEUE, strategy);
+    }
+
+    /*package*/ void postSaveSetPreferredDevicesForCapturePreset(
+            int capturePreset, List<AudioDeviceAttributes> devices) {
+        sendILMsgNoDelay(
+                MSG_IL_SAVE_PREF_DEVICES_FOR_CAPTURE_PRESET, SENDMSG_QUEUE, capturePreset, devices);
+    }
+
+    /*package*/ void postSaveClearPreferredDevicesForCapturePreset(int capturePreset) {
+        sendIMsgNoDelay(
+                MSG_I_SAVE_CLEAR_PREF_DEVICES_FOR_CAPTURE_PRESET, SENDMSG_QUEUE, capturePreset);
     }
 
     //---------------------------------------------------------------------
@@ -762,15 +1003,17 @@
 
         mDeviceInventory.dump(pw, prefix);
 
-        pw.println("\n" + prefix + "mForcedUseForComm: "
-                +  AudioSystem.forceUseConfigToString(mForcedUseForComm));
-        pw.println(prefix + "mForcedUseForCommExt: "
-                + AudioSystem.forceUseConfigToString(mForcedUseForCommExt));
-        pw.println(prefix + "mModeOwnerPid: " + mModeOwnerPid);
-        pw.println(prefix + "Speakerphone clients:");
-        mSpeakerphoneClients.forEach((cl) -> {
-            pw.println("  " + prefix + "pid: " + cl.getPid() + " on: "
-                        + cl.isOn() + " cb: " + cl.getBinder()); });
+        pw.println("\n" + prefix + "Communication route clients:");
+        mCommunicationRouteClients.forEach((cl) -> {
+            pw.println("  " + prefix + "pid: " + cl.getPid() + " device: "
+                        + cl.getDevice() + " cb: " + cl.getBinder()); });
+
+        pw.println("\n" + prefix + "mPreferredDeviceforComm: "
+                +  mPreferredDeviceforComm);
+        pw.println(prefix + "mCommunicationStrategyId: "
+                +  mCommunicationStrategyId);
+
+        pw.println("\n" + prefix + "mModeOwnerPid: " + mModeOwnerPid);
 
         mBtHelper.dump(pw, prefix);
     }
@@ -793,6 +1036,11 @@
                 .set(MediaMetrics.Property.FORCE_USE_MODE,
                         AudioSystem.forceUseConfigToString(config))
                 .record();
+
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "onSetForceUse(useCase<" + useCase + ">, config<" + config + ">, fromA2dp<"
+                    + fromA2dp + ">, eventSource<" + eventSource + ">)");
+        }
         AudioSystem.setForceUse(useCase, config);
     }
 
@@ -858,9 +1106,13 @@
         public void handleMessage(Message msg) {
             switch (msg.what) {
                 case MSG_RESTORE_DEVICES:
-                    synchronized (mDeviceStateLock) {
-                        mDeviceInventory.onRestoreDevices();
-                        mBtHelper.onAudioServerDiedRestoreA2dp();
+                    synchronized (mSetModeLock) {
+                        synchronized (mDeviceStateLock) {
+                            initCommunicationStrategyId();
+                            mDeviceInventory.onRestoreDevices();
+                            mBtHelper.onAudioServerDiedRestoreA2dp();
+                            onUpdateCommunicationRoute("MSG_RESTORE_DEVICES");
+                        }
                     }
                     break;
                 case MSG_L_SET_WIRED_DEVICE_CONNECTION_STATE:
@@ -949,24 +1201,25 @@
                         synchronized (mDeviceStateLock) {
                             if (mModeOwnerPid != msg.arg1) {
                                 mModeOwnerPid = msg.arg1;
-                                updateSpeakerphoneOn("setNewModeOwner");
-                                if (mModeOwnerPid != 0) {
-                                    mBtHelper.disconnectBluetoothSco(mModeOwnerPid);
+                                if (msg.arg2 != AudioSystem.MODE_RINGTONE) {
+                                    onUpdateCommunicationRoute("setNewModeOwner");
                                 }
                             }
                         }
                     }
                     break;
-                case MSG_L_SCOCLIENT_DIED:
+                case MSG_L_COMMUNICATION_ROUTE_CLIENT_DIED:
                     synchronized (mSetModeLock) {
                         synchronized (mDeviceStateLock) {
-                            mBtHelper.scoClientDied(msg.obj);
+                            onCommunicationRouteClientDied((CommunicationRouteClient) msg.obj);
                         }
                     }
                     break;
-                case MSG_L_SPEAKERPHONE_CLIENT_DIED:
-                    synchronized (mDeviceStateLock) {
-                        speakerphoneClientDied(msg.obj);
+                case MSG_L_UPDATE_COMMUNICATION_ROUTE:
+                    synchronized (mSetModeLock) {
+                        synchronized (mDeviceStateLock) {
+                            onUpdateCommunicationRoute((String) msg.obj);
+                        }
                     }
                     break;
                 case MSG_TOGGLE_HDMI:
@@ -1055,18 +1308,41 @@
                                 info.mDevice, info.mState, info.mSupprNoisy, info.mMusicDevice);
                     }
                 } break;
-                case MSG_IL_SAVE_PREF_DEVICE_FOR_STRATEGY: {
+                case MSG_IL_SAVE_PREF_DEVICES_FOR_STRATEGY: {
                     final int strategy = msg.arg1;
-                    final AudioDeviceAttributes device = (AudioDeviceAttributes) msg.obj;
-                    mDeviceInventory.onSaveSetPreferredDevice(strategy, device);
+                    final List<AudioDeviceAttributes> devices =
+                            (List<AudioDeviceAttributes>) msg.obj;
+                    mDeviceInventory.onSaveSetPreferredDevices(strategy, devices);
                 } break;
-                case MSG_I_SAVE_REMOVE_PREF_DEVICE_FOR_STRATEGY: {
+                case MSG_I_SAVE_REMOVE_PREF_DEVICES_FOR_STRATEGY: {
                     final int strategy = msg.arg1;
-                    mDeviceInventory.onSaveRemovePreferredDevice(strategy);
+                    mDeviceInventory.onSaveRemovePreferredDevices(strategy);
+                } break;
+                case MSG_IL_SET_PREF_DEVICES_FOR_STRATEGY: {
+                    final int strategy = msg.arg1;
+                    final List<AudioDeviceAttributes> devices =
+                            (List<AudioDeviceAttributes>) msg.obj;
+                    setPreferredDevicesForStrategySync(strategy, devices);
+
+                } break;
+                case MSG_I_REMOVE_PREF_DEVICES_FOR_STRATEGY: {
+                    final int strategy = msg.arg1;
+                    removePreferredDevicesForStrategySync(strategy);
                 } break;
                 case MSG_CHECK_MUTE_MUSIC:
                     checkMessagesMuteMusic(0);
                     break;
+                case MSG_IL_SAVE_PREF_DEVICES_FOR_CAPTURE_PRESET: {
+                    final int capturePreset = msg.arg1;
+                    final List<AudioDeviceAttributes> devices =
+                            (List<AudioDeviceAttributes>) msg.obj;
+                    mDeviceInventory.onSaveSetPreferredDevicesForCapturePreset(
+                            capturePreset, devices);
+                } break;
+                case MSG_I_SAVE_CLEAR_PREF_DEVICES_FOR_CAPTURE_PRESET: {
+                    final int capturePreset = msg.arg1;
+                    mDeviceInventory.onSaveClearPreferredDevicesForCapturePreset(capturePreset);
+                } break;
                 default:
                     Log.wtf(TAG, "Invalid message " + msg.what);
             }
@@ -1134,15 +1410,19 @@
     // process external command to (dis)connect a hearing aid device
     private static final int MSG_L_HEARING_AID_DEVICE_CONNECTION_CHANGE_EXT = 31;
 
-    // a ScoClient died in BtHelper
-    private static final int MSG_L_SCOCLIENT_DIED = 32;
-    private static final int MSG_IL_SAVE_PREF_DEVICE_FOR_STRATEGY = 33;
-    private static final int MSG_I_SAVE_REMOVE_PREF_DEVICE_FOR_STRATEGY = 34;
+    private static final int MSG_IL_SAVE_PREF_DEVICES_FOR_STRATEGY = 32;
+    private static final int MSG_I_SAVE_REMOVE_PREF_DEVICES_FOR_STRATEGY = 33;
 
-    private static final int MSG_L_SPEAKERPHONE_CLIENT_DIED = 35;
-    private static final int MSG_CHECK_MUTE_MUSIC = 36;
-    private static final int MSG_REPORT_NEW_ROUTES_A2DP = 37;
+    private static final int MSG_L_COMMUNICATION_ROUTE_CLIENT_DIED = 34;
+    private static final int MSG_CHECK_MUTE_MUSIC = 35;
+    private static final int MSG_REPORT_NEW_ROUTES_A2DP = 36;
 
+    private static final int MSG_IL_SAVE_PREF_DEVICES_FOR_CAPTURE_PRESET = 37;
+    private static final int MSG_I_SAVE_CLEAR_PREF_DEVICES_FOR_CAPTURE_PRESET = 38;
+
+    private static final int MSG_L_UPDATE_COMMUNICATION_ROUTE = 39;
+    private static final int MSG_IL_SET_PREF_DEVICES_FOR_STRATEGY = 40;
+    private static final int MSG_I_REMOVE_PREF_DEVICES_FOR_STRATEGY = 41;
 
     private static boolean isMessageHandledUnderWakelock(int msgId) {
         switch(msgId) {
@@ -1296,14 +1576,20 @@
         }
     }
 
-    private class SpeakerphoneClient implements IBinder.DeathRecipient {
+    // List of applications requesting a specific route for communication.
+    @GuardedBy("mDeviceStateLock")
+    private final @NonNull LinkedList<CommunicationRouteClient> mCommunicationRouteClients =
+            new LinkedList<CommunicationRouteClient>();
+
+    private class CommunicationRouteClient implements IBinder.DeathRecipient {
         private final IBinder mCb;
         private final int mPid;
-        private final boolean mOn;
-        SpeakerphoneClient(IBinder cb, int pid, boolean on) {
+        private AudioDeviceAttributes mDevice;
+
+        CommunicationRouteClient(IBinder cb, int pid, AudioDeviceAttributes device) {
             mCb = cb;
             mPid = pid;
-            mOn = on;
+            mDevice = device;
         }
 
         public boolean registerDeathRecipient() {
@@ -1312,7 +1598,7 @@
                 mCb.linkToDeath(this, 0);
                 status = true;
             } catch (RemoteException e) {
-                Log.w(TAG, "SpeakerphoneClient could not link to " + mCb + " binder death");
+                Log.w(TAG, "CommunicationRouteClient could not link to " + mCb + " binder death");
             }
             return status;
         }
@@ -1321,13 +1607,13 @@
             try {
                 mCb.unlinkToDeath(this, 0);
             } catch (NoSuchElementException e) {
-                Log.w(TAG, "SpeakerphoneClient could not not unregistered to binder");
+                Log.w(TAG, "CommunicationRouteClient could not not unregistered to binder");
             }
         }
 
         @Override
         public void binderDied() {
-            postSpeakerphoneClientDied(this);
+            postCommunicationRouteClientDied(this);
         }
 
         IBinder getBinder() {
@@ -1338,29 +1624,103 @@
             return mPid;
         }
 
-        boolean isOn() {
-            return mOn;
+        AudioDeviceAttributes getDevice() {
+            return mDevice;
+        }
+
+        boolean requestsBluetoothSco() {
+            return mDevice != null
+                    && mDevice.getType()
+                        == AudioDeviceInfo.TYPE_BLUETOOTH_SCO;
+        }
+
+        boolean requestsSpeakerphone() {
+            return mDevice != null
+                    && mDevice.getType()
+                        == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER;
         }
     }
 
+    // @GuardedBy("mSetModeLock")
     @GuardedBy("mDeviceStateLock")
-    private void speakerphoneClientDied(Object obj) {
-        if (obj == null) {
+    private void onCommunicationRouteClientDied(CommunicationRouteClient client) {
+        if (client == null) {
             return;
         }
         Log.w(TAG, "Speaker client died");
-        if (removeSpeakerphoneClient(((SpeakerphoneClient) obj).getBinder(), false) != null) {
-            updateSpeakerphoneOn("speakerphoneClientDied");
+        if (removeCommunicationRouteClient(client.getBinder(), false)
+                != null) {
+            onUpdateCommunicationRoute("onCommunicationRouteClientDied");
         }
     }
 
-    private SpeakerphoneClient removeSpeakerphoneClient(IBinder cb, boolean unregister) {
-        for (SpeakerphoneClient cl : mSpeakerphoneClients) {
+    /**
+     * Determines which forced usage for communication should be sent to audio policy manager
+     * as a function of current SCO audio activation state and active communication route requests.
+     * SCO audio state has the highest priority as it can result from external activation by
+     * telephony service.
+     * @return selected forced usage for communication.
+     */
+    @GuardedBy("mDeviceStateLock")
+    @Nullable private AudioDeviceAttributes getPreferredDeviceForComm() {
+        boolean btSCoOn = mBluetoothScoOn && mBtHelper.isBluetoothScoOn();
+        if (btSCoOn) {
+            // Use the SCO device known to BtHelper so that it matches exactly
+            // what has been communicated to audio policy manager. The device
+            // returned by requestedCommunicationDevice() can be a dummy SCO device if legacy
+            // APIs are used to start SCO audio.
+            AudioDeviceAttributes device = mBtHelper.getHeadsetAudioDevice();
+            if (device != null) {
+                return device;
+            }
+        }
+        AudioDeviceAttributes device = requestedCommunicationDevice();
+        if (device == null
+                || AudioSystem.DEVICE_OUT_ALL_SCO_SET.contains(device.getInternalType())) {
+            // Do not indicate BT SCO selection if SCO is requested but SCO is not ON
+            return null;
+        }
+        return device;
+    }
+
+    /**
+     * Configures audio policy manager and audio HAL according to active communication route.
+     * Always called from message Handler.
+     */
+    // @GuardedBy("mSetModeLock")
+    @GuardedBy("mDeviceStateLock")
+    private void onUpdateCommunicationRoute(String eventSource) {
+        mPreferredDeviceforComm = getPreferredDeviceForComm();
+        if (AudioService.DEBUG_COMM_RTE) {
+            Log.v(TAG, "onUpdateCommunicationRoute, mPreferredDeviceforComm: "
+                    + mPreferredDeviceforComm + " eventSource: " + eventSource);
+        }
+
+        if (mPreferredDeviceforComm == null
+                || !AudioSystem.DEVICE_OUT_ALL_SCO_SET.contains(
+                        mPreferredDeviceforComm.getInternalType())) {
+            AudioSystem.setParameters("BT_SCO=off");
+        } else {
+            AudioSystem.setParameters("BT_SCO=on");
+        }
+        if (mPreferredDeviceforComm == null) {
+            postRemovePreferredDevicesForStrategy(mCommunicationStrategyId);
+        } else {
+            postSetPreferredDevicesForStrategy(
+                    mCommunicationStrategyId, Arrays.asList(mPreferredDeviceforComm));
+        }
+        mAudioService.postUpdateRingerModeServiceInt();
+        dispatchCommunicationDevice();
+    }
+
+    private CommunicationRouteClient removeCommunicationRouteClient(
+                    IBinder cb, boolean unregister) {
+        for (CommunicationRouteClient cl : mCommunicationRouteClients) {
             if (cl.getBinder() == cb) {
                 if (unregister) {
                     cl.unregisterDeathRecipient();
                 }
-                mSpeakerphoneClients.remove(cl);
+                mCommunicationRouteClients.remove(cl);
                 return cl;
             }
         }
@@ -1368,20 +1728,25 @@
     }
 
     @GuardedBy("mDeviceStateLock")
-    private boolean addSpeakerphoneClient(IBinder cb, int pid, boolean on) {
+    private CommunicationRouteClient addCommunicationRouteClient(
+                    IBinder cb, int pid, AudioDeviceAttributes device) {
         // always insert new request at first position
-        removeSpeakerphoneClient(cb, true);
-        SpeakerphoneClient client = new SpeakerphoneClient(cb, pid, on);
+        removeCommunicationRouteClient(cb, true);
+        CommunicationRouteClient client = new CommunicationRouteClient(cb, pid, device);
         if (client.registerDeathRecipient()) {
-            mSpeakerphoneClients.add(0, client);
-            return true;
+            mCommunicationRouteClients.add(0, client);
+            return client;
         }
-        return false;
+        return null;
     }
 
-    // List of clients requesting speakerPhone ON
     @GuardedBy("mDeviceStateLock")
-    private final @NonNull ArrayList<SpeakerphoneClient> mSpeakerphoneClients =
-            new ArrayList<SpeakerphoneClient>();
-
+    private CommunicationRouteClient getCommunicationRouteClientForPid(int pid) {
+        for (CommunicationRouteClient cl : mCommunicationRouteClients) {
+            if (cl.getPid() == pid) {
+                return cl;
+            }
+        }
+        return null;
+    }
 }
diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
index 02a846e..82586b8 100644
--- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java
+++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java
@@ -16,7 +16,6 @@
 package com.android.server.audio;
 
 import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.app.ActivityManager;
 import android.bluetooth.BluetoothA2dp;
 import android.bluetooth.BluetoothAdapter;
@@ -32,7 +31,8 @@
 import android.media.AudioRoutesInfo;
 import android.media.AudioSystem;
 import android.media.IAudioRoutesObserver;
-import android.media.IStrategyPreferredDeviceDispatcher;
+import android.media.ICapturePresetDevicesRoleDispatcher;
+import android.media.IStrategyPreferredDevicesDispatcher;
 import android.media.MediaMetrics;
 import android.os.Binder;
 import android.os.RemoteCallbackList;
@@ -51,6 +51,7 @@
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Set;
 
 /**
@@ -137,7 +138,12 @@
     private final ArrayMap<Integer, String> mApmConnectedDevices = new ArrayMap<>();
 
     // List of preferred devices for strategies
-    private final ArrayMap<Integer, AudioDeviceAttributes> mPreferredDevices = new ArrayMap<>();
+    private final ArrayMap<Integer, List<AudioDeviceAttributes>> mPreferredDevices =
+            new ArrayMap<>();
+
+    // List of preferred devices of capture preset
+    private final ArrayMap<Integer, List<AudioDeviceAttributes>> mPreferredDevicesForCapturePreset =
+            new ArrayMap<>();
 
     // the wrapper for AudioSystem static methods, allows us to spy AudioSystem
     private final @NonNull AudioSystemAdapter mAudioSystem;
@@ -150,8 +156,12 @@
             new RemoteCallbackList<IAudioRoutesObserver>();
 
     // Monitoring of strategy-preferred device
-    final RemoteCallbackList<IStrategyPreferredDeviceDispatcher> mPrefDevDispatchers =
-            new RemoteCallbackList<IStrategyPreferredDeviceDispatcher>();
+    final RemoteCallbackList<IStrategyPreferredDevicesDispatcher> mPrefDevDispatchers =
+            new RemoteCallbackList<IStrategyPreferredDevicesDispatcher>();
+
+    // Monitoring of devices for role and capture preset
+    final RemoteCallbackList<ICapturePresetDevicesRoleDispatcher> mDevRoleCapturePresetDispatchers =
+            new RemoteCallbackList<ICapturePresetDevicesRoleDispatcher>();
 
     /*package*/ AudioDeviceInventory(@NonNull AudioDeviceBroker broker) {
         mDeviceBroker = broker;
@@ -242,6 +252,9 @@
             pw.println("  " + prefix + " type:0x" + Integer.toHexString(keyType)
                     + " (" + AudioSystem.getDeviceName(keyType)
                     + ") addr:" + valueAddress); });
+        mPreferredDevicesForCapturePreset.forEach((capturePreset, devices) -> {
+            pw.println("  " + prefix + "capturePreset:" + capturePreset
+                    + " devices:" + devices); });
     }
 
     //------------------------------------------------------------
@@ -265,8 +278,12 @@
             }
         }
         synchronized (mPreferredDevices) {
-            mPreferredDevices.forEach((strategy, device) -> {
-                mAudioSystem.setPreferredDeviceForStrategy(strategy, device); });
+            mPreferredDevices.forEach((strategy, devices) -> {
+                mAudioSystem.setDevicesRoleForStrategy(
+                        strategy, AudioSystem.DEVICE_ROLE_PREFERRED, devices); });
+        }
+        synchronized (mPreferredDevicesForCapturePreset) {
+            // TODO: call audiosystem to restore
         }
     }
 
@@ -600,52 +617,108 @@
         mmi.record();
     }
 
-    /*package*/ void onSaveSetPreferredDevice(int strategy, @NonNull AudioDeviceAttributes device) {
-        mPreferredDevices.put(strategy, device);
-        dispatchPreferredDevice(strategy, device);
+    /*package*/ void onSaveSetPreferredDevices(int strategy,
+                                               @NonNull List<AudioDeviceAttributes> devices) {
+        mPreferredDevices.put(strategy, devices);
+        dispatchPreferredDevice(strategy, devices);
     }
 
-    /*package*/ void onSaveRemovePreferredDevice(int strategy) {
+    /*package*/ void onSaveRemovePreferredDevices(int strategy) {
         mPreferredDevices.remove(strategy);
-        dispatchPreferredDevice(strategy, null);
+        dispatchPreferredDevice(strategy, new ArrayList<AudioDeviceAttributes>());
+    }
+
+    /*package*/ void onSaveSetPreferredDevicesForCapturePreset(
+            int capturePreset, @NonNull List<AudioDeviceAttributes> devices) {
+        mPreferredDevicesForCapturePreset.put(capturePreset, devices);
+        dispatchDevicesRoleForCapturePreset(
+                capturePreset, AudioSystem.DEVICE_ROLE_PREFERRED, devices);
+    }
+
+    /*package*/ void onSaveClearPreferredDevicesForCapturePreset(int capturePreset) {
+        mPreferredDevicesForCapturePreset.remove(capturePreset);
+        dispatchDevicesRoleForCapturePreset(
+                capturePreset, AudioSystem.DEVICE_ROLE_PREFERRED,
+                new ArrayList<AudioDeviceAttributes>());
     }
 
     //------------------------------------------------------------
     //
 
-    /*package*/ int setPreferredDeviceForStrategySync(int strategy,
-                                                      @NonNull AudioDeviceAttributes device) {
+    /*package*/ int setPreferredDevicesForStrategySync(int strategy,
+            @NonNull List<AudioDeviceAttributes> devices) {
         final long identity = Binder.clearCallingIdentity();
-        final int status = mAudioSystem.setPreferredDeviceForStrategy(strategy, device);
+
+        AudioService.sDeviceLogger.log((new AudioEventLogger.StringEvent(
+                                "setPreferredDevicesForStrategySync, strategy: " + strategy
+                                + " devices: " + devices)).printLog(TAG));
+        final int status = mAudioSystem.setDevicesRoleForStrategy(
+                strategy, AudioSystem.DEVICE_ROLE_PREFERRED, devices);
         Binder.restoreCallingIdentity(identity);
 
         if (status == AudioSystem.SUCCESS) {
-            mDeviceBroker.postSaveSetPreferredDeviceForStrategy(strategy, device);
+            mDeviceBroker.postSaveSetPreferredDevicesForStrategy(strategy, devices);
         }
         return status;
     }
 
-    /*package*/ int removePreferredDeviceForStrategySync(int strategy) {
+    /*package*/ int removePreferredDevicesForStrategySync(int strategy) {
         final long identity = Binder.clearCallingIdentity();
-        final int status = mAudioSystem.removePreferredDeviceForStrategy(strategy);
+        final int status = mAudioSystem.removeDevicesRoleForStrategy(
+                strategy, AudioSystem.DEVICE_ROLE_PREFERRED);
         Binder.restoreCallingIdentity(identity);
 
         if (status == AudioSystem.SUCCESS) {
-            mDeviceBroker.postSaveRemovePreferredDeviceForStrategy(strategy);
+            mDeviceBroker.postSaveRemovePreferredDevicesForStrategy(strategy);
         }
         return status;
     }
 
-    /*package*/ void registerStrategyPreferredDeviceDispatcher(
-            @NonNull IStrategyPreferredDeviceDispatcher dispatcher) {
+    /*package*/ void registerStrategyPreferredDevicesDispatcher(
+            @NonNull IStrategyPreferredDevicesDispatcher dispatcher) {
         mPrefDevDispatchers.register(dispatcher);
     }
 
-    /*package*/ void unregisterStrategyPreferredDeviceDispatcher(
-            @NonNull IStrategyPreferredDeviceDispatcher dispatcher) {
+    /*package*/ void unregisterStrategyPreferredDevicesDispatcher(
+            @NonNull IStrategyPreferredDevicesDispatcher dispatcher) {
         mPrefDevDispatchers.unregister(dispatcher);
     }
 
+    /*package*/ int setPreferredDevicesForCapturePresetSync(
+            int capturePreset, @NonNull List<AudioDeviceAttributes> devices) {
+        final long identity = Binder.clearCallingIdentity();
+        final int status = mAudioSystem.setDevicesRoleForCapturePreset(
+                capturePreset, AudioSystem.DEVICE_ROLE_PREFERRED, devices);
+        Binder.restoreCallingIdentity(identity);
+
+        if (status == AudioSystem.SUCCESS) {
+            mDeviceBroker.postSaveSetPreferredDevicesForCapturePreset(capturePreset, devices);
+        }
+        return status;
+    }
+
+    /*package*/ int clearPreferredDevicesForCapturePresetSync(int capturePreset) {
+        final long identity = Binder.clearCallingIdentity();
+        final int status = mAudioSystem.clearDevicesRoleForCapturePreset(
+                capturePreset, AudioSystem.DEVICE_ROLE_PREFERRED);
+        Binder.restoreCallingIdentity(identity);
+
+        if (status == AudioSystem.SUCCESS) {
+            mDeviceBroker.postSaveClearPreferredDevicesForCapturePreset(capturePreset);
+        }
+        return status;
+    }
+
+    /*package*/ void registerCapturePresetDevicesRoleDispatcher(
+            @NonNull ICapturePresetDevicesRoleDispatcher dispatcher) {
+        mDevRoleCapturePresetDispatchers.register(dispatcher);
+    }
+
+    /*package*/ void unregisterCapturePresetDevicesRoleDispatcher(
+            @NonNull ICapturePresetDevicesRoleDispatcher dispatcher) {
+        mDevRoleCapturePresetDispatchers.unregister(dispatcher);
+    }
+
     /**
      * Implements the communication with AudioSystem to (dis)connect a device in the native layers
      * @param connect true if connection
@@ -1288,17 +1361,32 @@
         }
     }
 
-    private void dispatchPreferredDevice(int strategy, @Nullable AudioDeviceAttributes device) {
+    private void dispatchPreferredDevice(int strategy,
+                                         @NonNull List<AudioDeviceAttributes> devices) {
         final int nbDispatchers = mPrefDevDispatchers.beginBroadcast();
         for (int i = 0; i < nbDispatchers; i++) {
             try {
-                mPrefDevDispatchers.getBroadcastItem(i).dispatchPrefDeviceChanged(strategy, device);
+                mPrefDevDispatchers.getBroadcastItem(i).dispatchPrefDevicesChanged(
+                        strategy, devices);
             } catch (RemoteException e) {
             }
         }
         mPrefDevDispatchers.finishBroadcast();
     }
 
+    private void dispatchDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devices) {
+        final int nbDispatchers = mDevRoleCapturePresetDispatchers.beginBroadcast();
+        for (int i = 0; i < nbDispatchers; ++i) {
+            try {
+                mDevRoleCapturePresetDispatchers.getBroadcastItem(i).dispatchDevicesRoleChanged(
+                        capturePreset, role, devices);
+            } catch (RemoteException e) {
+            }
+        }
+        mDevRoleCapturePresetDispatchers.finishBroadcast();
+    }
+
     //----------------------------------------------------------
     // For tests only
 
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 bd7f9df..024dca7 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;
@@ -80,10 +84,12 @@
 import android.media.IAudioRoutesObserver;
 import android.media.IAudioServerStateDispatcher;
 import android.media.IAudioService;
+import android.media.ICapturePresetDevicesRoleDispatcher;
+import android.media.ICommunicationDeviceDispatcher;
 import android.media.IPlaybackConfigDispatcher;
 import android.media.IRecordingConfigDispatcher;
 import android.media.IRingtonePlayer;
-import android.media.IStrategyPreferredDeviceDispatcher;
+import android.media.IStrategyPreferredDevicesDispatcher;
 import android.media.IVolumeController;
 import android.media.MediaExtractor;
 import android.media.MediaFormat;
@@ -167,6 +173,7 @@
 import java.util.Set;
 import java.util.concurrent.Executor;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
 
 /**
  * The implementation of the audio service for volume, audio focus, device management...
@@ -201,6 +208,9 @@
     /** debug calls to devices APIs */
     protected static final boolean DEBUG_DEVICES = false;
 
+    /** Debug communication route */
+    protected static final boolean DEBUG_COMM_RTE = false;
+
     /** How long to delay before persisting a change in volume/ringer mode. */
     private static final int PERSIST_DELAY = 500;
 
@@ -284,6 +294,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, ...)
@@ -672,6 +683,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);
@@ -891,6 +903,9 @@
                 mPrescaleAbsoluteVolume[i] = preScale[i];
             }
         }
+
+        // check on volume initialization
+        checkVolumeRangeInitialization("AudioService()");
     }
 
     public void systemReady() {
@@ -1018,11 +1033,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();
 
@@ -1057,14 +1076,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();
@@ -1162,6 +1174,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()) {
@@ -1778,22 +1856,28 @@
     ///////////////////////////////////////////////////////////////////////////
     // IPC methods
     ///////////////////////////////////////////////////////////////////////////
-    /** @see AudioManager#setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceInfo) */
-    public int setPreferredDeviceForStrategy(int strategy, AudioDeviceAttributes device) {
-        if (device == null) {
+    /**
+     * @see AudioManager#setPreferredDeviceForStrategy(AudioProductStrategy, AudioDeviceAttributes)
+     * @see AudioManager#setPreferredDevicesForStrategy(AudioProductStrategy,
+     *                                                  List<AudioDeviceAttributes>)
+     */
+    public int setPreferredDevicesForStrategy(int strategy, List<AudioDeviceAttributes> devices) {
+        if (devices == null) {
             return AudioSystem.ERROR;
         }
         enforceModifyAudioRoutingPermission();
         final String logString = String.format(
                 "setPreferredDeviceForStrategy u/pid:%d/%d strat:%d dev:%s",
-                Binder.getCallingUid(), Binder.getCallingPid(), strategy, device.toString());
+                Binder.getCallingUid(), Binder.getCallingPid(), strategy,
+                devices.stream().map(e -> e.toString()).collect(Collectors.joining(",")));
         sDeviceLogger.log(new AudioEventLogger.StringEvent(logString).printLog(TAG));
-        if (device.getRole() == AudioDeviceAttributes.ROLE_INPUT) {
+        if (devices.stream().anyMatch(device ->
+                device.getRole() == AudioDeviceAttributes.ROLE_INPUT)) {
             Log.e(TAG, "Unsupported input routing in " + logString);
             return AudioSystem.ERROR;
         }
 
-        final int status = mDeviceBroker.setPreferredDeviceForStrategySync(strategy, device);
+        final int status = mDeviceBroker.setPreferredDevicesForStrategySync(strategy, devices);
         if (status != AudioSystem.SUCCESS) {
             Log.e(TAG, String.format("Error %d in %s)", status, logString));
         }
@@ -1802,53 +1886,149 @@
     }
 
     /** @see AudioManager#removePreferredDeviceForStrategy(AudioProductStrategy) */
-    public int removePreferredDeviceForStrategy(int strategy) {
+    public int removePreferredDevicesForStrategy(int strategy) {
         enforceModifyAudioRoutingPermission();
         final String logString =
                 String.format("removePreferredDeviceForStrategy strat:%d", strategy);
         sDeviceLogger.log(new AudioEventLogger.StringEvent(logString).printLog(TAG));
 
-        final int status = mDeviceBroker.removePreferredDeviceForStrategySync(strategy);
+        final int status = mDeviceBroker.removePreferredDevicesForStrategySync(strategy);
         if (status != AudioSystem.SUCCESS) {
             Log.e(TAG, String.format("Error %d in %s)", status, logString));
         }
         return status;
     }
 
-    /** @see AudioManager#getPreferredDeviceForStrategy(AudioProductStrategy) */
-    public AudioDeviceAttributes getPreferredDeviceForStrategy(int strategy) {
+    /**
+     * @see AudioManager#getPreferredDeviceForStrategy(AudioProductStrategy)
+     * @see AudioManager#getPreferredDevicesForStrategy(AudioProductStrategy)
+     */
+    public List<AudioDeviceAttributes> getPreferredDevicesForStrategy(int strategy) {
         enforceModifyAudioRoutingPermission();
-        AudioDeviceAttributes[] devices = new AudioDeviceAttributes[1];
+        List<AudioDeviceAttributes> devices = new ArrayList<>();
         final long identity = Binder.clearCallingIdentity();
-        final int status = AudioSystem.getPreferredDeviceForStrategy(strategy, devices);
+        final int status = AudioSystem.getDevicesForRoleAndStrategy(
+                strategy, AudioSystem.DEVICE_ROLE_PREFERRED, devices);
         Binder.restoreCallingIdentity(identity);
         if (status != AudioSystem.SUCCESS) {
             Log.e(TAG, String.format("Error %d in getPreferredDeviceForStrategy(%d)",
                     status, strategy));
-            return null;
+            return new ArrayList<AudioDeviceAttributes>();
         } else {
-            return devices[0];
+            return devices;
         }
     }
 
-    /** @see AudioManager#addOnPreferredDeviceForStrategyChangedListener(Executor, AudioManager.OnPreferredDeviceForStrategyChangedListener) */
-    public void registerStrategyPreferredDeviceDispatcher(
-            @Nullable IStrategyPreferredDeviceDispatcher dispatcher) {
+    /** @see AudioManager#addOnPreferredDevicesForStrategyChangedListener(
+     *               Executor, AudioManager.OnPreferredDevicesForStrategyChangedListener)
+     */
+    public void registerStrategyPreferredDevicesDispatcher(
+            @Nullable IStrategyPreferredDevicesDispatcher dispatcher) {
         if (dispatcher == null) {
             return;
         }
         enforceModifyAudioRoutingPermission();
-        mDeviceBroker.registerStrategyPreferredDeviceDispatcher(dispatcher);
+        mDeviceBroker.registerStrategyPreferredDevicesDispatcher(dispatcher);
     }
 
-    /** @see AudioManager#removeOnPreferredDeviceForStrategyChangedListener(AudioManager.OnPreferredDeviceForStrategyChangedListener) */
-    public void unregisterStrategyPreferredDeviceDispatcher(
-            @Nullable IStrategyPreferredDeviceDispatcher dispatcher) {
+    /** @see AudioManager#removeOnPreferredDevicesForStrategyChangedListener(
+     *               AudioManager.OnPreferredDevicesForStrategyChangedListener)
+     */
+    public void unregisterStrategyPreferredDevicesDispatcher(
+            @Nullable IStrategyPreferredDevicesDispatcher dispatcher) {
         if (dispatcher == null) {
             return;
         }
         enforceModifyAudioRoutingPermission();
-        mDeviceBroker.unregisterStrategyPreferredDeviceDispatcher(dispatcher);
+        mDeviceBroker.unregisterStrategyPreferredDevicesDispatcher(dispatcher);
+    }
+
+    /**
+     * @see AudioManager#setPreferredDeviceForCapturePreset(int, AudioDeviceAttributes)
+     */
+    public int setPreferredDevicesForCapturePreset(
+            int capturePreset, List<AudioDeviceAttributes> devices) {
+        if (devices == null) {
+            return AudioSystem.ERROR;
+        }
+        enforceModifyAudioRoutingPermission();
+        final String logString = String.format(
+                "setPreferredDevicesForCapturePreset u/pid:%d/%d source:%d dev:%s",
+                Binder.getCallingUid(), Binder.getCallingPid(), capturePreset,
+                devices.stream().map(e -> e.toString()).collect(Collectors.joining(",")));
+        sDeviceLogger.log(new AudioEventLogger.StringEvent(logString).printLog(TAG));
+        if (devices.stream().anyMatch(device ->
+                device.getRole() == AudioDeviceAttributes.ROLE_OUTPUT)) {
+            Log.e(TAG, "Unsupported output routing in " + logString);
+            return AudioSystem.ERROR;
+        }
+
+        final int status = mDeviceBroker.setPreferredDevicesForCapturePresetSync(
+                capturePreset, devices);
+        if (status != AudioSystem.SUCCESS) {
+            Log.e(TAG, String.format("Error %d in %s)", status, logString));
+        }
+
+        return status;
+    }
+
+    /** @see AudioManager#clearPreferredDevicesForCapturePreset(int) */
+    public int clearPreferredDevicesForCapturePreset(int capturePreset) {
+        enforceModifyAudioRoutingPermission();
+        final String logString = String.format(
+                "removePreferredDeviceForCapturePreset source:%d", capturePreset);
+        sDeviceLogger.log(new AudioEventLogger.StringEvent(logString).printLog(TAG));
+
+        final int status = mDeviceBroker.clearPreferredDevicesForCapturePresetSync(capturePreset);
+        if (status != AudioSystem.SUCCESS) {
+            Log.e(TAG, String.format("Error %d in %s", status, logString));
+        }
+        return status;
+    }
+
+    /**
+     * @see AudioManager#getPreferredDevicesForCapturePreset(int)
+     */
+    public List<AudioDeviceAttributes> getPreferredDevicesForCapturePreset(int capturePreset) {
+        enforceModifyAudioRoutingPermission();
+        List<AudioDeviceAttributes> devices = new ArrayList<>();
+        final long identity = Binder.clearCallingIdentity();
+        final int status = AudioSystem.getDevicesForRoleAndCapturePreset(
+                capturePreset, AudioSystem.DEVICE_ROLE_PREFERRED, devices);
+        Binder.restoreCallingIdentity(identity);
+        if (status != AudioSystem.SUCCESS) {
+            Log.e(TAG, String.format("Error %d in getPreferredDeviceForCapturePreset(%d)",
+                    status, capturePreset));
+            return new ArrayList<AudioDeviceAttributes>();
+        } else {
+            return devices;
+        }
+    }
+
+    /**
+     * @see AudioManager#addOnPreferredDevicesForCapturePresetChangedListener(
+     *              Executor, OnPreferredDevicesForCapturePresetChangedListener)
+     */
+    public void registerCapturePresetDevicesRoleDispatcher(
+            @Nullable ICapturePresetDevicesRoleDispatcher dispatcher) {
+        if (dispatcher == null) {
+            return;
+        }
+        enforceModifyAudioRoutingPermission();
+        mDeviceBroker.registerCapturePresetDevicesRoleDispatcher(dispatcher);
+    }
+
+    /**
+     * @see AudioManager#removeOnPreferredDevicesForCapturePresetChangedListener(
+     *              AudioManager.OnPreferredDevicesForCapturePresetChangedListener)
+     */
+    public void unregisterCapturePresetDevicesRoleDispatcher(
+            @Nullable ICapturePresetDevicesRoleDispatcher dispatcher) {
+        if (dispatcher == null) {
+            return;
+        }
+        enforceModifyAudioRoutingPermission();
+        mDeviceBroker.unregisterCapturePresetDevicesRoleDispatcher(dispatcher);
     }
 
     /** @see AudioManager#getDevicesForAttributes(AudioAttributes) */
@@ -3513,7 +3693,7 @@
         final boolean ringerModeMute = ringerMode == AudioManager.RINGER_MODE_VIBRATE
                 || ringerMode == AudioManager.RINGER_MODE_SILENT;
         final boolean shouldRingSco = ringerMode == AudioManager.RINGER_MODE_VIBRATE
-                && isBluetoothScoOn();
+                && mDeviceBroker.isBluetoothScoOn();
         // Ask audio policy engine to force use Bluetooth SCO channel if needed
         final String eventSource = "muteRingerModeStreams() from u/pid:" + Binder.getCallingUid()
                 + "/" + Binder.getCallingPid();
@@ -3679,13 +3859,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;
         }
 
@@ -3697,12 +3879,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() {
@@ -3728,6 +3911,10 @@
         public String getPackage() {
             return mPackage;
         }
+
+        public boolean isPrivileged() {
+            return mIsPrivileged;
+        }
     }
 
     /** @see AudioManager#setMode(int) */
@@ -3779,18 +3966,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 + ")");
@@ -3842,7 +4030,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 {
@@ -3901,7 +4089,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,
@@ -4080,6 +4269,115 @@
         restoreDeviceVolumeBehavior();
     }
 
+    private static final int[] VALID_COMMUNICATION_DEVICE_TYPES = {
+        AudioDeviceInfo.TYPE_BUILTIN_SPEAKER,
+        AudioDeviceInfo.TYPE_BLUETOOTH_SCO,
+        AudioDeviceInfo.TYPE_WIRED_HEADSET,
+        AudioDeviceInfo.TYPE_USB_HEADSET,
+        AudioDeviceInfo.TYPE_BUILTIN_EARPIECE,
+        AudioDeviceInfo.TYPE_WIRED_HEADPHONES,
+        AudioDeviceInfo.TYPE_HEARING_AID,
+        AudioDeviceInfo.TYPE_BLE_HEADSET,
+        AudioDeviceInfo.TYPE_USB_DEVICE,
+        AudioDeviceInfo.TYPE_BLE_SPEAKER,
+        AudioDeviceInfo.TYPE_LINE_ANALOG,
+        AudioDeviceInfo.TYPE_HDMI,
+        AudioDeviceInfo.TYPE_AUX_LINE
+    };
+
+    private boolean isValidCommunicationDevice(AudioDeviceInfo device) {
+        for (int type : VALID_COMMUNICATION_DEVICE_TYPES) {
+            if (device.getType() == type) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /** @see AudioManager#setDeviceForCommunication(int) */
+    public boolean setDeviceForCommunication(IBinder cb, int portId) {
+        final int uid = Binder.getCallingUid();
+        final int pid = Binder.getCallingPid();
+
+        AudioDeviceInfo device = null;
+        if (portId != 0) {
+            device = AudioManager.getDeviceForPortId(portId, AudioManager.GET_DEVICES_OUTPUTS);
+            if (device == null) {
+                throw new IllegalArgumentException("invalid portID " + portId);
+            }
+            if (!isValidCommunicationDevice(device)) {
+                throw new IllegalArgumentException("invalid device type " + device.getType());
+            }
+        }
+        final String eventSource = new StringBuilder("setDeviceForCommunication(")
+                .append(") from u/pid:").append(uid).append("/")
+                .append(pid).toString();
+
+        int deviceType = AudioSystem.DEVICE_OUT_DEFAULT;
+        String deviceAddress = null;
+        if (device != null) {
+            deviceType = device.getPort().type();
+            deviceAddress = device.getAddress();
+        } else {
+            AudioDeviceInfo curDevice = mDeviceBroker.getDeviceForCommunication();
+            if (curDevice != null) {
+                deviceType = curDevice.getPort().type();
+                deviceAddress = curDevice.getAddress();
+            }
+        }
+        // do not log metrics if clearing communication device while no communication device
+        // was selected
+        if (deviceType != AudioSystem.DEVICE_OUT_DEFAULT) {
+            new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE
+                    + MediaMetrics.SEPARATOR + "setDeviceForCommunication")
+                    .set(MediaMetrics.Property.DEVICE,
+                            AudioSystem.getDeviceName(deviceType))
+                    .set(MediaMetrics.Property.ADDRESS, deviceAddress)
+                    .set(MediaMetrics.Property.STATE, device != null
+                            ? MediaMetrics.Value.CONNECTED : MediaMetrics.Value.DISCONNECTED)
+                    .record();
+        }
+
+        final long ident = Binder.clearCallingIdentity();
+        boolean status =
+                mDeviceBroker.setDeviceForCommunication(cb, pid, device, eventSource);
+        Binder.restoreCallingIdentity(ident);
+        return status;
+    }
+
+    /** @see AudioManager#getDeviceForCommunication() */
+    public int getDeviceForCommunication() {
+        final long ident = Binder.clearCallingIdentity();
+        AudioDeviceInfo device = mDeviceBroker.getDeviceForCommunication();
+        Binder.restoreCallingIdentity(ident);
+        if (device == null) {
+            return 0;
+        }
+        return device.getId();
+    }
+
+    /** @see AudioManager#addOnCommunicationDeviceChangedListener(
+     *               Executor, AudioManager.OnCommunicationDeviceChangedListener)
+     */
+    public void registerCommunicationDeviceDispatcher(
+            @Nullable ICommunicationDeviceDispatcher dispatcher) {
+        if (dispatcher == null) {
+            return;
+        }
+        mDeviceBroker.registerCommunicationDeviceDispatcher(dispatcher);
+    }
+
+    /** @see AudioManager#removeOnCommunicationDeviceChangedListener(
+     *               AudioManager.OnCommunicationDeviceChangedListener)
+     */
+    public void unregisterCommunicationDeviceDispatcher(
+            @Nullable ICommunicationDeviceDispatcher dispatcher) {
+        if (dispatcher == null) {
+            return;
+        }
+        mDeviceBroker.unregisterCommunicationDeviceDispatcher(dispatcher);
+    }
+
     /** @see AudioManager#setSpeakerphoneOn(boolean) */
     public void setSpeakerphoneOn(IBinder cb, boolean on) {
         if (!checkAudioSettingsPermission("setSpeakerphoneOn()")) {
@@ -4089,10 +4387,10 @@
         // for logging only
         final int uid = Binder.getCallingUid();
         final int pid = Binder.getCallingPid();
+
         final String eventSource = new StringBuilder("setSpeakerphoneOn(").append(on)
                 .append(") from u/pid:").append(uid).append("/")
                 .append(pid).toString();
-        final boolean stateChanged = mDeviceBroker.setSpeakerphoneOn(cb, pid, on, eventSource);
         new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE
                 + MediaMetrics.SEPARATOR + "setSpeakerphoneOn")
                 .setUid(uid)
@@ -4100,17 +4398,9 @@
                 .set(MediaMetrics.Property.STATE, on
                         ? MediaMetrics.Value.ON : MediaMetrics.Value.OFF)
                 .record();
-
-        if (stateChanged) {
-            final long ident = Binder.clearCallingIdentity();
-            try {
-                mContext.sendBroadcastAsUser(
-                        new Intent(AudioManager.ACTION_SPEAKERPHONE_STATE_CHANGED)
-                                .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), UserHandle.ALL);
-            } finally {
-                Binder.restoreCallingIdentity(ident);
-            }
-        }
+        final long ident = Binder.clearCallingIdentity();
+        mDeviceBroker.setSpeakerphoneOn(cb, pid, on, eventSource);
+        Binder.restoreCallingIdentity(ident);
     }
 
     /** @see AudioManager#isSpeakerphoneOn() */
@@ -4118,6 +4408,11 @@
         return mDeviceBroker.isSpeakerphoneOn();
     }
 
+
+    /** BT SCO audio state seen by apps using the deprecated API setBluetoothScoOn().
+     * @see isBluetoothScoOn() */
+    private boolean mBtScoOnByApp;
+
     /** @see AudioManager#setBluetoothScoOn(boolean) */
     public void setBluetoothScoOn(boolean on) {
         if (!checkAudioSettingsPermission("setBluetoothScoOn()")) {
@@ -4126,7 +4421,7 @@
 
         // Only enable calls from system components
         if (UserHandle.getCallingAppId() >= FIRST_APPLICATION_UID) {
-            mDeviceBroker.setBluetoothScoOnByApp(on);
+            mBtScoOnByApp = on;
             return;
         }
 
@@ -4152,7 +4447,7 @@
      * Note that it doesn't report internal state, but state seen by apps (which may have
      * called setBluetoothScoOn() */
     public boolean isBluetoothScoOn() {
-        return mDeviceBroker.isBluetoothScoOnForApp();
+        return mBtScoOnByApp || mDeviceBroker.isBluetoothScoOn();
     }
 
     // TODO investigate internal users due to deprecation of SDK API
@@ -4199,7 +4494,7 @@
                 .set(MediaMetrics.Property.SCO_AUDIO_MODE,
                         BtHelper.scoAudioModeToString(scoAudioMode))
                 .record();
-        startBluetoothScoInt(cb, scoAudioMode, eventSource);
+        startBluetoothScoInt(cb, pid, scoAudioMode, eventSource);
 
     }
 
@@ -4218,10 +4513,10 @@
                 .set(MediaMetrics.Property.SCO_AUDIO_MODE,
                         BtHelper.scoAudioModeToString(BtHelper.SCO_MODE_VIRTUAL_CALL))
                 .record();
-        startBluetoothScoInt(cb, BtHelper.SCO_MODE_VIRTUAL_CALL, eventSource);
+        startBluetoothScoInt(cb, pid, BtHelper.SCO_MODE_VIRTUAL_CALL, eventSource);
     }
 
-    void startBluetoothScoInt(IBinder cb, int scoAudioMode, @NonNull String eventSource) {
+    void startBluetoothScoInt(IBinder cb, int pid, int scoAudioMode, @NonNull String eventSource) {
         MediaMetrics.Item mmi = new MediaMetrics.Item(MediaMetrics.Name.AUDIO_BLUETOOTH)
                 .set(MediaMetrics.Property.EVENT, "startBluetoothScoInt")
                 .set(MediaMetrics.Property.SCO_AUDIO_MODE,
@@ -4232,9 +4527,9 @@
             mmi.set(MediaMetrics.Property.EARLY_RETURN, "permission or systemReady").record();
             return;
         }
-        synchronized (mDeviceBroker.mSetModeLock) {
-            mDeviceBroker.startBluetoothScoForClient_Sync(cb, scoAudioMode, eventSource);
-        }
+        final long ident = Binder.clearCallingIdentity();
+        mDeviceBroker.startBluetoothScoForClient(cb, pid, scoAudioMode, eventSource);
+        Binder.restoreCallingIdentity(ident);
         mmi.record();
     }
 
@@ -4249,9 +4544,9 @@
         final String eventSource =  new StringBuilder("stopBluetoothSco()")
                 .append(") from u/pid:").append(uid).append("/")
                 .append(pid).toString();
-        synchronized (mDeviceBroker.mSetModeLock) {
-            mDeviceBroker.stopBluetoothScoForClient_Sync(cb, eventSource);
-        }
+        final long ident = Binder.clearCallingIdentity();
+        mDeviceBroker.stopBluetoothScoForClient(cb, pid, eventSource);
+        Binder.restoreCallingIdentity(ident);
         new MediaMetrics.Item(MediaMetrics.Name.AUDIO_BLUETOOTH)
                 .setUid(uid)
                 .setPid(pid)
@@ -4677,8 +4972,7 @@
         switch (mPlatformType) {
         case AudioSystem.PLATFORM_VOICE:
             if (isInCommunication()) {
-                if (AudioSystem.getForceUse(AudioSystem.FOR_COMMUNICATION)
-                        == AudioSystem.FORCE_BT_SCO) {
+                if (mDeviceBroker.isBluetoothScoOn()) {
                     // Log.v(TAG, "getActiveStreamType: Forcing STREAM_BLUETOOTH_SCO...");
                     return AudioSystem.STREAM_BLUETOOTH_SCO;
                 } else {
@@ -4714,8 +5008,7 @@
             }
         default:
             if (isInCommunication()) {
-                if (AudioSystem.getForceUse(AudioSystem.FOR_COMMUNICATION)
-                        == AudioSystem.FORCE_BT_SCO) {
+                if (mDeviceBroker.isBluetoothScoOn()) {
                     if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: Forcing STREAM_BLUETOOTH_SCO");
                     return AudioSystem.STREAM_BLUETOOTH_SCO;
                 } else {
@@ -5569,7 +5862,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);
@@ -6400,14 +6701,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,
@@ -6418,11 +6722,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;
             }
         }
     }
@@ -7353,12 +7661,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))");
 
@@ -7435,6 +7747,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), "  ");
@@ -7465,6 +7778,7 @@
         pw.print("  mHasVibrator="); pw.println(mHasVibrator);
         pw.print("  mVolumePolicy="); pw.println(mVolumePolicy);
         pw.print("  mAvrcpAbsVolSupported="); pw.println(mAvrcpAbsVolSupported);
+        pw.print("  mBtScoOnByApp="); pw.println(mBtScoOnByApp);
         pw.print("  mIsSingleVolume="); pw.println(mIsSingleVolume);
         pw.print("  mUseFixedVolume="); pw.println(mUseFixedVolume);
         pw.print("  mFixedVolumeDevices="); pw.println(dumpDeviceTypes(mFixedVolumeDevices));
diff --git a/services/core/java/com/android/server/audio/AudioSystemAdapter.java b/services/core/java/com/android/server/audio/AudioSystemAdapter.java
index e60243f..ae64990 100644
--- a/services/core/java/com/android/server/audio/AudioSystemAdapter.java
+++ b/services/core/java/com/android/server/audio/AudioSystemAdapter.java
@@ -20,6 +20,8 @@
 import android.media.AudioDeviceAttributes;
 import android.media.AudioSystem;
 
+import java.util.List;
+
 /**
  * Provides an adapter to access functionality of the android.media.AudioSystem class for device
  * related functionality.
@@ -77,22 +79,59 @@
     }
 
     /**
-     * Same as {@link AudioSystem#setPreferredDeviceForStrategy(int, AudioDeviceAttributes)}
+     * Same as {@link AudioSystem#setDevicesRoleForStrategy(int, int, List)}
      * @param strategy
-     * @param device
+     * @param role
+     * @param devices
      * @return
      */
-    public int setPreferredDeviceForStrategy(int strategy, @NonNull AudioDeviceAttributes device) {
-        return AudioSystem.setPreferredDeviceForStrategy(strategy, device);
+    public int setDevicesRoleForStrategy(int strategy, int role,
+                                         @NonNull List<AudioDeviceAttributes> devices) {
+        return AudioSystem.setDevicesRoleForStrategy(strategy, role, devices);
     }
 
     /**
-     * Same as {@link AudioSystem#removePreferredDeviceForStrategy(int)}
+     * Same as {@link AudioSystem#removeDevicesRoleForStrategy(int, int)}
      * @param strategy
+     * @param role
      * @return
      */
-    public int removePreferredDeviceForStrategy(int strategy) {
-        return AudioSystem.removePreferredDeviceForStrategy(strategy);
+    public int removeDevicesRoleForStrategy(int strategy, int role) {
+        return AudioSystem.removeDevicesRoleForStrategy(strategy, role);
+    }
+
+    /**
+     * Same as (@link AudioSystem#setDevicesRoleForCapturePreset(int, List))
+     * @param capturePreset
+     * @param role
+     * @param devices
+     * @return
+     */
+    public int setDevicesRoleForCapturePreset(int capturePreset, int role,
+                                              @NonNull List<AudioDeviceAttributes> devices) {
+        return AudioSystem.setDevicesRoleForCapturePreset(capturePreset, role, devices);
+    }
+
+    /**
+     * Same as {@link AudioSystem#removeDevicesRoleForCapturePreset(int, int)}
+     * @param capturePreset
+     * @param role
+     * @param devicesToRemove
+     * @return
+     */
+    public int removeDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devicesToRemove) {
+        return AudioSystem.removeDevicesRoleForCapturePreset(capturePreset, role, devicesToRemove);
+    }
+
+    /**
+     * Same as {@link AudioSystem#}
+     * @param capturePreset
+     * @param role
+     * @return
+     */
+    public int clearDevicesRoleForCapturePreset(int capturePreset, int role) {
+        return AudioSystem.clearDevicesRoleForCapturePreset(capturePreset, role);
     }
 
     /**
diff --git a/services/core/java/com/android/server/audio/BtHelper.java b/services/core/java/com/android/server/audio/BtHelper.java
index b4c41b2..c9a1fcf 100644
--- a/services/core/java/com/android/server/audio/BtHelper.java
+++ b/services/core/java/com/android/server/audio/BtHelper.java
@@ -27,11 +27,10 @@
 import android.bluetooth.BluetoothHearingAid;
 import android.bluetooth.BluetoothProfile;
 import android.content.Intent;
+import android.media.AudioDeviceAttributes;
 import android.media.AudioManager;
 import android.media.AudioSystem;
 import android.os.Binder;
-import android.os.IBinder;
-import android.os.RemoteException;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.util.Log;
@@ -39,9 +38,7 @@
 import com.android.internal.annotations.GuardedBy;
 
 import java.io.PrintWriter;
-import java.util.ArrayList;
 import java.util.List;
-import java.util.NoSuchElementException;
 import java.util.Objects;
 
 /**
@@ -58,10 +55,6 @@
         mDeviceBroker = broker;
     }
 
-    // List of clients having issued a SCO start request
-    @GuardedBy("BtHelper.this")
-    private final @NonNull ArrayList<ScoClient> mScoClients = new ArrayList<ScoClient>();
-
     // BluetoothHeadset API to control SCO connection
     private @Nullable BluetoothHeadset mBluetoothHeadset;
 
@@ -301,6 +294,8 @@
     @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
     /*package*/ synchronized void receiveBtEvent(Intent intent) {
         final String action = intent.getAction();
+
+        Log.i(TAG, "receiveBtEvent action: " + action + " mScoAudioState: " + mScoAudioState);
         if (action.equals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) {
             BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
             setBtScoActiveDevice(btDevice);
@@ -308,20 +303,16 @@
             boolean broadcast = false;
             int scoAudioState = AudioManager.SCO_AUDIO_STATE_ERROR;
             int btState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
-            // broadcast intent if the connection was initated by AudioService
-            if (!mScoClients.isEmpty()
-                    && (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL
-                    || mScoAudioState == SCO_STATE_ACTIVATE_REQ
-                    || mScoAudioState == SCO_STATE_DEACTIVATE_REQ
-                    || mScoAudioState == SCO_STATE_DEACTIVATING)) {
-                broadcast = true;
-            }
+            Log.i(TAG, "receiveBtEvent ACTION_AUDIO_STATE_CHANGED: " + btState);
             switch (btState) {
                 case BluetoothHeadset.STATE_AUDIO_CONNECTED:
                     scoAudioState = AudioManager.SCO_AUDIO_STATE_CONNECTED;
                     if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL
                             && mScoAudioState != SCO_STATE_DEACTIVATE_REQ) {
                         mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+                    } else if (mDeviceBroker.isBluetoothScoRequested()) {
+                        // broadcast intent if the connection was initated by AudioService
+                        broadcast = true;
                     }
                     mDeviceBroker.setBluetoothScoOn(true, "BtHelper.receiveBtEvent");
                     break;
@@ -333,21 +324,21 @@
                     // notified by requestScoState() setting state to SCO_STATE_ACTIVATE_REQ.
                     // 2) If audio was connected then disconnected via Bluetooth APIs and
                     // we still have pending activation requests by apps: this is indicated by
-                    // state SCO_STATE_ACTIVE_EXTERNAL and the mScoClients list not empty.
+                    // state SCO_STATE_ACTIVE_EXTERNAL and BT SCO is requested.
                     if (mScoAudioState == SCO_STATE_ACTIVATE_REQ
                             || (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL
-                                    && !mScoClients.isEmpty())) {
+                                    && mDeviceBroker.isBluetoothScoRequested())) {
                         if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null
                                 && connectBluetoothScoAudioHelper(mBluetoothHeadset,
                                 mBluetoothHeadsetDevice, mScoAudioMode)) {
                             mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
-                            broadcast = false;
+                            scoAudioState = AudioManager.SCO_AUDIO_STATE_CONNECTING;
+                            broadcast = true;
                             break;
                         }
                     }
-                    // Tear down SCO if disconnected from external
-                    if (mScoAudioState == SCO_STATE_DEACTIVATING) {
-                        clearAllScoClients(0, false);
+                    if (mScoAudioState != SCO_STATE_ACTIVE_EXTERNAL) {
+                        broadcast = true;
                     }
                     mScoAudioState = SCO_STATE_INACTIVE;
                     break;
@@ -356,11 +347,8 @@
                             && mScoAudioState != SCO_STATE_DEACTIVATE_REQ) {
                         mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
                     }
-                    broadcast = false;
                     break;
                 default:
-                    // do not broadcast CONNECTING or invalid state
-                    broadcast = false;
                     break;
             }
             if (broadcast) {
@@ -386,66 +374,21 @@
                 == BluetoothHeadset.STATE_AUDIO_CONNECTED;
     }
 
-    /**
-     * Disconnect all SCO connections started by {@link AudioManager} except those started by
-     * {@param exceptPid}
-     *
-     * @param exceptPid pid whose SCO connections through {@link AudioManager} should be kept
-     */
     // @GuardedBy("AudioDeviceBroker.mSetModeLock")
     @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-    /*package*/ synchronized void disconnectBluetoothSco(int exceptPid) {
-        checkScoAudioState();
-        if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL) {
-            return;
-        }
-        clearAllScoClients(exceptPid, true);
-    }
-
-    // @GuardedBy("AudioDeviceBroker.mSetModeLock")
-    @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-    /*package*/ synchronized void startBluetoothScoForClient(IBinder cb, int scoAudioMode,
+    /*package*/ synchronized boolean startBluetoothSco(int scoAudioMode,
                 @NonNull String eventSource) {
-        ScoClient client = getScoClient(cb, true);
-        // The calling identity must be cleared before calling ScoClient.incCount().
-        // inCount() calls requestScoState() which in turn can call BluetoothHeadset APIs
-        // and this must be done on behalf of system server to make sure permissions are granted.
-        // The caller identity must be cleared after getScoClient() because it is needed if a new
-        // client is created.
-        final long ident = Binder.clearCallingIdentity();
-        try {
-            AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(eventSource));
-            client.requestScoState(BluetoothHeadset.STATE_AUDIO_CONNECTED, scoAudioMode);
-        } catch (NullPointerException e) {
-            Log.e(TAG, "Null ScoClient", e);
-        }
-        Binder.restoreCallingIdentity(ident);
+        AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(eventSource));
+        return requestScoState(BluetoothHeadset.STATE_AUDIO_CONNECTED, scoAudioMode);
     }
 
     // @GuardedBy("AudioDeviceBroker.mSetModeLock")
     @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-    /*package*/ synchronized void stopBluetoothScoForClient(IBinder cb,
-            @NonNull String eventSource) {
-        ScoClient client = getScoClient(cb, false);
-        // The calling identity must be cleared before calling ScoClient.decCount().
-        // decCount() calls requestScoState() which in turn can call BluetoothHeadset APIs
-        // 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*/);
-            }
-        }
-        Binder.restoreCallingIdentity(ident);
+    /*package*/ synchronized boolean stopBluetoothSco(@NonNull String eventSource) {
+        AudioService.sDeviceLogger.log(new AudioEventLogger.StringEvent(eventSource));
+        return requestScoState(BluetoothHeadset.STATE_AUDIO_DISCONNECTED, SCO_MODE_VIRTUAL_CALL);
     }
 
-
     /*package*/ synchronized void setHearingAidVolume(int index, int streamType) {
         if (mHearingAid == null) {
             if (AudioService.DEBUG_VOL) {
@@ -490,7 +433,6 @@
     // @GuardedBy("AudioDeviceBroker.mSetModeLock")
     @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
     /*package*/ synchronized void resetBluetoothSco() {
-        clearAllScoClients(0, false);
         mScoAudioState = SCO_STATE_INACTIVE;
         broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
         AudioSystem.setParameters("A2dpSuspended=false");
@@ -589,46 +531,64 @@
         mDeviceBroker.postBroadcastScoConnectionState(state);
     }
 
-    private boolean handleBtScoActiveDeviceChange(BluetoothDevice btDevice, boolean isActive) {
-        if (btDevice == null) {
-            return true;
+    @Nullable AudioDeviceAttributes getHeadsetAudioDevice() {
+        if (mBluetoothHeadsetDevice == null) {
+            return null;
         }
+        return btHeadsetDeviceToAudioDevice(mBluetoothHeadsetDevice);
+    }
+
+    private AudioDeviceAttributes btHeadsetDeviceToAudioDevice(BluetoothDevice btDevice) {
         String address = btDevice.getAddress();
+        if (!BluetoothAdapter.checkBluetoothAddress(address)) {
+            address = "";
+        }
         BluetoothClass btClass = btDevice.getBluetoothClass();
-        int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
-        int[] outDeviceTypes = {
-                AudioSystem.DEVICE_OUT_BLUETOOTH_SCO,
-                AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET,
-                AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT
-        };
+        int nativeType = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO;
         if (btClass != null) {
             switch (btClass.getDeviceClass()) {
                 case BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET:
                 case BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE:
-                    outDeviceTypes = new int[] { AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET };
+                    nativeType = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET;
                     break;
                 case BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO:
-                    outDeviceTypes = new int[] { AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT };
+                    nativeType = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
                     break;
             }
         }
-        if (!BluetoothAdapter.checkBluetoothAddress(address)) {
-            address = "";
+        if (AudioService.DEBUG_DEVICES) {
+            Log.i(TAG, "btHeadsetDeviceToAudioDevice btDevice: " + btDevice
+                    + " btClass: " + (btClass == null ? "Unknown" : btClass)
+                    + " nativeType: " + nativeType + " address: " + address);
         }
+        return new AudioDeviceAttributes(nativeType, address);
+    }
+
+    private boolean handleBtScoActiveDeviceChange(BluetoothDevice btDevice, boolean isActive) {
+        if (btDevice == null) {
+            return true;
+        }
+        int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET;
+        AudioDeviceAttributes audioDevice =  btHeadsetDeviceToAudioDevice(btDevice);
         String btDeviceName =  getName(btDevice);
         boolean result = false;
         if (isActive) {
-            result |= mDeviceBroker.handleDeviceConnection(
-                    isActive, outDeviceTypes[0], address, btDeviceName);
+            result |= mDeviceBroker.handleDeviceConnection(isActive, audioDevice.getInternalType(),
+                    audioDevice.getAddress(), btDeviceName);
         } else {
+            int[] outDeviceTypes = {
+                    AudioSystem.DEVICE_OUT_BLUETOOTH_SCO,
+                    AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_HEADSET,
+                    AudioSystem.DEVICE_OUT_BLUETOOTH_SCO_CARKIT
+            };
             for (int outDeviceType : outDeviceTypes) {
                 result |= mDeviceBroker.handleDeviceConnection(
-                        isActive, outDeviceType, address, btDeviceName);
+                        isActive, outDeviceType, audioDevice.getAddress(), btDeviceName);
             }
         }
         // handleDeviceConnection() && result to make sure the method get executed
         result = mDeviceBroker.handleDeviceConnection(
-                isActive, inDevice, address, btDeviceName) && result;
+                isActive, inDevice, audioDevice.getAddress(), btDeviceName) && result;
         return result;
     }
 
@@ -716,195 +676,122 @@
             };
 
     //----------------------------------------------------------------------
+
     // @GuardedBy("AudioDeviceBroker.mSetModeLock")
-    @GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-    /*package*/ synchronized void scoClientDied(Object obj) {
-        final ScoClient client = (ScoClient) obj;
-        client.remove(true /*stop*/, false /*unregister*/);
-        Log.w(TAG, "SCO client died");
-    }
-
-    private class ScoClient implements IBinder.DeathRecipient {
-        private IBinder mCb; // To be notified of client's death
-        private int mCreatorPid;
-
-        ScoClient(IBinder cb) {
-            mCb = cb;
-            mCreatorPid = Binder.getCallingPid();
-        }
-
-        public void registerDeathRecipient() {
-            try {
-                mCb.linkToDeath(this, 0);
-            } catch (RemoteException e) {
-                Log.w(TAG, "ScoClient could not link to " + mCb + " binder death");
-            }
-        }
-
-        public void unregisterDeathRecipient() {
-            try {
-                mCb.unlinkToDeath(this, 0);
-            } catch (NoSuchElementException e) {
-                Log.w(TAG, "ScoClient could not not unregistered to binder");
-            }
-        }
-
-        @Override
-        public void binderDied() {
-            // process this from DeviceBroker's message queue to take the right locks since
-            // this event can impact SCO mode and requires querying audio mode stack
-            mDeviceBroker.postScoClientDied(this);
-        }
-
-        IBinder getBinder() {
-            return mCb;
-        }
-
-        int getPid() {
-            return mCreatorPid;
-        }
-
-        // @GuardedBy("AudioDeviceBroker.mSetModeLock")
-        //@GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-        @GuardedBy("BtHelper.this")
-        private boolean requestScoState(int state, int scoAudioMode) {
-            checkScoAudioState();
-            if (mScoClients.size() != 1) {
-                Log.i(TAG, "requestScoState: state=" + state + ", scoAudioMode=" + scoAudioMode
-                        + ", num SCO clients=" + mScoClients.size());
-                return true;
-            }
-            if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
-                // Make sure that the state transitions to CONNECTING even if we cannot initiate
-                // the connection.
-                broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING);
-                // Accept SCO audio activation only in NORMAL audio mode or if the mode is
-                // currently controlled by the same client process.
-                final int modeOwnerPid =  mDeviceBroker.getModeOwnerPid();
-                if (modeOwnerPid != 0 && (modeOwnerPid != mCreatorPid)) {
-                    Log.w(TAG, "requestScoState: audio mode is not NORMAL and modeOwnerPid "
-                            + modeOwnerPid + " != creatorPid " + mCreatorPid);
+    //@GuardedBy("AudioDeviceBroker.mDeviceStateLock")
+    @GuardedBy("BtHelper.this")
+    private boolean requestScoState(int state, int scoAudioMode) {
+        checkScoAudioState();
+        if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
+            // Make sure that the state transitions to CONNECTING even if we cannot initiate
+            // the connection.
+            broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING);
+            switch (mScoAudioState) {
+                case SCO_STATE_INACTIVE:
+                    mScoAudioMode = scoAudioMode;
+                    if (scoAudioMode == SCO_MODE_UNDEFINED) {
+                        mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+                        if (mBluetoothHeadsetDevice != null) {
+                            mScoAudioMode = Settings.Global.getInt(
+                                    mDeviceBroker.getContentResolver(),
+                                    "bluetooth_sco_channel_"
+                                            + mBluetoothHeadsetDevice.getAddress(),
+                                    SCO_MODE_VIRTUAL_CALL);
+                            if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
+                                mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
+                            }
+                        }
+                    }
+                    if (mBluetoothHeadset == null) {
+                        if (getBluetoothHeadset()) {
+                            mScoAudioState = SCO_STATE_ACTIVATE_REQ;
+                        } else {
+                            Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
+                                    + " connection, mScoAudioMode=" + mScoAudioMode);
+                            broadcastScoConnectionState(
+                                    AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                            return false;
+                        }
+                        break;
+                    }
+                    if (mBluetoothHeadsetDevice == null) {
+                        Log.w(TAG, "requestScoState: no active device while connecting,"
+                                + " mScoAudioMode=" + mScoAudioMode);
+                        broadcastScoConnectionState(
+                                AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                        return false;
+                    }
+                    if (connectBluetoothScoAudioHelper(mBluetoothHeadset,
+                            mBluetoothHeadsetDevice, mScoAudioMode)) {
+                        mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+                    } else {
+                        Log.w(TAG, "requestScoState: connect to "
+                                + mBluetoothHeadsetDevice
+                                + " failed, mScoAudioMode=" + mScoAudioMode);
+                        broadcastScoConnectionState(
+                                AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                        return false;
+                    }
+                    break;
+                case SCO_STATE_DEACTIVATING:
+                    mScoAudioState = SCO_STATE_ACTIVATE_REQ;
+                    break;
+                case SCO_STATE_DEACTIVATE_REQ:
+                    mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+                    broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTED);
+                    break;
+                case SCO_STATE_ACTIVE_INTERNAL:
+                    Log.w(TAG, "requestScoState: already in ACTIVE mode, simply return");
+                    break;
+                default:
+                    Log.w(TAG, "requestScoState: failed to connect in state "
+                            + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
                     broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
                     return false;
-                }
-                switch (mScoAudioState) {
-                    case SCO_STATE_INACTIVE:
-                        mScoAudioMode = scoAudioMode;
-                        if (scoAudioMode == SCO_MODE_UNDEFINED) {
-                            mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
-                            if (mBluetoothHeadsetDevice != null) {
-                                mScoAudioMode = Settings.Global.getInt(
-                                        mDeviceBroker.getContentResolver(),
-                                        "bluetooth_sco_channel_"
-                                                + mBluetoothHeadsetDevice.getAddress(),
-                                        SCO_MODE_VIRTUAL_CALL);
-                                if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
-                                    mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
-                                }
-                            }
-                        }
-                        if (mBluetoothHeadset == null) {
-                            if (getBluetoothHeadset()) {
-                                mScoAudioState = SCO_STATE_ACTIVATE_REQ;
-                            } else {
-                                Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
-                                        + " connection, mScoAudioMode=" + mScoAudioMode);
-                                broadcastScoConnectionState(
-                                        AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                                return false;
-                            }
-                            break;
-                        }
-                        if (mBluetoothHeadsetDevice == null) {
-                            Log.w(TAG, "requestScoState: no active device while connecting,"
-                                    + " mScoAudioMode=" + mScoAudioMode);
-                            broadcastScoConnectionState(
-                                    AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                            return false;
-                        }
-                        if (connectBluetoothScoAudioHelper(mBluetoothHeadset,
-                                mBluetoothHeadsetDevice, mScoAudioMode)) {
-                            mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+            }
+        } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
+            switch (mScoAudioState) {
+                case SCO_STATE_ACTIVE_INTERNAL:
+                    if (mBluetoothHeadset == null) {
+                        if (getBluetoothHeadset()) {
+                            mScoAudioState = SCO_STATE_DEACTIVATE_REQ;
                         } else {
-                            Log.w(TAG, "requestScoState: connect to " + mBluetoothHeadsetDevice
-                                    + " failed, mScoAudioMode=" + mScoAudioMode);
+                            Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
+                                    + " disconnection, mScoAudioMode=" + mScoAudioMode);
+                            mScoAudioState = SCO_STATE_INACTIVE;
                             broadcastScoConnectionState(
                                     AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
                             return false;
                         }
                         break;
-                    case SCO_STATE_DEACTIVATING:
-                        mScoAudioState = SCO_STATE_ACTIVATE_REQ;
-                        break;
-                    case SCO_STATE_DEACTIVATE_REQ:
-                        mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
-                        broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTED);
-                        break;
-                    case SCO_STATE_ACTIVE_INTERNAL:
-                        Log.w(TAG, "requestScoState: already in ACTIVE mode, simply return");
-                        break;
-                    default:
-                        Log.w(TAG, "requestScoState: failed to connect in state "
-                                + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
-                        broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                        return false;
-                }
-            } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
-                switch (mScoAudioState) {
-                    case SCO_STATE_ACTIVE_INTERNAL:
-                        if (mBluetoothHeadset == null) {
-                            if (getBluetoothHeadset()) {
-                                mScoAudioState = SCO_STATE_DEACTIVATE_REQ;
-                            } else {
-                                Log.w(TAG, "requestScoState: getBluetoothHeadset failed during"
-                                        + " disconnection, mScoAudioMode=" + mScoAudioMode);
-                                mScoAudioState = SCO_STATE_INACTIVE;
-                                broadcastScoConnectionState(
-                                        AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                                return false;
-                            }
-                            break;
-                        }
-                        if (mBluetoothHeadsetDevice == null) {
-                            mScoAudioState = SCO_STATE_INACTIVE;
-                            broadcastScoConnectionState(
-                                    AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                            break;
-                        }
-                        if (disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
-                                mBluetoothHeadsetDevice, mScoAudioMode)) {
-                            mScoAudioState = SCO_STATE_DEACTIVATING;
-                        } else {
-                            mScoAudioState = SCO_STATE_INACTIVE;
-                            broadcastScoConnectionState(
-                                    AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                        }
-                        break;
-                    case SCO_STATE_ACTIVATE_REQ:
+                    }
+                    if (mBluetoothHeadsetDevice == null) {
                         mScoAudioState = SCO_STATE_INACTIVE;
-                        broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                        broadcastScoConnectionState(
+                                AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
                         break;
-                    default:
-                        Log.w(TAG, "requestScoState: failed to disconnect in state "
-                                + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
-                        broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                        return false;
-                }
+                    }
+                    if (disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                            mBluetoothHeadsetDevice, mScoAudioMode)) {
+                        mScoAudioState = SCO_STATE_DEACTIVATING;
+                    } else {
+                        mScoAudioState = SCO_STATE_INACTIVE;
+                        broadcastScoConnectionState(
+                                AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                    }
+                    break;
+                case SCO_STATE_ACTIVATE_REQ:
+                    mScoAudioState = SCO_STATE_INACTIVE;
+                    broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                    break;
+                default:
+                    Log.w(TAG, "requestScoState: failed to disconnect in state "
+                            + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
+                    broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                    return false;
             }
-            return true;
         }
-
-        @GuardedBy("BtHelper.this")
-        void remove(boolean stop, boolean unregister) {
-            if (unregister) {
-                unregisterDeathRecipient();
-            }
-            if (stop) {
-                requestScoState(BluetoothHeadset.STATE_AUDIO_DISCONNECTED,
-                        SCO_MODE_VIRTUAL_CALL);
-            }
-            mScoClients.remove(this);
-        }
+        return true;
     }
 
     //-----------------------------------------------------
@@ -957,39 +844,6 @@
         }
     }
 
-
-    @GuardedBy("BtHelper.this")
-    private ScoClient getScoClient(IBinder cb, boolean create) {
-        for (ScoClient existingClient : mScoClients) {
-            if (existingClient.getBinder() == cb) {
-                return existingClient;
-            }
-        }
-        if (create) {
-            ScoClient newClient = new ScoClient(cb);
-            newClient.registerDeathRecipient();
-            mScoClients.add(newClient);
-            return newClient;
-        }
-        return null;
-    }
-
-    // @GuardedBy("AudioDeviceBroker.mSetModeLock")
-    //@GuardedBy("AudioDeviceBroker.mDeviceStateLock")
-    @GuardedBy("BtHelper.this")
-    private void clearAllScoClients(int exceptPid, boolean stopSco) {
-        final ArrayList<ScoClient> clients = new ArrayList<ScoClient>();
-        for (ScoClient cl : mScoClients) {
-            if (cl.getPid() != exceptPid) {
-                clients.add(cl);
-            }
-        }
-        for (ScoClient cl : clients) {
-            cl.remove(stopSco, true /*unregister*/);
-        }
-
-    }
-
     private boolean getBluetoothHeadset() {
         boolean result = false;
         BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
@@ -1035,10 +889,6 @@
         pw.println(prefix + "mBluetoothHeadsetDevice: " + mBluetoothHeadsetDevice);
         pw.println(prefix + "mScoAudioState: " + scoAudioStateToString(mScoAudioState));
         pw.println(prefix + "mScoAudioMode: " + scoAudioModeToString(mScoAudioMode));
-        pw.println(prefix + "Sco clients:");
-        mScoClients.forEach((cl) -> {
-            pw.println("  " + prefix + "pid: " + cl.getPid() + " cb: " + cl.getBinder()); });
-
         pw.println("\n" + prefix + "mHearingAid: " + mHearingAid);
         pw.println(prefix + "mA2dp: " + mA2dp);
         pw.println(prefix + "mAvrcpAbsVolSupported: " + mAvrcpAbsVolSupported);
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/compat/CompatChange.java b/services/core/java/com/android/server/compat/CompatChange.java
index ff31931..a8aa9aa 100644
--- a/services/core/java/com/android/server/compat/CompatChange.java
+++ b/services/core/java/com/android/server/compat/CompatChange.java
@@ -143,6 +143,9 @@
      * @return {@code true} if the change should be enabled for the package.
      */
     boolean isEnabled(ApplicationInfo app) {
+        if (app == null) {
+            return defaultValue();
+        }
         if (mPackageOverrides != null && mPackageOverrides.containsKey(app.packageName)) {
             return mPackageOverrides.get(app.packageName);
         }
@@ -156,6 +159,15 @@
     }
 
     /**
+     * Returns the default value for the change id, assuming there are no overrides.
+     *
+     * @return {@code false} if it's a default disabled change, {@code true} otherwise.
+     */
+    boolean defaultValue() {
+        return !getDisabled();
+    }
+
+    /**
      * Checks whether a change has an override for a package.
      * @param packageName name of the package
      * @return true if there is such override
diff --git a/services/core/java/com/android/server/compat/CompatConfig.java b/services/core/java/com/android/server/compat/CompatConfig.java
index d80c58b..8511118 100644
--- a/services/core/java/com/android/server/compat/CompatConfig.java
+++ b/services/core/java/com/android/server/compat/CompatConfig.java
@@ -392,6 +392,14 @@
         return alreadyKnown;
     }
 
+    boolean defaultChangeIdValue(long changeId) {
+        CompatChange c = mChanges.get(changeId);
+        if (c == null) {
+            return true;
+        }
+        return c.defaultValue();
+    }
+
     @VisibleForTesting
     void clearChanges() {
         synchronized (mChanges) {
diff --git a/services/core/java/com/android/server/compat/PlatformCompat.java b/services/core/java/com/android/server/compat/PlatformCompat.java
index 2c19a2d..aa85f7f 100644
--- a/services/core/java/com/android/server/compat/PlatformCompat.java
+++ b/services/core/java/com/android/server/compat/PlatformCompat.java
@@ -60,7 +60,6 @@
     private final CompatConfig mCompatConfig;
 
     private static int sMinTargetSdk = Build.VERSION_CODES.Q;
-    private static int sMaxTargetSdk = Build.VERSION_CODES.R;
 
     public PlatformCompat(Context context) {
         mContext = context;
@@ -107,17 +106,25 @@
     }
 
     /**
-     * Internal version of the above method. Does not perform costly permission check.
+     * Internal version of the above method, without logging. Does not perform costly permission
+     * check.
+     * TODO(b/167551701): Remove this method and add 'loggability' as a changeid property.
+     */
+    public boolean isChangeEnabledInternalNoLogging(long changeId, ApplicationInfo appInfo) {
+        return mCompatConfig.isChangeEnabled(changeId, appInfo);
+    }
+
+    /**
+     * Internal version of {@link #isChangeEnabled(long, ApplicationInfo)}. Does not perform costly
+     * permission check.
      */
     public boolean isChangeEnabledInternal(long changeId, ApplicationInfo appInfo) {
-        if (mCompatConfig.isChangeEnabled(changeId, appInfo)) {
+        boolean enabled = isChangeEnabledInternalNoLogging(changeId, appInfo);
+        if (appInfo != null) {
             reportChange(changeId, appInfo.uid,
-                    ChangeReporter.STATE_ENABLED);
-            return true;
+                    enabled ? ChangeReporter.STATE_ENABLED : ChangeReporter.STATE_DISABLED);
         }
-        reportChange(changeId, appInfo.uid,
-                ChangeReporter.STATE_DISABLED);
-        return false;
+        return enabled;
     }
 
     @Override
@@ -125,9 +132,6 @@
             @UserIdInt int userId) {
         checkCompatChangeReadAndLogPermission();
         ApplicationInfo appInfo = getApplicationInfo(packageName, userId);
-        if (appInfo == null) {
-            return true;
-        }
         return isChangeEnabled(changeId, appInfo);
     }
 
@@ -136,7 +140,7 @@
         checkCompatChangeReadAndLogPermission();
         String[] packages = mContext.getPackageManager().getPackagesForUid(uid);
         if (packages == null || packages.length == 0) {
-            return true;
+            return mCompatConfig.defaultChangeIdValue(changeId);
         }
         boolean enabled = true;
         for (String packageName : packages) {
@@ -379,8 +383,7 @@
             return false;
         }
         if (change.getEnableSinceTargetSdk() > 0) {
-            if (change.getEnableSinceTargetSdk() < sMinTargetSdk
-                    || change.getEnableSinceTargetSdk() > sMaxTargetSdk) {
+            if (change.getEnableSinceTargetSdk() < sMinTargetSdk) {
                 return false;
             }
         }
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 1f0fb5e..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;
@@ -50,6 +49,7 @@
 
 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) {
         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()))
@@ -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/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
index d9c2e80..c1b1b6a 100644
--- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java
+++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
@@ -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 3270dd5..52b9f5c 100644
--- a/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
+++ b/services/core/java/com/android/server/connectivity/NetworkAgentInfo.java
@@ -138,9 +138,10 @@
     // not guaranteed to be current or correct, or even to exist.
     public @Nullable Network[] declaredUnderlyingNetworks;
 
-    // Whether this network is always metered even if its underlying networks are unmetered.
-    // Only relevant if #supportsUnderlyingNetworks is true.
-    public boolean declaredMetered;
+    // 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.
@@ -610,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) */);
@@ -701,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 7795ed3..3d71b0a 100644
--- a/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
+++ b/services/core/java/com/android/server/connectivity/NetworkNotificationManager.java
@@ -334,7 +334,13 @@
      */
     public void setProvNotificationVisible(boolean visible, int id, String action) {
         if (visible) {
-            Intent intent = new Intent(action);
+            // For legacy purposes, action is sent as the action + the phone ID from DcTracker.
+            // Split the string here and send the phone ID as an extra instead.
+            String[] splitAction = action.split(":");
+            Intent intent = new Intent(splitAction[0]);
+            try {
+                intent.putExtra("provision.phone.id", Integer.parseInt(splitAction[1]));
+            } catch (NumberFormatException ignored) { }
             PendingIntent pendingIntent = PendingIntent.getBroadcast(
                     mContext, 0 /* requestCode */, intent, PendingIntent.FLAG_IMMUTABLE);
             showNotification(id, NotificationType.SIGN_IN, null, null, pendingIntent, false);
diff --git a/services/core/java/com/android/server/connectivity/PacManager.java b/services/core/java/com/android/server/connectivity/PacManager.java
index 198de78..06721ae 100644
--- a/services/core/java/com/android/server/connectivity/PacManager.java
+++ b/services/core/java/com/android/server/connectivity/PacManager.java
@@ -390,7 +390,7 @@
             return;
         }
         if (!mHasSentBroadcast) {
-            sendPacBroadcast(new ProxyInfo(mPacUrl, mLastPort));
+            sendPacBroadcast(ProxyInfo.buildPacProxy(mPacUrl, mLastPort));
             mHasSentBroadcast = true;
         }
     }
diff --git a/services/core/java/com/android/server/connectivity/PermissionMonitor.java b/services/core/java/com/android/server/connectivity/PermissionMonitor.java
index 4c63eb4..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.getAliveUsers();
-        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 5cb3d94..f6ca152 100644
--- a/services/core/java/com/android/server/connectivity/ProxyTracker.java
+++ b/services/core/java/com/android/server/connectivity/ProxyTracker.java
@@ -38,7 +38,9 @@
 import android.util.Log;
 
 import com.android.internal.annotations.GuardedBy;
+import com.android.net.module.util.ProxyUtils;
 
+import java.util.Collections;
 import java.util.Objects;
 
 /**
@@ -163,9 +165,10 @@
         if (!TextUtils.isEmpty(host) || !TextUtils.isEmpty(pacFileUrl)) {
             ProxyInfo proxyProperties;
             if (!TextUtils.isEmpty(pacFileUrl)) {
-                proxyProperties = new ProxyInfo(Uri.parse(pacFileUrl));
+                proxyProperties = ProxyInfo.buildPacProxy(Uri.parse(pacFileUrl));
             } else {
-                proxyProperties = new ProxyInfo(host, port, exclList);
+                proxyProperties = ProxyInfo.buildDirectProxy(host, port,
+                        ProxyUtils.exclusionStringAsList(exclList));
             }
             if (!proxyProperties.isValid()) {
                 if (DBG) Log.d(TAG, "Invalid proxy properties, ignoring: " + proxyProperties);
@@ -204,7 +207,8 @@
                     return false;
                 }
             }
-            final ProxyInfo p = new ProxyInfo(proxyHost, proxyPort, "");
+            final ProxyInfo p = ProxyInfo.buildDirectProxy(proxyHost, proxyPort,
+                    Collections.emptyList());
             setGlobalProxy(p);
             return true;
         }
@@ -219,7 +223,8 @@
      */
     public void sendProxyBroadcast() {
         final ProxyInfo defaultProxy = getDefaultProxy();
-        final ProxyInfo proxyInfo = null != defaultProxy ? defaultProxy : new ProxyInfo("", 0, "");
+        final ProxyInfo proxyInfo = null != defaultProxy ?
+                defaultProxy : ProxyInfo.buildDirectProxy("", 0, Collections.emptyList());
         if (mPacManager.setCurrentProxyScriptUrl(proxyInfo) == PacManager.DONT_SEND_BROADCAST) {
             return;
         }
@@ -261,7 +266,7 @@
                 mGlobalProxy = new ProxyInfo(proxyInfo);
                 host = mGlobalProxy.getHost();
                 port = mGlobalProxy.getPort();
-                exclList = mGlobalProxy.getExclusionListAsString();
+                exclList = ProxyUtils.exclusionListAsString(mGlobalProxy.getExclusionList());
                 pacFileUrl = Uri.EMPTY.equals(proxyInfo.getPacFileUrl())
                         ? "" : proxyInfo.getPacFileUrl().toString();
             } else {
diff --git a/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java b/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
index 1129899..b5f20d7 100644
--- a/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
+++ b/services/core/java/com/android/server/connectivity/TcpKeepaliveController.java
@@ -36,6 +36,7 @@
 import android.net.TcpKeepalivePacketData;
 import android.net.TcpKeepalivePacketDataParcelable;
 import android.net.TcpRepairWindow;
+import android.net.util.KeepalivePacketDataUtil;
 import android.os.Handler;
 import android.os.MessageQueue;
 import android.os.Messenger;
@@ -112,7 +113,7 @@
             throws InvalidPacketException, InvalidSocketException {
         try {
             final TcpKeepalivePacketDataParcelable tcpDetails = switchToRepairMode(fd);
-            return TcpKeepalivePacketData.tcpKeepalivePacket(tcpDetails);
+            return KeepalivePacketDataUtil.fromStableParcelable(tcpDetails);
         } catch (InvalidPacketException | InvalidSocketException e) {
             switchOutOfRepairMode(fd);
             throw e;
@@ -122,7 +123,7 @@
      * Switch the tcp socket to repair mode and query detail tcp information.
      *
      * @param fd the fd of socket on which to use keepalive offload.
-     * @return a {@link TcpKeepalivePacketData#TcpKeepalivePacketDataParcelable} object for current
+     * @return a {@link TcpKeepalivePacketDataParcelable} object for current
      * tcp/ip information.
      */
     private static TcpKeepalivePacketDataParcelable switchToRepairMode(FileDescriptor fd)
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 3445275..228ad588 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -48,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;
@@ -68,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;
@@ -188,7 +190,8 @@
 
     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;
@@ -234,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;
@@ -243,7 +246,12 @@
         void checkInterruptAndDelay(boolean sleepLonger) throws InterruptedException;
     }
 
-    static class Dependencies {
+    @VisibleForTesting
+    public static class Dependencies {
+        public boolean isCallerSystem() {
+            return Binder.getCallingUid() == Process.SYSTEM_UID;
+        }
+
         public void startService(final String serviceName) {
             SystemService.start(serviceName);
         }
@@ -264,6 +272,10 @@
             return new File("/data/misc/vpn/state");
         }
 
+        public DeviceIdleInternal getDeviceIdleInternal() {
+            return LocalServices.getService(DeviceIdleInternal.class);
+        }
+
         public void sendArgumentsToDaemon(
                 final String daemon, final LocalSocket socket, final String[] arguments,
                 final RetryScheduler retryScheduler) throws IOException, InterruptedException {
@@ -363,22 +375,31 @@
         }
     }
 
-    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
+    public Vpn(Looper looper, Context context, Dependencies deps,
+            INetworkManagementService netService, INetd netd, @UserIdInt int userId,
+            @NonNull KeyStore keyStore) {
+        this(looper, context, deps, 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;
@@ -768,8 +789,7 @@
 
             // Tell the OS that background services in this app need to be allowed for
             // a short time, so we can bootstrap the VPN service.
-            DeviceIdleInternal idleController =
-                    LocalServices.getService(DeviceIdleInternal.class);
+            DeviceIdleInternal idleController = mDeps.getDeviceIdleInternal();
             idleController.addPowerSaveTempWhitelistApp(Process.myUid(), alwaysOnPackage,
                     VPN_LAUNCH_IDLE_ALLOWLIST_DURATION_MS, mUserId, false, "vpn");
 
@@ -912,7 +932,7 @@
             }
 
             try {
-                mNetd.denyProtect(mOwnerUID);
+                mNms.denyProtect(mOwnerUID);
             } catch (Exception e) {
                 Log.wtf(TAG, "Failed to disallow UID " + mOwnerUID + " to call protect() " + e);
             }
@@ -922,7 +942,7 @@
             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);
             }
@@ -1062,7 +1082,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 +1273,7 @@
 
             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) {
@@ -1579,24 +1599,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));
                 }
             }
 
@@ -1628,13 +1649,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);
@@ -1778,7 +1799,7 @@
                 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());
                 }
             }
         }
@@ -1849,10 +1870,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);
 
@@ -1944,10 +1975,6 @@
             return mContext.createContextAsUser(
                     UserHandle.of(userId), 0 /* flags */).getContentResolver();
         }
-
-        public boolean isCallerSystem() {
-            return Binder.getCallingUid() == Process.SYSTEM_UID;
-        }
     }
 
     private native int jniCreate(int mtu);
@@ -2495,7 +2522,7 @@
                                     address /* unused */,
                                     address /* unused */,
                                     network);
-                    mNetd.setInterfaceUp(mTunnelIface.getInterfaceName());
+                    mNms.setInterfaceUp(mTunnelIface.getInterfaceName());
 
                     mSession = mIkev2SessionCreator.createIkeSession(
                             mContext,
@@ -3097,7 +3124,7 @@
     @VisibleForTesting
     @Nullable
     VpnProfile getVpnProfilePrivileged(@NonNull String packageName, @NonNull KeyStore keyStore) {
-        if (!mSystemServices.isCallerSystem()) {
+        if (!mDeps.isCallerSystem()) {
             Log.wtf(TAG, "getVpnProfilePrivileged called as non-System UID ");
             return null;
         }
diff --git a/services/core/java/com/android/server/connectivity/VpnIkev2Utils.java b/services/core/java/com/android/server/connectivity/VpnIkev2Utils.java
index 62630300..fa03e59 100644
--- a/services/core/java/com/android/server/connectivity/VpnIkev2Utils.java
+++ b/services/core/java/com/android/server/connectivity/VpnIkev2Utils.java
@@ -60,12 +60,12 @@
 import android.net.ipsec.ike.TunnelModeChildSessionParams;
 import android.net.ipsec.ike.exceptions.IkeException;
 import android.net.ipsec.ike.exceptions.IkeProtocolException;
-import android.net.util.IpRange;
 import android.system.OsConstants;
 import android.util.Log;
 
 import com.android.internal.net.VpnProfile;
 import com.android.internal.util.HexDump;
+import com.android.net.module.util.IpRange;
 
 import java.net.Inet4Address;
 import java.net.Inet6Address;
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/HdmiCecController.java b/services/core/java/com/android/server/hdmi/HdmiCecController.java
index 5352840..0fdb879 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecController.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecController.java
@@ -26,6 +26,8 @@
 import android.hardware.tv.cec.V1_0.IHdmiCecCallback;
 import android.hardware.tv.cec.V1_0.Result;
 import android.hardware.tv.cec.V1_0.SendMessageResult;
+import android.icu.util.IllformedLocaleException;
+import android.icu.util.ULocale;
 import android.os.Handler;
 import android.os.IHwBinder;
 import android.os.Looper;
@@ -33,6 +35,7 @@
 import android.util.Slog;
 import android.util.SparseArray;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.server.hdmi.HdmiAnnotations.IoThreadOnly;
 import com.android.server.hdmi.HdmiAnnotations.ServiceThreadOnly;
@@ -48,8 +51,6 @@
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.function.Predicate;
 
-import sun.util.locale.LanguageTag;
-
 /**
  * Manages HDMI-CEC command and behaviors. It converts user's command into CEC command
  * and pass it to CEC HAL so that it sends message to other device. For incoming
@@ -369,13 +370,31 @@
     @ServiceThreadOnly
     void setLanguage(String language) {
         assertRunOnServiceThread();
-        if (!LanguageTag.isLanguage(language)) {
+        if (!isLanguage(language)) {
             return;
         }
         mNativeWrapperImpl.nativeSetLanguage(language);
     }
 
     /**
+     * Returns true if the language code is well-formed.
+     */
+    @VisibleForTesting static boolean isLanguage(String language) {
+        // Handle null and empty string because because ULocale.Builder#setLanguage accepts them.
+        if (language == null || language.isEmpty()) {
+            return false;
+        }
+
+        ULocale.Builder builder = new ULocale.Builder();
+        try {
+            builder.setLanguage(language);
+            return true;
+        } catch (IllformedLocaleException e) {
+            return false;
+        }
+    }
+
+    /**
      * Configure ARC circuit in the hardware logic to start or stop the feature.
      *
      * @param port ID of HDMI port to which AVR is connected
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
index ea24532..c24973d 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
@@ -156,7 +156,6 @@
         addValidationInfo(Constants.MESSAGE_GIVE_DECK_STATUS, statusRequestValidator, DEST_DIRECT);
         addValidationInfo(Constants.MESSAGE_PLAY, new PlayModeValidator(), DEST_DIRECT);
 
-        // TODO: Handle messages for the Tuner Control.
         addValidationInfo(
                 Constants.MESSAGE_GIVE_TUNER_DEVICE_STATUS, statusRequestValidator, DEST_DIRECT);
         addValidationInfo(
@@ -167,6 +166,10 @@
                 Constants.MESSAGE_SELECT_DIGITAL_SERVICE,
                 new SelectDigitalServiceValidator(),
                 DEST_DIRECT);
+        addValidationInfo(
+                Constants.MESSAGE_TUNER_DEVICE_STATUS,
+                new TunerDeviceStatusValidator(),
+                DEST_DIRECT);
 
         // Messages for the Vendor Specific Commands.
         VariableLengthValidator maxLengthValidator = new VariableLengthValidator(0, 14);
@@ -306,7 +309,14 @@
     }
 
     private boolean isValidPhysicalAddress(byte[] params, int offset) {
-        // TODO: Add more logic like validating 1.0.1.0.
+        int physicalAddress = HdmiUtils.twoBytesToInt(params, offset);
+        while (physicalAddress != 0) {
+            int maskedAddress = physicalAddress & 0xF000;
+            physicalAddress = (physicalAddress << 4) & 0xFFFF;
+            if (maskedAddress == 0 && physicalAddress != 0) {
+                return false;
+            }
+        }
 
         if (!mService.isTvDevice()) {
             // If the device is not TV, we can't convert path to port-id, so stop here.
@@ -722,6 +732,35 @@
                 || (isWithinRange(value, 0xC1, 0xC3)));
     }
 
+    /*
+     * Check if the given value is a valid Tuner Device info. A valid value is one which falls
+     * within the range description defined in CEC 1.4 Specification : Operand Descriptions
+     * (Section 17)
+     *
+     * @param params Tuner device info
+     * @return true if the Tuner device info is valid
+     */
+    private boolean isValidTunerDeviceInfo(byte[] params) {
+        int tunerDisplayInfo = params[0] & 0x7F;
+        if (tunerDisplayInfo == 0x00) {
+            // Displaying digital tuner
+            if (params.length >= 5) {
+                return isValidDigitalServiceIdentification(params, 1);
+            }
+        } else if (tunerDisplayInfo == 0x01) {
+            // Not displaying Tuner
+            return true;
+        } else if (tunerDisplayInfo == 0x02) {
+            // Displaying Analogue tuner
+            if (params.length >= 5) {
+                return (isValidAnalogueBroadcastType(params[1])
+                        && isValidAnalogueFrequency(HdmiUtils.twoBytesToInt(params, 2))
+                        && isValidBroadcastSystem(params[4]));
+            }
+        }
+        return false;
+    }
+
     private class PhysicalAddressValidator implements ParameterValidator {
         @Override
         public int isValid(byte[] params) {
@@ -1000,6 +1039,21 @@
         }
     }
 
+    /**
+     * Check if the given tuner device status parameter is valid. A valid parameter should lie
+     * within the range description defined in CEC 1.4 Specification : Operand Descriptions (Section
+     * 17)
+     */
+    private class TunerDeviceStatusValidator implements ParameterValidator {
+        @Override
+        public int isValid(byte[] params) {
+            if (params.length < 1) {
+                return ERROR_PARAMETER_SHORT;
+            }
+            return toErrorCode(isValidTunerDeviceInfo(params));
+        }
+    }
+
     /** Check if the given user control press parameter is valid. */
     private class UserControlPressedValidator implements ParameterValidator {
         @Override
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index e2145f0..8e50bb4 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -66,6 +66,8 @@
 import android.os.PowerManager;
 import android.os.RemoteCallbackList;
 import android.os.RemoteException;
+import android.os.ResultReceiver;
+import android.os.ShellCallback;
 import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.os.UserHandle;
@@ -2291,6 +2293,16 @@
         }
 
         @Override
+        public void onShellCommand(@Nullable FileDescriptor in, @Nullable FileDescriptor out,
+                @Nullable FileDescriptor err, String[] args,
+                @Nullable ShellCallback callback, ResultReceiver resultReceiver)
+                throws RemoteException {
+            enforceAccessPermission();
+            new HdmiControlShellCommand(this)
+                    .exec(this, in, out, err, args, callback, resultReceiver);
+        }
+
+        @Override
         protected void dump(FileDescriptor fd, final PrintWriter writer, String[] args) {
             if (!DumpUtils.checkDumpPermission(getContext(), TAG, writer)) return;
             final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlShellCommand.java b/services/core/java/com/android/server/hdmi/HdmiControlShellCommand.java
new file mode 100644
index 0000000..ee3427f
--- /dev/null
+++ b/services/core/java/com/android/server/hdmi/HdmiControlShellCommand.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.hdmi;
+
+
+import android.hardware.hdmi.HdmiControlManager;
+import android.hardware.hdmi.IHdmiControlCallback;
+import android.hardware.hdmi.IHdmiControlService;
+import android.os.RemoteException;
+import android.os.ShellCommand;
+import android.util.Slog;
+
+import java.io.PrintWriter;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+final class HdmiControlShellCommand extends ShellCommand {
+
+    private static final String TAG = "HdmiShellCommand";
+
+    private final IHdmiControlService.Stub mBinderService;
+
+
+    HdmiControlShellCommand(IHdmiControlService.Stub binderService) {
+        mBinderService = binderService;
+    }
+
+    @Override
+    public int onCommand(String cmd) {
+        if (cmd == null) {
+            return handleDefaultCommands(cmd);
+        }
+
+        try {
+            return handleShellCommand(cmd);
+        } catch (Exception e) {
+            getErrPrintWriter().println(
+                    "Caught error for command '" + cmd + "': " + e.getMessage());
+            Slog.e(TAG, "Error handling hdmi_control shell command: " + cmd, e);
+            return 1;
+        }
+    }
+
+    @Override
+    public void onHelp() {
+        PrintWriter pw = getOutPrintWriter();
+
+        pw.println("HdmiControlManager (hdmi_control) commands:");
+        pw.println("  help");
+        pw.println("      Print this help text.");
+        pw.println("  onetouchplay, otp");
+        pw.println("      Send the \"One Touch Play\" feature from a source to the TV");
+        pw.println("  vendorcommand --device_type <originating device type>");
+        pw.println("                --destination <destination device>");
+        pw.println("                --args <vendor specific arguments>");
+        pw.println("                [--id <true if vendor command should be sent with vendor id>]");
+        pw.println("      Send a Vendor Command to the given target device");
+    }
+
+    private int handleShellCommand(String cmd) throws RemoteException {
+        PrintWriter pw = getOutPrintWriter();
+
+        switch (cmd) {
+            case "otp":
+            case "onetouchplay":
+                return oneTouchPlay(pw);
+            case "vendorcommand":
+                return vendorCommand(pw);
+        }
+
+        getErrPrintWriter().println("Unhandled command: " + cmd);
+        return 1;
+    }
+
+    private int oneTouchPlay(PrintWriter pw) throws RemoteException {
+        final CountDownLatch latch = new CountDownLatch(1);
+        AtomicInteger cecResult = new AtomicInteger();
+        pw.print("Sending One Touch Play...");
+        mBinderService.oneTouchPlay(new IHdmiControlCallback.Stub() {
+            @Override
+            public void onComplete(int result) {
+                pw.println(" done (" + result + ")");
+                latch.countDown();
+                cecResult.set(result);
+            }
+        });
+
+        try {
+            if (!latch.await(HdmiConfig.TIMEOUT_MS, TimeUnit.MILLISECONDS)) {
+                getErrPrintWriter().println("One Touch Play timed out.");
+                return 1;
+            }
+        } catch (InterruptedException e) {
+            getErrPrintWriter().println("Caught InterruptedException");
+            Thread.currentThread().interrupt();
+        }
+        return cecResult.get() == HdmiControlManager.RESULT_SUCCESS ? 0 : 1;
+    }
+
+    private int vendorCommand(PrintWriter pw) throws RemoteException {
+        if (6 > getRemainingArgsCount()) {
+            throw new IllegalArgumentException("Expected 3 arguments.");
+        }
+
+        int deviceType = -1;
+        int destination = -1;
+        String parameters = "";
+        boolean hasVendorId = false;
+
+        String arg = getNextOption();
+        while (arg != null) {
+            switch (arg) {
+                case "-t":
+                case "--device_type":
+                    deviceType = Integer.parseInt(getNextArgRequired());
+                    break;
+                case "-d":
+                case "--destination":
+                    destination = Integer.parseInt(getNextArgRequired());
+                    break;
+                case "-a":
+                case "--args":
+                    parameters = getNextArgRequired();
+                    break;
+                case "-i":
+                case "--id":
+                    hasVendorId = Boolean.parseBoolean(getNextArgRequired());
+                    break;
+                default:
+                    throw new IllegalArgumentException("Unknown argument: " + arg);
+            }
+            arg = getNextArg();
+        }
+
+        String[] parts = parameters.split(":");
+        byte[] params = new byte[parts.length];
+        for (int i = 0; i < params.length; i++) {
+            params[i] = (byte) Integer.parseInt(parts[i], 16);
+        }
+
+        pw.println("Sending <Vendor Command>");
+        mBinderService.sendVendorCommand(deviceType, destination, params, hasVendorId);
+        return 0;
+    }
+}
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/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/location/timezone/OWNERS b/services/core/java/com/android/server/location/timezone/OWNERS
new file mode 100644
index 0000000..28aff18
--- /dev/null
+++ b/services/core/java/com/android/server/location/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+nfuller@google.com
+include /core/java/android/app/timedetector/OWNERS
diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java
index 4563a2d..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;
@@ -2629,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;
@@ -2654,6 +2658,7 @@
         }
         fixateNewestUserKeyAuth(userId);
         setSyntheticPasswordHandleLocked(handle, userId);
+        onAuthTokenKnownForUser(userId, auth);
         return auth;
     }
 
@@ -2689,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..08b8a8c
--- /dev/null
+++ b/services/core/java/com/android/server/locksettings/OWNERS
@@ -0,0 +1,3 @@
+jaggies@google.com
+kchyn@google.com
+rubinxu@google.com
diff --git a/services/core/java/com/android/server/locksettings/RebootEscrowManager.java b/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
index 5787f7c4..8d5f553 100644
--- a/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
+++ b/services/core/java/com/android/server/locksettings/RebootEscrowManager.java
@@ -15,20 +15,15 @@
  */
 
 package com.android.server.locksettings;
-
 import static android.os.UserHandle.USER_SYSTEM;
 
 import android.annotation.NonNull;
-import android.annotation.Nullable;
 import android.annotation.UserIdInt;
 import android.content.Context;
 import android.content.pm.UserInfo;
-import android.hardware.rebootescrow.IRebootEscrow;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.os.ServiceSpecificException;
 import android.os.SystemClock;
 import android.os.UserManager;
+import android.provider.DeviceConfig;
 import android.provider.Settings;
 import android.util.Slog;
 
@@ -44,7 +39,6 @@
 import java.util.Date;
 import java.util.List;
 import java.util.Locale;
-import java.util.NoSuchElementException;
 
 class RebootEscrowManager {
     private static final String TAG = "RebootEscrowManager";
@@ -116,8 +110,24 @@
     static class Injector {
         protected Context mContext;
 
+        private final RebootEscrowProviderInterface mRebootEscrowProvider;
+
         Injector(Context context) {
             mContext = context;
+            RebootEscrowProviderInterface rebootEscrowProvider = null;
+            // TODO(xunchang) add implementation for server based ror.
+            if (DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_OTA,
+                    "server_based_ror_enabled", false)) {
+                Slog.e(TAG, "Server based ror isn't implemented yet.");
+            } else {
+                rebootEscrowProvider = new RebootEscrowProviderHalImpl();
+            }
+
+            if (rebootEscrowProvider != null && rebootEscrowProvider.hasRebootEscrowSupport()) {
+                mRebootEscrowProvider = rebootEscrowProvider;
+            } else {
+                mRebootEscrowProvider = null;
+            }
         }
 
         public Context getContext() {
@@ -128,15 +138,8 @@
             return (UserManager) mContext.getSystemService(Context.USER_SERVICE);
         }
 
-        @Nullable
-        public IRebootEscrow getRebootEscrow() {
-            try {
-                return IRebootEscrow.Stub.asInterface(ServiceManager.getService(
-                        "android.hardware.rebootescrow.IRebootEscrow/default"));
-            } catch (NoSuchElementException e) {
-                Slog.i(TAG, "Device doesn't implement RebootEscrow HAL");
-            }
-            return null;
+        public RebootEscrowProviderInterface getRebootEscrowProvider() {
+            return mRebootEscrowProvider;
         }
 
         public int getBootCount() {
@@ -210,45 +213,18 @@
     }
 
     private RebootEscrowKey getAndClearRebootEscrowKey() {
-        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
-        if (rebootEscrow == null) {
-            Slog.w(TAG, "Had reboot escrow data for users, but RebootEscrow HAL is unavailable");
+        RebootEscrowProviderInterface rebootEscrowProvider = mInjector.getRebootEscrowProvider();
+        if (rebootEscrowProvider == null) {
+            Slog.w(TAG,
+                    "Had reboot escrow data for users, but RebootEscrowProvider is unavailable");
             return null;
         }
 
-        try {
-            byte[] escrowKeyBytes = rebootEscrow.retrieveKey();
-            if (escrowKeyBytes == null) {
-                Slog.w(TAG, "Had reboot escrow data for users, but could not retrieve key");
-                return null;
-            } else if (escrowKeyBytes.length != 32) {
-                Slog.e(TAG, "IRebootEscrow returned key of incorrect size "
-                        + escrowKeyBytes.length);
-                return null;
-            }
-
-            // Make sure we didn't get the null key.
-            int zero = 0;
-            for (int i = 0; i < escrowKeyBytes.length; i++) {
-                zero |= escrowKeyBytes[i];
-            }
-            if (zero == 0) {
-                Slog.w(TAG, "IRebootEscrow returned an all-zeroes key");
-                return null;
-            }
-
-            // Overwrite the existing key with the null key
-            rebootEscrow.storeKey(new byte[32]);
-
+        RebootEscrowKey key = rebootEscrowProvider.getAndClearRebootEscrowKey(null);
+        if (key != null) {
             mEventLog.addEntry(RebootEscrowEvent.RETRIEVED_STORED_KEK);
-            return RebootEscrowKey.fromKeyBytes(escrowKeyBytes);
-        } catch (RemoteException e) {
-            Slog.w(TAG, "Could not retrieve escrow data");
-            return null;
-        } catch (ServiceSpecificException e) {
-            Slog.w(TAG, "Got service-specific exception: " + e.errorCode);
-            return null;
         }
+        return key;
     }
 
     private boolean restoreRebootEscrowForUser(@UserIdInt int userId, RebootEscrowKey key) {
@@ -279,9 +255,9 @@
             return;
         }
 
-        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
-        if (rebootEscrow == null) {
-            Slog.w(TAG, "Reboot escrow requested, but RebootEscrow HAL is unavailable");
+        if (mInjector.getRebootEscrowProvider() == null) {
+            Slog.w(TAG,
+                    "Had reboot escrow data for users, but RebootEscrowProvider is unavailable");
             return;
         }
 
@@ -293,6 +269,7 @@
 
         final RebootEscrowData escrowData;
         try {
+            // TODO(xunchang) further wrap the escrowData with a key from keystore.
             escrowData = RebootEscrowData.fromSyntheticPassword(escrowKey, spVersion,
                     syntheticPassword);
         } catch (IOException e) {
@@ -330,18 +307,16 @@
         mRebootEscrowWanted = false;
         setRebootEscrowReady(false);
 
-        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
-        if (rebootEscrow == null) {
+
+        RebootEscrowProviderInterface rebootEscrowProvider = mInjector.getRebootEscrowProvider();
+        if (rebootEscrowProvider == null) {
+            Slog.w(TAG,
+                    "Had reboot escrow data for users, but RebootEscrowProvider is unavailable");
             return;
         }
 
         mStorage.removeKey(REBOOT_ESCROW_ARMED_KEY, USER_SYSTEM);
-
-        try {
-            rebootEscrow.storeKey(new byte[32]);
-        } catch (RemoteException | ServiceSpecificException e) {
-            Slog.w(TAG, "Could not call RebootEscrow HAL to shred key");
-        }
+        rebootEscrowProvider.clearRebootEscrowKey();
 
         List<UserInfo> users = mUserManager.getUsers();
         for (UserInfo user : users) {
@@ -356,9 +331,10 @@
             return false;
         }
 
-        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
-        if (rebootEscrow == null) {
-            Slog.w(TAG, "Escrow marked as ready, but RebootEscrow HAL is unavailable");
+        RebootEscrowProviderInterface rebootEscrowProvider = mInjector.getRebootEscrowProvider();
+        if (rebootEscrowProvider == null) {
+            Slog.w(TAG,
+                    "Had reboot escrow data for users, but RebootEscrowProvider is unavailable");
             return false;
         }
 
@@ -372,15 +348,7 @@
             return false;
         }
 
-        boolean armedRebootEscrow = false;
-        try {
-            rebootEscrow.storeKey(escrowKey.getKeyBytes());
-            armedRebootEscrow = true;
-            Slog.i(TAG, "Reboot escrow key stored with RebootEscrow HAL");
-        } catch (RemoteException | ServiceSpecificException e) {
-            Slog.e(TAG, "Failed escrow secret to RebootEscrow HAL", e);
-        }
-
+        boolean armedRebootEscrow = rebootEscrowProvider.storeRebootEscrowKey(escrowKey, null);
         if (armedRebootEscrow) {
             mStorage.setInt(REBOOT_ESCROW_ARMED_KEY, mInjector.getBootCount(), USER_SYSTEM);
             mEventLog.addEntry(RebootEscrowEvent.SET_ARMED_STATUS);
@@ -397,7 +365,7 @@
     }
 
     boolean prepareRebootEscrow() {
-        if (mInjector.getRebootEscrow() == null) {
+        if (mInjector.getRebootEscrowProvider() == null) {
             return false;
         }
 
@@ -408,7 +376,7 @@
     }
 
     boolean clearRebootEscrow() {
-        if (mInjector.getRebootEscrow() == null) {
+        if (mInjector.getRebootEscrowProvider() == null) {
             return false;
         }
 
diff --git a/services/core/java/com/android/server/locksettings/RebootEscrowProviderHalImpl.java b/services/core/java/com/android/server/locksettings/RebootEscrowProviderHalImpl.java
new file mode 100644
index 0000000..6c1040b
--- /dev/null
+++ b/services/core/java/com/android/server/locksettings/RebootEscrowProviderHalImpl.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.locksettings;
+
+import android.annotation.Nullable;
+import android.hardware.rebootescrow.IRebootEscrow;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.ServiceSpecificException;
+import android.util.Slog;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import java.util.NoSuchElementException;
+
+import javax.crypto.SecretKey;
+
+/**
+ * An implementation of the {@link RebootEscrowProviderInterface} by calling the RebootEscrow HAL.
+ */
+class RebootEscrowProviderHalImpl implements RebootEscrowProviderInterface {
+    private static final String TAG = "RebootEscrowProvider";
+
+    private final Injector mInjector;
+
+    static class Injector {
+        @Nullable
+        public IRebootEscrow getRebootEscrow() {
+            try {
+                return IRebootEscrow.Stub.asInterface(ServiceManager.getService(
+                        "android.hardware.rebootescrow.IRebootEscrow/default"));
+            } catch (NoSuchElementException e) {
+                Slog.i(TAG, "Device doesn't implement RebootEscrow HAL");
+            }
+            return null;
+        }
+    }
+
+    RebootEscrowProviderHalImpl() {
+        mInjector = new Injector();
+    }
+
+    @VisibleForTesting
+    RebootEscrowProviderHalImpl(Injector injector) {
+        mInjector = injector;
+    }
+
+    @Override
+    public boolean hasRebootEscrowSupport() {
+        return mInjector.getRebootEscrow() != null;
+    }
+
+    @Override
+    public RebootEscrowKey getAndClearRebootEscrowKey(SecretKey decryptionKey) {
+        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
+        if (rebootEscrow == null) {
+            Slog.w(TAG, "Had reboot escrow data for users, but RebootEscrow HAL is unavailable");
+            return null;
+        }
+
+        try {
+            byte[] escrowKeyBytes = rebootEscrow.retrieveKey();
+            if (escrowKeyBytes == null) {
+                Slog.w(TAG, "Had reboot escrow data for users, but could not retrieve key");
+                return null;
+            } else if (escrowKeyBytes.length != 32) {
+                Slog.e(TAG, "IRebootEscrow returned key of incorrect size "
+                        + escrowKeyBytes.length);
+                return null;
+            }
+
+            // Make sure we didn't get the null key.
+            int zero = 0;
+            for (int i = 0; i < escrowKeyBytes.length; i++) {
+                zero |= escrowKeyBytes[i];
+            }
+            if (zero == 0) {
+                Slog.w(TAG, "IRebootEscrow returned an all-zeroes key");
+                return null;
+            }
+
+            // Overwrite the existing key with the null key
+            rebootEscrow.storeKey(new byte[32]);
+
+            return RebootEscrowKey.fromKeyBytes(escrowKeyBytes);
+        } catch (RemoteException e) {
+            Slog.w(TAG, "Could not retrieve escrow data");
+            return null;
+        } catch (ServiceSpecificException e) {
+            Slog.w(TAG, "Got service-specific exception: " + e.errorCode);
+            return null;
+        }
+    }
+
+    @Override
+    public void clearRebootEscrowKey() {
+        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
+        if (rebootEscrow == null) {
+            return;
+        }
+
+        try {
+            rebootEscrow.storeKey(new byte[32]);
+        } catch (RemoteException | ServiceSpecificException e) {
+            Slog.w(TAG, "Could not call RebootEscrow HAL to shred key");
+        }
+
+    }
+
+    @Override
+    public boolean storeRebootEscrowKey(RebootEscrowKey escrowKey, SecretKey encryptionKey) {
+        IRebootEscrow rebootEscrow = mInjector.getRebootEscrow();
+        if (rebootEscrow == null) {
+            Slog.w(TAG, "Escrow marked as ready, but RebootEscrow HAL is unavailable");
+            return false;
+        }
+
+        try {
+            // The HAL interface only accept 32 bytes data. And the encrypted bytes for the escrow
+            // key may exceed that limit. So we just store the raw key bytes here.
+            rebootEscrow.storeKey(escrowKey.getKeyBytes());
+            Slog.i(TAG, "Reboot escrow key stored with RebootEscrow HAL");
+            return true;
+        } catch (RemoteException | ServiceSpecificException e) {
+            Slog.e(TAG, "Failed escrow secret to RebootEscrow HAL", e);
+        }
+        return false;
+    }
+}
diff --git a/services/core/java/com/android/server/locksettings/RebootEscrowProviderInterface.java b/services/core/java/com/android/server/locksettings/RebootEscrowProviderInterface.java
new file mode 100644
index 0000000..857ad5f
--- /dev/null
+++ b/services/core/java/com/android/server/locksettings/RebootEscrowProviderInterface.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.server.locksettings;
+
+import javax.crypto.SecretKey;
+
+/**
+ * Provides APIs for {@link RebootEscrowManager} to access and manage the reboot escrow key.
+ * Implementations need to find a way to persist the key across a reboot, and securely discards the
+ * persisted copy.
+ *
+ * @hide
+ */
+public interface RebootEscrowProviderInterface {
+    /**
+     * Returns true if the secure store/discard of reboot escrow key is supported.
+     */
+    boolean hasRebootEscrowSupport();
+
+    /**
+     * Returns the stored RebootEscrowKey, and clears the storage. If the stored key is encrypted,
+     * use the input key to decrypt the RebootEscrowKey. Returns null on failure.
+     */
+    RebootEscrowKey getAndClearRebootEscrowKey(SecretKey decryptionKey);
+
+    /**
+     * Clears the stored RebootEscrowKey.
+     */
+    void clearRebootEscrowKey();
+
+    /**
+     * Saves the given RebootEscrowKey, optionally encrypt the storage with the encryptionKey.
+     */
+    boolean storeRebootEscrowKey(RebootEscrowKey escrowKey, SecretKey encryptionKey);
+}
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/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 9dde4c8..818b2b7 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -1936,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);
             }
@@ -2000,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;
         }
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..cc3a002 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;
@@ -30,6 +30,7 @@
 import android.util.SparseArray;
 
 import com.android.internal.annotations.VisibleForTesting;
+import com.android.net.module.util.ProxyUtils;
 
 import java.io.BufferedInputStream;
 import java.io.DataInputStream;
@@ -123,7 +124,8 @@
             switch (config.proxySettings) {
                 case STATIC:
                     ProxyInfo proxyProperties = config.httpProxy;
-                    String exclusionList = proxyProperties.getExclusionListAsString();
+                    String exclusionList = ProxyUtils.exclusionListAsString(
+                            proxyProperties.getExclusionList());
                     out.writeUTF(PROXY_SETTINGS_KEY);
                     out.writeUTF(config.proxySettings.toString());
                     out.writeUTF(PROXY_HOST_KEY);
@@ -284,8 +286,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 +301,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 +309,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 +327,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)) {
@@ -367,13 +372,14 @@
 
                     switch (proxySettings) {
                         case STATIC:
-                            ProxyInfo proxyInfo =
-                                    new ProxyInfo(proxyHost, proxyPort, exclusionList);
+                            ProxyInfo proxyInfo = ProxyInfo.buildDirectProxy(proxyHost, proxyPort,
+                                    ProxyUtils.exclusionStringAsList(exclusionList));
                             config.proxySettings = proxySettings;
                             config.httpProxy = proxyInfo;
                             break;
                         case PAC:
-                            ProxyInfo proxyPacProperties = new ProxyInfo(Uri.parse(pacFileUrl));
+                            ProxyInfo proxyPacProperties =
+                                    ProxyInfo.buildPacProxy(Uri.parse(pacFileUrl));
                             config.proxySettings = proxySettings;
                             config.httpProxy = proxyPacProperties;
                             break;
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index e8f4826..bd80bef 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -236,6 +236,7 @@
 import com.android.server.LocalServices;
 import com.android.server.ServiceThread;
 import com.android.server.SystemConfig;
+import com.android.server.connectivity.MultipathPolicyTracker;
 import com.android.server.usage.AppStandbyInternal;
 import com.android.server.usage.AppStandbyInternal.AppIdleStateChangeListener;
 
@@ -415,6 +416,7 @@
     private final Clock mClock;
     private final UserManager mUserManager;
     private final CarrierConfigManager mCarrierConfigManager;
+    private final MultipathPolicyTracker mMultipathPolicyTracker;
 
     private IConnectivityManager mConnManager;
     private PowerManagerInternal mPowerManagerInternal;
@@ -591,7 +593,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();
 
@@ -655,7 +657,7 @@
         mPolicyFile = new AtomicFile(new File(systemDir, "netpolicy.xml"), "net-policy");
 
         mAppOps = context.getSystemService(AppOpsManager.class);
-
+        mMultipathPolicyTracker = new MultipathPolicyTracker(mContext, mHandler);
         // Expose private service for system components to use.
         LocalServices.addService(NetworkPolicyManagerInternal.class,
                 new NetworkPolicyManagerInternalImpl());
@@ -684,7 +686,7 @@
      * Allows pre-defined apps for restrict background, but only if the user didn't already
      * revoked them.
      *
-     * @return whether any uid has been allowlisted.
+     * @return whether any uid has been added to allowlist.
      */
     @GuardedBy("mUidRulesFirstLock")
     boolean addDefaultRestrictBackgroundAllowlistUidsUL() {
@@ -708,7 +710,7 @@
         for (int i = 0; i < allowDataUsage.size(); i++) {
             final String pkg = allowDataUsage.valueAt(i);
             if (LOGD)
-                Slog.d(TAG, "checking restricted background allowlisting for package " + pkg
+                Slog.d(TAG, "checking restricted background exemption for package " + pkg
                         + " and user " + userId);
             final ApplicationInfo app;
             try {
@@ -923,6 +925,7 @@
             if (!initCompleteSignal.await(30, TimeUnit.SECONDS)) {
                 throw new IllegalStateException("Service " + TAG +" init timeout");
             }
+            mMultipathPolicyTracker.start();
         } catch (InterruptedException e) {
             Thread.currentThread().interrupt();
             throw new IllegalStateException("Service " + TAG + " init interrupted", e);
@@ -977,7 +980,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);
                 }
             }
@@ -1024,7 +1027,7 @@
                         // user resets app preferences.
                         mMeteredRestrictedUids.remove(userId);
                         if (action == ACTION_USER_ADDED) {
-                            // Add apps that are allowlisted by default.
+                            // Add apps that are allowed by default.
                             addDefaultRestrictBackgroundAllowlistUidsUL(userId);
                         }
                         // Update global restrict for that user
@@ -2230,8 +2233,8 @@
             in.setInput(fis, StandardCharsets.UTF_8.name());
 
              // Must save the <restrict-background> tags and convert them to <uid-policy> later,
-             // to skip UIDs that were explicitly denylisted.
-            final SparseBooleanArray allowlistedRestrictBackground = new SparseBooleanArray();
+             // to skip UIDs that were explicitly denied.
+            final SparseBooleanArray restrictBackgroundAllowedUids = new SparseBooleanArray();
 
             int type;
             int version = VERSION_INIT;
@@ -2389,7 +2392,7 @@
                         insideAllowlist = true;
                     } else if (TAG_RESTRICT_BACKGROUND.equals(tag) && insideAllowlist) {
                         final int uid = readIntAttribute(in, ATTR_UID);
-                        allowlistedRestrictBackground.append(uid, true);
+                        restrictBackgroundAllowedUids.append(uid, true);
                     } else if (TAG_REVOKED_RESTRICT_BACKGROUND.equals(tag) && insideAllowlist) {
                         final int uid = readIntAttribute(in, ATTR_UID);
                         mRestrictBackgroundAllowlistRevokedUids.put(uid, true);
@@ -2402,9 +2405,9 @@
                 }
             }
 
-            final int size = allowlistedRestrictBackground.size();
+            final int size = restrictBackgroundAllowedUids.size();
             for (int i = 0; i < size; i++) {
-                final int uid = allowlistedRestrictBackground.keyAt(i);
+                final int uid = restrictBackgroundAllowedUids.keyAt(i);
                 final int policy = mUidPolicy.get(uid, POLICY_NONE);
                 if ((policy & POLICY_REJECT_METERED_BACKGROUND) != 0) {
                     Slog.w(TAG, "ignoring restrict-background-allowlist for " + uid
@@ -2671,13 +2674,13 @@
         if (!isUidValidForAllowlistRulesUL(uid)) {
             notifyApp = false;
         } else {
-            final boolean wasDenylisted = oldPolicy == POLICY_REJECT_METERED_BACKGROUND;
-            final boolean isDenylisted = policy == POLICY_REJECT_METERED_BACKGROUND;
-            final boolean wasAllowlisted = oldPolicy == POLICY_ALLOW_METERED_BACKGROUND;
-            final boolean isAllowlisted = policy == POLICY_ALLOW_METERED_BACKGROUND;
-            final boolean wasBlocked = wasDenylisted || (mRestrictBackground && !wasAllowlisted);
-            final boolean isBlocked = isDenylisted || (mRestrictBackground && !isAllowlisted);
-            if ((wasAllowlisted && (!isAllowlisted || isDenylisted))
+            final boolean wasDenied = oldPolicy == POLICY_REJECT_METERED_BACKGROUND;
+            final boolean isDenied = policy == POLICY_REJECT_METERED_BACKGROUND;
+            final boolean wasAllowed = oldPolicy == POLICY_ALLOW_METERED_BACKGROUND;
+            final boolean isAllowed = policy == POLICY_ALLOW_METERED_BACKGROUND;
+            final boolean wasBlocked = wasDenied || (mRestrictBackground && !wasAllowed);
+            final boolean isBlocked = isDenied || (mRestrictBackground && !isAllowed);
+            if ((wasAllowed && (!isAllowed || isDenied))
                     && mDefaultRestrictBackgroundAllowlistUids.get(uid)
                     && !mRestrictBackgroundAllowlistRevokedUids.get(uid)) {
                 if (LOGD)
@@ -2962,7 +2965,7 @@
             Slog.d(TAG, "setRestrictBackgroundUL(): " + restrictBackground + "; reason: " + reason);
             final boolean oldRestrictBackground = mRestrictBackground;
             mRestrictBackground = restrictBackground;
-            // Must allowlist foreground apps before turning data saver mode on.
+            // Must allow foreground apps before turning data saver mode on.
             // TODO: there is no need to iterate through all apps here, just those in the foreground,
             // so it could call AM to get the UIDs of such apps, and iterate through them instead.
             updateRulesForRestrictBackgroundUL();
@@ -3015,7 +3018,7 @@
                 Binder.restoreCallingIdentity(token);
             }
             if (policy == POLICY_REJECT_METERED_BACKGROUND) {
-                // App is denylisted.
+                // App is restricted.
                 return RESTRICT_BACKGROUND_STATUS_ENABLED;
             }
             if (!mRestrictBackground) {
@@ -3458,6 +3461,17 @@
         }
     }
 
+    /**
+     * Get multipath preference value for the given network.
+     */
+    public int getMultipathPreference(Network network) {
+        final Integer preference = mMultipathPolicyTracker.getMultipathPreference(network);
+        if (preference != null) {
+            return preference;
+        }
+        return 0;
+    }
+
     @Override
     protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
         if (!DumpUtils.checkDumpPermission(mContext, TAG, writer)) return;
@@ -3678,6 +3692,8 @@
                 mLogger.dumpLogs(fout);
             }
         }
+        fout.println();
+        mMultipathPolicyTracker.dump(fout);
     }
 
     @Override
@@ -4223,16 +4239,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) {
         }
@@ -4296,9 +4310,9 @@
      * <ul>
      * <li>@{code bw_penalty_box}: UIDs added to this chain do not have access (denylist).
      * <li>@{code bw_happy_box}: UIDs added to this chain have access (allowlist), unless they're
-     *     also denylisted.
+     *     also in denylist.
      * <li>@{code bw_data_saver}: when enabled (through {@link #setRestrictBackground(boolean)}),
-     *     no UIDs other than those allowlisted will have access.
+     *     no UIDs other than those in allowlist will have access.
      * <ul>
      *
      * <p>The @{code bw_penalty_box} and @{code bw_happy_box} are primarily managed through the
@@ -4313,7 +4327,8 @@
      * <ul>
      * <li>When Data Saver mode is on, the foreground app should be temporarily added to
      *     {@code bw_happy_box} before the @{code bw_data_saver} chain is enabled.
-     * <li>If the foreground app is denylisted by the user, it should be temporarily removed from
+     * <li>If the foreground app was restricted by the user (i.e. has the policy
+     *     {@code POLICY_REJECT_METERED_BACKGROUND}), it should be temporarily removed from
      *     {@code bw_penalty_box}.
      * <li>When the app leaves foreground state, the temporary changes above should be reverted.
      * </ul>
@@ -4348,8 +4363,8 @@
         final boolean isForeground = isUidForegroundOnRestrictBackgroundUL(uid);
         final boolean isRestrictedByAdmin = isRestrictedByAdminUL(uid);
 
-        final boolean isDenylisted = (uidPolicy & POLICY_REJECT_METERED_BACKGROUND) != 0;
-        final boolean isAllowlisted = (uidPolicy & POLICY_ALLOW_METERED_BACKGROUND) != 0;
+        final boolean isDenied = (uidPolicy & POLICY_REJECT_METERED_BACKGROUND) != 0;
+        final boolean isAllowed = (uidPolicy & POLICY_ALLOW_METERED_BACKGROUND) != 0;
         final int oldRule = oldUidRules & MASK_METERED_NETWORKS;
         int newRule = RULE_NONE;
 
@@ -4357,15 +4372,15 @@
         if (isRestrictedByAdmin) {
             newRule = RULE_REJECT_METERED;
         } else if (isForeground) {
-            if (isDenylisted || (mRestrictBackground && !isAllowlisted)) {
+            if (isDenied || (mRestrictBackground && !isAllowed)) {
                 newRule = RULE_TEMPORARY_ALLOW_METERED;
-            } else if (isAllowlisted) {
+            } else if (isAllowed) {
                 newRule = RULE_ALLOW_METERED;
             }
         } else {
-            if (isDenylisted) {
+            if (isDenied) {
                 newRule = RULE_REJECT_METERED;
-            } else if (mRestrictBackground && isAllowlisted) {
+            } else if (mRestrictBackground && isAllowed) {
                 newRule = RULE_ALLOW_METERED;
             }
         }
@@ -4374,8 +4389,8 @@
         if (LOGV) {
             Log.v(TAG, "updateRuleForRestrictBackgroundUL(" + uid + ")"
                     + ": isForeground=" +isForeground
-                    + ", isDenylisted=" + isDenylisted
-                    + ", isAllowlisted=" + isAllowlisted
+                    + ", isDenied=" + isDenied
+                    + ", isAllowed=" + isAllowed
                     + ", isRestrictedByAdmin=" + isRestrictedByAdmin
                     + ", oldRule=" + uidRulesToString(oldRule)
                     + ", newRule=" + uidRulesToString(newRule)
@@ -4392,49 +4407,49 @@
         // Second step: apply bw changes based on change of state.
         if (newRule != oldRule) {
             if (hasRule(newRule, RULE_TEMPORARY_ALLOW_METERED)) {
-                // Temporarily allowlist foreground app, removing from denylist if necessary
+                // Temporarily allow foreground app, removing from denylist if necessary
                 // (since bw_penalty_box prevails over bw_happy_box).
 
                 setMeteredNetworkAllowlist(uid, true);
                 // TODO: if statement below is used to avoid an unnecessary call to netd / iptables,
                 // but ideally it should be just:
-                //    setMeteredNetworkDenylist(uid, isDenylisted);
-                if (isDenylisted) {
+                //    setMeteredNetworkDenylist(uid, isDenied);
+                if (isDenied) {
                     setMeteredNetworkDenylist(uid, false);
                 }
             } else if (hasRule(oldRule, RULE_TEMPORARY_ALLOW_METERED)) {
-                // Remove temporary allowlist from app that is not on foreground anymore.
+                // Remove temporary exemption from app that is not on foreground anymore.
 
                 // TODO: if statements below are used to avoid unnecessary calls to netd / iptables,
                 // but ideally they should be just:
-                //    setMeteredNetworkAllowlist(uid, isAllowlisted);
-                //    setMeteredNetworkDenylist(uid, isDenylisted);
-                if (!isAllowlisted) {
+                //    setMeteredNetworkAllowlist(uid, isAllowed);
+                //    setMeteredNetworkDenylist(uid, isDenied);
+                if (!isAllowed) {
                     setMeteredNetworkAllowlist(uid, false);
                 }
-                if (isDenylisted || isRestrictedByAdmin) {
+                if (isDenied || isRestrictedByAdmin) {
                     setMeteredNetworkDenylist(uid, true);
                 }
             } else if (hasRule(newRule, RULE_REJECT_METERED)
                     || hasRule(oldRule, RULE_REJECT_METERED)) {
                 // Flip state because app was explicitly added or removed to denylist.
-                setMeteredNetworkDenylist(uid, (isDenylisted || isRestrictedByAdmin));
-                if (hasRule(oldRule, RULE_REJECT_METERED) && isAllowlisted) {
-                    // Since denylist prevails over allowlist, we need to handle the special case
-                    // where app is allowlisted and denylisted at the same time (although such
-                    // scenario should be blocked by the UI), then denylist is removed.
-                    setMeteredNetworkAllowlist(uid, isAllowlisted);
+                setMeteredNetworkDenylist(uid, (isDenied || isRestrictedByAdmin));
+                if (hasRule(oldRule, RULE_REJECT_METERED) && isAllowed) {
+                    // Since denial prevails over allowance, we need to handle the special case
+                    // where app is allowed and denied at the same time (although such
+                    // scenario should be blocked by the UI), then it is removed from the denylist.
+                    setMeteredNetworkAllowlist(uid, isAllowed);
                 }
             } else if (hasRule(newRule, RULE_ALLOW_METERED)
                     || hasRule(oldRule, RULE_ALLOW_METERED)) {
                 // Flip state because app was explicitly added or removed to allowlist.
-                setMeteredNetworkAllowlist(uid, isAllowlisted);
+                setMeteredNetworkAllowlist(uid, isAllowed);
             } else {
                 // All scenarios should have been covered above.
                 Log.wtf(TAG, "Unexpected change of metered UID state for " + uid
                         + ": foreground=" + isForeground
-                        + ", allowlisted=" + isAllowlisted
-                        + ", denylisted=" + isDenylisted
+                        + ", allowlisted=" + isAllowed
+                        + ", denylisted=" + isDenied
                         + ", isRestrictedByAdmin=" + isRestrictedByAdmin
                         + ", newRule=" + uidRulesToString(newUidRules)
                         + ", oldRule=" + uidRulesToString(oldUidRules));
@@ -4450,7 +4465,7 @@
      * listeners in case of change.
      * <p>
      * There are 3 power-related rules that affects whether an app has background access on
-     * non-metered networks, and when the condition applies and the UID is not allowlisted for power
+     * non-metered networks, and when the condition applies and the UID is not allowed for power
      * restriction, it's added to the equivalent firewall chain:
      * <ul>
      * <li>App is idle: {@code fw_standby} firewall chain.
@@ -4915,7 +4930,7 @@
     private void setMeteredNetworkDenylist(int uid, boolean enable) {
         if (LOGV) Slog.v(TAG, "setMeteredNetworkDenylist " + uid + ": " + enable);
         try {
-            mNetworkManager.setUidMeteredNetworkDenylist(uid, enable);
+            mNetworkManager.setUidOnMeteredNetworkDenylist(uid, enable);
         } catch (IllegalStateException e) {
             Log.wtf(TAG, "problem setting denylist (" + enable + ") rules for " + uid, e);
         } catch (RemoteException e) {
@@ -4926,7 +4941,7 @@
     private void setMeteredNetworkAllowlist(int uid, boolean enable) {
         if (LOGV) Slog.v(TAG, "setMeteredNetworkAllowlist " + uid + ": " + enable);
         try {
-            mNetworkManager.setUidMeteredNetworkAllowlist(uid, enable);
+            mNetworkManager.setUidOnMeteredNetworkAllowlist(uid, enable);
         } catch (IllegalStateException e) {
             Log.wtf(TAG, "problem setting allowlist (" + enable + ") rules for " + uid, e);
         } catch (RemoteException e) {
@@ -5048,8 +5063,8 @@
             mNetworkManager.setFirewallUidRule(FIREWALL_CHAIN_STANDBY, uid, FIREWALL_RULE_DEFAULT);
             mNetworkManager
                     .setFirewallUidRule(FIREWALL_CHAIN_POWERSAVE, uid, FIREWALL_RULE_DEFAULT);
-            mNetworkManager.setUidMeteredNetworkAllowlist(uid, false);
-            mNetworkManager.setUidMeteredNetworkDenylist(uid, false);
+            mNetworkManager.setUidOnMeteredNetworkAllowlist(uid, false);
+            mNetworkManager.setUidOnMeteredNetworkDenylist(uid, false);
         } catch (IllegalStateException e) {
             Log.wtf(TAG, "problem resetting firewall uid rules for " + uid, e);
         } catch (RemoteException e) {
diff --git a/services/core/java/com/android/server/net/NetworkStatsCollection.java b/services/core/java/com/android/server/net/NetworkStatsCollection.java
index 342a11b..c4beddd4 100644
--- a/services/core/java/com/android/server/net/NetworkStatsCollection.java
+++ b/services/core/java/com/android/server/net/NetworkStatsCollection.java
@@ -28,9 +28,9 @@
 import static android.net.NetworkStats.TAG_NONE;
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.TrafficStats.UID_REMOVED;
-import static android.net.NetworkUtils.multiplySafeByRational;
 import static android.text.format.DateUtils.WEEK_IN_MILLIS;
 
+import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational;
 import static com.android.server.net.NetworkStatsService.TAG;
 
 import android.net.NetworkIdentity;
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 9127620..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;
                         }
                     }
@@ -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/os/BugreportManagerServiceImpl.java b/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
index 47fcc08..dd507a3 100644
--- a/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
+++ b/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
@@ -297,9 +297,8 @@
         }
 
         @Override
-        public void onUiIntensiveBugreportDumpsFinished(String callingPackage)
-                throws RemoteException {
-            mListener.onUiIntensiveBugreportDumpsFinished(callingPackage);
+        public void onUiIntensiveBugreportDumpsFinished() throws RemoteException {
+            mListener.onUiIntensiveBugreportDumpsFinished();
         }
 
         @Override
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/ApexManager.java b/services/core/java/com/android/server/pm/ApexManager.java
index f116a24..c6a55b4 100644
--- a/services/core/java/com/android/server/pm/ApexManager.java
+++ b/services/core/java/com/android/server/pm/ApexManager.java
@@ -323,9 +323,9 @@
      * Copies the CE apex data directory for the given {@code userId} to a backup location, for use
      * in case of rollback.
      *
-     * @return long inode for the snapshot directory if the snapshot was successful, or -1 if not
+     * @return boolean true if the snapshot was successful
      */
-    public abstract long snapshotCeData(int userId, int rollbackId, String apexPackageName);
+    public abstract boolean snapshotCeData(int userId, int rollbackId, String apexPackageName);
 
     /**
      * Restores the snapshot of the CE apex data directory for the given {@code userId}.
@@ -826,7 +826,7 @@
         }
 
         @Override
-        public long snapshotCeData(int userId, int rollbackId, String apexPackageName) {
+        public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) {
             String apexModuleName;
             synchronized (mLock) {
                 Preconditions.checkState(mPackageNameToApexModuleName != null,
@@ -835,13 +835,14 @@
             }
             if (apexModuleName == null) {
                 Slog.e(TAG, "Invalid apex package name: " + apexPackageName);
-                return -1;
+                return false;
             }
             try {
-                return waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName);
+                waitForApexService().snapshotCeData(userId, rollbackId, apexModuleName);
+                return true;
             } catch (Exception e) {
                 Slog.e(TAG, e.getMessage(), e);
-                return -1;
+                return false;
             }
         }
 
@@ -1124,7 +1125,7 @@
         }
 
         @Override
-        public long snapshotCeData(int userId, int rollbackId, String apexPackageName) {
+        public boolean snapshotCeData(int userId, int rollbackId, String apexPackageName) {
             throw new UnsupportedOperationException();
         }
 
diff --git a/services/core/java/com/android/server/pm/AppsFilter.java b/services/core/java/com/android/server/pm/AppsFilter.java
index 069a00f..f221802 100644
--- a/services/core/java/com/android/server/pm/AppsFilter.java
+++ b/services/core/java/com/android/server/pm/AppsFilter.java
@@ -290,7 +290,8 @@
 
         private void updateEnabledState(@NonNull AndroidPackage pkg) {
             // TODO(b/135203078): Do not use toAppInfo
-            final boolean enabled = mInjector.getCompatibility().isChangeEnabledInternal(
+            // TODO(b/167551701): Make changeId non-logging
+            final boolean enabled = mInjector.getCompatibility().isChangeEnabledInternalNoLogging(
                     PackageManager.FILTER_APPLICATION_QUERY, pkg.toAppInfoWithoutState());
             if (enabled) {
                 mDisabledPackages.remove(pkg.getPackageName());
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/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 79e5b27..c0b8b3f 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -1616,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());
@@ -2060,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..8887e40
--- /dev/null
+++ b/services/core/java/com/android/server/policy/OWNERS
@@ -0,0 +1,3 @@
+include /services/core/java/com/android/server/wm/OWNERS
+include /services/core/java/com/android/server/input/OWNERS
+include /services/core/java/com/android/server/pm/permission/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/recoverysystem/OWNERS b/services/core/java/com/android/server/recoverysystem/OWNERS
new file mode 100644
index 0000000..79ded0d
--- /dev/null
+++ b/services/core/java/com/android/server/recoverysystem/OWNERS
@@ -0,0 +1,2 @@
+rvrolyk@google.com
+zhaojiac@google.com
diff --git a/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java b/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java
index e0701e8..5c01e43 100644
--- a/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java
+++ b/services/core/java/com/android/server/recoverysystem/RecoverySystemService.java
@@ -16,8 +16,10 @@
 
 package com.android.server.recoverysystem;
 
+import android.annotation.IntDef;
 import android.content.Context;
 import android.content.IntentSender;
+import android.content.pm.PackageManager;
 import android.net.LocalSocket;
 import android.net.LocalSocketAddress;
 import android.os.Binder;
@@ -30,8 +32,11 @@
 import android.os.ResultReceiver;
 import android.os.ShellCallback;
 import android.os.SystemProperties;
+import android.util.ArrayMap;
+import android.util.ArraySet;
 import android.util.Slog;
 
+import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.widget.LockSettingsInternal;
 import com.android.internal.widget.RebootEscrowListener;
@@ -76,9 +81,53 @@
     private final Injector mInjector;
     private final Context mContext;
 
-    private boolean mPreparedForReboot;
-    private String mUnattendedRebootToken;
-    private IntentSender mPreparedForRebootIntentSender;
+    @GuardedBy("this")
+    private final ArrayMap<String, IntentSender> mCallerPendingRequest = new ArrayMap<>();
+    @GuardedBy("this")
+    private final ArraySet<String> mCallerPreparedForReboot = new ArraySet<>();
+
+    /**
+     * Need to prepare for resume on reboot.
+     */
+    private static final int ROR_NEED_PREPARATION = 0;
+    /**
+     * Resume on reboot has been prepared, notify the caller.
+     */
+    private static final int ROR_SKIP_PREPARATION_AND_NOTIFY = 1;
+    /**
+     * Resume on reboot has been requested. Caller won't be notified until the preparation is done.
+     */
+    private static final int ROR_SKIP_PREPARATION_NOT_NOTIFY = 2;
+
+    /**
+     * The caller never requests for resume on reboot, no need for clear.
+     */
+    private static final int ROR_NOT_REQUESTED = 0;
+    /**
+     * Clear the resume on reboot preparation state.
+     */
+    private static final int ROR_REQUESTED_NEED_CLEAR = 1;
+    /**
+     * The caller has requested for resume on reboot. No need for clear since other callers may
+     * exist.
+     */
+    private static final int ROR_REQUESTED_SKIP_CLEAR = 2;
+
+    /**
+     * The action to perform upon new resume on reboot prepare request for a given client.
+     */
+    @IntDef({ ROR_NEED_PREPARATION,
+            ROR_SKIP_PREPARATION_AND_NOTIFY,
+            ROR_SKIP_PREPARATION_NOT_NOTIFY })
+    private @interface ResumeOnRebootActionsOnRequest {}
+
+    /**
+     * The action to perform upon resume on reboot clear request for a given client.
+     */
+    @IntDef({ROR_NOT_REQUESTED,
+            ROR_REQUESTED_NEED_CLEAR,
+            ROR_REQUESTED_SKIP_CLEAR})
+    private @interface ResumeOnRebootActionsOnClear{}
 
     static class Injector {
         protected final Context mContext;
@@ -286,47 +335,95 @@
         }
     }
 
-    @Override // Binder call
-    public boolean requestLskf(String updateToken, IntentSender intentSender) {
-        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.RECOVERY, null);
+    private void enforcePermissionForResumeOnReboot() {
+        if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.RECOVERY)
+                != PackageManager.PERMISSION_GRANTED
+                && mContext.checkCallingOrSelfPermission(android.Manifest.permission.REBOOT)
+                        != PackageManager.PERMISSION_GRANTED) {
+            throw new SecurityException("Caller must have " + android.Manifest.permission.RECOVERY
+                    + " or " + android.Manifest.permission.REBOOT + " for resume on reboot.");
+        }
+    }
 
-        if (updateToken == null) {
+    @Override // Binder call
+    public boolean requestLskf(String packageName, IntentSender intentSender) {
+        enforcePermissionForResumeOnReboot();
+
+        if (packageName == null) {
+            Slog.w(TAG, "Missing packageName when requesting lskf.");
             return false;
         }
 
-        // No need to prepare again for the same token.
-        if (mPreparedForReboot && updateToken.equals(mUnattendedRebootToken)) {
-            return true;
+        @ResumeOnRebootActionsOnRequest int action = updateRoRPreparationStateOnNewRequest(
+                packageName, intentSender);
+        switch (action) {
+            case ROR_SKIP_PREPARATION_AND_NOTIFY:
+                // We consider the preparation done if someone else has prepared.
+                sendPreparedForRebootIntentIfNeeded(intentSender);
+                return true;
+            case ROR_SKIP_PREPARATION_NOT_NOTIFY:
+                return true;
+            case ROR_NEED_PREPARATION:
+                final long origId = Binder.clearCallingIdentity();
+                try {
+                    mInjector.getLockSettingsService().prepareRebootEscrow();
+                } finally {
+                    Binder.restoreCallingIdentity(origId);
+                }
+                return true;
+            default:
+                throw new IllegalStateException("Unsupported action type on new request " + action);
+        }
+    }
+
+    // Checks and updates the resume on reboot preparation state.
+    private synchronized @ResumeOnRebootActionsOnRequest int updateRoRPreparationStateOnNewRequest(
+            String packageName, IntentSender intentSender) {
+        if (!mCallerPreparedForReboot.isEmpty()) {
+            if (mCallerPreparedForReboot.contains(packageName)) {
+                Slog.i(TAG, "RoR already has prepared for " + packageName);
+            }
+
+            // Someone else has prepared. Consider the preparation done, and send back the intent.
+            mCallerPreparedForReboot.add(packageName);
+            return ROR_SKIP_PREPARATION_AND_NOTIFY;
         }
 
-        mPreparedForReboot = false;
-        mUnattendedRebootToken = updateToken;
-        mPreparedForRebootIntentSender = intentSender;
-
-        final long origId = Binder.clearCallingIdentity();
-        try {
-            mInjector.getLockSettingsService().prepareRebootEscrow();
-        } finally {
-            Binder.restoreCallingIdentity(origId);
+        boolean needPreparation = mCallerPendingRequest.isEmpty();
+        if (mCallerPendingRequest.containsKey(packageName)) {
+            Slog.i(TAG, "Duplicate RoR preparation request for " + packageName);
         }
-
-        return true;
+        // Update the request with the new intentSender.
+        mCallerPendingRequest.put(packageName, intentSender);
+        return needPreparation ? ROR_NEED_PREPARATION : ROR_SKIP_PREPARATION_NOT_NOTIFY;
     }
 
     @Override
     public void onPreparedForReboot(boolean ready) {
-        if (mUnattendedRebootToken == null) {
-            Slog.w(TAG, "onPreparedForReboot called when mUnattendedRebootToken is null");
+        if (!ready) {
+            return;
         }
-
-        mPreparedForReboot = ready;
-        if (ready) {
-            sendPreparedForRebootIntentIfNeeded();
-        }
+        updateRoRPreparationStateOnPreparedForReboot();
     }
 
-    private void sendPreparedForRebootIntentIfNeeded() {
-        final IntentSender intentSender = mPreparedForRebootIntentSender;
+    private synchronized void updateRoRPreparationStateOnPreparedForReboot() {
+        if (!mCallerPreparedForReboot.isEmpty()) {
+            Slog.w(TAG, "onPreparedForReboot called when some clients have prepared.");
+        }
+
+        if (mCallerPendingRequest.isEmpty()) {
+            Slog.w(TAG, "onPreparedForReboot called but no client has requested.");
+        }
+
+        // Send intents to notify callers
+        for (int i = 0; i < mCallerPendingRequest.size(); i++) {
+            sendPreparedForRebootIntentIfNeeded(mCallerPendingRequest.valueAt(i));
+            mCallerPreparedForReboot.add(mCallerPendingRequest.keyAt(i));
+        }
+        mCallerPendingRequest.clear();
+    }
+
+    private void sendPreparedForRebootIntentIfNeeded(IntentSender intentSender) {
         if (intentSender != null) {
             try {
                 intentSender.sendIntent(null, 0, null, null, null);
@@ -337,37 +434,59 @@
     }
 
     @Override // Binder call
-    public boolean clearLskf() {
-        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.RECOVERY, null);
-
-        mPreparedForReboot = false;
-        mUnattendedRebootToken = null;
-        mPreparedForRebootIntentSender = null;
-
-        final long origId = Binder.clearCallingIdentity();
-        try {
-            mInjector.getLockSettingsService().clearRebootEscrow();
-        } finally {
-            Binder.restoreCallingIdentity(origId);
+    public boolean clearLskf(String packageName) {
+        enforcePermissionForResumeOnReboot();
+        if (packageName == null) {
+            Slog.w(TAG, "Missing packageName when clearing lskf.");
+            return false;
         }
 
-        return true;
+        @ResumeOnRebootActionsOnClear int action = updateRoRPreparationStateOnClear(packageName);
+        switch (action) {
+            case ROR_NOT_REQUESTED:
+                Slog.w(TAG, "RoR clear called before preparation for caller " + packageName);
+                return true;
+            case ROR_REQUESTED_SKIP_CLEAR:
+                return true;
+            case ROR_REQUESTED_NEED_CLEAR:
+                final long origId = Binder.clearCallingIdentity();
+                try {
+                    mInjector.getLockSettingsService().clearRebootEscrow();
+                } finally {
+                    Binder.restoreCallingIdentity(origId);
+                }
+                return true;
+            default:
+                throw new IllegalStateException("Unsupported action type on clear " + action);
+        }
     }
 
-    @Override // Binder call
-    public boolean rebootWithLskf(String updateToken, String reason) {
-        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.RECOVERY, null);
+    private synchronized @ResumeOnRebootActionsOnClear int updateRoRPreparationStateOnClear(
+            String packageName) {
+        if (!mCallerPreparedForReboot.contains(packageName) && !mCallerPendingRequest.containsKey(
+                packageName)) {
+            Slog.w(TAG, packageName + " hasn't prepared for resume on reboot");
+            return ROR_NOT_REQUESTED;
+        }
+        mCallerPendingRequest.remove(packageName);
+        mCallerPreparedForReboot.remove(packageName);
 
-        if (!mPreparedForReboot) {
-            Slog.i(TAG, "Reboot requested before prepare completed");
+        // Check if others have prepared ROR.
+        boolean needClear = mCallerPendingRequest.isEmpty() && mCallerPreparedForReboot.isEmpty();
+        return needClear ? ROR_REQUESTED_NEED_CLEAR : ROR_REQUESTED_SKIP_CLEAR;
+    }
+
+    private boolean rebootWithLskfImpl(String packageName, String reason, boolean slotSwitch) {
+        if (packageName == null) {
+            Slog.w(TAG, "Missing packageName when rebooting with lskf.");
+            return false;
+        }
+        if (!isLskfCaptured(packageName)) {
             return false;
         }
 
-        if (updateToken != null && !updateToken.equals(mUnattendedRebootToken)) {
-            Slog.i(TAG, "Reboot requested after preparation, but with mismatching token");
-            return false;
-        }
-
+        // TODO(xunchang) check the slot to boot into, and fail the reboot upon slot mismatch.
+        // TODO(xunchang) write the vbmeta digest along with the escrowKey before reboot.
         if (!mInjector.getLockSettingsService().armRebootEscrow()) {
             Slog.w(TAG, "Failure to escrow key for reboot");
             return false;
@@ -378,6 +497,34 @@
         return true;
     }
 
+    @Override // Binder call for the legacy rebootWithLskf
+    public boolean rebootWithLskfAssumeSlotSwitch(String packageName, String reason) {
+        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.RECOVERY, null);
+        return rebootWithLskfImpl(packageName, reason, true);
+    }
+
+    @Override // Binder call
+    public boolean rebootWithLskf(String packageName, String reason, boolean slotSwitch) {
+        enforcePermissionForResumeOnReboot();
+        return rebootWithLskfImpl(packageName, reason, slotSwitch);
+    }
+
+    @Override // Binder call
+    public boolean isLskfCaptured(String packageName) {
+        enforcePermissionForResumeOnReboot();
+        boolean captured;
+        synchronized (this) {
+            captured = mCallerPreparedForReboot.contains(packageName);
+        }
+
+        if (!captured) {
+            Slog.i(TAG, "Reboot requested before prepare completed for caller "
+                    + packageName);
+            return false;
+        }
+        return true;
+    }
+
     /**
      * Check if any of the init services is still running. If so, we cannot
      * start a new uncrypt/setup-bcb/clear-bcb service right away; otherwise
diff --git a/services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java b/services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java
index c6905b5..f20d80d 100644
--- a/services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java
+++ b/services/core/java/com/android/server/recoverysystem/RecoverySystemShellCommand.java
@@ -56,26 +56,31 @@
     }
 
     private int requestLskf() throws RemoteException {
-        String updateToken = getNextArgRequired();
-        boolean success = mService.requestLskf(updateToken, null);
+        String packageName = getNextArgRequired();
+        boolean success = mService.requestLskf(packageName, null);
         PrintWriter pw = getOutPrintWriter();
-        pw.println("Request LSKF status: " + (success ? "success" : "failure"));
+        pw.printf("Request LSKF for packageName: %s, status: %s\n", packageName,
+                success ? "success" : "failure");
         return 0;
     }
 
     private int clearLskf() throws RemoteException {
-        boolean success = mService.clearLskf();
+        String packageName = getNextArgRequired();
+        boolean success = mService.clearLskf(packageName);
         PrintWriter pw = getOutPrintWriter();
-        pw.println("Clear LSKF: " + (success ? "success" : "failure"));
+        pw.printf("Clear LSKF for packageName: %s, status: %s\n", packageName,
+                success ? "success" : "failure");
         return 0;
     }
 
     private int rebootAndApply() throws RemoteException {
-        String updateToken = getNextArgRequired();
+        String packageName = getNextArgRequired();
         String rebootReason = getNextArgRequired();
-        boolean success = mService.rebootWithLskf(updateToken, rebootReason);
+        boolean success = mService.rebootWithLskf(packageName, rebootReason, true);
         PrintWriter pw = getOutPrintWriter();
-        pw.println("Reboot and apply status: " + (success ? "success" : "failure"));
+        // Keep the old message for cts test.
+        pw.printf("%s Reboot and apply status: %s\n", packageName,
+                success ? "success" : "failure");
         return 0;
     }
 
diff --git a/services/core/java/com/android/server/rollback/AppDataRollbackHelper.java b/services/core/java/com/android/server/rollback/AppDataRollbackHelper.java
index 524ae54..0213cc6 100644
--- a/services/core/java/com/android/server/rollback/AppDataRollbackHelper.java
+++ b/services/core/java/com/android/server/rollback/AppDataRollbackHelper.java
@@ -129,13 +129,8 @@
         if (packageRollbackInfo.isApex()) {
             // For APEX, only snapshot CE here
             if ((flags & Installer.FLAG_STORAGE_CE) != 0) {
-                long ceSnapshotInode = mApexManager.snapshotCeData(
+                return mApexManager.snapshotCeData(
                         userId, rollbackId, packageRollbackInfo.getPackageName());
-                if (ceSnapshotInode > 0) {
-                    packageRollbackInfo.putCeSnapshotInode(userId, ceSnapshotInode);
-                } else {
-                    return false;
-                }
             }
         } else {
             // APK
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/rollback/RollbackManagerServiceImpl.java b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
index ca382c4..81878e7 100644
--- a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
+++ b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
@@ -1292,7 +1292,7 @@
     private SparseIntArray getExtensionVersions() {
         // This list must be updated whenever the current API level is increased, or should be
         // replaced when we have another way of determining the relevant SDK versions.
-        final int[] relevantSdkVersions = { Build.VERSION_CODES.R };
+        final int[] relevantSdkVersions = { Build.VERSION_CODES.R, Build.VERSION_CODES.S };
 
         SparseIntArray result = new SparseIntArray(relevantSdkVersions.length);
         for (int i = 0; i < relevantSdkVersions.length; i++) {
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 6dac6b1..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;
@@ -122,6 +123,14 @@
         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() {
@@ -153,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 abd4c8c..de6412c 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategy.java
@@ -19,6 +19,7 @@
 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;
@@ -40,7 +41,7 @@
  */
 public interface TimeDetectorStrategy {
 
-    @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK })
+    @IntDef({ ORIGIN_TELEPHONY, ORIGIN_MANUAL, ORIGIN_NETWORK, ORIGIN_GNSS })
     @Retention(RetentionPolicy.SOURCE)
     @interface Origin {}
 
@@ -56,6 +57,10 @@
     @Origin
     int ORIGIN_NETWORK = 3;
 
+    /** Used when a time value originated from a gnss signal. */
+    @Origin
+    int ORIGIN_GNSS = 4;
+
     /** Processes the suggested time from telephony sources. */
     void suggestTelephonyTime(@NonNull TelephonyTimeSuggestion timeSuggestion);
 
@@ -70,6 +75,9 @@
     /** Processes the suggested time from network sources. */
     void suggestNetworkTime(@NonNull NetworkTimeSuggestion timeSuggestion);
 
+    /** 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.
@@ -102,6 +110,8 @@
                 return "network";
             case ORIGIN_TELEPHONY:
                 return "telephony";
+            case ORIGIN_GNSS:
+                return "gnss";
             default:
                 throw new IllegalArgumentException("origin=" + origin);
         }
@@ -119,6 +129,8 @@
                 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/TimeDetectorStrategyImpl.java b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
index b3c8c90..6fe3782 100644
--- a/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
+++ b/services/core/java/com/android/server/timedetector/TimeDetectorStrategyImpl.java
@@ -23,6 +23,7 @@
 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;
@@ -109,6 +110,10 @@
     private final ReferenceWithHistory<NetworkTimeSuggestion> mLastNetworkSuggestion =
             new ReferenceWithHistory<>(KEEP_SUGGESTION_HISTORY_SIZE);
 
+    @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.
      *
@@ -166,6 +171,20 @@
     }
 
     @Override
+    public synchronized void suggestGnssTime(@NonNull GnssTimeSuggestion timeSuggestion) {
+        final TimestampedValue<Long> newUtcTime = timeSuggestion.getUtcTime();
+
+        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();
 
@@ -280,6 +299,11 @@
         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();
     }
@@ -386,6 +410,14 @@
                             + ", 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)
@@ -527,6 +559,26 @@
         return networkSuggestion;
     }
 
+    /** Returns the latest, valid, gnss suggestion. Returns {@code null} if there isn't one. */
+    @GuardedBy("this")
+    @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) {
@@ -655,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
@@ -672,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/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 bedcf9c..6cd0258 100755
--- a/services/core/java/com/android/server/tv/TvInputManagerService.java
+++ b/services/core/java/com/android/server/tv/TvInputManagerService.java
@@ -97,6 +97,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.UUID;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -1176,7 +1177,8 @@
             final int resolvedUserId = resolveCallingUserId(callingPid, callingUid,
                     userId, "createSession");
             final long identity = Binder.clearCallingIdentity();
-            StringBuilder sessionId = new StringBuilder();
+            // Generate a unique session id with a random UUID.
+            String uniqueSessionId = UUID.randomUUID().toString();
             try {
                 synchronized (mLock) {
                     if (userId != mCurrentUserId && !isRecordingSession) {
@@ -1205,20 +1207,17 @@
                         return;
                     }
 
-                    // Create a unique session id with pid, uid and resolved user id
-                    sessionId.append(callingUid).append(callingPid).append(resolvedUserId);
-
                     // Create a new session token and a session state.
                     IBinder sessionToken = new Binder();
                     SessionState sessionState = new SessionState(sessionToken, info.getId(),
                             info.getComponent(), isRecordingSession, client, seq, callingUid,
-                            callingPid, resolvedUserId, sessionId.toString());
+                            callingPid, resolvedUserId, uniqueSessionId);
 
                     // Add them to the global session state map of the current user.
                     userState.sessionStateMap.put(sessionToken, sessionState);
 
                     // Map the session id to the sessionStateMap in the user state
-                    mSessionIdToSessionStateMap.put(sessionId.toString(), sessionState);
+                    mSessionIdToSessionStateMap.put(uniqueSessionId, sessionState);
 
                     // Also, add them to the session state map of the current service.
                     serviceState.sessionTokens.add(sessionToken);
diff --git a/services/core/java/com/android/server/tv/tunerresourcemanager/ClientProfile.java b/services/core/java/com/android/server/tv/tunerresourcemanager/ClientProfile.java
index 2b0fe8a..2fc17fe 100644
--- a/services/core/java/com/android/server/tv/tunerresourcemanager/ClientProfile.java
+++ b/services/core/java/com/android/server/tv/tunerresourcemanager/ClientProfile.java
@@ -68,6 +68,11 @@
     private Set<Integer> mUsingFrontendIds = new HashSet<>();
 
     /**
+     * List of the client ids that share frontend with the current client.
+     */
+    private Set<Integer> mShareFeClientIds = new HashSet<>();
+
+    /**
      * List of the Lnb ids that are used by the current client.
      */
     private Set<Integer> mUsingLnbIds = new HashSet<>();
@@ -113,11 +118,7 @@
     }
 
     public int getPriority() {
-        return mPriority;
-    }
-
-    public int getNiceValue() {
-        return mNiceValue;
+        return mPriority - mNiceValue;
     }
 
     public void setGroupId(int groupId) {
@@ -141,17 +142,38 @@
         mUsingFrontendIds.add(frontendId);
     }
 
+    /**
+     * Update the set of client that share frontend with the current client.
+     *
+     * @param clientId the client to share the fe with the current client.
+     */
+    public void shareFrontend(int clientId) {
+        mShareFeClientIds.add(clientId);
+    }
+
+    /**
+     * Remove the given client id from the share frontend client id set.
+     *
+     * @param clientId the client to stop sharing the fe with the current client.
+     */
+    public void stopSharingFrontend(int clientId) {
+        mShareFeClientIds.remove(clientId);
+    }
+
     public Set<Integer> getInUseFrontendIds() {
         return mUsingFrontendIds;
     }
 
+    public Set<Integer> getShareFeClientIds() {
+        return mShareFeClientIds;
+    }
+
     /**
      * Called when the client released a frontend.
-     *
-     * @param frontendId being released.
      */
-    public void releaseFrontend(int frontendId) {
-        mUsingFrontendIds.remove(frontendId);
+    public void releaseFrontend() {
+        mUsingFrontendIds.clear();
+        mShareFeClientIds.clear();
     }
 
     /**
@@ -201,6 +223,7 @@
      */
     public void reclaimAllResources() {
         mUsingFrontendIds.clear();
+        mShareFeClientIds.clear();
         mUsingLnbIds.clear();
         mUsingCasSystemId = INVALID_RESOURCE_ID;
     }
diff --git a/services/core/java/com/android/server/tv/tunerresourcemanager/TunerResourceManagerService.java b/services/core/java/com/android/server/tv/tunerresourcemanager/TunerResourceManagerService.java
index 7cb59dc..fb2347e8 100644
--- a/services/core/java/com/android/server/tv/tunerresourcemanager/TunerResourceManagerService.java
+++ b/services/core/java/com/android/server/tv/tunerresourcemanager/TunerResourceManagerService.java
@@ -210,19 +210,36 @@
             }
             synchronized (mLock) {
                 if (!checkClientExists(request.getClientId())) {
-                    throw new RemoteException("Request frontend from unregistered client:"
+                    throw new RemoteException("Request frontend from unregistered client: "
                             + request.getClientId());
                 }
+                // If the request client is holding or sharing a frontend, throw an exception.
+                if (!getClientProfile(request.getClientId()).getInUseFrontendIds().isEmpty()) {
+                    throw new RemoteException("Release frontend before requesting another one. "
+                            + "Client id: " + request.getClientId());
+                }
                 return requestFrontendInternal(request, frontendHandle);
             }
         }
 
         @Override
-        public void shareFrontend(int selfClientId, int targetClientId) {
+        public void shareFrontend(int selfClientId, int targetClientId) throws RemoteException {
             enforceTunerAccessPermission("shareFrontend");
             enforceTrmAccessPermission("shareFrontend");
-            if (DEBUG) {
-                Slog.d(TAG, "shareFrontend from " + selfClientId + " with " + targetClientId);
+            synchronized (mLock) {
+                if (!checkClientExists(selfClientId)) {
+                    throw new RemoteException("Share frontend request from an unregistered client:"
+                            + selfClientId);
+                }
+                if (!checkClientExists(targetClientId)) {
+                    throw new RemoteException("Request to share frontend with an unregistered "
+                            + "client:" + targetClientId);
+                }
+                if (getClientProfile(targetClientId).getInUseFrontendIds().isEmpty()) {
+                    throw new RemoteException("Request to share frontend with a client that has no "
+                            + "frontend resources. Target client id:" + targetClientId);
+                }
+                shareFrontendInternal(selfClientId, targetClientId);
             }
         }
 
@@ -315,7 +332,7 @@
                     throw new RemoteException(
                             "Client is not the current owner of the releasing fe.");
                 }
-                releaseFrontendInternal(fe);
+                releaseFrontendInternal(fe, clientId);
             }
         }
 
@@ -649,6 +666,17 @@
     }
 
     @VisibleForTesting
+    protected void shareFrontendInternal(int selfClientId, int targetClientId) {
+        if (DEBUG) {
+            Slog.d(TAG, "shareFrontend from " + selfClientId + " with " + targetClientId);
+        }
+        for (int feId : getClientProfile(targetClientId).getInUseFrontendIds()) {
+            getClientProfile(selfClientId).useFrontend(feId);
+        }
+        getClientProfile(targetClientId).shareFrontend(selfClientId);
+    }
+
+    @VisibleForTesting
     protected boolean requestLnbInternal(TunerLnbRequest request, int[] lnbHandle) {
         if (DEBUG) {
             Slog.d(TAG, "requestLnb(request=" + request + ")");
@@ -777,11 +805,17 @@
     }
 
     @VisibleForTesting
-    protected void releaseFrontendInternal(FrontendResource fe) {
+    protected void releaseFrontendInternal(FrontendResource fe, int clientId) {
         if (DEBUG) {
-            Slog.d(TAG, "releaseFrontend(id=" + fe.getId() + ")");
+            Slog.d(TAG, "releaseFrontend(id=" + fe.getId() + ", clientId=" + clientId + " )");
         }
-        updateFrontendClientMappingOnRelease(fe);
+        if (clientId == fe.getOwnerClientId()) {
+            ClientProfile ownerClient = getClientProfile(fe.getOwnerClientId());
+            for (int shareOwnerId : ownerClient.getShareFeClientIds()) {
+                clearFrontendAndClientMapping(getClientProfile(shareOwnerId));
+            }
+        }
+        clearFrontendAndClientMapping(getClientProfile(clientId));
     }
 
     @VisibleForTesting
@@ -882,8 +916,21 @@
             Slog.e(TAG, "Failed to reclaim resources on client " + reclaimingClientId, e);
             return false;
         }
+
+        // Reclaim all the resources of the share owners of the frontend that is used by the current
+        // resource reclaimed client.
         ClientProfile profile = getClientProfile(reclaimingClientId);
-        reclaimingResourcesFromClient(profile);
+        Set<Integer> shareFeClientIds = profile.getShareFeClientIds();
+        for (int clientId : shareFeClientIds) {
+            try {
+                mListeners.get(clientId).getListener().onReclaimResources();
+            } catch (RemoteException e) {
+                Slog.e(TAG, "Failed to reclaim resources on client " + clientId, e);
+                return false;
+            }
+            clearAllResourcesAndClientMapping(getClientProfile(clientId));
+        }
+        clearAllResourcesAndClientMapping(profile);
         return true;
     }
 
@@ -929,16 +976,6 @@
         }
     }
 
-    private void updateFrontendClientMappingOnRelease(@NonNull FrontendResource releasingFrontend) {
-        ClientProfile ownerProfile = getClientProfile(releasingFrontend.getOwnerClientId());
-        releasingFrontend.removeOwner();
-        ownerProfile.releaseFrontend(releasingFrontend.getId());
-        for (int exclusiveGroupMember : releasingFrontend.getExclusiveGroupMemberFeIds()) {
-            getFrontendResource(exclusiveGroupMember).removeOwner();
-            ownerProfile.releaseFrontend(exclusiveGroupMember);
-        }
-    }
-
     private void updateLnbClientMappingOnNewGrant(int grantingId, int ownerClientId) {
         LnbResource grantingLnb = getLnbResource(grantingId);
         ClientProfile ownerProfile = getClientProfile(ownerClientId);
@@ -967,10 +1004,10 @@
     }
 
     /**
-     * Get the owner client's priority from the resource id.
+     * Get the owner client's priority.
      *
      * @param clientId the owner client id.
-     * @return the priority of the owner client of the resource.
+     * @return the priority of the owner client.
      */
     private int getOwnerClientPriority(int clientId) {
         return getClientProfile(clientId).getPriority();
@@ -1011,7 +1048,11 @@
             return;
         }
         if (fe.isInUse()) {
-            releaseFrontendInternal(fe);
+            ClientProfile ownerClient = getClientProfile(fe.getOwnerClientId());
+            for (int shareOwnerId : ownerClient.getShareFeClientIds()) {
+                clearFrontendAndClientMapping(getClientProfile(shareOwnerId));
+            }
+            clearFrontendAndClientMapping(ownerClient);
         }
         for (int excGroupmemberFeId : fe.getExclusiveGroupMemberFeIds()) {
             getFrontendResource(excGroupmemberFeId)
@@ -1093,21 +1134,37 @@
     }
 
     private void removeClientProfile(int clientId) {
-        reclaimingResourcesFromClient(getClientProfile(clientId));
+        for (int shareOwnerId : getClientProfile(clientId).getShareFeClientIds()) {
+            clearFrontendAndClientMapping(getClientProfile(shareOwnerId));
+        }
+        clearAllResourcesAndClientMapping(getClientProfile(clientId));
         mClientProfiles.remove(clientId);
         mListeners.remove(clientId);
     }
 
-    private void reclaimingResourcesFromClient(ClientProfile profile) {
+    private void clearFrontendAndClientMapping(ClientProfile profile) {
         for (Integer feId : profile.getInUseFrontendIds()) {
-            getFrontendResource(feId).removeOwner();
+            FrontendResource fe = getFrontendResource(feId);
+            if (fe.getOwnerClientId() == profile.getId()) {
+                fe.removeOwner();
+                continue;
+            }
+            getClientProfile(fe.getOwnerClientId()).stopSharingFrontend(profile.getId());
         }
+        profile.releaseFrontend();
+    }
+
+    private void clearAllResourcesAndClientMapping(ClientProfile profile) {
+        // Clear Lnb
         for (Integer lnbId : profile.getInUseLnbIds()) {
             getLnbResource(lnbId).removeOwner();
         }
+        // Clear Cas
         if (profile.getInUseCasSystemId() != ClientProfile.INVALID_RESOURCE_ID) {
             getCasResource(profile.getInUseCasSystemId()).removeOwner(profile.getId());
         }
+        // Clear Frontend
+        clearFrontendAndClientMapping(profile);
         profile.reclaimAllResources();
     }
 
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/vcn/Android.bp b/services/core/java/com/android/server/vcn/Android.bp
new file mode 100644
index 0000000..5ed204f
--- /dev/null
+++ b/services/core/java/com/android/server/vcn/Android.bp
@@ -0,0 +1,4 @@
+filegroup {
+    name: "framework-vcn-util-sources",
+    srcs: ["util/**/*.java"],
+}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/vcn/TelephonySubscriptionTracker.java b/services/core/java/com/android/server/vcn/TelephonySubscriptionTracker.java
new file mode 100644
index 0000000..c060807
--- /dev/null
+++ b/services/core/java/com/android/server/vcn/TelephonySubscriptionTracker.java
@@ -0,0 +1,314 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.vcn;
+
+import static android.telephony.CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED;
+import static android.telephony.CarrierConfigManager.EXTRA_SLOT_INDEX;
+import static android.telephony.CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX;
+import static android.telephony.SubscriptionManager.INVALID_SIM_SLOT_INDEX;
+import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.HandlerExecutor;
+import android.os.ParcelUuid;
+import android.os.PersistableBundle;
+import android.telephony.CarrierConfigManager;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
+import android.util.ArraySet;
+import android.util.Slog;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.annotations.VisibleForTesting.Visibility;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * TelephonySubscriptionTracker provides a caching layer for tracking active subscription groups.
+ *
+ * <p>This class performs two roles:
+ *
+ * <ol>
+ *   <li>De-noises subscription changes by ensuring that only changes in active and ready
+ *       subscription groups are acted upon
+ *   <li>Caches mapping between subIds and subscription groups
+ * </ol>
+ *
+ * <p>An subscription group is active and ready if any of its contained subIds has had BOTH the
+ * {@link CarrierConfigManager#isConfigForIdentifiedCarrier()} return true, AND the subscription is
+ * listed as active per SubscriptionManager#getAllSubscriptionInfoList().
+ *
+ * <p>Note that due to the asynchronous nature of callbacks and broadcasts, the output of this class
+ * is (only) eventually consistent.
+ *
+ * @hide
+ */
+public class TelephonySubscriptionTracker extends BroadcastReceiver {
+    @NonNull private static final String TAG = TelephonySubscriptionTracker.class.getSimpleName();
+    private static final boolean LOG_DBG = false; // STOPSHIP if true
+
+    @NonNull private final Context mContext;
+    @NonNull private final Handler mHandler;
+    @NonNull private final TelephonySubscriptionTrackerCallback mCallback;
+    @NonNull private final Dependencies mDeps;
+
+    @NonNull private final SubscriptionManager mSubscriptionManager;
+    @NonNull private final CarrierConfigManager mCarrierConfigManager;
+
+    // TODO (Android T+): Add ability to handle multiple subIds per slot.
+    @NonNull private final Map<Integer, Integer> mReadySubIdsBySlotId = new HashMap<>();
+    @NonNull private final OnSubscriptionsChangedListener mSubscriptionChangedListener;
+
+    @NonNull private TelephonySubscriptionSnapshot mCurrentSnapshot;
+
+    public TelephonySubscriptionTracker(
+            @NonNull Context context,
+            @NonNull Handler handler,
+            @NonNull TelephonySubscriptionTrackerCallback callback) {
+        this(context, handler, callback, new Dependencies());
+    }
+
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    TelephonySubscriptionTracker(
+            @NonNull Context context,
+            @NonNull Handler handler,
+            @NonNull TelephonySubscriptionTrackerCallback callback,
+            @NonNull Dependencies deps) {
+        mContext = Objects.requireNonNull(context, "Missing context");
+        mHandler = Objects.requireNonNull(handler, "Missing handler");
+        mCallback = Objects.requireNonNull(callback, "Missing callback");
+        mDeps = Objects.requireNonNull(deps, "Missing deps");
+
+        mSubscriptionManager = mContext.getSystemService(SubscriptionManager.class);
+        mCarrierConfigManager = mContext.getSystemService(CarrierConfigManager.class);
+
+        mSubscriptionChangedListener =
+                new OnSubscriptionsChangedListener() {
+                    @Override
+                    public void onSubscriptionsChanged() {
+                        handleSubscriptionsChanged();
+                    }
+                };
+    }
+
+    /** Registers the receivers, and starts tracking subscriptions. */
+    public void register() {
+        mContext.registerReceiver(
+                this, new IntentFilter(ACTION_CARRIER_CONFIG_CHANGED), null, mHandler);
+        mSubscriptionManager.addOnSubscriptionsChangedListener(
+                new HandlerExecutor(mHandler), mSubscriptionChangedListener);
+    }
+
+    /** Unregisters the receivers, and stops tracking subscriptions. */
+    public void unregister() {
+        mContext.unregisterReceiver(this);
+        mSubscriptionManager.removeOnSubscriptionsChangedListener(mSubscriptionChangedListener);
+    }
+
+    /**
+     * Handles subscription changes, correlating available subscriptions and loaded carrier configs
+     *
+     * <p>The subscription change listener is registered with a HandlerExecutor backed by mHandler,
+     * so callbacks & broadcasts are all serialized on mHandler, avoiding the need for locking.
+     */
+    public void handleSubscriptionsChanged() {
+        final Set<ParcelUuid> activeSubGroups = new ArraySet<>();
+        final Map<Integer, ParcelUuid> newSubIdToGroupMap = new HashMap<>();
+
+        final List<SubscriptionInfo> allSubs = mSubscriptionManager.getAllSubscriptionInfoList();
+        if (allSubs == null) {
+            return; // Telephony crashed; no way to verify subscriptions.
+        }
+
+        // If allSubs is empty, no subscriptions exist. Cache will be cleared by virtue of no active
+        // subscriptions
+        for (SubscriptionInfo subInfo : allSubs) {
+            if (subInfo.getGroupUuid() == null) {
+                continue;
+            }
+
+            // Build subId -> subGrp cache
+            newSubIdToGroupMap.put(subInfo.getSubscriptionId(), subInfo.getGroupUuid());
+
+            // Update subscription groups that are both ready, and active. For a group to be
+            // considered active, both of the following must be true:
+            //
+            // 1. A final CARRIER_CONFIG_CHANGED (where config is for an identified carrier)
+            // broadcast must have been received for the subId
+            // 2. A active subscription (is loaded into a SIM slot) must be part of the subscription
+            // group.
+            if (subInfo.getSimSlotIndex() != INVALID_SIM_SLOT_INDEX
+                    && mReadySubIdsBySlotId.values().contains(subInfo.getSubscriptionId())) {
+                activeSubGroups.add(subInfo.getGroupUuid());
+            }
+        }
+
+        final TelephonySubscriptionSnapshot newSnapshot =
+                new TelephonySubscriptionSnapshot(newSubIdToGroupMap, activeSubGroups);
+
+        // If snapshot was meaningfully updated, fire the callback
+        if (!newSnapshot.equals(mCurrentSnapshot)) {
+            mCurrentSnapshot = newSnapshot;
+            mHandler.post(
+                    () -> {
+                        mCallback.onNewSnapshot(newSnapshot);
+                    });
+        }
+    }
+
+    /**
+     * Broadcast receiver for ACTION_CARRIER_CONFIG_CHANGED
+     *
+     * <p>The broadcast receiver is registered with mHandler, so callbacks & broadcasts are all
+     * serialized on mHandler, avoiding the need for locking.
+     */
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        // Accept sticky broadcasts; if CARRIER_CONFIG_CHANGED was previously broadcast and it
+        // already was for an identified carrier, we can stop waiting for initial load to complete
+        if (!ACTION_CARRIER_CONFIG_CHANGED.equals(intent.getAction())) {
+            return;
+        }
+
+        final int subId = intent.getIntExtra(EXTRA_SUBSCRIPTION_INDEX, INVALID_SUBSCRIPTION_ID);
+        final int slotId = intent.getIntExtra(EXTRA_SLOT_INDEX, INVALID_SIM_SLOT_INDEX);
+
+        if (slotId == INVALID_SIM_SLOT_INDEX) {
+            return;
+        }
+
+        if (SubscriptionManager.isValidSubscriptionId(subId)) {
+            final PersistableBundle carrierConfigs = mCarrierConfigManager.getConfigForSubId(subId);
+            if (mDeps.isConfigForIdentifiedCarrier(carrierConfigs)) {
+                Slog.v(TAG, String.format("SubId %s ready for SlotId %s", subId, slotId));
+                mReadySubIdsBySlotId.put(slotId, subId);
+                handleSubscriptionsChanged();
+            }
+        } else {
+            Slog.v(TAG, "Slot unloaded: " + slotId);
+            mReadySubIdsBySlotId.remove(slotId);
+            handleSubscriptionsChanged();
+        }
+    }
+
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    void setReadySubIdsBySlotId(Map<Integer, Integer> readySubIdsBySlotId) {
+        mReadySubIdsBySlotId.putAll(readySubIdsBySlotId);
+    }
+
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    Map<Integer, Integer> getReadySubIdsBySlotId() {
+        return Collections.unmodifiableMap(mReadySubIdsBySlotId);
+    }
+
+    /** TelephonySubscriptionSnapshot is a class containing info about active subscriptions */
+    public static class TelephonySubscriptionSnapshot {
+        private final Map<Integer, ParcelUuid> mSubIdToGroupMap;
+        private final Set<ParcelUuid> mActiveGroups;
+
+        @VisibleForTesting(visibility = Visibility.PRIVATE)
+        TelephonySubscriptionSnapshot(
+                @NonNull Map<Integer, ParcelUuid> subIdToGroupMap,
+                @NonNull Set<ParcelUuid> activeGroups) {
+            mSubIdToGroupMap = Collections.unmodifiableMap(
+                    Objects.requireNonNull(subIdToGroupMap, "subIdToGroupMap was null"));
+            mActiveGroups = Collections.unmodifiableSet(
+                    Objects.requireNonNull(activeGroups, "activeGroups was null"));
+        }
+
+        /** Returns the active subscription groups */
+        @NonNull
+        public Set<ParcelUuid> getActiveSubscriptionGroups() {
+            return mActiveGroups;
+        }
+
+        /** Returns the Subscription Group for a given subId. */
+        @Nullable
+        public ParcelUuid getGroupForSubId(int subId) {
+            return mSubIdToGroupMap.get(subId);
+        }
+
+        /**
+         * Returns all the subIds in a given group, including available, but inactive subscriptions.
+         */
+        @NonNull
+        public Set<Integer> getAllSubIdsInGroup(ParcelUuid subGrp) {
+            final Set<Integer> subIds = new ArraySet<>();
+
+            for (Entry<Integer, ParcelUuid> entry : mSubIdToGroupMap.entrySet()) {
+                if (subGrp.equals(entry.getValue())) {
+                    subIds.add(entry.getKey());
+                }
+            }
+
+            return subIds;
+        }
+
+        @Override
+        public int hashCode() {
+            return Objects.hash(mSubIdToGroupMap, mActiveGroups);
+        }
+
+        @Override
+        public boolean equals(Object obj) {
+            if (!(obj instanceof TelephonySubscriptionSnapshot)) {
+                return false;
+            }
+
+            final TelephonySubscriptionSnapshot other = (TelephonySubscriptionSnapshot) obj;
+
+            return mSubIdToGroupMap.equals(other.mSubIdToGroupMap)
+                    && mActiveGroups.equals(other.mActiveGroups);
+        }
+    }
+
+    /**
+     * Interface for listening to changes in subscriptions
+     *
+     * @see TelephonySubscriptionTracker
+     */
+    public interface TelephonySubscriptionTrackerCallback {
+        /**
+         * Called when subscription information changes, and a new subscription snapshot was taken
+         *
+         * @param snapshot the snapshot of subscription information.
+         */
+        void onNewSnapshot(@NonNull TelephonySubscriptionSnapshot snapshot);
+    }
+
+    /** External static dependencies for test injection */
+    @VisibleForTesting(visibility = Visibility.PRIVATE)
+    public static class Dependencies {
+        /** Checks if the given bundle is for an identified carrier */
+        public boolean isConfigForIdentifiedCarrier(PersistableBundle bundle) {
+            return CarrierConfigManager.isConfigForIdentifiedCarrier(bundle);
+        }
+    }
+}
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/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index b67e648..dc4caf8 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -1670,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;
@@ -2557,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.
@@ -4746,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/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/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java
index 3d39eb0..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);
     }
@@ -454,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 0d2f57e..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) {
@@ -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/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 660d389..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;
     }
 
@@ -2052,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..4f95696 100644
--- a/services/core/jni/Android.bp
+++ b/services/core/jni/Android.bp
@@ -43,7 +43,6 @@
         "com_android_server_stats_pull_StatsPullAtomService.cpp",
         "com_android_server_storage_AppFuseBridge.cpp",
         "com_android_server_SystemServer.cpp",
-        "com_android_server_TestNetworkService.cpp",
         "com_android_server_tv_TvUinputBridge.cpp",
         "com_android_server_tv_TvInputHal.cpp",
         "com_android_server_vr_VrManagerService.cpp",
@@ -59,8 +58,6 @@
         "com_android_server_pm_PackageManagerShellCommandDataLoader.cpp",
         "onload.cpp",
         ":lib_networkStatsFactory_native",
-        // TODO: move the file below to the connectivity APEX
-        "com_android_server_connectivity_Vpn.cpp",
     ],
 
     include_dirs: [
@@ -106,6 +103,7 @@
         "libkeystore_binder",
         "libmtp",
         "libnativehelper",
+        "libprocessgroup",
         "libutils",
         "libui",
         "libinput",
@@ -170,6 +168,7 @@
 
     static_libs: [
         "android.hardware.broadcastradio@common-utils-1x-lib",
+        "libservice-connectivity-static",
     ],
 
     product_variables: {
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_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/com_android_server_connectivity_Vpn.cpp b/services/core/jni/com_android_server_connectivity_Vpn.cpp
deleted file mode 100644
index 836d6d8..0000000
--- a/services/core/jni/com_android_server_connectivity_Vpn.cpp
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT 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_NDEBUG 0
-
-#define LOG_TAG "VpnJni"
-
-#include <arpa/inet.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <linux/if.h>
-#include <linux/if_tun.h>
-#include <linux/route.h>
-#include <linux/ipv6_route.h>
-#include <netinet/in.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include <log/log.h>
-
-#include "netutils/ifc.h"
-
-#include "jni.h"
-#include <nativehelper/JNIHelp.h>
-
-namespace android
-{
-
-static int inet4 = -1;
-static int inet6 = -1;
-
-static inline in_addr_t *as_in_addr(sockaddr *sa) {
-    return &((sockaddr_in *)sa)->sin_addr.s_addr;
-}
-
-//------------------------------------------------------------------------------
-
-#define SYSTEM_ERROR (-1)
-#define BAD_ARGUMENT (-2)
-
-static int create_interface(int mtu)
-{
-    int tun = open("/dev/tun", O_RDWR | O_NONBLOCK | O_CLOEXEC);
-
-    ifreq ifr4;
-    memset(&ifr4, 0, sizeof(ifr4));
-
-    // Allocate interface.
-    ifr4.ifr_flags = IFF_TUN | IFF_NO_PI;
-    if (ioctl(tun, TUNSETIFF, &ifr4)) {
-        ALOGE("Cannot allocate TUN: %s", strerror(errno));
-        goto error;
-    }
-
-    // Activate interface.
-    ifr4.ifr_flags = IFF_UP;
-    if (ioctl(inet4, SIOCSIFFLAGS, &ifr4)) {
-        ALOGE("Cannot activate %s: %s", ifr4.ifr_name, strerror(errno));
-        goto error;
-    }
-
-    // Set MTU if it is specified.
-    ifr4.ifr_mtu = mtu;
-    if (mtu > 0 && ioctl(inet4, SIOCSIFMTU, &ifr4)) {
-        ALOGE("Cannot set MTU on %s: %s", ifr4.ifr_name, strerror(errno));
-        goto error;
-    }
-
-    return tun;
-
-error:
-    close(tun);
-    return SYSTEM_ERROR;
-}
-
-static int get_interface_name(char *name, int tun)
-{
-    ifreq ifr4;
-    if (ioctl(tun, TUNGETIFF, &ifr4)) {
-        ALOGE("Cannot get interface name: %s", strerror(errno));
-        return SYSTEM_ERROR;
-    }
-    strncpy(name, ifr4.ifr_name, IFNAMSIZ);
-    return 0;
-}
-
-static int get_interface_index(const char *name)
-{
-    ifreq ifr4;
-    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
-    if (ioctl(inet4, SIOGIFINDEX, &ifr4)) {
-        ALOGE("Cannot get index of %s: %s", name, strerror(errno));
-        return SYSTEM_ERROR;
-    }
-    return ifr4.ifr_ifindex;
-}
-
-static int set_addresses(const char *name, const char *addresses)
-{
-    int index = get_interface_index(name);
-    if (index < 0) {
-        return index;
-    }
-
-    ifreq ifr4;
-    memset(&ifr4, 0, sizeof(ifr4));
-    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
-    ifr4.ifr_addr.sa_family = AF_INET;
-    ifr4.ifr_netmask.sa_family = AF_INET;
-
-    in6_ifreq ifr6;
-    memset(&ifr6, 0, sizeof(ifr6));
-    ifr6.ifr6_ifindex = index;
-
-    char address[65];
-    int prefix;
-    int chars;
-    int count = 0;
-
-    while (sscanf(addresses, " %64[^/]/%d %n", address, &prefix, &chars) == 2) {
-        addresses += chars;
-
-        if (strchr(address, ':')) {
-            // Add an IPv6 address.
-            if (inet_pton(AF_INET6, address, &ifr6.ifr6_addr) != 1 ||
-                    prefix < 0 || prefix > 128) {
-                count = BAD_ARGUMENT;
-                break;
-            }
-
-            ifr6.ifr6_prefixlen = prefix;
-            if (ioctl(inet6, SIOCSIFADDR, &ifr6)) {
-                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
-                break;
-            }
-        } else {
-            // Add an IPv4 address.
-            if (inet_pton(AF_INET, address, as_in_addr(&ifr4.ifr_addr)) != 1 ||
-                    prefix < 0 || prefix > 32) {
-                count = BAD_ARGUMENT;
-                break;
-            }
-
-            if (count) {
-                snprintf(ifr4.ifr_name, sizeof(ifr4.ifr_name), "%s:%d", name, count);
-            }
-            if (ioctl(inet4, SIOCSIFADDR, &ifr4)) {
-                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
-                break;
-            }
-
-            in_addr_t mask = prefix ? (~0 << (32 - prefix)) : 0;
-            *as_in_addr(&ifr4.ifr_netmask) = htonl(mask);
-            if (ioctl(inet4, SIOCSIFNETMASK, &ifr4)) {
-                count = (errno == EINVAL) ? BAD_ARGUMENT : SYSTEM_ERROR;
-                break;
-            }
-        }
-        ALOGD("Address added on %s: %s/%d", name, address, prefix);
-        ++count;
-    }
-
-    if (count == BAD_ARGUMENT) {
-        ALOGE("Invalid address: %s/%d", address, prefix);
-    } else if (count == SYSTEM_ERROR) {
-        ALOGE("Cannot add address: %s/%d: %s", address, prefix, strerror(errno));
-    } else if (*addresses) {
-        ALOGE("Invalid address: %s", addresses);
-        count = BAD_ARGUMENT;
-    }
-
-    return count;
-}
-
-static int reset_interface(const char *name)
-{
-    ifreq ifr4;
-    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
-    ifr4.ifr_flags = 0;
-
-    if (ioctl(inet4, SIOCSIFFLAGS, &ifr4) && errno != ENODEV) {
-        ALOGE("Cannot reset %s: %s", name, strerror(errno));
-        return SYSTEM_ERROR;
-    }
-    return 0;
-}
-
-static int check_interface(const char *name)
-{
-    ifreq ifr4;
-    strncpy(ifr4.ifr_name, name, IFNAMSIZ);
-    ifr4.ifr_flags = 0;
-
-    if (ioctl(inet4, SIOCGIFFLAGS, &ifr4) && errno != ENODEV) {
-        ALOGE("Cannot check %s: %s", name, strerror(errno));
-    }
-    return ifr4.ifr_flags;
-}
-
-static bool modifyAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
-                          jint jPrefixLength, bool add)
-{
-    int error = SYSTEM_ERROR;
-    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
-    const char *address = jAddress ? env->GetStringUTFChars(jAddress, NULL) : NULL;
-
-    if (!name) {
-        jniThrowNullPointerException(env, "name");
-    } else if (!address) {
-        jniThrowNullPointerException(env, "address");
-    } else {
-        if (add) {
-            if ((error = ifc_add_address(name, address, jPrefixLength)) != 0) {
-                ALOGE("Cannot add address %s/%d on interface %s (%s)", address, jPrefixLength, name,
-                      strerror(-error));
-            }
-        } else {
-            if ((error = ifc_del_address(name, address, jPrefixLength)) != 0) {
-                ALOGE("Cannot del address %s/%d on interface %s (%s)", address, jPrefixLength, name,
-                      strerror(-error));
-            }
-        }
-    }
-
-    if (name) {
-        env->ReleaseStringUTFChars(jName, name);
-    }
-    if (address) {
-        env->ReleaseStringUTFChars(jAddress, address);
-    }
-    return !error;
-}
-
-//------------------------------------------------------------------------------
-
-static void throwException(JNIEnv *env, int error, const char *message)
-{
-    if (error == SYSTEM_ERROR) {
-        jniThrowException(env, "java/lang/IllegalStateException", message);
-    } else {
-        jniThrowException(env, "java/lang/IllegalArgumentException", message);
-    }
-}
-
-static jint create(JNIEnv *env, jobject /* thiz */, jint mtu)
-{
-    int tun = create_interface(mtu);
-    if (tun < 0) {
-        throwException(env, tun, "Cannot create interface");
-        return -1;
-    }
-    return tun;
-}
-
-static jstring getName(JNIEnv *env, jobject /* thiz */, jint tun)
-{
-    char name[IFNAMSIZ];
-    if (get_interface_name(name, tun) < 0) {
-        throwException(env, SYSTEM_ERROR, "Cannot get interface name");
-        return NULL;
-    }
-    return env->NewStringUTF(name);
-}
-
-static jint setAddresses(JNIEnv *env, jobject /* thiz */, jstring jName,
-        jstring jAddresses)
-{
-    const char *name = NULL;
-    const char *addresses = NULL;
-    int count = -1;
-
-    name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
-    if (!name) {
-        jniThrowNullPointerException(env, "name");
-        goto error;
-    }
-    addresses = jAddresses ? env->GetStringUTFChars(jAddresses, NULL) : NULL;
-    if (!addresses) {
-        jniThrowNullPointerException(env, "addresses");
-        goto error;
-    }
-    count = set_addresses(name, addresses);
-    if (count < 0) {
-        throwException(env, count, "Cannot set address");
-        count = -1;
-    }
-
-error:
-    if (name) {
-        env->ReleaseStringUTFChars(jName, name);
-    }
-    if (addresses) {
-        env->ReleaseStringUTFChars(jAddresses, addresses);
-    }
-    return count;
-}
-
-static void reset(JNIEnv *env, jobject /* thiz */, jstring jName)
-{
-    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
-    if (!name) {
-        jniThrowNullPointerException(env, "name");
-        return;
-    }
-    if (reset_interface(name) < 0) {
-        throwException(env, SYSTEM_ERROR, "Cannot reset interface");
-    }
-    env->ReleaseStringUTFChars(jName, name);
-}
-
-static jint check(JNIEnv *env, jobject /* thiz */, jstring jName)
-{
-    const char *name = jName ? env->GetStringUTFChars(jName, NULL) : NULL;
-    if (!name) {
-        jniThrowNullPointerException(env, "name");
-        return 0;
-    }
-    int flags = check_interface(name);
-    env->ReleaseStringUTFChars(jName, name);
-    return flags;
-}
-
-static bool addAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
-                       jint jPrefixLength)
-{
-    return modifyAddress(env, thiz, jName, jAddress, jPrefixLength, true);
-}
-
-static bool delAddress(JNIEnv *env, jobject thiz, jstring jName, jstring jAddress,
-                       jint jPrefixLength)
-{
-    return modifyAddress(env, thiz, jName, jAddress, jPrefixLength, false);
-}
-
-//------------------------------------------------------------------------------
-
-static const JNINativeMethod gMethods[] = {
-    {"jniCreate", "(I)I", (void *)create},
-    {"jniGetName", "(I)Ljava/lang/String;", (void *)getName},
-    {"jniSetAddresses", "(Ljava/lang/String;Ljava/lang/String;)I", (void *)setAddresses},
-    {"jniReset", "(Ljava/lang/String;)V", (void *)reset},
-    {"jniCheck", "(Ljava/lang/String;)I", (void *)check},
-    {"jniAddAddress", "(Ljava/lang/String;Ljava/lang/String;I)Z", (void *)addAddress},
-    {"jniDelAddress", "(Ljava/lang/String;Ljava/lang/String;I)Z", (void *)delAddress},
-};
-
-int register_android_server_connectivity_Vpn(JNIEnv *env)
-{
-    if (inet4 == -1) {
-        inet4 = socket(AF_INET, SOCK_DGRAM, 0);
-    }
-    if (inet6 == -1) {
-        inet6 = socket(AF_INET6, SOCK_DGRAM, 0);
-    }
-    return jniRegisterNativeMethods(env, "com/android/server/connectivity/Vpn",
-            gMethods, NELEM(gMethods));
-}
-
-};
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/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index faf3f06..43537d0 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -195,7 +195,6 @@
 import android.media.IAudioService;
 import android.net.ConnectivityManager;
 import android.net.IIpConnectivityMetrics;
-import android.net.NetworkUtils;
 import android.net.ProxyInfo;
 import android.net.Uri;
 import android.net.metrics.IpConnectivityLog;
@@ -267,6 +266,7 @@
 import com.android.internal.compat.IPlatformCompat;
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
+import com.android.internal.net.NetworkUtilsInternal;
 import com.android.internal.notification.SystemNotificationChannels;
 import com.android.internal.os.BackgroundThread;
 import com.android.internal.statusbar.IStatusBarService;
@@ -285,6 +285,7 @@
 import com.android.internal.widget.LockSettingsInternal;
 import com.android.internal.widget.LockscreenCredential;
 import com.android.internal.widget.PasswordValidationError;
+import com.android.net.module.util.ProxyUtils;
 import com.android.server.LocalServices;
 import com.android.server.LockGuard;
 import com.android.server.PersistentDataBlockManagerInternal;
@@ -7759,7 +7760,8 @@
         }
         exclusionList = exclusionList.trim();
 
-        ProxyInfo proxyProperties = new ProxyInfo(data[0], proxyPort, exclusionList);
+        ProxyInfo proxyProperties = ProxyInfo.buildDirectProxy(data[0], proxyPort,
+                ProxyUtils.exclusionStringAsList(exclusionList));
         if (!proxyProperties.isValid()) {
             Slog.e(LOG_TAG, "Invalid proxy properties, ignoring: " + proxyProperties.toString());
             return;
@@ -15540,7 +15542,7 @@
                 return PRIVATE_DNS_SET_NO_ERROR;
             case PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
                 if (TextUtils.isEmpty(privateDnsHost)
-                        || !NetworkUtils.isWeaklyValidatedHostname(privateDnsHost)) {
+                        || !NetworkUtilsInternal.isWeaklyValidatedHostname(privateDnsHost)) {
                     throw new IllegalArgumentException(
                             String.format("Provided hostname %s is not valid", privateDnsHost));
                 }
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index f3940e6..d07e70c 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -476,6 +476,9 @@
         if (!mkdirOrLog(path::join(backing, ".index"), 0777)) {
             return kInvalidStorageId;
         }
+        if (!mkdirOrLog(path::join(backing, ".incomplete"), 0777)) {
+            return kInvalidStorageId;
+        }
         auto status = mVold->mountIncFs(backing, mountTarget, 0, &controlParcel);
         if (!status.isOk()) {
             LOG(ERROR) << "Vold::mountIncFs() failed: " << status.toString8();
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/net/Android.bp b/services/net/Android.bp
index 29bf374..eaf177e 100644
--- a/services/net/Android.bp
+++ b/services/net/Android.bp
@@ -37,7 +37,6 @@
         "java/android/net/util/NetworkConstants.java",
         "java/android/net/IpMemoryStore.java",
         "java/android/net/NetworkMonitorManager.java",
-        "java/android/net/TcpKeepalivePacketData.java",
     ],
     sdk_version: "module_current",
     min_sdk_version: "30",
@@ -58,6 +57,8 @@
     visibility: [
         "//frameworks/opt/net/wifi/service",
         "//frameworks/opt/net/wifi/tests/wifitests",
+        "//packages/modules/Wifi/service",
+        "//packages/modules/Wifi/service/tests/wifitests",
     ],
 }
 
diff --git a/services/net/java/android/net/TcpKeepalivePacketData.java b/services/net/java/android/net/TcpKeepalivePacketData.java
deleted file mode 100644
index 4875c7c..0000000
--- a/services/net/java/android/net/TcpKeepalivePacketData.java
+++ /dev/null
@@ -1,268 +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;
-
-import static android.net.SocketKeepalive.ERROR_INVALID_IP_ADDRESS;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.system.OsConstants;
-
-import com.android.net.module.util.IpUtils;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Objects;
-
-/**
- * Represents the actual tcp keep alive packets which will be used for hardware offload.
- * @hide
- */
-public class TcpKeepalivePacketData extends KeepalivePacketData implements Parcelable {
-    private static final String TAG = "TcpKeepalivePacketData";
-
-    /** TCP sequence number. */
-    public final int tcpSeq;
-
-    /** TCP ACK number. */
-    public final int tcpAck;
-
-    /** TCP RCV window. */
-    public final int tcpWnd;
-
-    /** TCP RCV window scale. */
-    public final int tcpWndScale;
-
-    /** IP TOS. */
-    public final int ipTos;
-
-    /** IP TTL. */
-    public final int ipTtl;
-
-    private static final int IPV4_HEADER_LENGTH = 20;
-    private static final int IPV6_HEADER_LENGTH = 40;
-    private static final int TCP_HEADER_LENGTH = 20;
-
-    // This should only be constructed via static factory methods, such as
-    // tcpKeepalivePacket.
-    private TcpKeepalivePacketData(final TcpKeepalivePacketDataParcelable tcpDetails,
-            final byte[] data) throws InvalidPacketException, UnknownHostException {
-        super(InetAddress.getByAddress(tcpDetails.srcAddress), tcpDetails.srcPort,
-                InetAddress.getByAddress(tcpDetails.dstAddress), tcpDetails.dstPort, data);
-        tcpSeq = tcpDetails.seq;
-        tcpAck = tcpDetails.ack;
-        // In the packet, the window is shifted right by the window scale.
-        tcpWnd = tcpDetails.rcvWnd;
-        tcpWndScale = tcpDetails.rcvWndScale;
-        ipTos = tcpDetails.tos;
-        ipTtl = tcpDetails.ttl;
-    }
-
-    private TcpKeepalivePacketData(final InetAddress srcAddress, int srcPort,
-            final InetAddress dstAddress, int dstPort, final byte[] data, int tcpSeq,
-            int tcpAck, int tcpWnd, int tcpWndScale, int ipTos, int ipTtl)
-            throws InvalidPacketException {
-        super(srcAddress, srcPort, dstAddress, dstPort, data);
-        this.tcpSeq = tcpSeq;
-        this.tcpAck = tcpAck;
-        this.tcpWnd = tcpWnd;
-        this.tcpWndScale = tcpWndScale;
-        this.ipTos = ipTos;
-        this.ipTtl = ipTtl;
-    }
-
-    /**
-     * Factory method to create tcp keepalive packet structure.
-     */
-    public static TcpKeepalivePacketData tcpKeepalivePacket(
-            TcpKeepalivePacketDataParcelable tcpDetails) throws InvalidPacketException {
-        final byte[] packet;
-        try {
-            if ((tcpDetails.srcAddress != null) && (tcpDetails.dstAddress != null)
-                    && (tcpDetails.srcAddress.length == 4 /* V4 IP length */)
-                    && (tcpDetails.dstAddress.length == 4 /* V4 IP length */)) {
-                packet = buildV4Packet(tcpDetails);
-            } else {
-                // TODO: support ipv6
-                throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
-            }
-            return new TcpKeepalivePacketData(tcpDetails, packet);
-        } catch (UnknownHostException e) {
-            throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
-        }
-
-    }
-
-    /**
-     * Build ipv4 tcp keepalive packet, not including the link-layer header.
-     */
-    // TODO : if this code is ever moved to the network stack, factorize constants with the ones
-    // over there.
-    private static byte[] buildV4Packet(TcpKeepalivePacketDataParcelable tcpDetails) {
-        final int length = IPV4_HEADER_LENGTH + TCP_HEADER_LENGTH;
-        ByteBuffer buf = ByteBuffer.allocate(length);
-        buf.order(ByteOrder.BIG_ENDIAN);
-        buf.put((byte) 0x45);                       // IP version and IHL
-        buf.put((byte) tcpDetails.tos);             // TOS
-        buf.putShort((short) length);
-        buf.putInt(0x00004000);                     // ID, flags=DF, offset
-        buf.put((byte) tcpDetails.ttl);             // TTL
-        buf.put((byte) OsConstants.IPPROTO_TCP);
-        final int ipChecksumOffset = buf.position();
-        buf.putShort((short) 0);                    // IP checksum
-        buf.put(tcpDetails.srcAddress);
-        buf.put(tcpDetails.dstAddress);
-        buf.putShort((short) tcpDetails.srcPort);
-        buf.putShort((short) tcpDetails.dstPort);
-        buf.putInt(tcpDetails.seq);                 // Sequence Number
-        buf.putInt(tcpDetails.ack);                 // ACK
-        buf.putShort((short) 0x5010);               // TCP length=5, flags=ACK
-        buf.putShort((short) (tcpDetails.rcvWnd >> tcpDetails.rcvWndScale));   // Window size
-        final int tcpChecksumOffset = buf.position();
-        buf.putShort((short) 0);                    // TCP checksum
-        // URG is not set therefore the urgent pointer is zero.
-        buf.putShort((short) 0);                    // Urgent pointer
-
-        buf.putShort(ipChecksumOffset, IpUtils.ipChecksum(buf, 0));
-        buf.putShort(tcpChecksumOffset, IpUtils.tcpChecksum(
-                buf, 0, IPV4_HEADER_LENGTH, TCP_HEADER_LENGTH));
-
-        return buf.array();
-    }
-
-    // TODO: add buildV6Packet.
-
-    @Override
-    public boolean equals(@Nullable final Object o) {
-        if (!(o instanceof TcpKeepalivePacketData)) return false;
-        final TcpKeepalivePacketData other = (TcpKeepalivePacketData) o;
-        final InetAddress srcAddress = getSrcAddress();
-        final InetAddress dstAddress = getDstAddress();
-        return srcAddress.equals(other.getSrcAddress())
-                && dstAddress.equals(other.getDstAddress())
-                && getSrcPort() == other.getSrcPort()
-                && getDstPort() == other.getDstPort()
-                && this.tcpAck == other.tcpAck
-                && this.tcpSeq == other.tcpSeq
-                && this.tcpWnd == other.tcpWnd
-                && this.tcpWndScale == other.tcpWndScale
-                && this.ipTos == other.ipTos
-                && this.ipTtl == other.ipTtl;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(getSrcAddress(), getDstAddress(), getSrcPort(), getDstPort(),
-                tcpAck, tcpSeq, tcpWnd, tcpWndScale, ipTos, ipTtl);
-    }
-
-    /**
-     * Parcelable Implementation.
-     * Note that this object implements parcelable (and needs to keep doing this as it inherits
-     * from a class that does), but should usually be parceled as a stable parcelable using
-     * the toStableParcelable() and fromStableParcelable() methods.
-     */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Write to parcel. */
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeString(getSrcAddress().getHostAddress());
-        out.writeString(getDstAddress().getHostAddress());
-        out.writeInt(getSrcPort());
-        out.writeInt(getDstPort());
-        out.writeByteArray(getPacket());
-        out.writeInt(tcpSeq);
-        out.writeInt(tcpAck);
-        out.writeInt(tcpWnd);
-        out.writeInt(tcpWndScale);
-        out.writeInt(ipTos);
-        out.writeInt(ipTtl);
-    }
-
-    private static TcpKeepalivePacketData readFromParcel(Parcel in) throws InvalidPacketException {
-        InetAddress srcAddress = InetAddresses.parseNumericAddress(in.readString());
-        InetAddress dstAddress = InetAddresses.parseNumericAddress(in.readString());
-        int srcPort = in.readInt();
-        int dstPort = in.readInt();
-        byte[] packet = in.createByteArray();
-        int tcpSeq = in.readInt();
-        int tcpAck = in.readInt();
-        int tcpWnd = in.readInt();
-        int tcpWndScale = in.readInt();
-        int ipTos = in.readInt();
-        int ipTtl = in.readInt();
-        return new TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, packet, tcpSeq,
-                tcpAck, tcpWnd, tcpWndScale, ipTos, ipTtl);
-    }
-
-    /** Parcelable Creator. */
-    public static final @NonNull Parcelable.Creator<TcpKeepalivePacketData> CREATOR =
-            new Parcelable.Creator<TcpKeepalivePacketData>() {
-                public TcpKeepalivePacketData createFromParcel(Parcel in) {
-                    try {
-                        return readFromParcel(in);
-                    } catch (InvalidPacketException e) {
-                        throw new IllegalArgumentException(
-                                "Invalid NAT-T keepalive data: " + e.getError());
-                    }
-                }
-
-                public TcpKeepalivePacketData[] newArray(int size) {
-                    return new TcpKeepalivePacketData[size];
-                }
-            };
-
-    /**
-     * Convert this TcpKeepalivePacketData to a TcpKeepalivePacketDataParcelable.
-     */
-    @NonNull
-    public TcpKeepalivePacketDataParcelable toStableParcelable() {
-        final TcpKeepalivePacketDataParcelable parcel = new TcpKeepalivePacketDataParcelable();
-        final InetAddress srcAddress = getSrcAddress();
-        final InetAddress dstAddress = getDstAddress();
-        parcel.srcAddress = srcAddress.getAddress();
-        parcel.srcPort = getSrcPort();
-        parcel.dstAddress = dstAddress.getAddress();
-        parcel.dstPort = getDstPort();
-        parcel.seq = tcpSeq;
-        parcel.ack = tcpAck;
-        parcel.rcvWnd = tcpWnd;
-        parcel.rcvWndScale = tcpWndScale;
-        parcel.tos = ipTos;
-        parcel.ttl = ipTtl;
-        return parcel;
-    }
-
-    @Override
-    public String toString() {
-        return "saddr: " + getSrcAddress()
-                + " daddr: " + getDstAddress()
-                + " sport: " + getSrcPort()
-                + " dport: " + getDstPort()
-                + " seq: " + tcpSeq
-                + " ack: " + tcpAck
-                + " wnd: " + tcpWnd
-                + " wndScale: " + tcpWndScale
-                + " tos: " + ipTos
-                + " ttl: " + ipTtl;
-    }
-}
diff --git a/services/net/java/android/net/ip/IpClientManager.java b/services/net/java/android/net/ip/IpClientManager.java
index db464e7..274b6dc 100644
--- a/services/net/java/android/net/ip/IpClientManager.java
+++ b/services/net/java/android/net/ip/IpClientManager.java
@@ -21,6 +21,7 @@
 import android.net.NattKeepalivePacketData;
 import android.net.ProxyInfo;
 import android.net.TcpKeepalivePacketData;
+import android.net.TcpKeepalivePacketDataParcelable;
 import android.net.shared.Layer2Information;
 import android.net.shared.ProvisioningConfiguration;
 import android.net.util.KeepalivePacketDataUtil;
@@ -215,9 +216,20 @@
      * Add a TCP keepalive packet filter before setting up keepalive offload.
      */
     public boolean addKeepalivePacketFilter(int slot, TcpKeepalivePacketData pkt) {
+        return addKeepalivePacketFilter(slot, KeepalivePacketDataUtil.toStableParcelable(pkt));
+    }
+
+    /**
+     * Add a TCP keepalive packet filter before setting up keepalive offload.
+     * @deprecated This method is for use on pre-S platforms where TcpKeepalivePacketData is not
+     *             system API. On newer platforms use
+     *             addKeepalivePacketFilter(int, TcpKeepalivePacketData) instead.
+     */
+    @Deprecated
+    public boolean addKeepalivePacketFilter(int slot, TcpKeepalivePacketDataParcelable pkt) {
         final long token = Binder.clearCallingIdentity();
         try {
-            mIpClient.addKeepalivePacketFilter(slot, pkt.toStableParcelable());
+            mIpClient.addKeepalivePacketFilter(slot, pkt);
             return true;
         } catch (RemoteException e) {
             log("Error adding Keepalive Packet Filter ", e);
diff --git a/services/net/java/android/net/util/KeepalivePacketDataUtil.java b/services/net/java/android/net/util/KeepalivePacketDataUtil.java
index 4466ea0..6e539bb 100644
--- a/services/net/java/android/net/util/KeepalivePacketDataUtil.java
+++ b/services/net/java/android/net/util/KeepalivePacketDataUtil.java
@@ -16,20 +16,47 @@
 
 package android.net.util;
 
+import static android.net.SocketKeepalive.ERROR_INVALID_IP_ADDRESS;
+
 import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.net.InvalidPacketException;
+import android.net.KeepalivePacketData;
 import android.net.NattKeepalivePacketData;
 import android.net.NattKeepalivePacketDataParcelable;
+import android.net.TcpKeepalivePacketData;
+import android.net.TcpKeepalivePacketDataParcelable;
+import android.os.Build;
+import android.system.OsConstants;
+import android.util.Log;
+
+import com.android.net.module.util.IpUtils;
 
 import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
 
-/** @hide */
+/**
+ * Utility class to convert to/from keepalive data parcelables.
+ *
+ * TODO: move to networkstack-client library when it is moved to frameworks/libs/net.
+ * This class cannot go into other shared libraries as it depends on NetworkStack AIDLs.
+ * @hide
+ */
 public final class KeepalivePacketDataUtil {
-     /**
-     * Convert this NattKeepalivePacketData to a NattKeepalivePacketDataParcelable.
+    private static final int IPV4_HEADER_LENGTH = 20;
+    private static final int IPV6_HEADER_LENGTH = 40;
+    private static final int TCP_HEADER_LENGTH = 20;
+
+    private static final String TAG = KeepalivePacketDataUtil.class.getSimpleName();
+
+    /**
+     * Convert a NattKeepalivePacketData to a NattKeepalivePacketDataParcelable.
      */
     @NonNull
     public static NattKeepalivePacketDataParcelable toStableParcelable(
-            NattKeepalivePacketData pkt) {
+            @NonNull NattKeepalivePacketData pkt) {
         final NattKeepalivePacketDataParcelable parcel = new NattKeepalivePacketDataParcelable();
         final InetAddress srcAddress = pkt.getSrcAddress();
         final InetAddress dstAddress = pkt.getDstAddress();
@@ -39,4 +66,158 @@
         parcel.dstPort = pkt.getDstPort();
         return parcel;
     }
+
+    /**
+     * Convert a TcpKeepalivePacketData to a TcpKeepalivePacketDataParcelable.
+     */
+    @NonNull
+    public static TcpKeepalivePacketDataParcelable toStableParcelable(
+            @NonNull TcpKeepalivePacketData pkt) {
+        final TcpKeepalivePacketDataParcelable parcel = new TcpKeepalivePacketDataParcelable();
+        final InetAddress srcAddress = pkt.getSrcAddress();
+        final InetAddress dstAddress = pkt.getDstAddress();
+        parcel.srcAddress = srcAddress.getAddress();
+        parcel.srcPort = pkt.getSrcPort();
+        parcel.dstAddress = dstAddress.getAddress();
+        parcel.dstPort = pkt.getDstPort();
+        parcel.seq = pkt.tcpSeq;
+        parcel.ack = pkt.tcpAck;
+        parcel.rcvWnd = pkt.tcpWindow;
+        parcel.rcvWndScale = pkt.tcpWindowScale;
+        parcel.tos = pkt.ipTos;
+        parcel.ttl = pkt.ipTtl;
+        return parcel;
+    }
+
+    /**
+     * Factory method to create tcp keepalive packet structure.
+     * @hide
+     */
+    public static TcpKeepalivePacketData fromStableParcelable(
+            TcpKeepalivePacketDataParcelable tcpDetails) throws InvalidPacketException {
+        final byte[] packet;
+        try {
+            if ((tcpDetails.srcAddress != null) && (tcpDetails.dstAddress != null)
+                    && (tcpDetails.srcAddress.length == 4 /* V4 IP length */)
+                    && (tcpDetails.dstAddress.length == 4 /* V4 IP length */)) {
+                packet = buildV4Packet(tcpDetails);
+            } else {
+                // TODO: support ipv6
+                throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
+            }
+            return new TcpKeepalivePacketData(
+                    InetAddress.getByAddress(tcpDetails.srcAddress),
+                    tcpDetails.srcPort,
+                    InetAddress.getByAddress(tcpDetails.dstAddress),
+                    tcpDetails.dstPort,
+                    packet,
+                    tcpDetails.seq, tcpDetails.ack, tcpDetails.rcvWnd, tcpDetails.rcvWndScale,
+                    tcpDetails.tos, tcpDetails.ttl);
+        } catch (UnknownHostException e) {
+            throw new InvalidPacketException(ERROR_INVALID_IP_ADDRESS);
+        }
+
+    }
+
+    /**
+     * Build ipv4 tcp keepalive packet, not including the link-layer header.
+     */
+    // TODO : if this code is ever moved to the network stack, factorize constants with the ones
+    // over there.
+    private static byte[] buildV4Packet(TcpKeepalivePacketDataParcelable tcpDetails) {
+        final int length = IPV4_HEADER_LENGTH + TCP_HEADER_LENGTH;
+        ByteBuffer buf = ByteBuffer.allocate(length);
+        buf.order(ByteOrder.BIG_ENDIAN);
+        buf.put((byte) 0x45);                       // IP version and IHL
+        buf.put((byte) tcpDetails.tos);             // TOS
+        buf.putShort((short) length);
+        buf.putInt(0x00004000);                     // ID, flags=DF, offset
+        buf.put((byte) tcpDetails.ttl);             // TTL
+        buf.put((byte) OsConstants.IPPROTO_TCP);
+        final int ipChecksumOffset = buf.position();
+        buf.putShort((short) 0);                    // IP checksum
+        buf.put(tcpDetails.srcAddress);
+        buf.put(tcpDetails.dstAddress);
+        buf.putShort((short) tcpDetails.srcPort);
+        buf.putShort((short) tcpDetails.dstPort);
+        buf.putInt(tcpDetails.seq);                 // Sequence Number
+        buf.putInt(tcpDetails.ack);                 // ACK
+        buf.putShort((short) 0x5010);               // TCP length=5, flags=ACK
+        buf.putShort((short) (tcpDetails.rcvWnd >> tcpDetails.rcvWndScale));   // Window size
+        final int tcpChecksumOffset = buf.position();
+        buf.putShort((short) 0);                    // TCP checksum
+        // URG is not set therefore the urgent pointer is zero.
+        buf.putShort((short) 0);                    // Urgent pointer
+
+        buf.putShort(ipChecksumOffset, com.android.net.module.util.IpUtils.ipChecksum(buf, 0));
+        buf.putShort(tcpChecksumOffset, IpUtils.tcpChecksum(
+                buf, 0, IPV4_HEADER_LENGTH, TCP_HEADER_LENGTH));
+
+        return buf.array();
+    }
+
+    // TODO: add buildV6Packet.
+
+    /**
+     * Get a {@link TcpKeepalivePacketDataParcelable} from {@link KeepalivePacketData}, if the
+     * generic class actually contains TCP keepalive data.
+     *
+     * @deprecated This method is used on R platforms where android.net.TcpKeepalivePacketData was
+     * not yet system API. Newer platforms should use android.net.TcpKeepalivePacketData directly.
+     *
+     * @param data A {@link KeepalivePacketData} that may contain TCP keepalive data.
+     * @return A parcelable containing TCP keepalive data, or null if the input data does not
+     *         contain TCP keepalive data.
+     */
+    @Deprecated
+    @SuppressWarnings("AndroidFrameworkCompatChange") // API version check used to Log.wtf
+    @Nullable
+    public static TcpKeepalivePacketDataParcelable parseTcpKeepalivePacketData(
+            @Nullable KeepalivePacketData data) {
+        if (data == null) return null;
+
+        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
+            Log.wtf(TAG, "parseTcpKeepalivePacketData should not be used after R, use "
+                    + "TcpKeepalivePacketData instead.");
+        }
+
+        // Reconstruct TcpKeepalivePacketData from the packet contained in KeepalivePacketData
+        final ByteBuffer buffer = ByteBuffer.wrap(data.getPacket());
+        buffer.order(ByteOrder.BIG_ENDIAN);
+
+        // Most of the fields are accessible from the KeepalivePacketData superclass: instead of
+        // using Struct to parse everything, just extract the extra fields necessary for
+        // TcpKeepalivePacketData.
+        final int tcpSeq;
+        final int tcpAck;
+        final int wndSize;
+        final int ipTos;
+        final int ttl;
+        try {
+            // This only support IPv4, because TcpKeepalivePacketData only supports IPv4 for R and
+            // below, and this method should not be used on newer platforms.
+            tcpSeq = buffer.getInt(IPV4_HEADER_LENGTH + 4);
+            tcpAck = buffer.getInt(IPV4_HEADER_LENGTH + 8);
+            wndSize = buffer.getShort(IPV4_HEADER_LENGTH + 14);
+            ipTos = buffer.get(1);
+            ttl = buffer.get(8);
+        } catch (IndexOutOfBoundsException e) {
+            return null;
+        }
+
+        final TcpKeepalivePacketDataParcelable p = new TcpKeepalivePacketDataParcelable();
+        p.srcAddress = data.getSrcAddress().getAddress();
+        p.srcPort = data.getSrcPort();
+        p.dstAddress = data.getDstAddress().getAddress();
+        p.dstPort = data.getDstPort();
+        p.seq = tcpSeq;
+        p.ack = tcpAck;
+        // TcpKeepalivePacketData could actually use non-zero wndScale, but this does not affect
+        // actual functionality as generated packets will be the same (no wndScale option added)
+        p.rcvWnd = wndSize;
+        p.rcvWndScale = 0;
+        p.tos = ipTos;
+        p.ttl = ttl;
+        return p;
+    }
 }
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/devicepolicy/OWNERS b/services/tests/mockingservicestests/src/com/android/server/devicepolicy/OWNERS
new file mode 100644
index 0000000..e95633a
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/devicepolicy/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/app/admin/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/location/OWNERS b/services/tests/mockingservicestests/src/com/android/server/location/OWNERS
new file mode 100644
index 0000000..696a0c2
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/location/OWNERS
@@ -0,0 +1 @@
+file:/location/java/android/location/OWNERS
diff --git a/services/tests/mockingservicestests/src/com/android/server/pm/OWNERS b/services/tests/mockingservicestests/src/com/android/server/pm/OWNERS
new file mode 100644
index 0000000..d825dfd
--- /dev/null
+++ b/services/tests/mockingservicestests/src/com/android/server/pm/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/pm/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/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowlisted-restrict-background-off.xml b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowed-restrict-background-off.xml
similarity index 100%
rename from services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowlisted-restrict-background-off.xml
rename to services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowed-restrict-background-off.xml
diff --git a/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowlisted-restrict-background-on.xml b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowed-restrict-background-on.xml
similarity index 100%
rename from services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowlisted-restrict-background-on.xml
rename to services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-allowed-restrict-background-on.xml
diff --git a/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denylisted-restrict-background-off.xml b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denied-restrict-background-off.xml
similarity index 100%
rename from services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denylisted-restrict-background-off.xml
rename to services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denied-restrict-background-off.xml
diff --git a/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denylisted-restrict-background-on.xml b/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denied-restrict-background-on.xml
similarity index 100%
rename from services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denylisted-restrict-background-on.xml
rename to services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/uidA-denied-restrict-background-on.xml
diff --git a/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS b/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS
new file mode 100644
index 0000000..28aff18
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/internal/location/timezone/OWNERS
@@ -0,0 +1,3 @@
+# Bug component: 847766
+nfuller@google.com
+include /core/java/android/app/timedetector/OWNERS
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/audio/NoOpAudioSystemAdapter.java b/services/tests/servicestests/src/com/android/server/audio/NoOpAudioSystemAdapter.java
index a9cef20..8d706cb 100644
--- a/services/tests/servicestests/src/com/android/server/audio/NoOpAudioSystemAdapter.java
+++ b/services/tests/servicestests/src/com/android/server/audio/NoOpAudioSystemAdapter.java
@@ -21,6 +21,8 @@
 import android.media.AudioSystem;
 import android.util.Log;
 
+import java.util.List;
+
 /**
  * Provides an adapter for AudioSystem that does nothing.
  * Overridden methods can be configured.
@@ -66,13 +68,30 @@
     }
 
     @Override
-    public int setPreferredDeviceForStrategy(int strategy,
-            @NonNull AudioDeviceAttributes device) {
+    public int setDevicesRoleForStrategy(int strategy, int role,
+            @NonNull List<AudioDeviceAttributes> devices) {
         return AudioSystem.AUDIO_STATUS_OK;
     }
 
     @Override
-    public int removePreferredDeviceForStrategy(int strategy) {
+    public int removeDevicesRoleForStrategy(int strategy, int role) {
+        return AudioSystem.AUDIO_STATUS_OK;
+    }
+
+    @Override
+    public int setDevicesRoleForCapturePreset(int capturePreset, int role,
+                                              @NonNull List<AudioDeviceAttributes> devices) {
+        return AudioSystem.AUDIO_STATUS_OK;
+    }
+
+    @Override
+    public int removeDevicesRoleForCapturePreset(
+            int capturePreset, int role, @NonNull List<AudioDeviceAttributes> devicesToRemove) {
+        return AudioSystem.AUDIO_STATUS_OK;
+    }
+
+    @Override
+    public int clearDevicesRoleForCapturePreset(int capturePreset, int role) {
         return AudioSystem.AUDIO_STATUS_OK;
     }
 
diff --git a/services/tests/servicestests/src/com/android/server/audio/OWNERS b/services/tests/servicestests/src/com/android/server/audio/OWNERS
new file mode 100644
index 0000000..894a1f5
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/audio/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/audio/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/CompatConfigTest.java b/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java
index e588370..8c63bfc 100644
--- a/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java
+++ b/services/tests/servicestests/src/com/android/server/compat/CompatConfigTest.java
@@ -190,6 +190,22 @@
     }
 
     @Test
+    public void testIsChangeEnabledForInvalidApp() throws Exception {
+        final long disabledChangeId = 1234L;
+        final long enabledChangeId = 1235L;
+        final long targetSdkChangeId = 1236L;
+        CompatConfig compatConfig = CompatConfigBuilder.create(mBuildClassifier, mContext)
+                .addEnabledChangeWithId(enabledChangeId)
+                .addDisabledChangeWithId(disabledChangeId)
+                .addEnableSinceSdkChangeWithId(42, targetSdkChangeId)
+                .build();
+
+        assertThat(compatConfig.isChangeEnabled(enabledChangeId, null)).isTrue();
+        assertThat(compatConfig.isChangeEnabled(disabledChangeId, null)).isFalse();
+        assertThat(compatConfig.isChangeEnabled(targetSdkChangeId, null)).isTrue();
+    }
+
+    @Test
     public void testPreventAddOverride() throws Exception {
         final long changeId = 1234L;
         CompatConfig compatConfig = CompatConfigBuilder.create(mBuildClassifier, mContext)
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/compat/PlatformCompatTest.java b/services/tests/servicestests/src/com/android/server/compat/PlatformCompatTest.java
index 64014ba..1d3b643 100644
--- a/services/tests/servicestests/src/com/android/server/compat/PlatformCompatTest.java
+++ b/services/tests/servicestests/src/com/android/server/compat/PlatformCompatTest.java
@@ -107,18 +107,20 @@
         mCompatConfig = CompatConfigBuilder.create(mBuildClassifier, mContext)
                 .addEnabledChangeWithId(1L)
                 .addDisabledChangeWithIdAndName(2L, "change2")
-                .addEnableAfterSdkChangeWithIdAndDescription(Build.VERSION_CODES.O, 3L, "desc")
-                .addEnableAfterSdkChangeWithId(Build.VERSION_CODES.P, 4L)
-                .addEnableAfterSdkChangeWithId(Build.VERSION_CODES.Q, 5L)
-                .addEnableAfterSdkChangeWithId(Build.VERSION_CODES.R, 6L)
+                .addEnableSinceSdkChangeWithIdAndDescription(Build.VERSION_CODES.O, 3L, "desc")
+                .addEnableSinceSdkChangeWithId(Build.VERSION_CODES.P, 4L)
+                .addEnableSinceSdkChangeWithId(Build.VERSION_CODES.Q, 5L)
+                .addEnableSinceSdkChangeWithId(Build.VERSION_CODES.R, 6L)
                 .addLoggingOnlyChangeWithId(7L)
                 .build();
         mPlatformCompat = new PlatformCompat(mContext, mCompatConfig);
         assertThat(mPlatformCompat.listUIChanges()).asList().containsExactly(
                 new CompatibilityChangeInfo(1L, "", -1, -1, false, false, ""),
                 new CompatibilityChangeInfo(2L, "change2", -1, -1, true, false, ""),
-                new CompatibilityChangeInfo(4L, "", Build.VERSION_CODES.P, -1, false, false, ""),
-                new CompatibilityChangeInfo(5L, "", Build.VERSION_CODES.Q, -1, false, false, ""));
+                new CompatibilityChangeInfo(5L, "", /*enableAfter*/ -1,
+                        /*enableSince*/ Build.VERSION_CODES.Q, false, false, ""),
+                new CompatibilityChangeInfo(6L, "", /*enableAfter*/ -1,
+                        /*enableSince*/ Build.VERSION_CODES.R, false, false, ""));
     }
 
     @Test
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/HdmiCecControllerTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
index 5d8131f..d905b69 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecControllerTest.java
@@ -28,6 +28,8 @@
 import static com.android.server.hdmi.Constants.ADDR_UNREGISTERED;
 
 import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static junit.framework.Assert.assertTrue;
 
 import android.content.Context;
 import android.hardware.tv.cec.V1_0.SendMessageResult;
@@ -189,4 +191,19 @@
         mTestLooper.dispatchAll();
         assertEquals(ADDR_UNREGISTERED, mLogicalAddress);
     }
+
+    @Test
+    public void testIsLanguage() {
+        assertTrue(HdmiCecController.isLanguage("en"));
+        assertTrue(HdmiCecController.isLanguage("eng"));
+        assertTrue(HdmiCecController.isLanguage("ger"));
+        assertTrue(HdmiCecController.isLanguage("zh"));
+        assertTrue(HdmiCecController.isLanguage("zhi"));
+        assertTrue(HdmiCecController.isLanguage("zho"));
+
+        assertFalse(HdmiCecController.isLanguage(null));
+        assertFalse(HdmiCecController.isLanguage(""));
+        assertFalse(HdmiCecController.isLanguage("e"));
+        assertFalse(HdmiCecController.isLanguage("一")); // language code must be ASCII
+    }
 }
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 24a01003..ae7f422 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
@@ -121,6 +121,16 @@
     }
 
     @Test
+    public void isValid_systemAudioModeRequest() {
+        assertMessageValidity("40:70:00:00").isEqualTo(OK);
+        assertMessageValidity("40:70").isEqualTo(OK);
+
+        assertMessageValidity("F0:70").isEqualTo(ERROR_SOURCE);
+        // Invalid physical address
+        assertMessageValidity("40:70:10:10").isEqualTo(ERROR_PARAMETER);
+    }
+
+    @Test
     public void isValid_setSystemAudioMode() {
         assertMessageValidity("40:72:00").isEqualTo(OK);
         assertMessageValidity("4F:72:01:03").isEqualTo(OK);
@@ -340,6 +350,8 @@
         assertMessageValidity("40:A2:14:09:12:28:4B:19:10:08:10:00").isEqualTo(ERROR_PARAMETER);
         // Invalid External PLug
         assertMessageValidity("04:A1:0C:08:15:05:04:1E:02:04:00").isEqualTo(ERROR_PARAMETER);
+        // Invalid Physical Address
+        assertMessageValidity("40:A2:14:09:12:28:4B:19:10:05:10:10").isEqualTo(ERROR_PARAMETER);
     }
 
     @Test
@@ -476,6 +488,51 @@
     }
 
     @Test
+    public void isValid_tunerDeviceStatus() {
+        // Displaying digital tuner
+        assertMessageValidity("40:07:00:00:11:CE:90:0F:00:78").isEqualTo(OK);
+        assertMessageValidity("40:07:80:10:13:0B:34:38").isEqualTo(OK);
+        assertMessageValidity("40:07:00:9A:06:F9:D3:E6").isEqualTo(OK);
+        assertMessageValidity("40:07:00:91:09:F4:40:C8").isEqualTo(OK);
+        // Not displaying tuner
+        assertMessageValidity("40:07:01").isEqualTo(OK);
+        assertMessageValidity("40:07:81:07:64:B9:02").isEqualTo(OK);
+        // Displaying analogue tuner
+        assertMessageValidity("40:07:02:00:13:0F:00:96").isEqualTo(OK);
+        assertMessageValidity("40:07:82:02:EA:60:1F").isEqualTo(OK);
+
+        assertMessageValidity("4F:07:00:00:11:CE:90:0F:00:78").isEqualTo(ERROR_DESTINATION);
+        assertMessageValidity("F0:07:82:02:EA:60:1F").isEqualTo(ERROR_SOURCE);
+        assertMessageValidity("40:07").isEqualTo(ERROR_PARAMETER_SHORT);
+
+        // Invalid display info
+        assertMessageValidity("40:07:09:A1:8C:17:51").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("40:07:A7:0C:29").isEqualTo(ERROR_PARAMETER);
+        // Invalid Digital Broadcast System
+        assertMessageValidity("40:07:00:14:11:CE:90:0F:00:78").isEqualTo(ERROR_PARAMETER);
+        // Invalid Digital Broadcast System
+        assertMessageValidity("40:07:80:A0:07:95:F1").isEqualTo(ERROR_PARAMETER);
+        // Insufficient data for ARIB Broadcast system
+        assertMessageValidity("40:07:00:00:11:CE:90:0F:00").isEqualTo(ERROR_PARAMETER);
+        // Insufficient data for ATSC Broadcast system
+        assertMessageValidity("40:07:80:10:13:0B:34").isEqualTo(ERROR_PARAMETER);
+        // Insufficient data for DVB Broadcast system
+        assertMessageValidity("40:07:00:18:BE:77:00:7D:01").isEqualTo(ERROR_PARAMETER);
+        // Invalid channel number format
+        assertMessageValidity("40:07:80:9A:10:F9:D3").isEqualTo(ERROR_PARAMETER);
+        // Insufficient data for 1 part channel number
+        assertMessageValidity("40:07:00:90:04:F7").isEqualTo(ERROR_PARAMETER);
+        // Insufficient data for 2 part channel number
+        assertMessageValidity("40:07:80:91:09:F4:40").isEqualTo(ERROR_PARAMETER);
+        // Invalid Analogue Broadcast type
+        assertMessageValidity("40:07:02:03:EA:60:1F").isEqualTo(ERROR_PARAMETER);
+        // Invalid Analogue Frequency
+        assertMessageValidity("40:07:82:00:FF:FF:00").isEqualTo(ERROR_PARAMETER);
+        // Invalid Broadcast system
+        assertMessageValidity("40:07:02:02:EA:60:20").isEqualTo(ERROR_PARAMETER);
+    }
+
+    @Test
     public void isValid_UserControlPressed() {
         assertMessageValidity("40:44:07").isEqualTo(OK);
         assertMessageValidity("40:44:52:A7").isEqualTo(OK);
@@ -518,6 +575,59 @@
         assertMessageValidity("40:44:57:40").isEqualTo(ERROR_PARAMETER);
     }
 
+    @Test
+    public void isValid_physicalAddress() {
+        assertMessageValidity("4F:82:10:00").isEqualTo(OK);
+        assertMessageValidity("4F:82:12:34").isEqualTo(OK);
+        assertMessageValidity("0F:82:00:00").isEqualTo(OK);
+        assertMessageValidity("40:9D:14:00").isEqualTo(OK);
+        assertMessageValidity("40:9D:10:00").isEqualTo(OK);
+        assertMessageValidity("0F:81:44:20").isEqualTo(OK);
+        assertMessageValidity("4F:81:13:10").isEqualTo(OK);
+        assertMessageValidity("4F:86:14:14").isEqualTo(OK);
+        assertMessageValidity("0F:86:15:24").isEqualTo(OK);
+
+        assertMessageValidity("4F:82:10").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("40:9D:14").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("0F:81:44").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("0F:86:15").isEqualTo(ERROR_PARAMETER_SHORT);
+
+        assertMessageValidity("4F:82:10:10").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("4F:82:10:06").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("40:9D:14:04").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("40:9D:10:01").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("0F:81:44:02").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("4F:81:13:05").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("4F:86:10:14").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("0F:86:10:24").isEqualTo(ERROR_PARAMETER);
+    }
+
+    @Test
+    public void isValid_reportPhysicalAddress() {
+        assertMessageValidity("4F:84:10:00:04").isEqualTo(OK);
+        assertMessageValidity("0F:84:00:00:00").isEqualTo(OK);
+
+        assertMessageValidity("4F:84:10:00").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("0F:84:00").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("40:84:10:00:04").isEqualTo(ERROR_DESTINATION);
+        // Invalid Physical Address
+        assertMessageValidity("4F:84:10:10:04").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("0F:84:00:30:00").isEqualTo(ERROR_PARAMETER);
+        // Invalid Device Type
+        assertMessageValidity("4F:84:12:34:08").isEqualTo(ERROR_PARAMETER);
+    }
+
+    @Test
+    public void isValid_routingChange() {
+        assertMessageValidity("0F:80:10:00:40:00").isEqualTo(OK);
+        assertMessageValidity("4F:80:12:00:50:00").isEqualTo(OK);
+
+        assertMessageValidity("0F:80:10:00:40").isEqualTo(ERROR_PARAMETER_SHORT);
+        assertMessageValidity("40:80:12:00:50:00").isEqualTo(ERROR_DESTINATION);
+        assertMessageValidity("0F:80:10:01:40:00").isEqualTo(ERROR_PARAMETER);
+        assertMessageValidity("4F:80:12:00:50:50").isEqualTo(ERROR_PARAMETER);
+    }
+
     private IntegerSubject assertMessageValidity(String message) {
         return assertThat(mHdmiCecMessageValidator.isValid(buildMessage(message)));
     }
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/RebootEscrowManagerTests.java b/services/tests/servicestests/src/com/android/server/locksettings/RebootEscrowManagerTests.java
index c4d1211..98d6452 100644
--- a/services/tests/servicestests/src/com/android/server/locksettings/RebootEscrowManagerTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/RebootEscrowManagerTests.java
@@ -95,13 +95,24 @@
 
     static class MockInjector extends RebootEscrowManager.Injector {
         private final IRebootEscrow mRebootEscrow;
+        private final RebootEscrowProviderInterface mRebootEscrowProvider;
         private final UserManager mUserManager;
         private final MockableRebootEscrowInjected mInjected;
 
-        MockInjector(Context context, UserManager userManager, IRebootEscrow rebootEscrow,
+        MockInjector(Context context, UserManager userManager,
+                IRebootEscrow rebootEscrow,
                 MockableRebootEscrowInjected injected) {
             super(context);
             mRebootEscrow = rebootEscrow;
+
+            RebootEscrowProviderHalImpl.Injector halInjector =
+                    new RebootEscrowProviderHalImpl.Injector() {
+                        @Override
+                        public IRebootEscrow getRebootEscrow() {
+                            return mRebootEscrow;
+                        }
+                    };
+            mRebootEscrowProvider = new RebootEscrowProviderHalImpl(halInjector);
             mUserManager = userManager;
             mInjected = injected;
         }
@@ -112,8 +123,8 @@
         }
 
         @Override
-        public IRebootEscrow getRebootEscrow() {
-            return mRebootEscrow;
+        public RebootEscrowProviderInterface getRebootEscrowProvider() {
+            return mRebootEscrowProvider;
         }
 
         @Override
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..401d6e3 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;
@@ -39,6 +39,7 @@
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Arrays;
 
 /**
  * Unit tests for {@link IpConfigStore}
@@ -79,10 +80,11 @@
 
         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");
+        ProxyInfo proxyInfo =
+                ProxyInfo.buildDirectProxy("10.10.10.10", 88, Arrays.asList("host1", "host2"));
 
         IpConfiguration expectedConfig1 = new IpConfiguration(IpAssignment.STATIC,
                 ProxySettings.STATIC, staticIpConfiguration, proxyInfo);
diff --git a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
index f8043fa..fec0273 100644
--- a/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
@@ -479,7 +479,7 @@
     }
 
     /**
-     * Adds allowlist when restrict background is on - app should receive an intent.
+     * Adds an app to allowlist when restrict background is on - app should receive an intent.
      */
     @Test
     @NetPolicyXml("restrict-background-on.xml")
@@ -490,7 +490,7 @@
     }
 
     /**
-     * Adds allowlist when restrict background is off - app should not receive an intent.
+     * Adds an app to allowlist when restrict background is off - app should not receive an intent.
      */
     @Test
     public void testAddRestrictBackgroundAllowlist_restrictBackgroundOff() throws Exception {
@@ -499,7 +499,7 @@
     }
 
     private void addRestrictBackgroundAllowlist(boolean expectIntent) throws Exception {
-        assertAllowlistUids();
+        assertRestrictBackgroundAllowedUids();
         assertUidPolicy(UID_A, POLICY_NONE);
 
         final FutureIntent futureIntent = newRestrictBackgroundChangedFuture();
@@ -507,7 +507,7 @@
 
         mService.setUidPolicy(UID_A, POLICY_ALLOW_METERED_BACKGROUND);
 
-        assertAllowlistUids(UID_A);
+        assertRestrictBackgroundAllowedUids(UID_A);
         assertUidPolicy(UID_A, POLICY_ALLOW_METERED_BACKGROUND);
         mPolicyListener.waitAndVerify()
                 .onUidPoliciesChanged(APP_ID_A, POLICY_ALLOW_METERED_BACKGROUND);
@@ -519,10 +519,10 @@
     }
 
     /**
-     * Removes allowlist when restrict background is on - app should receive an intent.
+     * Removes an app from allowlist when restrict background is on - app should receive an intent.
      */
     @Test
-    @NetPolicyXml("uidA-allowlisted-restrict-background-on.xml")
+    @NetPolicyXml("uidA-allowed-restrict-background-on.xml")
     public void testRemoveRestrictBackgroundAllowlist_restrictBackgroundOn() throws Exception {
         assertRestrictBackgroundOn();
         assertRestrictBackgroundChangedReceived(mFutureIntent, null);
@@ -530,10 +530,11 @@
     }
 
     /**
-     * Removes allowlist when restrict background is off - app should not receive an intent.
+     * Removes an app from allowlist when restrict background is off - app should not
+     * receive an intent.
      */
     @Test
-    @NetPolicyXml("uidA-allowlisted-restrict-background-off.xml")
+    @NetPolicyXml("uidA-allowed-restrict-background-off.xml")
     public void testRemoveRestrictBackgroundAllowlist_restrictBackgroundOff() throws Exception {
         assertRestrictBackgroundOff();
         removeRestrictBackgroundAllowlist(false);
@@ -688,7 +689,7 @@
     }
 
     private void removeRestrictBackgroundAllowlist(boolean expectIntent) throws Exception {
-        assertAllowlistUids(UID_A);
+        assertRestrictBackgroundAllowedUids(UID_A);
         assertUidPolicy(UID_A, POLICY_ALLOW_METERED_BACKGROUND);
 
         final FutureIntent futureIntent = newRestrictBackgroundChangedFuture();
@@ -696,7 +697,7 @@
 
         mService.setUidPolicy(UID_A, POLICY_NONE);
 
-        assertAllowlistUids();
+        assertRestrictBackgroundAllowedUids();
         assertUidPolicy(UID_A, POLICY_NONE);
         mPolicyListener.waitAndVerify().onUidPoliciesChanged(APP_ID_A, POLICY_NONE);
         if (expectIntent) {
@@ -707,7 +708,7 @@
     }
 
     /**
-     * Adds denylist when restrict background is on - app should not receive an intent.
+     * Adds an app to denylist when restrict background is on - app should not receive an intent.
      */
     @Test
     @NetPolicyXml("restrict-background-on.xml")
@@ -718,7 +719,7 @@
     }
 
     /**
-     * Adds denylist when restrict background is off - app should receive an intent.
+     * Adds an app to denylist when restrict background is off - app should receive an intent.
      */
     @Test
     public void testAddRestrictBackgroundDenylist_restrictBackgroundOff() throws Exception {
@@ -744,10 +745,11 @@
     }
 
     /**
-     * Removes denylist when restrict background is on - app should not receive an intent.
+     * Removes an app from denylist when restrict background is on - app should not
+     * receive an intent.
      */
     @Test
-    @NetPolicyXml("uidA-denylisted-restrict-background-on.xml")
+    @NetPolicyXml("uidA-denied-restrict-background-on.xml")
     public void testRemoveRestrictBackgroundDenylist_restrictBackgroundOn() throws Exception {
         assertRestrictBackgroundOn();
         assertRestrictBackgroundChangedReceived(mFutureIntent, null);
@@ -755,10 +757,11 @@
     }
 
     /**
-     * Removes denylist when restrict background is off - app should receive an intent.
+     * Removes an app from denylist when restrict background is off - app should
+     * receive an intent.
      */
     @Test
-    @NetPolicyXml("uidA-denylisted-restrict-background-off.xml")
+    @NetPolicyXml("uidA-denied-restrict-background-off.xml")
     public void testRemoveRestrictBackgroundDenylist_restrictBackgroundOff() throws Exception {
         assertRestrictBackgroundOff();
         removeRestrictBackgroundDenylist(true);
@@ -782,8 +785,8 @@
     }
 
     @Test
-    @NetPolicyXml("uidA-denylisted-restrict-background-on.xml")
-    public void testDenylistedAppIsNotNotifiedWhenRestrictBackgroundIsOn() throws Exception {
+    @NetPolicyXml("uidA-denied-restrict-background-on.xml")
+    public void testDeniedAppIsNotNotifiedWhenRestrictBackgroundIsOn() throws Exception {
         assertRestrictBackgroundOn();
         assertRestrictBackgroundChangedReceived(mFutureIntent, null);
         assertUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -794,11 +797,11 @@
     }
 
     @Test
-    @NetPolicyXml("uidA-allowlisted-restrict-background-on.xml")
-    public void testAllowlistedAppIsNotNotifiedWhenRestrictBackgroundIsOn() throws Exception {
+    @NetPolicyXml("uidA-allowed-restrict-background-on.xml")
+    public void testAllowedAppIsNotNotifiedWhenRestrictBackgroundIsOn() throws Exception {
         assertRestrictBackgroundOn();
         assertRestrictBackgroundChangedReceived(mFutureIntent, null);
-        assertAllowlistUids(UID_A);
+        assertRestrictBackgroundAllowedUids(UID_A);
 
         final FutureIntent futureIntent = newRestrictBackgroundChangedFuture();
         setRestrictBackground(true);
@@ -806,11 +809,11 @@
     }
 
     @Test
-    @NetPolicyXml("uidA-allowlisted-restrict-background-on.xml")
-    public void testAllowlistedAppIsNotifiedWhenDenylisted() throws Exception {
+    @NetPolicyXml("uidA-allowed-restrict-background-on.xml")
+    public void testAllowedAppIsNotifiedWhenDenylisted() throws Exception {
         assertRestrictBackgroundOn();
         assertRestrictBackgroundChangedReceived(mFutureIntent, null);
-        assertAllowlistUids(UID_A);
+        assertRestrictBackgroundAllowedUids(UID_A);
 
         final FutureIntent futureIntent = newRestrictBackgroundChangedFuture();
         mService.setUidPolicy(UID_A, POLICY_REJECT_METERED_BACKGROUND);
@@ -830,33 +833,33 @@
     }
 
     private void restrictBackgroundListsTest() throws Exception {
-        // UIds that are allowlisted.
-        assertAllowlistUids(UID_A, UID_B, UID_C);
+        // UIds that are in allowlist.
+        assertRestrictBackgroundAllowedUids(UID_A, UID_B, UID_C);
         assertUidPolicy(UID_A, POLICY_ALLOW_METERED_BACKGROUND);
         assertUidPolicy(UID_B, POLICY_ALLOW_METERED_BACKGROUND);
         assertUidPolicy(UID_C, POLICY_ALLOW_METERED_BACKGROUND);
 
-        // UIDs that are denylisted.
+        // UIDs that are in denylist.
         assertUidPolicy(UID_D, POLICY_NONE);
         assertUidPolicy(UID_E, POLICY_REJECT_METERED_BACKGROUND);
 
         // UIDS that have legacy policies.
         assertUidPolicy(UID_F, 2); // POLICY_ALLOW_BACKGROUND_BATTERY_SAVE
 
-        // Remove allowlist.
+        // Remove an uid from allowlist.
         mService.setUidPolicy(UID_A, POLICY_NONE);
         assertUidPolicy(UID_A, POLICY_NONE);
-        assertAllowlistUids(UID_B, UID_C);
+        assertRestrictBackgroundAllowedUids(UID_B, UID_C);
 
-        // Add allowlist when denylisted.
+        // Add an app to allowlist which is currently in denylist.
         mService.setUidPolicy(UID_E, POLICY_ALLOW_METERED_BACKGROUND);
         assertUidPolicy(UID_E, POLICY_ALLOW_METERED_BACKGROUND);
-        assertAllowlistUids(UID_B, UID_C, UID_E);
+        assertRestrictBackgroundAllowedUids(UID_B, UID_C, UID_E);
 
-        // Add denylist when allowlisted.
+        // Add an app to denylist when is currently in allowlist.
         mService.setUidPolicy(UID_B, POLICY_REJECT_METERED_BACKGROUND);
         assertUidPolicy(UID_B, POLICY_REJECT_METERED_BACKGROUND);
-        assertAllowlistUids(UID_C, UID_E);
+        assertRestrictBackgroundAllowedUids(UID_C, UID_E);
     }
 
     /**
@@ -865,7 +868,7 @@
     @Test
     @NetPolicyXml("restrict-background-lists-mixed-format.xml")
     public void testRestrictBackgroundLists_mixedFormat() throws Exception {
-        assertAllowlistUids(UID_A, UID_C, UID_D);
+        assertRestrictBackgroundAllowedUids(UID_A, UID_C, UID_D);
         assertUidPolicy(UID_A, POLICY_ALLOW_METERED_BACKGROUND);
         assertUidPolicy(UID_B, POLICY_REJECT_METERED_BACKGROUND); // Denylist prevails.
         assertUidPolicy(UID_C, (POLICY_ALLOW_METERED_BACKGROUND | 2));
@@ -2040,7 +2043,7 @@
         }
     }
 
-    private void assertAllowlistUids(int... uids) {
+    private void assertRestrictBackgroundAllowedUids(int... uids) {
         assertContainsInAnyOrder(mService.getUidsWithPolicy(POLICY_ALLOW_METERED_BACKGROUND), uids);
     }
 
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/recoverysystem/OWNERS b/services/tests/servicestests/src/com/android/server/recoverysystem/OWNERS
new file mode 100644
index 0000000..3880038
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/recoverysystem/OWNERS
@@ -0,0 +1 @@
+include /services/core/java/com/android/server/recoverysystem/OWNERS
diff --git a/services/tests/servicestests/src/com/android/server/recoverysystem/RecoverySystemServiceTest.java b/services/tests/servicestests/src/com/android/server/recoverysystem/RecoverySystemServiceTest.java
index 035a2f1..b07b8fa 100644
--- a/services/tests/servicestests/src/com/android/server/recoverysystem/RecoverySystemServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/recoverysystem/RecoverySystemServiceTest.java
@@ -21,6 +21,7 @@
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.doThrow;
@@ -33,6 +34,7 @@
 
 import android.content.Context;
 import android.content.IntentSender;
+import android.content.pm.PackageManager;
 import android.os.Handler;
 import android.os.IPowerManager;
 import android.os.IRecoverySystemProgressListener;
@@ -67,6 +69,9 @@
     private FileWriter mUncryptUpdateFileWriter;
     private LockSettingsInternal mLockSettingsInternal;
 
+    private static final String FAKE_OTA_PACKAGE_NAME = "fake.ota.package";
+    private static final String FAKE_OTHER_PACKAGE_NAME = "fake.other.package";
+
     @Before
     public void setup() {
         mContext = mock(Context.class);
@@ -209,65 +214,99 @@
 
     @Test(expected = SecurityException.class)
     public void requestLskf_protected() {
-        doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission(
-                eq(android.Manifest.permission.RECOVERY), any());
-        mRecoverySystemService.requestLskf("test", null);
-    }
-
-
-    @Test
-    public void requestLskf_nullToken_failure() {
-        assertThat(mRecoverySystemService.requestLskf(null, null), is(false));
+        when(mContext.checkCallingOrSelfPermission(anyString())).thenReturn(
+                PackageManager.PERMISSION_DENIED);
+        mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null);
     }
 
     @Test
     public void requestLskf_success() throws Exception {
         IntentSender intentSender = mock(IntentSender.class);
-        assertThat(mRecoverySystemService.requestLskf("test", intentSender), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
         mRecoverySystemService.onPreparedForReboot(true);
         verify(intentSender).sendIntent(any(), anyInt(), any(), any(), any());
     }
 
     @Test
-    public void requestLskf_subsequentRequestClearsPrepared() throws Exception {
+    public void requestLskf_subsequentRequestNotClearPrepared() throws Exception {
         IntentSender intentSender = mock(IntentSender.class);
-        assertThat(mRecoverySystemService.requestLskf("test", intentSender), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
         mRecoverySystemService.onPreparedForReboot(true);
         verify(intentSender).sendIntent(any(), anyInt(), any(), any(), any());
 
-        assertThat(mRecoverySystemService.requestLskf("test2", null), is(true));
-        assertThat(mRecoverySystemService.rebootWithLskf("test", null), is(false));
-        assertThat(mRecoverySystemService.rebootWithLskf("test2", "foobar"), is(false));
-
-        mRecoverySystemService.onPreparedForReboot(true);
-        assertThat(mRecoverySystemService.rebootWithLskf("test2", "foobar"), is(true));
-        verify(intentSender).sendIntent(any(), anyInt(), any(), any(), any());
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null), is(true));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, "foobar", true),
+                is(true));
         verify(mIPowerManager).reboot(anyBoolean(), eq("foobar"), anyBoolean());
     }
 
-
     @Test
     public void requestLskf_requestedButNotPrepared() throws Exception {
         IntentSender intentSender = mock(IntentSender.class);
-        assertThat(mRecoverySystemService.requestLskf("test", intentSender), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
         verify(intentSender, never()).sendIntent(any(), anyInt(), any(), any(), any());
     }
 
+    @Test
+    public void isLskfCaptured_requestedButNotPrepared() throws Exception {
+        IntentSender intentSender = mock(IntentSender.class);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
+        assertThat(mRecoverySystemService.isLskfCaptured(FAKE_OTA_PACKAGE_NAME), is(false));
+    }
+
+    @Test
+    public void isLskfCaptured_Prepared() throws Exception {
+        IntentSender intentSender = mock(IntentSender.class);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
+        mRecoverySystemService.onPreparedForReboot(true);
+        verify(intentSender).sendIntent(any(), anyInt(), any(), any(), any());
+        assertThat(mRecoverySystemService.isLskfCaptured(FAKE_OTA_PACKAGE_NAME), is(true));
+    }
+
     @Test(expected = SecurityException.class)
     public void clearLskf_protected() {
-        doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission(
-                eq(android.Manifest.permission.RECOVERY), any());
-        mRecoverySystemService.clearLskf();
+        when(mContext.checkCallingOrSelfPermission(anyString())).thenReturn(
+                PackageManager.PERMISSION_DENIED);
+        mRecoverySystemService.clearLskf(FAKE_OTA_PACKAGE_NAME);
     }
 
     @Test
     public void clearLskf_requestedThenCleared() throws Exception {
         IntentSender intentSender = mock(IntentSender.class);
-        assertThat(mRecoverySystemService.requestLskf("test", intentSender), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
         mRecoverySystemService.onPreparedForReboot(true);
         verify(intentSender).sendIntent(any(), anyInt(), any(), any(), any());
 
-        assertThat(mRecoverySystemService.clearLskf(), is(true));
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTA_PACKAGE_NAME), is(true));
+        verify(mLockSettingsInternal).clearRebootEscrow();
+    }
+
+    @Test
+    public void clearLskf_callerNotRequested_Success() throws Exception {
+        IntentSender intentSender = mock(IntentSender.class);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTHER_PACKAGE_NAME), is(true));
+        verify(mLockSettingsInternal, never()).clearRebootEscrow();
+    }
+
+    @Test
+    public void clearLskf_multiClient_BothClientsClear() throws Exception {
+        IntentSender intentSender = mock(IntentSender.class);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, intentSender),
+                is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTHER_PACKAGE_NAME, intentSender),
+                is(true));
+
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTA_PACKAGE_NAME), is(true));
+        verify(mLockSettingsInternal, never()).clearRebootEscrow();
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTHER_PACKAGE_NAME), is(true));
         verify(mLockSettingsInternal).clearRebootEscrow();
     }
 
@@ -279,27 +318,84 @@
 
     @Test(expected = SecurityException.class)
     public void rebootWithLskf_protected() {
-        doThrow(SecurityException.class).when(mContext).enforceCallingOrSelfPermission(
-                eq(android.Manifest.permission.RECOVERY), any());
-        mRecoverySystemService.rebootWithLskf("test1", null);
+        when(mContext.checkCallingOrSelfPermission(anyString())).thenReturn(
+                PackageManager.PERMISSION_DENIED);
+        mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, null, true);
     }
 
     @Test
     public void rebootWithLskf_Success() throws Exception {
-        assertThat(mRecoverySystemService.requestLskf("test", null), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null), is(true));
         mRecoverySystemService.onPreparedForReboot(true);
-        assertThat(mRecoverySystemService.rebootWithLskf("test", "ab-update"), is(true));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, "ab-update", true),
+                is(true));
         verify(mIPowerManager).reboot(anyBoolean(), eq("ab-update"), anyBoolean());
     }
 
     @Test
     public void rebootWithLskf_withoutPrepare_Failure() throws Exception {
-        assertThat(mRecoverySystemService.rebootWithLskf("test1", null), is(false));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, null, true),
+                is(false));
     }
 
     @Test
-    public void rebootWithLskf_withNullUpdateToken_Failure() throws Exception {
-        assertThat(mRecoverySystemService.rebootWithLskf(null, null), is(false));
+    public void rebootWithLskf_withNullCallerId_Failure() throws Exception {
+        assertThat(mRecoverySystemService.rebootWithLskf(null, null, true), is(false));
         verifyNoMoreInteractions(mIPowerManager);
     }
+
+    @Test
+    public void rebootWithLskf_multiClient_ClientASuccess() throws Exception {
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null), is(true));
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTHER_PACKAGE_NAME, null), is(true));
+        mRecoverySystemService.onPreparedForReboot(true);
+
+        // Client B's clear won't affect client A's preparation.
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTHER_PACKAGE_NAME), is(true));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, "ab-update", true),
+                is(true));
+        verify(mIPowerManager).reboot(anyBoolean(), eq("ab-update"), anyBoolean());
+    }
+
+
+    @Test
+    public void rebootWithLskf_multiClient_ClientBSuccess() throws Exception {
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null), is(true));
+        mRecoverySystemService.onPreparedForReboot(true);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTHER_PACKAGE_NAME, null), is(true));
+
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTA_PACKAGE_NAME), is(true));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, null, true),
+                is(false));
+        verifyNoMoreInteractions(mIPowerManager);
+
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTHER_PACKAGE_NAME, null), is(true));
+        assertThat(
+                mRecoverySystemService.rebootWithLskf(FAKE_OTHER_PACKAGE_NAME, "ab-update", true),
+                is(true));
+        verify(mIPowerManager).reboot(anyBoolean(), eq("ab-update"), anyBoolean());
+    }
+
+    @Test
+    public void rebootWithLskf_multiClient_BothClientsClear_Failure() throws Exception {
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTA_PACKAGE_NAME, null), is(true));
+        mRecoverySystemService.onPreparedForReboot(true);
+        assertThat(mRecoverySystemService.requestLskf(FAKE_OTHER_PACKAGE_NAME, null), is(true));
+
+        // Client A clears
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTA_PACKAGE_NAME), is(true));
+        assertThat(mRecoverySystemService.rebootWithLskf(FAKE_OTA_PACKAGE_NAME, null, true),
+                is(false));
+        verifyNoMoreInteractions(mIPowerManager);
+
+        // Client B clears
+        assertThat(mRecoverySystemService.clearLskf(FAKE_OTHER_PACKAGE_NAME), is(true));
+        verify(mLockSettingsInternal).clearRebootEscrow();
+        assertThat(
+                mRecoverySystemService.rebootWithLskf(FAKE_OTHER_PACKAGE_NAME, "ab-update", true),
+                is(false));
+        verifyNoMoreInteractions(mIPowerManager);
+    }
+
+    // TODO(xunchang) add more multi client tests
 }
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 22addf9..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;
@@ -172,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))
@@ -216,12 +247,18 @@
         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;
 
@@ -242,6 +279,11 @@
         }
 
         @Override
+        public void suggestGnssTime(GnssTimeSuggestion timeSuggestion) {
+            mLastGnssSuggestion = timeSuggestion;
+        }
+
+        @Override
         public void handleAutoTimeConfigChanged() {
             mHandleAutoTimeDetectionChangedCalled = true;
         }
@@ -255,6 +297,7 @@
             mLastTelephonySuggestion = null;
             mLastManualSuggestion = null;
             mLastNetworkSuggestion = null;
+            mLastGnssSuggestion = null;
             mHandleAutoTimeDetectionChangedCalled = false;
             mDumpCalled = false;
         }
@@ -271,6 +314,10 @@
             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 21396fd..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,6 +16,7 @@
 
 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;
 
@@ -25,6 +26,7 @@
 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;
@@ -569,7 +571,53 @@
     }
 
     @Test
-    public void highPrioritySuggestionsShouldBeatLowerPrioritySuggestions() {
+    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);
@@ -672,22 +720,130 @@
     }
 
     @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);
+                .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(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());
     }
@@ -696,20 +852,25 @@
     public void whenAllTimeSuggestionsAreAvailable_higherPriorityWins_higherPriorityComesFirst() {
         mScript.pokeFakeClocks(ARBITRARY_CLOCK_INITIALIZATION_INFO)
                 .pokeAutoTimeDetectionEnabled(true)
-                .pokeAutoOriginPriorities(ORIGIN_TELEPHONY, ORIGIN_NETWORK);
+                .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());
     }
 
@@ -728,7 +889,37 @@
     }
 
     @Test
-    public void suggestionsFromSourceNotListedInPrioritiesList_areIgnored() {
+    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);
@@ -742,6 +933,20 @@
     }
 
     @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)
@@ -945,6 +1150,11 @@
             return this;
         }
 
+        Script simulateGnssTimeSuggestion(GnssTimeSuggestion timeSuggestion) {
+            mTimeDetectorStrategy.suggestGnssTime(timeSuggestion);
+            return this;
+        }
+
         Script simulateAutoTimeDetectionToggle() {
             mFakeCallback.simulateAutoTimeZoneDetectionToggle();
             mTimeDetectorStrategy.handleAutoTimeConfigChanged();
@@ -995,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.
          */
@@ -1011,6 +1229,14 @@
         }
 
         /**
+         * 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.
          */
@@ -1057,6 +1283,18 @@
         }
 
         /**
+         * 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.
          */
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/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/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java
index 2372dd2..1055069 100644
--- a/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/tv/tunerresourcemanager/TunerResourceManagerServiceTest.java
@@ -74,7 +74,7 @@
             mReclaimed = true;
         }
 
-        public boolean isRelaimed() {
+        public boolean isReclaimed() {
             return mReclaimed;
         }
     }
@@ -379,13 +379,13 @@
                 new TunerFrontendRequest(clientId1[0] /*clientId*/, FrontendSettings.TYPE_DVBT);
         assertThat(mTunerResourceManagerService
                 .requestFrontendInternal(request, frontendHandle)).isFalse();
-        assertThat(listener.isRelaimed()).isFalse();
+        assertThat(listener.isReclaimed()).isFalse();
 
         request =
                 new TunerFrontendRequest(clientId1[0] /*clientId*/, FrontendSettings.TYPE_DVBS);
         assertThat(mTunerResourceManagerService
                 .requestFrontendInternal(request, frontendHandle)).isFalse();
-        assertThat(listener.isRelaimed()).isFalse();
+        assertThat(listener.isReclaimed()).isFalse();
     }
 
     @Test
@@ -444,7 +444,7 @@
                 .getOwnerClientId()).isEqualTo(clientId1[0]);
         assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
                 .getOwnerClientId()).isEqualTo(clientId1[0]);
-        assertThat(listener.isRelaimed()).isTrue();
+        assertThat(listener.isReclaimed()).isTrue();
     }
 
     @Test
@@ -478,7 +478,7 @@
 
         // Release frontend
         mTunerResourceManagerService.releaseFrontendInternal(mTunerResourceManagerService
-                .getFrontendResource(frontendId));
+                .getFrontendResource(frontendId), clientId[0]);
         assertThat(mTunerResourceManagerService
                 .getFrontendResource(frontendId).isInUse()).isFalse();
         assertThat(mTunerResourceManagerService
@@ -540,7 +540,7 @@
         assertThat(mTunerResourceManagerService.getCasResource(1)
                 .getOwnerClientIds()).isEqualTo(new HashSet<Integer>(Arrays.asList(clientId1[0])));
         assertThat(mTunerResourceManagerService.getCasResource(1).isFullyUsed()).isFalse();
-        assertThat(listener.isRelaimed()).isTrue();
+        assertThat(listener.isReclaimed()).isTrue();
     }
 
     @Test
@@ -625,7 +625,7 @@
                 .isInUse()).isTrue();
         assertThat(mTunerResourceManagerService.getLnbResource(lnbIds[0])
                 .getOwnerClientId()).isEqualTo(clientId1[0]);
-        assertThat(listener.isRelaimed()).isTrue();
+        assertThat(listener.isReclaimed()).isTrue();
         assertThat(mTunerResourceManagerService.getClientProfile(clientId0[0])
                 .getInUseLnbIds().size()).isEqualTo(0);
     }
@@ -753,4 +753,293 @@
                 backgroundRecordProfile)).isEqualTo(
                         (backgroundPlaybackPriority > backgroundRecordPriority));
     }
+
+    @Test
+    public void shareFrontendTest_FrontendWithExclusiveGroupReadyToShare() {
+        /**** Register Clients and Set Priority ****/
+
+        // Int array to save the returned client ids
+        int[] ownerClientId0 = new int[1];
+        int[] ownerClientId1 = new int[1];
+        int[] shareClientId0 = new int[1];
+        int[] shareClientId1 = new int[1];
+
+        // Predefined client profiles
+        ResourceClientProfile[] ownerProfiles = new ResourceClientProfile[2];
+        ResourceClientProfile[] shareProfiles = new ResourceClientProfile[2];
+        ownerProfiles[0] = new ResourceClientProfile(
+                "0" /*sessionId*/,
+                TvInputService.PRIORITY_HINT_USE_CASE_TYPE_LIVE);
+        ownerProfiles[1] = new ResourceClientProfile(
+                "1" /*sessionId*/,
+                TvInputService.PRIORITY_HINT_USE_CASE_TYPE_LIVE);
+        shareProfiles[0] = new ResourceClientProfile(
+                "2" /*sessionId*/,
+                TvInputService.PRIORITY_HINT_USE_CASE_TYPE_RECORD);
+        shareProfiles[1] = new ResourceClientProfile(
+                "3" /*sessionId*/,
+                TvInputService.PRIORITY_HINT_USE_CASE_TYPE_RECORD);
+
+        // Predefined client reclaim listeners
+        TestResourcesReclaimListener ownerListener0 = new TestResourcesReclaimListener();
+        TestResourcesReclaimListener shareListener0 = new TestResourcesReclaimListener();
+        TestResourcesReclaimListener ownerListener1 = new TestResourcesReclaimListener();
+        TestResourcesReclaimListener shareListener1 = new TestResourcesReclaimListener();
+        // Register clients and validate the returned client ids
+        mTunerResourceManagerService
+                .registerClientProfileInternal(ownerProfiles[0], ownerListener0, ownerClientId0);
+        mTunerResourceManagerService
+                .registerClientProfileInternal(shareProfiles[0], shareListener0, shareClientId0);
+        mTunerResourceManagerService
+                .registerClientProfileInternal(ownerProfiles[1], ownerListener1, ownerClientId1);
+        mTunerResourceManagerService
+                .registerClientProfileInternal(shareProfiles[1], shareListener1, shareClientId1);
+        assertThat(ownerClientId0[0]).isNotEqualTo(TunerResourceManagerService.INVALID_CLIENT_ID);
+        assertThat(shareClientId0[0]).isNotEqualTo(TunerResourceManagerService.INVALID_CLIENT_ID);
+        assertThat(ownerClientId1[0]).isNotEqualTo(TunerResourceManagerService.INVALID_CLIENT_ID);
+        assertThat(shareClientId1[0]).isNotEqualTo(TunerResourceManagerService.INVALID_CLIENT_ID);
+
+        mTunerResourceManagerService.updateClientPriorityInternal(
+                ownerClientId0[0],
+                100/*priority*/,
+                0/*niceValue*/);
+        mTunerResourceManagerService.updateClientPriorityInternal(
+                shareClientId0[0],
+                200/*priority*/,
+                0/*niceValue*/);
+        mTunerResourceManagerService.updateClientPriorityInternal(
+                ownerClientId1[0],
+                300/*priority*/,
+                0/*niceValue*/);
+        mTunerResourceManagerService.updateClientPriorityInternal(
+                shareClientId1[0],
+                400/*priority*/,
+                0/*niceValue*/);
+
+        /**** Init Frontend Resources ****/
+
+        // Predefined frontend info
+        TunerFrontendInfo[] infos = new TunerFrontendInfo[2];
+        infos[0] = new TunerFrontendInfo(
+                0 /*id*/,
+                FrontendSettings.TYPE_DVBT,
+                1 /*exclusiveGroupId*/);
+        infos[1] = new TunerFrontendInfo(
+                1 /*id*/,
+                FrontendSettings.TYPE_DVBS,
+                1 /*exclusiveGroupId*/);
+
+        /**** Init Lnb Resources ****/
+        int[] lnbIds = {1};
+        mTunerResourceManagerService.setLnbInfoListInternal(lnbIds);
+
+        // Update frontend list in TRM
+        mTunerResourceManagerService.setFrontendInfoListInternal(infos);
+
+        /**** Request Frontend ****/
+
+        // Predefined frontend request and array to save returned frontend handle
+        int[] frontendHandle = new int[1];
+        TunerFrontendRequest request = new TunerFrontendRequest(
+                ownerClientId0[0] /*clientId*/,
+                FrontendSettings.TYPE_DVBT);
+
+        // Request call and validate granted resource and internal mapping
+        assertThat(mTunerResourceManagerService
+                .requestFrontendInternal(request, frontendHandle))
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getResourceIdFromHandle(frontendHandle[0]))
+                .isEqualTo(infos[0].getId());
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId0[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+
+        /**** Share Frontend ****/
+
+        // Share frontend call and validate the internal mapping
+        mTunerResourceManagerService.shareFrontendInternal(
+                shareClientId0[0]/*selfClientId*/,
+                ownerClientId0[0]/*targetClientId*/);
+        mTunerResourceManagerService.shareFrontendInternal(
+                shareClientId1[0]/*selfClientId*/,
+                ownerClientId0[0]/*targetClientId*/);
+        // Verify fe in use status
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[0].getId())
+                .isInUse()).isTrue();
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
+                .isInUse()).isTrue();
+        // Verify fe owner status
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[0].getId())
+                .getOwnerClientId()).isEqualTo(ownerClientId0[0]);
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
+                .getOwnerClientId()).isEqualTo(ownerClientId0[0]);
+        // Verify share fe client status in the primary owner client
+        assertThat(mTunerResourceManagerService.getClientProfile(ownerClientId0[0])
+                .getShareFeClientIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        shareClientId0[0],
+                        shareClientId1[0])));
+        // Verify in use frontend list in all the primary owner and share owner clients
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId0[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId1[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+
+        /**** Remove Frontend Share Owner ****/
+
+        // Unregister the second share fe client
+        mTunerResourceManagerService.unregisterClientProfileInternal(shareClientId1[0]);
+
+        // Validate the internal mapping
+        assertThat(mTunerResourceManagerService.getClientProfile(ownerClientId0[0])
+                .getShareFeClientIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        shareClientId0[0])));
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId0[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+
+        /**** Request Shared Frontend with Higher Priority Client ****/
+
+        // Predefined second frontend request
+        request = new TunerFrontendRequest(
+                ownerClientId1[0] /*clientId*/,
+                FrontendSettings.TYPE_DVBT);
+
+        // Second request call
+        assertThat(mTunerResourceManagerService
+                .requestFrontendInternal(request, frontendHandle))
+                .isTrue();
+
+        // Validate granted resource and internal mapping
+        assertThat(mTunerResourceManagerService
+                .getResourceIdFromHandle(frontendHandle[0]))
+                .isEqualTo(infos[0].getId());
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[0].getId())
+                .getOwnerClientId()).isEqualTo(ownerClientId1[0]);
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
+                .getOwnerClientId()).isEqualTo(ownerClientId1[0]);
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId1[0])
+                .getInUseFrontendIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        infos[0].getId(),
+                        infos[1].getId())));
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId0[0])
+                .getInUseFrontendIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseFrontendIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId0[0])
+                .getShareFeClientIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(ownerListener0.isReclaimed()).isTrue();
+        assertThat(shareListener0.isReclaimed()).isTrue();
+
+        /**** Release Frontend Resource From Primary Owner ****/
+
+        // Reshare the frontend
+        mTunerResourceManagerService.shareFrontendInternal(
+                shareClientId0[0]/*selfClientId*/,
+                ownerClientId1[0]/*targetClientId*/);
+
+        // Release the frontend resource from the primary owner
+        mTunerResourceManagerService.releaseFrontendInternal(mTunerResourceManagerService
+                .getFrontendResource(infos[0].getId()), ownerClientId1[0]);
+
+        // Validate the internal mapping
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[0].getId())
+                .isInUse()).isFalse();
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
+                .isInUse()).isFalse();
+        // Verify client status
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId1[0])
+                .getInUseFrontendIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseFrontendIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(ownerClientId1[0])
+                .getShareFeClientIds()
+                .isEmpty())
+                .isTrue();
+
+        /**** Unregister Primary Owner when the Share owner owns an Lnb ****/
+
+        // Predefined Lnb request and handle array
+        TunerLnbRequest requestLnb = new TunerLnbRequest(shareClientId0[0]);
+        int[] lnbHandle = new int[1];
+
+        // Request for an Lnb
+        assertThat(mTunerResourceManagerService
+                .requestLnbInternal(requestLnb, lnbHandle))
+                .isTrue();
+
+        // Request and share the frontend resource again
+        assertThat(mTunerResourceManagerService
+                .requestFrontendInternal(request, frontendHandle))
+                .isTrue();
+        mTunerResourceManagerService.shareFrontendInternal(
+                shareClientId0[0]/*selfClientId*/,
+                ownerClientId1[0]/*targetClientId*/);
+
+        // Unregister the primary owner of the shared frontend
+        mTunerResourceManagerService.unregisterClientProfileInternal(ownerClientId1[0]);
+
+        // Validate the internal mapping
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[0].getId())
+                .isInUse()).isFalse();
+        assertThat(mTunerResourceManagerService.getFrontendResource(infos[1].getId())
+                .isInUse()).isFalse();
+        // Verify client status
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseFrontendIds()
+                .isEmpty())
+                .isTrue();
+        assertThat(mTunerResourceManagerService
+                .getClientProfile(shareClientId0[0])
+                .getInUseLnbIds())
+                .isEqualTo(new HashSet<Integer>(Arrays.asList(
+                        lnbIds[0])));
+    }
 }
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/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/OWNERS b/services/voiceinteraction/java/com/android/server/soundtrigger/OWNERS
new file mode 100644
index 0000000..e5d0370
--- /dev/null
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/OWNERS
@@ -0,0 +1,2 @@
+ytai@google.com
+elaurent@google.com
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/startop/iorap/src/com/google/android/startop/iorap/IorapForwardingService.java b/startop/iorap/src/com/google/android/startop/iorap/IorapForwardingService.java
index 3104c7e..f923721 100644
--- a/startop/iorap/src/com/google/android/startop/iorap/IorapForwardingService.java
+++ b/startop/iorap/src/com/google/android/startop/iorap/IorapForwardingService.java
@@ -34,6 +34,7 @@
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.os.SystemProperties;
+import android.provider.DeviceConfig;
 import android.util.ArraySet;
 import android.util.Log;
 
@@ -154,9 +155,27 @@
 
     @VisibleForTesting
     protected boolean isIorapEnabled() {
+        // These two mendel flags should match those in iorapd native process
+        // system/iorapd/src/common/property.h
+        boolean isTracingEnabled =
+            getMendelFlag("iorap_perfetto_enable", "iorapd.perfetto.enable", false);
+        boolean isReadAheadEnabled =
+            getMendelFlag("iorap_readahead_enable", "iorapd.readahead.enable", false);
         // Same as the property in iorapd.rc -- disabling this will mean the 'iorapd' binder process
         // never comes up, so all binder connections will fail indefinitely.
-        return IS_ENABLED;
+        return IS_ENABLED && (isTracingEnabled || isReadAheadEnabled);
+    }
+
+    private boolean getMendelFlag(String mendelFlag, String sysProperty, boolean defaultValue) {
+        // TODO(yawanng) use DeviceConfig to get mendel property.
+        // DeviceConfig doesn't work and the reason is not clear.
+        // Provider service is already up before IORapForwardService.
+        String mendelProperty = "persist.device_config."
+            + DeviceConfig.NAMESPACE_RUNTIME_NATIVE_BOOT
+            + "."
+            + mendelFlag;
+        return SystemProperties.getBoolean(mendelProperty,
+            SystemProperties.getBoolean(sysProperty, defaultValue));
     }
 
     //</editor-fold>
@@ -239,7 +258,9 @@
         //
         // TODO: it would be good to get nodified of 'adb shell stop iorapd' to avoid
         // printing this warning.
-        Log.w(TAG, "Failed to connect to iorapd, is it down? Delay for " + sleepTime);
+        if (DEBUG) {
+            Log.v(TAG, "Failed to connect to iorapd, is it down? Delay for " + sleepTime);
+        }
 
         // Use a handler instead of Thread#sleep to avoid backing up the binder thread
         // when this is called from the death recipient callback.
@@ -275,7 +296,9 @@
         // Connect to the native binder service.
         mIorapRemote = provideIorapRemote();
         if (mIorapRemote == null) {
-            Log.e(TAG, "connectToRemoteAndConfigure - null iorap remote. check for Log.wtf?");
+            if (DEBUG) {
+                Log.e(TAG, "connectToRemoteAndConfigure - null iorap remote. check for Log.wtf?");
+            }
             return false;
         }
         invokeRemote(mIorapRemote,
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/common/com/android/internal/telephony/TelephonyPermissions.java b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
index 0c46394..225e3f76 100644
--- a/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
+++ b/telephony/common/com/android/internal/telephony/TelephonyPermissions.java
@@ -651,4 +651,23 @@
 
         throw new SecurityException(message + ": Only shell user can call it");
     }
+
+    /**
+     * Returns the target SDK version number for a given package name.
+     *
+     * This call MUST be invoked before clearing the calling UID.
+     *
+     * @return target SDK if the package is found or INT_MAX.
+     */
+    public static int getTargetSdk(Context c, String packageName) {
+        try {
+            final ApplicationInfo ai = c.getPackageManager().getApplicationInfoAsUser(
+                    packageName, 0, UserHandle.getUserHandleForUid(Binder.getCallingUid()));
+            if (ai != null) return ai.targetSdkVersion;
+        } catch (PackageManager.NameNotFoundException unexpected) {
+            Log.e(LOG_TAG, "Failed to get package info for pkg="
+                    + packageName + ", uid=" + Binder.getCallingUid());
+        }
+        return Integer.MAX_VALUE;
+    }
 }
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/AccessNetworkUtils.java b/telephony/java/android/telephony/AccessNetworkUtils.java
index 981ed450..7661a32 100644
--- a/telephony/java/android/telephony/AccessNetworkUtils.java
+++ b/telephony/java/android/telephony/AccessNetworkUtils.java
@@ -5,8 +5,11 @@
 import static android.telephony.ServiceState.DUPLEX_MODE_UNKNOWN;
 
 import android.telephony.AccessNetworkConstants.EutranBand;
+import android.telephony.AccessNetworkConstants.GeranBand;
+import android.telephony.AccessNetworkConstants.UtranBand;
 import android.telephony.ServiceState.DuplexMode;
 
+import java.util.Arrays;
 
 /**
  * Utilities to map between radio constants.
@@ -20,6 +23,9 @@
 
     public static final int INVALID_BAND = -1;
 
+    /** ISO country code of Japan. */
+    private static final String JAPAN_ISO_COUNTRY_CODE = "jp";
+
     /**
      * Gets the duplex mode for the given EUTRAN operating band.
      *
@@ -50,7 +56,7 @@
     /**
      * Gets the EUTRAN Operating band for a given downlink EARFCN.
      *
-     * <p>See 3GPP 36.101 sec 5.7.3-1 for calculation.
+     * <p>See 3GPP TS 36.101 clause 5.7.3-1 for calculation.
      *
      * @param earfcn The downlink EARFCN
      * @return Operating band number, or {@link #INVALID_BAND} if no corresponding band exists
@@ -198,4 +204,125 @@
 
         return INVALID_BAND;
     }
+
+    /**
+     * Gets the GERAN Operating band for a given ARFCN.
+     *
+     * <p>See 3GPP TS 45.005 clause 2 for calculation.
+     *
+     * @param arfcn The ARFCN
+     * @return Operating band number, or {@link #INVALID_BAND} if no corresponding band exists
+     */
+    public static int getOperatingBandForArfcn(int arfcn) {
+        if (arfcn >= 0 && arfcn <= 124) {
+            return GeranBand.BAND_E900;
+        } else if (arfcn >= 128 && arfcn <= 251) {
+            return GeranBand.BAND_850;
+        } else if (arfcn >= 259 && arfcn <= 293) {
+            return GeranBand.BAND_450;
+        } else if (arfcn >= 306 && arfcn <= 340) {
+            return GeranBand.BAND_480;
+        } else if (arfcn >= 438 && arfcn <= 511) {
+            return GeranBand.BAND_750;
+        } else if (arfcn >= 512 && arfcn <= 885) {
+            // ARFCN between 512 and 810 are also part of BAND_PCS1900.
+            // Returning BAND_DCS1800 in both cases.
+            return GeranBand.BAND_DCS1800;
+        } else if (arfcn >= 940 && arfcn <= 974) {
+            return GeranBand.BAND_ER900;
+        } else if (arfcn >= 975 && arfcn <= 1023) {
+            return GeranBand.BAND_E900;
+        }
+        return INVALID_BAND;
+    }
+
+    /**
+     * Gets the UTRAN Operating band for a given downlink UARFCN.
+     *
+     * <p>See 3GPP TS 25.101 clause 5.4.4 for calculation.
+     *
+     * @param uarfcn The downlink UARFCN
+     * @return Operating band number, or {@link #INVALID_BAND} if no corresponding band exists
+     */
+    public static int getOperatingBandForUarfcn(int uarfcn) {
+        // List of additional bands defined in TS 25.101.
+        int[] addlBand2 = {412, 437, 462, 487, 512, 537, 562, 587, 612, 637, 662, 687};
+        int[] addlBand4 = {1887, 1912, 1937, 1962, 1987, 2012, 2037, 2062, 2087};
+        int[] addlBand5 = {1007, 1012, 1032, 1037, 1062, 1087};
+        int[] addlBand6 = {1037, 1062};
+        int[] addlBand7 =
+                {2587, 2612, 2637, 2662, 2687, 2712, 2737, 2762, 2787, 2812, 2837, 2862,
+                2887, 2912};
+        int[] addlBand10 =
+                {3412, 3437, 3462, 3487, 3512, 3537, 3562, 3587, 3612, 3637, 3662, 3687};
+        int[] addlBand12 = {3932, 3957, 3962, 3987, 3992};
+        int[] addlBand13 = {4067, 4092};
+        int[] addlBand14 = {4167, 4192};
+        int[] addlBand19 = {787, 812, 837};
+        int[] addlBand25 =
+                {6292, 6317, 6342, 6367, 6392, 6417, 6442, 6467, 6492, 6517, 6542, 6567, 6592};
+        int[] addlBand26 = {5937, 5962, 5987, 5992, 6012, 6017, 6037, 6042, 6062, 6067, 6087};
+
+        if (uarfcn >= 10562 && uarfcn <= 10838) {
+            return UtranBand.BAND_1;
+        } else if ((uarfcn >= 9662 && uarfcn <= 9938)
+                || Arrays.binarySearch(addlBand2, uarfcn) >= 0) {
+            return UtranBand.BAND_2;
+        } else if (uarfcn >= 1162 && uarfcn <= 1513) {
+            return UtranBand.BAND_3;
+        } else if ((uarfcn >= 1537 && uarfcn <= 1738)
+                || Arrays.binarySearch(addlBand4, uarfcn) >= 0) {
+            return UtranBand.BAND_4;
+        } else if (uarfcn >= 4387 && uarfcn <= 4413) {
+            // Band 6 is a subset of band 5. Only Japan uses band 6 and Japan does not have band 5.
+            String country = TelephonyManager.getDefault().getNetworkCountryIso();
+            if (JAPAN_ISO_COUNTRY_CODE.compareToIgnoreCase(country) == 0) {
+                return UtranBand.BAND_6;
+            } else {
+                return UtranBand.BAND_5;
+            }
+        } else if ((uarfcn >= 4357 && uarfcn <= 4458)
+                || Arrays.binarySearch(addlBand5, uarfcn) >= 0) {
+            return UtranBand.BAND_5;
+        } else if (Arrays.binarySearch(addlBand6, uarfcn) >= 0) {
+            return UtranBand.BAND_6;
+        } else if ((uarfcn >= 2237 && uarfcn <= 2563)
+                || Arrays.binarySearch(addlBand7, uarfcn) >= 0) {
+            return UtranBand.BAND_7;
+        } else if (uarfcn >= 2937 && uarfcn <= 3088) {
+            return UtranBand.BAND_8;
+        } else if (uarfcn >= 9237 && uarfcn <= 9387) {
+            return UtranBand.BAND_9;
+        } else if ((uarfcn >= 3112 && uarfcn <= 3388)
+                || Arrays.binarySearch(addlBand10, uarfcn) >= 0) {
+            return UtranBand.BAND_10;
+        } else if (uarfcn >= 3712 && uarfcn <= 3787) {
+            return UtranBand.BAND_11;
+        } else if ((uarfcn >= 3842 && uarfcn <= 3903)
+                || Arrays.binarySearch(addlBand12, uarfcn) >= 0) {
+            return UtranBand.BAND_12;
+        } else if ((uarfcn >= 4017 && uarfcn <= 4043)
+                || Arrays.binarySearch(addlBand13, uarfcn) >= 0) {
+            return UtranBand.BAND_13;
+        } else if ((uarfcn >= 4117 && uarfcn <= 4143)
+                || Arrays.binarySearch(addlBand14, uarfcn) >= 0) {
+            return UtranBand.BAND_14;
+        } else if ((uarfcn >= 712 && uarfcn <= 763)
+                || Arrays.binarySearch(addlBand19, uarfcn) >= 0) {
+            return UtranBand.BAND_19;
+        } else if (uarfcn >= 4512 && uarfcn <= 4638) {
+            return UtranBand.BAND_20;
+        } else if (uarfcn >= 862 && uarfcn <= 912) {
+            return UtranBand.BAND_21;
+        } else if (uarfcn >= 4662 && uarfcn <= 5038) {
+            return UtranBand.BAND_22;
+        } else if ((uarfcn >= 5112 && uarfcn <= 5413)
+                || Arrays.binarySearch(addlBand25, uarfcn) >= 0) {
+            return UtranBand.BAND_25;
+        } else if ((uarfcn >= 5762 && uarfcn <= 5913)
+                || Arrays.binarySearch(addlBand26, uarfcn) >= 0) {
+            return UtranBand.BAND_26;
+        }
+        return INVALID_BAND;
+    }
 }
diff --git a/telephony/java/android/telephony/Annotation.java b/telephony/java/android/telephony/Annotation.java
index f900c38..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)
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 27ea690..4e9e6a8 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2046,7 +2046,13 @@
      * via {@link android.telecom.PhoneAccount#CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE}
      * and can choose to hide or show the video calling icon based on whether a contact supports
      * video.
+     *
+     * @deprecated No longer used in framework code, however it may still be used by applications
+     * that have not updated their code. This config should still be set to {@code true} if
+     * {@link Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL} is set to {@code true} and
+     * {@link Ims#KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL} is set to {@code true}.
      */
+    @Deprecated
     public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
 
     /**
@@ -3862,13 +3868,51 @@
          * <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.
+         * {@link Ims#KEY_ENABLE_PRESENCE_PUBLISH_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";
 
+        /**
+         * Flag indicating whether or not this carrier supports the exchange of phone numbers with
+         * the carrier's RCS presence server in order to retrieve the RCS capabilities of requested
+         * contacts used in the RCS User Capability Exchange (UCE) procedure. See RCC.71, section 3
+         * for more information.
+         * <p>
+         * When presence is supported, the device uses the SIP SUBSCRIBE/NOTIFY procedure internally
+         * to retrieve the requested RCS capabilities. See
+         * {@link android.telephony.ims.RcsUceAdapter} for more information on how RCS capabilities
+         * can be retrieved from the carrier's network.
+         */
+        public static final String KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL =
+                KEY_PREFIX + "enable_presence_capability_exchange_bool";
+
+
+        /**
+         * Flag indicating whether or not the carrier expects the RCS UCE service to periodically
+         * refresh the RCS capabilities cache of the user's contacts as well as request the
+         * capabilities of call contacts when the SIM card is first inserted or when a new contact
+         * is added, removed, or modified. This corresponds to the RCC.07 A.19
+         * "DISABLE INITIAL ADDRESS BOOK SCAN" parameter.
+         * <p>
+         * If this flag is disabled, the capabilities cache will not be refreshed internally at all
+         * and will only be updated if the cached capabilities are stale when an application
+         * requests them.
+         */
+        public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL =
+                KEY_PREFIX + "rcs_bulk_capability_exchange_bool";
+
+        /**
+         * Flag indicating whether or not the carrier supports capability exchange with a list of
+         * contacts. When {@code true}, the device will batch together multiple requests and
+         * construct a RLMI document in the SIP SUBSCRIBE request (see RFC 4662). If {@code false},
+         * the request will be split up into one SIP SUBSCRIBE request per contact.
+         */
+        public static final String KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL =
+                KEY_PREFIX + "enable_presence_group_subscribe_bool";
+
         private Ims() {}
 
         private static PersistableBundle getDefaults() {
@@ -3876,6 +3920,9 @@
             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);
+            defaults.putBoolean(KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL, false);
+            defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false);
+            defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, true);
             return defaults;
         }
     }
@@ -4018,6 +4065,12 @@
     public static final String KEY_USE_LOWER_MTU_VALUE_IF_BOTH_RECEIVED =
             "use_lower_mtu_value_if_both_received";
 
+    /**
+     * Indicates if auto-configuration server is used for the RCS config
+     * Reference: GSMA RCC.14
+     */
+    public static final String KEY_USE_ACS_FOR_RCS_BOOL = "use_acs_for_rcs_bool";
+
     /** The default value for every variable. */
     private final static PersistableBundle sDefaults;
 
@@ -4561,6 +4614,7 @@
         sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false);
         sDefaults.putString(KEY_DEFAULT_PREFERRED_APN_NAME_STRING, "");
         sDefaults.putBoolean(KEY_USE_LOWER_MTU_VALUE_IF_BOTH_RECEIVED, false);
+        sDefaults.putBoolean(KEY_USE_ACS_FOR_RCS_BOOL, false);
     }
 
     /**
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/CellSignalStrengthLte.java b/telephony/java/android/telephony/CellSignalStrengthLte.java
index db7d10a..7addf33 100644
--- a/telephony/java/android/telephony/CellSignalStrengthLte.java
+++ b/telephony/java/android/telephony/CellSignalStrengthLte.java
@@ -443,10 +443,12 @@
     /**
      * Get table index for channel quality indicator
      *
+     * Reference: 3GPP TS 136.213 section 7.2.3.
+     *
      * @return the CQI table index if available or
      *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
      */
-    /** @hide */
+    @IntRange(from = 1, to = 6)
     public int getCqiTableIndex() {
         return mCqiTableIndex;
     }
@@ -454,9 +456,12 @@
     /**
      * Get channel quality indicator
      *
+     * Reference: 3GPP TS 136.213 section 7.2.3.
+     *
      * @return the CQI if available or
      *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
      */
+    @IntRange(from = 0, to = 15)
     public int getCqi() {
         return mCqi;
     }
diff --git a/telephony/java/android/telephony/CellSignalStrengthNr.java b/telephony/java/android/telephony/CellSignalStrengthNr.java
index 1518190..bde62fb 100644
--- a/telephony/java/android/telephony/CellSignalStrengthNr.java
+++ b/telephony/java/android/telephony/CellSignalStrengthNr.java
@@ -294,9 +294,10 @@
      *
      * Reference: 3GPP TS 138.214 section 5.2.2.1.
      *
-     * Range [1, 3].
+     * @return the CQI table index if available or
+     *         {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} if unavailable.
      */
-    /** @hide */
+    @IntRange(from = 1, to = 3)
     public int getCsiCqiTableIndex() {
         return mCsiCqiTableIndex;
     }
@@ -310,10 +311,10 @@
      *
      * Reference: 3GPP TS 138.214 section 5.2.2.1.
      *
-     * Range [0, 15] for each CQI.
+     * @return the CQIs for all subbands if available or empty list if unavailable.
      */
-    /** @hide */
     @NonNull
+    @IntRange(from = 0, to = 15)
     public List<Integer> getCsiCqiReport() {
         return mCsiCqiReport;
     }
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/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/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 83e63ef..904232b 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -791,6 +791,13 @@
     public static final String IMS_RCS_UCE_ENABLED = SimInfo.COLUMN_IMS_RCS_UCE_ENABLED;
 
     /**
+     * Determines if the user has enabled cross SIM calling for this subscription.
+     *
+     * @hide
+     */
+    public static final String CROSS_SIM_CALLING_ENABLED = SimInfo.COLUMN_CROSS_SIM_CALLING_ENABLED;
+
+    /**
      * TelephonyProvider column name for whether a subscription is opportunistic, that is,
      * whether the network it connects to is limited in functionality or coverage.
      * For example, CBRS.
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 718676c..7d3cef5 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -78,12 +78,14 @@
 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;
@@ -1492,6 +1494,16 @@
     public static final int EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE_ALL = 4;
 
     /**
+     * Used as an int value for {@link #EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE}
+     * to indicate that default subscription for data/sms/voice is now determined, that
+     * it should dismiss any dialog or pop-ups that is asking user to select default sub.
+     * This is used when, for example, opportunistic subscription is configured. At that
+     * time the primary becomes default sub there's no need to ask user to select anymore.
+     * @hide
+     */
+    public static final int EXTRA_DEFAULT_SUBSCRIPTION_SELECT_TYPE_DISMISS = 5;
+
+    /**
      * Integer intent extra to be used with {@link #ACTION_PRIMARY_SUBSCRIPTION_LIST_CHANGED}
      * to indicate if the SIM combination in DSDS has limitation or compatible issue.
      * e.g. two CDMA SIMs may disrupt each other's voice call in certain scenarios.
@@ -7163,6 +7175,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 */
@@ -9261,6 +9275,35 @@
     }
 
     /**
+     * Get the mobile provisioning url that is used to launch a browser to allow users to manage
+     * their mobile plan.
+     *
+     * <p>Requires Permission:
+     * {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE}.
+     *
+     * TODO: The legacy design only supports single sim design. Ideally, this should support
+     * multi-sim design in current world.
+     *
+     * {@hide}
+     */
+    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public @Nullable String getMobileProvisioningUrl() {
+        try {
+            final ITelephony service = getITelephony();
+            if (service != null) {
+                return service.getMobileProvisioningUrl();
+            } else {
+                throw new IllegalStateException("telephony service is null.");
+            }
+        } catch (RemoteException ex) {
+            if (!isSystemProcess()) {
+                ex.rethrowAsRuntimeException();
+            }
+        }
+        return null;
+    }
+
+    /**
      * Turns mobile data on or off.
      * If this object has been created with {@link #createForSubscriptionId}, applies to the given
      * subId. Otherwise, applies to {@link SubscriptionManager#getDefaultDataSubscriptionId()}
@@ -9981,6 +10024,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.
      *
@@ -9991,12 +10044,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);
@@ -10013,12 +10071,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 {
@@ -10034,6 +10096,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
@@ -11029,6 +11170,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.
@@ -12139,23 +12329,15 @@
     @NonNull
     public Map<Integer, List<EmergencyNumber>> getEmergencyNumberList(
             @EmergencyServiceCategories int categories) {
-        Map<Integer, List<EmergencyNumber>> emergencyNumberList = new HashMap<>();
+        Map<Integer, List<EmergencyNumber>> emergencyNumberListForCategories = new HashMap<>();
         try {
             ITelephony telephony = getITelephony();
             if (telephony != null) {
-                emergencyNumberList = telephony.getEmergencyNumberList(
-                        mContext.getOpPackageName(), mContext.getAttributionTag());
-                if (emergencyNumberList != null) {
-                    for (Integer subscriptionId : emergencyNumberList.keySet()) {
-                        List<EmergencyNumber> numberList = emergencyNumberList.get(subscriptionId);
-                        for (EmergencyNumber number : numberList) {
-                            if (!number.isInEmergencyServiceCategories(categories)) {
-                                numberList.remove(number);
-                            }
-                        }
-                    }
-                }
-                return emergencyNumberList;
+                Map<Integer, List<EmergencyNumber>> emergencyNumberList =
+                        telephony.getEmergencyNumberList(mContext.getOpPackageName(),
+                                mContext.getAttributionTag());
+                emergencyNumberListForCategories =
+                        filterEmergencyNumbersByCategories(emergencyNumberList, categories);
             } else {
                 throw new IllegalStateException("telephony service is null.");
             }
@@ -12163,7 +12345,34 @@
             Log.e(TAG, "getEmergencyNumberList with Categories RemoteException", ex);
             ex.rethrowAsRuntimeException();
         }
-        return emergencyNumberList;
+        return emergencyNumberListForCategories;
+    }
+
+    /**
+     * Filter emergency numbers with categories.
+     *
+     * @hide
+     */
+    @VisibleForTesting
+    public Map<Integer, List<EmergencyNumber>> filterEmergencyNumbersByCategories(
+            Map<Integer, List<EmergencyNumber>> emergencyNumberList,
+                    @EmergencyServiceCategories int categories) {
+        Map<Integer, List<EmergencyNumber>> emergencyNumberListForCategories = new HashMap<>();
+        if (emergencyNumberList != null) {
+            for (Integer subscriptionId : emergencyNumberList.keySet()) {
+                List<EmergencyNumber> allNumbersForSub = emergencyNumberList.get(
+                        subscriptionId);
+                List<EmergencyNumber> numbersForCategoriesPerSub = new ArrayList<>();
+                for (EmergencyNumber number : allNumbersForSub) {
+                    if (number.isInEmergencyServiceCategories(categories)) {
+                        numbersForCategoriesPerSub.add(number);
+                    }
+                }
+                emergencyNumberListForCategories.put(
+                        subscriptionId, numbersForCategoriesPerSub);
+            }
+        }
+        return emergencyNumberListForCategories;
     }
 
     /**
@@ -14134,4 +14343,173 @@
         }
         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/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/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/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/DelegateRegistrationState.java b/telephony/java/android/telephony/ims/DelegateRegistrationState.java
index 3558a9b..66281ed 100644
--- a/telephony/java/android/telephony/ims/DelegateRegistrationState.java
+++ b/telephony/java/android/telephony/ims/DelegateRegistrationState.java
@@ -62,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;
 
@@ -73,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;
 
@@ -81,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;
 
@@ -90,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;
 
diff --git a/telephony/java/android/telephony/ims/ImsRcsManager.java b/telephony/java/android/telephony/ims/ImsRcsManager.java
index 0d8e5bc..bd623e0 100644
--- a/telephony/java/android/telephony/ims/ImsRcsManager.java
+++ b/telephony/java/android/telephony/ims/ImsRcsManager.java
@@ -30,7 +30,6 @@
 import android.provider.Settings;
 import android.telephony.AccessNetworkConstants;
 import android.telephony.BinderCacheManager;
-import android.telephony.CarrierConfigManager;
 import android.telephony.TelephonyFrameworkInitializer;
 import android.telephony.ims.aidl.IImsCapabilityCallback;
 import android.telephony.ims.aidl.IImsRcsController;
@@ -62,9 +61,10 @@
      * been enabled by the user can be queried using {@link RcsUceAdapter#isUceSettingEnabled()}.
      * <p>
      * This intent will always be handled by the system, however the application should only send
-     * this Intent if the carrier supports RCS contact discovery, which can be queried using the key
-     * {@link CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL}. Otherwise, the RCS contact discovery
-     * opt-in dialog will not be shown.
+     * this Intent if the carrier supports bulk RCS contact exchange, which will be true if either
+     * key {@link android.telephony.CarrierConfigManager.Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL}
+     * or {@link android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL} is set to true.
+     * Otherwise, the RCS contact discovery opt-in dialog will not be shown.
      * <p>
      * Input: A mandatory {@link Settings#EXTRA_SUB_ID} extra containing the subscription that the
      * setting will be be shown for.
@@ -396,6 +396,7 @@
      * rather the subscription is capable of this service over IMS.
      * @see #isAvailable(int)
      * @see android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL
+     * @see android.telephony.CarrierConfigManager.Ims#KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL
      * @throws ImsException if the IMS service is not available when calling this method.
      * See {@link ImsException#getCode()} for more information on the error codes.
      * @hide
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/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/ProvisioningManager.java b/telephony/java/android/telephony/ims/ProvisioningManager.java
index 0fe76a04..f3c38bc 100644
--- a/telephony/java/android/telephony/ims/ProvisioningManager.java
+++ b/telephony/java/android/telephony/ims/ProvisioningManager.java
@@ -21,6 +21,7 @@
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
+import android.annotation.SdkConstant;
 import android.annotation.StringDef;
 import android.annotation.SystemApi;
 import android.annotation.WorkerThread;
@@ -31,6 +32,7 @@
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyFrameworkInitializer;
 import android.telephony.ims.aidl.IImsConfigCallback;
+import android.telephony.ims.aidl.IRcsConfigCallback;
 import android.telephony.ims.feature.MmTelFeature;
 import android.telephony.ims.feature.RcsFeature;
 import android.telephony.ims.stub.ImsConfigImplBase;
@@ -936,6 +938,115 @@
     private int mSubId;
 
     /**
+     * The callback for RCS provisioning changes.
+     */
+    public static class RcsProvisioningCallback {
+        private static class CallbackBinder extends IRcsConfigCallback.Stub {
+
+            private final RcsProvisioningCallback mLocalCallback;
+            private Executor mExecutor;
+
+            private CallbackBinder(RcsProvisioningCallback localCallback) {
+                mLocalCallback = localCallback;
+            }
+
+            @Override
+            public void onConfigurationChanged(byte[] configXml) {
+                final long identity = Binder.clearCallingIdentity();
+                try {
+                    mExecutor.execute(() -> mLocalCallback.onConfigurationChanged(configXml));
+                } finally {
+                    Binder.restoreCallingIdentity(identity);
+                }
+            }
+
+            @Override
+            public void onAutoConfigurationErrorReceived(int errorCode, String errorString) {
+                final long identity = Binder.clearCallingIdentity();
+                try {
+                    mExecutor.execute(() -> mLocalCallback.onAutoConfigurationErrorReceived(
+                            errorCode, errorString));
+                } finally {
+                    Binder.restoreCallingIdentity(identity);
+                }
+            }
+
+            @Override
+            public void onConfigurationReset() {
+                final long identity = Binder.clearCallingIdentity();
+                try {
+                    mExecutor.execute(() -> mLocalCallback.onConfigurationReset());
+                } finally {
+                    Binder.restoreCallingIdentity(identity);
+                }
+            }
+
+            @Override
+            public void onRemoved() {
+                final long identity = Binder.clearCallingIdentity();
+                try {
+                    mExecutor.execute(() -> mLocalCallback.onRemoved());
+                } finally {
+                    Binder.restoreCallingIdentity(identity);
+                }
+            }
+
+            private void setExecutor(Executor executor) {
+                mExecutor = executor;
+            }
+        }
+
+        private final CallbackBinder mBinder = new CallbackBinder(this);
+
+        /**
+         * RCS configuration received via OTA provisioning. Configuration may change
+         * due to various triggers defined in GSMA RCC.14 for ACS(auto configuration
+         * server) or other operator defined triggers. If RCS provisioning is already
+         * completed at the time of callback registration, then this method shall be
+         * invoked with the current configuration
+         * @param configXml The RCS configurationXML received OTA.
+         */
+        public void onConfigurationChanged(@NonNull byte[] configXml) {}
+
+        /**
+         * Errors during autoconfiguration connection setup are notified by the
+         * ACS(auto configuration server) client using this interface.
+         * @param errorCode HTTP error received during connection setup defined in
+         * GSMA RCC.14 2.4.3, like {@link java.net.HttpURLConnection#HTTP_UNAUTHORIZED},
+         * {@link java.net.HttpURLConnection#HTTP_FORBIDDEN}, etc.
+         * @param errorString reason phrase received with the error
+         */
+        public void onAutoConfigurationErrorReceived(int errorCode,
+                @NonNull String errorString) {}
+
+        /**
+         * When the previously valid RCS configuration is cleaned up by telephony for
+         * any case like SIM removed, default messaging application changed, etc.,
+         * this method will be invoked to notify the application regarding this change.
+         */
+        public void onConfigurationReset() {}
+
+        /**
+         * When the RCS application is no longer the Default messaging application,
+         * or when the subscription associated with this callback is removed (SIM
+         * removed, ESIM swap,etc...), callback will automatically be removed and
+         * the below method is invoked. There is a possibility that the method is
+         * invoked after the subscription has become inactive
+         */
+        public void onRemoved() {}
+
+        /**@hide*/
+        public final IRcsConfigCallback getBinder() {
+            return mBinder;
+        }
+
+        /**@hide*/
+        public void setExecutor(Executor executor) {
+            mBinder.setExecutor(executor);
+        }
+    }
+
+    /**
      * Create a new {@link ProvisioningManager} for the subscription specified.
      *
      * @param subId The ID of the subscription that this ProvisioningManager will use.
@@ -1207,6 +1318,174 @@
 
     }
 
+    /**
+     * Provides the single registration capability of the device and the carrier.
+     *
+     * <p>This intent only provides the capability and not the current provisioning status of
+     * the RCS VoLTE single registration feature. Only default messaging application may receive
+     * the intent.
+     *
+     * <p>Contains {@link #EXTRA_SUBSCRIPTION_INDEX} to specify the subscription index for which
+     * the intent is valid. and {@link #EXTRA_STATUS} to specify RCS VoLTE single registration
+     * status.
+     */
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
+    public static final String ACTION_RCS_SINGLE_REGISTRATION_CAPABILITY_UPDATE =
+            "android.telephony.ims.action.RCS_SINGLE_REGISTRATION_CAPABILITY_UPDATE";
+
+    /**
+     * Integer extra to specify subscription index.
+     */
+    public static final String EXTRA_SUBSCRIPTION_ID =
+            "android.telephony.ims.extra.SUBSCRIPTION_ID";
+
+    /**
+     * Integer extra to specify RCS single registration status
+     *
+     * <p>The value can be {@link #STATUS_CAPABLE}, {@link #STATUS_DEVICE_NOT_CAPABLE},
+     * {@link #STATUS_CARRIER_NOT_CAPABLE}, or bitwise OR of
+     * {@link #STATUS_DEVICE_NOT_CAPABLE} and {@link #STATUS_CARRIER_NOT_CAPABLE}.
+     */
+    public static final String EXTRA_STATUS = "android.telephony.ims.extra.STATUS";
+
+    /**
+     * RCS VoLTE single registration is supported by the device and carrier.
+     */
+    public static final int STATUS_CAPABLE                       = 0;
+
+    /**
+     * RCS VoLTE single registration is not supported by the device.
+     */
+    public static final int STATUS_DEVICE_NOT_CAPABLE            = 0x01;
+
+    /**
+     * RCS VoLTE single registration is not supported by the carrier
+     */
+    public static final int STATUS_CARRIER_NOT_CAPABLE           = 0x01 << 1;
+
+    /**
+     * Provide the client configuration parameters of the RCS application.
+     *
+     * <p>When this application is also the default messaging application, and RCS
+     * provisioning is done using autoconfiguration, then these parameters shall be
+     * sent in the HTTP get request to fetch the RCS provisioning. RCS client
+     * configuration must be provided by the application before registering for the
+     * provisioning status events {@link #registerRcsProvisioningChangedCallback()}
+     * @param rcc RCS client configuration {@link RcsClientConfiguration}
+     */
+    @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
+    public void setRcsClientConfiguration(
+            @NonNull RcsClientConfiguration rcc) throws ImsException {
+        try {
+            getITelephony().setRcsClientConfiguration(mSubId, rcc);
+        } catch (ServiceSpecificException e) {
+            throw new ImsException(e.getMessage(), e.errorCode);
+        } catch (RemoteException | IllegalStateException e) {
+            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
+        }
+    }
+
+    /**
+     * Returns a flag to indicate if the device software and the carrier
+     * have the capability to support RCS Volte single IMS registration.
+     * @return true if this single registration is capable, false otherwise
+     * @throws ImsException If the remote ImsService is not available for
+     * any reason or the subscription associated with this instance is no
+     * longer active. See {@link ImsException#getCode()} for more
+     * information.
+     */
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public boolean isRcsVolteSingleRegistrationCapable() throws ImsException {
+        try {
+            return getITelephony().isRcsVolteSingleRegistrationCapable(mSubId);
+        } catch (RemoteException | IllegalStateException e) {
+            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
+        }
+    }
+
+   /**
+     * Registers a new {@link RcsProvisioningCallback} to listen to changes to
+     * RCS provisioning xml.
+     *
+     * <p>RCS application must be the default messaging application and must
+     * have already registered its {@link RcsClientConfiguration} by using
+     * {@link #setRcsClientConfiguration} before it registers the provisioning
+     * callback. If ProvisioningManager has a valid RCS configuration at the
+     * time of callback registration and a reconfiguration is not required
+     * due to RCS client parameters change, then the callback shall be invoked
+     * immediately with the xml.
+     * When the subscription associated with this callback is removed (SIM removed,
+     * ESIM swap,etc...), this callback will automatically be removed.
+     *
+     * @param executor The {@link Executor} to call the callback methods on
+     * @param callback The rcs provisioning callback to be registered.
+     * @see #unregisterRcsProvisioningChangedCallback(RcsProvisioningCallback)
+     * @see SubscriptionManager.OnSubscriptionsChangedListener
+     * @throws IllegalArgumentException if the subscription associated with this
+     * callback is not active (SIM is not inserted, ESIM inactive) or the
+     * subscription is invalid.
+     * @throws ImsException if the subscription associated with this callback is
+     * valid, but the {@link ImsService} associated with the subscription is not
+     * available. This can happen if the service crashed, for example.
+     * It shall also throw this exception when the RCS client parameters for the
+     * application are not valid. In that case application must set the client
+     * params (See {@link #setRcsClientConfiguration()}) and re register the
+     * callback.
+     * See {@link ImsException#getCode()} for a more detailed reason.
+     */
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public void registerRcsProvisioningChangedCallback(
+            @NonNull @CallbackExecutor Executor executor,
+            @NonNull RcsProvisioningCallback callback) throws ImsException {
+        callback.setExecutor(executor);
+        try {
+            getITelephony().registerRcsProvisioningChangedCallback(mSubId, callback.getBinder());
+        } catch (ServiceSpecificException e) {
+            throw new ImsException(e.getMessage(), e.errorCode);
+        } catch (RemoteException | IllegalStateException e) {
+            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
+        }
+    }
+
+    /**
+     * Unregister an existing {@link RcsProvisioningCallback}. Application can
+     * unregister when its no longer interested in the provisioning updates
+     * like when a user disables RCS from the UI/settings.
+     * When the subscription associated with this callback is removed (SIM
+     * removed, ESIM swap, etc...), this callback will automatically be
+     * removed. If this method is called for an inactive subscription, it
+     * will result in a no-op.
+     * @param callback The existing {@link RcsProvisioningCallback} to be
+     * removed.
+     * @see #registerRcsProvisioningChangedCallback(RcsClientConfiguration,
+     * Executor, RcsProvisioningCallback) @throws IllegalArgumentException
+     * if the subscription associated with this callback is invalid.
+     */
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public void unregisterRcsProvisioningChangedCallback(
+            @NonNull RcsProvisioningCallback callback) {
+        try {
+            getITelephony().unregisterRcsProvisioningChangedCallback(
+                    mSubId, callback.getBinder());
+        } catch (RemoteException e) {
+            throw e.rethrowAsRuntimeException();
+        }
+    }
+
+    /**
+     * Reconfiguration triggered by the RCS application. Most likely cause
+     * is the 403 forbidden to a HTTP request.
+     */
+    @RequiresPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
+    public void triggerRcsReconfiguration() {
+        try {
+            getITelephony().triggerRcsReconfiguration(mSubId);
+        } catch (RemoteException e) {
+            throw e.rethrowAsRuntimeException();
+        }
+    }
+
     private static ITelephony getITelephony() {
         ITelephony binder = ITelephony.Stub.asInterface(
                 TelephonyFrameworkInitializer
diff --git a/telephony/java/android/telephony/ims/RcsClientConfiguration.aidl b/telephony/java/android/telephony/ims/RcsClientConfiguration.aidl
new file mode 100644
index 0000000..a702f0f
--- /dev/null
+++ b/telephony/java/android/telephony/ims/RcsClientConfiguration.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.ims;
+
+parcelable RcsClientConfiguration;
diff --git a/telephony/java/android/telephony/ims/RcsClientConfiguration.java b/telephony/java/android/telephony/ims/RcsClientConfiguration.java
new file mode 100644
index 0000000..793c377
--- /dev/null
+++ b/telephony/java/android/telephony/ims/RcsClientConfiguration.java
@@ -0,0 +1,162 @@
+/*
+ * 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;
+
+import android.annotation.NonNull;
+import android.annotation.StringDef;
+import android.annotation.SystemApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.Objects;
+
+/**
+ * The container of RCS application related configs.
+ *
+ * @hide
+ */
+@SystemApi
+public final class RcsClientConfiguration implements Parcelable {
+
+    /**@hide*/
+    @StringDef(prefix = "RCS_PROFILE_",
+            value = {RCS_PROFILE_1_0, RCS_PROFILE_2_3})
+    public @interface StringRcsProfile {}
+
+    /**
+     * RCS profile UP 1.0
+     */
+    public static final String RCS_PROFILE_1_0 = "UP_1.0";
+    /**
+     * RCS profile UP 2.3
+     */
+    public static final String RCS_PROFILE_2_3 = "UP_2.3";
+
+    private String mRcsVersion;
+    private String mRcsProfile;
+    private String mClientVendor;
+    private String mClientVersion;
+
+    /**
+     * Create a RcsClientConfiguration object.
+     * Default messaging application must pass a valid configuration object
+     * @param rcsVersion The parameter identifies the RCS version supported
+     * by the client. Refer to GSMA RCC.07 "rcs_version" parameter.
+     * @param rcsProfile Identifies a fixed set of RCS services that are
+     * supported by the client. See {@link #RCS_PROFILE_1_0 } or
+     * {@link #RCS_PROFILE_2_3 }
+     * @param clientVendor Identifies the vendor providing the RCS client.
+     * @param clientVersion Identifies the RCS client version. Refer to GSMA
+     * RCC.07 "client_version" parameter.
+     * Example:client_version=RCSAndrd-1.0
+     */
+    public RcsClientConfiguration(@NonNull String rcsVersion,
+            @NonNull @StringRcsProfile String rcsProfile,
+            @NonNull String clientVendor, @NonNull String clientVersion) {
+        mRcsVersion = rcsVersion;
+        mRcsProfile = rcsProfile;
+        mClientVendor = clientVendor;
+        mClientVersion = clientVersion;
+    }
+
+    /**
+     * Returns RCS version supported.
+     */
+    public @NonNull String getRcsVersion() {
+        return mRcsVersion;
+    }
+
+    /**
+     * Returns RCS profile supported.
+     */
+    public @NonNull @StringRcsProfile String getRcsProfile() {
+        return mRcsProfile;
+    }
+
+    /**
+     * Returns the name of the vendor providing the RCS client.
+     */
+    public @NonNull String getClientVendor() {
+        return mClientVendor;
+    }
+
+    /**
+     * Returns the RCS client version.
+     */
+    public @NonNull String getClientVersion() {
+        return mClientVersion;
+    }
+
+    /**
+     * {@link Parcelable#writeToParcel}
+     */
+    @Override
+    public void writeToParcel(@NonNull Parcel out, int flags) {
+        out.writeString(mRcsVersion);
+        out.writeString(mRcsProfile);
+        out.writeString(mClientVendor);
+        out.writeString(mClientVersion);
+    }
+
+    /**
+     * {@link Parcelable.Creator}
+     *
+     */
+    public static final @android.annotation.NonNull Parcelable.Creator<
+            RcsClientConfiguration> CREATOR = new Creator<RcsClientConfiguration>() {
+                @Override
+                public RcsClientConfiguration createFromParcel(Parcel in) {
+                    String rcsVersion = in.readString();
+                    String rcsProfile = in.readString();
+                    String clientVendor = in.readString();
+                    String clientVersion = in.readString();
+                    return new RcsClientConfiguration(rcsVersion, rcsProfile,
+                            clientVendor, clientVersion);
+                }
+
+                @Override
+                public RcsClientConfiguration[] newArray(int size) {
+                    return new RcsClientConfiguration[size];
+                }
+            };
+
+    /**
+     * {@link Parcelable#describeContents}
+     */
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof RcsClientConfiguration)) {
+            return false;
+        }
+
+        RcsClientConfiguration other = (RcsClientConfiguration) obj;
+
+        return mRcsVersion.equals(other.mRcsVersion) && mRcsProfile.equals(other.mRcsProfile)
+                && mClientVendor.equals(other.mClientVendor)
+                && mClientVersion.equals(other.mClientVersion);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(mRcsVersion, mRcsProfile, mClientVendor, mClientVersion);
+    }
+}
diff --git a/telephony/java/android/telephony/ims/RcsConfig.aidl b/telephony/java/android/telephony/ims/RcsConfig.aidl
new file mode 100644
index 0000000..cfd93fb
--- /dev/null
+++ b/telephony/java/android/telephony/ims/RcsConfig.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.ims;
+
+parcelable RcsConfig;
diff --git a/telephony/java/android/telephony/ims/RcsConfig.java b/telephony/java/android/telephony/ims/RcsConfig.java
new file mode 100644
index 0000000..07e95cc
--- /dev/null
+++ b/telephony/java/android/telephony/ims/RcsConfig.java
@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telephony.ims;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ContentValues;
+import android.content.Context;
+import android.database.Cursor;
+import android.os.Build;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.provider.Telephony.SimInfo;
+import android.text.TextUtils;
+
+import com.android.telephony.Rlog;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+import org.xmlpull.v1.XmlPullParserFactory;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+/**
+ * RCS config data and methods to process the config
+ * @hide
+ */
+public final class RcsConfig implements Parcelable {
+    private static final String LOG_TAG = "RcsConfig";
+    private static final boolean DBG = Build.IS_ENG;
+
+    private final HashMap<String, String> mValues = new HashMap<>();
+
+    private RcsConfig(HashMap<String, String> values) {
+        mValues.putAll(values);
+    }
+
+    public RcsConfig(byte[] data) throws IllegalArgumentException {
+        if (data == null || data.length == 0) {
+            throw new IllegalArgumentException("Empty data");
+        }
+        ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
+        try {
+            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
+            factory.setNamespaceAware(true);
+            XmlPullParser xpp = factory.newPullParser();
+            xpp.setInput(inputStream, null);
+            int eventType = xpp.getEventType();
+            String tag = null;
+            while (eventType != XmlPullParser.END_DOCUMENT) {
+                if (eventType == XmlPullParser.START_TAG) {
+                    tag = xpp.getName().trim();
+                } else if (eventType == XmlPullParser.END_TAG) {
+                    tag = null;
+                } else if (eventType == XmlPullParser.TEXT) {
+                    String value = xpp.getText().trim();
+                    if (!TextUtils.isEmpty(tag) && !TextUtils.isEmpty(value)) {
+                        mValues.put(tag, value);
+                    }
+                }
+                eventType = xpp.next();
+            }
+        } catch (IOException | XmlPullParserException e) {
+            throw new IllegalArgumentException(e);
+        } finally {
+            try {
+                inputStream.close();
+            } catch (IOException e) {
+                loge("error to close input stream, skip.");
+            }
+        }
+    }
+
+    /**
+     * Retrieve a String value of the config item with the tag
+     *
+     * @param tag The name of the config to retrieve.
+     * @param defaultVal Value to return if the config does not exist.
+     *
+     * @return Returns the config value if it exists, or defaultVal.
+     */
+    public @Nullable String getString(@NonNull String tag, @Nullable String defaultVal) {
+        return mValues.containsKey(tag) ? mValues.get(tag) : defaultVal;
+    }
+
+    /**
+     * Retrieve a int value of the config item with the tag
+     *
+     * @param tag The name of the config to retrieve.
+     * @param defaultVal Value to return if the config does not exist or not valid.
+     *
+     * @return Returns the config value if it exists and is a valid int, or defaultVal.
+     */
+    public int getInteger(@NonNull String tag, int defaultVal) {
+        try {
+            return Integer.parseInt(mValues.get(tag));
+        } catch (NumberFormatException e) {
+            logd("error to getInteger for " + tag + " due to " + e);
+        }
+        return defaultVal;
+    }
+
+    /**
+     * Retrieve a boolean value of the config item with the tag
+     *
+     * @param tag The name of the config to retrieve.
+     * @param defaultVal Value to return if the config does not exist.
+     *
+     * @return Returns the config value if it exists, or defaultVal.
+     */
+    public boolean getBoolean(@NonNull String tag, boolean defaultVal) {
+        if (!mValues.containsKey(tag)) {
+            return defaultVal;
+        }
+        return Boolean.parseBoolean(mValues.get(tag));
+    }
+
+    /**
+     * Check whether the config item exists
+     *
+     * @param tag The name of the config to retrieve.
+     *
+     * @return Returns true if it exists, or false.
+     */
+    public boolean hasConfig(@NonNull String tag) {
+        return mValues.containsKey(tag);
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("[RCS Config]");
+        if (DBG) {
+            mValues.forEach((t, v) -> {
+                sb.append("\n");
+                sb.append(t);
+                sb.append(" : ");
+                sb.append(v);
+            });
+        }
+        return sb.toString();
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof RcsConfig)) {
+            return false;
+        }
+
+        RcsConfig other = (RcsConfig) obj;
+
+        return mValues.equals(other.mValues);
+    }
+
+    @Override
+    public int hashCode() {
+        return mValues.hashCode();
+    }
+
+    /**
+     * compress the gzip format data
+     */
+    public static @Nullable byte[] compressGzip(@NonNull byte[] data) {
+        if (data == null || data.length == 0) {
+            return data;
+        }
+        byte[] out = null;
+        try {
+            ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);
+            GZIPOutputStream gzipCompressingStream =
+                    new GZIPOutputStream(outputStream);
+            gzipCompressingStream.write(data);
+            gzipCompressingStream.close();
+            out = outputStream.toByteArray();
+            outputStream.close();
+        } catch (IOException e) {
+            loge("Error to compressGzip due to " + e);
+        }
+        return out;
+    }
+
+    /**
+     * decompress the gzip format data
+     */
+    public static @Nullable byte[] decompressGzip(@NonNull byte[] data) {
+        if (data == null || data.length == 0) {
+            return data;
+        }
+        byte[] out = null;
+        try {
+            ByteArrayInputStream inputStream = new ByteArrayInputStream(data);
+            ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+            GZIPInputStream gzipDecompressingStream =
+                    new GZIPInputStream(inputStream);
+            byte[] buf = new byte[1024];
+            int size = gzipDecompressingStream.read(buf);
+            while (size >= 0) {
+                outputStream.write(buf, 0, size);
+                size = gzipDecompressingStream.read(buf);
+            }
+            gzipDecompressingStream.close();
+            inputStream.close();
+            out = outputStream.toByteArray();
+            outputStream.close();
+        } catch (IOException e) {
+            loge("Error to decompressGzip due to " + e);
+        }
+        return out;
+    }
+
+    /**
+     * save the config to siminfo db. It is only used internally.
+     */
+    public static void updateConfigForSub(@NonNull Context cxt, int subId,
+            @NonNull byte[] config, boolean isCompressed) {
+        //always store gzip compressed data
+        byte[] data = isCompressed ? config : compressGzip(config);
+        ContentValues values = new ContentValues();
+        values.put(SimInfo.COLUMN_RCS_CONFIG, data);
+        cxt.getContentResolver().update(SimInfo.CONTENT_URI, values,
+                SimInfo.COLUMN_UNIQUE_KEY_SUBSCRIPTION_ID + "=" + subId, null);
+    }
+
+    /**
+     * load the config from siminfo db. It is only used internally.
+     */
+    public static @Nullable byte[] loadRcsConfigForSub(@NonNull Context cxt,
+            int subId, boolean isCompressed) {
+
+        byte[] data = null;
+
+        Cursor cursor = cxt.getContentResolver().query(SimInfo.CONTENT_URI, null,
+                SimInfo.COLUMN_UNIQUE_KEY_SUBSCRIPTION_ID + "=" + subId, null, null);
+        try {
+            if (cursor != null && cursor.moveToFirst()) {
+                data = cursor.getBlob(cursor.getColumnIndexOrThrow(SimInfo.COLUMN_RCS_CONFIG));
+            }
+        } catch (Exception e) {
+            loge("error to load rcs config for sub:" + subId + " due to " + e);
+        } finally {
+            if (cursor != null) {
+                cursor.close();
+            }
+        }
+        return isCompressed ? data : decompressGzip(data);
+    }
+
+    /**
+     * {@link Parcelable#writeToParcel}
+     */
+    public void writeToParcel(@NonNull Parcel out, int flags) {
+        out.writeMap(mValues);
+    }
+
+    /**
+     * {@link Parcelable.Creator}
+     *
+     */
+    public static final @NonNull Parcelable.Creator<RcsConfig>
+            CREATOR = new Creator<RcsConfig>() {
+                @Override
+                public RcsConfig createFromParcel(Parcel in) {
+                    HashMap<String, String> values = in.readHashMap(null);
+                    return values == null ? null : new RcsConfig(values);
+                }
+
+                @Override
+                public RcsConfig[] newArray(int size) {
+                    return new RcsConfig[size];
+                }
+            };
+
+    /**
+     * {@link Parcelable#describeContents}
+     */
+    public int describeContents() {
+        return 0;
+    }
+
+    private static void logd(String msg) {
+        Rlog.d(LOG_TAG, msg);
+    }
+
+    private static void loge(String msg) {
+        Rlog.e(LOG_TAG, msg);
+    }
+}
diff --git a/telephony/java/android/telephony/ims/SipDelegateConnection.java b/telephony/java/android/telephony/ims/SipDelegateConnection.java
index c3cc1ed..04a772c 100644
--- a/telephony/java/android/telephony/ims/SipDelegateConnection.java
+++ b/telephony/java/android/telephony/ims/SipDelegateConnection.java
@@ -62,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/SipDelegateManager.java b/telephony/java/android/telephony/ims/SipDelegateManager.java
index 2ec88ff..2e9eb94 100644
--- a/telephony/java/android/telephony/ims/SipDelegateManager.java
+++ b/telephony/java/android/telephony/ims/SipDelegateManager.java
@@ -18,7 +18,9 @@
 
 import android.Manifest;
 import android.annotation.IntDef;
+import android.annotation.IntRange;
 import android.annotation.NonNull;
+import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
 import android.annotation.SystemApi;
 import android.content.Context;
@@ -372,4 +374,37 @@
                     + " into this method");
         }
     }
+
+    /**
+     * Trigger a full network registration as required by receiving a SIP message containing a
+     * permanent error from the network or never receiving a response to a SIP transaction request.
+     *
+     * @param connection The {@link SipDelegateConnection} that was being used when this error was
+     *         received.
+     * @param sipCode The SIP code response associated with the SIP message request that
+     *         triggered this condition.
+     * @param sipReason The SIP reason code associated with the SIP message request that triggered
+     *         this condition. May be {@code null} if there was no reason String provided from the
+     *         network.
+     */
+    public void triggerFullNetworkRegistration(@NonNull SipDelegateConnection connection,
+            @IntRange(from = 100, to = 699) int sipCode, @Nullable String sipReason) {
+        if (connection == null) {
+            throw new IllegalArgumentException("invalid connection.");
+        }
+        if (connection instanceof SipDelegateConnectionAidlWrapper) {
+            SipDelegateConnectionAidlWrapper w = (SipDelegateConnectionAidlWrapper) connection;
+            try {
+                IImsRcsController controller = mBinderCache.getBinder();
+                controller.triggerNetworkRegistration(mSubId, w.getSipDelegateBinder(), sipCode,
+                        sipReason);
+            } catch (RemoteException e) {
+                // Connection to telephony died, but this will signal destruction of SipDelegate
+                // eventually anyway, so return.
+            }
+        } else {
+            throw new IllegalArgumentException("Unknown SipDelegateConnection implementation passed"
+                    + " into this method");
+        }
+    }
 }
diff --git a/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
index 57206c9..5eee389 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsConfig.aidl
@@ -18,8 +18,9 @@
 package android.telephony.ims.aidl;
 
 import android.os.PersistableBundle;
-
 import android.telephony.ims.aidl.IImsConfigCallback;
+import android.telephony.ims.aidl.IRcsConfigCallback;
+import android.telephony.ims.RcsClientConfiguration;
 
 import com.android.ims.ImsConfigListener;
 
@@ -41,4 +42,9 @@
     int setConfigString(int item, String value);
     void updateImsCarrierConfigs(in PersistableBundle bundle);
     void notifyRcsAutoConfigurationReceived(in byte[] config, boolean isCompressed);
+    void notifyRcsAutoConfigurationRemoved();
+    void addRcsConfigCallback(IRcsConfigCallback c);
+    void removeRcsConfigCallback(IRcsConfigCallback c);
+    void triggerRcsReconfiguration();
+    void setRcsClientConfiguration(in RcsClientConfiguration rcc);
 }
diff --git a/telephony/java/android/telephony/ims/aidl/IImsRcsController.aidl b/telephony/java/android/telephony/ims/aidl/IImsRcsController.aidl
index c6d9a86..3634989 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsRcsController.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRcsController.aidl
@@ -67,6 +67,8 @@
             ISipDelegateConnectionStateCallback delegateState,
             ISipDelegateMessageCallback delegateMessage);
     void destroySipDelegate(int subId, ISipDelegate connection, int reason);
+    void triggerNetworkRegistration(int subId, ISipDelegate connection, int sipCode,
+            String sipReason);
 
     // Internal commands that should not be made public
     void registerRcsFeatureCallback(int slotId, in IImsServiceFeatureCallback callback);
diff --git a/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl b/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
index 4ae0a75..4fd9040 100644
--- a/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
+++ b/telephony/java/android/telephony/ims/aidl/IImsRegistration.aidl
@@ -28,4 +28,7 @@
    int getRegistrationTechnology();
    oneway void addRegistrationCallback(IImsRegistrationCallback c);
    oneway void removeRegistrationCallback(IImsRegistrationCallback c);
-}
\ No newline at end of file
+   oneway void triggerFullNetworkRegistration(int sipCode, String sipReason);
+   oneway void triggerUpdateSipDelegateRegistration();
+   oneway void triggerSipDelegateDeregistration();
+}
diff --git a/telephony/java/android/telephony/ims/aidl/IRcsConfigCallback.aidl b/telephony/java/android/telephony/ims/aidl/IRcsConfigCallback.aidl
new file mode 100644
index 0000000..5a8973e
--- /dev/null
+++ b/telephony/java/android/telephony/ims/aidl/IRcsConfigCallback.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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;
+
+/**
+ * The callback for RCS provisioning changes.
+ * {@hide}
+ */
+oneway interface IRcsConfigCallback {
+    void onConfigurationChanged(in byte[] config);
+    void onAutoConfigurationErrorReceived(int errorCode, String errorString);
+    void onConfigurationReset();
+    void onRemoved();
+}
+
diff --git a/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl b/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
index 5d6766a6..ad75be4 100644
--- a/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
+++ b/telephony/java/android/telephony/ims/aidl/ISipDelegate.aidl
@@ -26,7 +26,5 @@
     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/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/SipDelegateConnectionAidlWrapper.java b/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
index 29ba8e2..a35039b 100644
--- a/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
+++ b/telephony/java/android/telephony/ims/aidl/SipDelegateConnectionAidlWrapper.java
@@ -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/stub/ImsConfigImplBase.java b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
index e757d9f..cc050be 100644
--- a/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsConfigImplBase.java
@@ -23,8 +23,11 @@
 import android.os.PersistableBundle;
 import android.os.RemoteException;
 import android.telephony.ims.ProvisioningManager;
+import android.telephony.ims.RcsClientConfiguration;
+import android.telephony.ims.RcsConfig;
 import android.telephony.ims.aidl.IImsConfig;
 import android.telephony.ims.aidl.IImsConfigCallback;
+import android.telephony.ims.aidl.IRcsConfigCallback;
 import android.util.Log;
 
 import com.android.ims.ImsConfig;
@@ -202,7 +205,13 @@
         @Override
         public void notifyRcsAutoConfigurationReceived(byte[] config, boolean isCompressed)
                 throws RemoteException {
-            getImsConfigImpl().notifyRcsAutoConfigurationReceived(config, isCompressed);
+            getImsConfigImpl().onNotifyRcsAutoConfigurationReceived(config, isCompressed);
+        }
+
+        @Override
+        public void notifyRcsAutoConfigurationRemoved()
+                throws RemoteException {
+            getImsConfigImpl().onNotifyRcsAutoConfigurationRemoved();
         }
 
         private void notifyImsConfigChanged(int item, int value) throws RemoteException {
@@ -228,6 +237,26 @@
                 notifyImsConfigChanged(item, value);
             }
         }
+
+        @Override
+        public void addRcsConfigCallback(IRcsConfigCallback c) throws RemoteException {
+            getImsConfigImpl().addRcsConfigCallback(c);
+        }
+
+        @Override
+        public void removeRcsConfigCallback(IRcsConfigCallback c) throws RemoteException {
+            getImsConfigImpl().removeRcsConfigCallback(c);
+        }
+
+        @Override
+        public void triggerRcsReconfiguration() throws RemoteException {
+            getImsConfigImpl().triggerAutoConfiguration();
+        }
+
+        @Override
+        public void setRcsClientConfiguration(RcsClientConfiguration rcc) throws RemoteException {
+            getImsConfigImpl().setRcsClientConfiguration(rcc);
+        }
     }
 
     /**
@@ -257,6 +286,9 @@
 
     private final RemoteCallbackListExt<IImsConfigCallback> mCallbacks =
             new RemoteCallbackListExt<>();
+    private final RemoteCallbackListExt<IRcsConfigCallback> mRcsCallbacks =
+            new RemoteCallbackListExt<>();
+    private byte[] mRcsConfigData;
     ImsConfigStub mImsConfigStub;
 
     /**
@@ -320,6 +352,50 @@
         });
     }
 
+    private void addRcsConfigCallback(IRcsConfigCallback c) {
+        mRcsCallbacks.register(c);
+        if (mRcsConfigData != null) {
+            try {
+                c.onConfigurationChanged(mRcsConfigData);
+            } catch (RemoteException e) {
+                Log.w(TAG, "dead binder to call onConfigurationChanged, skipping.");
+            }
+        }
+    }
+
+    private void removeRcsConfigCallback(IRcsConfigCallback c) {
+        mRcsCallbacks.unregister(c);
+    }
+
+    private void onNotifyRcsAutoConfigurationReceived(byte[] config, boolean isCompressed) {
+        mRcsConfigData = isCompressed ? RcsConfig.decompressGzip(config) : config;
+        // can be null in testing
+        if (mRcsCallbacks != null) {
+            mRcsCallbacks.broadcastAction(c -> {
+                try {
+                    c.onConfigurationChanged(mRcsConfigData);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "dead binder in notifyRcsAutoConfigurationReceived, skipping.");
+                }
+            });
+        }
+        notifyRcsAutoConfigurationReceived(config, isCompressed);
+    }
+
+    private void onNotifyRcsAutoConfigurationRemoved() {
+        mRcsConfigData = null;
+        if (mRcsCallbacks != null) {
+            mRcsCallbacks.broadcastAction(c -> {
+                try {
+                    c.onConfigurationReset();
+                } catch (RemoteException e) {
+                    Log.w(TAG, "dead binder in notifyRcsAutoConfigurationRemoved, skipping.");
+                }
+            });
+        }
+        notifyRcsAutoConfigurationRemoved();
+    }
+
     /**
      * @hide
      */
@@ -369,6 +445,12 @@
     }
 
     /**
+     * The RCS autoconfiguration XML file is removed or invalid.
+     */
+    public void notifyRcsAutoConfigurationRemoved() {
+    }
+
+    /**
      * Sets the configuration value for this ImsService.
      *
      * @param item an integer key.
@@ -421,4 +503,43 @@
     public void updateImsCarrierConfigs(PersistableBundle bundle) {
         // Base Implementation - Should be overridden
     }
+
+    /**
+     * Default messaging application parameters are sent to the ACS client
+     * using this interface.
+     * @param rcc RCS client configuration {@link RcsClientConfiguration}
+     */
+    public void setRcsClientConfiguration(@NonNull RcsClientConfiguration rcc) {
+        // Base Implementation - Should be overridden
+    }
+
+    /**
+     * Reconfiguration triggered by the RCS application. Most likely cause
+     * is the 403 forbidden to a SIP/HTTP request
+     */
+    public void triggerAutoConfiguration() {
+        // Base Implementation - Should be overridden
+    }
+
+    /**
+     * Errors during autoconfiguration connection setup are notified by the
+     * ACS client using this interface.
+     * @param errorCode HTTP error received during connection setup.
+     * @param errorString reason phrase received with the error
+     */
+    public final void notifyAutoConfigurationErrorReceived(int errorCode,
+            @NonNull String errorString) {
+        // can be null in testing
+        if (mRcsCallbacks == null) {
+            return;
+        }
+        mRcsCallbacks.broadcastAction(c -> {
+            try {
+                //TODO compressed by default?
+                c.onAutoConfigurationErrorReceived(errorCode, errorString);
+            } catch (RemoteException e) {
+                Log.w(TAG, "dead binder in notifyAutoConfigurationErrorReceived, skipping.");
+            }
+        });
+    }
 }
diff --git a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
index 153d687..088a7e2 100644
--- a/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
+++ b/telephony/java/android/telephony/ims/stub/ImsRegistrationImplBase.java
@@ -38,6 +38,9 @@
 /**
  * Controls IMS registration for this ImsService and notifies the framework when the IMS
  * registration for this ImsService has changed status.
+ * <p>
+ * Note: There is no guarantee on the thread that the calls from the framework will be called on. It
+ * is the implementors responsibility to handle moving the calls to a working thread if required.
  * @hide
  */
 @SystemApi
@@ -92,6 +95,21 @@
         public void removeRegistrationCallback(IImsRegistrationCallback c) throws RemoteException {
             ImsRegistrationImplBase.this.removeRegistrationCallback(c);
         }
+
+        @Override
+        public void triggerFullNetworkRegistration(int sipCode, String sipReason) {
+            ImsRegistrationImplBase.this.triggerFullNetworkRegistration(sipCode, sipReason);
+        }
+
+        @Override
+        public void triggerUpdateSipDelegateRegistration() {
+            ImsRegistrationImplBase.this.updateSipDelegateRegistration();
+        }
+
+        @Override
+        public void triggerSipDelegateDeregistration() {
+            ImsRegistrationImplBase.this.triggerSipDelegateDeregistration();
+        }
     };
 
     private final RemoteCallbackListExt<IImsRegistrationCallback> mCallbacks =
@@ -133,7 +151,6 @@
      * If the SIP delegate feature tag configuration has changed, then this method will be
      * called in order to let the ImsService know that it can pick up these changes in the IMS
      * registration.
-     * @hide
      */
     public void updateSipDelegateRegistration() {
         // Stub implementation, ImsService should implement this
@@ -150,7 +167,6 @@
      * <p>
      * This should not affect the registration of features managed by the ImsService itself, such as
      * feature tags related to MMTEL registration.
-     * @hide
      */
     public void triggerSipDelegateDeregistration() {
         // Stub implementation, ImsService should implement this
@@ -169,9 +185,8 @@
      *    be carrier specific.
      * @param sipReason The reason associated with the SIP error code. {@code null} if there was no
      *    reason associated with the error.
-     * @hide
      */
-    public void triggerNetworkReregistration(@IntRange(from = 100, to = 699) int sipCode,
+    public void triggerFullNetworkRegistration(@IntRange(from = 100, to = 699) int sipCode,
             @Nullable String sipReason) {
         // Stub implementation, ImsService should implement this
     }
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/SipDelegate.java b/telephony/java/android/telephony/ims/stub/SipDelegate.java
index d7e7b62..b036b5e 100644
--- a/telephony/java/android/telephony/ims/stub/SipDelegate.java
+++ b/telephony/java/android/telephony/ims/stub/SipDelegate.java
@@ -19,7 +19,9 @@
 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;
@@ -65,10 +67,13 @@
      * 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/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 7e1aee7..33acc15 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -37,6 +37,8 @@
 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;
@@ -50,6 +52,7 @@
 import android.telephony.TelephonyHistogram;
 import android.telephony.VisualVoicemailSmsFilterSettings;
 import android.telephony.emergency.EmergencyNumber;
+import android.telephony.ims.RcsClientConfiguration;
 import android.telephony.ims.aidl.IImsCapabilityCallback;
 import android.telephony.ims.aidl.IImsConfig;
 import android.telephony.ims.aidl.IImsConfigCallback;
@@ -57,6 +60,7 @@
 import android.telephony.ims.aidl.IImsRcsFeature;
 import android.telephony.ims.aidl.IImsRegistration;
 import android.telephony.ims.aidl.IImsRegistrationCallback;
+import android.telephony.ims.aidl.IRcsConfigCallback;
 import com.android.ims.internal.IImsServiceFeatureCallback;
 import com.android.internal.telephony.CellNetworkScanResult;
 import com.android.internal.telephony.IBooleanConsumer;
@@ -1674,10 +1678,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.
      *
@@ -2265,4 +2278,84 @@
      */
     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);
+
+    /**
+     * Provide the client configuration parameters of the RCS application.
+     */
+    void setRcsClientConfiguration(int subId, in RcsClientConfiguration rcc);
+
+    /**
+     * return value to indicate whether the device and the carrier can support RCS VoLTE
+     * single registration.
+     */
+    boolean isRcsVolteSingleRegistrationCapable(int subId);
+
+    /**
+     * Register RCS provisioning callback.
+     */
+    void registerRcsProvisioningChangedCallback(int subId,
+            IRcsConfigCallback callback);
+
+    /**
+     * Unregister RCS provisioning callback.
+     */
+    void unregisterRcsProvisioningChangedCallback(int subId, IRcsConfigCallback callback);
+
+    /**
+     * trigger RCS reconfiguration.
+     */
+    void triggerRcsReconfiguration(int subId);
+
+    /**
+     * Overrides the config of RCS VoLTE single registration enabled for the device.
+     */
+    void setDeviceSingleRegistrationEnabledOverride(String enabled);
+
+    /**
+     * Gets the config of RCS VoLTE single registration enabled for the device.
+     */
+    boolean getDeviceSingleRegistrationEnabled();
+
+    /**
+     * Overrides the config of RCS VoLTE single registration enabled for the carrier/subscription.
+     */
+    boolean setCarrierSingleRegistrationEnabledOverride(int subId, String enabled);
+
+    /**
+     * Gets the config of RCS VoLTE single registration enabled for the carrier/subscription.
+     */
+    boolean getCarrierSingleRegistrationEnabled(int subId);
+
+    /**
+     *  Return the mobile provisioning url that is used to launch a browser to allow users to manage
+     *  their mobile plan.
+     */
+    String getMobileProvisioningUrl();
 }
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index 21cca4c..52f263f 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -521,6 +521,8 @@
     int RIL_REQUEST_CANCEL_HANDOVER = 218;
     int RIL_REQUEST_GET_SYSTEM_SELECTION_CHANNELS = 219;
     int RIL_REQUEST_SET_DATA_THROTTLING = 221;
+    int RIL_REQUEST_SET_ALLOWED_NETWORK_TYPE_BITMAP = 222;
+    int RIL_REQUEST_GET_ALLOWED_NETWORK_TYPE_BITMAP = 223;
 
     /* 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..72e8ffc
--- /dev/null
+++ b/test-mock/src/android/test/mock/OWNERS
@@ -0,0 +1 @@
+*
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/BatteryStatsPerfTest/OWNERS b/tests/BatteryStatsPerfTest/OWNERS
new file mode 100644
index 0000000..4068e2b
--- /dev/null
+++ b/tests/BatteryStatsPerfTest/OWNERS
@@ -0,0 +1 @@
+include /BATTERY_STATS_OWNERS
diff --git a/tests/BatteryWaster/OWNERS b/tests/BatteryWaster/OWNERS
new file mode 100644
index 0000000..4068e2b
--- /dev/null
+++ b/tests/BatteryWaster/OWNERS
@@ -0,0 +1 @@
+include /BATTERY_STATS_OWNERS
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/Android.bp b/tests/Compatibility/Android.bp
index 7dc44fa..c14e705 100644
--- a/tests/Compatibility/Android.bp
+++ b/tests/Compatibility/Android.bp
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-android_test {
+android_test_helper_app {
     name: "AppCompatibilityTest",
     static_libs: ["androidx.test.rules"],
     // Include all test java files.
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/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/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/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/NetworkProviderTest.kt b/tests/net/common/java/android/net/NetworkProviderTest.kt
index 77e9f12..bcc9072 100644
--- a/tests/net/common/java/android/net/NetworkProviderTest.kt
+++ b/tests/net/common/java/android/net/NetworkProviderTest.kt
@@ -29,6 +29,7 @@
 import com.android.net.module.util.ArrayTrackRecord
 import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo
 import com.android.testutils.DevSdkIgnoreRunner
+import com.android.testutils.isDevSdkInRange
 import org.junit.After
 import org.junit.Before
 import org.junit.Test
@@ -173,10 +174,12 @@
     @Test
     fun testDeclareNetworkRequestUnfulfillable() {
         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)
+        val provider = createNetworkProvider(mockContext)
+        // ConnectivityManager not required at creation time after R
+        if (!isDevSdkInRange(0, Build.VERSION_CODES.R)) {
+            verifyNoMoreInteractions(mockContext)
+        }
 
         mCm.registerNetworkProvider(provider)
 
diff --git a/tests/net/common/java/android/net/TcpKeepalivePacketDataTest.kt b/tests/net/common/java/android/net/TcpKeepalivePacketDataTest.kt
new file mode 100644
index 0000000..6770066
--- /dev/null
+++ b/tests/net/common/java/android/net/TcpKeepalivePacketDataTest.kt
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net
+
+import android.net.InetAddresses.parseNumericAddress
+import android.os.Build
+import com.android.testutils.DevSdkIgnoreRule
+import com.android.testutils.DevSdkIgnoreRunner
+import com.android.testutils.assertFieldCountEquals
+import com.android.testutils.assertParcelSane
+import org.junit.Test
+import org.junit.runner.RunWith
+import java.net.InetAddress
+import kotlin.test.assertEquals
+import kotlin.test.assertNotEquals
+import kotlin.test.assertTrue
+
+@RunWith(DevSdkIgnoreRunner::class)
+@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R) // TcpKeepalivePacketData added to SDK in S
+class TcpKeepalivePacketDataTest {
+    private fun makeData(
+        srcAddress: InetAddress = parseNumericAddress("192.0.2.123"),
+        srcPort: Int = 1234,
+        dstAddress: InetAddress = parseNumericAddress("192.0.2.231"),
+        dstPort: Int = 4321,
+        data: ByteArray = byteArrayOf(1, 2, 3),
+        tcpSeq: Int = 135,
+        tcpAck: Int = 246,
+        tcpWnd: Int = 1234,
+        tcpWndScale: Int = 2,
+        ipTos: Int = 0x12,
+        ipTtl: Int = 10
+    ) = TcpKeepalivePacketData(srcAddress, srcPort, dstAddress, dstPort, data, tcpSeq, tcpAck,
+            tcpWnd, tcpWndScale, ipTos, ipTtl)
+
+    @Test
+    fun testEquals() {
+        val data1 = makeData()
+        val data2 = makeData()
+        assertEquals(data1, data2)
+        assertEquals(data1.hashCode(), data2.hashCode())
+    }
+
+    @Test
+    fun testNotEquals() {
+        assertNotEquals(makeData(srcAddress = parseNumericAddress("192.0.2.124")), makeData())
+        assertNotEquals(makeData(srcPort = 1235), makeData())
+        assertNotEquals(makeData(dstAddress = parseNumericAddress("192.0.2.232")), makeData())
+        assertNotEquals(makeData(dstPort = 4322), makeData())
+        // .equals does not test .packet, as it should be generated from the other fields
+        assertNotEquals(makeData(tcpSeq = 136), makeData())
+        assertNotEquals(makeData(tcpAck = 247), makeData())
+        assertNotEquals(makeData(tcpWnd = 1235), makeData())
+        assertNotEquals(makeData(tcpWndScale = 3), makeData())
+        assertNotEquals(makeData(ipTos = 0x14), makeData())
+        assertNotEquals(makeData(ipTtl = 11), makeData())
+
+        // Update above assertions if field is added
+        assertFieldCountEquals(5, KeepalivePacketData::class.java)
+        assertFieldCountEquals(6, TcpKeepalivePacketData::class.java)
+    }
+
+    @Test
+    fun testParcelUnparcel() {
+        assertParcelSane(makeData(), fieldCount = 6) { a, b ->
+            // .equals() does not verify .packet
+            a == b && a.packet contentEquals b.packet
+        }
+    }
+
+    @Test
+    fun testToString() {
+        val data = makeData()
+        val str = data.toString()
+
+        assertTrue(str.contains(data.srcAddress.hostAddress))
+        assertTrue(str.contains(data.srcPort.toString()))
+        assertTrue(str.contains(data.dstAddress.hostAddress))
+        assertTrue(str.contains(data.dstPort.toString()))
+        // .packet not included in toString()
+        assertTrue(str.contains(data.tcpSeq.toString()))
+        assertTrue(str.contains(data.tcpAck.toString()))
+        assertTrue(str.contains(data.tcpWindow.toString()))
+        assertTrue(str.contains(data.tcpWindowScale.toString()))
+        assertTrue(str.contains(data.ipTos.toString()))
+        assertTrue(str.contains(data.ipTtl.toString()))
+
+        // Update above assertions if field is added
+        assertFieldCountEquals(5, KeepalivePacketData::class.java)
+        assertFieldCountEquals(6, TcpKeepalivePacketData::class.java)
+    }
+}
\ No newline at end of file
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/Ikev2VpnProfileTest.java b/tests/net/java/android/net/Ikev2VpnProfileTest.java
index ada5494..076e41d 100644
--- a/tests/net/java/android/net/Ikev2VpnProfileTest.java
+++ b/tests/net/java/android/net/Ikev2VpnProfileTest.java
@@ -29,6 +29,7 @@
 import androidx.test.runner.AndroidJUnit4;
 
 import com.android.internal.net.VpnProfile;
+import com.android.net.module.util.ProxyUtils;
 import com.android.org.bouncycastle.x509.X509V1CertificateGenerator;
 
 import org.junit.Before;
@@ -67,7 +68,8 @@
                     return "fooPackage";
                 }
             };
-    private final ProxyInfo mProxy = new ProxyInfo(SERVER_ADDR_STRING, -1, EXCL_LIST);
+    private final ProxyInfo mProxy = ProxyInfo.buildDirectProxy(
+            SERVER_ADDR_STRING, -1, ProxyUtils.exclusionStringAsList(EXCL_LIST));
 
     private X509Certificate mUserCert;
     private X509Certificate mServerRootCa;
diff --git a/tests/net/java/android/net/KeepalivePacketDataUtilTest.java b/tests/net/java/android/net/KeepalivePacketDataUtilTest.java
new file mode 100644
index 0000000..fc739fb
--- /dev/null
+++ b/tests/net/java/android/net/KeepalivePacketDataUtilTest.java
@@ -0,0 +1,205 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net;
+
+import static com.android.testutils.ParcelUtils.assertParcelingIsLossless;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.net.util.KeepalivePacketDataUtil;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+import java.net.InetAddress;
+import java.nio.ByteBuffer;
+
+@RunWith(JUnit4.class)
+public final class KeepalivePacketDataUtilTest {
+    private static final byte[] IPV4_KEEPALIVE_SRC_ADDR = {10, 0, 0, 1};
+    private static final byte[] IPV4_KEEPALIVE_DST_ADDR = {10, 0, 0, 5};
+
+    @Before
+    public void setUp() {}
+
+    @Test
+    public void testFromTcpKeepaliveStableParcelable() throws Exception {
+        final int srcPort = 1234;
+        final int dstPort = 4321;
+        final int seq = 0x11111111;
+        final int ack = 0x22222222;
+        final int wnd = 8000;
+        final int wndScale = 2;
+        final int tos = 4;
+        final int ttl = 64;
+        TcpKeepalivePacketData resultData = null;
+        final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
+        testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
+        testInfo.srcPort = srcPort;
+        testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
+        testInfo.dstPort = dstPort;
+        testInfo.seq = seq;
+        testInfo.ack = ack;
+        testInfo.rcvWnd = wnd;
+        testInfo.rcvWndScale = wndScale;
+        testInfo.tos = tos;
+        testInfo.ttl = ttl;
+        try {
+            resultData = KeepalivePacketDataUtil.fromStableParcelable(testInfo);
+        } catch (InvalidPacketException e) {
+            fail("InvalidPacketException: " + e);
+        }
+
+        assertEquals(InetAddress.getByAddress(testInfo.srcAddress), resultData.getSrcAddress());
+        assertEquals(InetAddress.getByAddress(testInfo.dstAddress), resultData.getDstAddress());
+        assertEquals(testInfo.srcPort, resultData.getSrcPort());
+        assertEquals(testInfo.dstPort, resultData.getDstPort());
+        assertEquals(testInfo.seq, resultData.tcpSeq);
+        assertEquals(testInfo.ack, resultData.tcpAck);
+        assertEquals(testInfo.rcvWnd, resultData.tcpWindow);
+        assertEquals(testInfo.rcvWndScale, resultData.tcpWindowScale);
+        assertEquals(testInfo.tos, resultData.ipTos);
+        assertEquals(testInfo.ttl, resultData.ipTtl);
+
+        assertParcelingIsLossless(resultData);
+
+        final byte[] packet = resultData.getPacket();
+        // IP version and IHL
+        assertEquals(packet[0], 0x45);
+        // TOS
+        assertEquals(packet[1], tos);
+        // TTL
+        assertEquals(packet[8], ttl);
+        // Source IP address.
+        byte[] ip = new byte[4];
+        ByteBuffer buf = ByteBuffer.wrap(packet, 12, 4);
+        buf.get(ip);
+        assertArrayEquals(ip, IPV4_KEEPALIVE_SRC_ADDR);
+        // Destination IP address.
+        buf = ByteBuffer.wrap(packet, 16, 4);
+        buf.get(ip);
+        assertArrayEquals(ip, IPV4_KEEPALIVE_DST_ADDR);
+
+        buf = ByteBuffer.wrap(packet, 20, 12);
+        // Source port.
+        assertEquals(buf.getShort(), srcPort);
+        // Destination port.
+        assertEquals(buf.getShort(), dstPort);
+        // Sequence number.
+        assertEquals(buf.getInt(), seq);
+        // Ack.
+        assertEquals(buf.getInt(), ack);
+        // Window size.
+        buf = ByteBuffer.wrap(packet, 34, 2);
+        assertEquals(buf.getShort(), wnd >> wndScale);
+    }
+
+    //TODO: add ipv6 test when ipv6 supported
+
+    @Test
+    public void testToTcpKeepaliveStableParcelable() throws Exception {
+        final int srcPort = 1234;
+        final int dstPort = 4321;
+        final int sequence = 0x11111111;
+        final int ack = 0x22222222;
+        final int wnd = 48_000;
+        final int wndScale = 2;
+        final int tos = 4;
+        final int ttl = 64;
+        final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
+        testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
+        testInfo.srcPort = srcPort;
+        testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
+        testInfo.dstPort = dstPort;
+        testInfo.seq = sequence;
+        testInfo.ack = ack;
+        testInfo.rcvWnd = wnd;
+        testInfo.rcvWndScale = wndScale;
+        testInfo.tos = tos;
+        testInfo.ttl = ttl;
+        TcpKeepalivePacketData testData = null;
+        TcpKeepalivePacketDataParcelable resultData = null;
+        testData = KeepalivePacketDataUtil.fromStableParcelable(testInfo);
+        resultData = KeepalivePacketDataUtil.toStableParcelable(testData);
+        assertArrayEquals(resultData.srcAddress, IPV4_KEEPALIVE_SRC_ADDR);
+        assertArrayEquals(resultData.dstAddress, IPV4_KEEPALIVE_DST_ADDR);
+        assertEquals(resultData.srcPort, srcPort);
+        assertEquals(resultData.dstPort, dstPort);
+        assertEquals(resultData.seq, sequence);
+        assertEquals(resultData.ack, ack);
+        assertEquals(resultData.rcvWnd, wnd);
+        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());
+    }
+
+    @Test
+    public void testParseTcpKeepalivePacketData() throws Exception {
+        final int srcPort = 1234;
+        final int dstPort = 4321;
+        final int sequence = 0x11111111;
+        final int ack = 0x22222222;
+        final int wnd = 4800;
+        final int wndScale = 2;
+        final int tos = 4;
+        final int ttl = 64;
+        final TcpKeepalivePacketDataParcelable testParcel = new TcpKeepalivePacketDataParcelable();
+        testParcel.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
+        testParcel.srcPort = srcPort;
+        testParcel.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
+        testParcel.dstPort = dstPort;
+        testParcel.seq = sequence;
+        testParcel.ack = ack;
+        testParcel.rcvWnd = wnd;
+        testParcel.rcvWndScale = wndScale;
+        testParcel.tos = tos;
+        testParcel.ttl = ttl;
+
+        final KeepalivePacketData testData =
+                KeepalivePacketDataUtil.fromStableParcelable(testParcel);
+        final TcpKeepalivePacketDataParcelable parsedParcelable =
+                KeepalivePacketDataUtil.parseTcpKeepalivePacketData(testData);
+        final TcpKeepalivePacketData roundTripData =
+                KeepalivePacketDataUtil.fromStableParcelable(parsedParcelable);
+
+        // Generated packet is the same, but rcvWnd / wndScale will differ if scale is non-zero
+        assertTrue(testData.getPacket().length > 0);
+        assertArrayEquals(testData.getPacket(), roundTripData.getPacket());
+
+        testParcel.rcvWndScale = 0;
+        final KeepalivePacketData noScaleTestData =
+                KeepalivePacketDataUtil.fromStableParcelable(testParcel);
+        final TcpKeepalivePacketDataParcelable noScaleParsedParcelable =
+                KeepalivePacketDataUtil.parseTcpKeepalivePacketData(noScaleTestData);
+        final TcpKeepalivePacketData noScaleRoundTripData =
+                KeepalivePacketDataUtil.fromStableParcelable(noScaleParsedParcelable);
+        assertEquals(noScaleTestData, noScaleRoundTripData);
+        assertTrue(noScaleTestData.getPacket().length > 0);
+        assertArrayEquals(noScaleTestData.getPacket(), noScaleRoundTripData.getPacket());
+    }
+}
diff --git a/tests/net/java/android/net/MacAddressTest.java b/tests/net/java/android/net/MacAddressTest.java
index 91c9a2a..6de31f6 100644
--- a/tests/net/java/android/net/MacAddressTest.java
+++ b/tests/net/java/android/net/MacAddressTest.java
@@ -22,11 +22,11 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import android.net.util.MacAddressUtils;
-
 import androidx.test.filters.SmallTest;
 import androidx.test.runner.AndroidJUnit4;
 
+import com.android.net.module.util.MacAddressUtils;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
diff --git a/tests/net/java/android/net/NetworkUtilsTest.java b/tests/net/java/android/net/NetworkUtilsTest.java
index 3158cc8..7748288 100644
--- a/tests/net/java/android/net/NetworkUtilsTest.java
+++ b/tests/net/java/android/net/NetworkUtilsTest.java
@@ -16,24 +16,10 @@
 
 package android.net;
 
-import static android.system.OsConstants.AF_INET;
-import static android.system.OsConstants.AF_INET6;
-import static android.system.OsConstants.AF_UNIX;
-import static android.system.OsConstants.EPERM;
-import static android.system.OsConstants.SOCK_DGRAM;
-import static android.system.OsConstants.SOCK_STREAM;
-
 import static junit.framework.Assert.assertEquals;
 
-import static org.junit.Assert.fail;
-
-import android.system.ErrnoException;
-import android.system.Os;
-
 import androidx.test.runner.AndroidJUnit4;
 
-import libcore.io.IoUtils;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -139,50 +125,4 @@
         assertEquals(BigInteger.valueOf(7l - 4 + 4 + 16 + 65536),
                 NetworkUtils.routedIPv6AddressCount(set));
     }
-
-    private static void expectSocketSuccess(String msg, int domain, int type) {
-        try {
-            IoUtils.closeQuietly(Os.socket(domain, type, 0));
-        } catch (ErrnoException e) {
-            fail(msg + e.getMessage());
-        }
-    }
-
-    private static void expectSocketPemissionError(String msg, int domain, int type) {
-        try {
-            IoUtils.closeQuietly(Os.socket(domain, type, 0));
-            fail(msg);
-        } catch (ErrnoException e) {
-            assertEquals(msg, e.errno, EPERM);
-        }
-    }
-
-    private static void expectHasNetworking() {
-        expectSocketSuccess("Creating a UNIX socket should not have thrown ErrnoException",
-                AF_UNIX, SOCK_STREAM);
-        expectSocketSuccess("Creating a AF_INET socket shouldn't have thrown ErrnoException",
-                AF_INET, SOCK_DGRAM);
-        expectSocketSuccess("Creating a AF_INET6 socket shouldn't have thrown ErrnoException",
-                AF_INET6, SOCK_DGRAM);
-    }
-
-    private static void expectNoNetworking() {
-        expectSocketSuccess("Creating a UNIX socket should not have thrown ErrnoException",
-                AF_UNIX, SOCK_STREAM);
-        expectSocketPemissionError(
-                "Creating a AF_INET socket should have thrown ErrnoException(EPERM)",
-                AF_INET, SOCK_DGRAM);
-        expectSocketPemissionError(
-                "Creating a AF_INET6 socket should have thrown ErrnoException(EPERM)",
-                AF_INET6, SOCK_DGRAM);
-    }
-
-    @Test
-    public void testSetAllowNetworkingForProcess() {
-        expectHasNetworking();
-        NetworkUtils.setAllowNetworkingForProcess(false);
-        expectNoNetworking();
-        NetworkUtils.setAllowNetworkingForProcess(true);
-        expectHasNetworking();
-    }
 }
diff --git a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java b/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
deleted file mode 100644
index c5b25bd..0000000
--- a/tests/net/java/android/net/TcpKeepalivePacketDataTest.java
+++ /dev/null
@@ -1,157 +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;
-
-import static com.android.testutils.ParcelUtils.assertParcelingIsLossless;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-import java.net.InetAddress;
-import java.nio.ByteBuffer;
-
-@RunWith(JUnit4.class)
-public final class TcpKeepalivePacketDataTest {
-    private static final byte[] IPV4_KEEPALIVE_SRC_ADDR = {10, 0, 0, 1};
-    private static final byte[] IPV4_KEEPALIVE_DST_ADDR = {10, 0, 0, 5};
-
-    @Before
-    public void setUp() {}
-
-    @Test
-    public void testV4TcpKeepalivePacket() throws Exception {
-        final int srcPort = 1234;
-        final int dstPort = 4321;
-        final int seq = 0x11111111;
-        final int ack = 0x22222222;
-        final int wnd = 8000;
-        final int wndScale = 2;
-        final int tos = 4;
-        final int ttl = 64;
-        TcpKeepalivePacketData resultData = null;
-        final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
-        testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
-        testInfo.srcPort = srcPort;
-        testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
-        testInfo.dstPort = dstPort;
-        testInfo.seq = seq;
-        testInfo.ack = ack;
-        testInfo.rcvWnd = wnd;
-        testInfo.rcvWndScale = wndScale;
-        testInfo.tos = tos;
-        testInfo.ttl = ttl;
-        try {
-            resultData = TcpKeepalivePacketData.tcpKeepalivePacket(testInfo);
-        } catch (InvalidPacketException e) {
-            fail("InvalidPacketException: " + e);
-        }
-
-        assertEquals(InetAddress.getByAddress(testInfo.srcAddress), resultData.getSrcAddress());
-        assertEquals(InetAddress.getByAddress(testInfo.dstAddress), resultData.getDstAddress());
-        assertEquals(testInfo.srcPort, resultData.getSrcPort());
-        assertEquals(testInfo.dstPort, resultData.getDstPort());
-        assertEquals(testInfo.seq, resultData.tcpSeq);
-        assertEquals(testInfo.ack, resultData.tcpAck);
-        assertEquals(testInfo.rcvWnd, resultData.tcpWnd);
-        assertEquals(testInfo.rcvWndScale, resultData.tcpWndScale);
-        assertEquals(testInfo.tos, resultData.ipTos);
-        assertEquals(testInfo.ttl, resultData.ipTtl);
-
-        assertParcelingIsLossless(resultData);
-
-        final byte[] packet = resultData.getPacket();
-        // IP version and IHL
-        assertEquals(packet[0], 0x45);
-        // TOS
-        assertEquals(packet[1], tos);
-        // TTL
-        assertEquals(packet[8], ttl);
-        // Source IP address.
-        byte[] ip = new byte[4];
-        ByteBuffer buf = ByteBuffer.wrap(packet, 12, 4);
-        buf.get(ip);
-        assertArrayEquals(ip, IPV4_KEEPALIVE_SRC_ADDR);
-        // Destination IP address.
-        buf = ByteBuffer.wrap(packet, 16, 4);
-        buf.get(ip);
-        assertArrayEquals(ip, IPV4_KEEPALIVE_DST_ADDR);
-
-        buf = ByteBuffer.wrap(packet, 20, 12);
-        // Source port.
-        assertEquals(buf.getShort(), srcPort);
-        // Destination port.
-        assertEquals(buf.getShort(), dstPort);
-        // Sequence number.
-        assertEquals(buf.getInt(), seq);
-        // Ack.
-        assertEquals(buf.getInt(), ack);
-        // Window size.
-        buf = ByteBuffer.wrap(packet, 34, 2);
-        assertEquals(buf.getShort(), wnd >> wndScale);
-    }
-
-    //TODO: add ipv6 test when ipv6 supported
-
-    @Test
-    public void testParcel() throws Exception {
-        final int srcPort = 1234;
-        final int dstPort = 4321;
-        final int sequence = 0x11111111;
-        final int ack = 0x22222222;
-        final int wnd = 48_000;
-        final int wndScale = 2;
-        final int tos = 4;
-        final int ttl = 64;
-        final TcpKeepalivePacketDataParcelable testInfo = new TcpKeepalivePacketDataParcelable();
-        testInfo.srcAddress = IPV4_KEEPALIVE_SRC_ADDR;
-        testInfo.srcPort = srcPort;
-        testInfo.dstAddress = IPV4_KEEPALIVE_DST_ADDR;
-        testInfo.dstPort = dstPort;
-        testInfo.seq = sequence;
-        testInfo.ack = ack;
-        testInfo.rcvWnd = wnd;
-        testInfo.rcvWndScale = wndScale;
-        testInfo.tos = tos;
-        testInfo.ttl = ttl;
-        TcpKeepalivePacketData testData = null;
-        TcpKeepalivePacketDataParcelable resultData = null;
-        testData = TcpKeepalivePacketData.tcpKeepalivePacket(testInfo);
-        resultData = testData.toStableParcelable();
-        assertArrayEquals(resultData.srcAddress, IPV4_KEEPALIVE_SRC_ADDR);
-        assertArrayEquals(resultData.dstAddress, IPV4_KEEPALIVE_DST_ADDR);
-        assertEquals(resultData.srcPort, srcPort);
-        assertEquals(resultData.dstPort, dstPort);
-        assertEquals(resultData.seq, sequence);
-        assertEquals(resultData.ack, ack);
-        assertEquals(resultData.rcvWnd, wnd);
-        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/internal/net/NetworkUtilsInternalTest.java b/tests/net/java/com/android/internal/net/NetworkUtilsInternalTest.java
new file mode 100644
index 0000000..3cfecd5
--- /dev/null
+++ b/tests/net/java/com/android/internal/net/NetworkUtilsInternalTest.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.internal.net;
+
+import static android.system.OsConstants.AF_INET;
+import static android.system.OsConstants.AF_INET6;
+import static android.system.OsConstants.AF_UNIX;
+import static android.system.OsConstants.EPERM;
+import static android.system.OsConstants.SOCK_DGRAM;
+import static android.system.OsConstants.SOCK_STREAM;
+
+import static junit.framework.Assert.assertEquals;
+
+import static org.junit.Assert.fail;
+
+import android.system.ErrnoException;
+import android.system.Os;
+
+import androidx.test.runner.AndroidJUnit4;
+
+import libcore.io.IoUtils;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@androidx.test.filters.SmallTest
+public class NetworkUtilsInternalTest {
+
+    private static void expectSocketSuccess(String msg, int domain, int type) {
+        try {
+            IoUtils.closeQuietly(Os.socket(domain, type, 0));
+        } catch (ErrnoException e) {
+            fail(msg + e.getMessage());
+        }
+    }
+
+    private static void expectSocketPemissionError(String msg, int domain, int type) {
+        try {
+            IoUtils.closeQuietly(Os.socket(domain, type, 0));
+            fail(msg);
+        } catch (ErrnoException e) {
+            assertEquals(msg, e.errno, EPERM);
+        }
+    }
+
+    private static void expectHasNetworking() {
+        expectSocketSuccess("Creating a UNIX socket should not have thrown ErrnoException",
+                AF_UNIX, SOCK_STREAM);
+        expectSocketSuccess("Creating a AF_INET socket shouldn't have thrown ErrnoException",
+                AF_INET, SOCK_DGRAM);
+        expectSocketSuccess("Creating a AF_INET6 socket shouldn't have thrown ErrnoException",
+                AF_INET6, SOCK_DGRAM);
+    }
+
+    private static void expectNoNetworking() {
+        expectSocketSuccess("Creating a UNIX socket should not have thrown ErrnoException",
+                AF_UNIX, SOCK_STREAM);
+        expectSocketPemissionError(
+                "Creating a AF_INET socket should have thrown ErrnoException(EPERM)",
+                AF_INET, SOCK_DGRAM);
+        expectSocketPemissionError(
+                "Creating a AF_INET6 socket should have thrown ErrnoException(EPERM)",
+                AF_INET6, SOCK_DGRAM);
+    }
+
+    @Test
+    public void testSetAllowNetworkingForProcess() {
+        expectHasNetworking();
+        NetworkUtilsInternal.setAllowNetworkingForProcess(false);
+        expectNoNetworking();
+        NetworkUtilsInternal.setAllowNetworkingForProcess(true);
+        expectHasNetworking();
+    }
+}
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 7a1cb25..a613e5e 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -18,6 +18,7 @@
 
 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;
@@ -38,6 +39,7 @@
 import static android.net.ConnectivityManager.TYPE_MOBILE_FOTA;
 import static android.net.ConnectivityManager.TYPE_MOBILE_MMS;
 import static android.net.ConnectivityManager.TYPE_MOBILE_SUPL;
+import static android.net.ConnectivityManager.TYPE_VPN;
 import static android.net.ConnectivityManager.TYPE_WIFI;
 import static android.net.INetworkMonitor.NETWORK_VALIDATION_PROBE_DNS;
 import static android.net.INetworkMonitor.NETWORK_VALIDATION_PROBE_FALLBACK;
@@ -100,6 +102,8 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.mockito.AdditionalMatchers.aryEq;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.argThat;
@@ -131,6 +135,7 @@
 import android.app.NotificationManager;
 import android.app.PendingIntent;
 import android.content.BroadcastReceiver;
+import android.content.ComponentName;
 import android.content.ContentProvider;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -139,6 +144,8 @@
 import android.content.pm.ApplicationInfo;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.content.pm.ServiceInfo;
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.location.LocationManager;
@@ -175,19 +182,20 @@
 import android.net.NetworkCapabilities;
 import android.net.NetworkFactory;
 import android.net.NetworkInfo;
+import android.net.NetworkInfo.DetailedState;
 import android.net.NetworkRequest;
 import android.net.NetworkSpecifier;
 import android.net.NetworkStack;
 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;
@@ -331,12 +339,13 @@
     private static final String WIFI_WOL_IFNAME = "test_wlan_wol";
     private static final String VPN_IFNAME = "tun10042";
     private static final String TEST_PACKAGE_NAME = "com.android.test.package";
-    private static final String[] EMPTY_STRING_ARRAY = new String[0];
+    private static final String ALWAYS_ON_PACKAGE = "com.android.test.alwaysonvpn";
 
     private static final String INTERFACE_NAME = "interface";
 
     private MockContext mServiceContext;
     private HandlerThread mCsHandlerThread;
+    private ConnectivityService.Dependencies mDeps;
     private ConnectivityService mService;
     private WrappedConnectivityManager mCm;
     private TestNetworkAgentWrapper mWiFiNetworkAgent;
@@ -352,6 +361,7 @@
     @Mock IIpConnectivityMetrics mIpConnectivityMetrics;
     @Mock IpConnectivityMetrics.Logger mMetricsService;
     @Mock DefaultNetworkMetrics mDefaultNetworkMetrics;
+    @Mock DeviceIdleInternal mDeviceIdleInternal;
     @Mock INetworkManagementService mNetworkManagementService;
     @Mock INetworkStatsService mStatsService;
     @Mock IBatteryStats mBatteryStatsService;
@@ -449,6 +459,15 @@
         }
 
         @Override
+        public ComponentName startService(Intent service) {
+            final String action = service.getAction();
+            if (!VpnConfig.SERVICE_INTERFACE.equals(action)) {
+                fail("Attempt to start unknown service, action=" + action);
+            }
+            return new ComponentName(service.getPackage(), "com.android.test.Service");
+        }
+
+        @Override
         public Object getSystemService(String name) {
             if (Context.CONNECTIVITY_SERVICE.equals(name)) return mCm;
             if (Context.NOTIFICATION_SERVICE.equals(name)) return mNotificationManager;
@@ -646,8 +665,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 -> {
@@ -666,7 +685,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;
@@ -1053,9 +1073,19 @@
         private VpnInfo mVpnInfo;
 
         public MockVpn(int userId) {
-            super(startHandlerThreadAndReturnLooper(), mServiceContext, mNetworkManagementService,
-                    userId, mock(KeyStore.class));
-            mConfig = new VpnConfig();
+            super(startHandlerThreadAndReturnLooper(), mServiceContext,
+                    new Dependencies() {
+                        @Override
+                        public boolean isCallerSystem() {
+                            return true;
+                        }
+
+                        @Override
+                        public DeviceIdleInternal getDeviceIdleInternal() {
+                            return mDeviceIdleInternal;
+                        }
+                    },
+                    mNetworkManagementService, mMockNetd, userId, mock(KeyStore.class));
         }
 
         public void setUids(Set<UidRange> uids) {
@@ -1084,26 +1114,35 @@
             return mVpnType;
         }
 
+        private LinkProperties makeLinkProperties() {
+            final LinkProperties lp = new LinkProperties();
+            lp.setInterfaceName(VPN_IFNAME);
+            return lp;
+        }
+
         private void registerAgent(boolean isAlwaysMetered, Set<UidRange> uids, LinkProperties lp)
                 throws Exception {
             if (mAgentRegistered) throw new IllegalStateException("already registered");
+            mConfig = new VpnConfig();
             setUids(uids);
             if (!isAlwaysMetered) mNetworkCapabilities.addCapability(NET_CAPABILITY_NOT_METERED);
             mInterface = VPN_IFNAME;
             mMockNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_VPN, lp,
                     mNetworkCapabilities);
             mMockNetworkAgent.waitForIdle(TIMEOUT_MS);
-            verify(mNetworkManagementService, times(1))
-                    .addVpnUidRanges(eq(mMockVpn.getNetId()), eq(uids.toArray(new UidRange[0])));
-            verify(mNetworkManagementService, never())
-                    .removeVpnUidRanges(eq(mMockVpn.getNetId()), any());
+
+            verify(mMockNetd, times(1)).networkAddUidRanges(eq(mMockVpn.getNetId()),
+                    eq(toUidRangeStableParcels(uids)));
+            verify(mMockNetd, never())
+                    .networkRemoveUidRanges(eq(mMockVpn.getNetId()), any());
             mAgentRegistered = true;
+            updateState(NetworkInfo.DetailedState.CONNECTED, "registerAgent");
             mNetworkCapabilities.set(mMockNetworkAgent.getNetworkCapabilities());
             mNetworkAgent = mMockNetworkAgent.getNetworkAgent();
         }
 
         private void registerAgent(Set<UidRange> uids) throws Exception {
-            registerAgent(false /* isAlwaysMetered */, uids, new LinkProperties());
+            registerAgent(false /* isAlwaysMetered */, uids, makeLinkProperties());
         }
 
         private void connect(boolean validated, boolean hasInternet, boolean isStrictMode) {
@@ -1139,12 +1178,12 @@
         public void establishForMyUid(boolean validated, boolean hasInternet, boolean isStrictMode)
                 throws Exception {
             final int uid = Process.myUid();
-            establish(new LinkProperties(), uid, uidRangesForUid(uid), validated, hasInternet,
+            establish(makeLinkProperties(), uid, uidRangesForUid(uid), validated, hasInternet,
                     isStrictMode);
         }
 
         public void establishForMyUid() throws Exception {
-            establishForMyUid(new LinkProperties());
+            establishForMyUid(makeLinkProperties());
         }
 
         public void sendLinkProperties(LinkProperties lp) {
@@ -1152,7 +1191,10 @@
         }
 
         public void disconnect() {
-            if (mMockNetworkAgent != null) mMockNetworkAgent.disconnect();
+            if (mMockNetworkAgent != null) {
+                mMockNetworkAgent.disconnect();
+                updateState(NetworkInfo.DetailedState.DISCONNECTED, "disconnect");
+            }
             mAgentRegistered = false;
         }
 
@@ -1168,6 +1210,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);
@@ -1221,6 +1268,17 @@
         fail("ConditionVariable was blocked for more than " + TIMEOUT_MS + "ms");
     }
 
+    private void registerNetworkCallbackAsUid(NetworkRequest request, NetworkCallback callback,
+            int uid) {
+        when(mDeps.getCallingUid()).thenReturn(uid);
+        try {
+            mCm.registerNetworkCallback(request, callback);
+            waitForIdle();
+        } finally {
+            returnRealCallingUid();
+        }
+    }
+
     private static final int VPN_USER = 0;
     private static final int APP1_UID = UserHandle.getUid(VPN_USER, 10100);
     private static final int APP2_UID = UserHandle.getUid(VPN_USER, 10101);
@@ -1263,7 +1321,8 @@
         initAlarmManager(mAlarmManager, mAlarmManagerThread.getThreadHandler());
 
         mCsHandlerThread = new HandlerThread("TestConnectivityService");
-        final ConnectivityService.Dependencies deps = makeDependencies();
+        mDeps = makeDependencies();
+        returnRealCallingUid();
         mService = new ConnectivityService(mServiceContext,
                 mNetworkManagementService,
                 mStatsService,
@@ -1271,9 +1330,9 @@
                 mMockDnsResolver,
                 mock(IpConnectivityLog.class),
                 mMockNetd,
-                deps);
+                mDeps);
         mService.mLingerDelayMs = TEST_LINGER_DELAY_MS;
-        verify(deps).makeMultinetworkPolicyTracker(any(), any(), any());
+        verify(mDeps).makeMultinetworkPolicyTracker(any(), any(), any());
 
         final ArgumentCaptor<INetworkPolicyListener> policyListenerCaptor =
                 ArgumentCaptor.forClass(INetworkPolicyListener.class);
@@ -1293,6 +1352,10 @@
         setPrivateDnsSettings(PRIVATE_DNS_MODE_OFF, "ignored.example.com");
     }
 
+    private void returnRealCallingUid() {
+        doAnswer((invocationOnMock) -> Binder.getCallingUid()).when(mDeps).getCallingUid();
+    }
+
     private ConnectivityService.Dependencies makeDependencies() {
         doReturn(TEST_TCP_INIT_RWND).when(mSystemProperties)
                 .getInt("net.tcp.default_init_rwnd", 0);
@@ -1368,13 +1431,13 @@
     }
 
     private void mockDefaultPackages() throws Exception {
-        final String testPackageName = mContext.getPackageName();
-        final PackageInfo testPackageInfo = mContext.getPackageManager().getPackageInfo(
-                testPackageName, PackageManager.GET_PERMISSIONS);
+        final String myPackageName = mContext.getPackageName();
+        final PackageInfo myPackageInfo = mContext.getPackageManager().getPackageInfo(
+                myPackageName, PackageManager.GET_PERMISSIONS);
         when(mPackageManager.getPackagesForUid(Binder.getCallingUid())).thenReturn(
-                new String[] {testPackageName});
-        when(mPackageManager.getPackageInfoAsUser(eq(testPackageName), anyInt(),
-                eq(UserHandle.getCallingUserId()))).thenReturn(testPackageInfo);
+                new String[] {myPackageName});
+        when(mPackageManager.getPackageInfoAsUser(eq(myPackageName), anyInt(),
+                eq(UserHandle.getCallingUserId()))).thenReturn(myPackageInfo);
 
         when(mPackageManager.getInstalledPackages(eq(GET_PERMISSIONS | MATCH_ANY_USER))).thenReturn(
                 Arrays.asList(new PackageInfo[] {
@@ -1382,6 +1445,25 @@
                         buildPackageInfo(/* SYSTEM */ false, APP2_UID),
                         buildPackageInfo(/* SYSTEM */ false, VPN_UID)
                 }));
+
+        // Create a fake always-on VPN package.
+        final int userId = UserHandle.getCallingUserId();
+        final ApplicationInfo applicationInfo = new ApplicationInfo();
+        applicationInfo.targetSdkVersion = Build.VERSION_CODES.R;  // Always-on supported in N+.
+        when(mPackageManager.getApplicationInfoAsUser(eq(ALWAYS_ON_PACKAGE), anyInt(),
+                eq(userId))).thenReturn(applicationInfo);
+
+        // Minimal mocking to keep Vpn#isAlwaysOnPackageSupported happy.
+        ResolveInfo rInfo = new ResolveInfo();
+        rInfo.serviceInfo = new ServiceInfo();
+        rInfo.serviceInfo.metaData = new Bundle();
+        final List<ResolveInfo> services = Arrays.asList(new ResolveInfo[]{rInfo});
+        when(mPackageManager.queryIntentServicesAsUser(any(), eq(PackageManager.GET_META_DATA),
+                eq(userId))).thenReturn(services);
+        when(mPackageManager.getPackageUidAsUser(TEST_PACKAGE_NAME, userId))
+                .thenReturn(Process.myUid());
+        when(mPackageManager.getPackageUidAsUser(ALWAYS_ON_PACKAGE, userId))
+                .thenReturn(VPN_UID);
     }
 
     private void verifyActiveNetwork(int transport) {
@@ -1958,6 +2040,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
@@ -2213,10 +2326,10 @@
     }
 
     private void grantUsingBackgroundNetworksPermissionForUid(final int uid) throws Exception {
-        final String testPackageName = mContext.getPackageName();
-        when(mPackageManager.getPackageInfo(eq(testPackageName), eq(GET_PERMISSIONS)))
+        final String myPackageName = mContext.getPackageName();
+        when(mPackageManager.getPackageInfo(eq(myPackageName), eq(GET_PERMISSIONS)))
                 .thenReturn(buildPackageInfo(true, uid));
-        mService.mPermissionMonitor.onPackageAdded(testPackageName, uid);
+        mService.mPermissionMonitor.onPackageAdded(myPackageName, uid);
     }
 
     @Test
@@ -2517,7 +2630,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();
@@ -3179,7 +3293,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, () ->
@@ -3187,7 +3301,7 @@
 
         assertThrows(IllegalArgumentException.class, () ->
                 mCm.requestNetwork(r, PendingIntent.getService(
-                        mServiceContext, 0, new Intent(), 0)));
+                        mServiceContext, 0 /* requestCode */, new Intent(), FLAG_IMMUTABLE)));
     }
 
     @Test
@@ -4628,11 +4742,9 @@
 
     @Test
     public void testNetworkCallbackMaximum() {
-        // We can only have 99 callbacks, because MultipathPolicyTracker is
-        // already one of them.
-        final int MAX_REQUESTS = 99;
+        final int MAX_REQUESTS = 100;
         final int CALLBACKS = 89;
-        final int INTENTS = 10;
+        final int INTENTS = 11;
         assertEquals(MAX_REQUESTS, CALLBACKS + INTENTS);
 
         NetworkRequest networkRequest = new NetworkRequest.Builder().build();
@@ -4651,12 +4763,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);
         }
@@ -4670,11 +4784,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) {
@@ -4703,16 +4819,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);
         }
@@ -4790,7 +4906,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);
 
@@ -4910,8 +5026,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),
@@ -5427,6 +5543,7 @@
         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);
 
@@ -5458,44 +5575,45 @@
         withWifiAndMobileUnderlying.setLinkDownstreamBandwidthKbps(10);
         withWifiAndMobileUnderlying.setLinkUpstreamBandwidthKbps(20);
 
+        final NetworkCapabilities initialCapsNotMetered = new NetworkCapabilities(initialCaps);
+        initialCapsNotMetered.addCapability(NET_CAPABILITY_NOT_METERED);
+
         NetworkCapabilities caps = new NetworkCapabilities(initialCaps);
-        final boolean notDeclaredMetered = false;
-        mService.applyUnderlyingCapabilities(new Network[]{}, caps, notDeclaredMetered);
+        mService.applyUnderlyingCapabilities(new Network[]{}, initialCapsNotMetered, caps);
         assertEquals(withNoUnderlying, caps);
 
         caps = new NetworkCapabilities(initialCaps);
-        mService.applyUnderlyingCapabilities(new Network[]{null}, caps, notDeclaredMetered);
+        mService.applyUnderlyingCapabilities(new Network[]{null}, initialCapsNotMetered, caps);
         assertEquals(withNoUnderlying, caps);
 
         caps = new NetworkCapabilities(initialCaps);
-        mService.applyUnderlyingCapabilities(new Network[]{mobile}, caps, notDeclaredMetered);
+        mService.applyUnderlyingCapabilities(new Network[]{mobile}, initialCapsNotMetered, caps);
         assertEquals(withMobileUnderlying, caps);
 
-        mService.applyUnderlyingCapabilities(new Network[]{wifi}, caps, notDeclaredMetered);
+        mService.applyUnderlyingCapabilities(new Network[]{wifi}, initialCapsNotMetered, caps);
         assertEquals(withWifiUnderlying, caps);
 
-        final boolean isDeclaredMetered = true;
         withWifiUnderlying.removeCapability(NET_CAPABILITY_NOT_METERED);
         caps = new NetworkCapabilities(initialCaps);
-        mService.applyUnderlyingCapabilities(new Network[]{wifi}, caps, isDeclaredMetered);
+        mService.applyUnderlyingCapabilities(new Network[]{wifi}, initialCaps, caps);
         assertEquals(withWifiUnderlying, caps);
 
         caps = new NetworkCapabilities(initialCaps);
-        mService.applyUnderlyingCapabilities(new Network[]{mobile, wifi}, caps, isDeclaredMetered);
+        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},
-                caps, notDeclaredMetered);
+                initialCapsNotMetered, caps);
         assertEquals(withWifiAndMobileUnderlying, caps);
 
         caps = new NetworkCapabilities(initialCaps);
         mService.applyUnderlyingCapabilities(new Network[]{null, mobile, null, wifi},
-                caps, notDeclaredMetered);
+                initialCapsNotMetered, caps);
         assertEquals(withWifiAndMobileUnderlying, caps);
 
-        mService.applyUnderlyingCapabilities(null, caps, notDeclaredMetered);
+        mService.applyUnderlyingCapabilities(null, initialCapsNotMetered, caps);
         assertEquals(withWifiUnderlying, caps);
     }
 
@@ -5785,10 +5903,21 @@
         assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
     }
 
+    private void assertDefaultNetworkCapabilities(int userId, NetworkAgentWrapper... networks) {
+        final NetworkCapabilities[] defaultCaps = mService.getDefaultNetworkCapabilitiesForUser(
+                userId, "com.android.calling.package");
+        final String defaultCapsString = Arrays.toString(defaultCaps);
+        assertEquals(defaultCapsString, defaultCaps.length, networks.length);
+        final Set<NetworkCapabilities> defaultCapsSet = new ArraySet<>(defaultCaps);
+        for (NetworkAgentWrapper network : networks) {
+            final NetworkCapabilities nc = mCm.getNetworkCapabilities(network.getNetwork());
+            final String msg = "Did not find " + nc + " in " + Arrays.toString(defaultCaps);
+            assertTrue(msg, defaultCapsSet.contains(nc));
+        }
+    }
+
     @Test
     public void testVpnSetUnderlyingNetworks() throws Exception {
-        final int uid = Process.myUid();
-
         final TestNetworkCallback vpnNetworkCallback = new TestNetworkCallback();
         final NetworkRequest vpnNetworkRequest = new NetworkRequest.Builder()
                 .removeCapability(NET_CAPABILITY_NOT_VPN)
@@ -5811,6 +5940,9 @@
         // A VPN without underlying networks is not suspended.
         assertTrue(nc.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
 
+        final int userId = UserHandle.getUserId(Process.myUid());
+        assertDefaultNetworkCapabilities(userId /* no networks */);
+
         // Connect cell and use it as an underlying network.
         mCellNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_CELLULAR);
         mCellNetworkAgent.addCapability(NET_CAPABILITY_NOT_SUSPENDED);
@@ -5824,6 +5956,7 @@
                 && caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
                 && !caps.hasCapability(NET_CAPABILITY_NOT_METERED)
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent);
 
         mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
         mWiFiNetworkAgent.addCapability(NET_CAPABILITY_NOT_METERED);
@@ -5838,6 +5971,7 @@
                 && caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
                 && !caps.hasCapability(NET_CAPABILITY_NOT_METERED)
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent, mWiFiNetworkAgent);
 
         // Don't disconnect, but note the VPN is not using wifi any more.
         mService.setUnderlyingNetworksForVpn(
@@ -5848,6 +5982,9 @@
                 && caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
                 && !caps.hasCapability(NET_CAPABILITY_NOT_METERED)
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
+        // The return value of getDefaultNetworkCapabilitiesForUser always includes the default
+        // network (wifi) as well as the underlying networks (cell).
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent, mWiFiNetworkAgent);
 
         // Remove NOT_SUSPENDED from the only network and observe VPN is now suspended.
         mCellNetworkAgent.removeCapability(NET_CAPABILITY_NOT_SUSPENDED);
@@ -5876,6 +6013,7 @@
                 && !caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
                 && caps.hasCapability(NET_CAPABILITY_NOT_METERED)
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
+        assertDefaultNetworkCapabilities(userId, mWiFiNetworkAgent);
 
         // Use both again.
         mService.setUnderlyingNetworksForVpn(
@@ -5886,6 +6024,7 @@
                 && caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
                 && !caps.hasCapability(NET_CAPABILITY_NOT_METERED)
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent, mWiFiNetworkAgent);
 
         // Cell is suspended again. As WiFi is not, this should not cause a callback.
         mCellNetworkAgent.removeCapability(NET_CAPABILITY_NOT_SUSPENDED);
@@ -5903,6 +6042,7 @@
         // a bug in ConnectivityService, but as the SUSPENDED and RESUMED callbacks have never
         // been public and are deprecated and slated for removal, there is no sense in spending
         // resources fixing this bug now.
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent, mWiFiNetworkAgent);
 
         // Use both again.
         mService.setUnderlyingNetworksForVpn(
@@ -5915,6 +6055,7 @@
                 && caps.hasCapability(NET_CAPABILITY_NOT_SUSPENDED));
         // As above, the RESUMED callback not being sent here is a bug, but not a bug that's
         // worth anybody's time to fix.
+        assertDefaultNetworkCapabilities(userId, mCellNetworkAgent, mWiFiNetworkAgent);
 
         // Disconnect cell. Receive update without even removing the dead network from the
         // underlying networks – it's dead anyway. Not metered any more.
@@ -5923,6 +6064,7 @@
                 (caps) -> caps.hasTransport(TRANSPORT_VPN)
                 && !caps.hasTransport(TRANSPORT_CELLULAR) && caps.hasTransport(TRANSPORT_WIFI)
                 && caps.hasCapability(NET_CAPABILITY_NOT_METERED));
+        assertDefaultNetworkCapabilities(userId, mWiFiNetworkAgent);
 
         // Disconnect wifi too. No underlying networks means this is now metered.
         mWiFiNetworkAgent.disconnect();
@@ -5930,6 +6072,11 @@
                 (caps) -> caps.hasTransport(TRANSPORT_VPN)
                 && !caps.hasTransport(TRANSPORT_CELLULAR) && !caps.hasTransport(TRANSPORT_WIFI)
                 && !caps.hasCapability(NET_CAPABILITY_NOT_METERED));
+        // When a network disconnects, the callbacks are fired before all state is updated, so for a
+        // short time, synchronous calls will behave as if the network is still connected. Wait for
+        // things to settle.
+        waitForIdle();
+        assertDefaultNetworkCapabilities(userId /* no networks */);
 
         mMockVpn.disconnect();
     }
@@ -6230,6 +6377,7 @@
         // Despite VPN using WiFi (which is unmetered), VPN itself is marked as always metered.
         assertTrue(mCm.isActiveNetworkMetered());
 
+
         // VPN explicitly declares WiFi as its underlying network.
         mService.setUnderlyingNetworksForVpn(
                 new Network[] { mWiFiNetworkAgent.getNetwork() });
@@ -6343,6 +6491,189 @@
         mCm.unregisterNetworkCallback(defaultCallback);
     }
 
+    private void expectNetworkRejectNonSecureVpn(InOrder inOrder, boolean add,
+            UidRangeParcel... expected) throws Exception {
+        inOrder.verify(mMockNetd).networkRejectNonSecureVpn(eq(add), aryEq(expected));
+    }
+
+    private void checkNetworkInfo(NetworkInfo ni, int type, DetailedState state) {
+        assertNotNull(ni);
+        assertEquals(type, ni.getType());
+        assertEquals(ConnectivityManager.getNetworkTypeName(type), state, ni.getDetailedState());
+    }
+
+    private void assertActiveNetworkInfo(int type, DetailedState state) {
+        checkNetworkInfo(mCm.getActiveNetworkInfo(), type, state);
+    }
+    private void assertNetworkInfo(int type, DetailedState state) {
+        checkNetworkInfo(mCm.getNetworkInfo(type), type, state);
+    }
+
+    @Test
+    public void testNetworkBlockedStatusAlwaysOnVpn() throws Exception {
+        mServiceContext.setPermission(
+                Manifest.permission.CONTROL_ALWAYS_ON_VPN, PERMISSION_GRANTED);
+        mServiceContext.setPermission(
+                Manifest.permission.CONTROL_VPN, PERMISSION_GRANTED);
+        mServiceContext.setPermission(
+                Manifest.permission.NETWORK_SETTINGS, PERMISSION_GRANTED);
+
+        final TestNetworkCallback callback = new TestNetworkCallback();
+        final NetworkRequest request = new NetworkRequest.Builder()
+                .removeCapability(NET_CAPABILITY_NOT_VPN)
+                .build();
+        mCm.registerNetworkCallback(request, callback);
+
+        final TestNetworkCallback defaultCallback = new TestNetworkCallback();
+        mCm.registerDefaultNetworkCallback(defaultCallback);
+
+        final TestNetworkCallback vpnUidCallback = new TestNetworkCallback();
+        final NetworkRequest vpnUidRequest = new NetworkRequest.Builder().build();
+        registerNetworkCallbackAsUid(vpnUidRequest, vpnUidCallback, VPN_UID);
+
+        final int uid = Process.myUid();
+        final int userId = UserHandle.getUserId(uid);
+        final ArrayList<String> allowList = new ArrayList<>();
+        mService.setAlwaysOnVpnPackage(userId, ALWAYS_ON_PACKAGE, true /* lockdown */, allowList);
+
+        UidRangeParcel firstHalf = new UidRangeParcel(1, VPN_UID - 1);
+        UidRangeParcel secondHalf = new UidRangeParcel(VPN_UID + 1, 99999);
+        InOrder inOrder = inOrder(mMockNetd);
+        expectNetworkRejectNonSecureVpn(inOrder, true, firstHalf, secondHalf);
+
+        // Connect a network when lockdown is active, expect to see it blocked.
+        mWiFiNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_WIFI);
+        mWiFiNetworkAgent.connect(false /* validated */);
+        callback.expectAvailableCallbacksUnvalidatedAndBlocked(mWiFiNetworkAgent);
+        defaultCallback.expectAvailableCallbacksUnvalidatedAndBlocked(mWiFiNetworkAgent);
+        vpnUidCallback.expectAvailableCallbacksUnvalidated(mWiFiNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertNull(mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+        // Mobile is BLOCKED even though it's not actually connected.
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.BLOCKED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+
+        // Disable lockdown, expect to see the network unblocked.
+        // There are no callbacks because they are not implemented yet.
+        mService.setAlwaysOnVpnPackage(userId, null, false /* lockdown */, allowList);
+        expectNetworkRejectNonSecureVpn(inOrder, false, firstHalf, secondHalf);
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        // Add our UID to the allowlist and re-enable lockdown, expect network is not blocked.
+        allowList.add(TEST_PACKAGE_NAME);
+        mService.setAlwaysOnVpnPackage(userId, ALWAYS_ON_PACKAGE, true /* lockdown */, allowList);
+        callback.assertNoCallback();
+        defaultCallback.assertNoCallback();
+        vpnUidCallback.assertNoCallback();
+
+        // The following requires that the UID of this test package is greater than VPN_UID. This
+        // is always true in practice because a plain AOSP build with no apps installed has almost
+        // 200 packages installed.
+        final UidRangeParcel piece1 = new UidRangeParcel(1, VPN_UID - 1);
+        final UidRangeParcel piece2 = new UidRangeParcel(VPN_UID + 1, uid - 1);
+        final UidRangeParcel piece3 = new UidRangeParcel(uid + 1, 99999);
+        expectNetworkRejectNonSecureVpn(inOrder, true, piece1, piece2, piece3);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        // Connect a new network, expect it to be unblocked.
+        mCellNetworkAgent = new TestNetworkAgentWrapper(TRANSPORT_CELLULAR);
+        mCellNetworkAgent.connect(false /* validated */);
+        callback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
+        defaultCallback.assertNoCallback();
+        vpnUidCallback.expectAvailableCallbacksUnvalidated(mCellNetworkAgent);
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        // Cellular is DISCONNECTED because it's not the default and there are no requests for it.
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        // Disable lockdown, remove our UID from the allowlist, and re-enable lockdown.
+        // Everything should now be blocked.
+        mService.setAlwaysOnVpnPackage(userId, null, false /* lockdown */, allowList);
+        expectNetworkRejectNonSecureVpn(inOrder, false, piece1, piece2, piece3);
+        allowList.clear();
+        mService.setAlwaysOnVpnPackage(userId, ALWAYS_ON_PACKAGE, true /* lockdown */, allowList);
+        expectNetworkRejectNonSecureVpn(inOrder, true, firstHalf, secondHalf);
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertNull(mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.BLOCKED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+
+        // Disable lockdown. Everything is unblocked.
+        mService.setAlwaysOnVpnPackage(userId, null, false /* lockdown */, allowList);
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        // Enable and disable an always-on VPN package without lockdown. Expect no changes.
+        reset(mMockNetd);
+        mService.setAlwaysOnVpnPackage(userId, ALWAYS_ON_PACKAGE, false /* lockdown */, allowList);
+        inOrder.verify(mMockNetd, never()).networkRejectNonSecureVpn(anyBoolean(), any());
+        callback.assertNoCallback();
+        defaultCallback.assertNoCallback();
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        mService.setAlwaysOnVpnPackage(userId, null, false /* lockdown */, allowList);
+        inOrder.verify(mMockNetd, never()).networkRejectNonSecureVpn(anyBoolean(), any());
+        callback.assertNoCallback();
+        defaultCallback.assertNoCallback();
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        // Enable lockdown and connect a VPN. The VPN is not blocked.
+        mService.setAlwaysOnVpnPackage(userId, ALWAYS_ON_PACKAGE, true /* lockdown */, allowList);
+        vpnUidCallback.assertNoCallback();
+        assertEquals(mWiFiNetworkAgent.getNetwork(), mCm.getActiveNetworkForUid(VPN_UID));
+        assertNull(mCm.getActiveNetwork());
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.BLOCKED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.BLOCKED);
+
+        mMockVpn.establishForMyUid();
+        defaultCallback.expectAvailableThenValidatedCallbacks(mMockVpn);
+        vpnUidCallback.assertNoCallback();  // vpnUidCallback has NOT_VPN capability.
+        assertEquals(mMockVpn.getNetwork(), mCm.getActiveNetwork());
+        assertEquals(null, mCm.getActiveNetworkForUid(VPN_UID));  // BUG?
+        assertActiveNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_MOBILE, DetailedState.DISCONNECTED);
+        assertNetworkInfo(TYPE_VPN, DetailedState.CONNECTED);
+        assertNetworkInfo(TYPE_WIFI, DetailedState.CONNECTED);
+
+        mMockVpn.disconnect();
+        defaultCallback.expectCallback(CallbackEntry.LOST, mMockVpn);
+        defaultCallback.expectAvailableCallbacksUnvalidatedAndBlocked(mWiFiNetworkAgent);
+        assertNull(mCm.getActiveNetwork());
+
+        mCm.unregisterNetworkCallback(callback);
+        mCm.unregisterNetworkCallback(defaultCallback);
+        mCm.unregisterNetworkCallback(vpnUidCallback);
+    }
+
     @Test
     public final void testLoseTrusted() throws Exception {
         final NetworkRequest trustedRequest = new NetworkRequest.Builder()
@@ -7776,7 +8107,16 @@
 
     @Test
     public void testDumpDoesNotCrash() {
-        StringWriter stringWriter = new StringWriter();
+        // Filing a couple requests prior to testing the dump.
+        final TestNetworkCallback genericNetworkCallback = new TestNetworkCallback();
+        final TestNetworkCallback wifiNetworkCallback = new TestNetworkCallback();
+        final NetworkRequest genericRequest = new NetworkRequest.Builder()
+                .clearCapabilities().build();
+        final NetworkRequest wifiRequest = new NetworkRequest.Builder()
+                .addTransportType(TRANSPORT_WIFI).build();
+        mCm.registerNetworkCallback(genericRequest, genericNetworkCallback);
+        mCm.registerNetworkCallback(wifiRequest, wifiNetworkCallback);
+        final StringWriter stringWriter = new StringWriter();
 
         mService.dump(new FileDescriptor(), new PrintWriter(stringWriter), new String[0]);
 
@@ -7798,11 +8138,11 @@
         mCm.registerNetworkCallback(wifiRequest, wifiNetworkCallback);
         mCm.registerNetworkCallback(cellRequest, cellNetworkCallback);
 
-        ConnectivityService.NetworkRequestInfo[] nriOutput = mService.requestsSortedById();
+        final ConnectivityService.NetworkRequestInfo[] nriOutput = mService.requestsSortedById();
 
         assertTrue(nriOutput.length > 1);
         for (int i = 0; i < nriOutput.length - 1; i++) {
-            boolean isRequestIdInOrder =
+            final boolean isRequestIdInOrder =
                     nriOutput[i].mRequests.get(0).requestId
                             < nriOutput[i + 1].mRequests.get(0).requestId;
             assertTrue(isRequestIdInOrder);
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 ea763d2..13516d7 100644
--- a/tests/net/java/com/android/server/NetworkManagementServiceTest.java
+++ b/tests/net/java/com/android/server/NetworkManagementServiceTest.java
@@ -68,11 +68,12 @@
 @SmallTest
 public class NetworkManagementServiceTest {
     private NetworkManagementService mNMService;
-
     @Mock private Context mContext;
     @Mock private IBatteryStats.Stub mBatteryStatsService;
     @Mock private INetd.Stub mNetdService;
 
+    private static final int TEST_UID = 111;
+
     @NonNull
     @Captor
     private ArgumentCaptor<INetdUnsolicitedEventListener> mUnsolListenerCaptor;
@@ -165,14 +166,14 @@
         /**
          * Interface class activity.
          */
-        unsolListener.onInterfaceClassActivityChanged(true, 1, 1234, 0);
-        expectSoon(observer).interfaceClassDataActivityChanged("1", true, 1234);
+        unsolListener.onInterfaceClassActivityChanged(true, 1, 1234, TEST_UID);
+        expectSoon(observer).interfaceClassDataActivityChanged(1, true, 1234, TEST_UID);
 
-        unsolListener.onInterfaceClassActivityChanged(false, 9, 5678, 0);
-        expectSoon(observer).interfaceClassDataActivityChanged("9", false, 5678);
+        unsolListener.onInterfaceClassActivityChanged(false, 9, 5678, TEST_UID);
+        expectSoon(observer).interfaceClassDataActivityChanged(9, false, 5678, TEST_UID);
 
-        unsolListener.onInterfaceClassActivityChanged(false, 9, 4321, 0);
-        expectSoon(observer).interfaceClassDataActivityChanged("9", false, 4321);
+        unsolListener.onInterfaceClassActivityChanged(false, 9, 4321, TEST_UID);
+        expectSoon(observer).interfaceClassDataActivityChanged(9, false, 4321, TEST_UID);
 
         /**
          * IP address changes.
@@ -222,8 +223,6 @@
         assertFalse(mNMService.isFirewallEnabled());
     }
 
-    private static final int TEST_UID = 111;
-
     @Test
     public void testNetworkRestrictedDefault() {
         assertFalse(mNMService.isNetworkRestricted(TEST_UID));
@@ -235,23 +234,23 @@
         doReturn(true).when(mNetdService).bandwidthEnableDataSaver(anyBoolean());
 
         // Restrict usage of mobile data in background
-        mNMService.setUidMeteredNetworkDenylist(TEST_UID, true);
+        mNMService.setUidOnMeteredNetworkDenylist(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);
+        mNMService.setUidOnMeteredNetworkDenylist(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);
+        mNMService.setUidOnMeteredNetworkAllowlist(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.setUidOnMeteredNetworkAllowlist(TEST_UID, false);
         mNMService.setDataSaverModeEnabled(false);
         verify(mNetdService).bandwidthEnableDataSaver(false);
         assertFalse("Network should not be restricted when data saver is off",
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 de35f91..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.getAliveUsers()).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 337507a..cc47317 100644
--- a/tests/net/java/com/android/server/connectivity/VpnTest.java
+++ b/tests/net/java/com/android/server/connectivity/VpnTest.java
@@ -58,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;
@@ -70,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;
@@ -172,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;
@@ -224,7 +228,6 @@
                         R.string.config_customVpnAlwaysOnDisconnectedDialogComponent));
         when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_IPSEC_TUNNELS))
                 .thenReturn(true);
-        when(mSystemServices.isCallerSystem()).thenReturn(true);
 
         // Used by {@link Notification.Builder}
         ApplicationInfo applicationInfo = new ApplicationInfo();
@@ -256,8 +259,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);
     }
 
@@ -269,9 +271,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
@@ -282,15 +282,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
@@ -339,62 +337,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]);
@@ -402,25 +405,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]);
@@ -429,12 +432,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]);
@@ -447,13 +450,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)
         }));
     }
 
@@ -467,86 +470,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
@@ -1098,6 +1101,11 @@
         }
 
         @Override
+        public boolean isCallerSystem() {
+            return true;
+        }
+
+        @Override
         public void startService(final String serviceName) {
             mRunningServices.put(serviceName, true);
         }
@@ -1186,7 +1194,7 @@
                 .thenReturn(asUserContext);
         final TestLooper testLooper = new TestLooper();
         final Vpn vpn = new Vpn(testLooper.getLooper(), mContext, new TestDeps(), mNetService,
-                userId, mKeyStore, mSystemServices, mIkev2SessionCreator);
+                mNetd, userId, mKeyStore, mSystemServices, mIkev2SessionCreator);
         verify(mConnectivityManager, times(1)).registerNetworkProvider(argThat(
                 provider -> provider.getName().contains("VpnNetworkProvider")
         ));
diff --git a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
index fb0cfc0..89146f9 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsCollectionTest.java
@@ -23,11 +23,11 @@
 import static android.net.NetworkStats.UID_ALL;
 import static android.net.NetworkStatsHistory.FIELD_ALL;
 import static android.net.NetworkTemplate.buildTemplateMobileAll;
-import static android.net.NetworkUtils.multiplySafeByRational;
 import static android.os.Process.myUid;
 import static android.text.format.DateUtils.HOUR_IN_MILLIS;
 import static android.text.format.DateUtils.MINUTE_IN_MILLIS;
 
+import static com.android.internal.net.NetworkUtilsInternal.multiplySafeByRational;
 import static com.android.testutils.MiscAsserts.assertThrows;
 
 import static org.junit.Assert.assertArrayEquals;
diff --git a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
index cd9406c..c783629 100644
--- a/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
+++ b/tests/net/java/com/android/server/net/NetworkStatsServiceTest.java
@@ -23,6 +23,7 @@
 import static android.net.ConnectivityManager.TYPE_WIFI;
 import static android.net.ConnectivityManager.TYPE_WIMAX;
 import static android.net.NetworkStats.DEFAULT_NETWORK_ALL;
+import static android.net.NetworkStats.DEFAULT_NETWORK_NO;
 import static android.net.NetworkStats.DEFAULT_NETWORK_YES;
 import static android.net.NetworkStats.IFACE_ALL;
 import static android.net.NetworkStats.INTERFACES_ALL;
@@ -917,7 +918,8 @@
     public void testMetered() throws Exception {
         // pretend that network comes online
         expectDefaultSettings();
-        NetworkState[] states = new NetworkState[] {buildWifiState(true /* isMetered */)};
+        NetworkState[] states =
+                new NetworkState[] {buildWifiState(true /* isMetered */, TEST_IFACE)};
         expectNetworkStatsSummary(buildEmptyStats());
         expectNetworkStatsUidDetail(buildEmptyStats());
 
@@ -1146,7 +1148,8 @@
     public void testStatsProviderUpdateStats() throws Exception {
         // Pretend that network comes online.
         expectDefaultSettings();
-        final NetworkState[] states = new NetworkState[]{buildWifiState(true /* isMetered */)};
+        final NetworkState[] states =
+                new NetworkState[]{buildWifiState(true /* isMetered */, TEST_IFACE)};
         expectNetworkStatsSummary(buildEmptyStats());
         expectNetworkStatsUidDetail(buildEmptyStats());
 
@@ -1206,7 +1209,8 @@
     public void testStatsProviderSetAlert() throws Exception {
         // Pretend that network comes online.
         expectDefaultSettings();
-        NetworkState[] states = new NetworkState[]{buildWifiState(true /* isMetered */)};
+        NetworkState[] states =
+                new NetworkState[]{buildWifiState(true /* isMetered */, TEST_IFACE)};
         mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states), new VpnInfo[0]);
 
         // Register custom provider and retrieve callback.
@@ -1319,6 +1323,47 @@
         assertUidTotal(templateAll, UID_RED, 22L + 35L, 26L + 29L, 19L + 7L, 5L + 11L, 1);
     }
 
+    @Test
+    public void testOperationCount_nonDefault_traffic() throws Exception {
+        // Pretend mobile network comes online, but wifi is the default network.
+        expectDefaultSettings();
+        NetworkState[] states = new NetworkState[]{
+                buildWifiState(true /*isMetered*/, TEST_IFACE2), buildMobile3gState(IMSI_1)};
+        expectNetworkStatsUidDetail(buildEmptyStats());
+        mService.forceUpdateIfaces(NETWORKS_WIFI, states, getActiveIface(states), new VpnInfo[0]);
+
+        // Create some traffic on mobile network.
+        incrementCurrentTime(HOUR_IN_MILLIS);
+        expectNetworkStatsUidDetail(new NetworkStats(getElapsedRealtime(), 4)
+                .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+                        DEFAULT_NETWORK_NO, 2L, 1L, 3L, 4L, 0L)
+                .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, TAG_NONE, METERED_NO, ROAMING_NO,
+                        DEFAULT_NETWORK_YES, 1L, 3L, 2L, 1L, 0L)
+                .insertEntry(TEST_IFACE, UID_RED, SET_DEFAULT, 0xF00D, 5L, 4L, 1L, 4L, 0L));
+        // Increment operation count, which must have a specific tag.
+        mService.incrementOperationCount(UID_RED, 0xF00D, 2);
+        forcePollAndWaitForIdle();
+
+        // Verify mobile summary is not changed by the operation count.
+        final NetworkTemplate templateMobile =
+                buildTemplateMobileWithRatType(null, NETWORK_TYPE_ALL);
+        final NetworkStats statsMobile = mSession.getSummaryForAllUid(
+                templateMobile, Long.MIN_VALUE, Long.MAX_VALUE, true);
+        assertValues(statsMobile, IFACE_ALL, UID_RED, SET_ALL, TAG_NONE, METERED_ALL, ROAMING_ALL,
+                DEFAULT_NETWORK_ALL, 3L, 4L, 5L, 5L, 0);
+        assertValues(statsMobile, IFACE_ALL, UID_RED, SET_ALL, 0xF00D, METERED_ALL, ROAMING_ALL,
+                DEFAULT_NETWORK_ALL, 5L, 4L, 1L, 4L, 0);
+
+        // Verify the operation count is blamed onto the default network.
+        // TODO: Blame onto the default network is not very reasonable. Consider blame onto the
+        //  network that generates the traffic.
+        final NetworkTemplate templateWifi = buildTemplateWifiWildcard();
+        final NetworkStats statsWifi = mSession.getSummaryForAllUid(
+                templateWifi, Long.MIN_VALUE, Long.MAX_VALUE, true);
+        assertValues(statsWifi, IFACE_ALL, UID_RED, SET_ALL, 0xF00D, METERED_ALL, ROAMING_ALL,
+                DEFAULT_NETWORK_ALL, 0L, 0L, 0L, 0L, 2);
+    }
+
     private static File getBaseDir(File statsDir) {
         File baseDir = new File(statsDir, "netstats");
         baseDir.mkdirs();
@@ -1446,14 +1491,14 @@
     }
 
     private static NetworkState buildWifiState() {
-        return buildWifiState(false);
+        return buildWifiState(false, TEST_IFACE);
     }
 
-    private static NetworkState buildWifiState(boolean isMetered) {
+    private static NetworkState buildWifiState(boolean isMetered, @NonNull String iface) {
         final NetworkInfo info = new NetworkInfo(TYPE_WIFI, 0, null, null);
         info.setDetailedState(DetailedState.CONNECTED, null, null);
         final LinkProperties prop = new LinkProperties();
-        prop.setInterfaceName(TEST_IFACE);
+        prop.setInterfaceName(iface);
         final NetworkCapabilities capabilities = new NetworkCapabilities();
         capabilities.setCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED, !isMetered);
         capabilities.setCapability(NetworkCapabilities.NET_CAPABILITY_NOT_ROAMING, true);
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/tests/vcn/java/android/net/vcn/VcnConfigTest.java b/tests/vcn/java/android/net/vcn/VcnConfigTest.java
new file mode 100644
index 0000000..77944de
--- /dev/null
+++ b/tests/vcn/java/android/net/vcn/VcnConfigTest.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.vcn;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import android.os.Parcel;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Collections;
+import java.util.Set;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class VcnConfigTest {
+    private static final Set<VcnGatewayConnectionConfig> GATEWAY_CONNECTION_CONFIGS =
+            Collections.singleton(VcnGatewayConnectionConfigTest.buildTestConfig());
+
+    // Public visibility for VcnManagementServiceTest
+    public static VcnConfig buildTestConfig() {
+        VcnConfig.Builder builder = new VcnConfig.Builder();
+
+        for (VcnGatewayConnectionConfig gatewayConnectionConfig : GATEWAY_CONNECTION_CONFIGS) {
+            builder.addGatewayConnectionConfig(gatewayConnectionConfig);
+        }
+
+        return builder.build();
+    }
+
+    @Test
+    public void testBuilderRequiresGatewayConnectionConfig() {
+        try {
+            new VcnConfig.Builder().build();
+            fail("Expected exception due to no VcnGatewayConnectionConfigs provided");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderAndGetters() {
+        final VcnConfig config = buildTestConfig();
+
+        assertEquals(GATEWAY_CONNECTION_CONFIGS, config.getGatewayConnectionConfigs());
+    }
+
+    @Test
+    public void testPersistableBundle() {
+        final VcnConfig config = buildTestConfig();
+
+        assertEquals(config, new VcnConfig(config.toPersistableBundle()));
+    }
+
+    @Test
+    public void testParceling() {
+        final VcnConfig config = buildTestConfig();
+
+        Parcel parcel = Parcel.obtain();
+        config.writeToParcel(parcel, 0);
+        parcel.setDataPosition(0);
+
+        assertEquals(config, VcnConfig.CREATOR.createFromParcel(parcel));
+    }
+}
diff --git a/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java b/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java
new file mode 100644
index 0000000..e98b6ef
--- /dev/null
+++ b/tests/vcn/java/android/net/vcn/VcnGatewayConnectionConfigTest.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.vcn;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import android.net.NetworkCapabilities;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.concurrent.TimeUnit;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class VcnGatewayConnectionConfigTest {
+    private static final int[] EXPOSED_CAPS =
+            new int[] {
+                NetworkCapabilities.NET_CAPABILITY_INTERNET, NetworkCapabilities.NET_CAPABILITY_MMS
+            };
+    private static final int[] UNDERLYING_CAPS = new int[] {NetworkCapabilities.NET_CAPABILITY_DUN};
+    private static final long[] RETRY_INTERVALS_MS =
+            new long[] {
+                TimeUnit.SECONDS.toMillis(5),
+                TimeUnit.SECONDS.toMillis(30),
+                TimeUnit.MINUTES.toMillis(1),
+                TimeUnit.MINUTES.toMillis(5),
+                TimeUnit.MINUTES.toMillis(15),
+                TimeUnit.MINUTES.toMillis(30)
+            };
+    private static final int MAX_MTU = 1360;
+
+    // Package protected for use in VcnConfigTest
+    static VcnGatewayConnectionConfig buildTestConfig() {
+        final VcnGatewayConnectionConfig.Builder builder =
+                new VcnGatewayConnectionConfig.Builder()
+                        .setRetryInterval(RETRY_INTERVALS_MS)
+                        .setMaxMtu(MAX_MTU);
+
+        for (int caps : EXPOSED_CAPS) {
+            builder.addExposedCapability(caps);
+        }
+
+        for (int caps : UNDERLYING_CAPS) {
+            builder.addRequiredUnderlyingCapability(caps);
+        }
+
+        return builder.build();
+    }
+
+    @Test
+    public void testBuilderRequiresNonEmptyExposedCaps() {
+        try {
+            new VcnGatewayConnectionConfig.Builder()
+                    .addRequiredUnderlyingCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+                    .build();
+
+            fail("Expected exception due to invalid exposed capabilities");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderRequiresNonEmptyUnderlyingCaps() {
+        try {
+            new VcnGatewayConnectionConfig.Builder()
+                    .addExposedCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+                    .build();
+
+            fail("Expected exception due to invalid required underlying capabilities");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderRequiresNonNullRetryInterval() {
+        try {
+            new VcnGatewayConnectionConfig.Builder().setRetryInterval(null);
+            fail("Expected exception due to invalid retryIntervalMs");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderRequiresNonEmptyRetryInterval() {
+        try {
+            new VcnGatewayConnectionConfig.Builder().setRetryInterval(new long[0]);
+            fail("Expected exception due to invalid retryIntervalMs");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderRequiresValidMtu() {
+        try {
+            new VcnGatewayConnectionConfig.Builder()
+                    .setMaxMtu(VcnGatewayConnectionConfig.MIN_MTU_V6 - 1);
+            fail("Expected exception due to invalid mtu");
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    @Test
+    public void testBuilderAndGetters() {
+        final VcnGatewayConnectionConfig config = buildTestConfig();
+
+        for (int cap : EXPOSED_CAPS) {
+            config.hasExposedCapability(cap);
+        }
+        for (int cap : UNDERLYING_CAPS) {
+            config.requiresUnderlyingCapability(cap);
+        }
+
+        assertArrayEquals(RETRY_INTERVALS_MS, config.getRetryIntervalsMs());
+        assertEquals(MAX_MTU, config.getMaxMtu());
+    }
+
+    @Test
+    public void testPersistableBundle() {
+        final VcnGatewayConnectionConfig config = buildTestConfig();
+
+        assertEquals(config, new VcnGatewayConnectionConfig(config.toPersistableBundle()));
+    }
+}
diff --git a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
index c91fdbf..1cc9532 100644
--- a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
+++ b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
@@ -16,42 +16,123 @@
 
 package com.android.server;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
+import android.net.vcn.VcnConfig;
+import android.net.vcn.VcnConfigTest;
+import android.os.ParcelUuid;
+import android.os.PersistableBundle;
+import android.os.Process;
+import android.os.UserHandle;
 import android.os.test.TestLooper;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
 
 import androidx.test.filters.SmallTest;
 import androidx.test.runner.AndroidJUnit4;
 
+import com.android.server.vcn.util.PersistableBundleUtils;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
+import java.io.FileNotFoundException;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
 /** Tests for {@link VcnManagementService}. */
 @RunWith(AndroidJUnit4.class)
 @SmallTest
 public class VcnManagementServiceTest {
+    private static final ParcelUuid TEST_UUID_1 = new ParcelUuid(new UUID(0, 0));
+    private static final ParcelUuid TEST_UUID_2 = new ParcelUuid(new UUID(1, 1));
+    private static final VcnConfig TEST_VCN_CONFIG = VcnConfigTest.buildTestConfig();
+    private static final Map<ParcelUuid, VcnConfig> TEST_VCN_CONFIG_MAP =
+            Collections.unmodifiableMap(Collections.singletonMap(TEST_UUID_1, TEST_VCN_CONFIG));
+
+    private static final SubscriptionInfo TEST_SUBSCRIPTION_INFO =
+            new SubscriptionInfo(
+                    1 /* id */,
+                    "" /* iccId */,
+                    0 /* simSlotIndex */,
+                    "Carrier" /* displayName */,
+                    "Carrier" /* carrierName */,
+                    0 /* nameSource */,
+                    255 /* iconTint */,
+                    "12345" /* number */,
+                    0 /* roaming */,
+                    null /* icon */,
+                    "0" /* mcc */,
+                    "0" /* mnc */,
+                    "0" /* countryIso */,
+                    false /* isEmbedded */,
+                    null /* nativeAccessRules */,
+                    null /* cardString */,
+                    false /* isOpportunistic */,
+                    TEST_UUID_1.toString() /* groupUUID */,
+                    0 /* carrierId */,
+                    0 /* profileClass */);
+
     private final Context mMockContext = mock(Context.class);
     private final VcnManagementService.Dependencies mMockDeps =
             mock(VcnManagementService.Dependencies.class);
     private final TestLooper mTestLooper = new TestLooper();
     private final ConnectivityManager mConnMgr = mock(ConnectivityManager.class);
+    private final TelephonyManager mTelMgr = mock(TelephonyManager.class);
+    private final SubscriptionManager mSubMgr = mock(SubscriptionManager.class);
     private final VcnManagementService mVcnMgmtSvc;
+    private final PersistableBundleUtils.LockingReadWriteHelper mConfigReadWriteHelper =
+            mock(PersistableBundleUtils.LockingReadWriteHelper.class);
 
-    public VcnManagementServiceTest() {
-        doReturn(Context.CONNECTIVITY_SERVICE)
-                .when(mMockContext)
-                .getSystemServiceName(ConnectivityManager.class);
-        doReturn(mConnMgr).when(mMockContext).getSystemService(Context.CONNECTIVITY_SERVICE);
+    public VcnManagementServiceTest() throws Exception {
+        setupSystemService(mConnMgr, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class);
+        setupSystemService(mTelMgr, Context.TELEPHONY_SERVICE, TelephonyManager.class);
+        setupSystemService(
+                mSubMgr, Context.TELEPHONY_SUBSCRIPTION_SERVICE, SubscriptionManager.class);
 
         doReturn(mTestLooper.getLooper()).when(mMockDeps).getLooper();
+        doReturn(Process.FIRST_APPLICATION_UID).when(mMockDeps).getBinderCallingUid();
+        doReturn(mConfigReadWriteHelper)
+                .when(mMockDeps)
+                .newPersistableBundleLockingReadWriteHelper(any());
+
+        final PersistableBundle bundle =
+                PersistableBundleUtils.fromMap(
+                        TEST_VCN_CONFIG_MAP,
+                        PersistableBundleUtils::fromParcelUuid,
+                        VcnConfig::toPersistableBundle);
+        doReturn(bundle).when(mConfigReadWriteHelper).readFromDisk();
+
+        setupMockedCarrierPrivilege(true);
         mVcnMgmtSvc = new VcnManagementService(mMockContext, mMockDeps);
     }
 
+    private void setupSystemService(Object service, String name, Class<?> serviceClass) {
+        doReturn(name).when(mMockContext).getSystemServiceName(serviceClass);
+        doReturn(service).when(mMockContext).getSystemService(name);
+    }
+
+    private void setupMockedCarrierPrivilege(boolean isPrivileged) {
+        doReturn(Collections.singletonList(TEST_SUBSCRIPTION_INFO))
+                .when(mSubMgr)
+                .getSubscriptionsInGroup(any());
+        doReturn(isPrivileged)
+                .when(mTelMgr)
+                .hasCarrierPrivileges(eq(TEST_SUBSCRIPTION_INFO.getSubscriptionId()));
+    }
+
     @Test
     public void testSystemReady() throws Exception {
         mVcnMgmtSvc.systemReady();
@@ -59,4 +140,119 @@
         verify(mConnMgr)
                 .registerNetworkProvider(any(VcnManagementService.VcnNetworkProvider.class));
     }
+
+    @Test
+    public void testNonSystemServerRealConfigFileAccessPermission() throws Exception {
+        // Attempt to build a real instance of the dependencies, and verify we cannot write to the
+        // file.
+        VcnManagementService.Dependencies deps = new VcnManagementService.Dependencies();
+        PersistableBundleUtils.LockingReadWriteHelper configReadWriteHelper =
+                deps.newPersistableBundleLockingReadWriteHelper(
+                        VcnManagementService.VCN_CONFIG_FILE);
+
+        // Even tests should not be able to read/write configs from disk; SELinux policies restrict
+        // it to only the system server.
+        // Reading config should always return null since the file "does not exist", and writing
+        // should throw an IOException.
+        assertNull(configReadWriteHelper.readFromDisk());
+
+        try {
+            configReadWriteHelper.writeToDisk(new PersistableBundle());
+            fail("Expected IOException due to SELinux policy");
+        } catch (FileNotFoundException expected) {
+        }
+    }
+
+    @Test
+    public void testLoadVcnConfigsOnStartup() throws Exception {
+        mTestLooper.dispatchAll();
+
+        assertEquals(TEST_VCN_CONFIG_MAP, mVcnMgmtSvc.getConfigs());
+        verify(mConfigReadWriteHelper).readFromDisk();
+    }
+
+    @Test
+    public void testSetVcnConfigRequiresNonSystemServer() throws Exception {
+        doReturn(Process.SYSTEM_UID).when(mMockDeps).getBinderCallingUid();
+
+        try {
+            mVcnMgmtSvc.setVcnConfig(TEST_UUID_1, VcnConfigTest.buildTestConfig());
+            fail("Expected IllegalStateException exception for system server");
+        } catch (IllegalStateException expected) {
+        }
+    }
+
+    @Test
+    public void testSetVcnConfigRequiresSystemUser() throws Exception {
+        doReturn(UserHandle.getUid(UserHandle.MIN_SECONDARY_USER_ID, Process.FIRST_APPLICATION_UID))
+                .when(mMockDeps)
+                .getBinderCallingUid();
+
+        try {
+            mVcnMgmtSvc.setVcnConfig(TEST_UUID_1, VcnConfigTest.buildTestConfig());
+            fail("Expected security exception for non system user");
+        } catch (SecurityException expected) {
+        }
+    }
+
+    @Test
+    public void testSetVcnConfigRequiresCarrierPrivileges() throws Exception {
+        setupMockedCarrierPrivilege(false);
+
+        try {
+            mVcnMgmtSvc.setVcnConfig(TEST_UUID_1, VcnConfigTest.buildTestConfig());
+            fail("Expected security exception for missing carrier privileges");
+        } catch (SecurityException expected) {
+        }
+    }
+
+    @Test
+    public void testSetVcnConfig() throws Exception {
+        // Use a different UUID to simulate a new VCN config.
+        mVcnMgmtSvc.setVcnConfig(TEST_UUID_2, TEST_VCN_CONFIG);
+        assertEquals(TEST_VCN_CONFIG, mVcnMgmtSvc.getConfigs().get(TEST_UUID_2));
+        verify(mConfigReadWriteHelper).writeToDisk(any(PersistableBundle.class));
+    }
+
+    @Test
+    public void testClearVcnConfigRequiresNonSystemServer() throws Exception {
+        doReturn(Process.SYSTEM_UID).when(mMockDeps).getBinderCallingUid();
+
+        try {
+            mVcnMgmtSvc.clearVcnConfig(TEST_UUID_1);
+            fail("Expected IllegalStateException exception for system server");
+        } catch (IllegalStateException expected) {
+        }
+    }
+
+    @Test
+    public void testClearVcnConfigRequiresSystemUser() throws Exception {
+        doReturn(UserHandle.getUid(UserHandle.MIN_SECONDARY_USER_ID, Process.FIRST_APPLICATION_UID))
+                .when(mMockDeps)
+                .getBinderCallingUid();
+
+        try {
+            mVcnMgmtSvc.clearVcnConfig(TEST_UUID_1);
+            fail("Expected security exception for non system user");
+        } catch (SecurityException expected) {
+        }
+    }
+
+    @Test
+    public void testClearVcnConfigRequiresCarrierPrivileges() throws Exception {
+        setupMockedCarrierPrivilege(false);
+
+        try {
+            mVcnMgmtSvc.clearVcnConfig(TEST_UUID_1);
+            fail("Expected security exception for missing carrier privileges");
+        } catch (SecurityException expected) {
+        }
+    }
+
+    @Test
+    public void testClearVcnConfig() throws Exception {
+        mVcnMgmtSvc.clearVcnConfig(TEST_UUID_1);
+        assertTrue(mVcnMgmtSvc.getConfigs().isEmpty());
+        verify(mConfigReadWriteHelper).writeToDisk(any(PersistableBundle.class));
+    }
 }
diff --git a/tests/vcn/java/com/android/server/vcn/TelephonySubscriptionTrackerTest.java b/tests/vcn/java/com/android/server/vcn/TelephonySubscriptionTrackerTest.java
new file mode 100644
index 0000000..17b8f64
--- /dev/null
+++ b/tests/vcn/java/com/android/server/vcn/TelephonySubscriptionTrackerTest.java
@@ -0,0 +1,333 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES 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.vcn;
+
+import static android.telephony.CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED;
+import static android.telephony.CarrierConfigManager.EXTRA_SLOT_INDEX;
+import static android.telephony.CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX;
+import static android.telephony.SubscriptionManager.INVALID_SIM_SLOT_INDEX;
+import static android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+
+import static com.android.server.vcn.TelephonySubscriptionTracker.TelephonySubscriptionSnapshot;
+import static com.android.server.vcn.TelephonySubscriptionTracker.TelephonySubscriptionTrackerCallback;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+
+import android.annotation.NonNull;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Handler;
+import android.os.HandlerExecutor;
+import android.os.ParcelUuid;
+import android.os.test.TestLooper;
+import android.telephony.CarrierConfigManager;
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
+import android.util.ArraySet;
+
+import androidx.test.filters.SmallTest;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.UUID;
+
+/** Tests for TelephonySubscriptionTracker */
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class TelephonySubscriptionTrackerTest {
+    private static final ParcelUuid TEST_PARCEL_UUID = new ParcelUuid(UUID.randomUUID());
+    private static final int TEST_SIM_SLOT_INDEX = 1;
+    private static final int TEST_SUBSCRIPTION_ID_1 = 2;
+    private static final SubscriptionInfo TEST_SUBINFO_1 = mock(SubscriptionInfo.class);
+    private static final int TEST_SUBSCRIPTION_ID_2 = 3;
+    private static final SubscriptionInfo TEST_SUBINFO_2 = mock(SubscriptionInfo.class);
+    private static final Map<Integer, ParcelUuid> TEST_SUBID_TO_GROUP_MAP;
+
+    static {
+        final Map<Integer, ParcelUuid> subIdToGroupMap = new HashMap<>();
+        subIdToGroupMap.put(TEST_SUBSCRIPTION_ID_1, TEST_PARCEL_UUID);
+        subIdToGroupMap.put(TEST_SUBSCRIPTION_ID_2, TEST_PARCEL_UUID);
+        TEST_SUBID_TO_GROUP_MAP = Collections.unmodifiableMap(subIdToGroupMap);
+    }
+
+    @NonNull private final Context mContext;
+    @NonNull private final TestLooper mTestLooper;
+    @NonNull private final Handler mHandler;
+    @NonNull private final TelephonySubscriptionTracker.Dependencies mDeps;
+
+    @NonNull private final SubscriptionManager mSubscriptionManager;
+    @NonNull private final CarrierConfigManager mCarrierConfigManager;
+
+    @NonNull private TelephonySubscriptionTrackerCallback mCallback;
+    @NonNull private TelephonySubscriptionTracker mTelephonySubscriptionTracker;
+
+    public TelephonySubscriptionTrackerTest() {
+        mContext = mock(Context.class);
+        mTestLooper = new TestLooper();
+        mHandler = new Handler(mTestLooper.getLooper());
+        mDeps = mock(TelephonySubscriptionTracker.Dependencies.class);
+
+        mSubscriptionManager = mock(SubscriptionManager.class);
+        mCarrierConfigManager = mock(CarrierConfigManager.class);
+
+        doReturn(Context.TELEPHONY_SUBSCRIPTION_SERVICE)
+                .when(mContext)
+                .getSystemServiceName(SubscriptionManager.class);
+        doReturn(mSubscriptionManager)
+                .when(mContext)
+                .getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
+
+        doReturn(Context.CARRIER_CONFIG_SERVICE)
+                .when(mContext)
+                .getSystemServiceName(CarrierConfigManager.class);
+        doReturn(mCarrierConfigManager)
+                .when(mContext)
+                .getSystemService(Context.CARRIER_CONFIG_SERVICE);
+
+        // subId 1, 2 are in same subGrp, only subId 1 is active
+        doReturn(TEST_PARCEL_UUID).when(TEST_SUBINFO_1).getGroupUuid();
+        doReturn(TEST_PARCEL_UUID).when(TEST_SUBINFO_2).getGroupUuid();
+        doReturn(TEST_SIM_SLOT_INDEX).when(TEST_SUBINFO_1).getSimSlotIndex();
+        doReturn(INVALID_SIM_SLOT_INDEX).when(TEST_SUBINFO_2).getSimSlotIndex();
+        doReturn(TEST_SUBSCRIPTION_ID_1).when(TEST_SUBINFO_1).getSubscriptionId();
+        doReturn(TEST_SUBSCRIPTION_ID_2).when(TEST_SUBINFO_2).getSubscriptionId();
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        mCallback = mock(TelephonySubscriptionTrackerCallback.class);
+        mTelephonySubscriptionTracker =
+                new TelephonySubscriptionTracker(mContext, mHandler, mCallback, mDeps);
+        mTelephonySubscriptionTracker.register();
+
+        doReturn(true).when(mDeps).isConfigForIdentifiedCarrier(any());
+        doReturn(Arrays.asList(TEST_SUBINFO_1, TEST_SUBINFO_2))
+                .when(mSubscriptionManager)
+                .getAllSubscriptionInfoList();
+    }
+
+    private IntentFilter getIntentFilter() {
+        final ArgumentCaptor<IntentFilter> captor = ArgumentCaptor.forClass(IntentFilter.class);
+        verify(mContext).registerReceiver(any(), captor.capture(), any(), any());
+
+        return captor.getValue();
+    }
+
+    private OnSubscriptionsChangedListener getOnSubscriptionsChangedListener() {
+        final ArgumentCaptor<OnSubscriptionsChangedListener> captor =
+                ArgumentCaptor.forClass(OnSubscriptionsChangedListener.class);
+        verify(mSubscriptionManager).addOnSubscriptionsChangedListener(any(), captor.capture());
+
+        return captor.getValue();
+    }
+
+    private Intent buildTestBroadcastIntent(boolean hasValidSubscription) {
+        Intent intent = new Intent(ACTION_CARRIER_CONFIG_CHANGED);
+        intent.putExtra(EXTRA_SLOT_INDEX, TEST_SIM_SLOT_INDEX);
+        intent.putExtra(
+                EXTRA_SUBSCRIPTION_INDEX,
+                hasValidSubscription ? TEST_SUBSCRIPTION_ID_1 : INVALID_SUBSCRIPTION_ID);
+
+        return intent;
+    }
+
+    private TelephonySubscriptionSnapshot buildExpectedSnapshot(Set<ParcelUuid> activeSubGroups) {
+        return buildExpectedSnapshot(TEST_SUBID_TO_GROUP_MAP, activeSubGroups);
+    }
+
+    private TelephonySubscriptionSnapshot buildExpectedSnapshot(
+            Map<Integer, ParcelUuid> subIdToGroupMap, Set<ParcelUuid> activeSubGroups) {
+        return new TelephonySubscriptionSnapshot(subIdToGroupMap, activeSubGroups);
+    }
+
+    private void verifyNoActiveSubscriptions() {
+        verify(mCallback).onNewSnapshot(
+                argThat(snapshot -> snapshot.getActiveSubscriptionGroups().isEmpty()));
+    }
+
+    private void setupReadySubIds() {
+        mTelephonySubscriptionTracker.setReadySubIdsBySlotId(
+                Collections.singletonMap(TEST_SIM_SLOT_INDEX, TEST_SUBSCRIPTION_ID_1));
+    }
+
+    @Test
+    public void testRegister() throws Exception {
+        verify(mContext)
+                .registerReceiver(
+                        eq(mTelephonySubscriptionTracker),
+                        any(IntentFilter.class),
+                        any(),
+                        eq(mHandler));
+        final IntentFilter filter = getIntentFilter();
+        assertEquals(1, filter.countActions());
+        assertTrue(filter.hasAction(ACTION_CARRIER_CONFIG_CHANGED));
+
+        verify(mSubscriptionManager)
+                .addOnSubscriptionsChangedListener(any(HandlerExecutor.class), any());
+        assertNotNull(getOnSubscriptionsChangedListener());
+    }
+
+    @Test
+    public void testUnregister() throws Exception {
+        mTelephonySubscriptionTracker.unregister();
+
+        verify(mContext).unregisterReceiver(eq(mTelephonySubscriptionTracker));
+
+        final OnSubscriptionsChangedListener listener = getOnSubscriptionsChangedListener();
+        verify(mSubscriptionManager).removeOnSubscriptionsChangedListener(eq(listener));
+    }
+
+    @Test
+    public void testOnSubscriptionsChangedFired_NoReadySubIds() throws Exception {
+        final OnSubscriptionsChangedListener listener = getOnSubscriptionsChangedListener();
+        listener.onSubscriptionsChanged();
+        mTestLooper.dispatchAll();
+
+        verifyNoActiveSubscriptions();
+    }
+
+    @Test
+    public void testOnSubscriptionsChangedFired_WithReadySubIds() throws Exception {
+        setupReadySubIds();
+
+        final OnSubscriptionsChangedListener listener = getOnSubscriptionsChangedListener();
+        listener.onSubscriptionsChanged();
+        mTestLooper.dispatchAll();
+
+        final Set<ParcelUuid> activeSubGroups = Collections.singleton(TEST_PARCEL_UUID);
+        verify(mCallback).onNewSnapshot(eq(buildExpectedSnapshot(activeSubGroups)));
+    }
+
+    @Test
+    public void testReceiveBroadcast_ConfigReadyWithSubscriptions() throws Exception {
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+
+        final Set<ParcelUuid> activeSubGroups = Collections.singleton(TEST_PARCEL_UUID);
+        verify(mCallback).onNewSnapshot(eq(buildExpectedSnapshot(activeSubGroups)));
+    }
+
+    @Test
+    public void testReceiveBroadcast_ConfigReadyNoSubscriptions() throws Exception {
+        doReturn(new ArrayList<SubscriptionInfo>())
+                .when(mSubscriptionManager)
+                .getAllSubscriptionInfoList();
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+
+        // Expect an empty snapshot
+        verify(mCallback).onNewSnapshot(
+                eq(buildExpectedSnapshot(Collections.emptyMap(), Collections.emptySet())));
+    }
+
+    @Test
+    public void testReceiveBroadcast_SlotCleared() throws Exception {
+        setupReadySubIds();
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(false));
+        mTestLooper.dispatchAll();
+
+        verifyNoActiveSubscriptions();
+        assertTrue(mTelephonySubscriptionTracker.getReadySubIdsBySlotId().isEmpty());
+    }
+
+    @Test
+    public void testReceiveBroadcast_ConfigNotReady() throws Exception {
+        doReturn(false).when(mDeps).isConfigForIdentifiedCarrier(any());
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+
+        // No interactions expected; config was not loaded
+        verifyNoMoreInteractions(mCallback);
+    }
+
+    @Test
+    public void testSubscriptionsClearedAfterValidTriggersCallbacks() throws Exception {
+        final Set<ParcelUuid> activeSubGroups = Collections.singleton(TEST_PARCEL_UUID);
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+        verify(mCallback).onNewSnapshot(eq(buildExpectedSnapshot(activeSubGroups)));
+        assertNotNull(
+                mTelephonySubscriptionTracker.getReadySubIdsBySlotId().get(TEST_SIM_SLOT_INDEX));
+
+        doReturn(Collections.emptyList()).when(mSubscriptionManager).getAllSubscriptionInfoList();
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+        verify(mCallback).onNewSnapshot(
+                eq(buildExpectedSnapshot(Collections.emptyMap(), Collections.emptySet())));
+    }
+
+    @Test
+    public void testSlotClearedAfterValidTriggersCallbacks() throws Exception {
+        final Set<ParcelUuid> activeSubGroups = Collections.singleton(TEST_PARCEL_UUID);
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(true));
+        mTestLooper.dispatchAll();
+        verify(mCallback).onNewSnapshot(eq(buildExpectedSnapshot(activeSubGroups)));
+        assertNotNull(
+                mTelephonySubscriptionTracker.getReadySubIdsBySlotId().get(TEST_SIM_SLOT_INDEX));
+
+        mTelephonySubscriptionTracker.onReceive(mContext, buildTestBroadcastIntent(false));
+        mTestLooper.dispatchAll();
+        verify(mCallback).onNewSnapshot(eq(buildExpectedSnapshot(Collections.emptySet())));
+        assertNull(mTelephonySubscriptionTracker.getReadySubIdsBySlotId().get(TEST_SIM_SLOT_INDEX));
+    }
+
+    @Test
+    public void testTelephonySubscriptionSnapshotGetGroupForSubId() throws Exception {
+        final TelephonySubscriptionSnapshot snapshot =
+                new TelephonySubscriptionSnapshot(TEST_SUBID_TO_GROUP_MAP, Collections.emptySet());
+
+        assertEquals(TEST_PARCEL_UUID, snapshot.getGroupForSubId(TEST_SUBSCRIPTION_ID_1));
+        assertEquals(TEST_PARCEL_UUID, snapshot.getGroupForSubId(TEST_SUBSCRIPTION_ID_2));
+    }
+
+    @Test
+    public void testTelephonySubscriptionSnapshotGetAllSubIdsInGroup() throws Exception {
+        final TelephonySubscriptionSnapshot snapshot =
+                new TelephonySubscriptionSnapshot(TEST_SUBID_TO_GROUP_MAP, Collections.emptySet());
+
+        assertEquals(
+                new ArraySet<>(Arrays.asList(TEST_SUBSCRIPTION_ID_1, TEST_SUBSCRIPTION_ID_2)),
+                snapshot.getAllSubIdsInGroup(TEST_PARCEL_UUID));
+    }
+}
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/aapt/Resource.cpp b/tools/aapt/Resource.cpp
index ab6dced..dd3ebdb 100644
--- a/tools/aapt/Resource.cpp
+++ b/tools/aapt/Resource.cpp
@@ -519,7 +519,7 @@
                         String8(parser.getElementName(&len)).string(), attr);
                 return ATTR_NOT_FOUND;
             }
-            if ((str=pool->stringAt(value.data, &len)) == NULL) {
+            if ((str = UnpackOptionalString(pool->stringAt(value.data), &len)) == NULL) {
                 fprintf(stderr, "%s:%d: Tag <%s> attribute %s has corrupt string value.\n",
                         path.string(), parser.getLineNumber(),
                         String8(parser.getElementName(&len)).string(), attr);
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index d02f44e..257e96b 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -3066,7 +3066,7 @@
         for (size_t ti=0; ti<N; ti++) {
             // Retrieve them in the same order as the type string block.
             size_t len;
-            String16 typeName(p->getTypeStrings().stringAt(ti, &len));
+            String16 typeName(UnpackOptionalString(p->getTypeStrings().stringAt(ti), &len));
             sp<Type> t = p->getTypes().valueFor(typeName);
             LOG_ALWAYS_FATAL_IF(t == NULL && typeName != String16("<empty>"),
                                 "Type name %s not found",
@@ -4169,7 +4169,7 @@
         const size_t N = strings->size();
         for (size_t i=0; i<N; i++) {
             size_t len;
-            mappings->add(String16(strings->stringAt(i, &len)), i);
+            mappings->add(String16(UnpackOptionalString(strings->stringAt(i), &len)), i);
         }
     }
     return err;
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 37b61bf..6cacd32 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -52,9 +52,9 @@
     for (size_t i=0; i<N; i++) {
         size_t len;
         if (pool->isUTF8()) {
-            uniqueStrings.add(pool->string8At(i, &len));
+            uniqueStrings.add(UnpackOptionalString(pool->string8At(i), &len));
         } else {
-            uniqueStrings.add(pool->stringAt(i, &len));
+            uniqueStrings.add(UnpackOptionalString(pool->stringAt(i), &len));
         }
     }
 
@@ -66,8 +66,8 @@
 
     const size_t NS = pool->size();
     for (size_t s=0; s<NS; s++) {
-        String8 str = pool->string8ObjectAt(s);
-        printf("String #" ZD ": %s\n", (ZD_TYPE) s, str.string());
+        auto str = pool->string8ObjectAt(s);
+        printf("String #" ZD ": %s\n", (ZD_TYPE) s, (str.has_value() ? str->string() : ""));
     }
 }
 
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp
index 439f231..82da249 100644
--- a/tools/aapt2/Debug.cpp
+++ b/tools/aapt2/Debug.cpp
@@ -436,9 +436,9 @@
   for (size_t i=0; i<N; i++) {
     size_t len;
     if (pool->isUTF8()) {
-      uniqueStrings.add(pool->string8At(i, &len));
+      uniqueStrings.add(UnpackOptionalString(pool->string8At(i), &len));
     } else {
-      uniqueStrings.add(pool->stringAt(i, &len));
+      uniqueStrings.add(UnpackOptionalString(pool->stringAt(i), &len));
     }
   }
 
@@ -450,8 +450,8 @@
 
   const size_t NS = pool->size();
   for (size_t s=0; s<NS; s++) {
-    String8 str = pool->string8ObjectAt(s);
-    printer->Print(StringPrintf("String #%zd : %s\n", s, str.string()));
+    auto str = pool->string8ObjectAt(s);
+    printer->Print(StringPrintf("String #%zd : %s\n", s, str.has_value() ? str->string() : ""));
   }
 }
 
diff --git a/tools/aapt2/ResourceUtils.cpp b/tools/aapt2/ResourceUtils.cpp
index 469128b..f26e995 100644
--- a/tools/aapt2/ResourceUtils.cpp
+++ b/tools/aapt2/ResourceUtils.cpp
@@ -751,10 +751,12 @@
   switch (res_value.dataType) {
     case android::Res_value::TYPE_STRING: {
       const std::string str = util::GetString(src_pool, data);
-      const android::ResStringPool_span* spans = src_pool.styleAt(data);
+      auto spans_result = src_pool.styleAt(data);
 
       // Check if the string has a valid style associated with it.
-      if (spans != nullptr && spans->name.index != android::ResStringPool_span::END) {
+      if (spans_result.has_value() &&
+          (*spans_result)->name.index != android::ResStringPool_span::END) {
+        const android::ResStringPool_span* spans = spans_result->unsafe_ptr();
         StyleString style_str = {str};
         while (spans->name.index != android::ResStringPool_span::END) {
           style_str.spans.push_back(Span{util::GetString(src_pool, spans->name.index),
diff --git a/tools/aapt2/StringPool_test.cpp b/tools/aapt2/StringPool_test.cpp
index 9a7238b..6e5200b 100644
--- a/tools/aapt2/StringPool_test.cpp
+++ b/tools/aapt2/StringPool_test.cpp
@@ -223,11 +223,11 @@
   std::unique_ptr<uint8_t[]> data = util::Copy(buffer);
   ResStringPool test;
   ASSERT_EQ(test.setTo(data.get(), buffer.size()), NO_ERROR);
-  size_t len = 0;
-  const char16_t* str = test.stringAt(0, &len);
-  EXPECT_THAT(len, Eq(1u));
-  EXPECT_THAT(str, Pointee(Eq(u'\u093f')));
-  EXPECT_THAT(str[1], Eq(0u));
+  auto str = test.stringAt(0);
+  ASSERT_TRUE(str.has_value());
+  EXPECT_THAT(str->size(), Eq(1u));
+  EXPECT_THAT(str->data(), Pointee(Eq(u'\u093f')));
+  EXPECT_THAT(str->data()[1], Eq(0u));
 }
 
 constexpr const char* sLongString =
@@ -278,14 +278,15 @@
     EXPECT_THAT(util::GetString(test, 3), Eq(sLongString));
     EXPECT_THAT(util::GetString16(test, 3), Eq(util::Utf8ToUtf16(sLongString)));
 
-    size_t len;
-    EXPECT_TRUE(test.stringAt(4, &len) != nullptr || test.string8At(4, &len) != nullptr);
+    EXPECT_TRUE(test.stringAt(4).has_value() || test.string8At(4).has_value());
 
     EXPECT_THAT(util::GetString(test, 0), Eq("style"));
     EXPECT_THAT(util::GetString16(test, 0), Eq(u"style"));
 
-    const ResStringPool_span* span = test.styleAt(0);
-    ASSERT_THAT(span, NotNull());
+    auto span_result = test.styleAt(0);
+    ASSERT_TRUE(span_result.has_value());
+
+    const ResStringPool_span* span = span_result->unsafe_ptr();
     EXPECT_THAT(util::GetString(test, span->name.index), Eq("b"));
     EXPECT_THAT(util::GetString16(test, span->name.index), Eq(u"b"));
     EXPECT_THAT(span->firstChar, Eq(0u));
@@ -318,16 +319,17 @@
   // Check that the codepoints are encoded using two three-byte surrogate pairs
   ResStringPool test;
   ASSERT_EQ(test.setTo(data.get(), buffer.size()), NO_ERROR);
-  size_t len;
-  const char* str = test.string8At(0, &len);
-  ASSERT_THAT(str, NotNull());
-  EXPECT_THAT(std::string(str, len), Eq("\xED\xA0\x81\xED\xB0\x80"));
-  str = test.string8At(1, &len);
-  ASSERT_THAT(str, NotNull());
-  EXPECT_THAT(std::string(str, len), Eq("foo \xED\xA0\x81\xED\xB0\xB7 bar"));
-  str = test.string8At(2, &len);
-  ASSERT_THAT(str, NotNull());
-  EXPECT_THAT(std::string(str, len), Eq("\xED\xA0\x81\xED\xB0\x80\xED\xA0\x81\xED\xB0\xB7"));
+  auto str = test.string8At(0);
+  ASSERT_TRUE(str.has_value());
+  EXPECT_THAT(str->to_string(), Eq("\xED\xA0\x81\xED\xB0\x80"));
+
+  str = test.string8At(1);
+  ASSERT_TRUE(str.has_value());
+  EXPECT_THAT(str->to_string(), Eq("foo \xED\xA0\x81\xED\xB0\xB7 bar"));
+
+  str = test.string8At(2);
+  ASSERT_TRUE(str.has_value());
+  EXPECT_THAT(str->to_string(), Eq("\xED\xA0\x81\xED\xB0\x80\xED\xA0\x81\xED\xB0\xB7"));
 
   // Check that retrieving the strings returns the original UTF-8 character bytes
   EXPECT_THAT(util::GetString(test, 0), Eq("\xF0\x90\x90\x80"));
diff --git a/tools/aapt2/cmd/Compile_test.cpp b/tools/aapt2/cmd/Compile_test.cpp
index fb786a3..ae9f792 100644
--- a/tools/aapt2/cmd/Compile_test.cpp
+++ b/tools/aapt2/cmd/Compile_test.cpp
@@ -252,5 +252,4 @@
   AssertTranslations(this, "donottranslate", expected_not_translatable);
   AssertTranslations(this, "donottranslate_foo", expected_not_translatable);
 }
-
 }  // namespace aapt
diff --git a/tools/aapt2/cmd/Link.cpp b/tools/aapt2/cmd/Link.cpp
index fd12d02..faabe46 100644
--- a/tools/aapt2/cmd/Link.cpp
+++ b/tools/aapt2/cmd/Link.cpp
@@ -730,22 +730,6 @@
   return true;
 }
 
-static android::ApkAssetsCookie FindFrameworkAssetManagerCookie(
-    const android::AssetManager2& assets) {
-  using namespace android;
-
-  // Find the system package (0x01). AAPT always generates attributes with the type 0x01, so
-  // we're looking for the first attribute resource in the system package.
-  Res_value val{};
-  ResTable_config config{};
-  uint32_t type_spec_flags;
-  ApkAssetsCookie idx = assets.GetResource(0x01010000, true /** may_be_bag */,
-                                           0 /** density_override */, &val, &config,
-                                           &type_spec_flags);
-
-  return idx;
-}
-
 class Linker {
  public:
   Linker(LinkContext* context, const LinkOptions& options)
@@ -758,8 +742,12 @@
   void ExtractCompileSdkVersions(android::AssetManager2* assets) {
     using namespace android;
 
-    android::ApkAssetsCookie cookie = FindFrameworkAssetManagerCookie(*assets);
-    if (cookie == android::kInvalidCookie) {
+    // Find the system package (0x01). AAPT always generates attributes with the type 0x01, so
+    // we're looking for the first attribute resource in the system package.
+    android::ApkAssetsCookie cookie;
+    if (auto value = assets->GetResource(0x01010000, true /** may_be_bag */); value.has_value()) {
+      cookie = value->cookie;
+    } else {
       // No Framework assets loaded. Not a failure.
       return;
     }
diff --git a/tools/aapt2/format/binary/TableFlattener_test.cpp b/tools/aapt2/format/binary/TableFlattener_test.cpp
index 6932baf..f8b8a1c 100644
--- a/tools/aapt2/format/binary/TableFlattener_test.cpp
+++ b/tools/aapt2/format/binary/TableFlattener_test.cpp
@@ -189,16 +189,16 @@
                      ResTable_config::CONFIG_VERSION));
 
   std::u16string foo_str = u"foo";
-  ssize_t idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
-  ASSERT_GE(idx, 0);
+  auto idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:string/test", ResourceId(0x7f040000), {},
-                     Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 
   std::u16string bar_path = u"res/layout/bar.xml";
   idx = res_table.getTableStringBlock(0)->indexOfString(bar_path.data(), bar_path.size());
-  ASSERT_GE(idx, 0);
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:layout/bar", ResourceId(0x7f050000), {},
-                     Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 }
 
 TEST_F(TableFlattenerTest, FlattenEntriesWithGapsInIds) {
@@ -603,16 +603,16 @@
                      2u, ResTable_config::CONFIG_VERSION));
 
   std::u16string foo_str = u"foo";
-  ssize_t idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
-  ASSERT_GE(idx, 0);
+  auto idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:string/0_resource_name_obfuscated",
-                     ResourceId(0x7f040000), {}, Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     ResourceId(0x7f040000), {}, Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 
   std::u16string bar_path = u"res/layout/bar.xml";
   idx = res_table.getTableStringBlock(0)->indexOfString(bar_path.data(), bar_path.size());
-  ASSERT_GE(idx, 0);
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:layout/0_resource_name_obfuscated",
-                     ResourceId(0x7f050000), {}, Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     ResourceId(0x7f050000), {}, Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 }
 
 TEST_F(TableFlattenerTest, ObfuscatingResourceNamesWithNameCollapseExemptionsSucceeds) {
@@ -659,16 +659,16 @@
                      2u, ResTable_config::CONFIG_VERSION));
 
   std::u16string foo_str = u"foo";
-  ssize_t idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
-  ASSERT_GE(idx, 0);
+  auto idx = res_table.getTableStringBlock(0)->indexOfString(foo_str.data(), foo_str.size());
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:string/test", ResourceId(0x7f040000), {},
-                     Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 
   std::u16string bar_path = u"res/layout/bar.xml";
   idx = res_table.getTableStringBlock(0)->indexOfString(bar_path.data(), bar_path.size());
-  ASSERT_GE(idx, 0);
+  ASSERT_TRUE(idx.has_value());
   EXPECT_TRUE(Exists(&res_table, "com.app.test:layout/0_resource_name_obfuscated",
-                     ResourceId(0x7f050000), {}, Res_value::TYPE_STRING, (uint32_t)idx, 0u));
+                     ResourceId(0x7f050000), {}, Res_value::TYPE_STRING, (uint32_t)*idx, 0u));
 }
 
 TEST_F(TableFlattenerTest, FlattenOverlayable) {
diff --git a/tools/aapt2/process/SymbolTable.cpp b/tools/aapt2/process/SymbolTable.cpp
index 897fa80..ad716c7 100644
--- a/tools/aapt2/process/SymbolTable.cpp
+++ b/tools/aapt2/process/SymbolTable.cpp
@@ -265,21 +265,22 @@
 
 static std::unique_ptr<SymbolTable::Symbol> LookupAttributeInTable(
     android::AssetManager2& am, ResourceId id) {
+  using namespace android;
   if (am.GetApkAssets().empty()) {
     return {};
   }
 
-  const android::ResolvedBag* bag = am.GetBag(id.id);
-  if (bag == nullptr) {
+  auto bag_result = am.GetBag(id.id);
+  if (!bag_result.has_value()) {
     return nullptr;
   }
 
   // We found a resource.
   std::unique_ptr<SymbolTable::Symbol> s = util::make_unique<SymbolTable::Symbol>(id);
-
+  const ResolvedBag* bag = *bag_result;
   const size_t count = bag->entry_count;
   for (uint32_t i = 0; i < count; i++) {
-    if (bag->entries[i].key == android::ResTable_map::ATTR_TYPE) {
+    if (bag->entries[i].key == ResTable_map::ATTR_TYPE) {
       s->attribute = std::make_shared<Attribute>(bag->entries[i].value.data);
       break;
     }
@@ -287,25 +288,25 @@
 
   if (s->attribute) {
     for (size_t i = 0; i < count; i++) {
-      const android::ResolvedBag::Entry& map_entry = bag->entries[i];
+      const ResolvedBag::Entry& map_entry = bag->entries[i];
       if (Res_INTERNALID(map_entry.key)) {
         switch (map_entry.key) {
-          case android::ResTable_map::ATTR_MIN:
+          case ResTable_map::ATTR_MIN:
             s->attribute->min_int = static_cast<int32_t>(map_entry.value.data);
             break;
-          case android::ResTable_map::ATTR_MAX:
+          case ResTable_map::ATTR_MAX:
             s->attribute->max_int = static_cast<int32_t>(map_entry.value.data);
             break;
         }
         continue;
       }
 
-      android::AssetManager2::ResourceName name;
-      if (!am.GetResourceName(map_entry.key, &name)) {
+      auto name = am.GetResourceName(map_entry.key);
+      if (!name.has_value()) {
         return nullptr;
       }
 
-      Maybe<ResourceName> parsed_name = ResourceUtils::ToResourceName(name);
+      Maybe<ResourceName> parsed_name = ResourceUtils::ToResourceName(*name);
       if (!parsed_name) {
         return nullptr;
       }
@@ -328,7 +329,7 @@
 
   bool found = false;
   ResourceId res_id = 0;
-  uint32_t type_spec_flags;
+  uint32_t type_spec_flags = 0;
   ResourceName real_name;
 
   // There can be mangled resources embedded within other packages. Here we will
@@ -340,8 +341,19 @@
       real_name.package = package_name;
     }
 
-    res_id = asset_manager_.GetResourceId(real_name.to_string());
-    if (res_id.is_valid_static() && asset_manager_.GetResourceFlags(res_id.id, &type_spec_flags)) {
+    auto real_res_id = asset_manager_.GetResourceId(real_name.to_string());
+    if (!real_res_id.has_value()) {
+      return true;
+    }
+
+    res_id.id = *real_res_id;
+    if (!res_id.is_valid_static()) {
+      return true;
+    }
+
+    auto value = asset_manager_.GetResource(res_id.id, true /* may_be_bag */);
+    if (value.has_value()) {
+      type_spec_flags = value->flags;
       found = true;
       return false;
     }
@@ -371,11 +383,11 @@
 
 static Maybe<ResourceName> GetResourceName(android::AssetManager2& am,
                                            ResourceId id) {
-  android::AssetManager2::ResourceName name;
-  if (!am.GetResourceName(id.id, &name)) {
+  auto name = am.GetResourceName(id.id);
+  if (!name.has_value()) {
     return {};
   }
-  return ResourceUtils::ToResourceName(name);
+  return ResourceUtils::ToResourceName(*name);
 }
 
 std::unique_ptr<SymbolTable::Symbol> AssetManagerSymbolSource::FindById(
@@ -394,9 +406,8 @@
     return {};
   }
 
-
-  uint32_t type_spec_flags = 0;
-  if (!asset_manager_.GetResourceFlags(id.id, &type_spec_flags)) {
+  auto value = asset_manager_.GetResource(id.id, true /* may_be_bag */);
+  if (!value.has_value()) {
     return {};
   }
 
@@ -411,7 +422,7 @@
   }
 
   if (s) {
-    s->is_public = (type_spec_flags & android::ResTable_typeSpec::SPEC_PUBLIC) != 0;
+    s->is_public = (value->flags & android::ResTable_typeSpec::SPEC_PUBLIC) != 0;
     return s;
   }
   return {};
diff --git a/tools/aapt2/util/Util.cpp b/tools/aapt2/util/Util.cpp
index 37ce65e..793a236 100644
--- a/tools/aapt2/util/Util.cpp
+++ b/tools/aapt2/util/Util.cpp
@@ -531,19 +531,15 @@
 }
 
 StringPiece16 GetString16(const android::ResStringPool& pool, size_t idx) {
-  size_t len;
-  const char16_t* str = pool.stringAt(idx, &len);
-  if (str != nullptr) {
-    return StringPiece16(str, len);
+  if (auto str = pool.stringAt(idx); str.ok()) {
+    return *str;
   }
   return StringPiece16();
 }
 
 std::string GetString(const android::ResStringPool& pool, size_t idx) {
-  size_t len;
-  const char* str = pool.string8At(idx, &len);
-  if (str != nullptr) {
-    return ModifiedUtf8ToUtf8(std::string(str, len));
+  if (auto str = pool.string8At(idx); str.ok()) {
+    return ModifiedUtf8ToUtf8(str->to_string());
   }
   return Utf16ToUtf8(GetString16(pool, idx));
 }
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/split-select/Main.cpp b/tools/split-select/Main.cpp
index d3eb012..e6966db 100644
--- a/tools/split-select/Main.cpp
+++ b/tools/split-select/Main.cpp
@@ -182,14 +182,18 @@
                 if (type >= Res_value::TYPE_FIRST_INT && type <= Res_value::TYPE_LAST_INT) {
                     outInfo.minSdkVersion = xml.getAttributeData(idx);
                 } else if (type == Res_value::TYPE_STRING) {
-                    String8 minSdk8(xml.getStrings().string8ObjectAt(idx));
-                    char* endPtr;
-                    int minSdk = strtol(minSdk8.string(), &endPtr, 10);
-                    if (endPtr != minSdk8.string() + minSdk8.size()) {
-                        fprintf(stderr, "warning: failed to parse android:minSdkVersion '%s'\n",
-                                minSdk8.string());
+                    auto minSdk8 = xml.getStrings().string8ObjectAt(idx);
+                    if (!minSdk8.has_value()) {
+                        fprintf(stderr, "warning: failed to retrieve android:minSdkVersion.\n");
                     } else {
-                        outInfo.minSdkVersion = minSdk;
+                        char *endPtr;
+                        int minSdk = strtol(minSdk8->string(), &endPtr, 10);
+                        if (endPtr != minSdk8->string() + minSdk8->size()) {
+                            fprintf(stderr, "warning: failed to parse android:minSdkVersion '%s'\n",
+                                    minSdk8->string());
+                        } else {
+                            outInfo.minSdkVersion = minSdk;
+                        }
                     }
                 } else {
                     fprintf(stderr, "warning: unrecognized value for android:minSdkVersion.\n");
diff --git a/tools/split-select/OWNERS b/tools/split-select/OWNERS
new file mode 100644
index 0000000..6c50ede
--- /dev/null
+++ b/tools/split-select/OWNERS
@@ -0,0 +1 @@
+include /core/java/android/content/res/OWNERS
\ No newline at end of file
diff --git a/tools/stats_log_api_gen/.clang-format b/tools/stats_log_api_gen/.clang-format
deleted file mode 100644
index cead3a0..0000000
--- a/tools/stats_log_api_gen/.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/tools/stats_log_api_gen/Android.bp b/tools/stats_log_api_gen/Android.bp
deleted file mode 100644
index c0893f7..0000000
--- a/tools/stats_log_api_gen/Android.bp
+++ /dev/null
@@ -1,134 +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 host executable: stats-log-api-gen
-// ==========================================================
-cc_binary_host {
-    name: "stats-log-api-gen",
-    srcs: [
-        "Collation.cpp",
-        "java_writer.cpp",
-        "java_writer_q.cpp",
-        "main.cpp",
-        "native_writer.cpp",
-        "utils.cpp",
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-
-    shared_libs: [
-        "libstats_proto_host",
-        "libprotobuf-cpp-full",
-        "libbase",
-    ],
-
-    proto: {
-        type: "full",
-    },
-}
-
-// ==========================================================
-// Build the host test executable: stats-log-api-gen
-// ==========================================================
-cc_test_host {
-    name: "stats-log-api-gen-test",
-    cflags: [
-        "-Wall",
-        "-Wextra",
-        "-Werror",
-        "-g",
-        "-DUNIT_TEST",
-    ],
-    srcs: [
-        "Collation.cpp",
-        "test_collation.cpp",
-        "test.proto",
-    ],
-
-    static_libs: [
-        "libgmock_host",
-    ],
-
-    shared_libs: [
-        "libstats_proto_host",
-        "libprotobuf-cpp-full",
-    ],
-
-    proto: {
-        type: "full",
-        include_dirs: [
-            "external/protobuf/src",
-        ],
-    },
-}
-
-// ==========================================================
-// Native library
-// ==========================================================
-genrule {
-    name: "statslog.h",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog.h",
-    out: [
-        "statslog.h",
-    ],
-}
-
-genrule {
-    name: "statslog.cpp",
-    tools: ["stats-log-api-gen"],
-    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog.cpp",
-    out: [
-        "statslog.cpp",
-    ],
-}
-
-cc_library {
-    name: "libstatslog",
-    host_supported: true,
-    generated_sources: [
-        "statslog.cpp",
-    ],
-    generated_headers: [
-        "statslog.h"
-    ],
-    cflags: [
-        "-Wall",
-        "-Werror",
-    ],
-    export_generated_headers: [
-        "statslog.h"
-    ],
-    shared_libs: [
-        "liblog",
-        "libcutils",
-    ],
-    target: {
-        android: {
-            shared_libs: ["libstatssocket"],
-        },
-        host: {
-            static_libs: ["libstatssocket"],
-        },
-        darwin: {
-            enabled: false,
-        },
-    },
-}
-
diff --git a/tools/stats_log_api_gen/Collation.cpp b/tools/stats_log_api_gen/Collation.cpp
deleted file mode 100644
index 2608097..0000000
--- a/tools/stats_log_api_gen/Collation.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 "Collation.h"
-
-#include <stdio.h>
-
-#include <map>
-
-#include "frameworks/proto_logging/stats/atoms.pb.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using google::protobuf::EnumDescriptor;
-using google::protobuf::FieldDescriptor;
-using google::protobuf::FileDescriptor;
-using google::protobuf::SourceLocation;
-using std::make_shared;
-using std::map;
-
-const bool dbg = false;
-
-//
-// AtomDecl class
-//
-
-AtomDecl::AtomDecl() : code(0), name() {
-}
-
-AtomDecl::AtomDecl(const AtomDecl& that)
-    : code(that.code),
-      name(that.name),
-      message(that.message),
-      fields(that.fields),
-      fieldNumberToAnnotations(that.fieldNumberToAnnotations),
-      primaryFields(that.primaryFields),
-      exclusiveField(that.exclusiveField),
-      defaultState(that.defaultState),
-      triggerStateReset(that.triggerStateReset),
-      nested(that.nested),
-      uidField(that.uidField) {
-}
-
-AtomDecl::AtomDecl(int c, const string& n, const string& m) : code(c), name(n), message(m) {
-}
-
-AtomDecl::~AtomDecl() {
-}
-
-/**
- * Print an error message for a FieldDescriptor, including the file name and
- * line number.
- */
-static void print_error(const FieldDescriptor* field, const char* format, ...) {
-    const Descriptor* message = field->containing_type();
-    const FileDescriptor* file = message->file();
-
-    SourceLocation loc;
-    if (field->GetSourceLocation(&loc)) {
-        // TODO: this will work if we can figure out how to pass
-        // --include_source_info to protoc
-        fprintf(stderr, "%s:%d: ", file->name().c_str(), loc.start_line);
-    } else {
-        fprintf(stderr, "%s: ", file->name().c_str());
-    }
-    va_list args;
-    va_start(args, format);
-    vfprintf(stderr, format, args);
-    va_end(args);
-}
-
-/**
- * Convert a protobuf type into a java type.
- */
-static java_type_t java_type(const FieldDescriptor* field) {
-    int protoType = field->type();
-    switch (protoType) {
-        case FieldDescriptor::TYPE_DOUBLE:
-            return JAVA_TYPE_DOUBLE;
-        case FieldDescriptor::TYPE_FLOAT:
-            return JAVA_TYPE_FLOAT;
-        case FieldDescriptor::TYPE_INT64:
-            return JAVA_TYPE_LONG;
-        case FieldDescriptor::TYPE_UINT64:
-            return JAVA_TYPE_LONG;
-        case FieldDescriptor::TYPE_INT32:
-            return JAVA_TYPE_INT;
-        case FieldDescriptor::TYPE_FIXED64:
-            return JAVA_TYPE_LONG;
-        case FieldDescriptor::TYPE_FIXED32:
-            return JAVA_TYPE_INT;
-        case FieldDescriptor::TYPE_BOOL:
-            return JAVA_TYPE_BOOLEAN;
-        case FieldDescriptor::TYPE_STRING:
-            return JAVA_TYPE_STRING;
-        case FieldDescriptor::TYPE_GROUP:
-            return JAVA_TYPE_UNKNOWN;
-        case FieldDescriptor::TYPE_MESSAGE:
-            // TODO: not the final package name
-            if (field->message_type()->full_name() == "android.os.statsd.AttributionNode") {
-                return JAVA_TYPE_ATTRIBUTION_CHAIN;
-            } else if (field->message_type()->full_name() == "android.os.statsd.KeyValuePair") {
-                return JAVA_TYPE_KEY_VALUE_PAIR;
-            } else if (field->options().GetExtension(os::statsd::log_mode) ==
-                       os::statsd::LogMode::MODE_BYTES) {
-                return JAVA_TYPE_BYTE_ARRAY;
-            } else {
-                return JAVA_TYPE_OBJECT;
-            }
-        case FieldDescriptor::TYPE_BYTES:
-            return JAVA_TYPE_BYTE_ARRAY;
-        case FieldDescriptor::TYPE_UINT32:
-            return JAVA_TYPE_INT;
-        case FieldDescriptor::TYPE_ENUM:
-            return JAVA_TYPE_ENUM;
-        case FieldDescriptor::TYPE_SFIXED32:
-            return JAVA_TYPE_INT;
-        case FieldDescriptor::TYPE_SFIXED64:
-            return JAVA_TYPE_LONG;
-        case FieldDescriptor::TYPE_SINT32:
-            return JAVA_TYPE_INT;
-        case FieldDescriptor::TYPE_SINT64:
-            return JAVA_TYPE_LONG;
-        default:
-            return JAVA_TYPE_UNKNOWN;
-    }
-}
-
-/**
- * Gather the enums info.
- */
-void collate_enums(const EnumDescriptor& enumDescriptor, AtomField* atomField) {
-    for (int i = 0; i < enumDescriptor.value_count(); i++) {
-        atomField->enumValues[enumDescriptor.value(i)->number()] =
-                enumDescriptor.value(i)->name().c_str();
-    }
-}
-
-static void addAnnotationToAtomDecl(AtomDecl* atomDecl, const int fieldNumber,
-                                    const AnnotationId annotationId,
-                                    const AnnotationType annotationType,
-                                    const AnnotationValue annotationValue) {
-    if (dbg) {
-        printf("   Adding annotation to %s: [%d] = {id: %d, type: %d}\n", atomDecl->name.c_str(),
-               fieldNumber, annotationId, annotationType);
-    }
-    atomDecl->fieldNumberToAnnotations[fieldNumber].insert(
-            make_shared<Annotation>(annotationId, atomDecl->code, annotationType, annotationValue));
-}
-
-static int collate_field_annotations(AtomDecl* atomDecl, const FieldDescriptor* field,
-                                     const int fieldNumber, const java_type_t& javaType) {
-    int errorCount = 0;
-
-    if (field->options().HasExtension(os::statsd::state_field_option)) {
-        const os::statsd::StateAtomFieldOption& stateFieldOption =
-                field->options().GetExtension(os::statsd::state_field_option);
-        const bool primaryField = stateFieldOption.primary_field();
-        const bool exclusiveState = stateFieldOption.exclusive_state();
-        const bool primaryFieldFirstUid = stateFieldOption.primary_field_first_uid();
-
-        // Check the field is only one of primaryField, exclusiveState, or primaryFieldFirstUid.
-        if (primaryField + primaryFieldFirstUid + exclusiveState > 1) {
-            print_error(field,
-                        "Field can be max 1 of primary_field, exclusive_state, "
-                        "or primary_field_first_uid: '%s'\n",
-                        atomDecl->message.c_str());
-            errorCount++;
-        }
-
-        if (primaryField) {
-            if (javaType == JAVA_TYPE_UNKNOWN || javaType == JAVA_TYPE_ATTRIBUTION_CHAIN ||
-                javaType == JAVA_TYPE_OBJECT || javaType == JAVA_TYPE_BYTE_ARRAY) {
-                print_error(field, "Invalid primary state field: '%s'\n",
-                            atomDecl->message.c_str());
-                errorCount++;
-            } else {
-                atomDecl->primaryFields.push_back(fieldNumber);
-                addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_PRIMARY_FIELD,
-                                        ANNOTATION_TYPE_BOOL, AnnotationValue(true));
-            }
-        }
-
-        if (primaryFieldFirstUid) {
-            if (javaType != JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                print_error(field,
-                            "PRIMARY_FIELD_FIRST_UID annotation is only for AttributionChains: "
-                            "'%s'\n",
-                            atomDecl->message.c_str());
-                errorCount++;
-            } else {
-                atomDecl->primaryFields.push_back(FIRST_UID_IN_CHAIN_ID);
-                addAnnotationToAtomDecl(atomDecl, fieldNumber,
-                                        ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, ANNOTATION_TYPE_BOOL,
-                                        AnnotationValue(true));
-            }
-        }
-
-        if (exclusiveState) {
-            if (javaType == JAVA_TYPE_UNKNOWN || javaType == JAVA_TYPE_ATTRIBUTION_CHAIN ||
-                javaType == JAVA_TYPE_OBJECT || javaType == JAVA_TYPE_BYTE_ARRAY) {
-                print_error(field, "Invalid exclusive state field: '%s'\n",
-                            atomDecl->message.c_str());
-                errorCount++;
-            }
-
-            if (atomDecl->exclusiveField != 0) {
-                print_error(field,
-                            "Cannot have more than one exclusive state field in an "
-                            "atom: '%s'\n",
-                            atomDecl->message.c_str());
-                errorCount++;
-            } else {
-                atomDecl->exclusiveField = fieldNumber;
-                addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_EXCLUSIVE_STATE,
-                                        ANNOTATION_TYPE_BOOL, AnnotationValue(true));
-            }
-
-            if (stateFieldOption.has_default_state_value()) {
-                const int defaultState = stateFieldOption.default_state_value();
-                atomDecl->defaultState = defaultState;
-
-                addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_DEFAULT_STATE,
-                                        ANNOTATION_TYPE_INT, AnnotationValue(defaultState));
-            }
-
-            if (stateFieldOption.has_trigger_state_reset_value()) {
-                const int triggerStateReset = stateFieldOption.trigger_state_reset_value();
-
-                atomDecl->triggerStateReset = triggerStateReset;
-                addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_TRIGGER_STATE_RESET,
-                                        ANNOTATION_TYPE_INT, AnnotationValue(triggerStateReset));
-            }
-
-            if (stateFieldOption.has_nested()) {
-                const bool nested = stateFieldOption.nested();
-                atomDecl->nested = nested;
-
-                addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_STATE_NESTED,
-                                        ANNOTATION_TYPE_BOOL, AnnotationValue(nested));
-            }
-        }
-    }
-
-    if (field->options().GetExtension(os::statsd::is_uid) == true) {
-        if (javaType != JAVA_TYPE_INT) {
-            print_error(field, "is_uid annotation can only be applied to int32 fields: '%s'\n",
-                        atomDecl->message.c_str());
-            errorCount++;
-        }
-
-        if (atomDecl->uidField == 0) {
-            atomDecl->uidField = fieldNumber;
-
-            addAnnotationToAtomDecl(atomDecl, fieldNumber, ANNOTATION_ID_IS_UID,
-                                    ANNOTATION_TYPE_BOOL, AnnotationValue(true));
-        } else {
-            print_error(field,
-                        "Cannot have more than one field in an atom with is_uid "
-                        "annotation: '%s'\n",
-                        atomDecl->message.c_str());
-            errorCount++;
-        }
-    }
-
-    return errorCount;
-}
-
-/**
- * Gather the info about an atom proto.
- */
-int collate_atom(const Descriptor* atom, AtomDecl* atomDecl, vector<java_type_t>* signature) {
-    int errorCount = 0;
-
-    // Build a sorted list of the fields. Descriptor has them in source file
-    // order.
-    map<int, const FieldDescriptor*> fields;
-    for (int j = 0; j < atom->field_count(); j++) {
-        const FieldDescriptor* field = atom->field(j);
-        fields[field->number()] = field;
-    }
-
-    // Check that the parameters start at 1 and go up sequentially.
-    int expectedNumber = 1;
-    for (map<int, const FieldDescriptor*>::const_iterator it = fields.begin(); it != fields.end();
-         it++) {
-        const int number = it->first;
-        const FieldDescriptor* field = it->second;
-        if (number != expectedNumber) {
-            print_error(field,
-                        "Fields must be numbered consecutively starting at 1:"
-                        " '%s' is %d but should be %d\n",
-                        field->name().c_str(), number, expectedNumber);
-            errorCount++;
-            expectedNumber = number;
-            continue;
-        }
-        expectedNumber++;
-    }
-
-    // Check that only allowed types are present. Remove any invalid ones.
-    for (map<int, const FieldDescriptor*>::const_iterator it = fields.begin(); it != fields.end();
-         it++) {
-        const FieldDescriptor* field = it->second;
-        bool isBinaryField = field->options().GetExtension(os::statsd::log_mode) ==
-                             os::statsd::LogMode::MODE_BYTES;
-
-        java_type_t javaType = java_type(field);
-
-        if (javaType == JAVA_TYPE_UNKNOWN) {
-            print_error(field, "Unknown type for field: %s\n", field->name().c_str());
-            errorCount++;
-            continue;
-        } else if (javaType == JAVA_TYPE_OBJECT && atomDecl->code < PULL_ATOM_START_ID) {
-            // Allow attribution chain, but only at position 1.
-            print_error(field, "Message type not allowed for field in pushed atoms: %s\n",
-                        field->name().c_str());
-            errorCount++;
-            continue;
-        } else if (javaType == JAVA_TYPE_BYTE_ARRAY && !isBinaryField) {
-            print_error(field, "Raw bytes type not allowed for field: %s\n", field->name().c_str());
-            errorCount++;
-            continue;
-        }
-
-        if (isBinaryField && javaType != JAVA_TYPE_BYTE_ARRAY) {
-            print_error(field, "Cannot mark field %s as bytes.\n", field->name().c_str());
-            errorCount++;
-            continue;
-        }
-
-        // Doubles are not supported yet.
-        if (javaType == JAVA_TYPE_DOUBLE) {
-            print_error(field,
-                        "Doubles are not supported in atoms. Please change field %s "
-                        "to float\n",
-                        field->name().c_str());
-            errorCount++;
-            continue;
-        }
-
-        if (field->is_repeated() &&
-            !(javaType == JAVA_TYPE_ATTRIBUTION_CHAIN || javaType == JAVA_TYPE_KEY_VALUE_PAIR)) {
-            print_error(field,
-                        "Repeated fields are not supported in atoms. Please make "
-                        "field %s not "
-                        "repeated.\n",
-                        field->name().c_str());
-            errorCount++;
-            continue;
-        }
-    }
-
-    // Check that if there's an attribution chain, it's at position 1.
-    for (map<int, const FieldDescriptor*>::const_iterator it = fields.begin(); it != fields.end();
-         it++) {
-        int number = it->first;
-        if (number != 1) {
-            const FieldDescriptor* field = it->second;
-            java_type_t javaType = java_type(field);
-            if (javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                print_error(field,
-                            "AttributionChain fields must have field id 1, in message: '%s'\n",
-                            atom->name().c_str());
-                errorCount++;
-            }
-        }
-    }
-
-    // Build the type signature and the atom data.
-    for (map<int, const FieldDescriptor*>::const_iterator it = fields.begin(); it != fields.end();
-         it++) {
-        const FieldDescriptor* field = it->second;
-        java_type_t javaType = java_type(field);
-        bool isBinaryField = field->options().GetExtension(os::statsd::log_mode) ==
-                             os::statsd::LogMode::MODE_BYTES;
-
-        AtomField atField(field->name(), javaType);
-
-        if (javaType == JAVA_TYPE_ENUM) {
-            // All enums are treated as ints when it comes to function signatures.
-            collate_enums(*field->enum_type(), &atField);
-        }
-
-        // Generate signature for pushed atoms
-        if (atomDecl->code < PULL_ATOM_START_ID) {
-            if (javaType == JAVA_TYPE_ENUM) {
-                // All enums are treated as ints when it comes to function signatures.
-                signature->push_back(JAVA_TYPE_INT);
-            } else if (javaType == JAVA_TYPE_OBJECT && isBinaryField) {
-                signature->push_back(JAVA_TYPE_BYTE_ARRAY);
-            } else {
-                signature->push_back(javaType);
-            }
-        }
-
-        atomDecl->fields.push_back(atField);
-
-        errorCount += collate_field_annotations(atomDecl, field, it->first, javaType);
-    }
-
-    return errorCount;
-}
-
-// This function flattens the fields of the AttributionNode proto in an Atom
-// proto and generates the corresponding atom decl and signature.
-bool get_non_chained_node(const Descriptor* atom, AtomDecl* atomDecl,
-                          vector<java_type_t>* signature) {
-    // Build a sorted list of the fields. Descriptor has them in source file
-    // order.
-    map<int, const FieldDescriptor*> fields;
-    for (int j = 0; j < atom->field_count(); j++) {
-        const FieldDescriptor* field = atom->field(j);
-        fields[field->number()] = field;
-    }
-
-    AtomDecl attributionDecl;
-    vector<java_type_t> attributionSignature;
-    collate_atom(android::os::statsd::AttributionNode::descriptor(), &attributionDecl,
-                 &attributionSignature);
-
-    // Build the type signature and the atom data.
-    bool has_attribution_node = false;
-    for (map<int, const FieldDescriptor*>::const_iterator it = fields.begin(); it != fields.end();
-         it++) {
-        const FieldDescriptor* field = it->second;
-        java_type_t javaType = java_type(field);
-        if (javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-            atomDecl->fields.insert(atomDecl->fields.end(), attributionDecl.fields.begin(),
-                                    attributionDecl.fields.end());
-            signature->insert(signature->end(), attributionSignature.begin(),
-                              attributionSignature.end());
-            has_attribution_node = true;
-
-        } else {
-            AtomField atField(field->name(), javaType);
-            if (javaType == JAVA_TYPE_ENUM) {
-                // All enums are treated as ints when it comes to function signatures.
-                signature->push_back(JAVA_TYPE_INT);
-                collate_enums(*field->enum_type(), &atField);
-            } else {
-                signature->push_back(javaType);
-            }
-            atomDecl->fields.push_back(atField);
-        }
-    }
-    return has_attribution_node;
-}
-
-static void populateFieldNumberToAtomDeclSet(const shared_ptr<AtomDecl>& atomDecl,
-                                             FieldNumberToAtomDeclSet* fieldNumberToAtomDeclSet) {
-    for (FieldNumberToAnnotations::const_iterator it = atomDecl->fieldNumberToAnnotations.begin();
-         it != atomDecl->fieldNumberToAnnotations.end(); it++) {
-        const int fieldNumber = it->first;
-        (*fieldNumberToAtomDeclSet)[fieldNumber].insert(atomDecl);
-    }
-}
-
-/**
- * Gather the info about the atoms.
- */
-int collate_atoms(const Descriptor* descriptor, const string& moduleName, Atoms* atoms) {
-    int errorCount = 0;
-
-    for (int i = 0; i < descriptor->field_count(); i++) {
-        const FieldDescriptor* atomField = descriptor->field(i);
-
-        if (moduleName != DEFAULT_MODULE_NAME) {
-            const int moduleCount = atomField->options().ExtensionSize(os::statsd::module);
-            int j;
-            for (j = 0; j < moduleCount; ++j) {
-                const string atomModuleName =
-                        atomField->options().GetExtension(os::statsd::module, j);
-                if (atomModuleName == moduleName) {
-                    break;
-                }
-            }
-
-            // This atom is not in the module we're interested in; skip it.
-            if (moduleCount == j) {
-                if (dbg) {
-                    printf("   Skipping %s (%d)\n", atomField->name().c_str(), atomField->number());
-                }
-                continue;
-            }
-        }
-
-        if (dbg) {
-            printf("   %s (%d)\n", atomField->name().c_str(), atomField->number());
-        }
-
-        // StatsEvent only has one oneof, which contains only messages. Don't allow
-        // other types.
-        if (atomField->type() != FieldDescriptor::TYPE_MESSAGE) {
-            print_error(atomField,
-                        "Bad type for atom. StatsEvent can only have message type "
-                        "fields: %s\n",
-                        atomField->name().c_str());
-            errorCount++;
-            continue;
-        }
-
-        const Descriptor* atom = atomField->message_type();
-        shared_ptr<AtomDecl> atomDecl =
-                make_shared<AtomDecl>(atomField->number(), atomField->name(), atom->name());
-
-        if (atomDecl->code < PULL_ATOM_START_ID &&
-            atomField->options().GetExtension(os::statsd::truncate_timestamp)) {
-            addAnnotationToAtomDecl(atomDecl.get(), ATOM_ID_FIELD_NUMBER,
-                                    ANNOTATION_ID_TRUNCATE_TIMESTAMP, ANNOTATION_TYPE_BOOL,
-                                    AnnotationValue(true));
-            if (dbg) {
-                printf("%s can have timestamp truncated\n", atomField->name().c_str());
-            }
-        }
-
-        vector<java_type_t> signature;
-        errorCount += collate_atom(atom, atomDecl.get(), &signature);
-        if (atomDecl->primaryFields.size() != 0 && atomDecl->exclusiveField == 0) {
-            print_error(atomField, "Cannot have a primary field without an exclusive field: %s\n",
-                        atomField->name().c_str());
-            errorCount++;
-            continue;
-        }
-
-        FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet = atoms->signatureInfoMap[signature];
-        populateFieldNumberToAtomDeclSet(atomDecl, &fieldNumberToAtomDeclSet);
-
-        atoms->decls.insert(atomDecl);
-
-        shared_ptr<AtomDecl> nonChainedAtomDecl =
-                make_shared<AtomDecl>(atomField->number(), atomField->name(), atom->name());
-        vector<java_type_t> nonChainedSignature;
-        if (get_non_chained_node(atom, nonChainedAtomDecl.get(), &nonChainedSignature)) {
-            FieldNumberToAtomDeclSet& nonChainedFieldNumberToAtomDeclSet =
-                    atoms->nonChainedSignatureInfoMap[nonChainedSignature];
-            populateFieldNumberToAtomDeclSet(nonChainedAtomDecl,
-                                             &nonChainedFieldNumberToAtomDeclSet);
-
-            atoms->non_chained_decls.insert(nonChainedAtomDecl);
-        }
-    }
-
-    if (dbg) {
-        printf("signatures = [\n");
-        for (SignatureInfoMap::const_iterator it = atoms->signatureInfoMap.begin();
-             it != atoms->signatureInfoMap.end(); it++) {
-            printf("   ");
-            for (vector<java_type_t>::const_iterator jt = it->first.begin(); jt != it->first.end();
-                 jt++) {
-                printf(" %d", (int)*jt);
-            }
-            printf("\n");
-        }
-        printf("]\n");
-    }
-
-    return errorCount;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/Collation.h b/tools/stats_log_api_gen/Collation.h
deleted file mode 100644
index 3deb3ae..0000000
--- a/tools/stats_log_api_gen/Collation.h
+++ /dev/null
@@ -1,201 +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 ANDROID_STATS_LOG_API_GEN_COLLATION_H
-#define ANDROID_STATS_LOG_API_GEN_COLLATION_H
-
-#include <google/protobuf/descriptor.h>
-#include <stdint.h>
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "frameworks/proto_logging/stats/atom_field_options.pb.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using google::protobuf::Descriptor;
-using google::protobuf::FieldDescriptor;
-using std::map;
-using std::set;
-using std::shared_ptr;
-using std::string;
-using std::vector;
-
-const int PULL_ATOM_START_ID = 10000;
-
-const int FIRST_UID_IN_CHAIN_ID = 0;
-
-enum AnnotationId : uint8_t {
-    ANNOTATION_ID_IS_UID = 1,
-    ANNOTATION_ID_TRUNCATE_TIMESTAMP = 2,
-    ANNOTATION_ID_PRIMARY_FIELD = 3,
-    ANNOTATION_ID_EXCLUSIVE_STATE = 4,
-    ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID = 5,
-    ANNOTATION_ID_DEFAULT_STATE = 6,
-    ANNOTATION_ID_TRIGGER_STATE_RESET = 7,
-    ANNOTATION_ID_STATE_NESTED = 8,
-};
-
-const int ATOM_ID_FIELD_NUMBER = -1;
-
-const string DEFAULT_MODULE_NAME = "DEFAULT";
-
-/**
- * The types for atom parameters.
- */
-typedef enum {
-    JAVA_TYPE_UNKNOWN = 0,
-
-    JAVA_TYPE_ATTRIBUTION_CHAIN = 1,
-    JAVA_TYPE_BOOLEAN = 2,
-    JAVA_TYPE_INT = 3,
-    JAVA_TYPE_LONG = 4,
-    JAVA_TYPE_FLOAT = 5,
-    JAVA_TYPE_DOUBLE = 6,
-    JAVA_TYPE_STRING = 7,
-    JAVA_TYPE_ENUM = 8,
-    JAVA_TYPE_KEY_VALUE_PAIR = 9,
-
-    JAVA_TYPE_OBJECT = -1,
-    JAVA_TYPE_BYTE_ARRAY = -2,
-} java_type_t;
-
-enum AnnotationType {
-    ANNOTATION_TYPE_UNKNOWN = 0,
-    ANNOTATION_TYPE_INT = 1,
-    ANNOTATION_TYPE_BOOL = 2,
-};
-
-union AnnotationValue {
-    int intValue;
-    bool boolValue;
-
-    AnnotationValue(const int value) : intValue(value) {
-    }
-    AnnotationValue(const bool value) : boolValue(value) {
-    }
-};
-
-struct Annotation {
-    const AnnotationId annotationId;
-    const int atomId;
-    AnnotationType type;
-    AnnotationValue value;
-
-    inline Annotation(AnnotationId annotationId, int atomId, AnnotationType type,
-                      AnnotationValue value)
-        : annotationId(annotationId), atomId(atomId), type(type), value(value) {
-    }
-    inline ~Annotation() {
-    }
-
-    inline bool operator<(const Annotation& that) const {
-        return atomId == that.atomId ? annotationId < that.annotationId : atomId < that.atomId;
-    }
-};
-
-struct SharedComparator {
-    template <typename T>
-    inline bool operator()(const shared_ptr<T>& lhs, const shared_ptr<T>& rhs) const {
-        return (*lhs) < (*rhs);
-    }
-};
-
-using AnnotationSet = set<shared_ptr<Annotation>, SharedComparator>;
-
-using FieldNumberToAnnotations = map<int, AnnotationSet>;
-
-/**
- * The name and type for an atom field.
- */
-struct AtomField {
-    string name;
-    java_type_t javaType;
-
-    // If the field is of type enum, the following map contains the list of enum
-    // values.
-    map<int /* numeric value */, string /* value name */> enumValues;
-
-    inline AtomField() : name(), javaType(JAVA_TYPE_UNKNOWN) {
-    }
-    inline AtomField(const AtomField& that)
-        : name(that.name), javaType(that.javaType), enumValues(that.enumValues) {
-    }
-
-    inline AtomField(string n, java_type_t jt) : name(n), javaType(jt) {
-    }
-    inline ~AtomField() {
-    }
-};
-
-/**
- * The name and code for an atom.
- */
-struct AtomDecl {
-    int code;
-    string name;
-
-    string message;
-    vector<AtomField> fields;
-
-    FieldNumberToAnnotations fieldNumberToAnnotations;
-
-    vector<int> primaryFields;
-    int exclusiveField = 0;
-    int defaultState = INT_MAX;
-    int triggerStateReset = INT_MAX;
-    bool nested = true;
-
-    int uidField = 0;
-
-    AtomDecl();
-    AtomDecl(const AtomDecl& that);
-    AtomDecl(int code, const string& name, const string& message);
-    ~AtomDecl();
-
-    inline bool operator<(const AtomDecl& that) const {
-        return (code == that.code) ? (name < that.name) : (code < that.code);
-    }
-};
-
-using AtomDeclSet = set<shared_ptr<AtomDecl>, SharedComparator>;
-
-// Maps a field number to a set of atoms that have annotation(s) for their field with that field
-// number.
-using FieldNumberToAtomDeclSet = map<int, AtomDeclSet>;
-
-using SignatureInfoMap = map<vector<java_type_t>, FieldNumberToAtomDeclSet>;
-
-struct Atoms {
-    SignatureInfoMap signatureInfoMap;
-    AtomDeclSet decls;
-    AtomDeclSet non_chained_decls;
-    SignatureInfoMap nonChainedSignatureInfoMap;
-};
-
-/**
- * Gather the information about the atoms.  Returns the number of errors.
- */
-int collate_atoms(const Descriptor* descriptor, const string& moduleName, Atoms* atoms);
-int collate_atom(const Descriptor* atom, AtomDecl* atomDecl, vector<java_type_t>* signature);
-
-}  // namespace stats_log_api_gen
-}  // namespace android
-
-#endif  // ANDROID_STATS_LOG_API_GEN_COLLATION_H
diff --git a/tools/stats_log_api_gen/java_writer.cpp b/tools/stats_log_api_gen/java_writer.cpp
deleted file mode 100644
index f4c937c..0000000
--- a/tools/stats_log_api_gen/java_writer.cpp
+++ /dev/null
@@ -1,336 +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 "java_writer.h"
-
-#include "java_writer_q.h"
-#include "utils.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-static int write_java_q_logger_class(FILE* out, const SignatureInfoMap& signatureInfoMap,
-                                     const AtomDecl& attributionDecl) {
-    fprintf(out, "\n");
-    fprintf(out, "    // Write logging helper methods for statsd in Q and earlier.\n");
-    fprintf(out, "    private static class QLogger {\n");
-
-    write_java_q_logging_constants(out, "        ");
-
-    // Print Q write methods.
-    fprintf(out, "\n");
-    fprintf(out, "        // Write methods.\n");
-    write_java_methods_q_schema(out, signatureInfoMap, attributionDecl, "        ");
-
-    fprintf(out, "    }\n");
-    return 0;
-}
-
-static void write_java_annotation_constants(FILE* out) {
-    fprintf(out, "    // Annotation constants.\n");
-
-    for (const auto& [id, name] : ANNOTATION_ID_CONSTANTS) {
-        fprintf(out, "    public static final byte %s = %hhu;\n", name.c_str(), id);
-    }
-    fprintf(out, "\n");
-}
-
-static void write_annotations(FILE* out, int argIndex,
-                              const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet) {
-    FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt =
-            fieldNumberToAtomDeclSet.find(argIndex);
-    if (fieldNumberToAtomDeclSet.end() == fieldNumberToAtomDeclSetIt) {
-        return;
-    }
-    const AtomDeclSet& atomDeclSet = fieldNumberToAtomDeclSetIt->second;
-    for (const shared_ptr<AtomDecl>& atomDecl : atomDeclSet) {
-        const string atomConstant = make_constant_name(atomDecl->name);
-        fprintf(out, "        if (%s == code) {\n", atomConstant.c_str());
-        const AnnotationSet& annotations = atomDecl->fieldNumberToAnnotations.at(argIndex);
-        int resetState = -1;
-        int defaultState = -1;
-        for (const shared_ptr<Annotation>& annotation : annotations) {
-            const string& annotationConstant = ANNOTATION_ID_CONSTANTS.at(annotation->annotationId);
-            switch (annotation->type) {
-                case ANNOTATION_TYPE_INT:
-                    if (ANNOTATION_ID_TRIGGER_STATE_RESET == annotation->annotationId) {
-                        resetState = annotation->value.intValue;
-                    } else if (ANNOTATION_ID_DEFAULT_STATE == annotation->annotationId) {
-                        defaultState = annotation->value.intValue;
-                    } else {
-                        fprintf(out, "            builder.addIntAnnotation(%s, %d);\n",
-                                annotationConstant.c_str(), annotation->value.intValue);
-                    }
-                    break;
-                case ANNOTATION_TYPE_BOOL:
-                    fprintf(out, "            builder.addBooleanAnnotation(%s, %s);\n",
-                            annotationConstant.c_str(),
-                            annotation->value.boolValue ? "true" : "false");
-                    break;
-                default:
-                    break;
-            }
-        }
-        if (defaultState != -1 && resetState != -1) {
-            const string& annotationConstant =
-                    ANNOTATION_ID_CONSTANTS.at(ANNOTATION_ID_TRIGGER_STATE_RESET);
-            fprintf(out, "            if (arg%d == %d) {\n", argIndex, resetState);
-            fprintf(out, "                builder.addIntAnnotation(%s, %d);\n",
-                    annotationConstant.c_str(), defaultState);
-            fprintf(out, "            }\n");
-        }
-        fprintf(out, "        }\n");
-    }
-}
-
-static int write_java_methods(FILE* out, const SignatureInfoMap& signatureInfoMap,
-                              const AtomDecl& attributionDecl, const bool supportQ) {
-    for (auto signatureInfoMapIt = signatureInfoMap.begin();
-         signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
-        // Print method signature.
-        fprintf(out, "    public static void write(int code");
-        const vector<java_type_t>& signature = signatureInfoMapIt->first;
-        const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet = signatureInfoMapIt->second;
-        int argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                for (auto chainField : attributionDecl.fields) {
-                    fprintf(out, ", %s[] %s", java_type_name(chainField.javaType),
-                            chainField.name.c_str());
-                }
-            } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-                fprintf(out, ", android.util.SparseArray<Object> valueMap");
-            } else {
-                fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
-            }
-            argIndex++;
-        }
-        fprintf(out, ") {\n");
-
-        // Print method body.
-        string indent("");
-        if (supportQ) {
-            fprintf(out, "        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {\n");
-            indent = "    ";
-        }
-
-        // Start StatsEvent.Builder.
-        fprintf(out,
-                "%s        final StatsEvent.Builder builder = "
-                "StatsEvent.newBuilder();\n",
-                indent.c_str());
-
-        // Write atom code.
-        fprintf(out, "%s        builder.setAtomId(code);\n", indent.c_str());
-        write_annotations(out, ATOM_ID_FIELD_NUMBER, fieldNumberToAtomDeclSet);
-
-        // Write the args.
-        argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            switch (*arg) {
-                case JAVA_TYPE_BOOLEAN:
-                    fprintf(out, "%s        builder.writeBoolean(arg%d);\n", indent.c_str(),
-                            argIndex);
-                    break;
-                case JAVA_TYPE_INT:
-                case JAVA_TYPE_ENUM:
-                    fprintf(out, "%s        builder.writeInt(arg%d);\n", indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_FLOAT:
-                    fprintf(out, "%s        builder.writeFloat(arg%d);\n", indent.c_str(),
-                            argIndex);
-                    break;
-                case JAVA_TYPE_LONG:
-                    fprintf(out, "%s        builder.writeLong(arg%d);\n", indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_STRING:
-                    fprintf(out, "%s        builder.writeString(arg%d);\n", indent.c_str(),
-                            argIndex);
-                    break;
-                case JAVA_TYPE_BYTE_ARRAY:
-                    fprintf(out,
-                            "%s        builder.writeByteArray(null == arg%d ? new byte[0] : "
-                            "arg%d);\n",
-                            indent.c_str(), argIndex, argIndex);
-                    break;
-                case JAVA_TYPE_ATTRIBUTION_CHAIN: {
-                    const char* uidName = attributionDecl.fields.front().name.c_str();
-                    const char* tagName = attributionDecl.fields.back().name.c_str();
-
-                    fprintf(out, "%s        builder.writeAttributionChain(\n", indent.c_str());
-                    fprintf(out, "%s                null == %s ? new int[0] : %s,\n",
-                            indent.c_str(), uidName, uidName);
-                    fprintf(out, "%s                null == %s ? new String[0] : %s);\n",
-                            indent.c_str(), tagName, tagName);
-                    break;
-                }
-                case JAVA_TYPE_KEY_VALUE_PAIR:
-                    fprintf(out, "\n");
-                    fprintf(out, "%s        // Write KeyValuePairs.\n", indent.c_str());
-                    fprintf(out, "%s        final int count = valueMap.size();\n", indent.c_str());
-                    fprintf(out, "%s        android.util.SparseIntArray intMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s        android.util.SparseLongArray longMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s        android.util.SparseArray<String> stringMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s        android.util.SparseArray<Float> floatMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s        for (int i = 0; i < count; i++) {\n", indent.c_str());
-                    fprintf(out, "%s            final int key = valueMap.keyAt(i);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            final Object value = valueMap.valueAt(i);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            if (value instanceof Integer) {\n", indent.c_str());
-                    fprintf(out, "%s                if (null == intMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                    intMap = new "
-                            "android.util.SparseIntArray();\n",
-                            indent.c_str());
-                    fprintf(out, "%s                }\n", indent.c_str());
-                    fprintf(out, "%s                intMap.put(key, (Integer) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            } else if (value instanceof Long) {\n",
-                            indent.c_str());
-                    fprintf(out, "%s                if (null == longMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                    longMap = new "
-                            "android.util.SparseLongArray();\n",
-                            indent.c_str());
-                    fprintf(out, "%s                }\n", indent.c_str());
-                    fprintf(out, "%s                longMap.put(key, (Long) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            } else if (value instanceof String) {\n",
-                            indent.c_str());
-                    fprintf(out, "%s                if (null == stringMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                    stringMap = new "
-                            "android.util.SparseArray<>();\n",
-                            indent.c_str());
-                    fprintf(out, "%s                }\n", indent.c_str());
-                    fprintf(out, "%s                stringMap.put(key, (String) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            } else if (value instanceof Float) {\n",
-                            indent.c_str());
-                    fprintf(out, "%s                if (null == floatMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                    floatMap = new "
-                            "android.util.SparseArray<>();\n",
-                            indent.c_str());
-                    fprintf(out, "%s                }\n", indent.c_str());
-                    fprintf(out, "%s                floatMap.put(key, (Float) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s            }\n", indent.c_str());
-                    fprintf(out, "%s        }\n", indent.c_str());
-                    fprintf(out,
-                            "%s        builder.writeKeyValuePairs("
-                            "intMap, longMap, stringMap, floatMap);\n",
-                            indent.c_str());
-                    break;
-                default:
-                    // Unsupported types: OBJECT, DOUBLE.
-                    fprintf(stderr, "Encountered unsupported type.");
-                    return 1;
-            }
-            write_annotations(out, argIndex, fieldNumberToAtomDeclSet);
-            argIndex++;
-        }
-
-        fprintf(out, "\n");
-        fprintf(out, "%s        builder.usePooledBuffer();\n", indent.c_str());
-        fprintf(out, "%s        StatsLog.write(builder.build());\n", indent.c_str());
-
-        // Add support for writing using Q schema if this is not the default module.
-        if (supportQ) {
-            fprintf(out, "        } else {\n");
-            fprintf(out, "            QLogger.write(code");
-            argIndex = 1;
-            for (vector<java_type_t>::const_iterator arg = signature.begin();
-                 arg != signature.end(); arg++) {
-                if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                    const char* uidName = attributionDecl.fields.front().name.c_str();
-                    const char* tagName = attributionDecl.fields.back().name.c_str();
-                    fprintf(out, ", %s, %s", uidName, tagName);
-                } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-                    // Module logging does not yet support key value pair.
-                    fprintf(stderr, "Module logging does not yet support key value pair.\n");
-                    return 1;
-                } else {
-                    fprintf(out, ", arg%d", argIndex);
-                }
-                argIndex++;
-            }
-            fprintf(out, ");\n");
-            fprintf(out, "        }\n");  // if
-        }
-
-        fprintf(out, "    }\n");  // method
-        fprintf(out, "\n");
-    }
-    return 0;
-}
-
-int write_stats_log_java(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                         const string& javaClass, const string& javaPackage, const bool supportQ,
-                         const bool supportWorkSource) {
-    // Print prelude
-    fprintf(out, "// This file is autogenerated\n");
-    fprintf(out, "\n");
-    fprintf(out, "package %s;\n", javaPackage.c_str());
-    fprintf(out, "\n");
-    fprintf(out, "\n");
-    if (supportQ) {
-        fprintf(out, "import android.os.Build;\n");
-        fprintf(out, "import android.os.SystemClock;\n");
-    }
-
-    fprintf(out, "import android.util.StatsEvent;\n");
-    fprintf(out, "import android.util.StatsLog;\n");
-
-    fprintf(out, "\n");
-    fprintf(out, "\n");
-    fprintf(out, "/**\n");
-    fprintf(out, " * Utility class for logging statistics events.\n");
-    fprintf(out, " */\n");
-    fprintf(out, "public class %s {\n", javaClass.c_str());
-
-    write_java_atom_codes(out, atoms);
-    write_java_enum_values(out, atoms);
-    write_java_annotation_constants(out);
-
-    int errors = 0;
-
-    // Print write methods.
-    fprintf(out, "    // Write methods\n");
-    errors += write_java_methods(out, atoms.signatureInfoMap, attributionDecl, supportQ);
-    errors += write_java_non_chained_methods(out, atoms.nonChainedSignatureInfoMap);
-    if (supportWorkSource) {
-        errors += write_java_work_source_methods(out, atoms.signatureInfoMap);
-    }
-
-    if (supportQ) {
-        errors += write_java_q_logger_class(out, atoms.signatureInfoMap, attributionDecl);
-    }
-
-    fprintf(out, "}\n");
-
-    return errors;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/java_writer.h b/tools/stats_log_api_gen/java_writer.h
deleted file mode 100644
index 8b3b505..0000000
--- a/tools/stats_log_api_gen/java_writer.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 <stdio.h>
-#include <string.h>
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "Collation.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using namespace std;
-
-int write_stats_log_java(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                         const string& javaClass, const string& javaPackage, const bool supportQ,
-                         const bool supportWorkSource);
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/java_writer_q.cpp b/tools/stats_log_api_gen/java_writer_q.cpp
deleted file mode 100644
index d21e270..0000000
--- a/tools/stats_log_api_gen/java_writer_q.cpp
+++ /dev/null
@@ -1,601 +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 "java_writer_q.h"
-
-#include "utils.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-void write_java_q_logging_constants(FILE* out, const string& indent) {
-    fprintf(out, "%s// Payload limits.\n", indent.c_str());
-    fprintf(out, "%sprivate static final int LOGGER_ENTRY_MAX_PAYLOAD = 4068;\n", indent.c_str());
-    fprintf(out,
-            "%sprivate static final int MAX_EVENT_PAYLOAD = "
-            "LOGGER_ENTRY_MAX_PAYLOAD - 4;\n",
-            indent.c_str());
-
-    // Value types. Must match with EventLog.java and log.h.
-    fprintf(out, "\n");
-    fprintf(out, "%s// Value types.\n", indent.c_str());
-    fprintf(out, "%sprivate static final byte INT_TYPE = 0;\n", indent.c_str());
-    fprintf(out, "%sprivate static final byte LONG_TYPE = 1;\n", indent.c_str());
-    fprintf(out, "%sprivate static final byte STRING_TYPE = 2;\n", indent.c_str());
-    fprintf(out, "%sprivate static final byte LIST_TYPE = 3;\n", indent.c_str());
-    fprintf(out, "%sprivate static final byte FLOAT_TYPE = 4;\n", indent.c_str());
-
-    // Size of each value type.
-    // Booleans, ints, floats, and enums take 5 bytes, 1 for the type and 4 for
-    // the value.
-    fprintf(out, "\n");
-    fprintf(out, "%s// Size of each value type.\n", indent.c_str());
-    fprintf(out, "%sprivate static final int INT_TYPE_SIZE = 5;\n", indent.c_str());
-    fprintf(out, "%sprivate static final int FLOAT_TYPE_SIZE = 5;\n", indent.c_str());
-    // Longs take 9 bytes, 1 for the type and 8 for the value.
-    fprintf(out, "%sprivate static final int LONG_TYPE_SIZE = 9;\n", indent.c_str());
-    // Strings take 5 metadata bytes: 1 byte is for the type, 4 are for the
-    // length.
-    fprintf(out, "%sprivate static final int STRING_TYPE_OVERHEAD = 5;\n", indent.c_str());
-    fprintf(out, "%sprivate static final int LIST_TYPE_OVERHEAD = 2;\n", indent.c_str());
-}
-
-int write_java_methods_q_schema(FILE* out, const SignatureInfoMap& signatureInfoMap,
-                                const AtomDecl& attributionDecl, const string& indent) {
-    int requiredHelpers = 0;
-    for (auto signatureInfoMapIt = signatureInfoMap.begin();
-         signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
-        // Print method signature.
-        vector<java_type_t> signature = signatureInfoMapIt->first;
-        fprintf(out, "%spublic static void write(int code", indent.c_str());
-        int argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                for (auto chainField : attributionDecl.fields) {
-                    fprintf(out, ", %s[] %s", java_type_name(chainField.javaType),
-                            chainField.name.c_str());
-                }
-            } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-                fprintf(out, ", android.util.SparseArray<Object> valueMap");
-            } else {
-                fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
-            }
-            argIndex++;
-        }
-        fprintf(out, ") {\n");
-
-        // Calculate the size of the buffer.
-        fprintf(out, "%s    // Initial overhead of the list, timestamp, and atom tag.\n",
-                indent.c_str());
-        fprintf(out,
-                "%s    int needed = LIST_TYPE_OVERHEAD + LONG_TYPE_SIZE + "
-                "INT_TYPE_SIZE;\n",
-                indent.c_str());
-        argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            switch (*arg) {
-                case JAVA_TYPE_BOOLEAN:
-                case JAVA_TYPE_INT:
-                case JAVA_TYPE_FLOAT:
-                case JAVA_TYPE_ENUM:
-                    fprintf(out, "%s    needed += INT_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_LONG:
-                    // Longs take 9 bytes, 1 for the type and 8 for the value.
-                    fprintf(out, "%s    needed += LONG_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_STRING:
-                    // Strings take 5 metadata bytes + length of byte encoded string.
-                    fprintf(out, "%s    if (arg%d == null) {\n", indent.c_str(), argIndex);
-                    fprintf(out, "%s        arg%d = \"\";\n", indent.c_str(), argIndex);
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out,
-                            "%s    byte[] arg%dBytes = "
-                            "arg%d.getBytes(java.nio.charset.StandardCharsets.UTF_8);\n",
-                            indent.c_str(), argIndex, argIndex);
-                    fprintf(out, "%s    needed += STRING_TYPE_OVERHEAD + arg%dBytes.length;\n",
-                            indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_BYTE_ARRAY:
-                    // Byte arrays take 5 metadata bytes + length of byte array.
-                    fprintf(out, "%s    if (arg%d == null) {\n", indent.c_str(), argIndex);
-                    fprintf(out, "%s        arg%d = new byte[0];\n", indent.c_str(), argIndex);
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out, "%s    needed += STRING_TYPE_OVERHEAD + arg%d.length;\n",
-                            indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_ATTRIBUTION_CHAIN: {
-                    const char* uidName = attributionDecl.fields.front().name.c_str();
-                    const char* tagName = attributionDecl.fields.back().name.c_str();
-                    // Null checks on the params.
-                    fprintf(out, "%s    if (%s == null) {\n", indent.c_str(), uidName);
-                    fprintf(out, "%s        %s = new %s[0];\n", indent.c_str(), uidName,
-                            java_type_name(attributionDecl.fields.front().javaType));
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out, "%s    if (%s == null) {\n", indent.c_str(), tagName);
-                    fprintf(out, "%s        %s = new %s[0];\n", indent.c_str(), tagName,
-                            java_type_name(attributionDecl.fields.back().javaType));
-                    fprintf(out, "%s    }\n", indent.c_str());
-
-                    // First check that the lengths of the uid and tag arrays are the
-                    // same.
-                    fprintf(out, "%s    if (%s.length != %s.length) {\n", indent.c_str(), uidName,
-                            tagName);
-                    fprintf(out, "%s        return;\n", indent.c_str());
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out, "%s    int attrSize = LIST_TYPE_OVERHEAD;\n", indent.c_str());
-                    fprintf(out, "%s    for (int i = 0; i < %s.length; i++) {\n", indent.c_str(),
-                            tagName);
-                    fprintf(out, "%s        String str%d = (%s[i] == null) ? \"\" : %s[i];\n",
-                            indent.c_str(), argIndex, tagName, tagName);
-                    fprintf(out,
-                            "%s        int str%dlen = "
-                            "str%d.getBytes(java.nio.charset.StandardCharsets.UTF_8)."
-                            "length;\n",
-                            indent.c_str(), argIndex, argIndex);
-                    fprintf(out,
-                            "%s        attrSize += "
-                            "LIST_TYPE_OVERHEAD + INT_TYPE_SIZE + STRING_TYPE_OVERHEAD + "
-                            "str%dlen;\n",
-                            indent.c_str(), argIndex);
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out, "%s    needed += attrSize;\n", indent.c_str());
-                    break;
-                }
-                case JAVA_TYPE_KEY_VALUE_PAIR: {
-                    fprintf(out, "%s    // Calculate bytes needed by Key Value Pairs.\n",
-                            indent.c_str());
-                    fprintf(out, "%s    final int count = valueMap.size();\n", indent.c_str());
-                    fprintf(out, "%s    android.util.SparseIntArray intMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s    android.util.SparseLongArray longMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s    android.util.SparseArray<String> stringMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s    android.util.SparseArray<Float> floatMap = null;\n",
-                            indent.c_str());
-                    fprintf(out, "%s    int keyValuePairSize = LIST_TYPE_OVERHEAD;\n",
-                            indent.c_str());
-                    fprintf(out, "%s    for (int i = 0; i < count; i++) {\n", indent.c_str());
-                    fprintf(out, "%s        final int key = valueMap.keyAt(i);\n", indent.c_str());
-                    fprintf(out, "%s        final Object value = valueMap.valueAt(i);\n",
-                            indent.c_str());
-                    fprintf(out, "%s        if (value instanceof Integer) {\n", indent.c_str());
-                    fprintf(out, "%s            keyValuePairSize += LIST_TYPE_OVERHEAD\n",
-                            indent.c_str());
-                    fprintf(out, "%s                    + INT_TYPE_SIZE + INT_TYPE_SIZE;\n",
-                            indent.c_str());
-                    fprintf(out, "%s            if (null == intMap) {\n", indent.c_str());
-                    fprintf(out, "%s                intMap = new android.util.SparseIntArray();\n",
-                            indent.c_str());
-                    fprintf(out, "%s            }\n", indent.c_str());
-                    fprintf(out, "%s            intMap.put(key, (Integer) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s        } else if (value instanceof Long) {\n", indent.c_str());
-                    fprintf(out, "%s            keyValuePairSize += LIST_TYPE_OVERHEAD\n",
-                            indent.c_str());
-                    fprintf(out, "%s                    + INT_TYPE_SIZE + LONG_TYPE_SIZE;\n",
-                            indent.c_str());
-                    fprintf(out, "%s            if (null == longMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                longMap = new "
-                            "android.util.SparseLongArray();\n",
-                            indent.c_str());
-                    fprintf(out, "%s            }\n", indent.c_str());
-                    fprintf(out, "%s            longMap.put(key, (Long) value);\n", indent.c_str());
-                    fprintf(out, "%s        } else if (value instanceof String) {\n",
-                            indent.c_str());
-                    fprintf(out,
-                            "%s            final String str = (value == null) ? \"\" : "
-                            "(String) value;\n",
-                            indent.c_str());
-                    fprintf(out,
-                            "%s            final int len = "
-                            "str.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;\n",
-                            indent.c_str());
-                    fprintf(out,
-                            "%s            keyValuePairSize += LIST_TYPE_OVERHEAD + "
-                            "INT_TYPE_SIZE\n",
-                            indent.c_str());
-                    fprintf(out, "%s                    + STRING_TYPE_OVERHEAD + len;\n",
-                            indent.c_str());
-                    fprintf(out, "%s            if (null == stringMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                stringMap = new "
-                            "android.util.SparseArray<>();\n",
-                            indent.c_str());
-                    fprintf(out, "%s            }\n", indent.c_str());
-                    fprintf(out, "%s            stringMap.put(key, str);\n", indent.c_str());
-                    fprintf(out, "%s        } else if (value instanceof Float) {\n",
-                            indent.c_str());
-                    fprintf(out, "%s            keyValuePairSize += LIST_TYPE_OVERHEAD\n",
-                            indent.c_str());
-                    fprintf(out, "%s                    + INT_TYPE_SIZE + FLOAT_TYPE_SIZE;\n",
-                            indent.c_str());
-                    fprintf(out, "%s            if (null == floatMap) {\n", indent.c_str());
-                    fprintf(out,
-                            "%s                floatMap = new "
-                            "android.util.SparseArray<>();\n",
-                            indent.c_str());
-                    fprintf(out, "%s            }\n", indent.c_str());
-                    fprintf(out, "%s            floatMap.put(key, (Float) value);\n",
-                            indent.c_str());
-                    fprintf(out, "%s        }\n", indent.c_str());
-                    fprintf(out, "%s    }\n", indent.c_str());
-                    fprintf(out, "%s    needed += keyValuePairSize;\n", indent.c_str());
-                    break;
-                }
-                default:
-                    // Unsupported types: OBJECT, DOUBLE.
-                    fprintf(stderr, "Module logging does not yet support Object and Double.\n");
-                    return 1;
-            }
-            argIndex++;
-        }
-
-        // Now we have the size that is needed. Check for overflow and return if
-        // needed.
-        fprintf(out, "%s    if (needed > MAX_EVENT_PAYLOAD) {\n", indent.c_str());
-        fprintf(out, "%s        return;\n", indent.c_str());
-        fprintf(out, "%s    }\n", indent.c_str());
-
-        // Create new buffer, and associated data types.
-        fprintf(out, "%s    byte[] buff = new byte[needed];\n", indent.c_str());
-        fprintf(out, "%s    int pos = 0;\n", indent.c_str());
-
-        // Initialize the buffer with list data type.
-        fprintf(out, "%s    buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s    buff[pos + 1] = %zu;\n", indent.c_str(), signature.size() + 2);
-        fprintf(out, "%s    pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-
-        // Write timestamp.
-        fprintf(out, "%s    long elapsedRealtime = SystemClock.elapsedRealtimeNanos();\n",
-                indent.c_str());
-        fprintf(out, "%s    buff[pos] = LONG_TYPE;\n", indent.c_str());
-        fprintf(out, "%s    copyLong(buff, pos + 1, elapsedRealtime);\n", indent.c_str());
-        fprintf(out, "%s    pos += LONG_TYPE_SIZE;\n", indent.c_str());
-
-        // Write atom code.
-        fprintf(out, "%s    buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s    copyInt(buff, pos + 1, code);\n", indent.c_str());
-        fprintf(out, "%s    pos += INT_TYPE_SIZE;\n", indent.c_str());
-
-        // Write the args.
-        argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            switch (*arg) {
-                case JAVA_TYPE_BOOLEAN:
-                    fprintf(out, "%s    buff[pos] = INT_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyInt(buff, pos + 1, arg%d? 1 : 0);\n", indent.c_str(),
-                            argIndex);
-                    fprintf(out, "%s    pos += INT_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_INT:
-                case JAVA_TYPE_ENUM:
-                    fprintf(out, "%s    buff[pos] = INT_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyInt(buff, pos + 1, arg%d);\n", indent.c_str(),
-                            argIndex);
-                    fprintf(out, "%s    pos += INT_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_FLOAT:
-                    requiredHelpers |= JAVA_MODULE_REQUIRES_FLOAT;
-                    fprintf(out, "%s    buff[pos] = FLOAT_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyFloat(buff, pos + 1, arg%d);\n", indent.c_str(),
-                            argIndex);
-                    fprintf(out, "%s    pos += FLOAT_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_LONG:
-                    fprintf(out, "%s    buff[pos] = LONG_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyLong(buff, pos + 1, arg%d);\n", indent.c_str(),
-                            argIndex);
-                    fprintf(out, "%s    pos += LONG_TYPE_SIZE;\n", indent.c_str());
-                    break;
-                case JAVA_TYPE_STRING:
-                    fprintf(out, "%s    buff[pos] = STRING_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyInt(buff, pos + 1, arg%dBytes.length);\n",
-                            indent.c_str(), argIndex);
-                    fprintf(out,
-                            "%s    System.arraycopy("
-                            "arg%dBytes, 0, buff, pos + STRING_TYPE_OVERHEAD, "
-                            "arg%dBytes.length);\n",
-                            indent.c_str(), argIndex, argIndex);
-                    fprintf(out, "%s    pos += STRING_TYPE_OVERHEAD + arg%dBytes.length;\n",
-                            indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_BYTE_ARRAY:
-                    fprintf(out, "%s    buff[pos] = STRING_TYPE;\n", indent.c_str());
-                    fprintf(out, "%s    copyInt(buff, pos + 1, arg%d.length);\n", indent.c_str(),
-                            argIndex);
-                    fprintf(out,
-                            "%s    System.arraycopy("
-                            "arg%d, 0, buff, pos + STRING_TYPE_OVERHEAD, arg%d.length);\n",
-                            indent.c_str(), argIndex, argIndex);
-                    fprintf(out, "%s    pos += STRING_TYPE_OVERHEAD + arg%d.length;\n",
-                            indent.c_str(), argIndex);
-                    break;
-                case JAVA_TYPE_ATTRIBUTION_CHAIN: {
-                    requiredHelpers |= JAVA_MODULE_REQUIRES_ATTRIBUTION;
-                    const char* uidName = attributionDecl.fields.front().name.c_str();
-                    const char* tagName = attributionDecl.fields.back().name.c_str();
-
-                    fprintf(out, "%s    writeAttributionChain(buff, pos, %s, %s);\n",
-                            indent.c_str(), uidName, tagName);
-                    fprintf(out, "%s    pos += attrSize;\n", indent.c_str());
-                    break;
-                }
-                case JAVA_TYPE_KEY_VALUE_PAIR:
-                    requiredHelpers |= JAVA_MODULE_REQUIRES_FLOAT;
-                    requiredHelpers |= JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS;
-                    fprintf(out,
-                            "%s    writeKeyValuePairs(buff, pos, (byte) count, intMap, "
-                            "longMap, "
-                            "stringMap, floatMap);\n",
-                            indent.c_str());
-                    fprintf(out, "%s    pos += keyValuePairSize;\n", indent.c_str());
-                    break;
-                default:
-                    // Unsupported types: OBJECT, DOUBLE.
-                    fprintf(stderr, "Object and Double are not supported in module logging");
-                    return 1;
-            }
-            argIndex++;
-        }
-
-        fprintf(out, "%s    StatsLog.writeRaw(buff, pos);\n", indent.c_str());
-        fprintf(out, "%s}\n", indent.c_str());
-        fprintf(out, "\n");
-    }
-
-    write_java_helpers_for_q_schema_methods(out, attributionDecl, requiredHelpers, indent);
-
-    return 0;
-}
-
-void write_java_helpers_for_q_schema_methods(FILE* out, const AtomDecl& attributionDecl,
-                                             const int requiredHelpers, const string& indent) {
-    fprintf(out, "\n");
-    fprintf(out, "%s// Helper methods for copying primitives\n", indent.c_str());
-    fprintf(out, "%sprivate static void copyInt(byte[] buff, int pos, int val) {\n",
-            indent.c_str());
-    fprintf(out, "%s    buff[pos] = (byte) (val);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 1] = (byte) (val >> 8);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 2] = (byte) (val >> 16);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 3] = (byte) (val >> 24);\n", indent.c_str());
-    fprintf(out, "%s    return;\n", indent.c_str());
-    fprintf(out, "%s}\n", indent.c_str());
-    fprintf(out, "\n");
-
-    fprintf(out, "%sprivate static void copyLong(byte[] buff, int pos, long val) {\n",
-            indent.c_str());
-    fprintf(out, "%s    buff[pos] = (byte) (val);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 1] = (byte) (val >> 8);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 2] = (byte) (val >> 16);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 3] = (byte) (val >> 24);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 4] = (byte) (val >> 32);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 5] = (byte) (val >> 40);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 6] = (byte) (val >> 48);\n", indent.c_str());
-    fprintf(out, "%s    buff[pos + 7] = (byte) (val >> 56);\n", indent.c_str());
-    fprintf(out, "%s    return;\n", indent.c_str());
-    fprintf(out, "%s}\n", indent.c_str());
-    fprintf(out, "\n");
-
-    if (requiredHelpers & JAVA_MODULE_REQUIRES_FLOAT) {
-        fprintf(out, "%sprivate static void copyFloat(byte[] buff, int pos, float val) {\n",
-                indent.c_str());
-        fprintf(out, "%s    copyInt(buff, pos, Float.floatToIntBits(val));\n", indent.c_str());
-        fprintf(out, "%s    return;\n", indent.c_str());
-        fprintf(out, "%s}\n", indent.c_str());
-        fprintf(out, "\n");
-    }
-
-    if (requiredHelpers & JAVA_MODULE_REQUIRES_ATTRIBUTION) {
-        fprintf(out, "%sprivate static void writeAttributionChain(byte[] buff, int pos",
-                indent.c_str());
-        for (auto chainField : attributionDecl.fields) {
-            fprintf(out, ", %s[] %s", java_type_name(chainField.javaType), chainField.name.c_str());
-        }
-        fprintf(out, ") {\n");
-
-        const char* uidName = attributionDecl.fields.front().name.c_str();
-        const char* tagName = attributionDecl.fields.back().name.c_str();
-
-        // Write the first list begin.
-        fprintf(out, "%s    buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s    buff[pos + 1] = (byte) (%s.length);\n", indent.c_str(), tagName);
-        fprintf(out, "%s    pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-
-        // Iterate through the attribution chain and write the nodes.
-        fprintf(out, "%s    for (int i = 0; i < %s.length; i++) {\n", indent.c_str(), tagName);
-        // Write the list begin.
-        fprintf(out, "%s        buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos + 1] = %lu;\n", indent.c_str(),
-                attributionDecl.fields.size());
-        fprintf(out, "%s        pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-
-        // Write the uid.
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, %s[i]);\n", indent.c_str(), uidName);
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-
-        // Write the tag.
-        fprintf(out, "%s        String %sStr = (%s[i] == null) ? \"\" : %s[i];\n", indent.c_str(),
-                tagName, tagName, tagName);
-        fprintf(out,
-                "%s        byte[] %sByte = "
-                "%sStr.getBytes(java.nio.charset.StandardCharsets.UTF_8);\n",
-                indent.c_str(), tagName, tagName);
-        fprintf(out, "%s        buff[pos] = STRING_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, %sByte.length);\n", indent.c_str(), tagName);
-        fprintf(out,
-                "%s        System.arraycopy("
-                "%sByte, 0, buff, pos + STRING_TYPE_OVERHEAD, %sByte.length);\n",
-                indent.c_str(), tagName, tagName);
-        fprintf(out, "%s        pos += STRING_TYPE_OVERHEAD + %sByte.length;\n", indent.c_str(),
-                tagName);
-        fprintf(out, "%s    }\n", indent.c_str());
-        fprintf(out, "%s}\n", indent.c_str());
-        fprintf(out, "\n");
-    }
-
-    if (requiredHelpers & JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS) {
-        fprintf(out,
-                "%sprivate static void writeKeyValuePairs(byte[] buff, int pos, "
-                "byte numPairs,\n",
-                indent.c_str());
-        fprintf(out, "%s        final android.util.SparseIntArray intMap,\n", indent.c_str());
-        fprintf(out, "%s        final android.util.SparseLongArray longMap,\n", indent.c_str());
-        fprintf(out, "%s        final android.util.SparseArray<String> stringMap,\n",
-                indent.c_str());
-        fprintf(out, "%s        final android.util.SparseArray<Float> floatMap) {\n",
-                indent.c_str());
-
-        // Start list of lists.
-        fprintf(out, "%s    buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s    buff[pos + 1] = (byte) numPairs;\n", indent.c_str());
-        fprintf(out, "%s    pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-
-        // Write integers.
-        fprintf(out, "%s    final int intMapSize = null == intMap ? 0 : intMap.size();\n",
-                indent.c_str());
-        fprintf(out, "%s    for (int i = 0; i < intMapSize; i++) {\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos + 1] = (byte) 2;\n", indent.c_str());
-        fprintf(out, "%s        pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-        fprintf(out, "%s        final int key = intMap.keyAt(i);\n", indent.c_str());
-        fprintf(out, "%s        final int value = intMap.valueAt(i);\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, key);\n", indent.c_str());
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, value);\n", indent.c_str());
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s    }\n", indent.c_str());
-
-        // Write longs.
-        fprintf(out, "%s    final int longMapSize = null == longMap ? 0 : longMap.size();\n",
-                indent.c_str());
-        fprintf(out, "%s    for (int i = 0; i < longMapSize; i++) {\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos + 1] = (byte) 2;\n", indent.c_str());
-        fprintf(out, "%s        pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-        fprintf(out, "%s        final int key = longMap.keyAt(i);\n", indent.c_str());
-        fprintf(out, "%s        final long value = longMap.valueAt(i);\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, key);\n", indent.c_str());
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = LONG_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyLong(buff, pos + 1, value);\n", indent.c_str());
-        fprintf(out, "%s        pos += LONG_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s    }\n", indent.c_str());
-
-        // Write Strings.
-        fprintf(out,
-                "%s    final int stringMapSize = null == stringMap ? 0 : "
-                "stringMap.size();\n",
-                indent.c_str());
-        fprintf(out, "%s    for (int i = 0; i < stringMapSize; i++) {\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos + 1] = (byte) 2;\n", indent.c_str());
-        fprintf(out, "%s        pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-        fprintf(out, "%s        final int key = stringMap.keyAt(i);\n", indent.c_str());
-        fprintf(out, "%s        final String value = stringMap.valueAt(i);\n", indent.c_str());
-        fprintf(out,
-                "%s        final byte[] valueBytes = "
-                "value.getBytes(java.nio.charset.StandardCharsets.UTF_8);\n",
-                indent.c_str());
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, key);\n", indent.c_str());
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = STRING_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, valueBytes.length);\n", indent.c_str());
-        fprintf(out,
-                "%s        System.arraycopy("
-                "valueBytes, 0, buff, pos + STRING_TYPE_OVERHEAD, "
-                "valueBytes.length);\n",
-                indent.c_str());
-        fprintf(out, "%s        pos += STRING_TYPE_OVERHEAD + valueBytes.length;\n",
-                indent.c_str());
-        fprintf(out, "%s    }\n", indent.c_str());
-
-        // Write floats.
-        fprintf(out,
-                "%s    final int floatMapSize = null == floatMap ? 0 : "
-                "floatMap.size();\n",
-                indent.c_str());
-        fprintf(out, "%s    for (int i = 0; i < floatMapSize; i++) {\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = LIST_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos + 1] = (byte) 2;\n", indent.c_str());
-        fprintf(out, "%s        pos += LIST_TYPE_OVERHEAD;\n", indent.c_str());
-        fprintf(out, "%s        final int key = floatMap.keyAt(i);\n", indent.c_str());
-        fprintf(out, "%s        final float value = floatMap.valueAt(i);\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = INT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyInt(buff, pos + 1, key);\n", indent.c_str());
-        fprintf(out, "%s        pos += INT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s        buff[pos] = FLOAT_TYPE;\n", indent.c_str());
-        fprintf(out, "%s        copyFloat(buff, pos + 1, value);\n", indent.c_str());
-        fprintf(out, "%s        pos += FLOAT_TYPE_SIZE;\n", indent.c_str());
-        fprintf(out, "%s    }\n", indent.c_str());
-        fprintf(out, "%s}\n", indent.c_str());
-        fprintf(out, "\n");
-    }
-}
-
-// This method is called in main.cpp to generate StatsLog for modules that's
-// compatible with Q at compile-time.
-int write_stats_log_java_q_for_module(FILE* out, const Atoms& atoms,
-                                      const AtomDecl& attributionDecl, const string& javaClass,
-                                      const string& javaPackage, const bool supportWorkSource) {
-    // Print prelude
-    fprintf(out, "// This file is autogenerated\n");
-    fprintf(out, "\n");
-    fprintf(out, "package %s;\n", javaPackage.c_str());
-    fprintf(out, "\n");
-    fprintf(out, "import static java.nio.charset.StandardCharsets.UTF_8;\n");
-    fprintf(out, "\n");
-    fprintf(out, "import android.util.StatsLog;\n");
-    fprintf(out, "import android.os.SystemClock;\n");
-    fprintf(out, "\n");
-    fprintf(out, "\n");
-    fprintf(out, "/**\n");
-    fprintf(out, " * Utility class for logging statistics events.\n");
-    fprintf(out, " */\n");
-    fprintf(out, "public class %s {\n", javaClass.c_str());
-
-    write_java_q_logging_constants(out, "    ");
-
-    write_java_atom_codes(out, atoms);
-
-    write_java_enum_values(out, atoms);
-
-    int errors = 0;
-    // Print write methods
-    fprintf(out, "    // Write methods\n");
-    errors += write_java_methods_q_schema(out, atoms.signatureInfoMap, attributionDecl, "    ");
-    errors += write_java_non_chained_methods(out, atoms.nonChainedSignatureInfoMap);
-    if (supportWorkSource) {
-        errors += write_java_work_source_methods(out, atoms.signatureInfoMap);
-    }
-
-    fprintf(out, "}\n");
-
-    return errors;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/java_writer_q.h b/tools/stats_log_api_gen/java_writer_q.h
deleted file mode 100644
index c511a84..0000000
--- a/tools/stats_log_api_gen/java_writer_q.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 <stdio.h>
-#include <string.h>
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "Collation.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using namespace std;
-
-void write_java_q_logging_constants(FILE* out, const string& indent);
-
-int write_java_methods_q_schema(FILE* out, const SignatureInfoMap& signatureInfoMap,
-                                const AtomDecl& attributionDecl, const string& indent);
-
-void write_java_helpers_for_q_schema_methods(FILE* out, const AtomDecl& attributionDecl,
-                                             const int requiredHelpers, const string& indent);
-
-int write_stats_log_java_q_for_module(FILE* out, const Atoms& atoms,
-                                      const AtomDecl& attributionDecl, const string& javaClass,
-                                      const string& javaPackage, const bool supportWorkSource);
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/main.cpp b/tools/stats_log_api_gen/main.cpp
deleted file mode 100644
index 416dfdd..0000000
--- a/tools/stats_log_api_gen/main.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-
-#include <getopt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "Collation.h"
-#include "frameworks/proto_logging/stats/atoms.pb.h"
-#include "java_writer.h"
-#include "java_writer_q.h"
-#include "native_writer.h"
-#include "utils.h"
-
-using namespace google::protobuf;
-using namespace std;
-
-namespace android {
-namespace stats_log_api_gen {
-
-using android::os::statsd::Atom;
-
-static void print_usage() {
-    fprintf(stderr, "usage: stats-log-api-gen OPTIONS\n");
-    fprintf(stderr, "\n");
-    fprintf(stderr, "OPTIONS\n");
-    fprintf(stderr, "  --cpp FILENAME       the header file to output for write helpers\n");
-    fprintf(stderr, "  --header FILENAME    the cpp file to output for write helpers\n");
-    fprintf(stderr, "  --help               this message\n");
-    fprintf(stderr, "  --java FILENAME      the java file to output\n");
-    fprintf(stderr, "  --module NAME        optional, module name to generate outputs for\n");
-    fprintf(stderr,
-            "  --namespace COMMA,SEP,NAMESPACE   required for cpp/header with "
-            "module\n");
-    fprintf(stderr,
-            "                                    comma separated namespace of "
-            "the files\n");
-    fprintf(stderr,
-            "  --importHeader NAME  required for cpp/jni to say which header to "
-            "import "
-            "for write helpers\n");
-    fprintf(stderr, "  --javaPackage PACKAGE             the package for the java file.\n");
-    fprintf(stderr, "                                    required for java with module\n");
-    fprintf(stderr, "  --javaClass CLASS    the class name of the java class.\n");
-    fprintf(stderr, "                       Optional for Java with module.\n");
-    fprintf(stderr, "                       Default is \"StatsLogInternal\"\n");
-    fprintf(stderr, "  --supportQ           Include runtime support for Android Q.\n");
-    fprintf(stderr,
-            "  --worksource         Include support for logging WorkSource "
-            "objects.\n");
-    fprintf(stderr,
-            "  --compileQ           Include compile-time support for Android Q "
-            "(Java only).\n");
-}
-
-/**
- * Do the argument parsing and execute the tasks.
- */
-static int run(int argc, char const* const* argv) {
-    string cppFilename;
-    string headerFilename;
-    string javaFilename;
-    string javaPackage;
-    string javaClass;
-
-    string moduleName = DEFAULT_MODULE_NAME;
-    string cppNamespace = DEFAULT_CPP_NAMESPACE;
-    string cppHeaderImport = DEFAULT_CPP_HEADER_IMPORT;
-    bool supportQ = false;
-    bool supportWorkSource = false;
-    bool compileQ = false;
-
-    int index = 1;
-    while (index < argc) {
-        if (0 == strcmp("--help", argv[index])) {
-            print_usage();
-            return 0;
-        } else if (0 == strcmp("--cpp", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            cppFilename = argv[index];
-        } else if (0 == strcmp("--header", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            headerFilename = argv[index];
-        } else if (0 == strcmp("--java", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            javaFilename = argv[index];
-        } else if (0 == strcmp("--module", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            moduleName = argv[index];
-        } else if (0 == strcmp("--namespace", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            cppNamespace = argv[index];
-        } else if (0 == strcmp("--importHeader", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            cppHeaderImport = argv[index];
-        } else if (0 == strcmp("--javaPackage", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            javaPackage = argv[index];
-        } else if (0 == strcmp("--javaClass", argv[index])) {
-            index++;
-            if (index >= argc) {
-                print_usage();
-                return 1;
-            }
-            javaClass = argv[index];
-        } else if (0 == strcmp("--supportQ", argv[index])) {
-            supportQ = true;
-        } else if (0 == strcmp("--worksource", argv[index])) {
-            supportWorkSource = true;
-        } else if (0 == strcmp("--compileQ", argv[index])) {
-            compileQ = true;
-        }
-
-        index++;
-    }
-
-    if (cppFilename.size() == 0 && headerFilename.size() == 0 && javaFilename.size() == 0) {
-        print_usage();
-        return 1;
-    }
-
-    if (DEFAULT_MODULE_NAME == moduleName && (supportQ || compileQ)) {
-        // Support for Q schema is not needed for default module.
-        fprintf(stderr, "%s cannot support Q schema\n", moduleName.c_str());
-        return 1;
-    }
-
-    if (supportQ && compileQ) {
-        // Runtime Q support is redundant if compile-time Q support is required.
-        fprintf(stderr, "Cannot specify compileQ and supportQ simultaneously.\n");
-        return 1;
-    }
-
-    // Collate the parameters
-    Atoms atoms;
-    int errorCount = collate_atoms(Atom::descriptor(), moduleName, &atoms);
-    if (errorCount != 0) {
-        return 1;
-    }
-
-    AtomDecl attributionDecl;
-    vector<java_type_t> attributionSignature;
-    collate_atom(android::os::statsd::AttributionNode::descriptor(), &attributionDecl,
-                 &attributionSignature);
-
-    // Write the .cpp file
-    if (cppFilename.size() != 0) {
-        FILE* out = fopen(cppFilename.c_str(), "w");
-        if (out == NULL) {
-            fprintf(stderr, "Unable to open file for write: %s\n", cppFilename.c_str());
-            return 1;
-        }
-        // If this is for a specific module, the namespace must also be provided.
-        if (moduleName != DEFAULT_MODULE_NAME && cppNamespace == DEFAULT_CPP_NAMESPACE) {
-            fprintf(stderr, "Must supply --namespace if supplying a specific module\n");
-            return 1;
-        }
-        // If this is for a specific module, the header file to import must also be
-        // provided.
-        if (moduleName != DEFAULT_MODULE_NAME && cppHeaderImport == DEFAULT_CPP_HEADER_IMPORT) {
-            fprintf(stderr, "Must supply --headerImport if supplying a specific module\n");
-            return 1;
-        }
-        errorCount = android::stats_log_api_gen::write_stats_log_cpp(
-                out, atoms, attributionDecl, cppNamespace, cppHeaderImport, supportQ);
-        fclose(out);
-    }
-
-    // Write the .h file
-    if (headerFilename.size() != 0) {
-        FILE* out = fopen(headerFilename.c_str(), "w");
-        if (out == NULL) {
-            fprintf(stderr, "Unable to open file for write: %s\n", headerFilename.c_str());
-            return 1;
-        }
-        // If this is for a specific module, the namespace must also be provided.
-        if (moduleName != DEFAULT_MODULE_NAME && cppNamespace == DEFAULT_CPP_NAMESPACE) {
-            fprintf(stderr, "Must supply --namespace if supplying a specific module\n");
-        }
-        errorCount = android::stats_log_api_gen::write_stats_log_header(out, atoms, attributionDecl,
-                                                                        cppNamespace);
-        fclose(out);
-    }
-
-    // Write the .java file
-    if (javaFilename.size() != 0) {
-        if (javaClass.size() == 0) {
-            fprintf(stderr, "Must supply --javaClass if supplying a Java filename");
-            return 1;
-        }
-
-        if (javaPackage.size() == 0) {
-            fprintf(stderr, "Must supply --javaPackage if supplying a Java filename");
-            return 1;
-        }
-
-        if (moduleName.size() == 0) {
-            fprintf(stderr, "Must supply --module if supplying a Java filename");
-            return 1;
-        }
-
-        FILE* out = fopen(javaFilename.c_str(), "w");
-        if (out == NULL) {
-            fprintf(stderr, "Unable to open file for write: %s\n", javaFilename.c_str());
-            return 1;
-        }
-
-        if (compileQ) {
-            errorCount = android::stats_log_api_gen::write_stats_log_java_q_for_module(
-                    out, atoms, attributionDecl, javaClass, javaPackage, supportWorkSource);
-        } else {
-            errorCount = android::stats_log_api_gen::write_stats_log_java(
-                    out, atoms, attributionDecl, javaClass, javaPackage, supportQ,
-                    supportWorkSource);
-        }
-
-        fclose(out);
-    }
-
-    return errorCount;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
-
-/**
- * Main.
- */
-int main(int argc, char const* const* argv) {
-    GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-    return android::stats_log_api_gen::run(argc, argv);
-}
diff --git a/tools/stats_log_api_gen/native_writer.cpp b/tools/stats_log_api_gen/native_writer.cpp
deleted file mode 100644
index 0c6c009..0000000
--- a/tools/stats_log_api_gen/native_writer.cpp
+++ /dev/null
@@ -1,355 +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 "native_writer.h"
-
-#include "utils.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-static void write_native_annotation_constants(FILE* out) {
-    fprintf(out, "// Annotation constants.\n");
-
-    for (const auto& [id, name] : ANNOTATION_ID_CONSTANTS) {
-        fprintf(out, "const uint8_t %s = %hhu;\n", name.c_str(), id);
-    }
-    fprintf(out, "\n");
-}
-
-static void write_annotations(FILE* out, int argIndex,
-                              const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet,
-                              const string& methodPrefix, const string& methodSuffix) {
-    FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt =
-            fieldNumberToAtomDeclSet.find(argIndex);
-    if (fieldNumberToAtomDeclSet.end() == fieldNumberToAtomDeclSetIt) {
-        return;
-    }
-    const AtomDeclSet& atomDeclSet = fieldNumberToAtomDeclSetIt->second;
-    for (const shared_ptr<AtomDecl>& atomDecl : atomDeclSet) {
-        const string atomConstant = make_constant_name(atomDecl->name);
-        fprintf(out, "    if (%s == code) {\n", atomConstant.c_str());
-        const AnnotationSet& annotations = atomDecl->fieldNumberToAnnotations.at(argIndex);
-        int resetState = -1;
-        int defaultState = -1;
-        for (const shared_ptr<Annotation>& annotation : annotations) {
-            const string& annotationConstant = ANNOTATION_ID_CONSTANTS.at(annotation->annotationId);
-            switch (annotation->type) {
-                case ANNOTATION_TYPE_INT:
-                    if (ANNOTATION_ID_TRIGGER_STATE_RESET == annotation->annotationId) {
-                        resetState = annotation->value.intValue;
-                    } else if (ANNOTATION_ID_DEFAULT_STATE == annotation->annotationId) {
-                        defaultState = annotation->value.intValue;
-                    } else {
-                        fprintf(out, "        %saddInt32Annotation(%s%s, %d);\n",
-                                methodPrefix.c_str(), methodSuffix.c_str(),
-                                annotationConstant.c_str(), annotation->value.intValue);
-                    }
-                    break;
-                case ANNOTATION_TYPE_BOOL:
-                    // TODO(b/151786433): Write annotation constant name instead of
-                    // annotation id literal.
-                    fprintf(out, "        %saddBoolAnnotation(%s%s, %s);\n", methodPrefix.c_str(),
-                            methodSuffix.c_str(), annotationConstant.c_str(),
-                            annotation->value.boolValue ? "true" : "false");
-                    break;
-                default:
-                    break;
-            }
-        }
-        if (defaultState != -1 && resetState != -1) {
-            const string& annotationConstant =
-                    ANNOTATION_ID_CONSTANTS.at(ANNOTATION_ID_TRIGGER_STATE_RESET);
-            fprintf(out, "        if (arg%d == %d) {\n", argIndex, resetState);
-            fprintf(out, "            %saddInt32Annotation(%s%s, %d);\n", methodPrefix.c_str(),
-                    methodSuffix.c_str(), annotationConstant.c_str(), defaultState);
-            fprintf(out, "        }\n");
-        }
-        fprintf(out, "    }\n");
-    }
-}
-
-static int write_native_stats_write_methods(FILE* out, const Atoms& atoms,
-                                            const AtomDecl& attributionDecl, const bool supportQ) {
-    fprintf(out, "\n");
-    for (auto signatureInfoMapIt = atoms.signatureInfoMap.begin();
-         signatureInfoMapIt != atoms.signatureInfoMap.end(); signatureInfoMapIt++) {
-        vector<java_type_t> signature = signatureInfoMapIt->first;
-        const FieldNumberToAtomDeclSet& fieldNumberToAtomDeclSet = signatureInfoMapIt->second;
-        // Key value pairs not supported in native.
-        if (find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) != signature.end()) {
-            continue;
-        }
-        write_native_method_signature(out, "int stats_write", signature, attributionDecl, " {");
-
-        int argIndex = 1;
-        if (supportQ) {
-            fprintf(out, "    StatsEventCompat event;\n");
-            fprintf(out, "    event.setAtomId(code);\n");
-            write_annotations(out, ATOM_ID_FIELD_NUMBER, fieldNumberToAtomDeclSet, "event.", "");
-            for (vector<java_type_t>::const_iterator arg = signature.begin();
-                 arg != signature.end(); arg++) {
-                switch (*arg) {
-                    case JAVA_TYPE_ATTRIBUTION_CHAIN: {
-                        const char* uidName = attributionDecl.fields.front().name.c_str();
-                        const char* tagName = attributionDecl.fields.back().name.c_str();
-                        fprintf(out, "    event.writeAttributionChain(%s, %s_length, %s);\n",
-                                uidName, uidName, tagName);
-                        break;
-                    }
-                    case JAVA_TYPE_BYTE_ARRAY:
-                        fprintf(out, "    event.writeByteArray(arg%d.arg, arg%d.arg_length);\n",
-                                argIndex, argIndex);
-                        break;
-                    case JAVA_TYPE_BOOLEAN:
-                        fprintf(out, "    event.writeBool(arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_INT:  // Fall through.
-                    case JAVA_TYPE_ENUM:
-                        fprintf(out, "    event.writeInt32(arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_FLOAT:
-                        fprintf(out, "    event.writeFloat(arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_LONG:
-                        fprintf(out, "    event.writeInt64(arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_STRING:
-                        fprintf(out, "    event.writeString(arg%d);\n", argIndex);
-                        break;
-                    default:
-                        // Unsupported types: OBJECT, DOUBLE, KEY_VALUE_PAIRS.
-                        fprintf(stderr, "Encountered unsupported type.");
-                        return 1;
-                }
-                write_annotations(out, argIndex, fieldNumberToAtomDeclSet, "event.", "");
-                argIndex++;
-            }
-            fprintf(out, "    return event.writeToSocket();\n");
-        } else {
-            fprintf(out, "    AStatsEvent* event = AStatsEvent_obtain();\n");
-            fprintf(out, "    AStatsEvent_setAtomId(event, code);\n");
-            write_annotations(out, ATOM_ID_FIELD_NUMBER, fieldNumberToAtomDeclSet, "AStatsEvent_",
-                              "event, ");
-            for (vector<java_type_t>::const_iterator arg = signature.begin();
-                 arg != signature.end(); arg++) {
-                switch (*arg) {
-                    case JAVA_TYPE_ATTRIBUTION_CHAIN: {
-                        const char* uidName = attributionDecl.fields.front().name.c_str();
-                        const char* tagName = attributionDecl.fields.back().name.c_str();
-                        fprintf(out,
-                                "    AStatsEvent_writeAttributionChain(event, "
-                                "reinterpret_cast<const uint32_t*>(%s), %s.data(), "
-                                "static_cast<uint8_t>(%s_length));\n",
-                                uidName, tagName, uidName);
-                        break;
-                    }
-                    case JAVA_TYPE_BYTE_ARRAY:
-                        fprintf(out,
-                                "    AStatsEvent_writeByteArray(event, "
-                                "reinterpret_cast<const uint8_t*>(arg%d.arg), "
-                                "arg%d.arg_length);\n",
-                                argIndex, argIndex);
-                        break;
-                    case JAVA_TYPE_BOOLEAN:
-                        fprintf(out, "    AStatsEvent_writeBool(event, arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_INT:  // Fall through.
-                    case JAVA_TYPE_ENUM:
-                        fprintf(out, "    AStatsEvent_writeInt32(event, arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_FLOAT:
-                        fprintf(out, "    AStatsEvent_writeFloat(event, arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_LONG:
-                        fprintf(out, "    AStatsEvent_writeInt64(event, arg%d);\n", argIndex);
-                        break;
-                    case JAVA_TYPE_STRING:
-                        fprintf(out, "    AStatsEvent_writeString(event, arg%d);\n", argIndex);
-                        break;
-                    default:
-                        // Unsupported types: OBJECT, DOUBLE, KEY_VALUE_PAIRS
-                        fprintf(stderr, "Encountered unsupported type.");
-                        return 1;
-                }
-                write_annotations(out, argIndex, fieldNumberToAtomDeclSet, "AStatsEvent_",
-                                  "event, ");
-                argIndex++;
-            }
-            fprintf(out, "    const int ret = AStatsEvent_write(event);\n");
-            fprintf(out, "    AStatsEvent_release(event);\n");
-            fprintf(out, "    return ret;\n");
-        }
-        fprintf(out, "}\n\n");
-    }
-    return 0;
-}
-
-static void write_native_stats_write_non_chained_methods(FILE* out, const Atoms& atoms,
-                                                         const AtomDecl& attributionDecl) {
-    fprintf(out, "\n");
-    for (auto signature_it = atoms.nonChainedSignatureInfoMap.begin();
-         signature_it != atoms.nonChainedSignatureInfoMap.end(); signature_it++) {
-        vector<java_type_t> signature = signature_it->first;
-        // Key value pairs not supported in native.
-        if (find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) != signature.end()) {
-            continue;
-        }
-
-        write_native_method_signature(out, "int stats_write_non_chained", signature,
-                                      attributionDecl, " {");
-
-        vector<java_type_t> newSignature;
-
-        // First two args form the attribution node so size goes down by 1.
-        newSignature.reserve(signature.size() - 1);
-
-        // First arg is Attribution Chain.
-        newSignature.push_back(JAVA_TYPE_ATTRIBUTION_CHAIN);
-
-        // Followed by the originial signature except the first 2 args.
-        newSignature.insert(newSignature.end(), signature.begin() + 2, signature.end());
-
-        const char* uidName = attributionDecl.fields.front().name.c_str();
-        const char* tagName = attributionDecl.fields.back().name.c_str();
-        fprintf(out, "    const int32_t* %s = &arg1;\n", uidName);
-        fprintf(out, "    const size_t %s_length = 1;\n", uidName);
-        fprintf(out, "    const std::vector<char const*> %s(1, arg2);\n", tagName);
-        fprintf(out, "    return ");
-        write_native_method_call(out, "stats_write", newSignature, attributionDecl, 2);
-
-        fprintf(out, "}\n\n");
-    }
-}
-
-static void write_native_method_header(FILE* out, const string& methodName,
-                                       const SignatureInfoMap& signatureInfoMap,
-                                       const AtomDecl& attributionDecl) {
-    for (auto signatureInfoMapIt = signatureInfoMap.begin();
-         signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
-        vector<java_type_t> signature = signatureInfoMapIt->first;
-
-        // Key value pairs not supported in native.
-        if (find(signature.begin(), signature.end(), JAVA_TYPE_KEY_VALUE_PAIR) != signature.end()) {
-            continue;
-        }
-        write_native_method_signature(out, methodName, signature, attributionDecl, ";");
-    }
-}
-
-int write_stats_log_cpp(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                        const string& cppNamespace, const string& importHeader,
-                        const bool supportQ) {
-    // Print prelude
-    fprintf(out, "// This file is autogenerated\n");
-    fprintf(out, "\n");
-
-    fprintf(out, "#include <%s>\n", importHeader.c_str());
-    if (supportQ) {
-        fprintf(out, "#include <StatsEventCompat.h>\n");
-    } else {
-        fprintf(out, "#include <stats_event.h>\n");
-    }
-
-    fprintf(out, "\n");
-    write_namespace(out, cppNamespace);
-
-    write_native_stats_write_methods(out, atoms, attributionDecl, supportQ);
-    write_native_stats_write_non_chained_methods(out, atoms, attributionDecl);
-
-    // Print footer
-    fprintf(out, "\n");
-    write_closing_namespace(out, cppNamespace);
-
-    return 0;
-}
-
-int write_stats_log_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                           const string& cppNamespace) {
-    // Print prelude
-    fprintf(out, "// This file is autogenerated\n");
-    fprintf(out, "\n");
-    fprintf(out, "#pragma once\n");
-    fprintf(out, "\n");
-    fprintf(out, "#include <stdint.h>\n");
-    fprintf(out, "#include <vector>\n");
-    fprintf(out, "#include <map>\n");
-    fprintf(out, "#include <set>\n");
-    fprintf(out, "\n");
-
-    write_namespace(out, cppNamespace);
-    fprintf(out, "\n");
-    fprintf(out, "/*\n");
-    fprintf(out, " * API For logging statistics events.\n");
-    fprintf(out, " */\n");
-    fprintf(out, "\n");
-
-    write_native_atom_constants(out, atoms, attributionDecl);
-
-    // Print constants for the enum values.
-    fprintf(out, "//\n");
-    fprintf(out, "// Constants for enum values\n");
-    fprintf(out, "//\n\n");
-    for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
-         atomIt++) {
-        for (vector<AtomField>::const_iterator field = (*atomIt)->fields.begin();
-             field != (*atomIt)->fields.end(); field++) {
-            if (field->javaType == JAVA_TYPE_ENUM) {
-                fprintf(out, "// Values for %s.%s\n", (*atomIt)->message.c_str(),
-                        field->name.c_str());
-                for (map<int, string>::const_iterator value = field->enumValues.begin();
-                     value != field->enumValues.end(); value++) {
-                    fprintf(out, "const int32_t %s__%s__%s = %d;\n",
-                            make_constant_name((*atomIt)->message).c_str(),
-                            make_constant_name(field->name).c_str(),
-                            make_constant_name(value->second).c_str(), value->first);
-                }
-                fprintf(out, "\n");
-            }
-        }
-    }
-
-    write_native_annotation_constants(out);
-
-    fprintf(out, "struct BytesField {\n");
-    fprintf(out,
-            "  BytesField(char const* array, size_t len) : arg(array), "
-            "arg_length(len) {}\n");
-    fprintf(out, "  char const* arg;\n");
-    fprintf(out, "  size_t arg_length;\n");
-    fprintf(out, "};\n");
-    fprintf(out, "\n");
-
-    // Print write methods
-    fprintf(out, "//\n");
-    fprintf(out, "// Write methods\n");
-    fprintf(out, "//\n");
-    write_native_method_header(out, "int stats_write", atoms.signatureInfoMap, attributionDecl);
-
-    fprintf(out, "//\n");
-    fprintf(out, "// Write flattened methods\n");
-    fprintf(out, "//\n");
-    write_native_method_header(out, "int stats_write_non_chained", atoms.nonChainedSignatureInfoMap,
-                               attributionDecl);
-
-    fprintf(out, "\n");
-    write_closing_namespace(out, cppNamespace);
-
-    return 0;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/native_writer.h b/tools/stats_log_api_gen/native_writer.h
deleted file mode 100644
index 264d4db..0000000
--- a/tools/stats_log_api_gen/native_writer.h
+++ /dev/null
@@ -1,37 +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 <stdio.h>
-#include <string.h>
-
-#include "Collation.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using namespace std;
-
-int write_stats_log_cpp(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                        const string& cppNamespace, const string& importHeader,
-                        const bool supportQ);
-
-int write_stats_log_header(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl,
-                           const string& cppNamespace);
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/test.proto b/tools/stats_log_api_gen/test.proto
deleted file mode 100644
index a3ea785..0000000
--- a/tools/stats_log_api_gen/test.proto
+++ /dev/null
@@ -1,215 +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";
-
-import "frameworks/proto_logging/stats/atoms.proto";
-import "frameworks/proto_logging/stats/atom_field_options.proto";
-
-package android.stats_log_api_gen;
-
-message IntAtom {
-    optional int32 field1 = 1;
-}
-
-message AnotherIntAtom {
-    optional int32 field1 = 1;
-}
-
-message OutOfOrderAtom {
-    optional int32 field2 = 2;
-    optional int32 field1 = 1;
-}
-
-enum AnEnum {
-    VALUE0 = 0;
-    VALUE1 = 1;
-}
-
-message AllTypesAtom {
-  repeated android.os.statsd.AttributionNode attribution_chain = 1;
-  optional float float_field = 2;
-  optional int64 int64_field = 3;
-  optional uint64 uint64_field = 4;
-  optional int32 int32_field = 5;
-  optional fixed64 fixed64_field = 6;
-  optional fixed32 fixed32_field = 7;
-  optional bool bool_field = 8;
-  optional string string_field = 9;
-  optional uint32 uint32_field = 10;
-  optional AnEnum enum_field = 11;
-  optional sfixed32 sfixed32_field = 12;
-  optional sfixed64 sfixed64_field = 13;
-  optional sint32 sint32_field = 14;
-  optional sint64 sint64_field = 15;
-}
-
-message Event {
-    oneof event {
-        OutOfOrderAtom out_of_order_atom = 2;
-        IntAtom int_atom = 1;
-        AnotherIntAtom another_int_atom = 3;
-        AllTypesAtom all_types_atom = 4;
-    }
-}
-
-message BadTypesAtom {
-    optional IntAtom bad_int_atom = 1;
-    optional bytes bad_bytes = 2;
-    repeated int32 repeated_field = 3;
-    optional double double_field = 4;
-}
-
-message BadTypesEvent {
-    oneof event {
-        BadTypesAtom bad_types_atom = 1;
-    }
-}
-
-message BadSkippedFieldSingleAtom {
-    optional int32 field2 = 2;
-}
-
-message BadSkippedFieldSingle {
-    oneof event {
-        BadSkippedFieldSingleAtom bad = 1;
-    }
-}
-
-message BadSkippedFieldMultipleAtom {
-    optional int32 field1 = 1;
-    optional int32 field3 = 3;
-    optional int32 field5 = 5;
-}
-
-message BadSkippedFieldMultiple {
-    oneof event {
-        BadSkippedFieldMultipleAtom bad = 1;
-    }
-}
-
-message BadAttributionNodePositionAtom {
-  optional int32 field1 = 1;
-  repeated android.os.statsd.AttributionNode attribution = 2;
-}
-
-message BadAttributionNodePosition {
-  oneof event { BadAttributionNodePositionAtom bad = 1; }
-}
-
-message GoodEventWithBinaryFieldAtom {
-    oneof event { GoodBinaryFieldAtom field1 = 1; }
-}
-
-message ComplexField {
-    optional string str = 1;
-}
-
-message GoodBinaryFieldAtom {
-    optional int32 field1 = 1;
-    optional ComplexField bf = 2 [(android.os.statsd.log_mode) = MODE_BYTES];
-}
-
-message BadEventWithBinaryFieldAtom {
-    oneof event { BadBinaryFieldAtom field1 = 1; }
-}
-
-message BadBinaryFieldAtom {
-    optional int32 field1 = 1;
-    optional ComplexField bf = 2;
-}
-
-message BadStateAtoms {
-    oneof event {
-        BadStateAtom1 bad1 = 1;
-        BadStateAtom2 bad2 = 2;
-        BadStateAtom3 bad3 = 3;
-    }
-}
-
-message GoodStateAtoms {
-    oneof event {
-        GoodStateAtom1 good1 = 1;
-        GoodStateAtom2 good2 = 2;
-    }
-}
-
-// The atom has only primary field but no exclusive state field.
-message BadStateAtom1 {
-    optional int32 uid = 1 [(android.os.statsd.state_field_option).primary_field = true];
-}
-
-// Only primative types can be annotated.
-message BadStateAtom2 {
-    repeated android.os.statsd.AttributionNode attribution = 1
-            [(android.os.statsd.state_field_option).primary_field = true];
-    optional int32 state = 2 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-// Having 2 exclusive state field in the atom means the atom is badly designed.
-// E.g., putting bluetooth state and wifi state in the same atom.
-message BadStateAtom3 {
-    optional int32 uid = 1 [(android.os.statsd.state_field_option).primary_field = true];
-    optional int32 state = 2 [(android.os.statsd.state_field_option).exclusive_state = true];
-    optional int32 state2 = 3 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-message GoodStateAtom1 {
-    optional int32 uid = 1 [(android.os.statsd.state_field_option).primary_field = true];
-    optional int32 state = 2 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-// Atoms can have exclusive state field, but no primary field. That means
-// the state is globally exclusive (e.g., DisplayState).
-message GoodStateAtom2 {
-    optional int32 uid = 1;
-    optional int32 state = 2 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-// We can have more than one primary fields. That means their combination is a
-// primary key.
-message GoodStateAtom3 {
-    optional int32 uid = 1 [(android.os.statsd.state_field_option).primary_field = true];
-    optional int32 tid = 2 [(android.os.statsd.state_field_option).primary_field = true];
-    optional int32 state = 3 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-message ModuleOneAtom {
-    optional int32 field = 1 [(android.os.statsd.is_uid) = true];
-}
-
-message ModuleTwoAtom {
-    optional int32 field = 1;
-}
-
-message ModuleOneAndTwoAtom {
-    optional int32 field = 1 [(android.os.statsd.state_field_option).exclusive_state = true];
-}
-
-message NoModuleAtom {
-    optional string field = 1;
-}
-
-message ModuleAtoms {
-    oneof event {
-        ModuleOneAtom module_one_atom = 1 [(android.os.statsd.module) = "module1"];
-        ModuleTwoAtom module_two_atom = 2 [(android.os.statsd.module) = "module2"];
-        ModuleOneAndTwoAtom module_one_and_two_atom = 3 [
-                (android.os.statsd.module) = "module1", (android.os.statsd.module) = "module2"
-        ];
-        NoModuleAtom no_module_atom = 4;
-    }
-}
diff --git a/tools/stats_log_api_gen/test_collation.cpp b/tools/stats_log_api_gen/test_collation.cpp
deleted file mode 100644
index dbae588..0000000
--- a/tools/stats_log_api_gen/test_collation.cpp
+++ /dev/null
@@ -1,369 +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 "Collation.h"
-#include "frameworks/base/tools/stats_log_api_gen/test.pb.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using std::map;
-using std::set;
-using std::vector;
-
-/**
- * Return whether the map contains a vector of the elements provided.
- */
-static bool map_contains_vector(const SignatureInfoMap& s, int count, ...) {
-    va_list args;
-    vector<java_type_t> v;
-
-    va_start(args, count);
-    for (int i = 0; i < count; i++) {
-        v.push_back((java_type_t)va_arg(args, int));
-    }
-    va_end(args);
-
-    return s.find(v) != s.end();
-}
-
-/**
- * Expect that the provided map contains the elements provided.
- */
-#define EXPECT_MAP_CONTAINS_SIGNATURE(s, ...)                    \
-    do {                                                         \
-        int count = sizeof((int[]){__VA_ARGS__}) / sizeof(int);  \
-        EXPECT_TRUE(map_contains_vector(s, count, __VA_ARGS__)); \
-    } while (0)
-
-/** Expects that the provided atom has no enum values for any field. */
-#define EXPECT_NO_ENUM_FIELD(atom)                                           \
-    do {                                                                     \
-        for (vector<AtomField>::const_iterator field = atom->fields.begin(); \
-             field != atom->fields.end(); field++) {                         \
-            EXPECT_TRUE(field->enumValues.empty());                          \
-        }                                                                    \
-    } while (0)
-
-/** Expects that exactly one specific field has expected enum values. */
-#define EXPECT_HAS_ENUM_FIELD(atom, field_name, values)                      \
-    do {                                                                     \
-        for (vector<AtomField>::const_iterator field = atom->fields.begin(); \
-             field != atom->fields.end(); field++) {                         \
-            if (field->name == field_name) {                                 \
-                EXPECT_EQ(field->enumValues, values);                        \
-            } else {                                                         \
-                EXPECT_TRUE(field->enumValues.empty());                      \
-            }                                                                \
-        }                                                                    \
-    } while (0)
-
-/**
- * Test a correct collation, with all the types.
- */
-TEST(CollationTest, CollateStats) {
-    Atoms atoms;
-    int errorCount = collate_atoms(Event::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(0, errorCount);
-    EXPECT_EQ(3ul, atoms.signatureInfoMap.size());
-
-    // IntAtom, AnotherIntAtom
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
-
-    // OutOfOrderAtom
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT, JAVA_TYPE_INT);
-
-    // AllTypesAtom
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap,
-                                  JAVA_TYPE_ATTRIBUTION_CHAIN,  // AttributionChain
-                                  JAVA_TYPE_FLOAT,              // float
-                                  JAVA_TYPE_LONG,               // int64
-                                  JAVA_TYPE_LONG,               // uint64
-                                  JAVA_TYPE_INT,                // int32
-                                  JAVA_TYPE_LONG,               // fixed64
-                                  JAVA_TYPE_INT,                // fixed32
-                                  JAVA_TYPE_BOOLEAN,            // bool
-                                  JAVA_TYPE_STRING,             // string
-                                  JAVA_TYPE_INT,                // uint32
-                                  JAVA_TYPE_INT,                // AnEnum
-                                  JAVA_TYPE_INT,                // sfixed32
-                                  JAVA_TYPE_LONG,               // sfixed64
-                                  JAVA_TYPE_INT,                // sint32
-                                  JAVA_TYPE_LONG                // sint64
-    );
-
-    EXPECT_EQ(4ul, atoms.decls.size());
-
-    AtomDeclSet::const_iterator atomIt = atoms.decls.begin();
-    EXPECT_EQ(1, (*atomIt)->code);
-    EXPECT_EQ("int_atom", (*atomIt)->name);
-    EXPECT_EQ("IntAtom", (*atomIt)->message);
-    EXPECT_NO_ENUM_FIELD((*atomIt));
-    atomIt++;
-
-    EXPECT_EQ(2, (*atomIt)->code);
-    EXPECT_EQ("out_of_order_atom", (*atomIt)->name);
-    EXPECT_EQ("OutOfOrderAtom", (*atomIt)->message);
-    EXPECT_NO_ENUM_FIELD((*atomIt));
-    atomIt++;
-
-    EXPECT_EQ(3, (*atomIt)->code);
-    EXPECT_EQ("another_int_atom", (*atomIt)->name);
-    EXPECT_EQ("AnotherIntAtom", (*atomIt)->message);
-    EXPECT_NO_ENUM_FIELD((*atomIt));
-    atomIt++;
-
-    EXPECT_EQ(4, (*atomIt)->code);
-    EXPECT_EQ("all_types_atom", (*atomIt)->name);
-    EXPECT_EQ("AllTypesAtom", (*atomIt)->message);
-    map<int, string> enumValues;
-    enumValues[0] = "VALUE0";
-    enumValues[1] = "VALUE1";
-    EXPECT_HAS_ENUM_FIELD((*atomIt), "enum_field", enumValues);
-    atomIt++;
-
-    EXPECT_EQ(atoms.decls.end(), atomIt);
-}
-
-/**
- * Test that event class that contains stuff other than the atoms is rejected.
- */
-TEST(CollationTest, NonMessageTypeFails) {
-    Atoms atoms;
-    int errorCount = collate_atoms(IntAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(1, errorCount);
-}
-
-/**
- * Test that atoms that have non-primitive types or repeated fields are
- * rejected.
- */
-TEST(CollationTest, FailOnBadTypes) {
-    Atoms atoms;
-    int errorCount = collate_atoms(BadTypesEvent::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(4, errorCount);
-}
-
-/**
- * Test that atoms that skip field numbers (in the first position) are rejected.
- */
-TEST(CollationTest, FailOnSkippedFieldsSingle) {
-    Atoms atoms;
-    int errorCount =
-            collate_atoms(BadSkippedFieldSingle::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(1, errorCount);
-}
-
-/**
- * Test that atoms that skip field numbers (not in the first position, and
- * multiple times) are rejected.
- */
-TEST(CollationTest, FailOnSkippedFieldsMultiple) {
-    Atoms atoms;
-    int errorCount =
-            collate_atoms(BadSkippedFieldMultiple::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(2, errorCount);
-}
-
-/**
- * Test that atoms that have an attribution chain not in the first position are
- * rejected.
- */
-TEST(CollationTest, FailBadAttributionNodePosition) {
-    Atoms atoms;
-    int errorCount =
-            collate_atoms(BadAttributionNodePosition::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(1, errorCount);
-}
-
-TEST(CollationTest, FailOnBadStateAtomOptions) {
-    Atoms atoms;
-    int errorCount = collate_atoms(BadStateAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-
-    EXPECT_EQ(3, errorCount);
-}
-
-TEST(CollationTest, PassOnGoodStateAtomOptions) {
-    Atoms atoms;
-    int errorCount = collate_atoms(GoodStateAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-    EXPECT_EQ(0, errorCount);
-}
-
-TEST(CollationTest, PassOnGoodBinaryFieldAtom) {
-    Atoms atoms;
-    int errorCount =
-            collate_atoms(GoodEventWithBinaryFieldAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-    EXPECT_EQ(0, errorCount);
-}
-
-TEST(CollationTest, FailOnBadBinaryFieldAtom) {
-    Atoms atoms;
-    int errorCount =
-            collate_atoms(BadEventWithBinaryFieldAtom::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-    EXPECT_TRUE(errorCount > 0);
-}
-
-TEST(CollationTest, PassOnLogFromModuleAtom) {
-    Atoms atoms;
-    int errorCount = collate_atoms(ModuleAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-    EXPECT_EQ(errorCount, 0);
-    EXPECT_EQ(atoms.decls.size(), 4ul);
-}
-
-TEST(CollationTest, RecognizeModuleAtom) {
-    Atoms atoms;
-    int errorCount = collate_atoms(ModuleAtoms::descriptor(), DEFAULT_MODULE_NAME, &atoms);
-    EXPECT_EQ(errorCount, 0);
-    EXPECT_EQ(atoms.decls.size(), 4ul);
-    EXPECT_EQ(atoms.signatureInfoMap.size(), 2u);
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_STRING);
-
-    SignatureInfoMap::const_iterator signatureInfoMapIt;
-    const vector<java_type_t>* signature;
-    const FieldNumberToAtomDeclSet* fieldNumberToAtomDeclSet;
-    FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt;
-    const AtomDeclSet* atomDeclSet;
-    AtomDeclSet::const_iterator atomDeclSetIt;
-    AtomDecl* atomDecl;
-    FieldNumberToAnnotations* fieldNumberToAnnotations;
-    FieldNumberToAnnotations::const_iterator fieldNumberToAnnotationsIt;
-    const AnnotationSet* annotationSet;
-    AnnotationSet::const_iterator annotationSetIt;
-    Annotation* annotation;
-
-    signatureInfoMapIt = atoms.signatureInfoMap.begin();
-    signature = &(signatureInfoMapIt->first);
-    fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
-    EXPECT_EQ(1ul, signature->size());
-    EXPECT_EQ(JAVA_TYPE_INT, signature->at(0));
-    EXPECT_EQ(1ul, fieldNumberToAtomDeclSet->size());
-    fieldNumberToAtomDeclSetIt = fieldNumberToAtomDeclSet->begin();
-    EXPECT_EQ(1, fieldNumberToAtomDeclSetIt->first);
-    atomDeclSet = &fieldNumberToAtomDeclSetIt->second;
-    EXPECT_EQ(2ul, atomDeclSet->size());
-    atomDeclSetIt = atomDeclSet->begin();
-    atomDecl = atomDeclSetIt->get();
-    EXPECT_EQ(1, atomDecl->code);
-    fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
-    fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
-    EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
-    annotationSet = &fieldNumberToAnnotationsIt->second;
-    EXPECT_EQ(1ul, annotationSet->size());
-    annotationSetIt = annotationSet->begin();
-    annotation = annotationSetIt->get();
-    EXPECT_EQ(ANNOTATION_ID_IS_UID, annotation->annotationId);
-    EXPECT_EQ(1, annotation->atomId);
-    EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
-    EXPECT_TRUE(annotation->value.boolValue);
-
-    atomDeclSetIt++;
-    atomDecl = atomDeclSetIt->get();
-    EXPECT_EQ(3, atomDecl->code);
-    fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
-    fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
-    EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
-    annotationSet = &fieldNumberToAnnotationsIt->second;
-    EXPECT_EQ(1ul, annotationSet->size());
-    annotationSetIt = annotationSet->begin();
-    annotation = annotationSetIt->get();
-    EXPECT_EQ(ANNOTATION_ID_EXCLUSIVE_STATE, annotation->annotationId);
-    EXPECT_EQ(3, annotation->atomId);
-    EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
-    EXPECT_TRUE(annotation->value.boolValue);
-
-    signatureInfoMapIt++;
-    signature = &signatureInfoMapIt->first;
-    fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
-    EXPECT_EQ(1ul, signature->size());
-    EXPECT_EQ(JAVA_TYPE_STRING, signature->at(0));
-    EXPECT_EQ(0ul, fieldNumberToAtomDeclSet->size());
-}
-
-TEST(CollationTest, RecognizeModule1Atom) {
-    Atoms atoms;
-    const string moduleName = "module1";
-    int errorCount = collate_atoms(ModuleAtoms::descriptor(), moduleName, &atoms);
-    EXPECT_EQ(errorCount, 0);
-    EXPECT_EQ(atoms.decls.size(), 2ul);
-    EXPECT_EQ(atoms.signatureInfoMap.size(), 1u);
-    EXPECT_MAP_CONTAINS_SIGNATURE(atoms.signatureInfoMap, JAVA_TYPE_INT);
-
-    SignatureInfoMap::const_iterator signatureInfoMapIt;
-    const vector<java_type_t>* signature;
-    const FieldNumberToAtomDeclSet* fieldNumberToAtomDeclSet;
-    FieldNumberToAtomDeclSet::const_iterator fieldNumberToAtomDeclSetIt;
-    const AtomDeclSet* atomDeclSet;
-    AtomDeclSet::const_iterator atomDeclSetIt;
-    AtomDecl* atomDecl;
-    FieldNumberToAnnotations* fieldNumberToAnnotations;
-    FieldNumberToAnnotations::const_iterator fieldNumberToAnnotationsIt;
-    const AnnotationSet* annotationSet;
-    AnnotationSet::const_iterator annotationSetIt;
-    Annotation* annotation;
-
-    signatureInfoMapIt = atoms.signatureInfoMap.begin();
-    signature = &(signatureInfoMapIt->first);
-    fieldNumberToAtomDeclSet = &signatureInfoMapIt->second;
-    EXPECT_EQ(1ul, signature->size());
-    EXPECT_EQ(JAVA_TYPE_INT, signature->at(0));
-    EXPECT_EQ(1ul, fieldNumberToAtomDeclSet->size());
-    fieldNumberToAtomDeclSetIt = fieldNumberToAtomDeclSet->begin();
-    EXPECT_EQ(1, fieldNumberToAtomDeclSetIt->first);
-    atomDeclSet = &fieldNumberToAtomDeclSetIt->second;
-    EXPECT_EQ(2ul, atomDeclSet->size());
-    atomDeclSetIt = atomDeclSet->begin();
-    atomDecl = atomDeclSetIt->get();
-    EXPECT_EQ(1, atomDecl->code);
-    fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
-    fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
-    EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
-    annotationSet = &fieldNumberToAnnotationsIt->second;
-    EXPECT_EQ(1ul, annotationSet->size());
-    annotationSetIt = annotationSet->begin();
-    annotation = annotationSetIt->get();
-    EXPECT_EQ(ANNOTATION_ID_IS_UID, annotation->annotationId);
-    EXPECT_EQ(1, annotation->atomId);
-    EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
-    EXPECT_TRUE(annotation->value.boolValue);
-
-    atomDeclSetIt++;
-    atomDecl = atomDeclSetIt->get();
-    EXPECT_EQ(3, atomDecl->code);
-    fieldNumberToAnnotations = &atomDecl->fieldNumberToAnnotations;
-    fieldNumberToAnnotationsIt = fieldNumberToAnnotations->find(1);
-    EXPECT_NE(fieldNumberToAnnotations->end(), fieldNumberToAnnotationsIt);
-    annotationSet = &fieldNumberToAnnotationsIt->second;
-    EXPECT_EQ(1ul, annotationSet->size());
-    annotationSetIt = annotationSet->begin();
-    annotation = annotationSetIt->get();
-    EXPECT_EQ(ANNOTATION_ID_EXCLUSIVE_STATE, annotation->annotationId);
-    EXPECT_EQ(3, annotation->atomId);
-    EXPECT_EQ(ANNOTATION_TYPE_BOOL, annotation->type);
-    EXPECT_TRUE(annotation->value.boolValue);
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/utils.cpp b/tools/stats_log_api_gen/utils.cpp
deleted file mode 100644
index abb8913..0000000
--- a/tools/stats_log_api_gen/utils.cpp
+++ /dev/null
@@ -1,434 +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 "utils.h"
-
-#include "android-base/strings.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-static void build_non_chained_decl_map(const Atoms& atoms,
-                                       std::map<int, AtomDeclSet::const_iterator>* decl_map) {
-    for (AtomDeclSet::const_iterator atomIt = atoms.non_chained_decls.begin();
-         atomIt != atoms.non_chained_decls.end(); atomIt++) {
-        decl_map->insert(std::make_pair((*atomIt)->code, atomIt));
-    }
-}
-
-/**
- * Turn lower and camel case into upper case with underscores.
- */
-string make_constant_name(const string& str) {
-    string result;
-    const int N = str.size();
-    bool underscore_next = false;
-    for (int i = 0; i < N; i++) {
-        char c = str[i];
-        if (c >= 'A' && c <= 'Z') {
-            if (underscore_next) {
-                result += '_';
-                underscore_next = false;
-            }
-        } else if (c >= 'a' && c <= 'z') {
-            c = 'A' + c - 'a';
-            underscore_next = true;
-        } else if (c == '_') {
-            underscore_next = false;
-        }
-        result += c;
-    }
-    return result;
-}
-
-const char* cpp_type_name(java_type_t type) {
-    switch (type) {
-        case JAVA_TYPE_BOOLEAN:
-            return "bool";
-        case JAVA_TYPE_INT:
-        case JAVA_TYPE_ENUM:
-            return "int32_t";
-        case JAVA_TYPE_LONG:
-            return "int64_t";
-        case JAVA_TYPE_FLOAT:
-            return "float";
-        case JAVA_TYPE_DOUBLE:
-            return "double";
-        case JAVA_TYPE_STRING:
-            return "char const*";
-        case JAVA_TYPE_BYTE_ARRAY:
-            return "const BytesField&";
-        default:
-            return "UNKNOWN";
-    }
-}
-
-const char* java_type_name(java_type_t type) {
-    switch (type) {
-        case JAVA_TYPE_BOOLEAN:
-            return "boolean";
-        case JAVA_TYPE_INT:
-        case JAVA_TYPE_ENUM:
-            return "int";
-        case JAVA_TYPE_LONG:
-            return "long";
-        case JAVA_TYPE_FLOAT:
-            return "float";
-        case JAVA_TYPE_DOUBLE:
-            return "double";
-        case JAVA_TYPE_STRING:
-            return "java.lang.String";
-        case JAVA_TYPE_BYTE_ARRAY:
-            return "byte[]";
-        default:
-            return "UNKNOWN";
-    }
-}
-
-// Native
-// Writes namespaces for the cpp and header files, returning the number of
-// namespaces written.
-void write_namespace(FILE* out, const string& cppNamespaces) {
-    vector<string> cppNamespaceVec = android::base::Split(cppNamespaces, ",");
-    for (string cppNamespace : cppNamespaceVec) {
-        fprintf(out, "namespace %s {\n", cppNamespace.c_str());
-    }
-}
-
-// Writes namespace closing brackets for cpp and header files.
-void write_closing_namespace(FILE* out, const string& cppNamespaces) {
-    vector<string> cppNamespaceVec = android::base::Split(cppNamespaces, ",");
-    for (auto it = cppNamespaceVec.rbegin(); it != cppNamespaceVec.rend(); ++it) {
-        fprintf(out, "} // namespace %s\n", it->c_str());
-    }
-}
-
-static void write_cpp_usage(FILE* out, const string& method_name, const string& atom_code_name,
-                            const shared_ptr<AtomDecl> atom, const AtomDecl& attributionDecl) {
-    fprintf(out, "     * Usage: %s(StatsLog.%s", method_name.c_str(), atom_code_name.c_str());
-
-    for (vector<AtomField>::const_iterator field = atom->fields.begin();
-         field != atom->fields.end(); field++) {
-        if (field->javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-            for (auto chainField : attributionDecl.fields) {
-                if (chainField.javaType == JAVA_TYPE_STRING) {
-                    fprintf(out, ", const std::vector<%s>& %s", cpp_type_name(chainField.javaType),
-                            chainField.name.c_str());
-                } else {
-                    fprintf(out, ", const %s* %s, size_t %s_length",
-                            cpp_type_name(chainField.javaType), chainField.name.c_str(),
-                            chainField.name.c_str());
-                }
-            }
-        } else if (field->javaType == JAVA_TYPE_KEY_VALUE_PAIR) {
-            fprintf(out,
-                    ", const std::map<int, int32_t>& %s_int"
-                    ", const std::map<int, int64_t>& %s_long"
-                    ", const std::map<int, char const*>& %s_str"
-                    ", const std::map<int, float>& %s_float",
-                    field->name.c_str(), field->name.c_str(), field->name.c_str(),
-                    field->name.c_str());
-        } else {
-            fprintf(out, ", %s %s", cpp_type_name(field->javaType), field->name.c_str());
-        }
-    }
-    fprintf(out, ");\n");
-}
-
-void write_native_atom_constants(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl) {
-    fprintf(out, "/**\n");
-    fprintf(out, " * Constants for atom codes.\n");
-    fprintf(out, " */\n");
-    fprintf(out, "enum {\n");
-
-    std::map<int, AtomDeclSet::const_iterator> atom_code_to_non_chained_decl_map;
-    build_non_chained_decl_map(atoms, &atom_code_to_non_chained_decl_map);
-
-    size_t i = 0;
-    // Print atom constants
-    for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
-         atomIt++) {
-        string constant = make_constant_name((*atomIt)->name);
-        fprintf(out, "\n");
-        fprintf(out, "    /**\n");
-        fprintf(out, "     * %s %s\n", (*atomIt)->message.c_str(), (*atomIt)->name.c_str());
-        write_cpp_usage(out, "stats_write", constant, *atomIt, attributionDecl);
-
-        auto non_chained_decl = atom_code_to_non_chained_decl_map.find((*atomIt)->code);
-        if (non_chained_decl != atom_code_to_non_chained_decl_map.end()) {
-            write_cpp_usage(out, "stats_write_non_chained", constant, *non_chained_decl->second,
-                            attributionDecl);
-        }
-        fprintf(out, "     */\n");
-        char const* const comma = (i == atoms.decls.size() - 1) ? "" : ",";
-        fprintf(out, "    %s = %d%s\n", constant.c_str(), (*atomIt)->code, comma);
-        i++;
-    }
-    fprintf(out, "\n");
-    fprintf(out, "};\n");
-    fprintf(out, "\n");
-}
-
-void write_native_method_signature(FILE* out, const string& methodName,
-                                   const vector<java_type_t>& signature,
-                                   const AtomDecl& attributionDecl, const string& closer) {
-    fprintf(out, "%s(int32_t code", methodName.c_str());
-    int argIndex = 1;
-    for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-         arg++) {
-        if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-            for (auto chainField : attributionDecl.fields) {
-                if (chainField.javaType == JAVA_TYPE_STRING) {
-                    fprintf(out, ", const std::vector<%s>& %s", cpp_type_name(chainField.javaType),
-                            chainField.name.c_str());
-                } else {
-                    fprintf(out, ", const %s* %s, size_t %s_length",
-                            cpp_type_name(chainField.javaType), chainField.name.c_str(),
-                            chainField.name.c_str());
-                }
-            }
-        } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-            fprintf(out,
-                    ", const std::map<int, int32_t>& arg%d_1, "
-                    "const std::map<int, int64_t>& arg%d_2, "
-                    "const std::map<int, char const*>& arg%d_3, "
-                    "const std::map<int, float>& arg%d_4",
-                    argIndex, argIndex, argIndex, argIndex);
-        } else {
-            fprintf(out, ", %s arg%d", cpp_type_name(*arg), argIndex);
-        }
-        argIndex++;
-    }
-    fprintf(out, ")%s\n", closer.c_str());
-}
-
-void write_native_method_call(FILE* out, const string& methodName,
-                              const vector<java_type_t>& signature, const AtomDecl& attributionDecl,
-                              int argIndex) {
-    fprintf(out, "%s(code", methodName.c_str());
-    for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-         arg++) {
-        if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-            for (auto chainField : attributionDecl.fields) {
-                if (chainField.javaType == JAVA_TYPE_STRING) {
-                    fprintf(out, ", %s", chainField.name.c_str());
-                } else {
-                    fprintf(out, ",  %s,  %s_length", chainField.name.c_str(),
-                            chainField.name.c_str());
-                }
-            }
-        } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-            fprintf(out, ", arg%d_1, arg%d_2, arg%d_3, arg%d_4", argIndex, argIndex, argIndex,
-                    argIndex);
-        } else {
-            fprintf(out, ", arg%d", argIndex);
-        }
-        argIndex++;
-    }
-    fprintf(out, ");\n");
-}
-
-// Java
-void write_java_atom_codes(FILE* out, const Atoms& atoms) {
-    fprintf(out, "    // Constants for atom codes.\n");
-
-    std::map<int, AtomDeclSet::const_iterator> atom_code_to_non_chained_decl_map;
-    build_non_chained_decl_map(atoms, &atom_code_to_non_chained_decl_map);
-
-    // Print constants for the atom codes.
-    for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
-         atomIt++) {
-        string constant = make_constant_name((*atomIt)->name);
-        fprintf(out, "\n");
-        fprintf(out, "    /**\n");
-        fprintf(out, "     * %s %s<br>\n", (*atomIt)->message.c_str(), (*atomIt)->name.c_str());
-        write_java_usage(out, "write", constant, **atomIt);
-        auto non_chained_decl = atom_code_to_non_chained_decl_map.find((*atomIt)->code);
-        if (non_chained_decl != atom_code_to_non_chained_decl_map.end()) {
-            write_java_usage(out, "write_non_chained", constant, **(non_chained_decl->second));
-        }
-        fprintf(out, "     */\n");
-        fprintf(out, "    public static final int %s = %d;\n", constant.c_str(), (*atomIt)->code);
-    }
-    fprintf(out, "\n");
-}
-
-void write_java_enum_values(FILE* out, const Atoms& atoms) {
-    fprintf(out, "    // Constants for enum values.\n\n");
-    for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
-         atomIt++) {
-        for (vector<AtomField>::const_iterator field = (*atomIt)->fields.begin();
-             field != (*atomIt)->fields.end(); field++) {
-            if (field->javaType == JAVA_TYPE_ENUM) {
-                fprintf(out, "    // Values for %s.%s\n", (*atomIt)->message.c_str(),
-                        field->name.c_str());
-                for (map<int, string>::const_iterator value = field->enumValues.begin();
-                     value != field->enumValues.end(); value++) {
-                    fprintf(out, "    public static final int %s__%s__%s = %d;\n",
-                            make_constant_name((*atomIt)->message).c_str(),
-                            make_constant_name(field->name).c_str(),
-                            make_constant_name(value->second).c_str(), value->first);
-                }
-                fprintf(out, "\n");
-            }
-        }
-    }
-}
-
-void write_java_usage(FILE* out, const string& method_name, const string& atom_code_name,
-                      const AtomDecl& atom) {
-    fprintf(out, "     * Usage: StatsLog.%s(StatsLog.%s", method_name.c_str(),
-            atom_code_name.c_str());
-    for (vector<AtomField>::const_iterator field = atom.fields.begin(); field != atom.fields.end();
-         field++) {
-        if (field->javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-            fprintf(out, ", android.os.WorkSource workSource");
-        } else if (field->javaType == JAVA_TYPE_KEY_VALUE_PAIR) {
-            fprintf(out, ", android.util.SparseArray<Object> value_map");
-        } else if (field->javaType == JAVA_TYPE_BYTE_ARRAY) {
-            fprintf(out, ", byte[] %s", field->name.c_str());
-        } else {
-            fprintf(out, ", %s %s", java_type_name(field->javaType), field->name.c_str());
-        }
-    }
-    fprintf(out, ");<br>\n");
-}
-
-int write_java_non_chained_methods(FILE* out, const SignatureInfoMap& signatureInfoMap) {
-    for (auto signatureInfoMapIt = signatureInfoMap.begin();
-         signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
-        // Print method signature.
-        fprintf(out, "    public static void write_non_chained(int code");
-        vector<java_type_t> signature = signatureInfoMapIt->first;
-        int argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                fprintf(stderr, "Non chained signatures should not have attribution chains.\n");
-                return 1;
-            } else if (*arg == JAVA_TYPE_KEY_VALUE_PAIR) {
-                fprintf(stderr, "Module logging does not yet support key value pair.\n");
-                return 1;
-            } else {
-                fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
-            }
-            argIndex++;
-        }
-        fprintf(out, ") {\n");
-
-        fprintf(out, "        write(code");
-        argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            // First two args are uid and tag of attribution chain.
-            if (argIndex == 1) {
-                fprintf(out, ", new int[] {arg%d}", argIndex);
-            } else if (argIndex == 2) {
-                fprintf(out, ", new java.lang.String[] {arg%d}", argIndex);
-            } else {
-                fprintf(out, ", arg%d", argIndex);
-            }
-            argIndex++;
-        }
-        fprintf(out, ");\n");
-        fprintf(out, "    }\n");
-        fprintf(out, "\n");
-    }
-    return 0;
-}
-
-int write_java_work_source_methods(FILE* out, const SignatureInfoMap& signatureInfoMap) {
-    fprintf(out, "    // WorkSource methods.\n");
-    for (auto signatureInfoMapIt = signatureInfoMap.begin();
-         signatureInfoMapIt != signatureInfoMap.end(); signatureInfoMapIt++) {
-        vector<java_type_t> signature = signatureInfoMapIt->first;
-        // Determine if there is Attribution in this signature.
-        int attributionArg = -1;
-        int argIndexMax = 0;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            argIndexMax++;
-            if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                if (attributionArg > -1) {
-                    fprintf(stderr, "An atom contains multiple AttributionNode fields.\n");
-                    fprintf(stderr, "This is not supported. Aborting WorkSource method writing.\n");
-                    fprintf(out,
-                            "\n// Invalid for WorkSource: more than one attribution "
-                            "chain.\n");
-                    return 1;
-                }
-                attributionArg = argIndexMax;
-            }
-        }
-        if (attributionArg < 0) {
-            continue;
-        }
-
-        fprintf(out, "\n");
-        // Method header (signature)
-        fprintf(out, "    public static void write(int code");
-        int argIndex = 1;
-        for (vector<java_type_t>::const_iterator arg = signature.begin(); arg != signature.end();
-             arg++) {
-            if (*arg == JAVA_TYPE_ATTRIBUTION_CHAIN) {
-                fprintf(out, ", android.os.WorkSource ws");
-            } else {
-                fprintf(out, ", %s arg%d", java_type_name(*arg), argIndex);
-            }
-            argIndex++;
-        }
-        fprintf(out, ") {\n");
-
-        // write_non_chained() component. TODO: Remove when flat uids are no longer
-        // needed.
-        fprintf(out, "        for (int i = 0; i < ws.size(); ++i) {\n");
-        fprintf(out, "            write_non_chained(code");
-        for (int argIndex = 1; argIndex <= argIndexMax; argIndex++) {
-            if (argIndex == attributionArg) {
-                fprintf(out, ", ws.getUid(i), ws.getPackageName(i)");
-            } else {
-                fprintf(out, ", arg%d", argIndex);
-            }
-        }
-        fprintf(out, ");\n");
-        fprintf(out, "        }\n");  // close for-loop
-
-        // write() component.
-        fprintf(out,
-                "        java.util.List<android.os.WorkSource.WorkChain> workChains = "
-                "ws.getWorkChains();\n");
-        fprintf(out, "        if (workChains != null) {\n");
-        fprintf(out,
-                "            for (android.os.WorkSource.WorkChain wc : workChains) "
-                "{\n");
-        fprintf(out, "                write(code");
-        for (int argIndex = 1; argIndex <= argIndexMax; argIndex++) {
-            if (argIndex == attributionArg) {
-                fprintf(out, ", wc.getUids(), wc.getTags()");
-            } else {
-                fprintf(out, ", arg%d", argIndex);
-            }
-        }
-        fprintf(out, ");\n");
-        fprintf(out, "            }\n");  // close for-loop
-        fprintf(out, "        }\n");      // close if
-        fprintf(out, "    }\n");          // close method
-    }
-    return 0;
-}
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/tools/stats_log_api_gen/utils.h b/tools/stats_log_api_gen/utils.h
deleted file mode 100644
index 73e0cb8..0000000
--- a/tools/stats_log_api_gen/utils.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 <stdio.h>
-#include <string.h>
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "Collation.h"
-
-namespace android {
-namespace stats_log_api_gen {
-
-using namespace std;
-
-const string DEFAULT_CPP_NAMESPACE = "android,util";
-const string DEFAULT_CPP_HEADER_IMPORT = "statslog.h";
-
-const int JAVA_MODULE_REQUIRES_FLOAT = 0x01;
-const int JAVA_MODULE_REQUIRES_ATTRIBUTION = 0x02;
-const int JAVA_MODULE_REQUIRES_KEY_VALUE_PAIRS = 0x04;
-
-const map<AnnotationId, string> ANNOTATION_ID_CONSTANTS = {
-        {ANNOTATION_ID_IS_UID, "ANNOTATION_ID_IS_UID"},
-        {ANNOTATION_ID_TRUNCATE_TIMESTAMP, "ANNOTATION_ID_TRUNCATE_TIMESTAMP"},
-        {ANNOTATION_ID_PRIMARY_FIELD, "ANNOTATION_ID_PRIMARY_FIELD"},
-        {ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID, "ANNOTATION_ID_PRIMARY_FIELD_FIRST_UID"},
-        {ANNOTATION_ID_EXCLUSIVE_STATE, "ANNOTATION_ID_EXCLUSIVE_STATE"},
-        {ANNOTATION_ID_TRIGGER_STATE_RESET, "ANNOTATION_ID_TRIGGER_STATE_RESET"},
-        {ANNOTATION_ID_STATE_NESTED, "ANNOTATION_ID_STATE_NESTED"}};
-
-string make_constant_name(const string& str);
-
-const char* cpp_type_name(java_type_t type);
-
-const char* java_type_name(java_type_t type);
-
-// Common Native helpers
-void write_namespace(FILE* out, const string& cppNamespaces);
-
-void write_closing_namespace(FILE* out, const string& cppNamespaces);
-
-void write_native_atom_constants(FILE* out, const Atoms& atoms, const AtomDecl& attributionDecl);
-
-void write_native_method_signature(FILE* out, const string& methodName,
-                                   const vector<java_type_t>& signature,
-                                   const AtomDecl& attributionDecl, const string& closer);
-
-void write_native_method_call(FILE* out, const string& methodName,
-                              const vector<java_type_t>& signature, const AtomDecl& attributionDecl,
-                              int argIndex = 1);
-
-// Common Java helpers.
-void write_java_atom_codes(FILE* out, const Atoms& atoms);
-
-void write_java_enum_values(FILE* out, const Atoms& atoms);
-
-void write_java_usage(FILE* out, const string& method_name, const string& atom_code_name,
-                      const AtomDecl& atom);
-
-int write_java_non_chained_methods(FILE* out, const SignatureInfoMap& signatureInfoMap);
-
-int write_java_work_source_methods(FILE* out, const SignatureInfoMap& signatureInfoMap);
-
-}  // namespace stats_log_api_gen
-}  // namespace android
diff --git a/wifi/Android.bp b/wifi/Android.bp
deleted file mode 100644
index 8b89959..0000000
--- a/wifi/Android.bp
+++ /dev/null
@@ -1,167 +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_defaults {
-    name: "wifi-module-sdk-version-defaults",
-    min_sdk_version: "30",
-    target_sdk_version: "30",
-}
-
-filegroup {
-    name: "framework-wifi-updatable-exported-aidl-sources",
-    srcs: ["aidl-export/**/*.aidl"],
-    path: "aidl-export",
-    visibility: ["//visibility:private"],
-}
-
-filegroup {
-    name: "framework-wifi-updatable-java-sources",
-    srcs: [
-        "java/**/*.java",
-        "java/**/*.aidl",
-    ],
-    exclude_srcs: [
-        ":framework-wifi-non-updatable-sources"
-    ],
-    path: "java",
-    visibility: ["//visibility:private"],
-}
-
-filegroup {
-    name: "framework-wifi-updatable-sources",
-    srcs: [
-        ":framework-wifi-updatable-java-sources",
-        ":framework-wifi-updatable-exported-aidl-sources",
-    ],
-}
-
-filegroup {
-    name: "framework-wifi-non-updatable-sources",
-    srcs: [
-        // TODO(b/146011398) package android.net.wifi is now split amongst 2 jars: framework.jar and
-        // framework-wifi.jar. This is not a good idea, should move WifiNetworkScoreCache
-        // to a separate package.
-        "java/android/net/wifi/SoftApConfToXmlMigrationUtil.java",
-        "java/android/net/wifi/WifiNetworkScoreCache.java",
-        "java/android/net/wifi/WifiMigration.java",
-        "java/android/net/wifi/nl80211/*.java",
-        ":libwificond_ipc_aidl",
-    ],
-}
-
-filegroup {
-    name: "framework-wifi-annotations",
-    srcs: ["java/android/net/wifi/WifiAnnotations.java"],
-}
-
-// list of tests that are allowed to access @hide APIs from framework-wifi
-test_access_hidden_api_whitelist = [
-    "//frameworks/base/wifi/tests",
-    "//frameworks/opt/net/wifi/tests/wifitests:__subpackages__",
-
-    "//external/robolectric-shadows:__subpackages__",
-    "//frameworks/base/packages/SettingsLib/tests/integ",
-    "//external/sl4a:__subpackages__",
-    "//packages/apps/Settings/tests/robotests", // TODO(b/161767237): remove
-]
-
-// defaults shared between `framework-wifi` & `framework-wifi-pre-jarjar`
-// java_sdk_library `framework-wifi` needs sources to generate stubs, so it cannot reuse
-// `framework-wifi-pre-jarjar`
-java_defaults {
-    name: "framework-wifi-defaults",
-    defaults: ["wifi-module-sdk-version-defaults"],
-    static_libs: [
-        "framework-wifi-util-lib",
-        "android.hardware.wifi-V1.0-java-constants",
-        "modules-utils-build",
-    ],
-    libs: [
-        "unsupportedappusage", // for android.compat.annotation.UnsupportedAppUsage
-    ],
-    srcs: [
-        ":framework-wifi-updatable-sources",
-        ":framework-wifi-util-lib-aidls",
-    ],
-}
-
-// wifi-service needs pre-jarjared version of framework-wifi so it can reference copied utility
-// classes before they are renamed.
-java_library {
-    name: "framework-wifi-pre-jarjar",
-    defaults: ["framework-wifi-defaults"],
-    sdk_version: "module_current",
-    libs: ["framework-annotations-lib"],
-    // java_api_finder must accompany `srcs` (`srcs` defined in `framework-wifi-defaults`)
-    plugins: ["java_api_finder"],
-    installable: false,
-    visibility: [
-        "//frameworks/opt/net/wifi/service",
-        "//frameworks/opt/net/wifi/tests/wifitests",
-    ],
-}
-
-// post-jarjar version of framework-wifi
-java_sdk_library {
-    name: "framework-wifi",
-    defaults: [
-        "framework-module-defaults",
-        "framework-wifi-defaults",
-    ],
-
-    jarjar_rules: ":wifi-jarjar-rules",
-
-    installable: true,
-    optimize: {
-        enabled: false
-    },
-    hostdex: true, // for hiddenapi check
-
-    // Restrict access to implementation library.
-    impl_library_visibility: [
-        "//frameworks/opt/net/wifi/service:__subpackages__",
-    ] + test_access_hidden_api_whitelist,
-
-    apex_available: [
-        "com.android.wifi",
-        "test_com.android.wifi",
-    ],
-    permitted_packages: [
-        "android.hardware.wifi",
-        "android.net.wifi",
-        // Created by jarjar rules.
-        "com.android.wifi.x",
-    ],
-}
-
-// defaults for tests that need to build against framework-wifi's @hide APIs
-java_defaults {
-    name: "framework-wifi-test-defaults",
-    sdk_version: "core_platform", // tests can use @CorePlatformApi's
-    libs: [
-        // order matters: classes in framework-wifi are resolved before framework, meaning
-        // @hide APIs in framework-wifi are resolved before @SystemApi stubs in framework
-        "framework-wifi.impl",
-        "framework",
-
-        // if sdk_version="" this gets automatically included, but here we need to add manually.
-        "framework-res",
-    ],
-    visibility: test_access_hidden_api_whitelist,
-}
-
-filegroup {
-    name: "wifi-jarjar-rules",
-    srcs: ["jarjar-rules.txt"],
-}
diff --git a/wifi/TEST_MAPPING b/wifi/TEST_MAPPING
new file mode 100644
index 0000000..94e4f4d
--- /dev/null
+++ b/wifi/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+  "presubmit": [
+    {
+      "name": "FrameworksWifiNonUpdatableApiTests"
+    }
+  ]
+}
diff --git a/wifi/aidl-export/android/net/wifi/ScanResult.aidl b/wifi/aidl-export/android/net/wifi/ScanResult.aidl
deleted file mode 100644
index b30689c..0000000
--- a/wifi/aidl-export/android/net/wifi/ScanResult.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2008, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES 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;
-
-@JavaOnlyStableParcelable parcelable ScanResult;
diff --git a/wifi/aidl-export/android/net/wifi/SoftApCapability.aidl b/wifi/aidl-export/android/net/wifi/SoftApCapability.aidl
deleted file mode 100644
index bf30709..0000000
--- a/wifi/aidl-export/android/net/wifi/SoftApCapability.aidl
+++ /dev/null
@@ -1,19 +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;
-
-parcelable SoftApCapability;
diff --git a/wifi/aidl-export/android/net/wifi/SoftApConfiguration.aidl b/wifi/aidl-export/android/net/wifi/SoftApConfiguration.aidl
deleted file mode 100644
index 1d06f45..0000000
--- a/wifi/aidl-export/android/net/wifi/SoftApConfiguration.aidl
+++ /dev/null
@@ -1,19 +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;
-
-parcelable SoftApConfiguration;
\ No newline at end of file
diff --git a/wifi/aidl-export/android/net/wifi/SoftApInfo.aidl b/wifi/aidl-export/android/net/wifi/SoftApInfo.aidl
deleted file mode 100644
index d4551cf..0000000
--- a/wifi/aidl-export/android/net/wifi/SoftApInfo.aidl
+++ /dev/null
@@ -1,20 +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;
-
-parcelable SoftApInfo;
-
diff --git a/wifi/aidl-export/android/net/wifi/WifiClient.aidl b/wifi/aidl-export/android/net/wifi/WifiClient.aidl
deleted file mode 100644
index accdadd..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiClient.aidl
+++ /dev/null
@@ -1,19 +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;
-
-@JavaOnlyStableParcelable parcelable WifiClient;
\ No newline at end of file
diff --git a/wifi/aidl-export/android/net/wifi/WifiConfiguration.aidl b/wifi/aidl-export/android/net/wifi/WifiConfiguration.aidl
deleted file mode 100644
index 237a74d..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiConfiguration.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2008, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES 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;
-
-parcelable WifiConfiguration;
diff --git a/wifi/aidl-export/android/net/wifi/WifiEnterpriseConfig.aidl b/wifi/aidl-export/android/net/wifi/WifiEnterpriseConfig.aidl
deleted file mode 100644
index b0f5f84..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiEnterpriseConfig.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2013, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-parcelable WifiEnterpriseConfig;
diff --git a/wifi/aidl-export/android/net/wifi/WifiInfo.aidl b/wifi/aidl-export/android/net/wifi/WifiInfo.aidl
deleted file mode 100644
index db47f0b..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiInfo.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2008, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES 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;
-
-parcelable WifiInfo;
diff --git a/wifi/aidl-export/android/net/wifi/WifiNetworkConnectionStatistics.aidl b/wifi/aidl-export/android/net/wifi/WifiNetworkConnectionStatistics.aidl
deleted file mode 100644
index 5f497e2..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiNetworkConnectionStatistics.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2014, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); 
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *     http://www.apache.org/licenses/LICENSE-2.0 
- *
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
- * See the License for the specific language governing permissions and 
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-parcelable WifiNetworkConnectionStatistics;
diff --git a/wifi/aidl-export/android/net/wifi/WifiNetworkSuggestion.aidl b/wifi/aidl-export/android/net/wifi/WifiNetworkSuggestion.aidl
deleted file mode 100644
index eb6995f..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiNetworkSuggestion.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-parcelable WifiNetworkSuggestion;
diff --git a/wifi/aidl-export/android/net/wifi/WifiUsabilityStatsEntry.aidl b/wifi/aidl-export/android/net/wifi/WifiUsabilityStatsEntry.aidl
deleted file mode 100644
index 839af54..0000000
--- a/wifi/aidl-export/android/net/wifi/WifiUsabilityStatsEntry.aidl
+++ /dev/null
@@ -1,19 +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;
-
-parcelable WifiUsabilityStatsEntry;
diff --git a/wifi/aidl-export/android/net/wifi/WpsInfo.aidl b/wifi/aidl-export/android/net/wifi/WpsInfo.aidl
deleted file mode 100644
index f5e4ebe..0000000
--- a/wifi/aidl-export/android/net/wifi/WpsInfo.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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;
-
-parcelable WpsInfo;
diff --git a/wifi/aidl-export/android/net/wifi/aware/Characteristics.aidl b/wifi/aidl-export/android/net/wifi/aware/Characteristics.aidl
deleted file mode 100644
index 77305e9..0000000
--- a/wifi/aidl-export/android/net/wifi/aware/Characteristics.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-parcelable Characteristics;
diff --git a/wifi/aidl-export/android/net/wifi/aware/PublishConfig.aidl b/wifi/aidl-export/android/net/wifi/aware/PublishConfig.aidl
deleted file mode 100644
index 2e6dd00..0000000
--- a/wifi/aidl-export/android/net/wifi/aware/PublishConfig.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-parcelable PublishConfig;
diff --git a/wifi/aidl-export/android/net/wifi/aware/SubscribeConfig.aidl b/wifi/aidl-export/android/net/wifi/aware/SubscribeConfig.aidl
deleted file mode 100644
index bd73d5e..0000000
--- a/wifi/aidl-export/android/net/wifi/aware/SubscribeConfig.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-parcelable SubscribeConfig;
diff --git a/wifi/aidl-export/android/net/wifi/hotspot2/OsuProvider.aidl b/wifi/aidl-export/android/net/wifi/hotspot2/OsuProvider.aidl
deleted file mode 100644
index 23d0f22..0000000
--- a/wifi/aidl-export/android/net/wifi/hotspot2/OsuProvider.aidl
+++ /dev/null
@@ -1,19 +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.net.wifi.hotspot2;
-
-parcelable OsuProvider;
diff --git a/wifi/aidl-export/android/net/wifi/hotspot2/PasspointConfiguration.aidl b/wifi/aidl-export/android/net/wifi/hotspot2/PasspointConfiguration.aidl
deleted file mode 100644
index 6b1cea8..0000000
--- a/wifi/aidl-export/android/net/wifi/hotspot2/PasspointConfiguration.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2;
-
-parcelable PasspointConfiguration;
diff --git a/wifi/aidl-export/android/net/wifi/hotspot2/pps/Credential.aidl b/wifi/aidl-export/android/net/wifi/hotspot2/pps/Credential.aidl
deleted file mode 100644
index 3d8e833..0000000
--- a/wifi/aidl-export/android/net/wifi/hotspot2/pps/Credential.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.pps;
-
-parcelable Credential;
diff --git a/wifi/aidl-export/android/net/wifi/hotspot2/pps/HomeSp.aidl b/wifi/aidl-export/android/net/wifi/hotspot2/pps/HomeSp.aidl
deleted file mode 100644
index 6d343bd..0000000
--- a/wifi/aidl-export/android/net/wifi/hotspot2/pps/HomeSp.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.pps;
-
-parcelable HomeSp;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pConfig.aidl b/wifi/aidl-export/android/net/wifi/p2p/WifiP2pConfig.aidl
deleted file mode 100644
index ea3b280..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pConfig.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-parcelable WifiP2pConfig;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDevice.aidl b/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDevice.aidl
deleted file mode 100644
index 8790c6f..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDevice.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-parcelable WifiP2pDevice;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDeviceList.aidl b/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDeviceList.aidl
deleted file mode 100644
index 6c79009..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pDeviceList.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-parcelable WifiP2pDeviceList;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pGroup.aidl b/wifi/aidl-export/android/net/wifi/p2p/WifiP2pGroup.aidl
deleted file mode 100644
index 403f2b1..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pGroup.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-parcelable WifiP2pGroup;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pInfo.aidl b/wifi/aidl-export/android/net/wifi/p2p/WifiP2pInfo.aidl
deleted file mode 100644
index a347148..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/WifiP2pInfo.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2011, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-parcelable WifiP2pInfo;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.aidl b/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.aidl
deleted file mode 100644
index 57055f7..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-parcelable WifiP2pServiceInfo;
diff --git a/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.aidl b/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.aidl
deleted file mode 100644
index e4d28bb..0000000
--- a/wifi/aidl-export/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-parcelable WifiP2pServiceRequest;
diff --git a/wifi/aidl-export/android/net/wifi/rtt/RangingRequest.aidl b/wifi/aidl-export/android/net/wifi/rtt/RangingRequest.aidl
deleted file mode 100644
index 8053c94..0000000
--- a/wifi/aidl-export/android/net/wifi/rtt/RangingRequest.aidl
+++ /dev/null
@@ -1,19 +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.net.wifi.rtt;
-
-parcelable RangingRequest;
diff --git a/wifi/aidl-export/android/net/wifi/rtt/RangingResult.aidl b/wifi/aidl-export/android/net/wifi/rtt/RangingResult.aidl
deleted file mode 100644
index ae295a6..0000000
--- a/wifi/aidl-export/android/net/wifi/rtt/RangingResult.aidl
+++ /dev/null
@@ -1,19 +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.net.wifi.rtt;
-
-parcelable RangingResult;
diff --git a/wifi/aidl-export/android/net/wifi/rtt/ResponderConfig.aidl b/wifi/aidl-export/android/net/wifi/rtt/ResponderConfig.aidl
deleted file mode 100644
index fd3988a..0000000
--- a/wifi/aidl-export/android/net/wifi/rtt/ResponderConfig.aidl
+++ /dev/null
@@ -1,19 +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.net.wifi.rtt;
-
-parcelable ResponderConfig;
diff --git a/wifi/api/current.txt b/wifi/api/current.txt
deleted file mode 100644
index 53c3b33..0000000
--- a/wifi/api/current.txt
+++ /dev/null
@@ -1,1199 +0,0 @@
-// Signature format: 2.0
-package android.net.wifi {
-
-  public abstract class EasyConnectStatusCallback {
-    field public static final int EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION = -2; // 0xfffffffe
-    field public static final int EASY_CONNECT_EVENT_FAILURE_BUSY = -5; // 0xfffffffb
-    field public static final int EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK = -10; // 0xfffffff6
-    field public static final int EASY_CONNECT_EVENT_FAILURE_CONFIGURATION = -4; // 0xfffffffc
-    field public static final int EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION = -11; // 0xfffffff5
-    field public static final int EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION = -12; // 0xfffffff4
-    field public static final int EASY_CONNECT_EVENT_FAILURE_GENERIC = -7; // 0xfffffff9
-    field public static final int EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK = -9; // 0xfffffff7
-    field public static final int EASY_CONNECT_EVENT_FAILURE_INVALID_URI = -1; // 0xffffffff
-    field public static final int EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE = -3; // 0xfffffffd
-    field public static final int EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED = -8; // 0xfffffff8
-    field public static final int EASY_CONNECT_EVENT_FAILURE_TIMEOUT = -6; // 0xfffffffa
-  }
-
-  public final class ScanResult implements android.os.Parcelable {
-    ctor public ScanResult(@NonNull android.net.wifi.ScanResult);
-    ctor public ScanResult();
-    method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.ScanResult.InformationElement> getInformationElements();
-    method public int getWifiStandard();
-    method public boolean is80211mcResponder();
-    method public boolean isPasspointNetwork();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public String BSSID;
-    field public static final int CHANNEL_WIDTH_160MHZ = 3; // 0x3
-    field public static final int CHANNEL_WIDTH_20MHZ = 0; // 0x0
-    field public static final int CHANNEL_WIDTH_40MHZ = 1; // 0x1
-    field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
-    field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.ScanResult> CREATOR;
-    field public String SSID;
-    field public static final int WIFI_STANDARD_11AC = 5; // 0x5
-    field public static final int WIFI_STANDARD_11AX = 6; // 0x6
-    field public static final int WIFI_STANDARD_11N = 4; // 0x4
-    field public static final int WIFI_STANDARD_LEGACY = 1; // 0x1
-    field public static final int WIFI_STANDARD_UNKNOWN = 0; // 0x0
-    field public String capabilities;
-    field public int centerFreq0;
-    field public int centerFreq1;
-    field public int channelWidth;
-    field public int frequency;
-    field public int level;
-    field public CharSequence operatorFriendlyName;
-    field public long timestamp;
-    field public CharSequence venueName;
-  }
-
-  public static class ScanResult.InformationElement {
-    ctor public ScanResult.InformationElement(@NonNull android.net.wifi.ScanResult.InformationElement);
-    method @NonNull public java.nio.ByteBuffer getBytes();
-    method public int getId();
-    method public int getIdExt();
-  }
-
-  public final class SoftApConfiguration implements android.os.Parcelable {
-    method public int describeContents();
-    method @Nullable public android.net.MacAddress getBssid();
-    method @Nullable public String getPassphrase();
-    method public int getSecurityType();
-    method @Nullable public String getSsid();
-    method public boolean isHiddenSsid();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApConfiguration> CREATOR;
-    field public static final int SECURITY_TYPE_OPEN = 0; // 0x0
-    field public static final int SECURITY_TYPE_WPA2_PSK = 1; // 0x1
-    field public static final int SECURITY_TYPE_WPA3_SAE = 3; // 0x3
-    field public static final int SECURITY_TYPE_WPA3_SAE_TRANSITION = 2; // 0x2
-  }
-
-  public enum SupplicantState implements android.os.Parcelable {
-    method public int describeContents();
-    method public static boolean isValidState(android.net.wifi.SupplicantState);
-    method public void writeToParcel(android.os.Parcel, int);
-    enum_constant public static final android.net.wifi.SupplicantState ASSOCIATED;
-    enum_constant public static final android.net.wifi.SupplicantState ASSOCIATING;
-    enum_constant public static final android.net.wifi.SupplicantState AUTHENTICATING;
-    enum_constant public static final android.net.wifi.SupplicantState COMPLETED;
-    enum_constant public static final android.net.wifi.SupplicantState DISCONNECTED;
-    enum_constant public static final android.net.wifi.SupplicantState DORMANT;
-    enum_constant public static final android.net.wifi.SupplicantState FOUR_WAY_HANDSHAKE;
-    enum_constant public static final android.net.wifi.SupplicantState GROUP_HANDSHAKE;
-    enum_constant public static final android.net.wifi.SupplicantState INACTIVE;
-    enum_constant public static final android.net.wifi.SupplicantState INTERFACE_DISABLED;
-    enum_constant public static final android.net.wifi.SupplicantState INVALID;
-    enum_constant public static final android.net.wifi.SupplicantState SCANNING;
-    enum_constant public static final android.net.wifi.SupplicantState UNINITIALIZED;
-  }
-
-  @Deprecated public class WifiConfiguration implements android.os.Parcelable {
-    ctor @Deprecated public WifiConfiguration();
-    ctor @Deprecated public WifiConfiguration(@NonNull android.net.wifi.WifiConfiguration);
-    method public int describeContents();
-    method @Deprecated public android.net.ProxyInfo getHttpProxy();
-    method @Deprecated @NonNull public String getKey();
-    method @Deprecated @NonNull public android.net.MacAddress getRandomizedMacAddress();
-    method @Deprecated public boolean isPasspoint();
-    method @Deprecated public void setHttpProxy(android.net.ProxyInfo);
-    method @Deprecated public void setSecurityParams(int);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @Deprecated public String BSSID;
-    field @Deprecated public String FQDN;
-    field @Deprecated public static final int SECURITY_TYPE_EAP = 3; // 0x3
-    field @Deprecated public static final int SECURITY_TYPE_EAP_SUITE_B = 5; // 0x5
-    field @Deprecated public static final int SECURITY_TYPE_OPEN = 0; // 0x0
-    field @Deprecated public static final int SECURITY_TYPE_OWE = 6; // 0x6
-    field @Deprecated public static final int SECURITY_TYPE_PSK = 2; // 0x2
-    field @Deprecated public static final int SECURITY_TYPE_SAE = 4; // 0x4
-    field @Deprecated public static final int SECURITY_TYPE_WAPI_CERT = 8; // 0x8
-    field @Deprecated public static final int SECURITY_TYPE_WAPI_PSK = 7; // 0x7
-    field @Deprecated public static final int SECURITY_TYPE_WEP = 1; // 0x1
-    field @Deprecated public String SSID;
-    field @Deprecated @NonNull public java.util.BitSet allowedAuthAlgorithms;
-    field @Deprecated @NonNull public java.util.BitSet allowedGroupCiphers;
-    field @Deprecated @NonNull public java.util.BitSet allowedGroupManagementCiphers;
-    field @Deprecated @NonNull public java.util.BitSet allowedKeyManagement;
-    field @Deprecated @NonNull public java.util.BitSet allowedPairwiseCiphers;
-    field @Deprecated @NonNull public java.util.BitSet allowedProtocols;
-    field @Deprecated @NonNull public java.util.BitSet allowedSuiteBCiphers;
-    field @Deprecated public android.net.wifi.WifiEnterpriseConfig enterpriseConfig;
-    field @Deprecated public boolean hiddenSSID;
-    field @Deprecated public boolean isHomeProviderNetwork;
-    field @Deprecated public int networkId;
-    field @Deprecated public String preSharedKey;
-    field @Deprecated public int priority;
-    field @Deprecated public String providerFriendlyName;
-    field @Deprecated public long[] roamingConsortiumIds;
-    field @Deprecated public int status;
-    field @Deprecated public String[] wepKeys;
-    field @Deprecated public int wepTxKeyIndex;
-  }
-
-  @Deprecated public static class WifiConfiguration.AuthAlgorithm {
-    field @Deprecated public static final int LEAP = 2; // 0x2
-    field @Deprecated public static final int OPEN = 0; // 0x0
-    field @Deprecated public static final int SAE = 3; // 0x3
-    field @Deprecated public static final int SHARED = 1; // 0x1
-    field @Deprecated public static final String[] strings;
-    field @Deprecated public static final String varName = "auth_alg";
-  }
-
-  @Deprecated public static class WifiConfiguration.GroupCipher {
-    field @Deprecated public static final int CCMP = 3; // 0x3
-    field @Deprecated public static final int GCMP_256 = 5; // 0x5
-    field @Deprecated public static final int SMS4 = 6; // 0x6
-    field @Deprecated public static final int TKIP = 2; // 0x2
-    field @Deprecated public static final int WEP104 = 1; // 0x1
-    field @Deprecated public static final int WEP40 = 0; // 0x0
-    field @Deprecated public static final String[] strings;
-    field @Deprecated public static final String varName = "group";
-  }
-
-  @Deprecated public static class WifiConfiguration.GroupMgmtCipher {
-    field @Deprecated public static final int BIP_CMAC_256 = 0; // 0x0
-    field @Deprecated public static final int BIP_GMAC_128 = 1; // 0x1
-    field @Deprecated public static final int BIP_GMAC_256 = 2; // 0x2
-  }
-
-  @Deprecated public static class WifiConfiguration.KeyMgmt {
-    field @Deprecated public static final int IEEE8021X = 3; // 0x3
-    field @Deprecated public static final int NONE = 0; // 0x0
-    field @Deprecated public static final int OWE = 9; // 0x9
-    field @Deprecated public static final int SAE = 8; // 0x8
-    field @Deprecated public static final int SUITE_B_192 = 10; // 0xa
-    field @Deprecated public static final int WPA_EAP = 2; // 0x2
-    field @Deprecated public static final int WPA_PSK = 1; // 0x1
-    field @Deprecated public static final String[] strings;
-    field @Deprecated public static final String varName = "key_mgmt";
-  }
-
-  @Deprecated public static class WifiConfiguration.PairwiseCipher {
-    field @Deprecated public static final int CCMP = 2; // 0x2
-    field @Deprecated public static final int GCMP_256 = 3; // 0x3
-    field @Deprecated public static final int NONE = 0; // 0x0
-    field @Deprecated public static final int SMS4 = 4; // 0x4
-    field @Deprecated public static final int TKIP = 1; // 0x1
-    field @Deprecated public static final String[] strings;
-    field @Deprecated public static final String varName = "pairwise";
-  }
-
-  @Deprecated public static class WifiConfiguration.Protocol {
-    field @Deprecated public static final int RSN = 1; // 0x1
-    field @Deprecated public static final int WAPI = 3; // 0x3
-    field @Deprecated public static final int WPA = 0; // 0x0
-    field @Deprecated public static final String[] strings;
-    field @Deprecated public static final String varName = "proto";
-  }
-
-  @Deprecated public static class WifiConfiguration.Status {
-    field @Deprecated public static final int CURRENT = 0; // 0x0
-    field @Deprecated public static final int DISABLED = 1; // 0x1
-    field @Deprecated public static final int ENABLED = 2; // 0x2
-    field @Deprecated public static final String[] strings;
-  }
-
-  public class WifiEnterpriseConfig implements android.os.Parcelable {
-    ctor public WifiEnterpriseConfig();
-    ctor public WifiEnterpriseConfig(android.net.wifi.WifiEnterpriseConfig);
-    method public int describeContents();
-    method public String getAltSubjectMatch();
-    method public String getAnonymousIdentity();
-    method @Nullable public java.security.cert.X509Certificate getCaCertificate();
-    method @Nullable public java.security.cert.X509Certificate[] getCaCertificates();
-    method public java.security.cert.X509Certificate getClientCertificate();
-    method @Nullable public java.security.cert.X509Certificate[] getClientCertificateChain();
-    method @Nullable public java.security.PrivateKey getClientPrivateKey();
-    method public String getDomainSuffixMatch();
-    method public int getEapMethod();
-    method public String getIdentity();
-    method public String getPassword();
-    method public int getPhase2Method();
-    method public String getPlmn();
-    method public String getRealm();
-    method @Deprecated public String getSubjectMatch();
-    method public boolean isAuthenticationSimBased();
-    method public void setAltSubjectMatch(String);
-    method public void setAnonymousIdentity(String);
-    method public void setCaCertificate(@Nullable java.security.cert.X509Certificate);
-    method public void setCaCertificates(@Nullable java.security.cert.X509Certificate[]);
-    method public void setClientKeyEntry(java.security.PrivateKey, java.security.cert.X509Certificate);
-    method public void setClientKeyEntryWithCertificateChain(java.security.PrivateKey, java.security.cert.X509Certificate[]);
-    method public void setDomainSuffixMatch(String);
-    method public void setEapMethod(int);
-    method public void setIdentity(String);
-    method public void setPassword(String);
-    method public void setPhase2Method(int);
-    method public void setPlmn(String);
-    method public void setRealm(String);
-    method @Deprecated public void setSubjectMatch(String);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiEnterpriseConfig> CREATOR;
-    field public static final String EXTRA_WAPI_AS_CERTIFICATE_DATA = "android.net.wifi.extra.WAPI_AS_CERTIFICATE_DATA";
-    field public static final String EXTRA_WAPI_AS_CERTIFICATE_NAME = "android.net.wifi.extra.WAPI_AS_CERTIFICATE_NAME";
-    field public static final String EXTRA_WAPI_USER_CERTIFICATE_DATA = "android.net.wifi.extra.WAPI_USER_CERTIFICATE_DATA";
-    field public static final String EXTRA_WAPI_USER_CERTIFICATE_NAME = "android.net.wifi.extra.WAPI_USER_CERTIFICATE_NAME";
-    field public static final String WAPI_AS_CERTIFICATE = "WAPIAS_";
-    field public static final String WAPI_USER_CERTIFICATE = "WAPIUSR_";
-  }
-
-  public static final class WifiEnterpriseConfig.Eap {
-    field public static final int AKA = 5; // 0x5
-    field public static final int AKA_PRIME = 6; // 0x6
-    field public static final int NONE = -1; // 0xffffffff
-    field public static final int PEAP = 0; // 0x0
-    field public static final int PWD = 3; // 0x3
-    field public static final int SIM = 4; // 0x4
-    field public static final int TLS = 1; // 0x1
-    field public static final int TTLS = 2; // 0x2
-    field public static final int UNAUTH_TLS = 7; // 0x7
-    field public static final int WAPI_CERT = 8; // 0x8
-  }
-
-  public static final class WifiEnterpriseConfig.Phase2 {
-    field public static final int AKA = 6; // 0x6
-    field public static final int AKA_PRIME = 7; // 0x7
-    field public static final int GTC = 4; // 0x4
-    field public static final int MSCHAP = 2; // 0x2
-    field public static final int MSCHAPV2 = 3; // 0x3
-    field public static final int NONE = 0; // 0x0
-    field public static final int PAP = 1; // 0x1
-    field public static final int SIM = 5; // 0x5
-  }
-
-  public class WifiInfo implements android.os.Parcelable {
-    method public int describeContents();
-    method public String getBSSID();
-    method public static android.net.NetworkInfo.DetailedState getDetailedStateOf(android.net.wifi.SupplicantState);
-    method public int getFrequency();
-    method public boolean getHiddenSSID();
-    method public int getIpAddress();
-    method public int getLinkSpeed();
-    method public String getMacAddress();
-    method public int getMaxSupportedRxLinkSpeedMbps();
-    method public int getMaxSupportedTxLinkSpeedMbps();
-    method public int getNetworkId();
-    method @Nullable public String getPasspointFqdn();
-    method @Nullable public String getPasspointProviderFriendlyName();
-    method public int getRssi();
-    method @IntRange(from=0xffffffff) public int getRxLinkSpeedMbps();
-    method public String getSSID();
-    method public android.net.wifi.SupplicantState getSupplicantState();
-    method @IntRange(from=0xffffffff) public int getTxLinkSpeedMbps();
-    method public int getWifiStandard();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final String FREQUENCY_UNITS = "MHz";
-    field public static final String LINK_SPEED_UNITS = "Mbps";
-    field public static final int LINK_SPEED_UNKNOWN = -1; // 0xffffffff
-  }
-
-  public static final class WifiInfo.Builder {
-    ctor public WifiInfo.Builder();
-    method @NonNull public android.net.wifi.WifiInfo build();
-    method @NonNull public android.net.wifi.WifiInfo.Builder setBssid(@NonNull String);
-    method @NonNull public android.net.wifi.WifiInfo.Builder setNetworkId(int);
-    method @NonNull public android.net.wifi.WifiInfo.Builder setRssi(int);
-    method @NonNull public android.net.wifi.WifiInfo.Builder setSsid(@NonNull byte[]);
-  }
-
-  public class WifiManager {
-    method @Deprecated public int addNetwork(android.net.wifi.WifiConfiguration);
-    method @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public int addNetworkSuggestions(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>);
-    method public void addOrUpdatePasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public void addSuggestionConnectionStatusListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SuggestionConnectionStatusListener);
-    method @Deprecated public static int calculateSignalLevel(int, int);
-    method @IntRange(from=0) public int calculateSignalLevel(int);
-    method @Deprecated public void cancelWps(android.net.wifi.WifiManager.WpsCallback);
-    method public static int compareSignalLevel(int, int);
-    method public android.net.wifi.WifiManager.MulticastLock createMulticastLock(String);
-    method public android.net.wifi.WifiManager.WifiLock createWifiLock(int, String);
-    method @Deprecated public android.net.wifi.WifiManager.WifiLock createWifiLock(String);
-    method @Deprecated public boolean disableNetwork(int);
-    method @Deprecated public boolean disconnect();
-    method @Deprecated public boolean enableNetwork(int, boolean);
-    method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.List<android.net.wifi.WifiConfiguration> getConfiguredNetworks();
-    method public android.net.wifi.WifiInfo getConnectionInfo();
-    method public android.net.DhcpInfo getDhcpInfo();
-    method public int getMaxNumberOfNetworkSuggestionsPerApp();
-    method @IntRange(from=0) public int getMaxSignalLevel();
-    method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public java.util.List<android.net.wifi.WifiNetworkSuggestion> getNetworkSuggestions();
-    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.hotspot2.PasspointConfiguration> getPasspointConfigurations();
-    method public java.util.List<android.net.wifi.ScanResult> getScanResults();
-    method public int getWifiState();
-    method public boolean is5GHzBandSupported();
-    method public boolean is6GHzBandSupported();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isAutoWakeupEnabled();
-    method @Deprecated public boolean isDeviceToApRttSupported();
-    method public boolean isEasyConnectSupported();
-    method public boolean isEnhancedOpenSupported();
-    method public boolean isEnhancedPowerReportingSupported();
-    method public boolean isP2pSupported();
-    method public boolean isPreferredNetworkOffloadSupported();
-    method @Deprecated public boolean isScanAlwaysAvailable();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isScanThrottleEnabled();
-    method public boolean isStaApConcurrencySupported();
-    method public boolean isTdlsSupported();
-    method public boolean isWapiSupported();
-    method public boolean isWifiEnabled();
-    method public boolean isWifiStandardSupported(int);
-    method public boolean isWpa3SaeSupported();
-    method public boolean isWpa3SuiteBSupported();
-    method @Deprecated public boolean pingSupplicant();
-    method @Deprecated public boolean reassociate();
-    method @Deprecated public boolean reconnect();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void registerScanResultsCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.ScanResultsCallback);
-    method @Deprecated public boolean removeNetwork(int);
-    method @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public int removeNetworkSuggestions(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>);
-    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_CARRIER_PROVISIONING}) public void removePasspointConfiguration(String);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void removeSuggestionConnectionStatusListener(@NonNull android.net.wifi.WifiManager.SuggestionConnectionStatusListener);
-    method @Deprecated public boolean saveConfiguration();
-    method public void setTdlsEnabled(java.net.InetAddress, boolean);
-    method public void setTdlsEnabledWithMacAddress(String, boolean);
-    method @Deprecated public boolean setWifiEnabled(boolean);
-    method @RequiresPermission(allOf={android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, @Nullable android.os.Handler);
-    method @Deprecated public boolean startScan();
-    method @Deprecated public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void unregisterScanResultsCallback(@NonNull android.net.wifi.WifiManager.ScanResultsCallback);
-    method @Deprecated public int updateNetwork(android.net.wifi.WifiConfiguration);
-    field public static final String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
-    field public static final String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE = "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
-    field public static final String ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION = "android.net.wifi.action.WIFI_NETWORK_SUGGESTION_POST_CONNECTION";
-    field public static final String ACTION_WIFI_SCAN_AVAILABILITY_CHANGED = "android.net.wifi.action.WIFI_SCAN_AVAILABILITY_CHANGED";
-    field @Deprecated public static final int ERROR_AUTHENTICATING = 1; // 0x1
-    field @Deprecated public static final String EXTRA_BSSID = "bssid";
-    field public static final String EXTRA_NETWORK_INFO = "networkInfo";
-    field public static final String EXTRA_NETWORK_SUGGESTION = "android.net.wifi.extra.NETWORK_SUGGESTION";
-    field public static final String EXTRA_NEW_RSSI = "newRssi";
-    field @Deprecated public static final String EXTRA_NEW_STATE = "newState";
-    field public static final String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
-    field public static final String EXTRA_RESULTS_UPDATED = "resultsUpdated";
-    field public static final String EXTRA_SCAN_AVAILABLE = "android.net.wifi.extra.SCAN_AVAILABLE";
-    field @Deprecated public static final String EXTRA_SUPPLICANT_CONNECTED = "connected";
-    field @Deprecated public static final String EXTRA_SUPPLICANT_ERROR = "supplicantError";
-    field @Deprecated public static final String EXTRA_WIFI_INFO = "wifiInfo";
-    field public static final String EXTRA_WIFI_STATE = "wifi_state";
-    field public static final String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
-    field public static final String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
-    field public static final String RSSI_CHANGED_ACTION = "android.net.wifi.RSSI_CHANGED";
-    field public static final String SCAN_RESULTS_AVAILABLE_ACTION = "android.net.wifi.SCAN_RESULTS";
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_DUPLICATE = 3; // 0x3
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_EXCEEDS_MAX_PER_APP = 4; // 0x4
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID = 7; // 0x7
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED = 6; // 0x6
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED = 2; // 0x2
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL = 1; // 0x1
-    field public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID = 5; // 0x5
-    field public static final int STATUS_NETWORK_SUGGESTIONS_SUCCESS = 0; // 0x0
-    field public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION = 1; // 0x1
-    field public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION = 2; // 0x2
-    field public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING = 3; // 0x3
-    field public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN = 0; // 0x0
-    field @Deprecated public static final String SUPPLICANT_CONNECTION_CHANGE_ACTION = "android.net.wifi.supplicant.CONNECTION_CHANGE";
-    field @Deprecated public static final String SUPPLICANT_STATE_CHANGED_ACTION = "android.net.wifi.supplicant.STATE_CHANGE";
-    field public static final String UNKNOWN_SSID = "<unknown ssid>";
-    field @Deprecated public static final int WIFI_MODE_FULL = 1; // 0x1
-    field public static final int WIFI_MODE_FULL_HIGH_PERF = 3; // 0x3
-    field public static final int WIFI_MODE_FULL_LOW_LATENCY = 4; // 0x4
-    field @Deprecated public static final int WIFI_MODE_SCAN_ONLY = 2; // 0x2
-    field public static final String WIFI_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_STATE_CHANGED";
-    field public static final int WIFI_STATE_DISABLED = 1; // 0x1
-    field public static final int WIFI_STATE_DISABLING = 0; // 0x0
-    field public static final int WIFI_STATE_ENABLED = 3; // 0x3
-    field public static final int WIFI_STATE_ENABLING = 2; // 0x2
-    field public static final int WIFI_STATE_UNKNOWN = 4; // 0x4
-    field @Deprecated public static final int WPS_AUTH_FAILURE = 6; // 0x6
-    field @Deprecated public static final int WPS_OVERLAP_ERROR = 3; // 0x3
-    field @Deprecated public static final int WPS_TIMED_OUT = 7; // 0x7
-    field @Deprecated public static final int WPS_TKIP_ONLY_PROHIBITED = 5; // 0x5
-    field @Deprecated public static final int WPS_WEP_PROHIBITED = 4; // 0x4
-  }
-
-  public static class WifiManager.LocalOnlyHotspotCallback {
-    ctor public WifiManager.LocalOnlyHotspotCallback();
-    method public void onFailed(int);
-    method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation);
-    method public void onStopped();
-    field public static final int ERROR_GENERIC = 2; // 0x2
-    field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3
-    field public static final int ERROR_NO_CHANNEL = 1; // 0x1
-    field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4
-  }
-
-  public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable {
-    method public void close();
-    method @NonNull public android.net.wifi.SoftApConfiguration getSoftApConfiguration();
-    method @Deprecated @Nullable public android.net.wifi.WifiConfiguration getWifiConfiguration();
-  }
-
-  public class WifiManager.MulticastLock {
-    method public void acquire();
-    method public boolean isHeld();
-    method public void release();
-    method public void setReferenceCounted(boolean);
-  }
-
-  public abstract static class WifiManager.ScanResultsCallback {
-    ctor public WifiManager.ScanResultsCallback();
-    method public abstract void onScanResultsAvailable();
-  }
-
-  public static interface WifiManager.SuggestionConnectionStatusListener {
-    method public void onConnectionStatus(@NonNull android.net.wifi.WifiNetworkSuggestion, int);
-  }
-
-  public class WifiManager.WifiLock {
-    method public void acquire();
-    method public boolean isHeld();
-    method public void release();
-    method public void setReferenceCounted(boolean);
-    method public void setWorkSource(android.os.WorkSource);
-  }
-
-  @Deprecated public abstract static class WifiManager.WpsCallback {
-    ctor @Deprecated public WifiManager.WpsCallback();
-    method @Deprecated public abstract void onFailed(int);
-    method @Deprecated public abstract void onStarted(String);
-    method @Deprecated public abstract void onSucceeded();
-  }
-
-  public final class WifiNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkSpecifier> CREATOR;
-  }
-
-  public static final class WifiNetworkSpecifier.Builder {
-    ctor public WifiNetworkSpecifier.Builder();
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier build();
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setBssid(@NonNull android.net.MacAddress);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setBssidPattern(@NonNull android.net.MacAddress, @NonNull android.net.MacAddress);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setIsEnhancedOpen(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setIsHiddenSsid(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setSsid(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setSsidPattern(@NonNull android.os.PatternMatcher);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setWpa2Passphrase(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setWpa3EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
-    method @NonNull public android.net.wifi.WifiNetworkSpecifier.Builder setWpa3Passphrase(@NonNull String);
-  }
-
-  public final class WifiNetworkSuggestion implements android.os.Parcelable {
-    method public int describeContents();
-    method @Nullable public android.net.MacAddress getBssid();
-    method @Nullable public android.net.wifi.WifiEnterpriseConfig getEnterpriseConfig();
-    method @Nullable public String getPassphrase();
-    method @Nullable public android.net.wifi.hotspot2.PasspointConfiguration getPasspointConfig();
-    method @IntRange(from=0) public int getPriority();
-    method @Nullable public String getSsid();
-    method public boolean isAppInteractionRequired();
-    method public boolean isCredentialSharedWithUser();
-    method public boolean isEnhancedOpen();
-    method public boolean isHiddenSsid();
-    method public boolean isInitialAutojoinEnabled();
-    method public boolean isMetered();
-    method public boolean isUntrusted();
-    method public boolean isUserInteractionRequired();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkSuggestion> CREATOR;
-  }
-
-  public static final class WifiNetworkSuggestion.Builder {
-    ctor public WifiNetworkSuggestion.Builder();
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion build();
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setBssid(@NonNull android.net.MacAddress);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setCredentialSharedWithUser(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsAppInteractionRequired(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsEnhancedOpen(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsHiddenSsid(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsInitialAutojoinEnabled(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsMetered(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setIsUserInteractionRequired(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setPasspointConfig(@NonNull android.net.wifi.hotspot2.PasspointConfiguration);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setPriority(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setSsid(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setUntrusted(boolean);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWapiEnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWapiPassphrase(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa2Passphrase(@NonNull String);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3EnterpriseConfig(@NonNull android.net.wifi.WifiEnterpriseConfig);
-    method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setWpa3Passphrase(@NonNull String);
-  }
-
-  public class WpsInfo implements android.os.Parcelable {
-    ctor public WpsInfo();
-    ctor public WpsInfo(android.net.wifi.WpsInfo);
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public String BSSID;
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WpsInfo> CREATOR;
-    field public static final int DISPLAY = 1; // 0x1
-    field public static final int INVALID = 4; // 0x4
-    field public static final int KEYPAD = 2; // 0x2
-    field public static final int LABEL = 3; // 0x3
-    field public static final int PBC = 0; // 0x0
-    field public String pin;
-    field public int setup;
-  }
-
-}
-
-package android.net.wifi.aware {
-
-  public class AttachCallback {
-    ctor public AttachCallback();
-    method public void onAttachFailed();
-    method public void onAttached(android.net.wifi.aware.WifiAwareSession);
-  }
-
-  public final class Characteristics implements android.os.Parcelable {
-    method public int describeContents();
-    method public int getMaxMatchFilterLength();
-    method public int getMaxServiceNameLength();
-    method public int getMaxServiceSpecificInfoLength();
-    method public int getSupportedCipherSuites();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.Characteristics> CREATOR;
-    field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1; // 0x1
-    field public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 2; // 0x2
-  }
-
-  public class DiscoverySession implements java.lang.AutoCloseable {
-    method public void close();
-    method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierOpen(@NonNull android.net.wifi.aware.PeerHandle);
-    method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPassphrase(@NonNull android.net.wifi.aware.PeerHandle, @NonNull String);
-    method public void sendMessage(@NonNull android.net.wifi.aware.PeerHandle, int, @Nullable byte[]);
-  }
-
-  public class DiscoverySessionCallback {
-    ctor public DiscoverySessionCallback();
-    method public void onMessageReceived(android.net.wifi.aware.PeerHandle, byte[]);
-    method public void onMessageSendFailed(int);
-    method public void onMessageSendSucceeded(int);
-    method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession);
-    method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>);
-    method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int);
-    method public void onSessionConfigFailed();
-    method public void onSessionConfigUpdated();
-    method public void onSessionTerminated();
-    method public void onSubscribeStarted(@NonNull android.net.wifi.aware.SubscribeDiscoverySession);
-  }
-
-  public class IdentityChangedListener {
-    ctor public IdentityChangedListener();
-    method public void onIdentityChanged(byte[]);
-  }
-
-  public final class ParcelablePeerHandle extends android.net.wifi.aware.PeerHandle implements android.os.Parcelable {
-    ctor public ParcelablePeerHandle(@NonNull android.net.wifi.aware.PeerHandle);
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.ParcelablePeerHandle> CREATOR;
-  }
-
-  public class PeerHandle {
-  }
-
-  public final class PublishConfig implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.PublishConfig> CREATOR;
-    field public static final int PUBLISH_TYPE_SOLICITED = 1; // 0x1
-    field public static final int PUBLISH_TYPE_UNSOLICITED = 0; // 0x0
-  }
-
-  public static final class PublishConfig.Builder {
-    ctor public PublishConfig.Builder();
-    method public android.net.wifi.aware.PublishConfig build();
-    method public android.net.wifi.aware.PublishConfig.Builder setMatchFilter(@Nullable java.util.List<byte[]>);
-    method public android.net.wifi.aware.PublishConfig.Builder setPublishType(int);
-    method public android.net.wifi.aware.PublishConfig.Builder setRangingEnabled(boolean);
-    method public android.net.wifi.aware.PublishConfig.Builder setServiceName(@NonNull String);
-    method public android.net.wifi.aware.PublishConfig.Builder setServiceSpecificInfo(@Nullable byte[]);
-    method public android.net.wifi.aware.PublishConfig.Builder setTerminateNotificationEnabled(boolean);
-    method public android.net.wifi.aware.PublishConfig.Builder setTtlSec(int);
-  }
-
-  public class PublishDiscoverySession extends android.net.wifi.aware.DiscoverySession {
-    method public void updatePublish(@NonNull android.net.wifi.aware.PublishConfig);
-  }
-
-  public final class SubscribeConfig implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.SubscribeConfig> CREATOR;
-    field public static final int SUBSCRIBE_TYPE_ACTIVE = 1; // 0x1
-    field public static final int SUBSCRIBE_TYPE_PASSIVE = 0; // 0x0
-  }
-
-  public static final class SubscribeConfig.Builder {
-    ctor public SubscribeConfig.Builder();
-    method public android.net.wifi.aware.SubscribeConfig build();
-    method public android.net.wifi.aware.SubscribeConfig.Builder setMatchFilter(@Nullable java.util.List<byte[]>);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setMaxDistanceMm(int);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setMinDistanceMm(int);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setServiceName(@NonNull String);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setServiceSpecificInfo(@Nullable byte[]);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setSubscribeType(int);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setTerminateNotificationEnabled(boolean);
-    method public android.net.wifi.aware.SubscribeConfig.Builder setTtlSec(int);
-  }
-
-  public class SubscribeDiscoverySession extends android.net.wifi.aware.DiscoverySession {
-    method public void updateSubscribe(@NonNull android.net.wifi.aware.SubscribeConfig);
-  }
-
-  public class WifiAwareManager {
-    method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @Nullable android.os.Handler);
-    method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler);
-    method public android.net.wifi.aware.Characteristics getCharacteristics();
-    method public boolean isAvailable();
-    field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
-    field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0
-    field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
-  }
-
-  public final class WifiAwareNetworkInfo implements android.os.Parcelable android.net.TransportInfo {
-    method public int describeContents();
-    method @Nullable public java.net.Inet6Address getPeerIpv6Addr();
-    method public int getPort();
-    method public int getTransportProtocol();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.WifiAwareNetworkInfo> CREATOR;
-  }
-
-  public final class WifiAwareNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.aware.WifiAwareNetworkSpecifier> CREATOR;
-  }
-
-  public static final class WifiAwareNetworkSpecifier.Builder {
-    ctor public WifiAwareNetworkSpecifier.Builder(@NonNull android.net.wifi.aware.DiscoverySession, @NonNull android.net.wifi.aware.PeerHandle);
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier build();
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPmk(@NonNull byte[]);
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPort(@IntRange(from=0, to=65535) int);
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setPskPassphrase(@NonNull String);
-    method @NonNull public android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder setTransportProtocol(@IntRange(from=0, to=255) int);
-  }
-
-  public class WifiAwareSession implements java.lang.AutoCloseable {
-    method public void close();
-    method public android.net.NetworkSpecifier createNetworkSpecifierOpen(int, @NonNull byte[]);
-    method public android.net.NetworkSpecifier createNetworkSpecifierPassphrase(int, @NonNull byte[], @NonNull String);
-    method public void publish(@NonNull android.net.wifi.aware.PublishConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
-    method public void subscribe(@NonNull android.net.wifi.aware.SubscribeConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
-  }
-
-}
-
-package android.net.wifi.hotspot2 {
-
-  public final class ConfigParser {
-    method public static android.net.wifi.hotspot2.PasspointConfiguration parsePasspointConfig(String, byte[]);
-  }
-
-  public final class PasspointConfiguration implements android.os.Parcelable {
-    ctor public PasspointConfiguration();
-    ctor public PasspointConfiguration(android.net.wifi.hotspot2.PasspointConfiguration);
-    method public int describeContents();
-    method public android.net.wifi.hotspot2.pps.Credential getCredential();
-    method public android.net.wifi.hotspot2.pps.HomeSp getHomeSp();
-    method public long getSubscriptionExpirationTimeMillis();
-    method @NonNull public String getUniqueId();
-    method public boolean isOsuProvisioned();
-    method public void setCredential(android.net.wifi.hotspot2.pps.Credential);
-    method public void setHomeSp(android.net.wifi.hotspot2.pps.HomeSp);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.PasspointConfiguration> CREATOR;
-  }
-
-}
-
-package android.net.wifi.hotspot2.omadm {
-
-  public final class PpsMoParser {
-    method public static android.net.wifi.hotspot2.PasspointConfiguration parseMoText(String);
-  }
-
-}
-
-package android.net.wifi.hotspot2.pps {
-
-  public final class Credential implements android.os.Parcelable {
-    ctor public Credential();
-    ctor public Credential(android.net.wifi.hotspot2.pps.Credential);
-    method public int describeContents();
-    method public java.security.cert.X509Certificate getCaCertificate();
-    method public android.net.wifi.hotspot2.pps.Credential.CertificateCredential getCertCredential();
-    method public java.security.cert.X509Certificate[] getClientCertificateChain();
-    method public java.security.PrivateKey getClientPrivateKey();
-    method public String getRealm();
-    method public android.net.wifi.hotspot2.pps.Credential.SimCredential getSimCredential();
-    method public android.net.wifi.hotspot2.pps.Credential.UserCredential getUserCredential();
-    method public void setCaCertificate(java.security.cert.X509Certificate);
-    method public void setCertCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
-    method public void setClientCertificateChain(java.security.cert.X509Certificate[]);
-    method public void setClientPrivateKey(java.security.PrivateKey);
-    method public void setRealm(String);
-    method public void setSimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
-    method public void setUserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential> CREATOR;
-  }
-
-  public static final class Credential.CertificateCredential implements android.os.Parcelable {
-    ctor public Credential.CertificateCredential();
-    ctor public Credential.CertificateCredential(android.net.wifi.hotspot2.pps.Credential.CertificateCredential);
-    method public int describeContents();
-    method public byte[] getCertSha256Fingerprint();
-    method public String getCertType();
-    method public void setCertSha256Fingerprint(byte[]);
-    method public void setCertType(String);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.CertificateCredential> CREATOR;
-  }
-
-  public static final class Credential.SimCredential implements android.os.Parcelable {
-    ctor public Credential.SimCredential();
-    ctor public Credential.SimCredential(android.net.wifi.hotspot2.pps.Credential.SimCredential);
-    method public int describeContents();
-    method public int getEapType();
-    method public String getImsi();
-    method public void setEapType(int);
-    method public void setImsi(String);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.SimCredential> CREATOR;
-  }
-
-  public static final class Credential.UserCredential implements android.os.Parcelable {
-    ctor public Credential.UserCredential();
-    ctor public Credential.UserCredential(android.net.wifi.hotspot2.pps.Credential.UserCredential);
-    method public int describeContents();
-    method public int getEapType();
-    method public String getNonEapInnerMethod();
-    method public String getPassword();
-    method public String getUsername();
-    method public void setEapType(int);
-    method public void setNonEapInnerMethod(String);
-    method public void setPassword(String);
-    method public void setUsername(String);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.Credential.UserCredential> CREATOR;
-  }
-
-  public final class HomeSp implements android.os.Parcelable {
-    ctor public HomeSp();
-    ctor public HomeSp(android.net.wifi.hotspot2.pps.HomeSp);
-    method public int describeContents();
-    method public String getFqdn();
-    method public String getFriendlyName();
-    method public long[] getRoamingConsortiumOis();
-    method public void setFqdn(String);
-    method public void setFriendlyName(String);
-    method public void setRoamingConsortiumOis(long[]);
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.pps.HomeSp> CREATOR;
-  }
-
-}
-
-package android.net.wifi.p2p {
-
-  public class WifiP2pConfig implements android.os.Parcelable {
-    ctor public WifiP2pConfig();
-    ctor public WifiP2pConfig(android.net.wifi.p2p.WifiP2pConfig);
-    method public int describeContents();
-    method public int getGroupOwnerBand();
-    method public int getNetworkId();
-    method @Nullable public String getNetworkName();
-    method @Nullable public String getPassphrase();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pConfig> CREATOR;
-    field public static final int GROUP_OWNER_BAND_2GHZ = 1; // 0x1
-    field public static final int GROUP_OWNER_BAND_5GHZ = 2; // 0x2
-    field public static final int GROUP_OWNER_BAND_AUTO = 0; // 0x0
-    field public static final int GROUP_OWNER_INTENT_AUTO = -1; // 0xffffffff
-    field public static final int GROUP_OWNER_INTENT_MAX = 15; // 0xf
-    field public static final int GROUP_OWNER_INTENT_MIN = 0; // 0x0
-    field public String deviceAddress;
-    field @IntRange(from=0, to=15) public int groupOwnerIntent;
-    field public android.net.wifi.WpsInfo wps;
-  }
-
-  public static final class WifiP2pConfig.Builder {
-    ctor public WifiP2pConfig.Builder();
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig build();
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder enablePersistentMode(boolean);
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder setDeviceAddress(@Nullable android.net.MacAddress);
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder setGroupOperatingBand(int);
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder setGroupOperatingFrequency(int);
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder setNetworkName(@NonNull String);
-    method @NonNull public android.net.wifi.p2p.WifiP2pConfig.Builder setPassphrase(@NonNull String);
-  }
-
-  public class WifiP2pDevice implements android.os.Parcelable {
-    ctor public WifiP2pDevice();
-    ctor public WifiP2pDevice(android.net.wifi.p2p.WifiP2pDevice);
-    method public int describeContents();
-    method @Nullable public android.net.wifi.p2p.WifiP2pWfdInfo getWfdInfo();
-    method public boolean isGroupOwner();
-    method public boolean isServiceDiscoveryCapable();
-    method public void update(@NonNull android.net.wifi.p2p.WifiP2pDevice);
-    method public boolean wpsDisplaySupported();
-    method public boolean wpsKeypadSupported();
-    method public boolean wpsPbcSupported();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int AVAILABLE = 3; // 0x3
-    field public static final int CONNECTED = 0; // 0x0
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pDevice> CREATOR;
-    field public static final int FAILED = 2; // 0x2
-    field public static final int INVITED = 1; // 0x1
-    field public static final int UNAVAILABLE = 4; // 0x4
-    field public String deviceAddress;
-    field public String deviceName;
-    field public String primaryDeviceType;
-    field public String secondaryDeviceType;
-    field public int status;
-  }
-
-  public class WifiP2pDeviceList implements android.os.Parcelable {
-    ctor public WifiP2pDeviceList();
-    ctor public WifiP2pDeviceList(android.net.wifi.p2p.WifiP2pDeviceList);
-    method public int describeContents();
-    method public android.net.wifi.p2p.WifiP2pDevice get(String);
-    method public java.util.Collection<android.net.wifi.p2p.WifiP2pDevice> getDeviceList();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pDeviceList> CREATOR;
-  }
-
-  public class WifiP2pGroup implements android.os.Parcelable {
-    ctor public WifiP2pGroup();
-    ctor public WifiP2pGroup(android.net.wifi.p2p.WifiP2pGroup);
-    method public int describeContents();
-    method public java.util.Collection<android.net.wifi.p2p.WifiP2pDevice> getClientList();
-    method public int getFrequency();
-    method public String getInterface();
-    method public int getNetworkId();
-    method public String getNetworkName();
-    method public android.net.wifi.p2p.WifiP2pDevice getOwner();
-    method public String getPassphrase();
-    method public boolean isGroupOwner();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pGroup> CREATOR;
-    field public static final int NETWORK_ID_PERSISTENT = -2; // 0xfffffffe
-    field public static final int NETWORK_ID_TEMPORARY = -1; // 0xffffffff
-  }
-
-  public class WifiP2pInfo implements android.os.Parcelable {
-    ctor public WifiP2pInfo();
-    ctor public WifiP2pInfo(android.net.wifi.p2p.WifiP2pInfo);
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pInfo> CREATOR;
-    field public boolean groupFormed;
-    field public java.net.InetAddress groupOwnerAddress;
-    field public boolean isGroupOwner;
-  }
-
-  public class WifiP2pManager {
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void addLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void addServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void cancelConnect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void clearLocalServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void clearServiceRequests(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void connect(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pConfig, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void createGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void createGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pConfig, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void discoverPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void discoverServices(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public android.net.wifi.p2p.WifiP2pManager.Channel initialize(android.content.Context, android.os.Looper, android.net.wifi.p2p.WifiP2pManager.ChannelListener);
-    method public void removeGroup(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void removeLocalService(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void removeServiceRequest(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.nsd.WifiP2pServiceRequest, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method public void requestConnectionInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestDeviceInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.DeviceInfoListener);
-    method public void requestDiscoveryState(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.DiscoveryStateListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.GroupInfoListener);
-    method public void requestNetworkInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.NetworkInfoListener);
-    method public void requestP2pState(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pManager.P2pStateListener);
-    method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestPeers(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PeerListListener);
-    method public void setDnsSdResponseListeners(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.DnsSdServiceResponseListener, android.net.wifi.p2p.WifiP2pManager.DnsSdTxtRecordListener);
-    method public void setServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ServiceResponseListener);
-    method public void setUpnpServiceResponseListener(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.UpnpServiceResponseListener);
-    method public void stopPeerDiscovery(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    field public static final int BUSY = 2; // 0x2
-    field public static final int ERROR = 0; // 0x0
-    field public static final String EXTRA_DISCOVERY_STATE = "discoveryState";
-    field public static final String EXTRA_NETWORK_INFO = "networkInfo";
-    field public static final String EXTRA_P2P_DEVICE_LIST = "wifiP2pDeviceList";
-    field public static final String EXTRA_WIFI_P2P_DEVICE = "wifiP2pDevice";
-    field public static final String EXTRA_WIFI_P2P_GROUP = "p2pGroupInfo";
-    field public static final String EXTRA_WIFI_P2P_INFO = "wifiP2pInfo";
-    field public static final String EXTRA_WIFI_STATE = "wifi_p2p_state";
-    field public static final int NO_SERVICE_REQUESTS = 3; // 0x3
-    field public static final int P2P_UNSUPPORTED = 1; // 0x1
-    field public static final String WIFI_P2P_CONNECTION_CHANGED_ACTION = "android.net.wifi.p2p.CONNECTION_STATE_CHANGE";
-    field public static final String WIFI_P2P_DISCOVERY_CHANGED_ACTION = "android.net.wifi.p2p.DISCOVERY_STATE_CHANGE";
-    field public static final int WIFI_P2P_DISCOVERY_STARTED = 2; // 0x2
-    field public static final int WIFI_P2P_DISCOVERY_STOPPED = 1; // 0x1
-    field public static final String WIFI_P2P_PEERS_CHANGED_ACTION = "android.net.wifi.p2p.PEERS_CHANGED";
-    field public static final String WIFI_P2P_STATE_CHANGED_ACTION = "android.net.wifi.p2p.STATE_CHANGED";
-    field public static final int WIFI_P2P_STATE_DISABLED = 1; // 0x1
-    field public static final int WIFI_P2P_STATE_ENABLED = 2; // 0x2
-    field public static final String WIFI_P2P_THIS_DEVICE_CHANGED_ACTION = "android.net.wifi.p2p.THIS_DEVICE_CHANGED";
-  }
-
-  public static interface WifiP2pManager.ActionListener {
-    method public void onFailure(int);
-    method public void onSuccess();
-  }
-
-  public static class WifiP2pManager.Channel implements java.lang.AutoCloseable {
-    method public void close();
-  }
-
-  public static interface WifiP2pManager.ChannelListener {
-    method public void onChannelDisconnected();
-  }
-
-  public static interface WifiP2pManager.ConnectionInfoListener {
-    method public void onConnectionInfoAvailable(android.net.wifi.p2p.WifiP2pInfo);
-  }
-
-  public static interface WifiP2pManager.DeviceInfoListener {
-    method public void onDeviceInfoAvailable(@Nullable android.net.wifi.p2p.WifiP2pDevice);
-  }
-
-  public static interface WifiP2pManager.DiscoveryStateListener {
-    method public void onDiscoveryStateAvailable(int);
-  }
-
-  public static interface WifiP2pManager.DnsSdServiceResponseListener {
-    method public void onDnsSdServiceAvailable(String, String, android.net.wifi.p2p.WifiP2pDevice);
-  }
-
-  public static interface WifiP2pManager.DnsSdTxtRecordListener {
-    method public void onDnsSdTxtRecordAvailable(String, java.util.Map<java.lang.String,java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
-  }
-
-  public static interface WifiP2pManager.GroupInfoListener {
-    method public void onGroupInfoAvailable(android.net.wifi.p2p.WifiP2pGroup);
-  }
-
-  public static interface WifiP2pManager.NetworkInfoListener {
-    method public void onNetworkInfoAvailable(@NonNull android.net.NetworkInfo);
-  }
-
-  public static interface WifiP2pManager.P2pStateListener {
-    method public void onP2pStateAvailable(int);
-  }
-
-  public static interface WifiP2pManager.PeerListListener {
-    method public void onPeersAvailable(android.net.wifi.p2p.WifiP2pDeviceList);
-  }
-
-  public static interface WifiP2pManager.ServiceResponseListener {
-    method public void onServiceAvailable(int, byte[], android.net.wifi.p2p.WifiP2pDevice);
-  }
-
-  public static interface WifiP2pManager.UpnpServiceResponseListener {
-    method public void onUpnpServiceAvailable(java.util.List<java.lang.String>, android.net.wifi.p2p.WifiP2pDevice);
-  }
-
-  public final class WifiP2pWfdInfo implements android.os.Parcelable {
-    ctor public WifiP2pWfdInfo();
-    ctor public WifiP2pWfdInfo(@Nullable android.net.wifi.p2p.WifiP2pWfdInfo);
-    method public int describeContents();
-    method public int getControlPort();
-    method public int getDeviceType();
-    method public int getMaxThroughput();
-    method public boolean isContentProtectionSupported();
-    method public boolean isEnabled();
-    method public boolean isSessionAvailable();
-    method public void setContentProtectionSupported(boolean);
-    method public void setControlPort(@IntRange(from=0) int);
-    method public boolean setDeviceType(int);
-    method public void setEnabled(boolean);
-    method public void setMaxThroughput(@IntRange(from=0) int);
-    method public void setSessionAvailable(boolean);
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pWfdInfo> CREATOR;
-    field public static final int DEVICE_TYPE_PRIMARY_SINK = 1; // 0x1
-    field public static final int DEVICE_TYPE_SECONDARY_SINK = 2; // 0x2
-    field public static final int DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK = 3; // 0x3
-    field public static final int DEVICE_TYPE_WFD_SOURCE = 0; // 0x0
-  }
-
-}
-
-package android.net.wifi.p2p.nsd {
-
-  public class WifiP2pDnsSdServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
-    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo newInstance(String, String, java.util.Map<java.lang.String,java.lang.String>);
-  }
-
-  public class WifiP2pDnsSdServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
-    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance();
-    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(String);
-    method public static android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest newInstance(String, String);
-  }
-
-  public class WifiP2pServiceInfo implements android.os.Parcelable {
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int SERVICE_TYPE_ALL = 0; // 0x0
-    field public static final int SERVICE_TYPE_BONJOUR = 1; // 0x1
-    field public static final int SERVICE_TYPE_UPNP = 2; // 0x2
-    field public static final int SERVICE_TYPE_VENDOR_SPECIFIC = 255; // 0xff
-  }
-
-  public class WifiP2pServiceRequest implements android.os.Parcelable {
-    method public int describeContents();
-    method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int, String);
-    method public static android.net.wifi.p2p.nsd.WifiP2pServiceRequest newInstance(int);
-    method public void writeToParcel(android.os.Parcel, int);
-  }
-
-  public class WifiP2pUpnpServiceInfo extends android.net.wifi.p2p.nsd.WifiP2pServiceInfo {
-    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo newInstance(String, String, java.util.List<java.lang.String>);
-  }
-
-  public class WifiP2pUpnpServiceRequest extends android.net.wifi.p2p.nsd.WifiP2pServiceRequest {
-    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance();
-    method public static android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest newInstance(String);
-  }
-
-}
-
-package android.net.wifi.rtt {
-
-  public class CivicLocationKeys {
-    field public static final int ADDITIONAL_CODE = 32; // 0x20
-    field public static final int APT = 26; // 0x1a
-    field public static final int BOROUGH = 4; // 0x4
-    field public static final int BRANCH_ROAD_NAME = 36; // 0x24
-    field public static final int BUILDING = 25; // 0x19
-    field public static final int CITY = 3; // 0x3
-    field public static final int COUNTY = 2; // 0x2
-    field public static final int DESK = 33; // 0x21
-    field public static final int FLOOR = 27; // 0x1b
-    field public static final int GROUP_OF_STREETS = 6; // 0x6
-    field public static final int HNO = 19; // 0x13
-    field public static final int HNS = 20; // 0x14
-    field public static final int LANGUAGE = 0; // 0x0
-    field public static final int LMK = 21; // 0x15
-    field public static final int LOC = 22; // 0x16
-    field public static final int NAM = 23; // 0x17
-    field public static final int NEIGHBORHOOD = 5; // 0x5
-    field public static final int PCN = 30; // 0x1e
-    field public static final int POD = 17; // 0x11
-    field public static final int POSTAL_CODE = 24; // 0x18
-    field public static final int PO_BOX = 31; // 0x1f
-    field public static final int PRD = 16; // 0x10
-    field public static final int PRIMARY_ROAD_NAME = 34; // 0x22
-    field public static final int ROAD_SECTION = 35; // 0x23
-    field public static final int ROOM = 28; // 0x1c
-    field public static final int SCRIPT = 128; // 0x80
-    field public static final int STATE = 1; // 0x1
-    field public static final int STREET_NAME_POST_MODIFIER = 39; // 0x27
-    field public static final int STREET_NAME_PRE_MODIFIER = 38; // 0x26
-    field public static final int STS = 18; // 0x12
-    field public static final int SUBBRANCH_ROAD_NAME = 37; // 0x25
-    field public static final int TYPE_OF_PLACE = 29; // 0x1d
-  }
-
-  public final class RangingRequest implements android.os.Parcelable {
-    method public int describeContents();
-    method public static int getMaxPeers();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.RangingRequest> CREATOR;
-  }
-
-  public static final class RangingRequest.Builder {
-    ctor public RangingRequest.Builder();
-    method public android.net.wifi.rtt.RangingRequest.Builder addAccessPoint(@NonNull android.net.wifi.ScanResult);
-    method public android.net.wifi.rtt.RangingRequest.Builder addAccessPoints(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    method public android.net.wifi.rtt.RangingRequest.Builder addWifiAwarePeer(@NonNull android.net.MacAddress);
-    method public android.net.wifi.rtt.RangingRequest.Builder addWifiAwarePeer(@NonNull android.net.wifi.aware.PeerHandle);
-    method public android.net.wifi.rtt.RangingRequest build();
-  }
-
-  public final class RangingResult implements android.os.Parcelable {
-    method public int describeContents();
-    method public int getDistanceMm();
-    method public int getDistanceStdDevMm();
-    method @Nullable public android.net.MacAddress getMacAddress();
-    method public int getNumAttemptedMeasurements();
-    method public int getNumSuccessfulMeasurements();
-    method @Nullable public android.net.wifi.aware.PeerHandle getPeerHandle();
-    method public long getRangingTimestampMillis();
-    method public int getRssi();
-    method public int getStatus();
-    method @Nullable public android.net.wifi.rtt.ResponderLocation getUnverifiedResponderLocation();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.RangingResult> CREATOR;
-    field public static final int STATUS_FAIL = 1; // 0x1
-    field public static final int STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC = 2; // 0x2
-    field public static final int STATUS_SUCCESS = 0; // 0x0
-  }
-
-  public abstract class RangingResultCallback {
-    ctor public RangingResultCallback();
-    method public abstract void onRangingFailure(int);
-    method public abstract void onRangingResults(@NonNull java.util.List<android.net.wifi.rtt.RangingResult>);
-    field public static final int STATUS_CODE_FAIL = 1; // 0x1
-    field public static final int STATUS_CODE_FAIL_RTT_NOT_AVAILABLE = 2; // 0x2
-  }
-
-  public final class ResponderLocation implements android.os.Parcelable {
-    method public int describeContents();
-    method public double getAltitude();
-    method public int getAltitudeType();
-    method public double getAltitudeUncertainty();
-    method public java.util.List<android.net.MacAddress> getColocatedBssids();
-    method public int getDatum();
-    method public int getExpectedToMove();
-    method public double getFloorNumber();
-    method public double getHeightAboveFloorMeters();
-    method public double getHeightAboveFloorUncertaintyMeters();
-    method public double getLatitude();
-    method public double getLatitudeUncertainty();
-    method public int getLciVersion();
-    method public double getLongitude();
-    method public double getLongitudeUncertainty();
-    method @Nullable public String getMapImageMimeType();
-    method @Nullable public android.net.Uri getMapImageUri();
-    method public boolean getRegisteredLocationAgreementIndication();
-    method public boolean isLciSubelementValid();
-    method public boolean isZaxisSubelementValid();
-    method @Nullable public android.location.Address toCivicLocationAddress();
-    method @Nullable public android.util.SparseArray<java.lang.String> toCivicLocationSparseArray();
-    method @NonNull public android.location.Location toLocation();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int ALTITUDE_FLOORS = 2; // 0x2
-    field public static final int ALTITUDE_METERS = 1; // 0x1
-    field public static final int ALTITUDE_UNDEFINED = 0; // 0x0
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderLocation> CREATOR;
-    field public static final int DATUM_NAD83_MLLW = 3; // 0x3
-    field public static final int DATUM_NAD83_NAV88 = 2; // 0x2
-    field public static final int DATUM_UNDEFINED = 0; // 0x0
-    field public static final int DATUM_WGS84 = 1; // 0x1
-    field public static final int LCI_VERSION_1 = 1; // 0x1
-    field public static final int LOCATION_FIXED = 0; // 0x0
-    field public static final int LOCATION_MOVEMENT_UNKNOWN = 2; // 0x2
-    field public static final int LOCATION_RESERVED = 3; // 0x3
-    field public static final int LOCATION_VARIABLE = 1; // 0x1
-  }
-
-  public class WifiRttManager {
-    method public boolean isAvailable();
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE}) public void startRanging(@NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
-    field public static final String ACTION_WIFI_RTT_STATE_CHANGED = "android.net.wifi.rtt.action.WIFI_RTT_STATE_CHANGED";
-  }
-
-}
-
diff --git a/wifi/api/lint-baseline.txt b/wifi/api/lint-baseline.txt
deleted file mode 100644
index 892411f..0000000
--- a/wifi/api/lint-baseline.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-// Baseline format: 1.0
-GenericException: android.net.wifi.WifiManager.LocalOnlyHotspotReservation#finalize():
-    Methods must not throw generic exceptions (`java.lang.Throwable`)
-GenericException: android.net.wifi.WifiManager.MulticastLock#finalize():
-    Methods must not throw generic exceptions (`java.lang.Throwable`)
-GenericException: android.net.wifi.WifiManager.WifiLock#finalize():
-    Methods must not throw generic exceptions (`java.lang.Throwable`)
-
-
-VisiblySynchronized: PsiThisExpression:WifiManager.this:
-    Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.net.wifi.WifiManager.WifiLock.finalize()
-VisiblySynchronized: android.net.wifi.WifiManager.WifiLock#finalize():
-    Internal locks must not be exposed (synchronizing on this or class is still externally observable): method android.net.wifi.WifiManager.WifiLock.finalize()
diff --git a/wifi/api/module-lib-current.txt b/wifi/api/module-lib-current.txt
deleted file mode 100644
index d802177..0000000
--- a/wifi/api/module-lib-current.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/wifi/api/module-lib-removed.txt b/wifi/api/module-lib-removed.txt
deleted file mode 100644
index d802177..0000000
--- a/wifi/api/module-lib-removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/wifi/api/removed.txt b/wifi/api/removed.txt
deleted file mode 100644
index d802177..0000000
--- a/wifi/api/removed.txt
+++ /dev/null
@@ -1 +0,0 @@
-// Signature format: 2.0
diff --git a/wifi/api/system-current.txt b/wifi/api/system-current.txt
deleted file mode 100644
index 07793c1..0000000
--- a/wifi/api/system-current.txt
+++ /dev/null
@@ -1,939 +0,0 @@
-// Signature format: 2.0
-package android.net.wifi {
-
-  public abstract class EasyConnectStatusCallback {
-    ctor public EasyConnectStatusCallback();
-    method public abstract void onConfiguratorSuccess(int);
-    method public abstract void onEnrolleeSuccess(int);
-    method public void onFailure(int);
-    method public void onFailure(int, @Nullable String, @NonNull android.util.SparseArray<int[]>, @NonNull int[]);
-    method public abstract void onProgress(int);
-    field public static final int EASY_CONNECT_EVENT_PROGRESS_AUTHENTICATION_SUCCESS = 0; // 0x0
-    field public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_ACCEPTED = 3; // 0x3
-    field public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_SENT_WAITING_RESPONSE = 2; // 0x2
-    field public static final int EASY_CONNECT_EVENT_PROGRESS_RESPONSE_PENDING = 1; // 0x1
-    field public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED = 1; // 0x1
-    field public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 0; // 0x0
-  }
-
-  @Deprecated public class RttManager {
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void disableResponder(android.net.wifi.RttManager.ResponderCallback);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void enableResponder(android.net.wifi.RttManager.ResponderCallback);
-    method @Deprecated public android.net.wifi.RttManager.Capabilities getCapabilities();
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.net.wifi.RttManager.RttCapabilities getRttCapabilities();
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startRanging(android.net.wifi.RttManager.RttParams[], android.net.wifi.RttManager.RttListener);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopRanging(android.net.wifi.RttManager.RttListener);
-    field @Deprecated public static final int BASE = 160256; // 0x27200
-    field @Deprecated public static final int CMD_OP_ABORTED = 160260; // 0x27204
-    field @Deprecated public static final int CMD_OP_DISABLE_RESPONDER = 160262; // 0x27206
-    field @Deprecated public static final int CMD_OP_ENABLE_RESPONDER = 160261; // 0x27205
-    field @Deprecated public static final int CMD_OP_ENALBE_RESPONDER_FAILED = 160264; // 0x27208
-    field @Deprecated public static final int CMD_OP_ENALBE_RESPONDER_SUCCEEDED = 160263; // 0x27207
-    field @Deprecated public static final int CMD_OP_FAILED = 160258; // 0x27202
-    field @Deprecated public static final int CMD_OP_START_RANGING = 160256; // 0x27200
-    field @Deprecated public static final int CMD_OP_STOP_RANGING = 160257; // 0x27201
-    field @Deprecated public static final int CMD_OP_SUCCEEDED = 160259; // 0x27203
-    field @Deprecated public static final String DESCRIPTION_KEY = "android.net.wifi.RttManager.Description";
-    field @Deprecated public static final int PREAMBLE_HT = 2; // 0x2
-    field @Deprecated public static final int PREAMBLE_LEGACY = 1; // 0x1
-    field @Deprecated public static final int PREAMBLE_VHT = 4; // 0x4
-    field @Deprecated public static final int REASON_INITIATOR_NOT_ALLOWED_WHEN_RESPONDER_ON = -6; // 0xfffffffa
-    field @Deprecated public static final int REASON_INVALID_LISTENER = -3; // 0xfffffffd
-    field @Deprecated public static final int REASON_INVALID_REQUEST = -4; // 0xfffffffc
-    field @Deprecated public static final int REASON_NOT_AVAILABLE = -2; // 0xfffffffe
-    field @Deprecated public static final int REASON_PERMISSION_DENIED = -5; // 0xfffffffb
-    field @Deprecated public static final int REASON_UNSPECIFIED = -1; // 0xffffffff
-    field @Deprecated public static final int RTT_BW_10_SUPPORT = 2; // 0x2
-    field @Deprecated public static final int RTT_BW_160_SUPPORT = 32; // 0x20
-    field @Deprecated public static final int RTT_BW_20_SUPPORT = 4; // 0x4
-    field @Deprecated public static final int RTT_BW_40_SUPPORT = 8; // 0x8
-    field @Deprecated public static final int RTT_BW_5_SUPPORT = 1; // 0x1
-    field @Deprecated public static final int RTT_BW_80_SUPPORT = 16; // 0x10
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_10 = 6; // 0x6
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_160 = 3; // 0x3
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_20 = 0; // 0x0
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_40 = 1; // 0x1
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_5 = 5; // 0x5
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_80 = 2; // 0x2
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_80P80 = 4; // 0x4
-    field @Deprecated public static final int RTT_CHANNEL_WIDTH_UNSPECIFIED = -1; // 0xffffffff
-    field @Deprecated public static final int RTT_PEER_NAN = 5; // 0x5
-    field @Deprecated public static final int RTT_PEER_P2P_CLIENT = 4; // 0x4
-    field @Deprecated public static final int RTT_PEER_P2P_GO = 3; // 0x3
-    field @Deprecated public static final int RTT_PEER_TYPE_AP = 1; // 0x1
-    field @Deprecated public static final int RTT_PEER_TYPE_STA = 2; // 0x2
-    field @Deprecated public static final int RTT_PEER_TYPE_UNSPECIFIED = 0; // 0x0
-    field @Deprecated public static final int RTT_STATUS_ABORTED = 8; // 0x8
-    field @Deprecated public static final int RTT_STATUS_FAILURE = 1; // 0x1
-    field @Deprecated public static final int RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL = 6; // 0x6
-    field @Deprecated public static final int RTT_STATUS_FAIL_BUSY_TRY_LATER = 12; // 0xc
-    field @Deprecated public static final int RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE = 15; // 0xf
-    field @Deprecated public static final int RTT_STATUS_FAIL_INVALID_TS = 9; // 0x9
-    field @Deprecated public static final int RTT_STATUS_FAIL_NOT_SCHEDULED_YET = 4; // 0x4
-    field @Deprecated public static final int RTT_STATUS_FAIL_NO_CAPABILITY = 7; // 0x7
-    field @Deprecated public static final int RTT_STATUS_FAIL_NO_RSP = 2; // 0x2
-    field @Deprecated public static final int RTT_STATUS_FAIL_PROTOCOL = 10; // 0xa
-    field @Deprecated public static final int RTT_STATUS_FAIL_REJECTED = 3; // 0x3
-    field @Deprecated public static final int RTT_STATUS_FAIL_SCHEDULE = 11; // 0xb
-    field @Deprecated public static final int RTT_STATUS_FAIL_TM_TIMEOUT = 5; // 0x5
-    field @Deprecated public static final int RTT_STATUS_INVALID_REQ = 13; // 0xd
-    field @Deprecated public static final int RTT_STATUS_NO_WIFI = 14; // 0xe
-    field @Deprecated public static final int RTT_STATUS_SUCCESS = 0; // 0x0
-    field @Deprecated public static final int RTT_TYPE_11_MC = 4; // 0x4
-    field @Deprecated public static final int RTT_TYPE_11_V = 2; // 0x2
-    field @Deprecated public static final int RTT_TYPE_ONE_SIDED = 1; // 0x1
-    field @Deprecated public static final int RTT_TYPE_TWO_SIDED = 2; // 0x2
-    field @Deprecated public static final int RTT_TYPE_UNSPECIFIED = 0; // 0x0
-  }
-
-  @Deprecated public class RttManager.Capabilities {
-    ctor @Deprecated public RttManager.Capabilities();
-    field @Deprecated public int supportedPeerType;
-    field @Deprecated public int supportedType;
-  }
-
-  @Deprecated public static class RttManager.ParcelableRttParams implements android.os.Parcelable {
-    field @Deprecated @NonNull public android.net.wifi.RttManager.RttParams[] mParams;
-  }
-
-  @Deprecated public static class RttManager.ParcelableRttResults implements android.os.Parcelable {
-    ctor @Deprecated public RttManager.ParcelableRttResults(android.net.wifi.RttManager.RttResult[]);
-    field @Deprecated public android.net.wifi.RttManager.RttResult[] mResults;
-  }
-
-  @Deprecated public abstract static class RttManager.ResponderCallback {
-    ctor @Deprecated public RttManager.ResponderCallback();
-    method @Deprecated public abstract void onResponderEnableFailure(int);
-    method @Deprecated public abstract void onResponderEnabled(android.net.wifi.RttManager.ResponderConfig);
-  }
-
-  @Deprecated public static class RttManager.ResponderConfig implements android.os.Parcelable {
-    ctor @Deprecated public RttManager.ResponderConfig();
-    method @Deprecated public int describeContents();
-    method @Deprecated public void writeToParcel(android.os.Parcel, int);
-    field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.RttManager.ResponderConfig> CREATOR;
-    field @Deprecated public int centerFreq0;
-    field @Deprecated public int centerFreq1;
-    field @Deprecated public int channelWidth;
-    field @Deprecated public int frequency;
-    field @Deprecated public String macAddress;
-    field @Deprecated public int preamble;
-  }
-
-  @Deprecated public static class RttManager.RttCapabilities implements android.os.Parcelable {
-    ctor @Deprecated public RttManager.RttCapabilities();
-    field @Deprecated public int bwSupported;
-    field @Deprecated public boolean lciSupported;
-    field @Deprecated public boolean lcrSupported;
-    field @Deprecated public int mcVersion;
-    field @Deprecated public boolean oneSidedRttSupported;
-    field @Deprecated public int preambleSupported;
-    field @Deprecated public boolean responderSupported;
-    field @Deprecated public boolean secureRttSupported;
-    field @Deprecated public boolean supportedPeerType;
-    field @Deprecated public boolean supportedType;
-    field @Deprecated public boolean twoSided11McRttSupported;
-  }
-
-  @Deprecated public static interface RttManager.RttListener {
-    method @Deprecated public void onAborted();
-    method @Deprecated public void onFailure(int, String);
-    method @Deprecated public void onSuccess(android.net.wifi.RttManager.RttResult[]);
-  }
-
-  @Deprecated public static class RttManager.RttParams {
-    ctor @Deprecated public RttManager.RttParams();
-    field @Deprecated public boolean LCIRequest;
-    field @Deprecated public boolean LCRRequest;
-    field @Deprecated public int bandwidth;
-    field @Deprecated public String bssid;
-    field @Deprecated public int burstTimeout;
-    field @Deprecated public int centerFreq0;
-    field @Deprecated public int centerFreq1;
-    field @Deprecated public int channelWidth;
-    field @Deprecated public int deviceType;
-    field @Deprecated public int frequency;
-    field @Deprecated public int interval;
-    field @Deprecated public int numRetriesPerFTMR;
-    field @Deprecated public int numRetriesPerMeasurementFrame;
-    field @Deprecated public int numSamplesPerBurst;
-    field @Deprecated public int num_retries;
-    field @Deprecated public int num_samples;
-    field @Deprecated public int numberBurst;
-    field @Deprecated public int preamble;
-    field @Deprecated public int requestType;
-    field @Deprecated public boolean secure;
-  }
-
-  @Deprecated public static class RttManager.RttResult {
-    ctor @Deprecated public RttManager.RttResult();
-    field @Deprecated public android.net.wifi.RttManager.WifiInformationElement LCI;
-    field @Deprecated public android.net.wifi.RttManager.WifiInformationElement LCR;
-    field @Deprecated public String bssid;
-    field @Deprecated public int burstDuration;
-    field @Deprecated public int burstNumber;
-    field @Deprecated public int distance;
-    field @Deprecated public int distanceSpread;
-    field @Deprecated public int distanceStandardDeviation;
-    field @Deprecated public int distance_cm;
-    field @Deprecated public int distance_sd_cm;
-    field @Deprecated public int distance_spread_cm;
-    field @Deprecated public int frameNumberPerBurstPeer;
-    field @Deprecated public int measurementFrameNumber;
-    field @Deprecated public int measurementType;
-    field @Deprecated public int negotiatedBurstNum;
-    field @Deprecated public int requestType;
-    field @Deprecated public int retryAfterDuration;
-    field @Deprecated public int rssi;
-    field @Deprecated public int rssiSpread;
-    field @Deprecated public int rssi_spread;
-    field @Deprecated public long rtt;
-    field @Deprecated public long rttSpread;
-    field @Deprecated public long rttStandardDeviation;
-    field @Deprecated public long rtt_ns;
-    field @Deprecated public long rtt_sd_ns;
-    field @Deprecated public long rtt_spread_ns;
-    field @Deprecated public int rxRate;
-    field @Deprecated public boolean secure;
-    field @Deprecated public int status;
-    field @Deprecated public int successMeasurementFrameNumber;
-    field @Deprecated public long ts;
-    field @Deprecated public int txRate;
-    field @Deprecated public int tx_rate;
-  }
-
-  @Deprecated public static class RttManager.WifiInformationElement {
-    ctor @Deprecated public RttManager.WifiInformationElement();
-    field @Deprecated public byte[] data;
-    field @Deprecated public byte id;
-  }
-
-  public final class ScanResult implements android.os.Parcelable {
-    field public static final int CIPHER_CCMP = 3; // 0x3
-    field public static final int CIPHER_GCMP_256 = 4; // 0x4
-    field public static final int CIPHER_NONE = 0; // 0x0
-    field public static final int CIPHER_NO_GROUP_ADDRESSED = 1; // 0x1
-    field public static final int CIPHER_SMS4 = 5; // 0x5
-    field public static final int CIPHER_TKIP = 2; // 0x2
-    field public static final int KEY_MGMT_EAP = 2; // 0x2
-    field public static final int KEY_MGMT_EAP_SHA256 = 6; // 0x6
-    field public static final int KEY_MGMT_EAP_SUITE_B_192 = 10; // 0xa
-    field public static final int KEY_MGMT_FT_EAP = 4; // 0x4
-    field public static final int KEY_MGMT_FT_PSK = 3; // 0x3
-    field public static final int KEY_MGMT_FT_SAE = 11; // 0xb
-    field public static final int KEY_MGMT_NONE = 0; // 0x0
-    field public static final int KEY_MGMT_OSEN = 7; // 0x7
-    field public static final int KEY_MGMT_OWE = 9; // 0x9
-    field public static final int KEY_MGMT_OWE_TRANSITION = 12; // 0xc
-    field public static final int KEY_MGMT_PSK = 1; // 0x1
-    field public static final int KEY_MGMT_PSK_SHA256 = 5; // 0x5
-    field public static final int KEY_MGMT_SAE = 8; // 0x8
-    field public static final int KEY_MGMT_WAPI_CERT = 14; // 0xe
-    field public static final int KEY_MGMT_WAPI_PSK = 13; // 0xd
-    field public static final int PROTOCOL_NONE = 0; // 0x0
-    field public static final int PROTOCOL_OSEN = 3; // 0x3
-    field public static final int PROTOCOL_RSN = 2; // 0x2
-    field public static final int PROTOCOL_WAPI = 4; // 0x4
-    field public static final int PROTOCOL_WPA = 1; // 0x1
-  }
-
-  public final class SoftApCapability implements android.os.Parcelable {
-    method public boolean areFeaturesSupported(long);
-    method public int describeContents();
-    method public int getMaxSupportedClients();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApCapability> CREATOR;
-    field public static final long SOFTAP_FEATURE_ACS_OFFLOAD = 1L; // 0x1L
-    field public static final long SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT = 2L; // 0x2L
-    field public static final long SOFTAP_FEATURE_WPA3_SAE = 4L; // 0x4L
-  }
-
-  public final class SoftApConfiguration implements android.os.Parcelable {
-    method @NonNull public java.util.List<android.net.MacAddress> getAllowedClientList();
-    method public int getBand();
-    method @NonNull public java.util.List<android.net.MacAddress> getBlockedClientList();
-    method public int getChannel();
-    method public int getMaxNumberOfClients();
-    method public long getShutdownTimeoutMillis();
-    method public boolean isAutoShutdownEnabled();
-    method public boolean isClientControlByUserEnabled();
-    method @Nullable public android.net.wifi.WifiConfiguration toWifiConfiguration();
-    field public static final int BAND_2GHZ = 1; // 0x1
-    field public static final int BAND_5GHZ = 2; // 0x2
-    field public static final int BAND_6GHZ = 4; // 0x4
-    field public static final int BAND_ANY = 7; // 0x7
-  }
-
-  public static final class SoftApConfiguration.Builder {
-    ctor public SoftApConfiguration.Builder();
-    ctor public SoftApConfiguration.Builder(@NonNull android.net.wifi.SoftApConfiguration);
-    method @NonNull public android.net.wifi.SoftApConfiguration build();
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAllowedClientList(@NonNull java.util.List<android.net.MacAddress>);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAutoShutdownEnabled(boolean);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBand(int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBlockedClientList(@NonNull java.util.List<android.net.MacAddress>);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBssid(@Nullable android.net.MacAddress);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setChannel(int, int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setClientControlByUserEnabled(boolean);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setHiddenSsid(boolean);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMaxNumberOfClients(@IntRange(from=0) int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setPassphrase(@Nullable String, int);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setShutdownTimeoutMillis(@IntRange(from=0) long);
-    method @NonNull public android.net.wifi.SoftApConfiguration.Builder setSsid(@Nullable String);
-  }
-
-  public final class SoftApInfo implements android.os.Parcelable {
-    method public int describeContents();
-    method public int getBandwidth();
-    method public int getFrequency();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field public static final int CHANNEL_WIDTH_160MHZ = 6; // 0x6
-    field public static final int CHANNEL_WIDTH_20MHZ = 2; // 0x2
-    field public static final int CHANNEL_WIDTH_20MHZ_NOHT = 1; // 0x1
-    field public static final int CHANNEL_WIDTH_40MHZ = 3; // 0x3
-    field public static final int CHANNEL_WIDTH_80MHZ = 4; // 0x4
-    field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 5; // 0x5
-    field public static final int CHANNEL_WIDTH_INVALID = 0; // 0x0
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApInfo> CREATOR;
-  }
-
-  public final class WifiClient implements android.os.Parcelable {
-    method public int describeContents();
-    method @NonNull public android.net.MacAddress getMacAddress();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiClient> CREATOR;
-  }
-
-  @Deprecated public class WifiConfiguration implements android.os.Parcelable {
-    method @Deprecated public int getAuthType();
-    method @Deprecated @NonNull public android.net.IpConfiguration getIpConfiguration();
-    method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus getNetworkSelectionStatus();
-    method @Deprecated @NonNull public String getPrintableSsid();
-    method @Deprecated public int getRecentFailureReason();
-    method @Deprecated public boolean hasNoInternetAccess();
-    method @Deprecated public boolean isEphemeral();
-    method @Deprecated public static boolean isMetered(@Nullable android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiInfo);
-    method @Deprecated public boolean isNoInternetAccessExpected();
-    method @Deprecated public void setIpConfiguration(@Nullable android.net.IpConfiguration);
-    method @Deprecated public void setNetworkSelectionStatus(@NonNull android.net.wifi.WifiConfiguration.NetworkSelectionStatus);
-    field @Deprecated public static final int INVALID_NETWORK_ID = -1; // 0xffffffff
-    field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1
-    field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0
-    field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2
-    field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0
-    field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1
-    field @Deprecated public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11
-    field @Deprecated public static final int RECENT_FAILURE_NONE = 0; // 0x0
-    field @Deprecated public boolean allowAutojoin;
-    field @Deprecated public int carrierId;
-    field @Deprecated public String creatorName;
-    field @Deprecated public int creatorUid;
-    field @Deprecated public boolean fromWifiNetworkSpecifier;
-    field @Deprecated public boolean fromWifiNetworkSuggestion;
-    field @Deprecated public String lastUpdateName;
-    field @Deprecated public int lastUpdateUid;
-    field @Deprecated public int macRandomizationSetting;
-    field @Deprecated public boolean meteredHint;
-    field @Deprecated public int meteredOverride;
-    field @Deprecated public int numAssociation;
-    field @Deprecated public int numScorerOverride;
-    field @Deprecated public int numScorerOverrideAndSwitchedNetwork;
-    field @Deprecated public boolean requirePmf;
-    field @Deprecated public boolean shared;
-    field @Deprecated public boolean useExternalScores;
-  }
-
-  @Deprecated public static class WifiConfiguration.KeyMgmt {
-    field @Deprecated public static final int WAPI_CERT = 14; // 0xe
-    field @Deprecated public static final int WAPI_PSK = 13; // 0xd
-    field @Deprecated public static final int WPA2_PSK = 4; // 0x4
-  }
-
-  @Deprecated public static class WifiConfiguration.NetworkSelectionStatus {
-    method @Deprecated public int getDisableReasonCounter(int);
-    method @Deprecated public long getDisableTime();
-    method @Deprecated public static int getMaxNetworkSelectionDisableReason();
-    method @Deprecated public int getNetworkSelectionDisableReason();
-    method @Deprecated @Nullable public static String getNetworkSelectionDisableReasonString(int);
-    method @Deprecated public int getNetworkSelectionStatus();
-    method @Deprecated @NonNull public String getNetworkStatusString();
-    method @Deprecated public boolean hasEverConnected();
-    field @Deprecated public static final int DISABLED_ASSOCIATION_REJECTION = 1; // 0x1
-    field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE = 2; // 0x2
-    field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_CREDENTIALS = 5; // 0x5
-    field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9; // 0x9
-    field @Deprecated public static final int DISABLED_BY_WIFI_MANAGER = 7; // 0x7
-    field @Deprecated public static final int DISABLED_BY_WRONG_PASSWORD = 8; // 0x8
-    field @Deprecated public static final int DISABLED_DHCP_FAILURE = 3; // 0x3
-    field @Deprecated public static final int DISABLED_NONE = 0; // 0x0
-    field @Deprecated public static final int DISABLED_NO_INTERNET_PERMANENT = 6; // 0x6
-    field @Deprecated public static final int DISABLED_NO_INTERNET_TEMPORARY = 4; // 0x4
-    field @Deprecated public static final int NETWORK_SELECTION_ENABLED = 0; // 0x0
-    field @Deprecated public static final int NETWORK_SELECTION_PERMANENTLY_DISABLED = 2; // 0x2
-    field @Deprecated public static final int NETWORK_SELECTION_TEMPORARY_DISABLED = 1; // 0x1
-  }
-
-  @Deprecated public static final class WifiConfiguration.NetworkSelectionStatus.Builder {
-    ctor @Deprecated public WifiConfiguration.NetworkSelectionStatus.Builder();
-    method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus build();
-    method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus.Builder setNetworkSelectionDisableReason(int);
-    method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus.Builder setNetworkSelectionStatus(int);
-  }
-
-  public class WifiEnterpriseConfig implements android.os.Parcelable {
-    method @Nullable public String[] getCaCertificateAliases();
-    method @NonNull public String getCaPath();
-    method @NonNull public String getClientCertificateAlias();
-    method public int getOcsp();
-    method @NonNull public String getWapiCertSuite();
-    method public void setCaCertificateAliases(@Nullable String[]);
-    method public void setCaPath(@NonNull String);
-    method public void setClientCertificateAlias(@NonNull String);
-    method public void setOcsp(int);
-    method public void setWapiCertSuite(@NonNull String);
-    field public static final int OCSP_NONE = 0; // 0x0
-    field public static final int OCSP_REQUEST_CERT_STATUS = 1; // 0x1
-    field public static final int OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3; // 0x3
-    field public static final int OCSP_REQUIRE_CERT_STATUS = 2; // 0x2
-  }
-
-  public class WifiFrameworkInitializer {
-    method public static void registerServiceWrappers();
-  }
-
-  public class WifiInfo implements android.os.Parcelable {
-    method public double getLostTxPacketsPerSecond();
-    method @Nullable public String getRequestingPackageName();
-    method public double getRetriedTxPacketsPerSecond();
-    method public int getScore();
-    method public double getSuccessfulRxPacketsPerSecond();
-    method public double getSuccessfulTxPacketsPerSecond();
-    method public boolean isEphemeral();
-    method public boolean isOsuAp();
-    method public boolean isPasspointAp();
-    method @Nullable public static String sanitizeSsid(@Nullable String);
-    field public static final String DEFAULT_MAC_ADDRESS = "02:00:00:00:00:00";
-    field public static final int INVALID_RSSI = -127; // 0xffffff81
-  }
-
-  public class WifiManager {
-    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int, boolean);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinGlobal(boolean);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinPasspoint(@NonNull String, boolean);
-    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void clearWifiConnectedNetworkScorer();
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(int, @Nullable android.net.wifi.WifiManager.ActionListener);
-    method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void disable(int, @Nullable android.net.wifi.WifiManager.ActionListener);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK}) public void disableEphemeralNetwork(@NonNull String);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset();
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void forget(int, @Nullable android.net.wifi.WifiManager.ActionListener);
-    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.util.Pair<android.net.wifi.WifiConfiguration,java.util.Map<java.lang.Integer,java.util.List<android.net.wifi.ScanResult>>>> getAllMatchingWifiConfigs(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCountryCode();
-    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public android.net.Network getCurrentNetwork();
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String[] getFactoryMacAddresses();
-    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,java.util.List<android.net.wifi.ScanResult>> getMatchingOsuProviders(@Nullable java.util.List<android.net.wifi.ScanResult>);
-    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,android.net.wifi.hotspot2.PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(@NonNull java.util.Set<android.net.wifi.hotspot2.OsuProvider>);
-    method @NonNull @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.Map<android.net.wifi.WifiNetworkSuggestion,java.util.List<android.net.wifi.ScanResult>> getMatchingScanResults(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>, @Nullable java.util.List<android.net.wifi.ScanResult>);
-    method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks();
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public android.net.wifi.SoftApConfiguration getSoftApConfiguration();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void getWifiActivityEnergyInfoAsync(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener);
-    method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.WifiConfiguration getWifiApConfiguration();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getWifiApState();
-    method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    method public boolean isApMacRandomizationSupported();
-    method public boolean isConnectedMacRandomizationSupported();
-    method @Deprecated public boolean isDeviceToDeviceRttSupported();
-    method public boolean isPortableHotspotSupported();
-    method public boolean isVerboseLoggingEnabled();
-    method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled();
-    method public boolean isWifiScannerSupported();
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerNetworkRequestMatchCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerSoftApCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SoftApCallback);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerTrafficStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.TrafficStateCallback);
-    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void removeOnWifiUsabilityStatsListener(@NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreBackupData(@NonNull byte[]);
-    method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public android.net.wifi.SoftApConfiguration restoreSoftApBackupData(@NonNull byte[]);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreSupplicantBackupData(@NonNull byte[], @NonNull byte[]);
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveBackupData();
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveSoftApBackupData();
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setAutoWakeupEnabled(boolean);
-    method @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE) public void setDeviceMobilityState(int);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setPasspointMeteredOverride(@NonNull String, int);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanAlwaysAvailable(boolean);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanThrottleEnabled(boolean);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setVerboseLoggingEnabled(boolean);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration);
-    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public boolean setWifiConnectedNetworkScorer(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.WifiConnectedNetworkScorer);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsEnrolleeInitiator(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startLocalOnlyHotspot(@NonNull android.net.wifi.SoftApConfiguration, @Nullable java.util.concurrent.Executor, @Nullable android.net.wifi.WifiManager.LocalOnlyHotspotCallback);
-    method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public boolean startScan(android.os.WorkSource);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startSubscriptionProvisioning(@NonNull android.net.wifi.hotspot2.OsuProvider, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.hotspot2.ProvisioningCallback);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public boolean startTetheredHotspot(@Nullable android.net.wifi.SoftApConfiguration);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void stopEasyConnectSession();
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public boolean stopSoftAp();
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterNetworkRequestMatchCallback(@NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterSoftApCallback(@NonNull android.net.wifi.WifiManager.SoftApCallback);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterTrafficStateCallback(@NonNull android.net.wifi.WifiManager.TrafficStateCallback);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void updateInterfaceIpState(@Nullable String, int);
-    method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void updateWifiUsabilityScore(int, int, int);
-    field public static final String ACTION_LINK_CONFIGURATION_CHANGED = "android.net.wifi.LINK_CONFIGURATION_CHANGED";
-    field @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public static final String ACTION_NETWORK_SETTINGS_RESET = "android.net.wifi.action.NETWORK_SETTINGS_RESET";
-    field public static final String ACTION_PASSPOINT_LAUNCH_OSU_VIEW = "android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW";
-    field public static final String ACTION_REQUEST_DISABLE = "android.net.wifi.action.REQUEST_DISABLE";
-    field public static final String ACTION_REQUEST_ENABLE = "android.net.wifi.action.REQUEST_ENABLE";
-    field public static final int CHANGE_REASON_ADDED = 0; // 0x0
-    field public static final int CHANGE_REASON_CONFIG_CHANGE = 2; // 0x2
-    field public static final int CHANGE_REASON_REMOVED = 1; // 0x1
-    field public static final String CONFIGURED_NETWORKS_CHANGED_ACTION = "android.net.wifi.CONFIGURED_NETWORKS_CHANGE";
-    field public static final int DEVICE_MOBILITY_STATE_HIGH_MVMT = 1; // 0x1
-    field public static final int DEVICE_MOBILITY_STATE_LOW_MVMT = 2; // 0x2
-    field public static final int DEVICE_MOBILITY_STATE_STATIONARY = 3; // 0x3
-    field public static final int DEVICE_MOBILITY_STATE_UNKNOWN = 0; // 0x0
-    field public static final int EASY_CONNECT_NETWORK_ROLE_AP = 1; // 0x1
-    field public static final int EASY_CONNECT_NETWORK_ROLE_STA = 0; // 0x0
-    field public static final String EXTRA_CHANGE_REASON = "changeReason";
-    field public static final String EXTRA_LINK_PROPERTIES = "android.net.wifi.extra.LINK_PROPERTIES";
-    field public static final String EXTRA_MULTIPLE_NETWORKS_CHANGED = "multipleChanges";
-    field public static final String EXTRA_OSU_NETWORK = "android.net.wifi.extra.OSU_NETWORK";
-    field public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
-    field public static final String EXTRA_URL = "android.net.wifi.extra.URL";
-    field public static final String EXTRA_WIFI_AP_FAILURE_REASON = "android.net.wifi.extra.WIFI_AP_FAILURE_REASON";
-    field public static final String EXTRA_WIFI_AP_INTERFACE_NAME = "android.net.wifi.extra.WIFI_AP_INTERFACE_NAME";
-    field public static final String EXTRA_WIFI_AP_MODE = "android.net.wifi.extra.WIFI_AP_MODE";
-    field public static final String EXTRA_WIFI_AP_STATE = "wifi_state";
-    field public static final String EXTRA_WIFI_CONFIGURATION = "wifiConfiguration";
-    field public static final String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et";
-    field public static final String EXTRA_WIFI_CREDENTIAL_SSID = "ssid";
-    field public static final int IFACE_IP_MODE_CONFIGURATION_ERROR = 0; // 0x0
-    field public static final int IFACE_IP_MODE_LOCAL_ONLY = 2; // 0x2
-    field public static final int IFACE_IP_MODE_TETHERED = 1; // 0x1
-    field public static final int IFACE_IP_MODE_UNSPECIFIED = -1; // 0xffffffff
-    field public static final int PASSPOINT_HOME_NETWORK = 0; // 0x0
-    field public static final int PASSPOINT_ROAMING_NETWORK = 1; // 0x1
-    field public static final int SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER = 0; // 0x0
-    field public static final int SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS = 1; // 0x1
-    field public static final int SAP_START_FAILURE_GENERAL = 0; // 0x0
-    field public static final int SAP_START_FAILURE_NO_CHANNEL = 1; // 0x1
-    field public static final int SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION = 2; // 0x2
-    field public static final String WIFI_AP_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_AP_STATE_CHANGED";
-    field public static final int WIFI_AP_STATE_DISABLED = 11; // 0xb
-    field public static final int WIFI_AP_STATE_DISABLING = 10; // 0xa
-    field public static final int WIFI_AP_STATE_ENABLED = 13; // 0xd
-    field public static final int WIFI_AP_STATE_ENABLING = 12; // 0xc
-    field public static final int WIFI_AP_STATE_FAILED = 14; // 0xe
-    field public static final String WIFI_CREDENTIAL_CHANGED_ACTION = "android.net.wifi.WIFI_CREDENTIAL_CHANGED";
-    field public static final int WIFI_CREDENTIAL_FORGOT = 1; // 0x1
-    field public static final int WIFI_CREDENTIAL_SAVED = 0; // 0x0
-  }
-
-  public static interface WifiManager.ActionListener {
-    method public void onFailure(int);
-    method public void onSuccess();
-  }
-
-  public static interface WifiManager.NetworkRequestMatchCallback {
-    method public default void onAbort();
-    method public default void onMatch(@NonNull java.util.List<android.net.wifi.ScanResult>);
-    method public default void onUserSelectionCallbackRegistration(@NonNull android.net.wifi.WifiManager.NetworkRequestUserSelectionCallback);
-    method public default void onUserSelectionConnectFailure(@NonNull android.net.wifi.WifiConfiguration);
-    method public default void onUserSelectionConnectSuccess(@NonNull android.net.wifi.WifiConfiguration);
-  }
-
-  public static interface WifiManager.NetworkRequestUserSelectionCallback {
-    method public default void reject();
-    method public default void select(@NonNull android.net.wifi.WifiConfiguration);
-  }
-
-  public static interface WifiManager.OnWifiActivityEnergyInfoListener {
-    method public void onWifiActivityEnergyInfo(@Nullable android.os.connectivity.WifiActivityEnergyInfo);
-  }
-
-  public static interface WifiManager.OnWifiUsabilityStatsListener {
-    method public void onWifiUsabilityStats(int, boolean, @NonNull android.net.wifi.WifiUsabilityStatsEntry);
-  }
-
-  public static interface WifiManager.ScoreUpdateObserver {
-    method public void notifyScoreUpdate(int, int);
-    method public void triggerUpdateOfWifiUsabilityStats(int);
-  }
-
-  public static interface WifiManager.SoftApCallback {
-    method public default void onBlockedClientConnecting(@NonNull android.net.wifi.WifiClient, int);
-    method public default void onCapabilityChanged(@NonNull android.net.wifi.SoftApCapability);
-    method public default void onConnectedClientsChanged(@NonNull java.util.List<android.net.wifi.WifiClient>);
-    method public default void onInfoChanged(@NonNull android.net.wifi.SoftApInfo);
-    method public default void onStateChanged(int, int);
-  }
-
-  public static interface WifiManager.TrafficStateCallback {
-    method public void onStateChanged(int);
-    field public static final int DATA_ACTIVITY_IN = 1; // 0x1
-    field public static final int DATA_ACTIVITY_INOUT = 3; // 0x3
-    field public static final int DATA_ACTIVITY_NONE = 0; // 0x0
-    field public static final int DATA_ACTIVITY_OUT = 2; // 0x2
-  }
-
-  public static interface WifiManager.WifiConnectedNetworkScorer {
-    method public void onSetScoreUpdateObserver(@NonNull android.net.wifi.WifiManager.ScoreUpdateObserver);
-    method public void onStart(int);
-    method public void onStop(int);
-  }
-
-  public class WifiNetworkConnectionStatistics implements android.os.Parcelable {
-    ctor public WifiNetworkConnectionStatistics(int, int);
-    ctor public WifiNetworkConnectionStatistics();
-    ctor public WifiNetworkConnectionStatistics(android.net.wifi.WifiNetworkConnectionStatistics);
-    method public int describeContents();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkConnectionStatistics> CREATOR;
-    field public int numConnection;
-    field public int numUsage;
-  }
-
-  public final class WifiNetworkSuggestion implements android.os.Parcelable {
-    method @NonNull public android.net.wifi.WifiConfiguration getWifiConfiguration();
-  }
-
-  public static final class WifiNetworkSuggestion.Builder {
-    method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierId(int);
-  }
-
-  public class WifiScanner {
-    method @Deprecated public void configureWifiChange(int, int, int, int, int, android.net.wifi.WifiScanner.BssidInfo[]);
-    method @Deprecated public void configureWifiChange(android.net.wifi.WifiScanner.WifiChangeSettings);
-    method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<java.lang.Integer> getAvailableChannels(int);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean getScanResults();
-    method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.net.wifi.ScanResult> getSingleScanResults();
-    method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void registerScanListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiScanner.ScanListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setScanningEnabled(boolean);
-    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener, android.os.WorkSource);
-    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener);
-    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener, android.os.WorkSource);
-    method @Deprecated public void startTrackingBssids(android.net.wifi.WifiScanner.BssidInfo[], int, android.net.wifi.WifiScanner.BssidListener);
-    method @Deprecated public void startTrackingWifiChange(android.net.wifi.WifiScanner.WifiChangeListener);
-    method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopBackgroundScan(android.net.wifi.WifiScanner.ScanListener);
-    method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopScan(android.net.wifi.WifiScanner.ScanListener);
-    method @Deprecated public void stopTrackingBssids(android.net.wifi.WifiScanner.BssidListener);
-    method @Deprecated public void stopTrackingWifiChange(android.net.wifi.WifiScanner.WifiChangeListener);
-    method public void unregisterScanListener(@NonNull android.net.wifi.WifiScanner.ScanListener);
-    field public static final int MAX_SCAN_PERIOD_MS = 1024000; // 0xfa000
-    field public static final int MIN_SCAN_PERIOD_MS = 1000; // 0x3e8
-    field public static final int REASON_DUPLICATE_REQEUST = -5; // 0xfffffffb
-    field public static final int REASON_INVALID_LISTENER = -2; // 0xfffffffe
-    field public static final int REASON_INVALID_REQUEST = -3; // 0xfffffffd
-    field public static final int REASON_NOT_AUTHORIZED = -4; // 0xfffffffc
-    field public static final int REASON_SUCCEEDED = 0; // 0x0
-    field public static final int REASON_UNSPECIFIED = -1; // 0xffffffff
-    field @Deprecated public static final int REPORT_EVENT_AFTER_BUFFER_FULL = 0; // 0x0
-    field public static final int REPORT_EVENT_AFTER_EACH_SCAN = 1; // 0x1
-    field public static final int REPORT_EVENT_FULL_SCAN_RESULT = 2; // 0x2
-    field public static final int REPORT_EVENT_NO_BATCH = 4; // 0x4
-    field public static final int SCAN_TYPE_HIGH_ACCURACY = 2; // 0x2
-    field public static final int SCAN_TYPE_LOW_LATENCY = 0; // 0x0
-    field public static final int SCAN_TYPE_LOW_POWER = 1; // 0x1
-    field public static final int WIFI_BAND_24_5_6_GHZ = 11; // 0xb
-    field public static final int WIFI_BAND_24_5_WITH_DFS_6_GHZ = 15; // 0xf
-    field public static final int WIFI_BAND_24_GHZ = 1; // 0x1
-    field public static final int WIFI_BAND_5_GHZ = 2; // 0x2
-    field public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 4; // 0x4
-    field public static final int WIFI_BAND_5_GHZ_WITH_DFS = 6; // 0x6
-    field public static final int WIFI_BAND_6_GHZ = 8; // 0x8
-    field public static final int WIFI_BAND_BOTH = 3; // 0x3
-    field public static final int WIFI_BAND_BOTH_WITH_DFS = 7; // 0x7
-    field public static final int WIFI_BAND_UNSPECIFIED = 0; // 0x0
-  }
-
-  public static interface WifiScanner.ActionListener {
-    method public void onFailure(int, String);
-    method public void onSuccess();
-  }
-
-  @Deprecated public static class WifiScanner.BssidInfo {
-    ctor @Deprecated public WifiScanner.BssidInfo();
-    field @Deprecated public String bssid;
-    field @Deprecated public int frequencyHint;
-    field @Deprecated public int high;
-    field @Deprecated public int low;
-  }
-
-  @Deprecated public static interface WifiScanner.BssidListener extends android.net.wifi.WifiScanner.ActionListener {
-    method @Deprecated public void onFound(android.net.wifi.ScanResult[]);
-    method @Deprecated public void onLost(android.net.wifi.ScanResult[]);
-  }
-
-  public static class WifiScanner.ChannelSpec {
-    ctor public WifiScanner.ChannelSpec(int);
-    field public int frequency;
-  }
-
-  @Deprecated public static class WifiScanner.HotlistSettings implements android.os.Parcelable {
-    ctor @Deprecated public WifiScanner.HotlistSettings();
-    field @Deprecated public int apLostThreshold;
-    field @Deprecated public android.net.wifi.WifiScanner.BssidInfo[] bssidInfos;
-  }
-
-  public static class WifiScanner.ParcelableScanData implements android.os.Parcelable {
-    ctor public WifiScanner.ParcelableScanData(android.net.wifi.WifiScanner.ScanData[]);
-    method public android.net.wifi.WifiScanner.ScanData[] getResults();
-    field public android.net.wifi.WifiScanner.ScanData[] mResults;
-  }
-
-  public static class WifiScanner.ParcelableScanResults implements android.os.Parcelable {
-    ctor public WifiScanner.ParcelableScanResults(android.net.wifi.ScanResult[]);
-    method public android.net.wifi.ScanResult[] getResults();
-    field public android.net.wifi.ScanResult[] mResults;
-  }
-
-  public static class WifiScanner.ScanData implements android.os.Parcelable {
-    ctor public WifiScanner.ScanData(int, int, android.net.wifi.ScanResult[]);
-    ctor public WifiScanner.ScanData(android.net.wifi.WifiScanner.ScanData);
-    method public int getFlags();
-    method public int getId();
-    method public android.net.wifi.ScanResult[] getResults();
-  }
-
-  public static interface WifiScanner.ScanListener extends android.net.wifi.WifiScanner.ActionListener {
-    method public void onFullResult(android.net.wifi.ScanResult);
-    method @Deprecated public void onPeriodChanged(int);
-    method public void onResults(android.net.wifi.WifiScanner.ScanData[]);
-  }
-
-  public static class WifiScanner.ScanSettings implements android.os.Parcelable {
-    ctor public WifiScanner.ScanSettings();
-    field public int band;
-    field public android.net.wifi.WifiScanner.ChannelSpec[] channels;
-    field @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public final java.util.List<android.net.wifi.WifiScanner.ScanSettings.HiddenNetwork> hiddenNetworks;
-    field public boolean hideFromAppOps;
-    field public boolean ignoreLocationSettings;
-    field @Deprecated public int maxPeriodInMs;
-    field @Deprecated public int maxScansToCache;
-    field @Deprecated public int numBssidsPerScan;
-    field @Deprecated public int periodInMs;
-    field @Deprecated public int reportEvents;
-    field @Deprecated public int stepCount;
-    field @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public int type;
-  }
-
-  public static class WifiScanner.ScanSettings.HiddenNetwork {
-    ctor public WifiScanner.ScanSettings.HiddenNetwork(@NonNull String);
-    field @NonNull public final String ssid;
-  }
-
-  @Deprecated public static interface WifiScanner.WifiChangeListener extends android.net.wifi.WifiScanner.ActionListener {
-    method @Deprecated public void onChanging(android.net.wifi.ScanResult[]);
-    method @Deprecated public void onQuiescence(android.net.wifi.ScanResult[]);
-  }
-
-  @Deprecated public static class WifiScanner.WifiChangeSettings implements android.os.Parcelable {
-    ctor @Deprecated public WifiScanner.WifiChangeSettings();
-    field @Deprecated public android.net.wifi.WifiScanner.BssidInfo[] bssidInfos;
-    field @Deprecated public int lostApSampleSize;
-    field @Deprecated public int minApsBreachingThreshold;
-    field @Deprecated public int periodInMs;
-    field @Deprecated public int rssiSampleSize;
-    field @Deprecated public int unchangedSampleSize;
-  }
-
-  public final class WifiUsabilityStatsEntry implements android.os.Parcelable {
-    method public int describeContents();
-    method public int getCellularDataNetworkType();
-    method public int getCellularSignalStrengthDb();
-    method public int getCellularSignalStrengthDbm();
-    method public int getLinkSpeedMbps();
-    method public int getProbeElapsedTimeSinceLastUpdateMillis();
-    method public int getProbeMcsRateSinceLastUpdate();
-    method public int getProbeStatusSinceLastUpdate();
-    method public int getRssi();
-    method public int getRxLinkSpeedMbps();
-    method public long getTimeStampMillis();
-    method public long getTotalBackgroundScanTimeMillis();
-    method public long getTotalBeaconRx();
-    method public long getTotalCcaBusyFreqTimeMillis();
-    method public long getTotalHotspot2ScanTimeMillis();
-    method public long getTotalNanScanTimeMillis();
-    method public long getTotalPnoScanTimeMillis();
-    method public long getTotalRadioOnFreqTimeMillis();
-    method public long getTotalRadioOnTimeMillis();
-    method public long getTotalRadioRxTimeMillis();
-    method public long getTotalRadioTxTimeMillis();
-    method public long getTotalRoamScanTimeMillis();
-    method public long getTotalRxSuccess();
-    method public long getTotalScanTimeMillis();
-    method public long getTotalTxBad();
-    method public long getTotalTxRetries();
-    method public long getTotalTxSuccess();
-    method public boolean isSameRegisteredCell();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiUsabilityStatsEntry> CREATOR;
-    field public static final int PROBE_STATUS_FAILURE = 3; // 0x3
-    field public static final int PROBE_STATUS_NO_PROBE = 1; // 0x1
-    field public static final int PROBE_STATUS_SUCCESS = 2; // 0x2
-    field public static final int PROBE_STATUS_UNKNOWN = 0; // 0x0
-  }
-
-}
-
-package android.net.wifi.aware {
-
-  public class DiscoverySession implements java.lang.AutoCloseable {
-    method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPmk(@NonNull android.net.wifi.aware.PeerHandle, @NonNull byte[]);
-  }
-
-  public class WifiAwareSession implements java.lang.AutoCloseable {
-    method public android.net.NetworkSpecifier createNetworkSpecifierPmk(int, @NonNull byte[], @NonNull byte[]);
-  }
-
-}
-
-package android.net.wifi.hotspot2 {
-
-  public final class OsuProvider implements android.os.Parcelable {
-    method public int describeContents();
-    method @Nullable public String getFriendlyName();
-    method @Nullable public android.net.Uri getServerUri();
-    method public void writeToParcel(android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.OsuProvider> CREATOR;
-  }
-
-  public final class PasspointConfiguration implements android.os.Parcelable {
-    method public int getMeteredOverride();
-    method public boolean isAutojoinEnabled();
-    method public boolean isMacRandomizationEnabled();
-  }
-
-  public abstract class ProvisioningCallback {
-    ctor public ProvisioningCallback();
-    method public abstract void onProvisioningComplete();
-    method public abstract void onProvisioningFailure(int);
-    method public abstract void onProvisioningStatus(int);
-    field public static final int OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22; // 0x16
-    field public static final int OSU_FAILURE_AP_CONNECTION = 1; // 0x1
-    field public static final int OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8; // 0x8
-    field public static final int OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17; // 0x11
-    field public static final int OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21; // 0x15
-    field public static final int OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14; // 0xe
-    field public static final int OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19; // 0x13
-    field public static final int OSU_FAILURE_NO_PPS_MO = 16; // 0x10
-    field public static final int OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18; // 0x12
-    field public static final int OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23; // 0x17
-    field public static final int OSU_FAILURE_PROVISIONING_ABORTED = 6; // 0x6
-    field public static final int OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7; // 0x7
-    field public static final int OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20; // 0x14
-    field public static final int OSU_FAILURE_SERVER_CONNECTION = 3; // 0x3
-    field public static final int OSU_FAILURE_SERVER_URL_INVALID = 2; // 0x2
-    field public static final int OSU_FAILURE_SERVER_VALIDATION = 4; // 0x4
-    field public static final int OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5; // 0x5
-    field public static final int OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11; // 0xb
-    field public static final int OSU_FAILURE_START_REDIRECT_LISTENER = 12; // 0xc
-    field public static final int OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13; // 0xd
-    field public static final int OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9; // 0x9
-    field public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15; // 0xf
-    field public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10; // 0xa
-    field public static final int OSU_STATUS_AP_CONNECTED = 2; // 0x2
-    field public static final int OSU_STATUS_AP_CONNECTING = 1; // 0x1
-    field public static final int OSU_STATUS_INIT_SOAP_EXCHANGE = 6; // 0x6
-    field public static final int OSU_STATUS_REDIRECT_RESPONSE_RECEIVED = 8; // 0x8
-    field public static final int OSU_STATUS_RETRIEVING_TRUST_ROOT_CERTS = 11; // 0xb
-    field public static final int OSU_STATUS_SECOND_SOAP_EXCHANGE = 9; // 0x9
-    field public static final int OSU_STATUS_SERVER_CONNECTED = 5; // 0x5
-    field public static final int OSU_STATUS_SERVER_CONNECTING = 3; // 0x3
-    field public static final int OSU_STATUS_SERVER_VALIDATED = 4; // 0x4
-    field public static final int OSU_STATUS_THIRD_SOAP_EXCHANGE = 10; // 0xa
-    field public static final int OSU_STATUS_WAITING_FOR_REDIRECT_RESPONSE = 7; // 0x7
-  }
-
-}
-
-package android.net.wifi.p2p {
-
-  public final class WifiP2pGroupList implements android.os.Parcelable {
-    method public int describeContents();
-    method @NonNull public java.util.List<android.net.wifi.p2p.WifiP2pGroup> getGroupList();
-    method public void writeToParcel(@NonNull android.os.Parcel, int);
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pGroupList> CREATOR;
-  }
-
-  public class WifiP2pManager {
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void deletePersistentGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public void requestPersistentGroupInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.PersistentGroupInfoListener);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setDeviceName(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull String, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setMiracastMode(int);
-    method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setWfdInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pWfdInfo, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setWifiP2pChannels(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void startListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void stopListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener);
-    field public static final String ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED = "android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED";
-    field public static final int MIRACAST_DISABLED = 0; // 0x0
-    field public static final int MIRACAST_SINK = 2; // 0x2
-    field public static final int MIRACAST_SOURCE = 1; // 0x1
-  }
-
-  public static interface WifiP2pManager.PersistentGroupInfoListener {
-    method public void onPersistentGroupInfoAvailable(@NonNull android.net.wifi.p2p.WifiP2pGroupList);
-  }
-
-}
-
-package android.net.wifi.rtt {
-
-  public static final class RangingRequest.Builder {
-    method public android.net.wifi.rtt.RangingRequest.Builder addResponder(@NonNull android.net.wifi.rtt.ResponderConfig);
-  }
-
-  public final class RangingResult implements android.os.Parcelable {
-    method @NonNull public byte[] getLci();
-    method @NonNull public byte[] getLcr();
-  }
-
-  public final class ResponderConfig implements android.os.Parcelable {
-    ctor public ResponderConfig(@NonNull android.net.MacAddress, int, boolean, int, int, int, int, int);
-    ctor public ResponderConfig(@NonNull android.net.wifi.aware.PeerHandle, int, boolean, int, int, int, int, int);
-    method public int describeContents();
-    method public static android.net.wifi.rtt.ResponderConfig fromScanResult(android.net.wifi.ScanResult);
-    method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerHandleWithDefaults(android.net.wifi.aware.PeerHandle);
-    method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(android.net.MacAddress);
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final int CHANNEL_WIDTH_160MHZ = 3; // 0x3
-    field public static final int CHANNEL_WIDTH_20MHZ = 0; // 0x0
-    field public static final int CHANNEL_WIDTH_40MHZ = 1; // 0x1
-    field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
-    field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
-    field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderConfig> CREATOR;
-    field public static final int PREAMBLE_HE = 3; // 0x3
-    field public static final int PREAMBLE_HT = 1; // 0x1
-    field public static final int PREAMBLE_LEGACY = 0; // 0x0
-    field public static final int PREAMBLE_VHT = 2; // 0x2
-    field public static final int RESPONDER_AP = 0; // 0x0
-    field public static final int RESPONDER_AWARE = 4; // 0x4
-    field public static final int RESPONDER_P2P_CLIENT = 3; // 0x3
-    field public static final int RESPONDER_P2P_GO = 2; // 0x2
-    field public static final int RESPONDER_STA = 1; // 0x1
-    field public final int centerFreq0;
-    field public final int centerFreq1;
-    field public final int channelWidth;
-    field public final int frequency;
-    field public final android.net.MacAddress macAddress;
-    field public final android.net.wifi.aware.PeerHandle peerHandle;
-    field public final int preamble;
-    field public final int responderType;
-    field public final boolean supports80211mc;
-  }
-
-  public final class ResponderLocation implements android.os.Parcelable {
-    method public boolean getExtraInfoOnAssociationIndication();
-  }
-
-  public class WifiRttManager {
-    method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE}) public void cancelRanging(@Nullable android.os.WorkSource);
-    method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE}) public void startRanging(@Nullable android.os.WorkSource, @NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback);
-  }
-
-}
-
diff --git a/wifi/api/system-lint-baseline.txt b/wifi/api/system-lint-baseline.txt
deleted file mode 100644
index 6547ee8..0000000
--- a/wifi/api/system-lint-baseline.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-// Baseline format: 1.0
-MissingGetterMatchingBuilder: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig):
-    android.net.wifi.rtt.RangingRequest does not declare a `getResponders()` method matching method android.net.wifi.rtt.RangingRequest.Builder.addResponder(android.net.wifi.rtt.ResponderConfig)
-
-MissingNullability: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig):
-
diff --git a/wifi/api/system-removed.txt b/wifi/api/system-removed.txt
deleted file mode 100644
index a2d0dff..0000000
--- a/wifi/api/system-removed.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-// Signature format: 2.0
-package android.net.wifi {
-
-  @Deprecated public class BatchedScanResult implements android.os.Parcelable {
-    ctor public BatchedScanResult();
-    ctor public BatchedScanResult(android.net.wifi.BatchedScanResult);
-    field public final java.util.List<android.net.wifi.ScanResult> scanResults;
-    field public boolean truncated;
-  }
-
-  public final class ScanResult implements android.os.Parcelable {
-    field public boolean untrusted;
-  }
-
-}
-
diff --git a/wifi/jarjar-rules.txt b/wifi/jarjar-rules.txt
deleted file mode 100644
index 75b5e72..0000000
--- a/wifi/jarjar-rules.txt
+++ /dev/null
@@ -1,125 +0,0 @@
-## used by service-wifi ##
-
-# Network Stack AIDL interface.
-rule android.net.DataStallReportParcelable* com.android.wifi.x.@0
-rule android.net.DhcpResultsParcelable* com.android.wifi.x.@0
-rule android.net.IIpMemoryStore* com.android.wifi.x.@0
-rule android.net.IIpMemoryStoreCallbacks* com.android.wifi.x.@0
-rule android.net.INetd* com.android.wifi.x.@0
-rule android.net.INetdUnsolicitedEventListener* com.android.wifi.x.@0
-rule android.net.INetworkStackConnector* com.android.wifi.x.@0
-rule android.net.InformationElementParcelable* com.android.wifi.x.@0
-rule android.net.InitialConfigurationParcelable* com.android.wifi.x.@0
-rule android.net.InterfaceConfigurationParcel* com.android.wifi.x.@0
-rule android.net.Layer2InformationParcelable* com.android.wifi.x.@0
-rule android.net.Layer2PacketParcelable* com.android.wifi.x.@0
-rule android.net.MarkMaskParcel* com.android.wifi.x.@0
-rule android.net.NattKeepalivePacketDataParcelable* com.android.wifi.x.@0
-rule android.net.NetworkTestResultParcelable* com.android.wifi.x.@0
-rule android.net.PrivateDnsConfigParcel* com.android.wifi.x.@0
-rule android.net.ProvisioningConfigurationParcelable* com.android.wifi.x.@0
-rule android.net.ResolverParamsParcel* com.android.wifi.x.@0
-rule android.net.RouteInfoParcel* com.android.wifi.x.@0
-rule android.net.ScanResultInfoParcelable* com.android.wifi.x.@0
-rule android.net.TetherConfigParcel* com.android.wifi.x.@0
-rule android.net.TetherOffloadRuleParcel* com.android.wifi.x.@0
-rule android.net.TetherStatsParcel* com.android.wifi.x.@0
-rule android.net.UidRangeParcel* com.android.wifi.x.@0
-rule android.net.dhcp.DhcpLeaseParcelable* com.android.wifi.x.@0
-rule android.net.dhcp.DhcpServingParamsParcel* com.android.wifi.x.@0
-rule android.net.ip.IIpClient* com.android.wifi.x.@0
-rule android.net.ip.IIpClientCallbacks* com.android.wifi.x.@0
-rule android.net.ipmemorystore.Blob* com.android.wifi.x.@0
-rule android.net.ipmemorystore.IOnBlobRetrievedListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.IOnStatusAndCountListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.IOnStatusListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.NetworkAttributesParcelable* com.android.wifi.x.@0
-rule android.net.ipmemorystore.SameL3NetworkResponseParcelable* com.android.wifi.x.@0
-rule android.net.ipmemorystore.StatusParcelable* com.android.wifi.x.@0
-rule android.net.networkstack.aidl.** com.android.wifi.x.@0
-
-# Net utils (includes Network Stack helper classes).
-rule android.net.DhcpResults* com.android.wifi.x.@0
-rule android.net.InterfaceConfiguration* com.android.wifi.x.@0
-rule android.net.IpMemoryStore* com.android.wifi.x.@0
-rule android.net.NetworkMonitorManager* com.android.wifi.x.@0
-rule android.net.TcpKeepalivePacketData* com.android.wifi.x.@0
-rule android.net.NetworkFactory* com.android.wifi.x.@0
-rule android.net.ip.IpClientCallbacks* com.android.wifi.x.@0
-rule android.net.ip.IpClientManager* com.android.wifi.x.@0
-rule android.net.ip.IpClientUtil* com.android.wifi.x.@0
-rule android.net.ipmemorystore.NetworkAttributes* com.android.wifi.x.@0
-rule android.net.ipmemorystore.OnBlobRetrievedListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.OnDeleteStatusListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.OnStatusListener* com.android.wifi.x.@0
-rule android.net.ipmemorystore.Status* com.android.wifi.x.@0
-rule android.net.networkstack.ModuleNetworkStackClient* com.android.wifi.x.@0
-rule android.net.networkstack.NetworkStackClientBase* com.android.wifi.x.@0
-rule android.net.shared.InetAddressUtils* com.android.wifi.x.@0
-rule android.net.shared.InitialConfiguration* com.android.wifi.x.@0
-rule android.net.shared.IpConfigurationParcelableUtil* com.android.wifi.x.@0
-rule android.net.shared.Layer2Information* com.android.wifi.x.@0
-rule android.net.shared.LinkPropertiesParcelableUtil* com.android.wifi.x.@0
-rule android.net.shared.NetdUtils* com.android.wifi.x.@0
-rule android.net.shared.NetworkMonitorUtils* com.android.wifi.x.@0
-rule android.net.shared.ParcelableUtil* com.android.wifi.x.@0
-rule android.net.shared.PrivateDnsConfig* com.android.wifi.x.@0
-rule android.net.shared.ProvisioningConfiguration* com.android.wifi.x.@0
-rule android.net.shared.RouteUtils* com.android.wifi.x.@0
-rule android.net.util.KeepalivePacketDataUtil* com.android.wifi.x.@0
-rule android.net.util.NetworkConstants* com.android.wifi.x.@0
-rule android.net.util.InterfaceParams* com.android.wifi.x.@0
-rule android.net.util.SharedLog* com.android.wifi.x.@0
-rule android.net.util.NetUtils* com.android.wifi.x.@0
-
-rule androidx.annotation.** com.android.wifi.x.@0
-
-# We don't jar-jar the entire package because, we still use some classes (like
-# AsyncChannel in com.android.internal.util) from these packages which are not
-# inside our jar (currently in framework.jar, but will be in wifisdk.jar in the future).
-rule com.android.internal.util.FastXmlSerializer* com.android.wifi.x.@0
-rule com.android.internal.util.HexDump* com.android.wifi.x.@0
-rule com.android.internal.util.IState* com.android.wifi.x.@0
-rule com.android.internal.util.MessageUtils* com.android.wifi.x.@0
-rule com.android.internal.util.State* com.android.wifi.x.@0
-rule com.android.internal.util.StateMachine* com.android.wifi.x.@0
-rule com.android.internal.util.WakeupMessage* com.android.wifi.x.@0
-
-rule android.util.BackupUtils* com.android.wifi.x.@0
-rule android.util.LocalLog* com.android.wifi.x.@0
-rule android.util.Rational* com.android.wifi.x.@0
-
-# Use our statically linked bouncy castle library
-rule org.bouncycastle.** com.android.wifi.x.@0
-# Use our statically linked protobuf library
-rule com.google.protobuf.** com.android.wifi.x.@0
-# use statically linked SystemMessageProto
-rule com.android.internal.messages.SystemMessageProto* com.android.wifi.x.@0
-# Use our statically linked PlatformProperties library
-rule android.sysprop.** com.android.wifi.x.@0
-# Use our statically linked HIDL stubs
-# Note: android.hardware.wifi.** is used by various wifi feature flags. This unfortunately is also the namespace
-# used by vendor HAL stubs. So, this rule is intentionally weird to try and filter the vendor HAL stubs only.
-rule android.hardware.wifi.V** com.android.wifi.x.@0
-rule android.hardware.wifi.supplicant.** com.android.wifi.x.@0
-rule android.hardware.wifi.hostapd.** com.android.wifi.x.@0
-rule android.hidl.** com.android.wifi.x.@0
-# Use our statically linked ksoap2
-rule org.ksoap2.** com.android.wifi.x.@0
-# Use our statically linked nanohttpd
-rule fi.iki.elonen.** com.android.wifi.x.@0
-
-## used by both framework-wifi and service-wifi ##
-rule android.content.pm.BaseParceledListSlice* com.android.wifi.x.@0
-rule android.content.pm.ParceledListSlice* com.android.wifi.x.@0
-rule android.net.util.MacAddressUtils* com.android.wifi.x.@0
-rule android.net.util.nsd.DnsSdTxtRecord* com.android.wifi.x.@0
-rule android.os.HandlerExecutor* com.android.wifi.x.@0
-rule android.telephony.Annotation* com.android.wifi.x.@0
-rule com.android.internal.util.AsyncChannel* com.android.wifi.x.@0
-rule com.android.internal.util.AsyncService* com.android.wifi.x.@0
-rule com.android.internal.util.Preconditions* com.android.wifi.x.@0
-rule com.android.internal.util.Protocol* com.android.wifi.x.@0
-
-rule com.android.net.module.util.** com.android.wifi.x.@0
-rule com.android.modules.utils.** com.android.wifi.x.@0
diff --git a/wifi/java/Android.bp b/wifi/java/Android.bp
new file mode 100644
index 0000000..b35b4be
--- /dev/null
+++ b/wifi/java/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT 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 directory contains framework Wifi APIs that are not part of the Wifi module (i.e. not
+// updatable), and are generally only called by the Wifi module.
+
+// necessary since we only want the `path` property to only refer to these files
+filegroup {
+    name: "framework-wifi-non-updatable-sources-internal",
+    srcs: ["src/**/*.java"],
+    path: "src",
+    visibility: ["//visibility:private"],
+}
+
+filegroup {
+    name: "framework-wifi-non-updatable-sources",
+    srcs: [
+        // TODO(b/146011398) package android.net.wifi is now split amongst 2 jars: framework.jar and
+        // framework-wifi.jar. This is not a good idea, should move WifiNetworkScoreCache
+        // to a separate package.
+        ":framework-wifi-non-updatable-sources-internal",
+        ":libwificond_ipc_aidl",
+    ],
+}
diff --git a/wifi/java/android/net/wifi/AnqpInformationElement.java b/wifi/java/android/net/wifi/AnqpInformationElement.java
deleted file mode 100644
index 47b7129..0000000
--- a/wifi/java/android/net/wifi/AnqpInformationElement.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-/**
- * This object contains the payload of an ANQP element.
- * Vendor id is the vendor ID for the element, or 0 if it is an 802.11(u) element.
- * Hotspot 2.0 uses the WFA Vendor ID which is 0x506f9a
- * The payload contains the bytes of the payload, starting after the length octet(s).
- * @hide
- */
-public class AnqpInformationElement {
-    public static final int HOTSPOT20_VENDOR_ID = 0x506f9a;
-
-    public static final int ANQP_QUERY_LIST = 256;
-    public static final int ANQP_CAPABILITY_LIST = 257;
-    public static final int ANQP_VENUE_NAME = 258;
-    public static final int ANQP_EMERGENCY_NUMBER = 259;
-    public static final int ANQP_NWK_AUTH_TYPE = 260;
-    public static final int ANQP_ROAMING_CONSORTIUM = 261;
-    public static final int ANQP_IP_ADDR_AVAILABILITY = 262;
-    public static final int ANQP_NAI_REALM = 263;
-    public static final int ANQP_3GPP_NETWORK = 264;
-    public static final int ANQP_GEO_LOC = 265;
-    public static final int ANQP_CIVIC_LOC = 266;
-    public static final int ANQP_LOC_URI = 267;
-    public static final int ANQP_DOM_NAME = 268;
-    public static final int ANQP_EMERGENCY_ALERT = 269;
-    public static final int ANQP_TDLS_CAP = 270;
-    public static final int ANQP_EMERGENCY_NAI = 271;
-    public static final int ANQP_NEIGHBOR_REPORT = 272;
-    public static final int ANQP_VENDOR_SPEC = 56797;
-
-    public static final int HS_QUERY_LIST = 1;
-    public static final int HS_CAPABILITY_LIST = 2;
-    public static final int HS_FRIENDLY_NAME = 3;
-    public static final int HS_WAN_METRICS = 4;
-    public static final int HS_CONN_CAPABILITY = 5;
-    public static final int HS_NAI_HOME_REALM_QUERY = 6;
-    public static final int HS_OPERATING_CLASS = 7;
-    public static final int HS_OSU_PROVIDERS = 8;
-    public static final int HS_ICON_REQUEST = 10;
-    public static final int HS_ICON_FILE = 11;
-
-    private final int mVendorId;
-    private final int mElementId;
-    private final byte[] mPayload;
-
-    public AnqpInformationElement(int vendorId, int elementId, byte[] payload) {
-        mVendorId = vendorId;
-        mElementId = elementId;
-        mPayload = payload;
-    }
-
-    public int getVendorId() {
-        return mVendorId;
-    }
-
-    public int getElementId() {
-        return mElementId;
-    }
-
-    public byte[] getPayload() {
-        return mPayload;
-    }
-}
diff --git a/wifi/java/android/net/wifi/BatchedScanResult.java b/wifi/java/android/net/wifi/BatchedScanResult.java
deleted file mode 100644
index ed8845dd..0000000
--- a/wifi/java/android/net/wifi/BatchedScanResult.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.os.Parcelable;
-import android.annotation.SystemApi;
-import android.os.Parcel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Describes the Results of a batched set of wifi scans where the firmware performs many
- * scans and stores the timestamped results without waking the main processor each time.
- * @hide
- * @removed
- */
-@Deprecated
-@SystemApi
-public class BatchedScanResult implements Parcelable {
-    private static final String TAG = "BatchedScanResult";
-
-    /** Inidcates this scan was interrupted and may only have partial results. */
-    public boolean truncated;
-
-    /** The result of this particular scan. */
-    public final List<ScanResult> scanResults = new ArrayList<ScanResult>();
-
-
-    public BatchedScanResult() {
-    }
-
-    public BatchedScanResult(BatchedScanResult source) {
-        truncated = source.truncated;
-        for (ScanResult s : source.scanResults) scanResults.add(new ScanResult(s));
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-
-        sb.append("BatchedScanResult: ").
-                append("truncated: ").append(String.valueOf(truncated)).
-                append("scanResults: [");
-        for (ScanResult s : scanResults) {
-            sb.append(" <").append(s.toString()).append("> ");
-        }
-        sb.append(" ]");
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(truncated ? 1 : 0);
-        dest.writeInt(scanResults.size());
-        for (ScanResult s : scanResults) {
-            s.writeToParcel(dest, flags);
-        }
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final @android.annotation.NonNull Creator<BatchedScanResult> CREATOR =
-        new Creator<BatchedScanResult>() {
-            public BatchedScanResult createFromParcel(Parcel in) {
-                BatchedScanResult result = new BatchedScanResult();
-                result.truncated = (in.readInt() == 1);
-                int count = in.readInt();
-                while (count-- > 0) {
-                    result.scanResults.add(ScanResult.CREATOR.createFromParcel(in));
-                }
-                return result;
-            }
-
-            public BatchedScanResult[] newArray(int size) {
-                return new BatchedScanResult[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/EAPConstants.java b/wifi/java/android/net/wifi/EAPConstants.java
deleted file mode 100644
index b5f7c94..0000000
--- a/wifi/java/android/net/wifi/EAPConstants.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-/**
- * Utility class containing EAP (Extensible Authentication Protocol) Related constants.
- *
- * @hide
- */
-public final class EAPConstants {
-    // Constant definition for EAP types. Refer to
-    // http://www.iana.org/assignments/eap-numbers/eap-numbers.xhtml for more info.
-    public static final int EAP_MD5 = 4;
-    public static final int EAP_OTP = 5;
-    public static final int EAP_RSA = 9;
-    public static final int EAP_KEA = 11;
-    public static final int EAP_KEA_VALIDATE = 12;
-    public static final int EAP_TLS = 13;
-    public static final int EAP_LEAP = 17;
-    public static final int EAP_SIM = 18;
-    public static final int EAP_TTLS = 21;
-    public static final int EAP_AKA = 23;
-    public static final int EAP_3Com = 24;
-    public static final int EAP_MSCHAPv2 = 26;
-    public static final int EAP_PEAP = 29;
-    public static final int EAP_POTP = 32;
-    public static final int EAP_ActiontecWireless = 35;
-    public static final int EAP_HTTPDigest = 38;
-    public static final int EAP_SPEKE = 41;
-    public static final int EAP_MOBAC = 42;
-    public static final int EAP_FAST = 43;
-    public static final int EAP_ZLXEAP = 44;
-    public static final int EAP_Link = 45;
-    public static final int EAP_PAX = 46;
-    public static final int EAP_PSK = 47;
-    public static final int EAP_SAKE = 48;
-    public static final int EAP_IKEv2 = 49;
-    public static final int EAP_AKA_PRIME = 50;
-    public static final int EAP_GPSK = 51;
-    public static final int EAP_PWD = 52;
-    public static final int EAP_EKE = 53;
-    public static final int EAP_TEAP = 55;
-}
diff --git a/wifi/java/android/net/wifi/EasyConnectStatusCallback.java b/wifi/java/android/net/wifi/EasyConnectStatusCallback.java
deleted file mode 100644
index 6c2e6dd..0000000
--- a/wifi/java/android/net/wifi/EasyConnectStatusCallback.java
+++ /dev/null
@@ -1,267 +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.net.wifi;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.util.SparseArray;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.concurrent.Executor;
-
-/**
- * Easy Connect (DPP) Status Callback. Use this callback to get status updates (success, failure,
- * progress) from the Easy Connect operations.
- */
-public abstract class EasyConnectStatusCallback {
-    /**
-     * Easy Connect R1 Success event: Configuration sent (Configurator mode). This is the last
-     * and final Easy Connect event when either the local device or remote device implement R1.
-     * If both devices implement R2, this event will never be received, and the
-     * {@link #EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED} will be received.
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 0;
-
-    /**
-     * Easy Connect R2 Success event: Configuration applied by Enrollee (Configurator mode).
-     * This is the last and final Easy Connect event when both the local device and remote device
-     * implement R2. If either the local device or remote device implement R1, this event will never
-     * be received, and the {@link #EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT} will be received.
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED = 1;
-
-    /** @hide */
-    @IntDef(prefix = {"EASY_CONNECT_EVENT_SUCCESS_"}, value = {
-            EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT,
-            EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface EasyConnectSuccessStatusCode {
-    }
-
-    /**
-     * Easy Connect Progress event: Initial authentication with peer succeeded.
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_PROGRESS_AUTHENTICATION_SUCCESS = 0;
-
-    /**
-     * Easy Connect Progress event: Peer requires more time to process bootstrapping.
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_PROGRESS_RESPONSE_PENDING = 1;
-
-    /**
-     * Easy Connect R2 Progress event: Configuration sent to Enrollee, waiting for response
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_SENT_WAITING_RESPONSE = 2;
-
-    /**
-     * Easy Connect R2 Progress event: Configuration accepted by Enrollee, waiting for response
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_ACCEPTED = 3;
-
-    /** @hide */
-    @IntDef(prefix = {"EASY_CONNECT_EVENT_PROGRESS_"}, value = {
-            EASY_CONNECT_EVENT_PROGRESS_AUTHENTICATION_SUCCESS,
-            EASY_CONNECT_EVENT_PROGRESS_RESPONSE_PENDING,
-            EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_SENT_WAITING_RESPONSE,
-            EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_ACCEPTED,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface EasyConnectProgressStatusCode {
-    }
-
-    /**
-     * Easy Connect Failure event: Scanned QR code is either not a Easy Connect URI, or the Easy
-     * Connect URI has errors.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_INVALID_URI = -1;
-
-    /**
-     * Easy Connect Failure event: Bootstrapping/Authentication initialization process failure.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION = -2;
-
-    /**
-     * Easy Connect Failure event: Both devices are implementing the same role and are incompatible.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE = -3;
-
-    /**
-     * Easy Connect Failure event: Configuration process has failed due to malformed message.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_CONFIGURATION = -4;
-
-    /**
-     * Easy Connect Failure event: Easy Connect request while in another Easy Connect exchange.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_BUSY = -5;
-
-    /**
-     * Easy Connect Failure event: No response from the peer.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_TIMEOUT = -6;
-
-    /**
-     * Easy Connect Failure event: General protocol failure.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_GENERIC = -7;
-
-    /**
-     * Easy Connect Failure event: Feature or option is not supported.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED = -8;
-
-    /**
-     * Easy Connect Failure event: Invalid network provided to Easy Connect configurator.
-     * Network must either be WPA3-Personal (SAE) or WPA2-Personal (PSK).
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK = -9;
-
-    /**
-     * Easy Connect R2 Failure event: Enrollee cannot find the network.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK = -10;
-
-    /**
-     * Easy Connect R2 Failure event: Enrollee failed to authenticate with the network.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION = -11;
-
-    /**
-     * Easy Connect R2 Failure event: Enrollee rejected the configuration.
-     */
-    public static final int EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION = -12;
-
-    /** @hide */
-    @IntDef(prefix = {"EASY_CONNECT_EVENT_FAILURE_"}, value = {
-            EASY_CONNECT_EVENT_FAILURE_INVALID_URI,
-            EASY_CONNECT_EVENT_FAILURE_AUTHENTICATION,
-            EASY_CONNECT_EVENT_FAILURE_NOT_COMPATIBLE,
-            EASY_CONNECT_EVENT_FAILURE_CONFIGURATION,
-            EASY_CONNECT_EVENT_FAILURE_BUSY,
-            EASY_CONNECT_EVENT_FAILURE_TIMEOUT,
-            EASY_CONNECT_EVENT_FAILURE_GENERIC,
-            EASY_CONNECT_EVENT_FAILURE_NOT_SUPPORTED,
-            EASY_CONNECT_EVENT_FAILURE_INVALID_NETWORK,
-            EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK,
-            EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION,
-            EASY_CONNECT_EVENT_FAILURE_ENROLLEE_REJECTED_CONFIGURATION,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface EasyConnectFailureStatusCode {
-    }
-
-    /** @hide */
-    @SystemApi
-    public EasyConnectStatusCallback() {
-        // Fully-static utility classes must not have constructor
-    }
-
-    /**
-     * Called when local Easy Connect Enrollee successfully receives a new Wi-Fi configuration from
-     * the
-     * peer Easy Connect configurator. This callback marks the successful end of the Easy Connect
-     * current Easy Connect
-     * session, and no further callbacks will be called. This callback is the successful outcome
-     * of a Easy Connect flow starting with
-     * {@link WifiManager#startEasyConnectAsEnrolleeInitiator(String, Executor,
-     * EasyConnectStatusCallback)} .
-     *
-     * @param newNetworkId New Wi-Fi configuration with a network ID received from the configurator
-     * @hide
-     */
-    @SystemApi
-    public abstract void onEnrolleeSuccess(int newNetworkId);
-
-    /**
-     * Called when a Easy Connect success event takes place, except for when configuration is
-     * received from an external Configurator. The callback onSuccessConfigReceived will be used in
-     * this case. This callback marks the successful end of the current Easy Connect session, and no
-     * further callbacks will be called. This callback is the successful outcome of a Easy Connect
-     * flow starting with {@link WifiManager#startEasyConnectAsConfiguratorInitiator(String, int,
-     * int, Executor,EasyConnectStatusCallback)}.
-     *
-     * @param code Easy Connect success status code.
-     * @hide
-     */
-    @SystemApi
-    public abstract void onConfiguratorSuccess(@EasyConnectSuccessStatusCode int code);
-
-    /**
-     * Called when a Easy Connect Failure event takes place. This callback marks the unsuccessful
-     * end of the current Easy Connect session, and no further callbacks will be called.
-     *
-     * @param code Easy Connect failure status code.
-     * @hide
-     */
-    @SystemApi
-    public void onFailure(@EasyConnectFailureStatusCode int code) {}
-
-    /**
-     * Called when a Easy Connect Failure event takes place. This callback marks the unsuccessful
-     * end of the current Easy Connect session, and no further callbacks will be called.
-     *
-     * Note: Easy Connect (DPP) R2, provides additional details for the Configurator when the
-     * remote Enrollee is unable to connect to a network. The ssid, channelList and bandList
-     * inputs are initialized only for the EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK failure
-     * code, and the ssid and bandList are initialized for the
-     * EASY_CONNECT_EVENT_FAILURE_ENROLLEE_AUTHENTICATION failure code.
-     *
-     * @param code Easy Connect failure status code.
-     * @param ssid SSID of the network the Enrollee tried to connect to.
-     * @param channelListArray List of Global Operating classes and channel sets the Enrollee used
-     *                         to scan to find the network, see the "DPP Connection Status Object"
-     *                         section in the specification for the format, and Table E-4 in
-     *                         IEEE Std 802.11-2016 - Global operating classes for more details.
-     *                         The sparse array key is the Global Operating class, and the value
-     *                         is an integer array of Wi-Fi channels.
-     * @param operatingClassArray Array of bands the Enrollee supports as expressed as the Global
-     *                            Operating Class, see Table E-4 in IEEE Std 802.11-2016 - Global
-     *                            operating classes.
-     * @hide
-     */
-    @SystemApi
-    public void onFailure(@EasyConnectFailureStatusCode int code, @Nullable String ssid,
-            @NonNull SparseArray<int[]> channelListArray, @NonNull int[] operatingClassArray) {
-        onFailure(code);
-    }
-
-    /**
-     * Called when Easy Connect events that indicate progress take place. Can be used by UI elements
-     * to show progress.
-     *
-     * @param code Easy Connect progress status code.
-     * @hide
-     */
-    @SystemApi
-    public abstract void onProgress(@EasyConnectProgressStatusCode int code);
-}
diff --git a/wifi/java/android/net/wifi/IActionListener.aidl b/wifi/java/android/net/wifi/IActionListener.aidl
deleted file mode 100644
index faa0901..0000000
--- a/wifi/java/android/net/wifi/IActionListener.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-/**
- * Interface for generic wifi callbacks.
- * @hide
- */
-oneway interface IActionListener
-{
-    void onSuccess();
-    void onFailure(int reason);
-}
diff --git a/wifi/java/android/net/wifi/IDppCallback.aidl b/wifi/java/android/net/wifi/IDppCallback.aidl
deleted file mode 100644
index d7a958a..0000000
--- a/wifi/java/android/net/wifi/IDppCallback.aidl
+++ /dev/null
@@ -1,48 +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.net.wifi;
-
-/**
- * Interface for DPP callback.
- *
- * @hide
- */
-oneway interface IDppCallback
-{
-    /**
-     * Called when local DPP Enrollee successfully receives a new Wi-Fi configuratrion from the
-     * peer DPP configurator.
-     */
-    void onSuccessConfigReceived(int newNetworkId);
-
-    /**
-     * Called when DPP success events take place, except for when configuration is received from
-     * an external Configurator. The callback onSuccessConfigReceived will be used in this case.
-     */
-    void onSuccess(int status);
-
-    /**
-     * Called when DPP Failure events take place.
-     */
-    void onFailure(int status, String ssid, String channelList, in int[] bandArray);
-
-    /**
-     * Called when DPP events that indicate progress take place. Can be used by UI elements
-     * to show progress.
-     */
-    void onProgress(int status);
-}
diff --git a/wifi/java/android/net/wifi/ILocalOnlyHotspotCallback.aidl b/wifi/java/android/net/wifi/ILocalOnlyHotspotCallback.aidl
deleted file mode 100644
index b567f29..0000000
--- a/wifi/java/android/net/wifi/ILocalOnlyHotspotCallback.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-import android.net.wifi.SoftApConfiguration;
-
-/**
- * Communicates LOHS status back to the application process.
- *
- * @hide
- */
-oneway interface ILocalOnlyHotspotCallback {
-    void onHotspotStarted(in SoftApConfiguration config);
-    void onHotspotStopped();
-    void onHotspotFailed(int reason);
-}
diff --git a/wifi/java/android/net/wifi/INetworkRequestMatchCallback.aidl b/wifi/java/android/net/wifi/INetworkRequestMatchCallback.aidl
deleted file mode 100644
index d14ec57..0000000
--- a/wifi/java/android/net/wifi/INetworkRequestMatchCallback.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-import android.net.wifi.INetworkRequestUserSelectionCallback;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-
-/**
- * Interface for network request match callback.
- *
- * @hide
- */
-oneway interface INetworkRequestMatchCallback
-{
-   void onUserSelectionCallbackRegistration(in INetworkRequestUserSelectionCallback userSelectionCallback);
-
-   void onAbort();
-
-   void onMatch(in List<ScanResult> scanResults);
-
-   void onUserSelectionConnectSuccess(in WifiConfiguration wificonfiguration);
-
-   void onUserSelectionConnectFailure(in WifiConfiguration wificonfiguration);
-}
diff --git a/wifi/java/android/net/wifi/INetworkRequestUserSelectionCallback.aidl b/wifi/java/android/net/wifi/INetworkRequestUserSelectionCallback.aidl
deleted file mode 100644
index 524cefb..0000000
--- a/wifi/java/android/net/wifi/INetworkRequestUserSelectionCallback.aidl
+++ /dev/null
@@ -1,31 +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.net.wifi;
-
-import android.net.wifi.WifiConfiguration;
-
-/**
- * Interface for providing user selection in response to
- * network request match callback.
- * @hide
- */
-oneway interface INetworkRequestUserSelectionCallback
-{
-   void select(in WifiConfiguration wificonfiguration);
-
-   void reject();
-}
diff --git a/wifi/java/android/net/wifi/IOnWifiActivityEnergyInfoListener.aidl b/wifi/java/android/net/wifi/IOnWifiActivityEnergyInfoListener.aidl
deleted file mode 100644
index 7e25fd8a..0000000
--- a/wifi/java/android/net/wifi/IOnWifiActivityEnergyInfoListener.aidl
+++ /dev/null
@@ -1,33 +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;
-
-import android.os.connectivity.WifiActivityEnergyInfo;
-
-/**
- * Interface for Wi-Fi activity energy info listener.
- *
- * @hide
- */
-oneway interface IOnWifiActivityEnergyInfoListener
-{
-    /**
-     * Service to manager callback providing current Wi-Fi activity energy info.
-     * @param info the Wi-Fi activity energy info
-     */
-    void onWifiActivityEnergyInfo(in WifiActivityEnergyInfo info);
-}
diff --git a/wifi/java/android/net/wifi/IOnWifiUsabilityStatsListener.aidl b/wifi/java/android/net/wifi/IOnWifiUsabilityStatsListener.aidl
deleted file mode 100644
index 4687f30..0000000
--- a/wifi/java/android/net/wifi/IOnWifiUsabilityStatsListener.aidl
+++ /dev/null
@@ -1,41 +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;
-
-import android.net.wifi.WifiUsabilityStatsEntry;
-
-/**
- * Interface for Wi-Fi usability stats listener.
- *
- * @hide
- */
-oneway interface IOnWifiUsabilityStatsListener
-{
-    /**
-     * Service to manager callback providing current Wi-Fi usability stats.
-     *
-     * @param seqNum The sequence number of stats, used to derive the timing of updated Wi-Fi
-     *               usability statistics, set by framework and shall be incremented by one
-     *               after each update.
-     * @param isSameBssidAndFreq The flag to indicate whether the BSSID and the frequency of
-     *                           network stays the same or not relative to the last update of
-     *                           Wi-Fi usability stats.
-     * @param stats The updated Wi-Fi usability statistics.
-     */
-    void onWifiUsabilityStats(int seqNum, boolean isSameBssidAndFreq,
-            in WifiUsabilityStatsEntry stats);
-}
diff --git a/wifi/java/android/net/wifi/IScanResultsCallback.aidl b/wifi/java/android/net/wifi/IScanResultsCallback.aidl
deleted file mode 100644
index 56f6025..0000000
--- a/wifi/java/android/net/wifi/IScanResultsCallback.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-/**
- * Interface for Wi-Fi scan result available callback.
- *
- * @hide
- */
-oneway interface IScanResultsCallback
-{
-    void onScanResultsAvailable();
-}
diff --git a/wifi/java/android/net/wifi/IScanResultsListener.aidl b/wifi/java/android/net/wifi/IScanResultsListener.aidl
deleted file mode 100644
index e7eaddd..0000000
--- a/wifi/java/android/net/wifi/IScanResultsListener.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-/** @hide */
-
-oneway interface IScanResultsListener
-{
-    void onScanResultsAvailable();
-}
diff --git a/wifi/java/android/net/wifi/IScoreUpdateObserver.aidl b/wifi/java/android/net/wifi/IScoreUpdateObserver.aidl
deleted file mode 100644
index 775fed7..0000000
--- a/wifi/java/android/net/wifi/IScoreUpdateObserver.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-/**
- * Interface for Wi-Fi score callback.
- *
- * @hide
- */
-oneway interface IScoreUpdateObserver
-{
-    void notifyScoreUpdate(int sessionId, int score);
-
-    void triggerUpdateOfWifiUsabilityStats(int sessionId);
-}
diff --git a/wifi/java/android/net/wifi/ISoftApCallback.aidl b/wifi/java/android/net/wifi/ISoftApCallback.aidl
deleted file mode 100644
index f81bcb9..0000000
--- a/wifi/java/android/net/wifi/ISoftApCallback.aidl
+++ /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.
- */
-
-package android.net.wifi;
-import android.net.wifi.SoftApCapability;
-import android.net.wifi.SoftApInfo;
-
-import android.net.wifi.WifiClient;
-
-/**
- * Interface for Soft AP callback.
- *
- * @hide
- */
-oneway interface ISoftApCallback
-{
-    /**
-     * Service to manager callback providing current soft AP state. The possible
-     * parameter values listed are defined in WifiManager.java
-     *
-     * @param state new AP state. One of WIFI_AP_STATE_DISABLED,
-     *        WIFI_AP_STATE_DISABLING, WIFI_AP_STATE_ENABLED,
-     *        WIFI_AP_STATE_ENABLING, WIFI_AP_STATE_FAILED
-     * @param failureReason reason when in failed state. One of
-     *        SAP_START_FAILURE_GENERAL, SAP_START_FAILURE_NO_CHANNEL
-     */
-    void onStateChanged(int state, int failureReason);
-
-    /**
-     * Service to manager callback providing connected client's information.
-     *
-     * @param clients the currently connected clients
-     */
-    void onConnectedClientsChanged(in List<WifiClient> clients);
-
-    /**
-     * Service to manager callback providing information of softap.
-     *
-     * @param softApInfo is the softap information. {@link SoftApInfo}
-     */
-    void onInfoChanged(in SoftApInfo softApInfo);
-
-
-    /**
-     * Service to manager callback providing capability of softap.
-     *
-     * @param capability is the softap capability. {@link SoftApCapability}
-     */
-    void onCapabilityChanged(in SoftApCapability capability);
-
-    /**
-     * Service to manager callback providing blocked client of softap with specific reason code.
-     *
-     * @param client the currently blocked client.
-     * @param blockedReason one of blocked reason from {@link WifiManager.SapClientBlockedReason}
-     */
-    void onBlockedClientConnecting(in WifiClient client, int blockedReason);
-}
diff --git a/wifi/java/android/net/wifi/ISuggestionConnectionStatusListener.aidl b/wifi/java/android/net/wifi/ISuggestionConnectionStatusListener.aidl
deleted file mode 100644
index b49e49b..0000000
--- a/wifi/java/android/net/wifi/ISuggestionConnectionStatusListener.aidl
+++ /dev/null
@@ -1,29 +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;
-
-import android.net.wifi.WifiNetworkSuggestion;
-
-/**
- * Interface for suggestion network connection listener.
- *
- * @hide
- */
-oneway interface ISuggestionConnectionStatusListener
-{
-   void onConnectionStatus(in WifiNetworkSuggestion wifiNetworkSuggestion, int failureReason);
-}
diff --git a/wifi/java/android/net/wifi/ITrafficStateCallback.aidl b/wifi/java/android/net/wifi/ITrafficStateCallback.aidl
deleted file mode 100644
index 0c8e777..0000000
--- a/wifi/java/android/net/wifi/ITrafficStateCallback.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-/**
- * Interface for Traffic state callback.
- *
- * @hide
- */
-oneway interface ITrafficStateCallback
-{
-   /**
-    * Callback invoked to inform clients about the current traffic state.
-    *
-    * @param state One of the values: {@link #DATA_ACTIVITY_NONE}, {@link #DATA_ACTIVITY_IN},
-    * {@link #DATA_ACTIVITY_OUT} & {@link #DATA_ACTIVITY_INOUT}.
-    * @hide
-    */
-   void onStateChanged(int state);
-}
diff --git a/wifi/java/android/net/wifi/ITxPacketCountListener.aidl b/wifi/java/android/net/wifi/ITxPacketCountListener.aidl
deleted file mode 100644
index 9105bd0..0000000
--- a/wifi/java/android/net/wifi/ITxPacketCountListener.aidl
+++ /dev/null
@@ -1,28 +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;
-
-/**
- * Interface for tx packet counter callback.
- * @deprecated no longer used, remove once removed from BaseWifiService
- * @hide
- */
-oneway interface ITxPacketCountListener
-{
-    void onSuccess(int count);
-    void onFailure(int reason);
-}
diff --git a/wifi/java/android/net/wifi/IWifiConnectedNetworkScorer.aidl b/wifi/java/android/net/wifi/IWifiConnectedNetworkScorer.aidl
deleted file mode 100644
index f96d037c..0000000
--- a/wifi/java/android/net/wifi/IWifiConnectedNetworkScorer.aidl
+++ /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.
- */
-
-package android.net.wifi;
-
-import android.net.wifi.IScoreUpdateObserver;
-
-/**
- * Interface for Wi-Fi connected network scorer.
- *
- * @hide
- */
-oneway interface IWifiConnectedNetworkScorer
-{
-    void onStart(int sessionId);
-
-    void onStop(int sessionId);
-
-    void onSetScoreUpdateObserver(IScoreUpdateObserver observerImpl);
-}
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
deleted file mode 100644
index 3f79364..0000000
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * Copyright (c) 2008, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.content.pm.ParceledListSlice;
-
-import android.net.wifi.hotspot2.OsuProvider;
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.hotspot2.IProvisioningCallback;
-
-import android.net.DhcpInfo;
-import android.net.Network;
-import android.net.wifi.IActionListener;
-import android.net.wifi.IDppCallback;
-import android.net.wifi.ILocalOnlyHotspotCallback;
-import android.net.wifi.INetworkRequestMatchCallback;
-import android.net.wifi.IOnWifiActivityEnergyInfoListener;
-import android.net.wifi.IOnWifiUsabilityStatsListener;
-import android.net.wifi.IScanResultsCallback;
-import android.net.wifi.ISoftApCallback;
-import android.net.wifi.ISuggestionConnectionStatusListener;
-import android.net.wifi.ITrafficStateCallback;
-import android.net.wifi.IWifiConnectedNetworkScorer;
-import android.net.wifi.ScanResult;
-import android.net.wifi.SoftApConfiguration;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiNetworkSuggestion;
-
-import android.os.Messenger;
-import android.os.ResultReceiver;
-import android.os.WorkSource;
-
-/**
- * Interface that allows controlling and querying Wi-Fi connectivity.
- *
- * {@hide}
- */
-interface IWifiManager
-{
-    long getSupportedFeatures();
-
-    oneway void getWifiActivityEnergyInfoAsync(in IOnWifiActivityEnergyInfoListener listener);
-
-    ParceledListSlice getConfiguredNetworks(String packageName, String featureId);
-
-    ParceledListSlice getPrivilegedConfiguredNetworks(String packageName, String featureId);
-
-    Map getAllMatchingFqdnsForScanResults(in List<ScanResult> scanResult);
-
-    Map getMatchingOsuProviders(in List<ScanResult> scanResult);
-
-    Map getMatchingPasspointConfigsForOsuProviders(in List<OsuProvider> osuProviders);
-
-    int addOrUpdateNetwork(in WifiConfiguration config, String packageName);
-
-    boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config, String packageName);
-
-    boolean removePasspointConfiguration(in String fqdn, String packageName);
-
-    List<PasspointConfiguration> getPasspointConfigurations(in String packageName);
-
-    List<WifiConfiguration> getWifiConfigsForPasspointProfiles(in List<String> fqdnList);
-
-    void queryPasspointIcon(long bssid, String fileName);
-
-    int matchProviderWithCurrentNetwork(String fqdn);
-
-    void deauthenticateNetwork(long holdoff, boolean ess);
-
-    boolean removeNetwork(int netId, String packageName);
-
-    boolean enableNetwork(int netId, boolean disableOthers, String packageName);
-
-    boolean disableNetwork(int netId, String packageName);
-
-    void allowAutojoinGlobal(boolean choice);
-
-    void allowAutojoin(int netId, boolean choice);
-
-    void allowAutojoinPasspoint(String fqdn, boolean enableAutoJoin);
-
-    void setMacRandomizationSettingPasspointEnabled(String fqdn, boolean enable);
-
-    void setPasspointMeteredOverride(String fqdn, int meteredOverride);
-
-    boolean startScan(String packageName, String featureId);
-
-    List<ScanResult> getScanResults(String callingPackage, String callingFeatureId);
-
-    boolean disconnect(String packageName);
-
-    boolean reconnect(String packageName);
-
-    boolean reassociate(String packageName);
-
-    WifiInfo getConnectionInfo(String callingPackage, String callingFeatureId);
-
-    boolean setWifiEnabled(String packageName, boolean enable);
-
-    int getWifiEnabledState();
-
-    String getCountryCode();
-
-    boolean is5GHzBandSupported();
-
-    boolean is6GHzBandSupported();
-
-    boolean isWifiStandardSupported(int standard);
-
-    DhcpInfo getDhcpInfo();
-
-    void setScanAlwaysAvailable(boolean isAvailable);
-
-    boolean isScanAlwaysAvailable();
-
-    boolean acquireWifiLock(IBinder lock, int lockType, String tag, in WorkSource ws);
-
-    void updateWifiLockWorkSource(IBinder lock, in WorkSource ws);
-
-    boolean releaseWifiLock(IBinder lock);
-
-    void initializeMulticastFiltering();
-
-    boolean isMulticastEnabled();
-
-    void acquireMulticastLock(IBinder binder, String tag);
-
-    void releaseMulticastLock(String tag);
-
-    void updateInterfaceIpState(String ifaceName, int mode);
-
-    boolean startSoftAp(in WifiConfiguration wifiConfig);
-
-    boolean startTetheredHotspot(in SoftApConfiguration softApConfig);
-
-    boolean stopSoftAp();
-
-    int startLocalOnlyHotspot(in ILocalOnlyHotspotCallback callback, String packageName,
-                              String featureId, in SoftApConfiguration customConfig);
-
-    void stopLocalOnlyHotspot();
-
-    void startWatchLocalOnlyHotspot(in ILocalOnlyHotspotCallback callback);
-
-    void stopWatchLocalOnlyHotspot();
-
-    @UnsupportedAppUsage
-    int getWifiApEnabledState();
-
-    @UnsupportedAppUsage
-    WifiConfiguration getWifiApConfiguration();
-
-    SoftApConfiguration getSoftApConfiguration();
-
-    boolean setWifiApConfiguration(in WifiConfiguration wifiConfig, String packageName);
-
-    boolean setSoftApConfiguration(in SoftApConfiguration softApConfig, String packageName);
-
-    void notifyUserOfApBandConversion(String packageName);
-
-    void enableTdls(String remoteIPAddress, boolean enable);
-
-    void enableTdlsWithMacAddress(String remoteMacAddress, boolean enable);
-
-    String getCurrentNetworkWpsNfcConfigurationToken();
-
-    void enableVerboseLogging(int verbose);
-
-    int getVerboseLoggingLevel();
-
-    void disableEphemeralNetwork(String SSID, String packageName);
-
-    void factoryReset(String packageName);
-
-    @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
-    Network getCurrentNetwork();
-
-    byte[] retrieveBackupData();
-
-    void restoreBackupData(in byte[] data);
-
-    byte[] retrieveSoftApBackupData();
-
-    SoftApConfiguration restoreSoftApBackupData(in byte[] data);
-
-    void restoreSupplicantBackupData(in byte[] supplicantData, in byte[] ipConfigData);
-
-    void startSubscriptionProvisioning(in OsuProvider provider, in IProvisioningCallback callback);
-
-    void registerSoftApCallback(in IBinder binder, in ISoftApCallback callback, int callbackIdentifier);
-
-    void unregisterSoftApCallback(int callbackIdentifier);
-
-    void addOnWifiUsabilityStatsListener(in IBinder binder, in IOnWifiUsabilityStatsListener listener, int listenerIdentifier);
-
-    void removeOnWifiUsabilityStatsListener(int listenerIdentifier);
-
-    void registerTrafficStateCallback(in IBinder binder, in ITrafficStateCallback callback, int callbackIdentifier);
-
-    void unregisterTrafficStateCallback(int callbackIdentifier);
-
-    void registerNetworkRequestMatchCallback(in IBinder binder, in INetworkRequestMatchCallback callback, int callbackIdentifier);
-
-    void unregisterNetworkRequestMatchCallback(int callbackIdentifier);
-
-    int addNetworkSuggestions(in List<WifiNetworkSuggestion> networkSuggestions, in String packageName,
-        in String featureId);
-
-    int removeNetworkSuggestions(in List<WifiNetworkSuggestion> networkSuggestions, in String packageName);
-
-    List<WifiNetworkSuggestion> getNetworkSuggestions(in String packageName);
-
-    String[] getFactoryMacAddresses();
-
-    void setDeviceMobilityState(int state);
-
-    void startDppAsConfiguratorInitiator(in IBinder binder, in String enrolleeUri,
-        int selectedNetworkId, int netRole, in IDppCallback callback);
-
-    void startDppAsEnrolleeInitiator(in IBinder binder, in String configuratorUri,
-        in IDppCallback callback);
-
-    void stopDppSession();
-
-    void updateWifiUsabilityScore(int seqNum, int score, int predictionHorizonSec);
-
-    oneway void connect(in WifiConfiguration config, int netId, in IBinder binder, in IActionListener listener, int callbackIdentifier);
-
-    oneway void save(in WifiConfiguration config, in IBinder binder, in IActionListener listener, int callbackIdentifier);
-
-    oneway void forget(int netId, in IBinder binder, in IActionListener listener, int callbackIdentifier);
-
-    void registerScanResultsCallback(in IScanResultsCallback callback);
-
-    void unregisterScanResultsCallback(in IScanResultsCallback callback);
-
-    void registerSuggestionConnectionStatusListener(in IBinder binder, in ISuggestionConnectionStatusListener listener, int listenerIdentifier, String packageName, String featureId);
-
-    void unregisterSuggestionConnectionStatusListener(int listenerIdentifier, String packageName);
-
-    int calculateSignalLevel(int rssi);
-
-    List<WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(in List<ScanResult> scanResults);
-
-    boolean setWifiConnectedNetworkScorer(in IBinder binder, in IWifiConnectedNetworkScorer scorer);
-
-    void clearWifiConnectedNetworkScorer();
-
-    /**
-     * Return the Map of {@link WifiNetworkSuggestion} and the list of <ScanResult>
-     */
-    Map getMatchingScanResults(in List<WifiNetworkSuggestion> networkSuggestions, in List<ScanResult> scanResults, String callingPackage, String callingFeatureId);
-
-    void setScanThrottleEnabled(boolean enable);
-
-    boolean isScanThrottleEnabled();
-
-    Map getAllMatchingPasspointProfilesForScanResults(in List<ScanResult> scanResult);
-
-    void setAutoWakeupEnabled(boolean enable);
-
-    boolean isAutoWakeupEnabled();
-}
diff --git a/wifi/java/android/net/wifi/IWifiScanner.aidl b/wifi/java/android/net/wifi/IWifiScanner.aidl
deleted file mode 100644
index 485f5ce..0000000
--- a/wifi/java/android/net/wifi/IWifiScanner.aidl
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.os.Messenger;
-import android.os.Bundle;
-
-/**
- * {@hide}
- */
-interface IWifiScanner
-{
-    Messenger getMessenger();
-
-    Bundle getAvailableChannels(int band, String packageName, String featureId);
-}
diff --git a/wifi/java/android/net/wifi/ParcelUtil.java b/wifi/java/android/net/wifi/ParcelUtil.java
deleted file mode 100644
index a26877d..0000000
--- a/wifi/java/android/net/wifi/ParcelUtil.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.os.Parcel;
-
-import java.io.ByteArrayInputStream;
-import java.security.KeyFactory;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.cert.CertificateEncodingException;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.PKCS8EncodedKeySpec;
-
-/**
- * Provides utilities for writing/reading a non-Parcelable objects to/from
- * a Parcel object.
- *
- * @hide
- */
-public class ParcelUtil {
-    /**
-     * Write a PrivateKey object |key| to the specified Parcel |dest|.
-     *
-     * Below is the data format:
-     * |algorithm|     -> String of algorithm name
-     * |endcodedKey|  -> byte[] of key data
-     *
-     * For a null PrivateKey object, a null string will be written to |algorithm| and
-     * |encodedKey| will be skipped. Since a PrivateKey can only be constructed with
-     * a valid algorithm String.
-     *
-     * @param dest Parcel object to write to
-     * @param key PrivateKey object to read from.
-     */
-    public static void writePrivateKey(Parcel dest, PrivateKey key) {
-        if (key == null) {
-            dest.writeString(null);
-            return;
-        }
-
-        dest.writeString(key.getAlgorithm());
-        dest.writeByteArray(key.getEncoded());
-    }
-
-    /**
-     * Read/create a PrivateKey object from a specified Parcel object |in|.
-     *
-     * Refer to the function above for the expected data format.
-     *
-     * @param in Parcel object to read from
-     * @return a PrivateKey object or null
-     */
-    public static PrivateKey readPrivateKey(Parcel in) {
-        String algorithm = in.readString();
-        if (algorithm == null) {
-            return null;
-        }
-
-        byte[] userKeyBytes = in.createByteArray();
-        try {
-            KeyFactory keyFactory = KeyFactory.getInstance(algorithm);
-            return keyFactory.generatePrivate(new PKCS8EncodedKeySpec(userKeyBytes));
-       } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
-            return null;
-       }
-    }
-
-    /**
-     * Write a X509Certificate object |cert| to a Parcel object |dest|.
-     * The data being written to the Parcel is just a byte[] of the encoded certificate data.
-     *
-     * @param dest Parcel object to write to
-     * @param cert X509Certificate object to read from
-     */
-    public static void writeCertificate(Parcel dest, X509Certificate cert) {
-        byte[] certBytes = null;
-        if (cert != null) {
-            try {
-                certBytes = cert.getEncoded();
-            } catch (CertificateEncodingException e) {
-                /* empty, write null. */
-            }
-        }
-        dest.writeByteArray(certBytes);
-    }
-
-    /**
-     * Read/create a X509Certificate object from a specified Parcel object |in|.
-     *
-     * @param in Parcel object to read from
-     * @return a X509Certficate object or null
-     */
-    public static X509Certificate readCertificate(Parcel in) {
-        byte[] certBytes = in.createByteArray();
-        if (certBytes == null) {
-            return null;
-        }
-
-        try {
-            CertificateFactory cFactory = CertificateFactory.getInstance("X.509");
-            return (X509Certificate) cFactory
-                    .generateCertificate(new ByteArrayInputStream(certBytes));
-        } catch (CertificateException e) {
-            return null;
-        }
-    }
-
-    /**
-     * Write an array of X509Certificate objects |certs| to a Parcel object |dest|.
-     * The data being written to the Parcel are consist of an integer indicating
-     * the size of the array and the certificates data.  Certificates data will be
-     * skipped for a null array or size of 0 array.
-     *
-     * @param dest Parcel object to write to
-     * @param certs array of X509Certificate objects to read from
-     */
-    public static void writeCertificates(Parcel dest, X509Certificate[] certs) {
-        if (certs == null || certs.length == 0) {
-            dest.writeInt(0);
-            return;
-        }
-
-        dest.writeInt(certs.length);
-        for (int i = 0; i < certs.length; i++) {
-            writeCertificate(dest, certs[i]);
-        }
-    }
-
-    /**
-     * Read/create an array of X509Certificate objects from a specified Parcel object |in|.
-     *
-     * @param in Parcel object to read from
-     * @return X509Certficate[] or null
-     */
-    public static X509Certificate[] readCertificates(Parcel in) {
-        int length = in.readInt();
-        if (length == 0) {
-            return null;
-        }
-
-        X509Certificate[] certs = new X509Certificate[length];
-        for (int i = 0; i < length; i++) {
-            certs[i] = readCertificate(in);
-        }
-        return certs;
-    }
-}
diff --git a/wifi/java/android/net/wifi/RttManager.aidl b/wifi/java/android/net/wifi/RttManager.aidl
deleted file mode 100644
index 9479cf0..0000000
--- a/wifi/java/android/net/wifi/RttManager.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Copyright (c) 2015, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-parcelable RttManager.RttCapabilities;
-parcelable RttManager.ParcelableRttResults;
-parcelable RttManager.ParcelableRttParams;
diff --git a/wifi/java/android/net/wifi/RttManager.java b/wifi/java/android/net/wifi/RttManager.java
deleted file mode 100644
index 034defb..0000000
--- a/wifi/java/android/net/wifi/RttManager.java
+++ /dev/null
@@ -1,1233 +0,0 @@
-package android.net.wifi;
-
-import android.Manifest;
-import android.annotation.NonNull;
-import android.annotation.RequiresPermission;
-import android.annotation.SuppressLint;
-import android.annotation.SystemApi;
-import android.annotation.SystemService;
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.net.wifi.rtt.RangingRequest;
-import android.net.wifi.rtt.RangingResult;
-import android.net.wifi.rtt.RangingResultCallback;
-import android.net.wifi.rtt.WifiRttManager;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.SystemClock;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.util.Protocol;
-
-import java.util.List;
-
-/** @hide */
-@SystemApi
-@Deprecated
-@SystemService(Context.WIFI_RTT_SERVICE)
-public class RttManager {
-
-    private static final boolean DBG = false;
-    private static final String TAG = "RttManager";
-
-    /** @deprecated It is Not supported anymore. */
-    @Deprecated
-    public static final int RTT_TYPE_UNSPECIFIED        = 0;
-
-    public static final int RTT_TYPE_ONE_SIDED          = 1;
-    public static final int RTT_TYPE_TWO_SIDED          = 2;
-
-    /** @deprecated It is not supported anymore. */
-    @Deprecated
-    public static final int RTT_TYPE_11_V               = 2;
-
-    /** @deprecated It is not supported anymore. */
-    @Deprecated
-    public static final int RTT_TYPE_11_MC              = 4;
-
-    /** @deprecated It is not supported anymore. */
-    @Deprecated
-    public static final int RTT_PEER_TYPE_UNSPECIFIED    = 0;
-
-    public static final int RTT_PEER_TYPE_AP             = 1;
-    public static final int RTT_PEER_TYPE_STA            = 2;       /* requires NAN */
-    public static final int RTT_PEER_P2P_GO              = 3;
-    public static final int RTT_PEER_P2P_CLIENT          = 4;
-    public static final int RTT_PEER_NAN                 = 5;
-
-    /**
-     * @deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_20_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_20      = 0;
-
-    /**
-     * @deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_40_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_40      = 1;
-
-    /**
-     * @deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_80_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_80      = 2;
-
-    /**@deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_160_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_160     = 3;
-
-    /**@deprecated not supported anymore*/
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_80P80   = 4;
-
-    /**@deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_5_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_5       = 5;
-
-    /**@deprecated It is not supported anymore.
-     * Use {@link android.net.wifi.RttManager#RTT_BW_10_SUPPORT} API.
-     */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_10      = 6;
-
-    /** @deprecated channel info must be specified. */
-    @Deprecated
-    public static final int RTT_CHANNEL_WIDTH_UNSPECIFIED = -1;
-
-    public static final int RTT_STATUS_SUCCESS                  = 0;
-    /** General failure*/
-    public static final int RTT_STATUS_FAILURE                  = 1;
-    /** Destination does not respond to RTT request*/
-    public static final int RTT_STATUS_FAIL_NO_RSP              = 2;
-    /** RTT request is rejected by the destination. Double side RTT only*/
-    public static final int RTT_STATUS_FAIL_REJECTED            = 3;
-    /** */
-    public static final int RTT_STATUS_FAIL_NOT_SCHEDULED_YET   = 4;
-    /** Timing measurement timeout*/
-    public static final int RTT_STATUS_FAIL_TM_TIMEOUT          = 5;
-    /** Destination is on a different channel from the RTT Request*/
-    public static final int RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL  = 6;
-    /** This type of Ranging is not support by Hardware*/
-    public static final int RTT_STATUS_FAIL_NO_CAPABILITY       = 7;
-    /** Request abort fro uncertain reason*/
-    public static final int RTT_STATUS_ABORTED                  = 8;
-    /** The T1-T4 or TOD/TOA Timestamp is illegal*/
-    public static final int RTT_STATUS_FAIL_INVALID_TS          = 9;
-    /** 11mc protocol level failed, eg, unrecognized FTMR/FTM frame*/
-    public static final int RTT_STATUS_FAIL_PROTOCOL            = 10;
-    /** Request can not be scheduled by hardware*/
-    public static final int RTT_STATUS_FAIL_SCHEDULE            = 11;
-    /** destination is busy now, you can try after a specified time from destination*/
-    public static final int RTT_STATUS_FAIL_BUSY_TRY_LATER      = 12;
-    /** Bad Request argument*/
-    public static final int RTT_STATUS_INVALID_REQ              = 13;
-    /** Wifi is not enabled*/
-    public static final int RTT_STATUS_NO_WIFI                  = 14;
-    /** Responder overrides param info, cannot range with new params 2-side RTT only*/
-    public static final int RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE  = 15;
-
-    public static final int REASON_UNSPECIFIED              = -1;
-    public static final int REASON_NOT_AVAILABLE            = -2;
-    public static final int REASON_INVALID_LISTENER         = -3;
-    public static final int REASON_INVALID_REQUEST          = -4;
-    /** Do not have required permission */
-    public static final int REASON_PERMISSION_DENIED        = -5;
-    /** Ranging failed because responder role is enabled in STA mode.*/
-    public static final int
-            REASON_INITIATOR_NOT_ALLOWED_WHEN_RESPONDER_ON  = -6;
-
-    public static final String DESCRIPTION_KEY  = "android.net.wifi.RttManager.Description";
-
-    /**
-     * RTT BW supported bit mask, used as RTT param bandWidth too
-     */
-    public static final int RTT_BW_5_SUPPORT   = 0x01;
-    public static final int RTT_BW_10_SUPPORT  = 0x02;
-    public static final int RTT_BW_20_SUPPORT  = 0x04;
-    public static final int RTT_BW_40_SUPPORT  = 0x08;
-    public static final int RTT_BW_80_SUPPORT  = 0x10;
-    public static final int RTT_BW_160_SUPPORT = 0x20;
-
-    /**
-     * RTT Preamble Support bit mask
-     */
-    public static final int PREAMBLE_LEGACY  = 0x01;
-    public static final int PREAMBLE_HT      = 0x02;
-    public static final int PREAMBLE_VHT     = 0x04;
-
-    /** @deprecated Use the new {@link android.net.wifi.RttManager.RttCapabilities} API */
-    @Deprecated
-    public class Capabilities {
-        public int supportedType;
-        public int supportedPeerType;
-    }
-
-    /** @deprecated Use the new {@link android.net.wifi.RttManager#getRttCapabilities()} API.*/
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public Capabilities getCapabilities() {
-        throw new UnsupportedOperationException(
-                "getCapabilities is not supported in the adaptation layer");
-    }
-
-    /**
-     * This class describe the RTT capability of the Hardware
-     */
-    @Deprecated
-    public static class RttCapabilities implements Parcelable {
-        /** @deprecated It is not supported*/
-        @Deprecated
-        public boolean supportedType;
-        /** @deprecated It is not supported*/
-        @Deprecated
-        public boolean supportedPeerType;
-        //1-sided rtt measurement is supported
-        public boolean oneSidedRttSupported;
-        //11mc 2-sided rtt measurement is supported
-        public boolean twoSided11McRttSupported;
-        //location configuration information supported
-        public boolean lciSupported;
-        //location civic records supported
-        public boolean lcrSupported;
-        //preamble supported, see bit mask definition above
-        public int preambleSupported;
-        //RTT bandwidth supported
-        public int bwSupported;
-        // Whether STA responder role is supported.
-        public boolean responderSupported;
-
-        /** Whether the secure RTT protocol is supported. */
-        public boolean secureRttSupported;
-
-        /** Draft 11mc version supported, including major and minor version. e.g, draft 4.3 is 43 */
-        public int mcVersion;
-
-        @NonNull
-        @Override
-        public String toString() {
-            StringBuffer sb = new StringBuffer();
-            sb.append("oneSidedRtt ").
-            append(oneSidedRttSupported ? "is Supported. " : "is not supported. ").
-            append("twoSided11McRtt ").
-            append(twoSided11McRttSupported ? "is Supported. " : "is not supported. ").
-            append("lci ").
-            append(lciSupported ? "is Supported. " : "is not supported. ").
-            append("lcr ").
-            append(lcrSupported ? "is Supported. " : "is not supported. ");
-
-            if ((preambleSupported & PREAMBLE_LEGACY) != 0) {
-                sb.append("Legacy ");
-            }
-
-            if ((preambleSupported & PREAMBLE_HT) != 0) {
-                sb.append("HT ");
-            }
-
-            if ((preambleSupported & PREAMBLE_VHT) != 0) {
-                sb.append("VHT ");
-            }
-
-            sb.append("is supported. ");
-
-            if ((bwSupported & RTT_BW_5_SUPPORT) != 0) {
-                sb.append("5 MHz ");
-            }
-
-            if ((bwSupported & RTT_BW_10_SUPPORT) != 0) {
-                sb.append("10 MHz ");
-            }
-
-            if ((bwSupported & RTT_BW_20_SUPPORT) != 0) {
-                sb.append("20 MHz ");
-            }
-
-            if ((bwSupported & RTT_BW_40_SUPPORT) != 0) {
-                sb.append("40 MHz ");
-            }
-
-            if ((bwSupported & RTT_BW_80_SUPPORT) != 0) {
-                sb.append("80 MHz ");
-            }
-
-            if ((bwSupported & RTT_BW_160_SUPPORT) != 0) {
-                sb.append("160 MHz ");
-            }
-
-            sb.append("is supported.");
-
-            sb.append(" STA responder role is ")
-                    .append(responderSupported ? "supported" : "not supported");
-            sb.append(" Secure RTT protocol is ")
-                    .append(secureRttSupported ? "supported" : "not supported");
-            sb.append(" 11mc version is " + mcVersion);
-
-            return sb.toString();
-        }
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(oneSidedRttSupported ? 1 : 0);
-            dest.writeInt(twoSided11McRttSupported ? 1 : 0);
-            dest.writeInt(lciSupported ? 1 : 0);
-            dest.writeInt(lcrSupported ? 1 : 0);
-            dest.writeInt(preambleSupported);
-            dest.writeInt(bwSupported);
-            dest.writeInt(responderSupported ? 1 : 0);
-            dest.writeInt(secureRttSupported ? 1 : 0);
-            dest.writeInt(mcVersion);
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @android.annotation.NonNull Creator<RttCapabilities> CREATOR =
-            new Creator<RttCapabilities>() {
-            @Override
-            public RttCapabilities createFromParcel(Parcel in) {
-                RttCapabilities capabilities = new RttCapabilities();
-                capabilities.oneSidedRttSupported = (in.readInt() == 1);
-                capabilities.twoSided11McRttSupported = (in.readInt() == 1);
-                capabilities.lciSupported = (in.readInt() == 1);
-                capabilities.lcrSupported = (in.readInt() == 1);
-                capabilities.preambleSupported = in.readInt();
-                capabilities.bwSupported = in.readInt();
-                capabilities.responderSupported = (in.readInt() == 1);
-                capabilities.secureRttSupported = (in.readInt() == 1);
-                capabilities.mcVersion = in.readInt();
-                return capabilities;
-            }
-                /** Implement the Parcelable interface {@hide} */
-                @Override
-                public RttCapabilities[] newArray(int size) {
-                    return new RttCapabilities[size];
-                }
-             };
-    }
-
-    /**
-     * This method is deprecated. Please use the {@link WifiRttManager} API.
-     */
-    @RequiresPermission(Manifest.permission.LOCATION_HARDWARE)
-    public RttCapabilities getRttCapabilities() {
-        return mRttCapabilities;
-    }
-
-    /** specifies parameters for RTT request */
-    @Deprecated
-    public static class RttParams {
-        /**
-         * type of destination device being ranged
-         * currently only support RTT_PEER_TYPE_AP
-         * Range:RTT_PEER_TYPE_xxxx Default value:RTT_PEER_TYPE_AP
-         */
-        public int deviceType;
-
-        /**
-         * type of RTT measurement method. Need check scan result and RttCapabilities first
-         * Range: RTT_TYPE_ONE_SIDED or RTT_TYPE_TWO_SIDED
-         * Default value: RTT_TYPE_ONE_SIDED
-         */
-        public int requestType;
-
-        /**
-         * Whether the secure RTT protocol needs to be used for ranging this peer device.
-         */
-        public boolean secure;
-
-        /**
-         * mac address of the device being ranged
-         * Default value: null
-         */
-        public String bssid;
-
-        /**
-         * The primary control channel over which the client is
-         * communicating with the AP.Same as ScanResult.frequency
-         * Default value: 0
-         */
-        public int frequency;
-
-        /**
-         * channel width of the destination AP. Same as ScanResult.channelWidth
-         * Default value: 0
-         */
-        public int channelWidth;
-
-        /**
-         * Not used if the AP bandwidth is 20 MHz
-         * If the AP use 40, 80 or 160 MHz, this is the center frequency
-         * if the AP use 80 + 80 MHz, this is the center frequency of the first segment
-         * same as ScanResult.centerFreq0
-         * Default value: 0
-         */
-         public int centerFreq0;
-
-         /**
-          * Only used if the AP bandwidth is 80 + 80 MHz
-          * if the AP use 80 + 80 MHz, this is the center frequency of the second segment
-          * same as ScanResult.centerFreq1
-          * Default value: 0
-          */
-          public int centerFreq1;
-
-        /**
-         * number of samples to be taken
-         * @deprecated Use the new {@link android.net.wifi.RttManager.RttParams#numSamplesPerBurst}
-         */
-        @Deprecated
-        public int num_samples;
-
-        /**
-         * number of retries if a sample fails
-         * @deprecated
-         * Use {@link android.net.wifi.RttManager.RttParams#numRetriesPerMeasurementFrame} API.
-         */
-        @Deprecated
-        public int num_retries;
-
-        /** Number of burst in exp , 2^x. 0 means single shot measurement, range 0-15
-         * Currently only single shot is supported
-         * Default value: 0
-         */
-        public int numberBurst;
-
-        /**
-         * valid only if numberBurst > 1, interval between burst(100ms).
-         * Range : 0-31, 0--means no specific
-         * Default value: 0
-         */
-        public int interval;
-
-        /**
-         * number of samples to be taken in one burst
-         * Range: 1-31
-         * Default value: 8
-         */
-        public int numSamplesPerBurst;
-
-        /** number of retries for each measurement frame if a sample fails
-         *  Only used by single side RTT,
-         *  Range 0 - 3 Default value: 0
-         */
-        public int numRetriesPerMeasurementFrame;
-
-        /**
-         * number of retries for FTMR frame (control frame) if it fails.
-         * Only used by 80211MC double side RTT
-         * Range: 0-3  Default Value : 0
-         */
-        public int numRetriesPerFTMR;
-
-        /**
-         * Request LCI information, only available when choose double side RTT measurement
-         * need check RttCapabilties first.
-         * Default value: false
-         * */
-        public boolean LCIRequest;
-
-        /**
-         * Request LCR information, only available when choose double side RTT measurement
-         * need check RttCapabilties first.
-         * Default value: false
-         * */
-        public boolean LCRRequest;
-
-        /**
-         * Timeout for each burst, (250 * 2^x) us,
-         * Range 1-11 and 15. 15 means no control Default value: 15
-         * */
-        public int burstTimeout;
-
-        /** preamble used for RTT measurement
-         *  Range: PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT
-         *  Default value: PREAMBLE_HT
-         */
-        public int preamble;
-
-        /** bandWidth used for RTT measurement.User need verify the highest BW the destination
-         * support (from scan result etc) before set this value. Wider channels result usually give
-         * better accuracy. However, the frame loss can increase too.
-         * should be one of RTT_BW_5_SUPPORT to RTT_BW_160_SUPPORT. However, need check
-         * RttCapabilities firstto verify HW support this bandwidth.
-         * Default value:RTT_BW_20_SUPPORT
-         */
-        public int bandwidth;
-
-        public RttParams() {
-            //provide initial value for RttParams
-            deviceType = RTT_PEER_TYPE_AP;
-            requestType = RTT_TYPE_ONE_SIDED;
-            numberBurst = 0;
-            numSamplesPerBurst = 8;
-            numRetriesPerMeasurementFrame  = 0;
-            numRetriesPerFTMR = 0;
-            burstTimeout = 15;
-            preamble = PREAMBLE_HT;
-            bandwidth = RTT_BW_20_SUPPORT;
-        }
-
-        /**
-         * {@hide}
-         */
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            sb.append("deviceType=" + deviceType);
-            sb.append(", requestType=" + requestType);
-            sb.append(", secure=" + secure);
-            sb.append(", bssid=" + bssid);
-            sb.append(", frequency=" + frequency);
-            sb.append(", channelWidth=" + channelWidth);
-            sb.append(", centerFreq0=" + centerFreq0);
-            sb.append(", centerFreq1=" + centerFreq1);
-            sb.append(", num_samples=" + num_samples);
-            sb.append(", num_retries=" + num_retries);
-            sb.append(", numberBurst=" + numberBurst);
-            sb.append(", interval=" + interval);
-            sb.append(", numSamplesPerBurst=" + numSamplesPerBurst);
-            sb.append(", numRetriesPerMeasurementFrame=" + numRetriesPerMeasurementFrame);
-            sb.append(", numRetriesPerFTMR=" + numRetriesPerFTMR);
-            sb.append(", LCIRequest=" + LCIRequest);
-            sb.append(", LCRRequest=" + LCRRequest);
-            sb.append(", burstTimeout=" + burstTimeout);
-            sb.append(", preamble=" + preamble);
-            sb.append(", bandwidth=" + bandwidth);
-            return sb.toString();
-        }
-    }
-
-    /** pseudo-private class used to parcel arguments */
-    @Deprecated
-    public static class ParcelableRttParams implements Parcelable {
-
-        @NonNull
-        public RttParams mParams[];
-
-        /**
-         * @hide
-         */
-        @VisibleForTesting
-        public ParcelableRttParams(RttParams[] params) {
-            mParams = (params == null ? new RttParams[0] : params);
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(mParams.length);
-
-            for (RttParams params : mParams) {
-                dest.writeInt(params.deviceType);
-                dest.writeInt(params.requestType);
-                dest.writeByte(params.secure ? (byte) 1 : 0);
-                dest.writeString(params.bssid);
-                dest.writeInt(params.channelWidth);
-                dest.writeInt(params.frequency);
-                dest.writeInt(params.centerFreq0);
-                dest.writeInt(params.centerFreq1);
-                dest.writeInt(params.numberBurst);
-                dest.writeInt(params.interval);
-                dest.writeInt(params.numSamplesPerBurst);
-                dest.writeInt(params.numRetriesPerMeasurementFrame);
-                dest.writeInt(params.numRetriesPerFTMR);
-                dest.writeInt(params.LCIRequest ? 1 : 0);
-                dest.writeInt(params.LCRRequest ? 1 : 0);
-                dest.writeInt(params.burstTimeout);
-                dest.writeInt(params.preamble);
-                dest.writeInt(params.bandwidth);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @android.annotation.NonNull Creator<ParcelableRttParams> CREATOR =
-                new Creator<ParcelableRttParams>() {
-                    @Override
-                    public ParcelableRttParams createFromParcel(Parcel in) {
-
-                        int num = in.readInt();
-                        RttParams params[] = new RttParams[num];
-                        for (int i = 0; i < num; i++) {
-                            params[i] = new RttParams();
-                            params[i].deviceType = in.readInt();
-                            params[i].requestType = in.readInt();
-                            params[i].secure = (in.readByte() != 0);
-                            params[i].bssid = in.readString();
-                            params[i].channelWidth = in.readInt();
-                            params[i].frequency = in.readInt();
-                            params[i].centerFreq0 = in.readInt();
-                            params[i].centerFreq1 = in.readInt();
-                            params[i].numberBurst = in.readInt();
-                            params[i].interval = in.readInt();
-                            params[i].numSamplesPerBurst = in.readInt();
-                            params[i].numRetriesPerMeasurementFrame = in.readInt();
-                            params[i].numRetriesPerFTMR = in.readInt();
-                            params[i].LCIRequest = (in.readInt() == 1);
-                            params[i].LCRRequest = (in.readInt() == 1);
-                            params[i].burstTimeout = in.readInt();
-                            params[i].preamble = in.readInt();
-                            params[i].bandwidth = in.readInt();
-                        }
-
-                        ParcelableRttParams parcelableParams = new ParcelableRttParams(params);
-                        return parcelableParams;
-                    }
-
-                    @Override
-                    public ParcelableRttParams[] newArray(int size) {
-                        return new ParcelableRttParams[size];
-                    }
-                };
-    }
-
-    @Deprecated
-    public static class WifiInformationElement {
-        /** Information Element ID 0xFF means element is invalid. */
-        public byte id;
-        public byte[] data;
-    }
-    /** specifies RTT results */
-    @Deprecated
-    public static class RttResult {
-        /** mac address of the device being ranged. */
-        public String bssid;
-
-        /** # of burst for this measurement. */
-        public int burstNumber;
-
-        /** total number of measurement frames attempted in this measurement. */
-        public int measurementFrameNumber;
-
-        /** total successful number of measurement frames in this measurement. */
-        public int successMeasurementFrameNumber;
-
-        /**
-         * Maximum number of frames per burst supported by peer. Two side RTT only
-         * Valid only if less than request
-         */
-        public int frameNumberPerBurstPeer;
-
-        /** status of the request */
-        public int status;
-
-        /**
-         * type of the request used
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#measurementType}
-         */
-        @Deprecated
-        public int requestType;
-
-        /** RTT measurement method type used, should be one of RTT_TYPE_ONE_SIDED or
-         *  RTT_TYPE_TWO_SIDED.
-         */
-        public int measurementType;
-
-        /**
-         * only valid when status ==  RTT_STATUS_FAIL_BUSY_TRY_LATER
-         * please retry RTT measurement after this duration since peer indicate busy at ths moment
-         *  Unit S  Range:1-31
-         */
-        public int retryAfterDuration;
-
-        /** timestamp of completion, in microsecond since boot. */
-        public long ts;
-
-        /** average RSSI observed, unit of 0.5 dB. */
-        public int rssi;
-
-        /**
-         * RSSI spread (i.e. max - min)
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#rssiSpread} API.
-         */
-        @Deprecated
-        public int rssi_spread;
-
-        /**RSSI spread (i.e. max - min), unit of 0.5 dB. */
-        public int rssiSpread;
-
-        /**
-         * average transmit rate
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#txRate} API.
-         */
-        @Deprecated
-        public int tx_rate;
-
-        /** average transmit rate. Unit (kbps). */
-        public int txRate;
-
-        /** average receiving rate Unit (kbps). */
-        public int rxRate;
-
-       /**
-        * average round trip time in nano second
-        * @deprecated  Use {@link android.net.wifi.RttManager.RttResult#rtt} API.
-        */
-        @Deprecated
-        public long rtt_ns;
-
-        /** average round trip time in picoseconds. */
-        public long rtt;
-
-        /**
-         * standard deviation observed in round trip time
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#rttStandardDeviation} API.
-         */
-        @Deprecated
-        public long rtt_sd_ns;
-
-        /** standard deviation of RTT in picoseconds. */
-        public long rttStandardDeviation;
-
-        /**
-         * spread (i.e. max - min) round trip time
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#rttSpread} API.
-         */
-        @Deprecated
-        public long rtt_spread_ns;
-
-        /** spread (i.e. max - min) RTT in picoseconds. */
-        public long rttSpread;
-
-        /**
-         * average distance in centimeter, computed based on rtt_ns
-         * @deprecated use {@link android.net.wifi.RttManager.RttResult#distance} API.
-         */
-        @Deprecated
-        public int distance_cm;
-
-        /** average distance in cm, computed based on rtt. */
-        public int distance;
-
-        /**
-         * standard deviation observed in distance
-         * @deprecated
-         * Use {@link .android.net.wifi.RttManager.RttResult#distanceStandardDeviation} API.
-         */
-        @Deprecated
-        public int distance_sd_cm;
-
-        /** standard deviation observed in distance in cm. */
-        public int distanceStandardDeviation;
-
-        /**
-         * spread (i.e. max - min) distance
-         * @deprecated Use {@link android.net.wifi.RttManager.RttResult#distanceSpread} API.
-         */
-        @Deprecated
-        public int distance_spread_cm;
-
-        /** spread (i.e. max - min) distance in cm. */
-        public int distanceSpread;
-
-        /** the duration of this measurement burst, unit ms. */
-        public int burstDuration;
-
-        /** Burst number supported by peer after negotiation, 2side RTT only*/
-        public int negotiatedBurstNum;
-
-        /** LCI information Element, only available for double side RTT. */
-        public WifiInformationElement LCI;
-
-        /** LCR information Element, only available to double side RTT. */
-        public WifiInformationElement LCR;
-
-        /**
-         * Whether the secure RTT protocol was used for ranging.
-         */
-        public boolean secure;
-    }
-
-
-    /** pseudo-private class used to parcel results. */
-    @Deprecated
-    public static class ParcelableRttResults implements Parcelable {
-
-        public RttResult mResults[];
-
-        public ParcelableRttResults(RttResult[] results) {
-            mResults = results;
-        }
-
-        /**
-         * {@hide}
-         */
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < mResults.length; ++i) {
-                sb.append("[" + i + "]: ");
-                sb.append("bssid=" + mResults[i].bssid);
-                sb.append(", burstNumber=" + mResults[i].burstNumber);
-                sb.append(", measurementFrameNumber=" + mResults[i].measurementFrameNumber);
-                sb.append(", successMeasurementFrameNumber="
-                        + mResults[i].successMeasurementFrameNumber);
-                sb.append(", frameNumberPerBurstPeer=" + mResults[i].frameNumberPerBurstPeer);
-                sb.append(", status=" + mResults[i].status);
-                sb.append(", requestType=" + mResults[i].requestType);
-                sb.append(", measurementType=" + mResults[i].measurementType);
-                sb.append(", retryAfterDuration=" + mResults[i].retryAfterDuration);
-                sb.append(", ts=" + mResults[i].ts);
-                sb.append(", rssi=" + mResults[i].rssi);
-                sb.append(", rssi_spread=" + mResults[i].rssi_spread);
-                sb.append(", rssiSpread=" + mResults[i].rssiSpread);
-                sb.append(", tx_rate=" + mResults[i].tx_rate);
-                sb.append(", txRate=" + mResults[i].txRate);
-                sb.append(", rxRate=" + mResults[i].rxRate);
-                sb.append(", rtt_ns=" + mResults[i].rtt_ns);
-                sb.append(", rtt=" + mResults[i].rtt);
-                sb.append(", rtt_sd_ns=" + mResults[i].rtt_sd_ns);
-                sb.append(", rttStandardDeviation=" + mResults[i].rttStandardDeviation);
-                sb.append(", rtt_spread_ns=" + mResults[i].rtt_spread_ns);
-                sb.append(", rttSpread=" + mResults[i].rttSpread);
-                sb.append(", distance_cm=" + mResults[i].distance_cm);
-                sb.append(", distance=" + mResults[i].distance);
-                sb.append(", distance_sd_cm=" + mResults[i].distance_sd_cm);
-                sb.append(", distanceStandardDeviation=" + mResults[i].distanceStandardDeviation);
-                sb.append(", distance_spread_cm=" + mResults[i].distance_spread_cm);
-                sb.append(", distanceSpread=" + mResults[i].distanceSpread);
-                sb.append(", burstDuration=" + mResults[i].burstDuration);
-                sb.append(", negotiatedBurstNum=" + mResults[i].negotiatedBurstNum);
-                sb.append(", LCI=" + mResults[i].LCI);
-                sb.append(", LCR=" + mResults[i].LCR);
-                sb.append(", secure=" + mResults[i].secure);
-            }
-            return sb.toString();
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            if (mResults != null) {
-                dest.writeInt(mResults.length);
-                for (RttResult result : mResults) {
-                    dest.writeString(result.bssid);
-                    dest.writeInt(result.burstNumber);
-                    dest.writeInt(result.measurementFrameNumber);
-                    dest.writeInt(result.successMeasurementFrameNumber);
-                    dest.writeInt(result.frameNumberPerBurstPeer);
-                    dest.writeInt(result.status);
-                    dest.writeInt(result.measurementType);
-                    dest.writeInt(result.retryAfterDuration);
-                    dest.writeLong(result.ts);
-                    dest.writeInt(result.rssi);
-                    dest.writeInt(result.rssiSpread);
-                    dest.writeInt(result.txRate);
-                    dest.writeLong(result.rtt);
-                    dest.writeLong(result.rttStandardDeviation);
-                    dest.writeLong(result.rttSpread);
-                    dest.writeInt(result.distance);
-                    dest.writeInt(result.distanceStandardDeviation);
-                    dest.writeInt(result.distanceSpread);
-                    dest.writeInt(result.burstDuration);
-                    dest.writeInt(result.negotiatedBurstNum);
-                    dest.writeByte(result.LCI.id);
-                    if (result.LCI.id != (byte) 0xFF) {
-                        dest.writeByte((byte)result.LCI.data.length);
-                        dest.writeByteArray(result.LCI.data);
-                    }
-                    dest.writeByte(result.LCR.id);
-                    if (result.LCR.id != (byte) 0xFF) {
-                        dest.writeByte((byte) result.LCR.data.length);
-                        dest.writeByteArray(result.LCR.data);
-                    }
-                    dest.writeByte(result.secure ? (byte) 1 : 0);
-                }
-            } else {
-                dest.writeInt(0);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @android.annotation.NonNull Creator<ParcelableRttResults> CREATOR =
-                new Creator<ParcelableRttResults>() {
-                    @Override
-                    public ParcelableRttResults createFromParcel(Parcel in) {
-
-                        int num = in.readInt();
-
-                        if (num == 0) {
-                            return new ParcelableRttResults(null);
-                        }
-
-                        RttResult results[] = new RttResult[num];
-                        for (int i = 0; i < num; i++) {
-                            results[i] = new RttResult();
-                            results[i].bssid = in.readString();
-                            results[i].burstNumber = in.readInt();
-                            results[i].measurementFrameNumber = in.readInt();
-                            results[i].successMeasurementFrameNumber = in.readInt();
-                            results[i].frameNumberPerBurstPeer = in.readInt();
-                            results[i].status = in.readInt();
-                            results[i].measurementType = in.readInt();
-                            results[i].retryAfterDuration = in.readInt();
-                            results[i].ts = in.readLong();
-                            results[i].rssi = in.readInt();
-                            results[i].rssiSpread = in.readInt();
-                            results[i].txRate = in.readInt();
-                            results[i].rtt = in.readLong();
-                            results[i].rttStandardDeviation = in.readLong();
-                            results[i].rttSpread = in.readLong();
-                            results[i].distance = in.readInt();
-                            results[i].distanceStandardDeviation = in.readInt();
-                            results[i].distanceSpread = in.readInt();
-                            results[i].burstDuration = in.readInt();
-                            results[i].negotiatedBurstNum = in.readInt();
-                            results[i].LCI = new WifiInformationElement();
-                            results[i].LCI.id = in.readByte();
-                            if (results[i].LCI.id != (byte) 0xFF) {
-                                byte length = in.readByte();
-                                results[i].LCI.data = new byte[length];
-                                in.readByteArray(results[i].LCI.data);
-                            }
-                            results[i].LCR = new WifiInformationElement();
-                            results[i].LCR.id = in.readByte();
-                            if (results[i].LCR.id != (byte) 0xFF) {
-                                byte length = in.readByte();
-                                results[i].LCR.data = new byte[length];
-                                in.readByteArray(results[i].LCR.data);
-                            }
-                            results[i].secure = (in.readByte() != 0);
-                        }
-
-                        ParcelableRttResults parcelableResults = new ParcelableRttResults(results);
-                        return parcelableResults;
-                    }
-
-                    @Override
-                    public ParcelableRttResults[] newArray(int size) {
-                        return new ParcelableRttResults[size];
-                    }
-                };
-    }
-
-    @Deprecated
-    public static interface RttListener {
-        public void onSuccess(RttResult[] results);
-        public void onFailure(int reason, String description);
-        public void onAborted();
-    }
-
-    /**
-     * Request to start an RTT ranging
-     * <p>
-     * This method is deprecated. Please use the
-     * {@link WifiRttManager#startRanging(RangingRequest, java.util.concurrent.Executor, RangingResultCallback)}
-     * API.
-     *
-     * @param params  -- RTT request Parameters
-     * @param listener -- Call back to inform RTT result
-     * @exception throw IllegalArgumentException when params are illegal
-     *            throw IllegalStateException when RttCapabilities do not exist
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startRanging(RttParams[] params, RttListener listener) {
-        Log.i(TAG, "Send RTT request to RTT Service");
-
-        if (!mNewService.isAvailable()) {
-            listener.onFailure(REASON_NOT_AVAILABLE, "");
-            return;
-        }
-
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        for (RttParams rttParams : params) {
-            if (rttParams.deviceType != RTT_PEER_TYPE_AP) {
-                listener.onFailure(REASON_INVALID_REQUEST, "Only AP peers are supported");
-                return;
-            }
-
-            ScanResult reconstructed = new ScanResult();
-            reconstructed.BSSID = rttParams.bssid;
-            if (rttParams.requestType == RTT_TYPE_TWO_SIDED) {
-                reconstructed.setFlag(ScanResult.FLAG_80211mc_RESPONDER);
-            }
-            reconstructed.channelWidth = rttParams.channelWidth;
-            reconstructed.frequency = rttParams.frequency;
-            reconstructed.centerFreq0 = rttParams.centerFreq0;
-            reconstructed.centerFreq1 = rttParams.centerFreq1;
-            builder.addResponder(
-                    android.net.wifi.rtt.ResponderConfig.fromScanResult(reconstructed));
-        }
-        try {
-            mNewService.startRanging(builder.build(),
-                    mContext.getMainExecutor(),
-                    new RangingResultCallback() {
-                @Override
-                public void onRangingFailure(int code) {
-                    int localCode = REASON_UNSPECIFIED;
-                    if (code == STATUS_CODE_FAIL_RTT_NOT_AVAILABLE) {
-                        localCode = REASON_NOT_AVAILABLE;
-                    }
-                    listener.onFailure(localCode, "");
-                }
-
-                @Override
-                public void onRangingResults(List<RangingResult> results) {
-                    RttResult[] legacyResults = new RttResult[results.size()];
-                    int i = 0;
-                    for (RangingResult result : results) {
-                        legacyResults[i] = new RttResult();
-                        legacyResults[i].status = result.getStatus();
-                        legacyResults[i].bssid = result.getMacAddress().toString();
-                        if (result.getStatus() == RangingResult.STATUS_SUCCESS) {
-                            legacyResults[i].distance = result.getDistanceMm() / 10;
-                            legacyResults[i].distanceStandardDeviation =
-                                    result.getDistanceStdDevMm() / 10;
-                            legacyResults[i].rssi = result.getRssi() * -2;
-                            legacyResults[i].ts = result.getRangingTimestampMillis() * 1000;
-                            legacyResults[i].measurementFrameNumber =
-                                    result.getNumAttemptedMeasurements();
-                            legacyResults[i].successMeasurementFrameNumber =
-                                    result.getNumSuccessfulMeasurements();
-                        } else {
-                            // just in case legacy API needed some relatively real timestamp
-                            legacyResults[i].ts = SystemClock.elapsedRealtime() * 1000;
-                        }
-                        i++;
-                    }
-                    listener.onSuccess(legacyResults);
-                }
-            });
-        } catch (IllegalArgumentException e) {
-            Log.e(TAG, "startRanging: invalid arguments - " + e);
-            listener.onFailure(REASON_INVALID_REQUEST, e.getMessage());
-        } catch (SecurityException e) {
-            Log.e(TAG, "startRanging: security exception - " + e);
-            listener.onFailure(REASON_PERMISSION_DENIED, e.getMessage());
-        }
-    }
-
-    /**
-     * This method is deprecated and performs no function. Please use the {@link WifiRttManager}
-     * API.
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void stopRanging(RttListener listener) {
-        Log.e(TAG, "stopRanging: unsupported operation - nop");
-    }
-
-    /**
-     * Callbacks for responder operations.
-     * <p>
-     * A {@link ResponderCallback} is the handle to the calling client. {@link RttManager} will keep
-     * a reference to the callback for the entire period when responder is enabled. The same
-     * callback as used in enabling responder needs to be passed for disabling responder.
-     * The client can freely destroy or reuse the callback after {@link RttManager#disableResponder}
-     * is called.
-     */
-    @Deprecated
-    public abstract static class ResponderCallback {
-        /** Callback when responder is enabled. */
-        public abstract void onResponderEnabled(ResponderConfig config);
-        /** Callback when enabling responder failed. */
-        public abstract void onResponderEnableFailure(int reason);
-        // TODO: consider adding onResponderAborted once it's supported.
-    }
-
-    /**
-     * Enable Wi-Fi RTT responder mode on the device. The enabling result will be delivered via
-     * {@code callback}.
-     * <p>
-     * Note calling this method with the same callback when the responder is already enabled won't
-     * change the responder state, a cached {@link ResponderConfig} from the last enabling will be
-     * returned through the callback.
-     * <p>
-     * This method is deprecated and will throw an {@link UnsupportedOperationException}
-     * exception. Please use the {@link WifiRttManager} API to perform a Wi-Fi Aware peer-to-peer
-     * ranging.
-     *
-     * @param callback Callback for responder enabling/disabling result.
-     * @throws IllegalArgumentException If {@code callback} is null.
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void enableResponder(ResponderCallback callback) {
-        throw new UnsupportedOperationException(
-                "enableResponder is not supported in the adaptation layer");
-    }
-
-    /**
-     * Disable Wi-Fi RTT responder mode on the device. The {@code callback} needs to be the
-     * same one used in {@link #enableResponder(ResponderCallback)}.
-     * <p>
-     * Calling this method when responder isn't enabled won't have any effect. The callback can be
-     * reused for enabling responder after this method is called.
-     * <p>
-     * This method is deprecated and will throw an {@link UnsupportedOperationException}
-     * exception. Please use the {@link WifiRttManager} API to perform a Wi-Fi Aware peer-to-peer
-     * ranging.
-     *
-     * @param callback The same callback used for enabling responder.
-     * @throws IllegalArgumentException If {@code callback} is null.
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void disableResponder(ResponderCallback callback) {
-        throw new UnsupportedOperationException(
-                "disableResponder is not supported in the adaptation layer");
-    }
-
-    /**
-     * Configuration used for RTT responder mode. The configuration information can be used by a
-     * peer device to range the responder.
-     *
-     * @see ScanResult
-     */
-    @Deprecated
-    public static class ResponderConfig implements Parcelable {
-
-        // TODO: make all fields final once we can get mac address from responder HAL APIs.
-        /**
-         * Wi-Fi mac address used for responder mode.
-         */
-        public String macAddress = "";
-
-        /**
-         * The primary 20 MHz frequency (in MHz) of the channel where responder is enabled.
-         * @see ScanResult#frequency
-         */
-        public int frequency;
-
-        /**
-         * Center frequency of the channel where responder is enabled on. Only in use when channel
-         * width is at least 40MHz.
-         * @see ScanResult#centerFreq0
-         */
-        public int centerFreq0;
-
-        /**
-         * Center frequency of the second segment when channel width is 80 + 80 MHz.
-         * @see ScanResult#centerFreq1
-         */
-        public int centerFreq1;
-
-        /**
-         * Width of the channel where responder is enabled on.
-         * @see ScanResult#channelWidth
-         */
-        public int channelWidth;
-
-        /**
-         * Preamble supported by responder.
-         */
-        public int preamble;
-
-        @NonNull
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-            builder.append("macAddress = ").append(macAddress)
-                    .append(" frequency = ").append(frequency)
-                    .append(" centerFreq0 = ").append(centerFreq0)
-                    .append(" centerFreq1 = ").append(centerFreq1)
-                    .append(" channelWidth = ").append(channelWidth)
-                    .append(" preamble = ").append(preamble);
-            return builder.toString();
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeString(macAddress);
-            dest.writeInt(frequency);
-            dest.writeInt(centerFreq0);
-            dest.writeInt(centerFreq1);
-            dest.writeInt(channelWidth);
-            dest.writeInt(preamble);
-        }
-
-        /** Implement {@link Parcelable} interface */
-        public static final @android.annotation.NonNull Parcelable.Creator<ResponderConfig> CREATOR =
-                new Parcelable.Creator<ResponderConfig>() {
-            @Override
-            public ResponderConfig createFromParcel(Parcel in) {
-                ResponderConfig config = new ResponderConfig();
-                config.macAddress = in.readString();
-                config.frequency = in.readInt();
-                config.centerFreq0 = in.readInt();
-                config.centerFreq1 = in.readInt();
-                config.channelWidth = in.readInt();
-                config.preamble = in.readInt();
-                return config;
-            }
-
-            @Override
-            public ResponderConfig[] newArray(int size) {
-                return new ResponderConfig[size];
-            }
-        };
-
-    }
-
-    /* private methods */
-    public static final int BASE = Protocol.BASE_WIFI_RTT_MANAGER;
-
-    public static final int CMD_OP_START_RANGING        = BASE + 0;
-    public static final int CMD_OP_STOP_RANGING         = BASE + 1;
-    public static final int CMD_OP_FAILED               = BASE + 2;
-    public static final int CMD_OP_SUCCEEDED            = BASE + 3;
-    public static final int CMD_OP_ABORTED              = BASE + 4;
-    public static final int CMD_OP_ENABLE_RESPONDER     = BASE + 5;
-    public static final int CMD_OP_DISABLE_RESPONDER    = BASE + 6;
-    public static final int
-            CMD_OP_ENALBE_RESPONDER_SUCCEEDED           = BASE + 7;
-    public static final int
-            CMD_OP_ENALBE_RESPONDER_FAILED              = BASE + 8;
-    /** @hide */
-    public static final int CMD_OP_REG_BINDER           = BASE + 9;
-
-    private final WifiRttManager mNewService;
-    private final Context mContext;
-    private RttCapabilities mRttCapabilities;
-
-    /**
-     * Create a new WifiScanner instance.
-     * Applications will almost always want to use
-     * {@link android.content.Context#getSystemService Context.getSystemService()} to retrieve
-     * the standard {@link android.content.Context#WIFI_RTT_SERVICE Context.WIFI_RTT_SERVICE}.
-     * @param service the new WifiRttManager service
-     *
-     * @hide
-     */
-    public RttManager(@NonNull Context context, @NonNull WifiRttManager service) {
-        mNewService = service;
-        mContext = context;
-
-        boolean rttSupported = context.getPackageManager().hasSystemFeature(
-                PackageManager.FEATURE_WIFI_RTT);
-
-        mRttCapabilities = new RttCapabilities();
-        mRttCapabilities.oneSidedRttSupported = rttSupported;
-        mRttCapabilities.twoSided11McRttSupported = rttSupported;
-        mRttCapabilities.lciSupported = false;
-        mRttCapabilities.lcrSupported = false;
-        mRttCapabilities.preambleSupported = PREAMBLE_HT | PREAMBLE_VHT;
-        mRttCapabilities.bwSupported = RTT_BW_40_SUPPORT | RTT_BW_80_SUPPORT;
-        mRttCapabilities.responderSupported = false;
-        mRttCapabilities.secureRttSupported = false;
-    }
-}
-
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
deleted file mode 100644
index c269ba6..0000000
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ /dev/null
@@ -1,1145 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.net.wifi.WifiAnnotations.ChannelWidth;
-import android.net.wifi.WifiAnnotations.WifiStandard;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Describes information about a detected access point. In addition
- * to the attributes described here, the supplicant keeps track of
- * {@code quality}, {@code noise}, and {@code maxbitrate} attributes,
- * but does not currently report them to external clients.
- */
-public final class ScanResult implements Parcelable {
-    /**
-     * The network name.
-     */
-    public String SSID;
-
-    /**
-     * Ascii encoded SSID. This will replace SSID when we deprecate it. @hide
-     */
-    @UnsupportedAppUsage
-    public WifiSsid wifiSsid;
-
-    /**
-     * The address of the access point.
-     */
-    public String BSSID;
-
-    /**
-     * The HESSID from the beacon.
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public long hessid;
-
-    /**
-     * The ANQP Domain ID from the Hotspot 2.0 Indication element, if present.
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int anqpDomainId;
-
-    /*
-     * This field is equivalent to the |flags|, rather than the |capabilities| field
-     * of the per-BSS scan results returned by WPA supplicant. See the definition of
-     * |struct wpa_bss| in wpa_supplicant/bss.h for more details.
-     */
-    /**
-     * Describes the authentication, key management, and encryption schemes
-     * supported by the access point.
-     */
-    public String capabilities;
-
-    /**
-     * @hide
-     * No security protocol.
-     */
-    @SystemApi
-    public static final int PROTOCOL_NONE = 0;
-    /**
-     * @hide
-     * Security protocol type: WPA version 1.
-     */
-    @SystemApi
-    public static final int PROTOCOL_WPA = 1;
-    /**
-     * @hide
-     * Security protocol type: RSN, for WPA version 2, and version 3.
-     */
-    @SystemApi
-    public static final int PROTOCOL_RSN = 2;
-    /**
-     * @hide
-     * Security protocol type:
-     * OSU Server-only authenticated layer 2 Encryption Network.
-     * Used for Hotspot 2.0.
-     */
-    @SystemApi
-    public static final int PROTOCOL_OSEN = 3;
-
-    /**
-     * @hide
-     * Security protocol type: WAPI.
-     */
-    @SystemApi
-    public static final int PROTOCOL_WAPI = 4;
-
-    /**
-     * @hide
-     * No security key management scheme.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_NONE = 0;
-    /**
-     * @hide
-     * Security key management scheme: PSK.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_PSK = 1;
-    /**
-     * @hide
-     * Security key management scheme: EAP.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_EAP = 2;
-    /**
-     * @hide
-     * Security key management scheme: FT_PSK.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_FT_PSK = 3;
-    /**
-     * @hide
-     * Security key management scheme: FT_EAP.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_FT_EAP = 4;
-    /**
-     * @hide
-     * Security key management scheme: PSK_SHA256
-     */
-    @SystemApi
-    public static final int KEY_MGMT_PSK_SHA256 = 5;
-    /**
-     * @hide
-     * Security key management scheme: EAP_SHA256.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_EAP_SHA256 = 6;
-    /**
-     * @hide
-     * Security key management scheme: OSEN.
-     * Used for Hotspot 2.0.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_OSEN = 7;
-     /**
-     * @hide
-     * Security key management scheme: SAE.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_SAE = 8;
-    /**
-     * @hide
-     * Security key management scheme: OWE.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_OWE = 9;
-    /**
-     * @hide
-     * Security key management scheme: SUITE_B_192.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_EAP_SUITE_B_192 = 10;
-    /**
-     * @hide
-     * Security key management scheme: FT_SAE.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_FT_SAE = 11;
-    /**
-     * @hide
-     * Security key management scheme: OWE in transition mode.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_OWE_TRANSITION = 12;
-    /**
-     * @hide
-     * Security key management scheme: WAPI_PSK.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_WAPI_PSK = 13;
-    /**
-     * @hide
-     * Security key management scheme: WAPI_CERT.
-     */
-    @SystemApi
-    public static final int KEY_MGMT_WAPI_CERT = 14;
-
-    /**
-     * @hide
-     * Security key management scheme: FILS_SHA256.
-     */
-    public static final int KEY_MGMT_FILS_SHA256 = 15;
-    /**
-     * @hide
-     * Security key management scheme: FILS_SHA384.
-     */
-    public static final int KEY_MGMT_FILS_SHA384 = 16;
-    /**
-     * @hide
-     * No cipher suite.
-     */
-    @SystemApi
-    public static final int CIPHER_NONE = 0;
-    /**
-     * @hide
-     * No group addressed, only used for group data cipher.
-     */
-    @SystemApi
-    public static final int CIPHER_NO_GROUP_ADDRESSED = 1;
-    /**
-     * @hide
-     * Cipher suite: TKIP
-     */
-    @SystemApi
-    public static final int CIPHER_TKIP = 2;
-    /**
-     * @hide
-     * Cipher suite: CCMP
-     */
-    @SystemApi
-    public static final int CIPHER_CCMP = 3;
-    /**
-     * @hide
-     * Cipher suite: GCMP
-     */
-    @SystemApi
-    public static final int CIPHER_GCMP_256 = 4;
-    /**
-     * @hide
-     * Cipher suite: SMS4
-     */
-    @SystemApi
-    public static final int CIPHER_SMS4 = 5;
-
-    /**
-     * The detected signal level in dBm, also known as the RSSI.
-     *
-     * <p>Use {@link android.net.wifi.WifiManager#calculateSignalLevel} to convert this number into
-     * an absolute signal level which can be displayed to a user.
-     */
-    public int level;
-    /**
-     * The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating
-     * with the access point.
-     */
-    public int frequency;
-
-   /**
-    * AP Channel bandwidth is 20 MHZ
-    */
-    public static final int CHANNEL_WIDTH_20MHZ = 0;
-   /**
-    * AP Channel bandwidth is 40 MHZ
-    */
-    public static final int CHANNEL_WIDTH_40MHZ = 1;
-   /**
-    * AP Channel bandwidth is 80 MHZ
-    */
-    public static final int CHANNEL_WIDTH_80MHZ = 2;
-   /**
-    * AP Channel bandwidth is 160 MHZ
-    */
-    public static final int CHANNEL_WIDTH_160MHZ = 3;
-   /**
-    * AP Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ
-    */
-    public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
-
-    /**
-     * Wi-Fi unknown standard
-     */
-    public static final int WIFI_STANDARD_UNKNOWN = 0;
-
-    /**
-     * Wi-Fi 802.11a/b/g
-     */
-    public static final int WIFI_STANDARD_LEGACY = 1;
-
-    /**
-     * Wi-Fi 802.11n
-     */
-    public static final int WIFI_STANDARD_11N = 4;
-
-    /**
-     * Wi-Fi 802.11ac
-     */
-    public static final int WIFI_STANDARD_11AC = 5;
-
-    /**
-     * Wi-Fi 802.11ax
-     */
-    public static final int WIFI_STANDARD_11AX = 6;
-
-    /**
-     * AP wifi standard.
-     */
-    private @WifiStandard int mWifiStandard;
-
-    /**
-     * return the AP wifi standard.
-     */
-    public @WifiStandard int getWifiStandard() {
-        return mWifiStandard;
-    }
-
-    /**
-     * sets the AP wifi standard.
-     * @hide
-     */
-    public void setWifiStandard(@WifiStandard int standard) {
-        mWifiStandard = standard;
-    }
-
-    /**
-     * Convert Wi-Fi standard to string
-     */
-    private static @Nullable String wifiStandardToString(@WifiStandard int standard) {
-        switch(standard) {
-            case WIFI_STANDARD_LEGACY:
-                return "legacy";
-            case WIFI_STANDARD_11N:
-                return "11n";
-            case WIFI_STANDARD_11AC:
-                return "11ac";
-            case WIFI_STANDARD_11AX:
-                return "11ax";
-            case WIFI_STANDARD_UNKNOWN:
-                return "unknown";
-        }
-        return null;
-    }
-
-    /**
-     * AP Channel bandwidth; one of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
-     * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ}
-     * or {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}.
-     */
-    public @ChannelWidth int channelWidth;
-
-    /**
-     * Not used if the AP bandwidth is 20 MHz
-     * If the AP use 40, 80 or 160 MHz, this is the center frequency (in MHz)
-     * if the AP use 80 + 80 MHz, this is the center frequency of the first segment (in MHz)
-     */
-    public int centerFreq0;
-
-    /**
-     * Only used if the AP bandwidth is 80 + 80 MHz
-     * if the AP use 80 + 80 MHz, this is the center frequency of the second segment (in MHz)
-     */
-    public int centerFreq1;
-
-    /**
-     * @deprecated use is80211mcResponder() instead
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public boolean is80211McRTTResponder;
-
-    /**
-     * timestamp in microseconds (since boot) when
-     * this result was last seen.
-     */
-    public long timestamp;
-
-    /**
-     * Timestamp representing date when this result was last seen, in milliseconds from 1970
-     * {@hide}
-     */
-    @UnsupportedAppUsage
-    public long seen;
-
-    /**
-     * On devices with multiple hardware radio chains, this class provides metadata about
-     * each radio chain that was used to receive this scan result (probe response or beacon).
-     * {@hide}
-     */
-    public static class RadioChainInfo {
-        /** Vendor defined id for a radio chain. */
-        public int id;
-        /** Detected signal level in dBm (also known as the RSSI) on this radio chain. */
-        public int level;
-
-        @Override
-        public String toString() {
-            return "RadioChainInfo: id=" + id + ", level=" + level;
-        }
-
-        @Override
-        public boolean equals(Object otherObj) {
-            if (this == otherObj) {
-                return true;
-            }
-            if (!(otherObj instanceof RadioChainInfo)) {
-                return false;
-            }
-            RadioChainInfo other = (RadioChainInfo) otherObj;
-            return id == other.id && level == other.level;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(id, level);
-        }
-    };
-
-    /**
-     * Information about the list of the radio chains used to receive this scan result
-     * (probe response or beacon).
-     *
-     * For Example: On devices with 2 hardware radio chains, this list could hold 1 or 2
-     * entries based on whether this scan result was received using one or both the chains.
-     * {@hide}
-     */
-    public RadioChainInfo[] radioChainInfos;
-
-    /**
-     * Status indicating the scan result does not correspond to a user's saved configuration
-     * @hide
-     * @removed
-     */
-    @SystemApi
-    public boolean untrusted;
-
-    /**
-     * Number of time autojoin used it
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int numUsage;
-
-    /**
-     * The approximate distance to the AP in centimeter, if available.  Else
-     * {@link UNSPECIFIED}.
-     * {@hide}
-     */
-    @UnsupportedAppUsage
-    public int distanceCm;
-
-    /**
-     * The standard deviation of the distance to the access point, if available.
-     * Else {@link UNSPECIFIED}.
-     * {@hide}
-     */
-    @UnsupportedAppUsage
-    public int distanceSdCm;
-
-    /** {@hide} */
-    public static final long FLAG_PASSPOINT_NETWORK               = 0x0000000000000001;
-
-    /** {@hide} */
-    public static final long FLAG_80211mc_RESPONDER               = 0x0000000000000002;
-
-    /*
-     * These flags are specific to the ScanResult class, and are not related to the |flags|
-     * field of the per-BSS scan results from WPA supplicant.
-     */
-    /**
-     * Defines flags; such as {@link #FLAG_PASSPOINT_NETWORK}.
-     * {@hide}
-     */
-    @UnsupportedAppUsage
-    public long flags;
-
-    /**
-     * sets a flag in {@link #flags} field
-     * @param flag flag to set
-     * @hide
-     */
-    public void setFlag(long flag) {
-        flags |= flag;
-    }
-
-    /**
-     * clears a flag in {@link #flags} field
-     * @param flag flag to set
-     * @hide
-     */
-    public void clearFlag(long flag) {
-        flags &= ~flag;
-    }
-
-    public boolean is80211mcResponder() {
-        return (flags & FLAG_80211mc_RESPONDER) != 0;
-    }
-
-    public boolean isPasspointNetwork() {
-        return (flags & FLAG_PASSPOINT_NETWORK) != 0;
-    }
-
-    /**
-     * Indicates venue name (such as 'San Francisco Airport') published by access point; only
-     * available on Passpoint network and if published by access point.
-     */
-    public CharSequence venueName;
-
-    /**
-     * Indicates Passpoint operator name published by access point.
-     */
-    public CharSequence operatorFriendlyName;
-
-    /**
-     * {@hide}
-     */
-    public final static int UNSPECIFIED = -1;
-
-    /**
-     * 2.4 GHz band first channel number
-     * @hide
-     */
-    public static final int BAND_24_GHZ_FIRST_CH_NUM = 1;
-    /**
-     * 2.4 GHz band last channel number
-     * @hide
-     */
-    public static final int BAND_24_GHZ_LAST_CH_NUM = 14;
-    /**
-     * 2.4 GHz band frequency of first channel in MHz
-     * @hide
-     */
-    public static final int BAND_24_GHZ_START_FREQ_MHZ = 2412;
-    /**
-     * 2.4 GHz band frequency of last channel in MHz
-     * @hide
-     */
-    public static final int BAND_24_GHZ_END_FREQ_MHZ = 2484;
-
-    /**
-     * 5 GHz band first channel number
-     * @hide
-     */
-    public static final int BAND_5_GHZ_FIRST_CH_NUM = 32;
-    /**
-     * 5 GHz band last channel number
-     * @hide
-     */
-    public static final int BAND_5_GHZ_LAST_CH_NUM = 173;
-    /**
-     * 5 GHz band frequency of first channel in MHz
-     * @hide
-     */
-    public static final int BAND_5_GHZ_START_FREQ_MHZ = 5160;
-    /**
-     * 5 GHz band frequency of last channel in MHz
-     * @hide
-     */
-    public static final int BAND_5_GHZ_END_FREQ_MHZ = 5865;
-
-    /**
-     * 6 GHz band first channel number
-     * @hide
-     */
-    public static final int BAND_6_GHZ_FIRST_CH_NUM = 1;
-    /**
-     * 6 GHz band last channel number
-     * @hide
-     */
-    public static final int BAND_6_GHZ_LAST_CH_NUM = 233;
-    /**
-     * 6 GHz band frequency of first channel in MHz
-     * @hide
-     */
-    public static final int BAND_6_GHZ_START_FREQ_MHZ = 5945;
-    /**
-     * 6 GHz band frequency of last channel in MHz
-     * @hide
-     */
-    public static final int BAND_6_GHZ_END_FREQ_MHZ = 7105;
-
-    /**
-     * Utility function to check if a frequency within 2.4 GHz band
-     * @param freqMhz frequency in MHz
-     * @return true if within 2.4GHz, false otherwise
-     *
-     * @hide
-     */
-    public static boolean is24GHz(int freqMhz) {
-        return freqMhz >= BAND_24_GHZ_START_FREQ_MHZ && freqMhz <= BAND_24_GHZ_END_FREQ_MHZ;
-    }
-
-    /**
-     * Utility function to check if a frequency within 5 GHz band
-     * @param freqMhz frequency in MHz
-     * @return true if within 5GHz, false otherwise
-     *
-     * @hide
-     */
-    public static boolean is5GHz(int freqMhz) {
-        return freqMhz >=  BAND_5_GHZ_START_FREQ_MHZ && freqMhz <= BAND_5_GHZ_END_FREQ_MHZ;
-    }
-
-    /**
-     * Utility function to check if a frequency within 6 GHz band
-     * @param freqMhz
-     * @return true if within 6GHz, false otherwise
-     *
-     * @hide
-     */
-    public static boolean is6GHz(int freqMhz) {
-        return freqMhz >= BAND_6_GHZ_START_FREQ_MHZ && freqMhz <= BAND_6_GHZ_END_FREQ_MHZ;
-    }
-
-    /**
-     * Utility function to convert channel number/band to frequency in MHz
-     * @param channel number to convert
-     * @param band of channel to convert
-     * @return center frequency in Mhz of the channel, {@link UNSPECIFIED} if no match
-     *
-     * @hide
-     */
-    public static int convertChannelToFrequencyMhz(int channel, @WifiScanner.WifiBand int band) {
-        if (band == WifiScanner.WIFI_BAND_24_GHZ) {
-            // Special case
-            if (channel == 14) {
-                return 2484;
-            } else if (channel >= BAND_24_GHZ_FIRST_CH_NUM && channel <= BAND_24_GHZ_LAST_CH_NUM) {
-                return ((channel - BAND_24_GHZ_FIRST_CH_NUM) * 5) + BAND_24_GHZ_START_FREQ_MHZ;
-            } else {
-                return UNSPECIFIED;
-            }
-        }
-        if (band == WifiScanner.WIFI_BAND_5_GHZ) {
-            if (channel >= BAND_5_GHZ_FIRST_CH_NUM && channel <= BAND_5_GHZ_LAST_CH_NUM) {
-                return ((channel - BAND_5_GHZ_FIRST_CH_NUM) * 5) + BAND_5_GHZ_START_FREQ_MHZ;
-            } else {
-                return UNSPECIFIED;
-            }
-        }
-        if (band == WifiScanner.WIFI_BAND_6_GHZ) {
-            if (channel >= BAND_6_GHZ_FIRST_CH_NUM && channel <= BAND_6_GHZ_LAST_CH_NUM) {
-                return ((channel - BAND_6_GHZ_FIRST_CH_NUM) * 5) + BAND_6_GHZ_START_FREQ_MHZ;
-            } else {
-                return UNSPECIFIED;
-            }
-        }
-        return UNSPECIFIED;
-    }
-
-    /**
-     * Utility function to convert frequency in MHz to channel number
-     * @param freqMhz frequency in MHz
-     * @return channel number associated with given frequency, {@link UNSPECIFIED} if no match
-     *
-     * @hide
-     */
-    public static int convertFrequencyMhzToChannel(int freqMhz) {
-        // Special case
-        if (freqMhz == 2484) {
-            return 14;
-        } else if (is24GHz(freqMhz)) {
-            return (freqMhz - BAND_24_GHZ_START_FREQ_MHZ) / 5 + BAND_24_GHZ_FIRST_CH_NUM;
-        } else if (is5GHz(freqMhz)) {
-            return ((freqMhz - BAND_5_GHZ_START_FREQ_MHZ) / 5) + BAND_5_GHZ_FIRST_CH_NUM;
-        } else if (is6GHz(freqMhz)) {
-            return ((freqMhz - BAND_6_GHZ_START_FREQ_MHZ) / 5) + BAND_6_GHZ_FIRST_CH_NUM;
-        }
-
-        return UNSPECIFIED;
-    }
-
-    /**
-     * @hide
-     */
-    public boolean is24GHz() {
-        return ScanResult.is24GHz(frequency);
-    }
-
-    /**
-     * @hide
-     */
-    public boolean is5GHz() {
-        return ScanResult.is5GHz(frequency);
-    }
-
-    /**
-     * @hide
-     */
-    public boolean is6GHz() {
-        return ScanResult.is6GHz(frequency);
-    }
-
-    /**
-     *  @hide
-     * anqp lines from supplicant BSS response
-     */
-    @UnsupportedAppUsage
-    public List<String> anqpLines;
-
-    /**
-     * information elements from beacon.
-     */
-    public static class InformationElement {
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_SSID = 0;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_SUPPORTED_RATES = 1;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_TIM = 5;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_BSS_LOAD = 11;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_ERP = 42;
-        /** @hide */
-        public static final int EID_HT_CAPABILITIES = 45;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_RSN = 48;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_EXTENDED_SUPPORTED_RATES = 50;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_HT_OPERATION = 61;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_INTERWORKING = 107;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_ROAMING_CONSORTIUM = 111;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_EXTENDED_CAPS = 127;
-        /** @hide */
-        public static final int EID_VHT_CAPABILITIES = 191;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_VHT_OPERATION = 192;
-        /** @hide */
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        public static final int EID_VSA = 221;
-        /** @hide */
-        public static final int EID_EXTENSION_PRESENT = 255;
-
-        // Extension IDs
-        /** @hide */
-        public static final int EID_EXT_HE_CAPABILITIES = 35;
-        /** @hide */
-        public static final int EID_EXT_HE_OPERATION = 36;
-
-        /** @hide */
-        @UnsupportedAppUsage
-        public int id;
-        /** @hide */
-        public int idExt;
-
-        /** @hide */
-        @UnsupportedAppUsage
-        public byte[] bytes;
-
-        /** @hide */
-        public InformationElement() {
-        }
-
-        public InformationElement(@NonNull InformationElement rhs) {
-            this.id = rhs.id;
-            this.idExt = rhs.idExt;
-            this.bytes = rhs.bytes.clone();
-        }
-
-        /**
-         * The element ID of the information element. Defined in the IEEE 802.11-2016 spec
-         * Table 9-77.
-         */
-        public int getId() {
-            return id;
-        }
-
-        /**
-         * The element ID Extension of the information element. Defined in the IEEE 802.11-2016 spec
-         * Table 9-77.
-         */
-        public int getIdExt() {
-            return idExt;
-        }
-
-        /**
-         * Get the specific content of the information element.
-         */
-        @NonNull
-        public ByteBuffer getBytes() {
-            return ByteBuffer.wrap(bytes).asReadOnlyBuffer();
-        }
-    }
-
-    /**
-     * information elements found in the beacon.
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public InformationElement[] informationElements;
-    /**
-     * Get all information elements found in the beacon.
-     */
-    @NonNull
-    public List<InformationElement> getInformationElements() {
-        return Collections.unmodifiableList(Arrays.asList(informationElements));
-    }
-
-    /** ANQP response elements.
-     * @hide
-     */
-    public AnqpInformationElement[] anqpElements;
-
-    /** {@hide} */
-    public ScanResult(WifiSsid wifiSsid, String BSSID, long hessid, int anqpDomainId,
-            byte[] osuProviders, String caps, int level, int frequency, long tsf) {
-        this.wifiSsid = wifiSsid;
-        this.SSID = (wifiSsid != null) ? wifiSsid.toString() : WifiManager.UNKNOWN_SSID;
-        this.BSSID = BSSID;
-        this.hessid = hessid;
-        this.anqpDomainId = anqpDomainId;
-        if (osuProviders != null) {
-            this.anqpElements = new AnqpInformationElement[1];
-            this.anqpElements[0] =
-                    new AnqpInformationElement(AnqpInformationElement.HOTSPOT20_VENDOR_ID,
-                            AnqpInformationElement.HS_OSU_PROVIDERS, osuProviders);
-        }
-        this.capabilities = caps;
-        this.level = level;
-        this.frequency = frequency;
-        this.timestamp = tsf;
-        this.distanceCm = UNSPECIFIED;
-        this.distanceSdCm = UNSPECIFIED;
-        this.channelWidth = UNSPECIFIED;
-        this.centerFreq0 = UNSPECIFIED;
-        this.centerFreq1 = UNSPECIFIED;
-        this.flags = 0;
-        this.radioChainInfos = null;
-        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
-    }
-
-    /** {@hide} */
-    public ScanResult(WifiSsid wifiSsid, String BSSID, String caps, int level, int frequency,
-            long tsf, int distCm, int distSdCm) {
-        this.wifiSsid = wifiSsid;
-        this.SSID = (wifiSsid != null) ? wifiSsid.toString() : WifiManager.UNKNOWN_SSID;
-        this.BSSID = BSSID;
-        this.capabilities = caps;
-        this.level = level;
-        this.frequency = frequency;
-        this.timestamp = tsf;
-        this.distanceCm = distCm;
-        this.distanceSdCm = distSdCm;
-        this.channelWidth = UNSPECIFIED;
-        this.centerFreq0 = UNSPECIFIED;
-        this.centerFreq1 = UNSPECIFIED;
-        this.flags = 0;
-        this.radioChainInfos = null;
-        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
-    }
-
-    /** {@hide} */
-    public ScanResult(String Ssid, String BSSID, long hessid, int anqpDomainId, String caps,
-            int level, int frequency,
-            long tsf, int distCm, int distSdCm, int channelWidth, int centerFreq0, int centerFreq1,
-            boolean is80211McRTTResponder) {
-        this.SSID = Ssid;
-        this.BSSID = BSSID;
-        this.hessid = hessid;
-        this.anqpDomainId = anqpDomainId;
-        this.capabilities = caps;
-        this.level = level;
-        this.frequency = frequency;
-        this.timestamp = tsf;
-        this.distanceCm = distCm;
-        this.distanceSdCm = distSdCm;
-        this.channelWidth = channelWidth;
-        this.centerFreq0 = centerFreq0;
-        this.centerFreq1 = centerFreq1;
-        if (is80211McRTTResponder) {
-            this.flags = FLAG_80211mc_RESPONDER;
-        } else {
-            this.flags = 0;
-        }
-        this.radioChainInfos = null;
-        this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
-    }
-
-    /** {@hide} */
-    public ScanResult(WifiSsid wifiSsid, String Ssid, String BSSID, long hessid, int anqpDomainId,
-                  String caps, int level,
-                  int frequency, long tsf, int distCm, int distSdCm, int channelWidth,
-                  int centerFreq0, int centerFreq1, boolean is80211McRTTResponder) {
-        this(Ssid, BSSID, hessid, anqpDomainId, caps, level, frequency, tsf, distCm,
-                distSdCm, channelWidth, centerFreq0, centerFreq1, is80211McRTTResponder);
-        this.wifiSsid = wifiSsid;
-    }
-
-    /** copy constructor */
-    public ScanResult(@NonNull ScanResult source) {
-        if (source != null) {
-            wifiSsid = source.wifiSsid;
-            SSID = source.SSID;
-            BSSID = source.BSSID;
-            hessid = source.hessid;
-            anqpDomainId = source.anqpDomainId;
-            informationElements = source.informationElements;
-            anqpElements = source.anqpElements;
-            capabilities = source.capabilities;
-            level = source.level;
-            frequency = source.frequency;
-            channelWidth = source.channelWidth;
-            centerFreq0 = source.centerFreq0;
-            centerFreq1 = source.centerFreq1;
-            timestamp = source.timestamp;
-            distanceCm = source.distanceCm;
-            distanceSdCm = source.distanceSdCm;
-            seen = source.seen;
-            untrusted = source.untrusted;
-            numUsage = source.numUsage;
-            venueName = source.venueName;
-            operatorFriendlyName = source.operatorFriendlyName;
-            flags = source.flags;
-            radioChainInfos = source.radioChainInfos;
-            this.mWifiStandard = source.mWifiStandard;
-        }
-    }
-
-    /** Construct an empty scan result. */
-    public ScanResult() {
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        String none = "<none>";
-
-        sb.append("SSID: ")
-                .append(wifiSsid == null ? WifiManager.UNKNOWN_SSID : wifiSsid)
-                .append(", BSSID: ")
-                .append(BSSID == null ? none : BSSID)
-                .append(", capabilities: ")
-                .append(capabilities == null ? none : capabilities)
-                .append(", level: ")
-                .append(level)
-                .append(", frequency: ")
-                .append(frequency)
-                .append(", timestamp: ")
-                .append(timestamp);
-        sb.append(", distance: ").append((distanceCm != UNSPECIFIED ? distanceCm : "?")).
-                append("(cm)");
-        sb.append(", distanceSd: ").append((distanceSdCm != UNSPECIFIED ? distanceSdCm : "?")).
-                append("(cm)");
-
-        sb.append(", passpoint: ");
-        sb.append(((flags & FLAG_PASSPOINT_NETWORK) != 0) ? "yes" : "no");
-        sb.append(", ChannelBandwidth: ").append(channelWidth);
-        sb.append(", centerFreq0: ").append(centerFreq0);
-        sb.append(", centerFreq1: ").append(centerFreq1);
-        sb.append(", standard: ").append(wifiStandardToString(mWifiStandard));
-        sb.append(", 80211mcResponder: ");
-        sb.append(((flags & FLAG_80211mc_RESPONDER) != 0) ? "is supported" : "is not supported");
-        sb.append(", Radio Chain Infos: ").append(Arrays.toString(radioChainInfos));
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        if (wifiSsid != null) {
-            dest.writeInt(1);
-            wifiSsid.writeToParcel(dest, flags);
-        } else {
-            dest.writeInt(0);
-        }
-        dest.writeString(SSID);
-        dest.writeString(BSSID);
-        dest.writeLong(hessid);
-        dest.writeInt(anqpDomainId);
-        dest.writeString(capabilities);
-        dest.writeInt(level);
-        dest.writeInt(frequency);
-        dest.writeLong(timestamp);
-        dest.writeInt(distanceCm);
-        dest.writeInt(distanceSdCm);
-        dest.writeInt(channelWidth);
-        dest.writeInt(centerFreq0);
-        dest.writeInt(centerFreq1);
-        dest.writeInt(mWifiStandard);
-        dest.writeLong(seen);
-        dest.writeInt(untrusted ? 1 : 0);
-        dest.writeInt(numUsage);
-        dest.writeString((venueName != null) ? venueName.toString() : "");
-        dest.writeString((operatorFriendlyName != null) ? operatorFriendlyName.toString() : "");
-        dest.writeLong(this.flags);
-
-        if (informationElements != null) {
-            dest.writeInt(informationElements.length);
-            for (int i = 0; i < informationElements.length; i++) {
-                dest.writeInt(informationElements[i].id);
-                dest.writeInt(informationElements[i].idExt);
-                dest.writeInt(informationElements[i].bytes.length);
-                dest.writeByteArray(informationElements[i].bytes);
-            }
-        } else {
-            dest.writeInt(0);
-        }
-
-        if (anqpLines != null) {
-            dest.writeInt(anqpLines.size());
-            for (int i = 0; i < anqpLines.size(); i++) {
-                dest.writeString(anqpLines.get(i));
-            }
-        }
-        else {
-            dest.writeInt(0);
-        }
-        if (anqpElements != null) {
-            dest.writeInt(anqpElements.length);
-            for (AnqpInformationElement element : anqpElements) {
-                dest.writeInt(element.getVendorId());
-                dest.writeInt(element.getElementId());
-                dest.writeInt(element.getPayload().length);
-                dest.writeByteArray(element.getPayload());
-            }
-        } else {
-            dest.writeInt(0);
-        }
-
-        if (radioChainInfos != null) {
-            dest.writeInt(radioChainInfos.length);
-            for (int i = 0; i < radioChainInfos.length; i++) {
-                dest.writeInt(radioChainInfos[i].id);
-                dest.writeInt(radioChainInfos[i].level);
-            }
-        } else {
-            dest.writeInt(0);
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @NonNull Creator<ScanResult> CREATOR =
-        new Creator<ScanResult>() {
-            public ScanResult createFromParcel(Parcel in) {
-                WifiSsid wifiSsid = null;
-                if (in.readInt() == 1) {
-                    wifiSsid = WifiSsid.CREATOR.createFromParcel(in);
-                }
-                ScanResult sr = new ScanResult(
-                        wifiSsid,
-                        in.readString(),                    /* SSID  */
-                        in.readString(),                    /* BSSID */
-                        in.readLong(),                      /* HESSID */
-                        in.readInt(),                       /* ANQP Domain ID */
-                        in.readString(),                    /* capabilities */
-                        in.readInt(),                       /* level */
-                        in.readInt(),                       /* frequency */
-                        in.readLong(),                      /* timestamp */
-                        in.readInt(),                       /* distanceCm */
-                        in.readInt(),                       /* distanceSdCm */
-                        in.readInt(),                       /* channelWidth */
-                        in.readInt(),                       /* centerFreq0 */
-                        in.readInt(),                       /* centerFreq1 */
-                        false                               /* rtt responder,
-                                                               fixed with flags below */
-                );
-
-                sr.mWifiStandard = in.readInt();
-                sr.seen = in.readLong();
-                sr.untrusted = in.readInt() != 0;
-                sr.numUsage = in.readInt();
-                sr.venueName = in.readString();
-                sr.operatorFriendlyName = in.readString();
-                sr.flags = in.readLong();
-                int n = in.readInt();
-                if (n != 0) {
-                    sr.informationElements = new InformationElement[n];
-                    for (int i = 0; i < n; i++) {
-                        sr.informationElements[i] = new InformationElement();
-                        sr.informationElements[i].id = in.readInt();
-                        sr.informationElements[i].idExt = in.readInt();
-                        int len = in.readInt();
-                        sr.informationElements[i].bytes = new byte[len];
-                        in.readByteArray(sr.informationElements[i].bytes);
-                    }
-                }
-
-                n = in.readInt();
-                if (n != 0) {
-                    sr.anqpLines = new ArrayList<String>();
-                    for (int i = 0; i < n; i++) {
-                        sr.anqpLines.add(in.readString());
-                    }
-                }
-                n = in.readInt();
-                if (n != 0) {
-                    sr.anqpElements = new AnqpInformationElement[n];
-                    for (int i = 0; i < n; i++) {
-                        int vendorId = in.readInt();
-                        int elementId = in.readInt();
-                        int len = in.readInt();
-                        byte[] payload = new byte[len];
-                        in.readByteArray(payload);
-                        sr.anqpElements[i] =
-                                new AnqpInformationElement(vendorId, elementId, payload);
-                    }
-                }
-                n = in.readInt();
-                if (n != 0) {
-                    sr.radioChainInfos = new RadioChainInfo[n];
-                    for (int i = 0; i < n; i++) {
-                        sr.radioChainInfos[i] = new RadioChainInfo();
-                        sr.radioChainInfos[i].id = in.readInt();
-                        sr.radioChainInfos[i].level = in.readInt();
-                    }
-                }
-                return sr;
-            }
-
-            public ScanResult[] newArray(int size) {
-                return new ScanResult[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/SoftApCapability.java b/wifi/java/android/net/wifi/SoftApCapability.java
deleted file mode 100644
index dcb57ec..0000000
--- a/wifi/java/android/net/wifi/SoftApCapability.java
+++ /dev/null
@@ -1,186 +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;
-
-import android.annotation.LongDef;
-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;
-import java.util.Objects;
-
-/**
- * A class representing capability of the SoftAp.
- * {@see WifiManager}
- *
- * @hide
- */
-@SystemApi
-public final class SoftApCapability implements Parcelable {
-
-    /**
-     * Support for automatic channel selection in driver (ACS).
-     * Driver will auto select best channel based on interference to optimize performance.
-     *
-     * flag when {@link R.bool.config_wifi_softap_acs_supported)} is true.
-     *
-     * <p>
-     * Use {@link WifiManager.SoftApCallback#onInfoChanged(SoftApInfo)} and
-     * {@link SoftApInfo#getFrequency} and {@link SoftApInfo#getBandwidth} to get
-     * driver channel selection result.
-     */
-    public static final long SOFTAP_FEATURE_ACS_OFFLOAD = 1 << 0;
-
-    /**
-     * Support for client force disconnect.
-     * flag when {@link R.bool.config_wifi_sofap_client_force_disconnect_supported)} is true
-     *
-     * <p>
-     * Several Soft AP client control features, e.g. specifying the maximum number of
-     * Soft AP clients, only work when this feature support is present.
-     * Check feature support before invoking
-     * {@link SoftApConfiguration.Builder#setMaxNumberOfClients(int)}
-     */
-    public static final long SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT = 1 << 1;
-
-
-    /**
-     * Support for WPA3 Simultaneous Authentication of Equals (WPA3-SAE).
-     *
-     * flag when {@link config_wifi_softap_sae_supported)} is true.
-     */
-    public static final long SOFTAP_FEATURE_WPA3_SAE = 1 << 2;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @LongDef(flag = true, prefix = { "SOFTAP_FEATURE_" }, value = {
-            SOFTAP_FEATURE_ACS_OFFLOAD,
-            SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT,
-            SOFTAP_FEATURE_WPA3_SAE,
-    })
-    public @interface HotspotFeatures {}
-
-    private @HotspotFeatures long mSupportedFeatures = 0;
-
-    private int mMaximumSupportedClientNumber;
-
-    /**
-     * Get the maximum supported client numbers which AP resides on.
-     */
-    public int getMaxSupportedClients() {
-        return mMaximumSupportedClientNumber;
-    }
-
-    /**
-     * Set the maximum supported client numbers which AP resides on.
-     *
-     * @param maxClient maximum supported client numbers for the softap.
-     * @hide
-     */
-    public void setMaxSupportedClients(int maxClient) {
-        mMaximumSupportedClientNumber = maxClient;
-    }
-
-    /**
-     * Returns true when all of the queried features are supported, otherwise false.
-     *
-     * @param features One or combination of the following features:
-     * {@link #SOFTAP_FEATURE_ACS_OFFLOAD}, {@link #SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT} or
-     * {@link #SOFTAP_FEATURE_WPA3_SAE}.
-     */
-    public boolean areFeaturesSupported(@HotspotFeatures long features) {
-        return (mSupportedFeatures & features) == features;
-    }
-
-    /**
-     * @hide
-     */
-    public SoftApCapability(@Nullable SoftApCapability source) {
-        if (source != null) {
-            mSupportedFeatures = source.mSupportedFeatures;
-            mMaximumSupportedClientNumber = source.mMaximumSupportedClientNumber;
-        }
-    }
-
-    /**
-     * Constructor with combination of the feature.
-     * Zero to no supported feature.
-     *
-     * @param features One or combination of the following features:
-     * {@link #SOFTAP_FEATURE_ACS_OFFLOAD}, {@link #SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT} or
-     * {@link #SOFTAP_FEATURE_WPA3_SAE}.
-     * @hide
-     */
-    public SoftApCapability(@HotspotFeatures long features) {
-        mSupportedFeatures = features;
-    }
-
-    @Override
-    /** Implement the Parcelable interface. */
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    /** Implement the Parcelable interface */
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeLong(mSupportedFeatures);
-        dest.writeInt(mMaximumSupportedClientNumber);
-    }
-
-    @NonNull
-    /** Implement the Parcelable interface */
-    public static final Creator<SoftApCapability> CREATOR = new Creator<SoftApCapability>() {
-        public SoftApCapability createFromParcel(Parcel in) {
-            long supportedFeatures = in.readLong();
-            SoftApCapability capability = new SoftApCapability(supportedFeatures);
-            capability.mMaximumSupportedClientNumber = in.readInt();
-            return capability;
-        }
-
-        public SoftApCapability[] newArray(int size) {
-            return new SoftApCapability[size];
-        }
-    };
-
-    @NonNull
-    @Override
-    public String toString() {
-        StringBuilder sbuf = new StringBuilder();
-        sbuf.append("SupportedFeatures=").append(mSupportedFeatures);
-        sbuf.append("MaximumSupportedClientNumber=").append(mMaximumSupportedClientNumber);
-        return sbuf.toString();
-    }
-
-    @Override
-    public boolean equals(@NonNull Object o) {
-        if (this == o) return true;
-        if (!(o instanceof SoftApCapability)) return false;
-        SoftApCapability capability = (SoftApCapability) o;
-        return mSupportedFeatures == capability.mSupportedFeatures
-                && mMaximumSupportedClientNumber == capability.mMaximumSupportedClientNumber;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mSupportedFeatures, mMaximumSupportedClientNumber);
-    }
-}
diff --git a/wifi/java/android/net/wifi/SoftApConfiguration.java b/wifi/java/android/net/wifi/SoftApConfiguration.java
deleted file mode 100644
index a5e76e6..0000000
--- a/wifi/java/android/net/wifi/SoftApConfiguration.java
+++ /dev/null
@@ -1,972 +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;
-
-import android.annotation.IntDef;
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.util.Preconditions;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Configuration for a soft access point (a.k.a. Soft AP, SAP, Hotspot).
- *
- * This is input for the framework provided by a client app, i.e. it exposes knobs to instruct the
- * framework how it should configure a hotspot.
- *
- * System apps can use this to configure a tethered hotspot using
- * {@code WifiManager#startTetheredHotspot(SoftApConfiguration)} and
- * {@code WifiManager#setSoftApConfiguration(SoftApConfiguration)}
- * or local-only hotspot using
- * {@code WifiManager#startLocalOnlyHotspot(SoftApConfiguration, Executor,
- * WifiManager.LocalOnlyHotspotCallback)}.
- *
- * Instances of this class are immutable; use {@link SoftApConfiguration.Builder} and its methods to
- * create a new instance.
- *
- */
-public final class SoftApConfiguration implements Parcelable {
-
-    private static final String TAG = "SoftApConfiguration";
-
-    @VisibleForTesting
-    static final int PSK_MIN_LEN = 8;
-
-    @VisibleForTesting
-    static final int PSK_MAX_LEN = 63;
-
-    /**
-     * 2GHz band.
-     * @hide
-     */
-    @SystemApi
-    public static final int BAND_2GHZ = 1 << 0;
-
-    /**
-     * 5GHz band.
-     * @hide
-     */
-    @SystemApi
-    public static final int BAND_5GHZ = 1 << 1;
-
-    /**
-     * 6GHz band.
-     * @hide
-     */
-    @SystemApi
-    public static final int BAND_6GHZ = 1 << 2;
-
-    /**
-     * Device is allowed to choose the optimal band (2Ghz, 5Ghz, 6Ghz) based on device capability,
-     * operating country code and current radio conditions.
-     * @hide
-     */
-    @SystemApi
-    public static final int BAND_ANY = BAND_2GHZ | BAND_5GHZ | BAND_6GHZ;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(flag = true, prefix = { "BAND_TYPE_" }, value = {
-            BAND_2GHZ,
-            BAND_5GHZ,
-            BAND_6GHZ,
-    })
-    public @interface BandType {}
-
-    private static boolean isBandValid(@BandType int band) {
-        return ((band != 0) && ((band & ~BAND_ANY) == 0));
-    }
-
-    private static final int MIN_CH_2G_BAND = 1;
-    private static final int MAX_CH_2G_BAND = 14;
-    private static final int MIN_CH_5G_BAND = 34;
-    private static final int MAX_CH_5G_BAND = 196;
-    private static final int MIN_CH_6G_BAND = 1;
-    private static final int MAX_CH_6G_BAND = 253;
-
-
-
-    private static boolean isChannelBandPairValid(int channel, @BandType int band) {
-        switch (band) {
-            case BAND_2GHZ:
-                if (channel < MIN_CH_2G_BAND || channel >  MAX_CH_2G_BAND) {
-                    return false;
-                }
-                break;
-
-            case BAND_5GHZ:
-                if (channel < MIN_CH_5G_BAND || channel >  MAX_CH_5G_BAND) {
-                    return false;
-                }
-                break;
-
-            case BAND_6GHZ:
-                if (channel < MIN_CH_6G_BAND || channel >  MAX_CH_6G_BAND) {
-                    return false;
-                }
-                break;
-            default:
-                return false;
-        }
-        return true;
-    }
-
-    /**
-     * SSID for the AP, or null for a framework-determined SSID.
-     */
-    private final @Nullable String mSsid;
-
-    /**
-     * BSSID for the AP, or null to use a framework-determined BSSID.
-     */
-    private final @Nullable MacAddress mBssid;
-
-    /**
-     * Pre-shared key for WPA2-PSK or WPA3-SAE-Transition or WPA3-SAE encryption which depends on
-     * the security type.
-     */
-    private final @Nullable String mPassphrase;
-
-    /**
-     * This is a network that does not broadcast its SSID, so an
-     * SSID-specific probe request must be used for scans.
-     */
-    private final boolean mHiddenSsid;
-
-    /**
-     * The operating band of the AP.
-     * One or combination of the following band type:
-     * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
-     */
-    private final @BandType int mBand;
-
-    /**
-     * The operating channel of the AP.
-     */
-    private final int mChannel;
-
-    /**
-     * The maximim allowed number of clients that can associate to the AP.
-     */
-    private final int mMaxNumberOfClients;
-
-    /**
-     * The operating security type of the AP.
-     * One of the following security types:
-     * {@link #SECURITY_TYPE_OPEN},
-     * {@link #SECURITY_TYPE_WPA2_PSK},
-     * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_SAE}
-     */
-    private final @SecurityType int mSecurityType;
-
-    /**
-     * The flag to indicate client need to authorize by user
-     * when client is connecting to AP.
-     */
-    private final boolean mClientControlByUser;
-
-    /**
-     * The list of blocked client that can't associate to the AP.
-     */
-    private final List<MacAddress> mBlockedClientList;
-
-    /**
-     * The list of allowed client that can associate to the AP.
-     */
-    private final List<MacAddress> mAllowedClientList;
-
-    /**
-     * Whether auto shutdown of soft AP is enabled or not.
-     */
-    private final boolean mAutoShutdownEnabled;
-
-    /**
-     * Delay in milliseconds before shutting down soft AP when
-     * there are no connected devices.
-     */
-    private final long mShutdownTimeoutMillis;
-
-    /**
-     * THe definition of security type OPEN.
-     */
-    public static final int SECURITY_TYPE_OPEN = 0;
-
-    /**
-     * The definition of security type WPA2-PSK.
-     */
-    public static final int SECURITY_TYPE_WPA2_PSK = 1;
-
-    /**
-     * The definition of security type WPA3-SAE Transition mode.
-     */
-    public static final int SECURITY_TYPE_WPA3_SAE_TRANSITION = 2;
-
-    /**
-     * The definition of security type WPA3-SAE.
-     */
-    public static final int SECURITY_TYPE_WPA3_SAE = 3;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = { "SECURITY_TYPE_" }, value = {
-        SECURITY_TYPE_OPEN,
-        SECURITY_TYPE_WPA2_PSK,
-        SECURITY_TYPE_WPA3_SAE_TRANSITION,
-        SECURITY_TYPE_WPA3_SAE,
-    })
-    public @interface SecurityType {}
-
-    /** Private constructor for Builder and Parcelable implementation. */
-    private SoftApConfiguration(@Nullable String ssid, @Nullable MacAddress bssid,
-            @Nullable String passphrase, boolean hiddenSsid, @BandType int band, int channel,
-            @SecurityType int securityType, int maxNumberOfClients, boolean shutdownTimeoutEnabled,
-            long shutdownTimeoutMillis, boolean clientControlByUser,
-            @NonNull List<MacAddress> blockedList, @NonNull List<MacAddress> allowedList) {
-        mSsid = ssid;
-        mBssid = bssid;
-        mPassphrase = passphrase;
-        mHiddenSsid = hiddenSsid;
-        mBand = band;
-        mChannel = channel;
-        mSecurityType = securityType;
-        mMaxNumberOfClients = maxNumberOfClients;
-        mAutoShutdownEnabled = shutdownTimeoutEnabled;
-        mShutdownTimeoutMillis = shutdownTimeoutMillis;
-        mClientControlByUser = clientControlByUser;
-        mBlockedClientList = new ArrayList<>(blockedList);
-        mAllowedClientList = new ArrayList<>(allowedList);
-    }
-
-    @Override
-    public boolean equals(Object otherObj) {
-        if (this == otherObj) {
-            return true;
-        }
-        if (!(otherObj instanceof SoftApConfiguration)) {
-            return false;
-        }
-        SoftApConfiguration other = (SoftApConfiguration) otherObj;
-        return Objects.equals(mSsid, other.mSsid)
-                && Objects.equals(mBssid, other.mBssid)
-                && Objects.equals(mPassphrase, other.mPassphrase)
-                && mHiddenSsid == other.mHiddenSsid
-                && mBand == other.mBand
-                && mChannel == other.mChannel
-                && mSecurityType == other.mSecurityType
-                && mMaxNumberOfClients == other.mMaxNumberOfClients
-                && mAutoShutdownEnabled == other.mAutoShutdownEnabled
-                && mShutdownTimeoutMillis == other.mShutdownTimeoutMillis
-                && mClientControlByUser == other.mClientControlByUser
-                && Objects.equals(mBlockedClientList, other.mBlockedClientList)
-                && Objects.equals(mAllowedClientList, other.mAllowedClientList);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mSsid, mBssid, mPassphrase, mHiddenSsid,
-                mBand, mChannel, mSecurityType, mMaxNumberOfClients, mAutoShutdownEnabled,
-                mShutdownTimeoutMillis, mClientControlByUser, mBlockedClientList,
-                mAllowedClientList);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sbuf = new StringBuilder();
-        sbuf.append("ssid=").append(mSsid);
-        if (mBssid != null) sbuf.append(" \n bssid=").append(mBssid.toString());
-        sbuf.append(" \n Passphrase =").append(
-                TextUtils.isEmpty(mPassphrase) ? "<empty>" : "<non-empty>");
-        sbuf.append(" \n HiddenSsid =").append(mHiddenSsid);
-        sbuf.append(" \n Band =").append(mBand);
-        sbuf.append(" \n Channel =").append(mChannel);
-        sbuf.append(" \n SecurityType=").append(getSecurityType());
-        sbuf.append(" \n MaxClient=").append(mMaxNumberOfClients);
-        sbuf.append(" \n AutoShutdownEnabled=").append(mAutoShutdownEnabled);
-        sbuf.append(" \n ShutdownTimeoutMillis=").append(mShutdownTimeoutMillis);
-        sbuf.append(" \n ClientControlByUser=").append(mClientControlByUser);
-        sbuf.append(" \n BlockedClientList=").append(mBlockedClientList);
-        sbuf.append(" \n AllowedClientList=").append(mAllowedClientList);
-        return sbuf.toString();
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeString(mSsid);
-        dest.writeParcelable(mBssid, flags);
-        dest.writeString(mPassphrase);
-        dest.writeBoolean(mHiddenSsid);
-        dest.writeInt(mBand);
-        dest.writeInt(mChannel);
-        dest.writeInt(mSecurityType);
-        dest.writeInt(mMaxNumberOfClients);
-        dest.writeBoolean(mAutoShutdownEnabled);
-        dest.writeLong(mShutdownTimeoutMillis);
-        dest.writeBoolean(mClientControlByUser);
-        dest.writeTypedList(mBlockedClientList);
-        dest.writeTypedList(mAllowedClientList);
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @NonNull
-    public static final Creator<SoftApConfiguration> CREATOR = new Creator<SoftApConfiguration>() {
-        @Override
-        public SoftApConfiguration createFromParcel(Parcel in) {
-            return new SoftApConfiguration(
-                    in.readString(),
-                    in.readParcelable(MacAddress.class.getClassLoader()),
-                    in.readString(), in.readBoolean(), in.readInt(), in.readInt(), in.readInt(),
-                    in.readInt(), in.readBoolean(), in.readLong(), in.readBoolean(),
-                    in.createTypedArrayList(MacAddress.CREATOR),
-                    in.createTypedArrayList(MacAddress.CREATOR));
-        }
-
-        @Override
-        public SoftApConfiguration[] newArray(int size) {
-            return new SoftApConfiguration[size];
-        }
-    };
-
-    /**
-     * Return String set to be the SSID for the AP.
-     * {@link Builder#setSsid(String)}.
-     */
-    @Nullable
-    public String getSsid() {
-        return mSsid;
-    }
-
-    /**
-     * Returns MAC address set to be BSSID for the AP.
-     * {@link Builder#setBssid(MacAddress)}.
-     */
-    @Nullable
-    public MacAddress getBssid() {
-        return mBssid;
-    }
-
-    /**
-     * Returns String set to be passphrase for current AP.
-     * {@link Builder#setPassphrase(String, int)}.
-     */
-    @Nullable
-    public String getPassphrase() {
-        return mPassphrase;
-    }
-
-    /**
-     * Returns Boolean set to be indicate hidden (true: doesn't broadcast its SSID) or
-     * not (false: broadcasts its SSID) for the AP.
-     * {@link Builder#setHiddenSsid(boolean)}.
-     */
-    public boolean isHiddenSsid() {
-        return mHiddenSsid;
-    }
-
-    /**
-     * Returns band type set to be the band for the AP.
-     *
-     * One or combination of the following band type:
-     * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
-     *
-     * {@link Builder#setBand(int)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public @BandType int getBand() {
-        return mBand;
-    }
-
-    /**
-     * Returns Integer set to be the channel for the AP.
-     * {@link Builder#setChannel(int)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public int getChannel() {
-        return mChannel;
-    }
-
-    /**
-     * Get security type params which depends on which security passphrase to set.
-     *
-     * @return One of:
-     * {@link #SECURITY_TYPE_OPEN},
-     * {@link #SECURITY_TYPE_WPA2_PSK},
-     * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-     * {@link #SECURITY_TYPE_WPA3_SAE}
-     */
-    public @SecurityType int getSecurityType() {
-        return mSecurityType;
-    }
-
-    /**
-     * Returns the maximum number of clients that can associate to the AP.
-     * {@link Builder#setMaxNumberOfClients(int)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public int getMaxNumberOfClients() {
-        return mMaxNumberOfClients;
-    }
-
-    /**
-     * Returns whether auto shutdown is enabled or not.
-     * The Soft AP will shutdown when there are no devices associated to it for
-     * the timeout duration. See {@link Builder#setAutoShutdownEnabled(boolean)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean isAutoShutdownEnabled() {
-        return mAutoShutdownEnabled;
-    }
-
-    /**
-     * Returns the shutdown timeout in milliseconds.
-     * The Soft AP will shutdown when there are no devices associated to it for
-     * the timeout duration. See {@link Builder#setShutdownTimeoutMillis(long)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public long getShutdownTimeoutMillis() {
-        return mShutdownTimeoutMillis;
-    }
-
-    /**
-     * Returns a flag indicating whether clients need to be pre-approved by the user.
-     * (true: authorization required) or not (false: not required).
-     * {@link Builder#setClientControlByUserEnabled(Boolean)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean isClientControlByUserEnabled() {
-        return mClientControlByUser;
-    }
-
-    /**
-     * Returns List of clients which aren't allowed to associate to the AP.
-     *
-     * Clients are configured using {@link Builder#setBlockedClientList(List)}
-     *
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public List<MacAddress> getBlockedClientList() {
-        return mBlockedClientList;
-    }
-
-    /**
-     * List of clients which are allowed to associate to the AP.
-     * Clients are configured using {@link Builder#setAllowedClientList(List)}
-     *
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public List<MacAddress> getAllowedClientList() {
-        return mAllowedClientList;
-    }
-
-    /**
-     * Returns a {@link WifiConfiguration} representation of this {@link SoftApConfiguration}.
-     * Note that SoftApConfiguration may contain configuration which is cannot be represented
-     * by the legacy WifiConfiguration, in such cases a null will be returned.
-     *
-     * <li> SoftAp band in {@link WifiConfiguration.apBand} only supports
-     * 2GHz, 5GHz, 2GHz+5GHz bands, so conversion is limited to these bands. </li>
-     *
-     * <li> SoftAp security type in {@link WifiConfiguration.KeyMgmt} only supports
-     * NONE, WPA2_PSK, so conversion is limited to these security type.</li>
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    public WifiConfiguration toWifiConfiguration() {
-        WifiConfiguration wifiConfig = new WifiConfiguration();
-        wifiConfig.SSID = mSsid;
-        wifiConfig.preSharedKey = mPassphrase;
-        wifiConfig.hiddenSSID = mHiddenSsid;
-        wifiConfig.apChannel = mChannel;
-        switch (mSecurityType) {
-            case SECURITY_TYPE_OPEN:
-                wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-                break;
-            case SECURITY_TYPE_WPA2_PSK:
-                wifiConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA2_PSK);
-                break;
-            default:
-                Log.e(TAG, "Convert fail, unsupported security type :" + mSecurityType);
-                return null;
-        }
-
-        switch (mBand) {
-            case BAND_2GHZ:
-                wifiConfig.apBand  = WifiConfiguration.AP_BAND_2GHZ;
-                break;
-            case BAND_5GHZ:
-                wifiConfig.apBand  = WifiConfiguration.AP_BAND_5GHZ;
-                break;
-            case BAND_2GHZ | BAND_5GHZ:
-                wifiConfig.apBand  = WifiConfiguration.AP_BAND_ANY;
-                break;
-            case BAND_ANY:
-                wifiConfig.apBand  = WifiConfiguration.AP_BAND_ANY;
-                break;
-            default:
-                Log.e(TAG, "Convert fail, unsupported band setting :" + mBand);
-                return null;
-        }
-        return wifiConfig;
-    }
-
-    /**
-     * Builds a {@link SoftApConfiguration}, which allows an app to configure various aspects of a
-     * Soft AP.
-     *
-     * All fields are optional. By default, SSID and BSSID are automatically chosen by the
-     * framework, and an open network is created.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final class Builder {
-        private String mSsid;
-        private MacAddress mBssid;
-        private String mPassphrase;
-        private boolean mHiddenSsid;
-        private int mBand;
-        private int mChannel;
-        private int mMaxNumberOfClients;
-        private int mSecurityType;
-        private boolean mAutoShutdownEnabled;
-        private long mShutdownTimeoutMillis;
-        private boolean mClientControlByUser;
-        private List<MacAddress> mBlockedClientList;
-        private List<MacAddress> mAllowedClientList;
-
-        /**
-         * Constructs a Builder with default values (see {@link Builder}).
-         */
-        public Builder() {
-            mSsid = null;
-            mBssid = null;
-            mPassphrase = null;
-            mHiddenSsid = false;
-            mBand = BAND_2GHZ;
-            mChannel = 0;
-            mMaxNumberOfClients = 0;
-            mSecurityType = SECURITY_TYPE_OPEN;
-            mAutoShutdownEnabled = true; // enabled by default.
-            mShutdownTimeoutMillis = 0;
-            mClientControlByUser = false;
-            mBlockedClientList = new ArrayList<>();
-            mAllowedClientList = new ArrayList<>();
-        }
-
-        /**
-         * Constructs a Builder initialized from an existing {@link SoftApConfiguration} instance.
-         */
-        public Builder(@NonNull SoftApConfiguration other) {
-            Objects.requireNonNull(other);
-
-            mSsid = other.mSsid;
-            mBssid = other.mBssid;
-            mPassphrase = other.mPassphrase;
-            mHiddenSsid = other.mHiddenSsid;
-            mBand = other.mBand;
-            mChannel = other.mChannel;
-            mMaxNumberOfClients = other.mMaxNumberOfClients;
-            mSecurityType = other.mSecurityType;
-            mAutoShutdownEnabled = other.mAutoShutdownEnabled;
-            mShutdownTimeoutMillis = other.mShutdownTimeoutMillis;
-            mClientControlByUser = other.mClientControlByUser;
-            mBlockedClientList = new ArrayList<>(other.mBlockedClientList);
-            mAllowedClientList = new ArrayList<>(other.mAllowedClientList);
-        }
-
-        /**
-         * Builds the {@link SoftApConfiguration}.
-         *
-         * @return A new {@link SoftApConfiguration}, as configured by previous method calls.
-         */
-        @NonNull
-        public SoftApConfiguration build() {
-            for (MacAddress client : mAllowedClientList) {
-                if (mBlockedClientList.contains(client)) {
-                    throw new IllegalArgumentException("A MacAddress exist in both client list");
-                }
-            }
-            return new SoftApConfiguration(mSsid, mBssid, mPassphrase,
-                    mHiddenSsid, mBand, mChannel, mSecurityType, mMaxNumberOfClients,
-                    mAutoShutdownEnabled, mShutdownTimeoutMillis, mClientControlByUser,
-                    mBlockedClientList, mAllowedClientList);
-        }
-
-        /**
-         * Specifies an SSID for the AP.
-         * <p>
-         * Null SSID only support when configure a local-only hotspot.
-         * <p>
-         * <li>If not set, defaults to null.</li>
-         *
-         * @param ssid SSID of valid Unicode characters, or null to have the SSID automatically
-         *             chosen by the framework.
-         * @return Builder for chaining.
-         * @throws IllegalArgumentException when the SSID is empty or not valid Unicode.
-         */
-        @NonNull
-        public Builder setSsid(@Nullable String ssid) {
-            if (ssid != null) {
-                Preconditions.checkStringNotEmpty(ssid);
-                Preconditions.checkArgument(StandardCharsets.UTF_8.newEncoder().canEncode(ssid));
-            }
-            mSsid = ssid;
-            return this;
-        }
-
-        /**
-         * Specifies a BSSID for the AP.
-         * <p>
-         * <li>If not set, defaults to null.</li>
-         * @param bssid BSSID, or null to have the BSSID chosen by the framework. The caller is
-         *              responsible for avoiding collisions.
-         * @return Builder for chaining.
-         * @throws IllegalArgumentException when the given BSSID is the all-zero or broadcast MAC
-         *                                  address.
-         */
-        @NonNull
-        public Builder setBssid(@Nullable MacAddress bssid) {
-            if (bssid != null) {
-                Preconditions.checkArgument(!bssid.equals(WifiManager.ALL_ZEROS_MAC_ADDRESS));
-                Preconditions.checkArgument(!bssid.equals(MacAddress.BROADCAST_ADDRESS));
-            }
-            mBssid = bssid;
-            return this;
-        }
-
-        /**
-         * Specifies that this AP should use specific security type with the given ASCII passphrase.
-         *
-         * @param securityType One of the following security types:
-         * {@link #SECURITY_TYPE_OPEN},
-         * {@link #SECURITY_TYPE_WPA2_PSK},
-         * {@link #SECURITY_TYPE_WPA3_SAE_TRANSITION},
-         * {@link #SECURITY_TYPE_WPA3_SAE}.
-         * @param passphrase The passphrase to use for sepcific {@code securityType} configuration
-         * or null with {@link #SECURITY_TYPE_OPEN}.
-         *
-         * @return Builder for chaining.
-         * @throws IllegalArgumentException when the passphrase length is invalid and
-         *         {@code securityType} is not {@link #SECURITY_TYPE_OPEN}
-         *         or non-null passphrase and {@code securityType} is
-         *         {@link #SECURITY_TYPE_OPEN}.
-         */
-        @NonNull
-        public Builder setPassphrase(@Nullable String passphrase, @SecurityType int securityType) {
-            if (securityType == SECURITY_TYPE_OPEN) {
-                if (passphrase != null) {
-                    throw new IllegalArgumentException(
-                            "passphrase should be null when security type is open");
-                }
-            } else {
-                Preconditions.checkStringNotEmpty(passphrase);
-                final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-                if (!asciiEncoder.canEncode(passphrase)) {
-                    throw new IllegalArgumentException("passphrase not ASCII encodable");
-                }
-                if (securityType == SECURITY_TYPE_WPA2_PSK
-                        || securityType == SECURITY_TYPE_WPA3_SAE_TRANSITION) {
-                    if (passphrase.length() < PSK_MIN_LEN || passphrase.length() > PSK_MAX_LEN) {
-                        throw new IllegalArgumentException(
-                                "Password size must be at least " + PSK_MIN_LEN
-                                + " and no more than " + PSK_MAX_LEN
-                                + " for WPA2_PSK and WPA3_SAE_TRANSITION Mode");
-                    }
-                }
-            }
-            mSecurityType = securityType;
-            mPassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Specifies whether the AP is hidden (doesn't broadcast its SSID) or
-         * not (broadcasts its SSID).
-         * <p>
-         * <li>If not set, defaults to false (i.e not a hidden network).</li>
-         *
-         * @param hiddenSsid true for a hidden SSID, false otherwise.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setHiddenSsid(boolean hiddenSsid) {
-            mHiddenSsid = hiddenSsid;
-            return this;
-        }
-
-        /**
-         * Specifies the band for the AP.
-         * <p>
-         * <li>If not set, defaults to {@link #BAND_2GHZ}.</li>
-         *
-         * @param band One or combination of the following band type:
-         * {@link #BAND_2GHZ}, {@link #BAND_5GHZ}, {@link #BAND_6GHZ}.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setBand(@BandType int band) {
-            if (!isBandValid(band)) {
-                throw new IllegalArgumentException("Invalid band type");
-            }
-            mBand = band;
-            // Since band preference is specified, no specific channel is selected.
-            mChannel = 0;
-            return this;
-        }
-
-        /**
-         * Specifies the channel and associated band for the AP.
-         *
-         * The channel which AP resides on. Valid channels are country dependent.
-         * <p>
-         * The default for the channel is a the special value 0 to have the framework
-         * auto-select a valid channel from the band configured with
-         * {@link #setBand(int)}.
-         *
-         * The channel auto selection will offload to driver when
-         * {@link SoftApCapability#areFeaturesSupported(
-         * SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD)}
-         * return true. Driver will auto select best channel which based on environment
-         * interference to get best performance. Check {@link SoftApCapability} to get more detail.
-         *
-         * Note, since 6GHz band use the same channel numbering of 2.4GHz and 5GHZ bands,
-         * the caller needs to pass the band containing the selected channel.
-         *
-         * <p>
-         * <li>If not set, defaults to 0.</li>
-         * @param channel operating channel of the AP.
-         * @param band containing this channel.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setChannel(int channel, @BandType int band) {
-            if (!isChannelBandPairValid(channel, band)) {
-                throw new IllegalArgumentException("Invalid band type");
-            }
-            mBand = band;
-            mChannel = channel;
-            return this;
-        }
-
-        /**
-         * Specifies the maximum number of clients that can associate to the AP.
-         *
-         * The maximum number of clients (STAs) which can associate to the AP.
-         * The AP will reject association from any clients above this number.
-         * Specify a value of 0 to have the framework automatically use the maximum number
-         * which the device can support (based on hardware and carrier constraints).
-         * <p>
-         * Use {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
-         * {@link SoftApCapability#getMaxSupportedClients} to get the maximum number of clients
-         * which the device supports (based on hardware and carrier constraints).
-         *
-         * <p>
-         * <li>If not set, defaults to 0.</li>
-         *
-         * This method requires hardware support. If the method is used to set a
-         * non-zero {@code maxNumberOfClients} value then
-         * {@link WifiManager#startTetheredHotspot} will report error code
-         * {@link WifiManager#SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}.
-         *
-         * <p>
-         * Use {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
-         * {@link SoftApCapability#areFeaturesSupported(int)}
-         * with {@link SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT} to determine whether
-         * or not this feature is supported.
-         *
-         * @param maxNumberOfClients maximum client number of the AP.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setMaxNumberOfClients(@IntRange(from = 0) int maxNumberOfClients) {
-            if (maxNumberOfClients < 0) {
-                throw new IllegalArgumentException("maxNumberOfClients should be not negative");
-            }
-            mMaxNumberOfClients = maxNumberOfClients;
-            return this;
-        }
-
-        /**
-         * Specifies whether auto shutdown is enabled or not.
-         * The Soft AP will shut down when there are no devices connected to it for
-         * the timeout duration.
-         *
-         * <p>
-         * <li>If not set, defaults to true</li>
-         *
-         * @param enable true to enable, false to disable.
-         * @return Builder for chaining.
-         *
-         * @see #setShutdownTimeoutMillis(long)
-         */
-        @NonNull
-        public Builder setAutoShutdownEnabled(boolean enable) {
-            mAutoShutdownEnabled = enable;
-            return this;
-        }
-
-        /**
-         * Specifies the shutdown timeout in milliseconds.
-         * The Soft AP will shut down when there are no devices connected to it for
-         * the timeout duration.
-         *
-         * Specify a value of 0 to have the framework automatically use default timeout
-         * setting which defined in {@link R.integer.config_wifi_framework_soft_ap_timeout_delay}
-         *
-         * <p>
-         * <li>If not set, defaults to 0</li>
-         * <li>The shut down timeout will apply when {@link #setAutoShutdownEnabled(boolean)} is
-         * set to true</li>
-         *
-         * @param timeoutMillis milliseconds of the timeout delay.
-         * @return Builder for chaining.
-         *
-         * @see #setAutoShutdownEnabled(boolean)
-         */
-        @NonNull
-        public Builder setShutdownTimeoutMillis(@IntRange(from = 0) long timeoutMillis) {
-            if (timeoutMillis < 0) {
-                throw new IllegalArgumentException("Invalid timeout value");
-            }
-            mShutdownTimeoutMillis = timeoutMillis;
-            return this;
-        }
-
-        /**
-         * Configure the Soft AP to require manual user control of client association.
-         * If disabled (the default) then any client which isn't in the blocked list
-         * {@link #getBlockedClientList()} can associate to this Soft AP using the
-         * correct credentials until the Soft AP capacity is reached (capacity is hardware, carrier,
-         * or user limited - using {@link #setMaxNumberOfClients(int)}).
-         *
-         * If manual user control is enabled then clients will be accepted, rejected, or require
-         * a user approval based on the configuration provided by
-         * {@link #setBlockedClientList(List)} and {@link #setAllowedClientList(List)}.
-         *
-         * <p>
-         * This method requires hardware support. Hardware support can be determined using
-         * {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
-         * {@link SoftApCapability#areFeaturesSupported(int)}
-         * with {@link SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT}
-         *
-         * <p>
-         * If the method is called on a device without hardware support then starting the soft AP
-         * using {@link WifiManager#startTetheredHotspot(SoftApConfiguration)} will fail with
-         * {@link WifiManager#SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}.
-         *
-         * <p>
-         * <li>If not set, defaults to false (i.e The authoriztion is not required).</li>
-         *
-         * @param enabled true for enabling the control by user, false otherwise.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setClientControlByUserEnabled(boolean enabled) {
-            mClientControlByUser = enabled;
-            return this;
-        }
-
-
-        /**
-         * This method together with {@link setClientControlByUserEnabled(boolean)} control client
-         * connections to the AP. If client control by user is disabled using the above method then
-         * this API has no effect and clients are allowed to associate to the AP (within limit of
-         * max number of clients).
-         *
-         * If client control by user is enabled then this API configures the list of clients
-         * which are explicitly allowed. These are auto-accepted.
-         *
-         * All other clients which attempt to associate, whose MAC addresses are on neither list,
-         * are:
-         * <ul>
-         * <li>Rejected</li>
-         * <li>A callback {@link WifiManager.SoftApCallback#onBlockedClientConnecting(WifiClient)}
-         * is issued (which allows the user to add them to the allowed client list if desired).<li>
-         * </ul>
-         *
-         * @param allowedClientList list of clients which are allowed to associate to the AP
-         *                          without user pre-approval.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setAllowedClientList(@NonNull List<MacAddress> allowedClientList) {
-            mAllowedClientList = new ArrayList<>(allowedClientList);
-            return this;
-        }
-
-        /**
-         * This API configures the list of clients which are blocked and cannot associate
-         * to the Soft AP.
-         *
-         * <p>
-         * This method requires hardware support. Hardware support can be determined using
-         * {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)} and
-         * {@link SoftApCapability#areFeaturesSupported(int)}
-         * with {@link SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT}
-         *
-         * <p>
-         * If the method is called on a device without hardware support then starting the soft AP
-         * using {@link WifiManager#startTetheredHotspot(SoftApConfiguration)} will fail with
-         * {@link WifiManager#SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}.
-         *
-         * @param blockedClientList list of clients which are not allowed to associate to the AP.
-         * @return Builder for chaining.
-         */
-        @NonNull
-        public Builder setBlockedClientList(@NonNull List<MacAddress> blockedClientList) {
-            mBlockedClientList = new ArrayList<>(blockedClientList);
-            return this;
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/SoftApInfo.java b/wifi/java/android/net/wifi/SoftApInfo.java
deleted file mode 100644
index 24ed8ef..0000000
--- a/wifi/java/android/net/wifi/SoftApInfo.java
+++ /dev/null
@@ -1,194 +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;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Objects;
-
-/**
- * A class representing information about SoftAp.
- * {@see WifiManager}
- *
- * @hide
- */
-@SystemApi
-public final class SoftApInfo implements Parcelable {
-
-    /**
-     * AP Channel bandwidth is invalid.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_INVALID = 0;
-
-    /**
-     * AP Channel bandwidth is 20 MHZ but no HT.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_20MHZ_NOHT = 1;
-
-    /**
-     * AP Channel bandwidth is 20 MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_20MHZ = 2;
-
-    /**
-     * AP Channel bandwidth is 40 MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_40MHZ = 3;
-
-    /**
-     * AP Channel bandwidth is 80 MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_80MHZ = 4;
-
-    /**
-     * AP Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 5;
-
-    /**
-     * AP Channel bandwidth is 160 MHZ.
-     *
-     * @see #getBandwidth()
-     */
-    public static final int CHANNEL_WIDTH_160MHZ = 6;
-
-
-
-    /** The frequency which AP resides on.  */
-    private int mFrequency = 0;
-
-    @WifiAnnotations.Bandwidth
-    private int mBandwidth = CHANNEL_WIDTH_INVALID;
-
-    /**
-     * Get the frequency which AP resides on.
-     */
-    public int getFrequency() {
-        return mFrequency;
-    }
-
-    /**
-     * Set the frequency which AP resides on.
-     * @hide
-     */
-    public void setFrequency(int freq) {
-        mFrequency = freq;
-    }
-
-    /**
-     * Get AP Channel bandwidth.
-     *
-     * @return One of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
-     * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ},
-     * {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ} or {@link #CHANNEL_WIDTH_INVALID}.
-     */
-    @WifiAnnotations.Bandwidth
-    public int getBandwidth() {
-        return mBandwidth;
-    }
-
-    /**
-     * Set AP Channel bandwidth.
-     * @hide
-     */
-    public void setBandwidth(@WifiAnnotations.Bandwidth int bandwidth) {
-        mBandwidth = bandwidth;
-    }
-
-    /**
-     * @hide
-     */
-    public SoftApInfo(@Nullable SoftApInfo source) {
-        if (source != null) {
-            mFrequency = source.mFrequency;
-            mBandwidth = source.mBandwidth;
-        }
-    }
-
-    /**
-     * @hide
-     */
-    public SoftApInfo() {
-    }
-
-    @Override
-    /** Implement the Parcelable interface. */
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    /** Implement the Parcelable interface */
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(mFrequency);
-        dest.writeInt(mBandwidth);
-    }
-
-    @NonNull
-    /** Implement the Parcelable interface */
-    public static final Creator<SoftApInfo> CREATOR = new Creator<SoftApInfo>() {
-        public SoftApInfo createFromParcel(Parcel in) {
-            SoftApInfo info = new SoftApInfo();
-            info.mFrequency = in.readInt();
-            info.mBandwidth = in.readInt();
-            return info;
-        }
-
-        public SoftApInfo[] newArray(int size) {
-            return new SoftApInfo[size];
-        }
-    };
-
-    @NonNull
-    @Override
-    public String toString() {
-        return "SoftApInfo{"
-                + "bandwidth= " + mBandwidth
-                + ",frequency= " + mFrequency
-                + '}';
-    }
-
-    @Override
-    public boolean equals(@NonNull Object o) {
-        if (this == o) return true;
-        if (!(o instanceof SoftApInfo)) return false;
-        SoftApInfo softApInfo = (SoftApInfo) o;
-        return mFrequency == softApInfo.mFrequency
-                && mBandwidth == softApInfo.mBandwidth;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mFrequency, mBandwidth);
-    }
-}
diff --git a/wifi/java/android/net/wifi/SupplicantState.java b/wifi/java/android/net/wifi/SupplicantState.java
deleted file mode 100644
index de7e2b5..0000000
--- a/wifi/java/android/net/wifi/SupplicantState.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * From <code>defs.h</code> in <code>wpa_supplicant</code>.
- * <p/>
- * These enumeration values are used to indicate the current wpa_supplicant
- * state. This is more fine-grained than most users will be interested in.
- * In general, it is better to use
- * {@link android.net.NetworkInfo.State NetworkInfo.State}.
- * <p/>
- * Note, the order of these enum constants must match the numerical values of the
- * state constants in <code>defs.h</code> in <code>wpa_supplicant</code>.
- */
-public enum SupplicantState implements Parcelable {
-    /**
-     * This state indicates that client is not associated, but is likely to
-     * start looking for an access point. This state is entered when a
-     * connection is lost.
-     */
-    DISCONNECTED,
-
-    /**
-     * Interface is disabled
-     * <p/>
-     * This state is entered if the network interface is disabled.
-     * wpa_supplicant refuses any new operations that would
-     * use the radio until the interface has been enabled.
-     */
-    INTERFACE_DISABLED,
-
-    /**
-     * Inactive state (wpa_supplicant disabled).
-     * <p/>
-     * This state is entered if there are no enabled networks in the
-     * configuration. wpa_supplicant is not trying to associate with a new
-     * network and external interaction (e.g., ctrl_iface call to add or
-     * enable a network) is needed to start association.
-     */
-    INACTIVE,
-
-    /**
-     * Scanning for a network.
-     * <p/>
-     * This state is entered when wpa_supplicant starts scanning for a
-     * network.
-     */
-    SCANNING,
-
-    /**
-     * Trying to authenticate with a BSS/SSID
-     * <p/>
-     * This state is entered when wpa_supplicant has found a suitable BSS
-     * to authenticate with and the driver is configured to try to
-     * authenticate with this BSS.
-     */
-    AUTHENTICATING,
-
-    /**
-     * Trying to associate with a BSS/SSID.
-     * <p/>
-     * This state is entered when wpa_supplicant has found a suitable BSS
-     * to associate with and the driver is configured to try to associate
-     * with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this
-     * state is entered when the driver is configured to try to associate
-     * with a network using the configured SSID and security policy.
-     */
-    ASSOCIATING,
-
-    /**
-     * Association completed.
-     * <p/>
-     * This state is entered when the driver reports that association has
-     * been successfully completed with an AP. If IEEE 802.1X is used
-     * (with or without WPA/WPA2), wpa_supplicant remains in this state
-     * until the IEEE 802.1X/EAPOL authentication has been completed.
-     */
-    ASSOCIATED,
-
-    /**
-     * WPA 4-Way Key Handshake in progress.
-     * <p/>
-     * This state is entered when WPA/WPA2 4-Way Handshake is started. In
-     * case of WPA-PSK, this happens when receiving the first EAPOL-Key
-     * frame after association. In case of WPA-EAP, this state is entered
-     * when the IEEE 802.1X/EAPOL authentication has been completed.
-     */
-    FOUR_WAY_HANDSHAKE,
-
-    /**
-     * WPA Group Key Handshake in progress.
-     * <p/>
-     * This state is entered when 4-Way Key Handshake has been completed
-     * (i.e., when the supplicant sends out message 4/4) and when Group
-     * Key rekeying is started by the AP (i.e., when supplicant receives
-     * message 1/2).
-     */
-    GROUP_HANDSHAKE,
-
-    /**
-     * All authentication completed.
-     * <p/>
-     * This state is entered when the full authentication process is
-     * completed. In case of WPA2, this happens when the 4-Way Handshake is
-     * successfully completed. With WPA, this state is entered after the
-     * Group Key Handshake; with IEEE 802.1X (non-WPA) connection is
-     * completed after dynamic keys are received (or if not used, after
-     * the EAP authentication has been completed). With static WEP keys and
-     * plaintext connections, this state is entered when an association
-     * has been completed.
-     * <p/>
-     * This state indicates that the supplicant has completed its
-     * processing for the association phase and that data connection is
-     * fully configured. Note, however, that there may not be any IP
-     * address associated with the connection yet. Typically, a DHCP
-     * request needs to be sent at this point to obtain an address.
-     */
-    COMPLETED,
-
-    /**
-     * An Android-added state that is reported when a client issues an
-     * explicit DISCONNECT command. In such a case, the supplicant is
-     * not only dissociated from the current access point (as for the
-     * DISCONNECTED state above), but it also does not attempt to connect
-     * to any access point until a RECONNECT or REASSOCIATE command
-     * is issued by the client.
-     */
-    DORMANT,
-
-    /**
-     * No connection to wpa_supplicant.
-     * <p/>
-     * This is an additional pseudo-state to handle the case where
-     * wpa_supplicant is not running and/or we have not been able
-     * to establish a connection to it.
-     */
-    UNINITIALIZED,
-
-    /**
-     * A pseudo-state that should normally never be seen.
-     */
-    INVALID;
-
-    /**
-     * Returns {@code true} if the supplicant state is valid and {@code false}
-     * otherwise.
-     * @param state The supplicant state
-     * @return {@code true} if the supplicant state is valid and {@code false}
-     * otherwise.
-     */
-    public static boolean isValidState(SupplicantState state) {
-        return state != UNINITIALIZED && state != INVALID;
-    }
-
-
-    /** Supplicant associating or authenticating is considered a handshake state {@hide} */
-    public static boolean isHandshakeState(SupplicantState state) {
-        switch(state) {
-            case AUTHENTICATING:
-            case ASSOCIATING:
-            case ASSOCIATED:
-            case FOUR_WAY_HANDSHAKE:
-            case GROUP_HANDSHAKE:
-                return true;
-            case COMPLETED:
-            case DISCONNECTED:
-            case INTERFACE_DISABLED:
-            case INACTIVE:
-            case SCANNING:
-            case DORMANT:
-            case UNINITIALIZED:
-            case INVALID:
-                return false;
-            default:
-                throw new IllegalArgumentException("Unknown supplicant state");
-        }
-    }
-
-    /** @hide */
-    public static boolean isConnecting(SupplicantState state) {
-        switch(state) {
-            case AUTHENTICATING:
-            case ASSOCIATING:
-            case ASSOCIATED:
-            case FOUR_WAY_HANDSHAKE:
-            case GROUP_HANDSHAKE:
-            case COMPLETED:
-                return true;
-            case DISCONNECTED:
-            case INTERFACE_DISABLED:
-            case INACTIVE:
-            case SCANNING:
-            case DORMANT:
-            case UNINITIALIZED:
-            case INVALID:
-                return false;
-            default:
-                throw new IllegalArgumentException("Unknown supplicant state");
-        }
-    }
-
-    /** @hide */
-    public static boolean isDriverActive(SupplicantState state) {
-        switch(state) {
-            case DISCONNECTED:
-            case DORMANT:
-            case INACTIVE:
-            case AUTHENTICATING:
-            case ASSOCIATING:
-            case ASSOCIATED:
-            case SCANNING:
-            case FOUR_WAY_HANDSHAKE:
-            case GROUP_HANDSHAKE:
-            case COMPLETED:
-                return true;
-            case INTERFACE_DISABLED:
-            case UNINITIALIZED:
-            case INVALID:
-                return false;
-            default:
-                throw new IllegalArgumentException("Unknown supplicant state");
-        }
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(name());
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final @android.annotation.NonNull Creator<SupplicantState> CREATOR =
-        new Creator<SupplicantState>() {
-            public SupplicantState createFromParcel(Parcel in) {
-                return SupplicantState.valueOf(in.readString());
-            }
-
-            public SupplicantState[] newArray(int size) {
-                return new SupplicantState[size];
-            }
-        };
-
-}
diff --git a/wifi/java/android/net/wifi/SynchronousExecutor.java b/wifi/java/android/net/wifi/SynchronousExecutor.java
deleted file mode 100644
index 9926b1b..0000000
--- a/wifi/java/android/net/wifi/SynchronousExecutor.java
+++ /dev/null
@@ -1,29 +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;
-
-import java.util.concurrent.Executor;
-
-/**
- * An executor implementation that runs synchronously on the current thread.
- * @hide
- */
-public class SynchronousExecutor implements Executor {
-    @Override
-    public void execute(Runnable r) {
-        r.run();
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiAnnotations.java b/wifi/java/android/net/wifi/WifiAnnotations.java
deleted file mode 100644
index acda7e0..0000000
--- a/wifi/java/android/net/wifi/WifiAnnotations.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 android.net.wifi;
-
-import android.annotation.IntDef;
-import android.annotation.StringDef;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * Wifi annotations meant to be statically linked into client modules, since they cannot be
- * exposed as @SystemApi.
- *
- * e.g. {@link IntDef}, {@link StringDef}
- *
- * @hide
- */
-public final class WifiAnnotations {
-    private WifiAnnotations() {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"SCAN_TYPE_"}, value = {
-            WifiScanner.SCAN_TYPE_LOW_LATENCY,
-            WifiScanner.SCAN_TYPE_LOW_POWER,
-            WifiScanner.SCAN_TYPE_HIGH_ACCURACY})
-    public @interface ScanType {}
-
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"WIFI_BAND_"}, value = {
-            WifiScanner.WIFI_BAND_UNSPECIFIED,
-            WifiScanner.WIFI_BAND_24_GHZ,
-            WifiScanner.WIFI_BAND_5_GHZ,
-            WifiScanner.WIFI_BAND_5_GHZ_DFS_ONLY,
-            WifiScanner.WIFI_BAND_6_GHZ})
-    public @interface WifiBandBasic {}
-
-    @IntDef(prefix = { "CHANNEL_WIDTH_" }, value = {
-            SoftApInfo.CHANNEL_WIDTH_INVALID,
-            SoftApInfo.CHANNEL_WIDTH_20MHZ_NOHT,
-            SoftApInfo.CHANNEL_WIDTH_20MHZ,
-            SoftApInfo.CHANNEL_WIDTH_40MHZ,
-            SoftApInfo.CHANNEL_WIDTH_80MHZ,
-            SoftApInfo.CHANNEL_WIDTH_80MHZ_PLUS_MHZ,
-            SoftApInfo.CHANNEL_WIDTH_160MHZ,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface Bandwidth {}
-
-    @IntDef(prefix = { "CHANNEL_WIDTH_" }, value = {
-            ScanResult.CHANNEL_WIDTH_20MHZ,
-            ScanResult.CHANNEL_WIDTH_40MHZ,
-            ScanResult.CHANNEL_WIDTH_80MHZ,
-            ScanResult.CHANNEL_WIDTH_160MHZ,
-            ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ChannelWidth{}
-
-    @IntDef(prefix = { "WIFI_STANDARD_" }, value = {
-            ScanResult.WIFI_STANDARD_UNKNOWN,
-            ScanResult.WIFI_STANDARD_LEGACY,
-            ScanResult.WIFI_STANDARD_11N,
-            ScanResult.WIFI_STANDARD_11AC,
-            ScanResult.WIFI_STANDARD_11AX,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiStandard{}
-
-    @IntDef(prefix = { "PROTOCOL_" }, value = {
-            ScanResult.PROTOCOL_NONE,
-            ScanResult.PROTOCOL_WPA,
-            ScanResult.PROTOCOL_RSN,
-            ScanResult.PROTOCOL_OSEN,
-            ScanResult.PROTOCOL_WAPI
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface Protocol {}
-
-    @IntDef(prefix = { "KEY_MGMT_" }, value = {
-        ScanResult.KEY_MGMT_NONE,
-        ScanResult.KEY_MGMT_PSK,
-        ScanResult.KEY_MGMT_EAP,
-        ScanResult.KEY_MGMT_FT_PSK,
-        ScanResult.KEY_MGMT_FT_EAP,
-        ScanResult.KEY_MGMT_PSK_SHA256,
-        ScanResult.KEY_MGMT_EAP_SHA256,
-        ScanResult.KEY_MGMT_OSEN,
-        ScanResult.KEY_MGMT_SAE,
-        ScanResult.KEY_MGMT_OWE,
-        ScanResult.KEY_MGMT_EAP_SUITE_B_192,
-        ScanResult.KEY_MGMT_FT_SAE,
-        ScanResult.KEY_MGMT_OWE_TRANSITION,
-        ScanResult.KEY_MGMT_WAPI_PSK,
-        ScanResult.KEY_MGMT_WAPI_CERT
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface KeyMgmt {}
-
-    @IntDef(prefix = { "CIPHER_" }, value = {
-        ScanResult.CIPHER_NONE,
-        ScanResult.CIPHER_NO_GROUP_ADDRESSED,
-        ScanResult.CIPHER_TKIP,
-        ScanResult.CIPHER_CCMP,
-        ScanResult.CIPHER_GCMP_256,
-        ScanResult.CIPHER_SMS4
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface Cipher {}
-}
diff --git a/wifi/java/android/net/wifi/WifiClient.java b/wifi/java/android/net/wifi/WifiClient.java
deleted file mode 100644
index 3794566..0000000
--- a/wifi/java/android/net/wifi/WifiClient.java
+++ /dev/null
@@ -1,95 +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;
-
-import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Objects;
-
-/** @hide */
-@SystemApi
-public final class WifiClient implements Parcelable {
-
-    private final MacAddress mMacAddress;
-
-    /**
-     * The mac address of this client.
-     */
-    @NonNull
-    public MacAddress getMacAddress() {
-        return mMacAddress;
-    }
-
-    private WifiClient(Parcel in) {
-        mMacAddress = in.readParcelable(null);
-    }
-
-    /** @hide */
-    public WifiClient(@NonNull MacAddress macAddress) {
-        Objects.requireNonNull(macAddress, "mMacAddress must not be null.");
-
-        this.mMacAddress = macAddress;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeParcelable(mMacAddress, flags);
-    }
-
-    @NonNull
-    public static final Creator<WifiClient> CREATOR = new Creator<WifiClient>() {
-        public WifiClient createFromParcel(Parcel in) {
-            return new WifiClient(in);
-        }
-
-        public WifiClient[] newArray(int size) {
-            return new WifiClient[size];
-        }
-    };
-
-    @NonNull
-    @Override
-    public String toString() {
-        return "WifiClient{"
-                + "mMacAddress=" + mMacAddress
-                + '}';
-    }
-
-    @Override
-    public boolean equals(@NonNull Object o) {
-        if (this == o) return true;
-        if (!(o instanceof WifiClient)) return false;
-        WifiClient client = (WifiClient) o;
-        return mMacAddress.equals(client.mMacAddress);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mMacAddress);
-    }
-}
-
-
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
deleted file mode 100644
index 8c32d18..0000000
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ /dev/null
@@ -1,2987 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.content.pm.PackageManager;
-import android.net.IpConfiguration;
-import android.net.IpConfiguration.ProxySettings;
-import android.net.MacAddress;
-import android.net.NetworkSpecifier;
-import android.net.ProxyInfo;
-import android.net.StaticIpConfiguration;
-import android.net.Uri;
-import android.net.util.MacAddressUtils;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.SystemClock;
-import android.os.UserHandle;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Arrays;
-import java.util.BitSet;
-import java.util.Calendar;
-import java.util.HashMap;
-
-/**
- * A class representing a configured Wi-Fi network, including the
- * security configuration.
- *
- * @deprecated Use {@link WifiNetworkSpecifier.Builder} to create {@link NetworkSpecifier} and
- * {@link WifiNetworkSuggestion.Builder} to create {@link WifiNetworkSuggestion}. This will become a
- * system use only object in the future.
- */
-@Deprecated
-public class WifiConfiguration implements Parcelable {
-    private static final String TAG = "WifiConfiguration";
-    /**
-     * Current Version of the Backup Serializer.
-    */
-    private static final int BACKUP_VERSION = 3;
-    /** {@hide} */
-    public static final String ssidVarName = "ssid";
-    /** {@hide} */
-    public static final String bssidVarName = "bssid";
-    /** {@hide} */
-    public static final String pskVarName = "psk";
-    /** {@hide} */
-    @Deprecated
-    @UnsupportedAppUsage
-    public static final String[] wepKeyVarNames = { "wep_key0", "wep_key1", "wep_key2", "wep_key3" };
-    /** {@hide} */
-    @Deprecated
-    public static final String wepTxKeyIdxVarName = "wep_tx_keyidx";
-    /** {@hide} */
-    public static final String priorityVarName = "priority";
-    /** {@hide} */
-    public static final String hiddenSSIDVarName = "scan_ssid";
-    /** {@hide} */
-    public static final String pmfVarName = "ieee80211w";
-    /** {@hide} */
-    public static final String updateIdentiferVarName = "update_identifier";
-    /**
-     * The network ID for an invalid network.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int INVALID_NETWORK_ID = -1;
-    /** {@hide} */
-    public static final int LOCAL_ONLY_NETWORK_ID = -2;
-
-    /** {@hide} */
-    private String mPasspointManagementObjectTree;
-    /** {@hide} */
-    private static final int MAXIMUM_RANDOM_MAC_GENERATION_RETRY = 3;
-
-    /**
-     * Recognized key management schemes.
-     */
-    public static class KeyMgmt {
-        private KeyMgmt() { }
-
-        /** @hide */
-        @Retention(RetentionPolicy.SOURCE)
-        @IntDef(value = {
-                NONE,
-                WPA_PSK,
-                WPA_EAP,
-                IEEE8021X,
-                WPA2_PSK,
-                OSEN,
-                FT_PSK,
-                FT_EAP,
-                SAE,
-                OWE,
-                SUITE_B_192,
-                WPA_PSK_SHA256,
-                WPA_EAP_SHA256,
-                WAPI_PSK,
-                WAPI_CERT,
-                FILS_SHA256,
-                FILS_SHA384})
-        public @interface KeyMgmtScheme {}
-
-        /** WPA is not used; plaintext or static WEP could be used. */
-        public static final int NONE = 0;
-        /** WPA pre-shared key (requires {@code preSharedKey} to be specified). */
-        public static final int WPA_PSK = 1;
-        /** WPA using EAP authentication. Generally used with an external authentication server. */
-        public static final int WPA_EAP = 2;
-        /**
-         * IEEE 802.1X using EAP authentication and (optionally) dynamically
-         * generated WEP keys.
-         */
-        public static final int IEEE8021X = 3;
-
-        /**
-         * WPA2 pre-shared key for use with soft access point
-         * (requires {@code preSharedKey} to be specified).
-         * @hide
-         */
-        @SystemApi
-        public static final int WPA2_PSK = 4;
-        /**
-         * Hotspot 2.0 r2 OSEN:
-         * @hide
-         */
-        public static final int OSEN = 5;
-
-        /**
-         * IEEE 802.11r Fast BSS Transition with PSK authentication.
-         * @hide
-         */
-        public static final int FT_PSK = 6;
-
-        /**
-         * IEEE 802.11r Fast BSS Transition with EAP authentication.
-         * @hide
-         */
-        public static final int FT_EAP = 7;
-
-        /**
-         * Simultaneous Authentication of Equals
-         */
-        public static final int SAE = 8;
-
-        /**
-         * Opportunististic Wireless Encryption
-         */
-        public static final int OWE = 9;
-
-        /**
-         * SUITE_B_192 192 bit level
-         */
-        public static final int SUITE_B_192 = 10;
-
-        /**
-         * WPA pre-shared key with stronger SHA256-based algorithms.
-         * @hide
-         */
-        public static final int WPA_PSK_SHA256 = 11;
-
-        /**
-         * WPA using EAP authentication with stronger SHA256-based algorithms.
-         * @hide
-         */
-        public static final int WPA_EAP_SHA256 = 12;
-
-        /**
-         * WAPI pre-shared key (requires {@code preSharedKey} to be specified).
-         * @hide
-         */
-        @SystemApi
-        public static final int WAPI_PSK = 13;
-
-        /**
-         * WAPI certificate to be specified.
-         * @hide
-         */
-        @SystemApi
-        public static final int WAPI_CERT = 14;
-
-        /**
-        * IEEE 802.11ai FILS SK with SHA256
-         * @hide
-        */
-        public static final int FILS_SHA256 = 15;
-        /**
-         * IEEE 802.11ai FILS SK with SHA384:
-         * @hide
-         */
-        public static final int FILS_SHA384 = 16;
-
-        public static final String varName = "key_mgmt";
-
-        public static final String[] strings = { "NONE", "WPA_PSK", "WPA_EAP",
-                "IEEE8021X", "WPA2_PSK", "OSEN", "FT_PSK", "FT_EAP",
-                "SAE", "OWE", "SUITE_B_192", "WPA_PSK_SHA256", "WPA_EAP_SHA256",
-                "WAPI_PSK", "WAPI_CERT", "FILS_SHA256", "FILS_SHA384" };
-    }
-
-    /**
-     * Recognized security protocols.
-     */
-    public static class Protocol {
-        private Protocol() { }
-
-        /** WPA/IEEE 802.11i/D3.0
-         * @deprecated Due to security and performance limitations, use of WPA-1 networks
-         * is discouraged. WPA-2 (RSN) should be used instead. */
-        @Deprecated
-        public static final int WPA = 0;
-        /** RSN WPA2/WPA3/IEEE 802.11i */
-        public static final int RSN = 1;
-        /** HS2.0 r2 OSEN
-         * @hide
-         */
-        public static final int OSEN = 2;
-
-        /**
-         * WAPI Protocol
-         */
-        public static final int WAPI = 3;
-
-        public static final String varName = "proto";
-
-        public static final String[] strings = { "WPA", "RSN", "OSEN", "WAPI" };
-    }
-
-    /**
-     * Recognized IEEE 802.11 authentication algorithms.
-     */
-    public static class AuthAlgorithm {
-        private AuthAlgorithm() { }
-
-        /** Open System authentication (required for WPA/WPA2) */
-        public static final int OPEN = 0;
-        /** Shared Key authentication (requires static WEP keys)
-         * @deprecated Due to security and performance limitations, use of WEP networks
-         * is discouraged. */
-        @Deprecated
-        public static final int SHARED = 1;
-        /** LEAP/Network EAP (only used with LEAP) */
-        public static final int LEAP = 2;
-
-        /** SAE (Used only for WPA3-Personal) */
-        public static final int SAE = 3;
-
-        public static final String varName = "auth_alg";
-
-        public static final String[] strings = { "OPEN", "SHARED", "LEAP", "SAE" };
-    }
-
-    /**
-     * Recognized pairwise ciphers for WPA.
-     */
-    public static class PairwiseCipher {
-        private PairwiseCipher() { }
-
-        /** Use only Group keys (deprecated) */
-        public static final int NONE = 0;
-        /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
-         * @deprecated Due to security and performance limitations, use of WPA-1 networks
-         * is discouraged. WPA-2 (RSN) should be used instead. */
-        @Deprecated
-        public static final int TKIP = 1;
-        /** AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] */
-        public static final int CCMP = 2;
-        /**
-         * AES in Galois/Counter Mode
-         */
-        public static final int GCMP_256 = 3;
-        /**
-         * SMS4 cipher for WAPI
-         */
-        public static final int SMS4 = 4;
-
-        public static final String varName = "pairwise";
-
-        public static final String[] strings = { "NONE", "TKIP", "CCMP", "GCMP_256", "SMS4" };
-    }
-
-    /**
-     * Recognized group ciphers.
-     * <pre>
-     * CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0]
-     * TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0]
-     * WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key
-     * WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11)
-     * GCMP_256 = AES in Galois/Counter Mode
-     * </pre>
-     */
-    public static class GroupCipher {
-        private GroupCipher() { }
-
-        /** WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key (original 802.11)
-         * @deprecated Due to security and performance limitations, use of WEP networks
-         * is discouraged. */
-        @Deprecated
-        public static final int WEP40 = 0;
-        /** WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key
-         * @deprecated Due to security and performance limitations, use of WEP networks
-         * is discouraged. */
-        @Deprecated
-        public static final int WEP104 = 1;
-        /** Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] */
-        public static final int TKIP = 2;
-        /** AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] */
-        public static final int CCMP = 3;
-        /** Hotspot 2.0 r2 OSEN
-         * @hide
-         */
-        public static final int GTK_NOT_USED = 4;
-        /**
-         * AES in Galois/Counter Mode
-         */
-        public static final int GCMP_256 = 5;
-        /**
-         * SMS4 cipher for WAPI
-         */
-        public static final int SMS4 = 6;
-
-        public static final String varName = "group";
-
-        public static final String[] strings =
-                { /* deprecated */ "WEP40", /* deprecated */ "WEP104",
-                        "TKIP", "CCMP", "GTK_NOT_USED", "GCMP_256",
-                        "SMS4" };
-    }
-
-    /**
-     * Recognized group management ciphers.
-     * <pre>
-     * BIP_CMAC_256 = Cipher-based Message Authentication Code 256 bits
-     * BIP_GMAC_128 = Galois Message Authentication Code 128 bits
-     * BIP_GMAC_256 = Galois Message Authentication Code 256 bits
-     * </pre>
-     */
-    public static class GroupMgmtCipher {
-        private GroupMgmtCipher() { }
-
-        /** CMAC-256 = Cipher-based Message Authentication Code */
-        public static final int BIP_CMAC_256 = 0;
-
-        /** GMAC-128 = Galois Message Authentication Code */
-        public static final int BIP_GMAC_128 = 1;
-
-        /** GMAC-256 = Galois Message Authentication Code */
-        public static final int BIP_GMAC_256 = 2;
-
-        private static final String varName = "groupMgmt";
-
-        private static final String[] strings = { "BIP_CMAC_256",
-                "BIP_GMAC_128", "BIP_GMAC_256"};
-    }
-
-    /**
-     * Recognized suiteB ciphers.
-     * <pre>
-     * ECDHE_ECDSA
-     * ECDHE_RSA
-     * </pre>
-     * @hide
-     */
-    public static class SuiteBCipher {
-        private SuiteBCipher() { }
-
-        /** Diffie-Hellman with Elliptic Curve_ECDSA signature */
-        public static final int ECDHE_ECDSA = 0;
-
-        /** Diffie-Hellman with_RSA signature */
-        public static final int ECDHE_RSA = 1;
-
-        private static final String varName = "SuiteB";
-
-        private static final String[] strings = { "ECDHE_ECDSA", "ECDHE_RSA" };
-    }
-
-    /** Possible status of a network configuration. */
-    public static class Status {
-        private Status() { }
-
-        /** this is the network we are currently connected to */
-        public static final int CURRENT = 0;
-        /** supplicant will not attempt to use this network */
-        public static final int DISABLED = 1;
-        /** supplicant will consider this network available for association */
-        public static final int ENABLED = 2;
-
-        public static final String[] strings = { "current", "disabled", "enabled" };
-    }
-
-    /** Security type for an open network. */
-    public static final int SECURITY_TYPE_OPEN = 0;
-    /** Security type for a WEP network. */
-    public static final int SECURITY_TYPE_WEP = 1;
-    /** Security type for a PSK network. */
-    public static final int SECURITY_TYPE_PSK = 2;
-    /** Security type for an EAP network. */
-    public static final int SECURITY_TYPE_EAP = 3;
-    /** Security type for an SAE network. */
-    public static final int SECURITY_TYPE_SAE = 4;
-    /** Security type for an EAP Suite B network. */
-    public static final int SECURITY_TYPE_EAP_SUITE_B = 5;
-    /** Security type for an OWE network. */
-    public static final int SECURITY_TYPE_OWE = 6;
-    /** Security type for a WAPI PSK network. */
-    public static final int SECURITY_TYPE_WAPI_PSK = 7;
-    /** Security type for a WAPI Certificate network. */
-    public static final int SECURITY_TYPE_WAPI_CERT = 8;
-
-    /**
-     * Security types we support.
-     * @hide
-     */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = { "SECURITY_TYPE_" }, value = {
-            SECURITY_TYPE_OPEN,
-            SECURITY_TYPE_WEP,
-            SECURITY_TYPE_PSK,
-            SECURITY_TYPE_EAP,
-            SECURITY_TYPE_SAE,
-            SECURITY_TYPE_EAP_SUITE_B,
-            SECURITY_TYPE_OWE,
-            SECURITY_TYPE_WAPI_PSK,
-            SECURITY_TYPE_WAPI_CERT
-    })
-    public @interface SecurityType {}
-
-    /**
-     * Set the various security params to correspond to the provided security type.
-     * This is accomplished by setting the various BitSets exposed in WifiConfiguration.
-     *
-     * @param securityType One of the following security types:
-     * {@link #SECURITY_TYPE_OPEN},
-     * {@link #SECURITY_TYPE_WEP},
-     * {@link #SECURITY_TYPE_PSK},
-     * {@link #SECURITY_TYPE_EAP},
-     * {@link #SECURITY_TYPE_SAE},
-     * {@link #SECURITY_TYPE_EAP_SUITE_B},
-     * {@link #SECURITY_TYPE_OWE},
-     * {@link #SECURITY_TYPE_WAPI_PSK}, or
-     * {@link #SECURITY_TYPE_WAPI_CERT}
-     */
-    public void setSecurityParams(@SecurityType int securityType) {
-        // Clear all the bitsets.
-        allowedKeyManagement.clear();
-        allowedProtocols.clear();
-        allowedAuthAlgorithms.clear();
-        allowedPairwiseCiphers.clear();
-        allowedGroupCiphers.clear();
-        allowedGroupManagementCiphers.clear();
-        allowedSuiteBCiphers.clear();
-
-        switch (securityType) {
-            case SECURITY_TYPE_OPEN:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-                break;
-            case SECURITY_TYPE_WEP:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-                allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
-                allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED);
-                break;
-            case SECURITY_TYPE_PSK:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-                break;
-            case SECURITY_TYPE_EAP:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-                break;
-            case SECURITY_TYPE_SAE:
-                allowedProtocols.set(WifiConfiguration.Protocol.RSN);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SAE);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
-                requirePmf = true;
-                break;
-            case SECURITY_TYPE_EAP_SUITE_B:
-                allowedProtocols.set(WifiConfiguration.Protocol.RSN);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.SUITE_B_192);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
-                allowedGroupManagementCiphers.set(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256);
-                // Note: allowedSuiteBCiphers bitset will be set by the service once the
-                // certificates are attached to this profile
-                requirePmf = true;
-                break;
-            case SECURITY_TYPE_OWE:
-                allowedProtocols.set(WifiConfiguration.Protocol.RSN);
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OWE);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.GCMP_256);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GCMP_256);
-                requirePmf = true;
-                break;
-            case SECURITY_TYPE_WAPI_PSK:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WAPI_PSK);
-                allowedProtocols.set(WifiConfiguration.Protocol.WAPI);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.SMS4);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.SMS4);
-                break;
-            case SECURITY_TYPE_WAPI_CERT:
-                allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WAPI_CERT);
-                allowedProtocols.set(WifiConfiguration.Protocol.WAPI);
-                allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.SMS4);
-                allowedGroupCiphers.set(WifiConfiguration.GroupCipher.SMS4);
-                break;
-            default:
-                throw new IllegalArgumentException("unknown security type " + securityType);
-        }
-    }
-
-    /** @hide */
-    public static final int UNKNOWN_UID = -1;
-
-    /**
-     * The ID number that the supplicant uses to identify this
-     * network configuration entry. This must be passed as an argument
-     * to most calls into the supplicant.
-     */
-    public int networkId;
-
-    // Fixme We need remove this field to use only Quality network selection status only
-    /**
-     * The current status of this network configuration entry.
-     * @see Status
-     */
-    public int status;
-
-    /**
-     * The network's SSID. Can either be a UTF-8 string,
-     * which must be enclosed in double quotation marks
-     * (e.g., {@code "MyNetwork"}), or a string of
-     * hex digits, which are not enclosed in quotes
-     * (e.g., {@code 01a243f405}).
-     */
-    public String SSID;
-
-    /**
-     * When set, this network configuration entry should only be used when
-     * associating with the AP having the specified BSSID. The value is
-     * a string in the format of an Ethernet MAC address, e.g.,
-     * <code>XX:XX:XX:XX:XX:XX</code> where each <code>X</code> is a hex digit.
-     */
-    public String BSSID;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"AP_BAND_"}, value = {
-            AP_BAND_2GHZ,
-            AP_BAND_5GHZ,
-            AP_BAND_ANY})
-    public @interface ApBand {}
-
-    /**
-     * 2GHz band.
-     * @hide
-     */
-    public static final int AP_BAND_2GHZ = 0;
-
-    /**
-     * 5GHz band.
-     * @hide
-     */
-    public static final int AP_BAND_5GHZ = 1;
-
-    /**
-     * Device is allowed to choose the optimal band (2Ghz or 5Ghz) based on device capability,
-     * operating country code and current radio conditions.
-     * @hide
-     */
-    public static final int AP_BAND_ANY = -1;
-
-    /**
-     * The band which the AP resides on.
-     * One of {@link #AP_BAND_2GHZ}, {@link #AP_BAND_5GHZ}, or {@link #AP_BAND_ANY}.
-     * By default, {@link #AP_BAND_2GHZ} is chosen.
-     *
-     * @hide
-     */
-    @UnsupportedAppUsage
-    @ApBand
-    public int apBand = AP_BAND_2GHZ;
-
-    /**
-     * The channel which AP resides on,currently, US only
-     * 2G  1-11
-     * 5G  36,40,44,48,149,153,157,161,165
-     * 0 - find a random available channel according to the apBand
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int apChannel = 0;
-
-    /**
-     * Pre-shared key for use with WPA-PSK. Either an ASCII string enclosed in
-     * double quotation marks (e.g., {@code "abcdefghij"} for PSK passphrase or
-     * a string of 64 hex digits for raw PSK.
-     * <p/>
-     * When the value of this key is read, the actual key is
-     * not returned, just a "*" if the key has a value, or the null
-     * string otherwise.
-     */
-    public String preSharedKey;
-
-    /**
-     * Four WEP keys. For each of the four values, provide either an ASCII
-     * string enclosed in double quotation marks (e.g., {@code "abcdef"}),
-     * a string of hex digits (e.g., {@code 0102030405}), or an empty string
-     * (e.g., {@code ""}).
-     * <p/>
-     * When the value of one of these keys is read, the actual key is
-     * not returned, just a "*" if the key has a value, or the null
-     * string otherwise.
-     * @deprecated Due to security and performance limitations, use of WEP networks
-     * is discouraged.
-     */
-    @Deprecated
-    public String[] wepKeys;
-
-    /** Default WEP key index, ranging from 0 to 3.
-     * @deprecated Due to security and performance limitations, use of WEP networks
-     * is discouraged. */
-    @Deprecated
-    public int wepTxKeyIndex;
-
-    /**
-     * Priority determines the preference given to a network by {@code wpa_supplicant}
-     * when choosing an access point with which to associate.
-     * @deprecated This field does not exist anymore.
-     */
-    @Deprecated
-    public int priority;
-
-    /**
-     * This is a network that does not broadcast its SSID, so an
-     * SSID-specific probe request must be used for scans.
-     */
-    public boolean hiddenSSID;
-
-    /**
-     * True if the network requires Protected Management Frames (PMF), false otherwise.
-     * @hide
-     */
-    @SystemApi
-    public boolean requirePmf;
-
-    /**
-     * Update identifier, for Passpoint network.
-     * @hide
-     */
-    public String updateIdentifier;
-
-    /**
-     * The set of key management protocols supported by this configuration.
-     * See {@link KeyMgmt} for descriptions of the values.
-     * Defaults to WPA-PSK WPA-EAP.
-     */
-    @NonNull
-    public BitSet allowedKeyManagement;
-    /**
-     * The set of security protocols supported by this configuration.
-     * See {@link Protocol} for descriptions of the values.
-     * Defaults to WPA RSN.
-     */
-    @NonNull
-    public BitSet allowedProtocols;
-    /**
-     * The set of authentication protocols supported by this configuration.
-     * See {@link AuthAlgorithm} for descriptions of the values.
-     * Defaults to automatic selection.
-     */
-    @NonNull
-    public BitSet allowedAuthAlgorithms;
-    /**
-     * The set of pairwise ciphers for WPA supported by this configuration.
-     * See {@link PairwiseCipher} for descriptions of the values.
-     * Defaults to CCMP TKIP.
-     */
-    @NonNull
-    public BitSet allowedPairwiseCiphers;
-    /**
-     * The set of group ciphers supported by this configuration.
-     * See {@link GroupCipher} for descriptions of the values.
-     * Defaults to CCMP TKIP WEP104 WEP40.
-     */
-    @NonNull
-    public BitSet allowedGroupCiphers;
-    /**
-     * The set of group management ciphers supported by this configuration.
-     * See {@link GroupMgmtCipher} for descriptions of the values.
-     */
-    @NonNull
-    public BitSet allowedGroupManagementCiphers;
-    /**
-     * The set of SuiteB ciphers supported by this configuration.
-     * To be used for WPA3-Enterprise mode. Set automatically by the framework based on the
-     * certificate type that is used in this configuration.
-     */
-    @NonNull
-    public BitSet allowedSuiteBCiphers;
-    /**
-     * The enterprise configuration details specifying the EAP method,
-     * certificates and other settings associated with the EAP.
-     */
-    public WifiEnterpriseConfig enterpriseConfig;
-
-    /**
-     * Fully qualified domain name of a Passpoint configuration
-     */
-    public String FQDN;
-
-    /**
-     * Name of Passpoint credential provider
-     */
-    public String providerFriendlyName;
-
-    /**
-     * Flag indicating if this network is provided by a home Passpoint provider or a roaming
-     * Passpoint provider.  This flag will be {@code true} if this network is provided by
-     * a home Passpoint provider and {@code false} if is provided by a roaming Passpoint provider
-     * or is a non-Passpoint network.
-     */
-    public boolean isHomeProviderNetwork;
-
-    /**
-     * Roaming Consortium Id list for Passpoint credential; identifies a set of networks where
-     * Passpoint credential will be considered valid
-     */
-    public long[] roamingConsortiumIds;
-
-    /**
-     * True if this network configuration is visible to and usable by other users on the
-     * same device, false otherwise.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean shared;
-
-    /**
-     * @hide
-     */
-    @NonNull
-    @UnsupportedAppUsage
-    private IpConfiguration mIpConfiguration;
-
-    /**
-     * @hide
-     * dhcp server MAC address if known
-     */
-    public String dhcpServer;
-
-    /**
-     * @hide
-     * default Gateway MAC address if known
-     */
-    @UnsupportedAppUsage
-    public String defaultGwMacAddress;
-
-    /**
-     * @hide
-     * last time we connected, this configuration had validated internet access
-     */
-    @UnsupportedAppUsage
-    public boolean validatedInternetAccess;
-
-    /**
-     * @hide
-     * The number of beacon intervals between Delivery Traffic Indication Maps (DTIM)
-     * This value is populated from scan results that contain Beacon Frames, which are infrequent.
-     * The value is not guaranteed to be set or current (Although it SHOULDNT change once set)
-     * Valid values are from 1 - 255. Initialized here as 0, use this to check if set.
-     */
-    public int dtimInterval = 0;
-
-    /**
-     * Flag indicating if this configuration represents a legacy Passpoint configuration
-     * (Release N or older).  This is used for migrating Passpoint configuration from N to O.
-     * This will no longer be needed after O.
-     * @hide
-     */
-    public boolean isLegacyPasspointConfig = false;
-    /**
-     * @hide
-     * Uid of app creating the configuration
-     */
-    @SystemApi
-    public int creatorUid;
-
-    /**
-     * @hide
-     * Uid of last app issuing a connection related command
-     */
-    @UnsupportedAppUsage
-    public int lastConnectUid;
-
-    /**
-     * @hide
-     * Uid of last app modifying the configuration
-     */
-    @SystemApi
-    public int lastUpdateUid;
-
-    /**
-     * @hide
-     * Universal name for app creating the configuration
-     *    see {@link PackageManager#getNameForUid(int)}
-     */
-    @SystemApi
-    public String creatorName;
-
-    /**
-     * @hide
-     * Universal name for app updating the configuration
-     *    see {@link PackageManager#getNameForUid(int)}
-     */
-    @SystemApi
-    public String lastUpdateName;
-
-    /**
-     * The carrier ID identifies the operator who provides this network configuration.
-     *    see {@link TelephonyManager#getSimCarrierId()}
-     * @hide
-     */
-    @SystemApi
-    public int carrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
-
-    /**
-     * @hide
-     * Auto-join is allowed by user for this network.
-     * Default true.
-     */
-    @SystemApi
-    public boolean allowAutojoin = true;
-
-    /** @hide **/
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    public static int INVALID_RSSI = -127;
-
-    /**
-     * @hide
-     * Number of reports indicating no Internet Access
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public int numNoInternetAccessReports;
-
-    /**
-     * @hide
-     * The WiFi configuration is considered to have no internet access for purpose of autojoining
-     * if there has been a report of it having no internet access, and, it never have had
-     * internet access in the past.
-     */
-    @SystemApi
-    public boolean hasNoInternetAccess() {
-        return numNoInternetAccessReports > 0 && !validatedInternetAccess;
-    }
-
-    /**
-     * The WiFi configuration is expected not to have Internet access (e.g., a wireless printer, a
-     * Chromecast hotspot, etc.). This will be set if the user explicitly confirms a connection to
-     * this configuration and selects "don't ask again".
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public boolean noInternetAccessExpected;
-
-    /**
-     * The WiFi configuration is expected not to have Internet access (e.g., a wireless printer, a
-     * Chromecast hotspot, etc.). This will be set if the user explicitly confirms a connection to
-     * this configuration and selects "don't ask again".
-     * @hide
-     */
-    @SystemApi
-    public boolean isNoInternetAccessExpected() {
-        return noInternetAccessExpected;
-    }
-
-    /**
-     * This Wifi configuration is expected for OSU(Online Sign Up) of Passpoint Release 2.
-     * @hide
-     */
-    public boolean osu;
-
-    /**
-     * @hide
-     * Last time the system was connected to this configuration.
-     */
-    public long lastConnected;
-
-    /**
-     * @hide
-     * Last time the system was disconnected to this configuration.
-     */
-    public long lastDisconnected;
-
-    /**
-     * Set if the configuration was self added by the framework
-     * This boolean is cleared if we get a connect/save/ update or
-     * any wifiManager command that indicate the user interacted with the configuration
-     * since we will now consider that the configuration belong to him.
-     * @deprecated only kept for @UnsupportedAppUsage
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public boolean selfAdded;
-
-    /**
-     * Peer WifiConfiguration this WifiConfiguration was added for
-     * @hide
-     */
-    public String peerWifiConfiguration;
-
-    /**
-     * @hide
-     * Indicate that a WifiConfiguration is temporary and should not be saved
-     * nor considered by AutoJoin.
-     */
-    public boolean ephemeral;
-
-    /**
-     * @hide
-     * Indicate that a WifiConfiguration is temporary and should not be saved
-     * nor considered by AutoJoin.
-     */
-    @SystemApi
-    public boolean isEphemeral() {
-      return ephemeral;
-    }
-
-    /**
-     * Indicate whether the network is trusted or not. Networks are considered trusted
-     * if the user explicitly allowed this network connection.
-     * This bit can be used by suggestion network, see
-     * {@link WifiNetworkSuggestion.Builder#setUntrusted(boolean)}
-     * @hide
-     */
-    public boolean trusted;
-
-    /**
-     * True if this Wifi configuration is created from a {@link WifiNetworkSuggestion},
-     * false otherwise.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean fromWifiNetworkSuggestion;
-
-    /**
-     * True if this Wifi configuration is created from a {@link WifiNetworkSpecifier},
-     * false otherwise.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean fromWifiNetworkSpecifier;
-
-    /**
-     * True if the creator of this configuration has expressed that it
-     * should be considered metered, false otherwise.
-     *
-     * @see #isMetered(WifiConfiguration, WifiInfo)
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean meteredHint;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"METERED_OVERRIDE_"}, value = {
-            METERED_OVERRIDE_NONE,
-            METERED_OVERRIDE_METERED,
-            METERED_OVERRIDE_NOT_METERED})
-    public @interface MeteredOverride {}
-
-    /**
-     * No metered override.
-     * @hide
-     */
-    @SystemApi
-    public static final int METERED_OVERRIDE_NONE = 0;
-    /**
-     * Override network to be metered.
-     * @hide
-     */
-    @SystemApi
-    public static final int METERED_OVERRIDE_METERED = 1;
-    /**
-     * Override network to be unmetered.
-     * @hide
-     */
-    @SystemApi
-    public static final int METERED_OVERRIDE_NOT_METERED = 2;
-
-    /**
-     * Indicates if the end user has expressed an explicit opinion about the
-     * meteredness of this network, such as through the Settings app.
-     * This value is one of {@link #METERED_OVERRIDE_NONE}, {@link #METERED_OVERRIDE_METERED},
-     * or {@link #METERED_OVERRIDE_NOT_METERED}.
-     * <p>
-     * This should always override any values from {@link #meteredHint} or
-     * {@link WifiInfo#getMeteredHint()}.
-     *
-     * By default this field is set to {@link #METERED_OVERRIDE_NONE}.
-     *
-     * @see #isMetered(WifiConfiguration, WifiInfo)
-     * @hide
-     */
-    @SystemApi
-    @MeteredOverride
-    public int meteredOverride = METERED_OVERRIDE_NONE;
-
-    /**
-     * Blend together all the various opinions to decide if the given network
-     * should be considered metered or not.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static boolean isMetered(@Nullable WifiConfiguration config, @Nullable WifiInfo info) {
-        boolean metered = false;
-        if (info != null && info.getMeteredHint()) {
-            metered = true;
-        }
-        if (config != null && config.meteredHint) {
-            metered = true;
-        }
-        if (config != null
-                && config.meteredOverride == WifiConfiguration.METERED_OVERRIDE_METERED) {
-            metered = true;
-        }
-        if (config != null
-                && config.meteredOverride == WifiConfiguration.METERED_OVERRIDE_NOT_METERED) {
-            metered = false;
-        }
-        return metered;
-    }
-
-    /**
-     * @hide
-     * Returns true if this WiFi config is for an open network.
-     */
-    public boolean isOpenNetwork() {
-        final int cardinality = allowedKeyManagement.cardinality();
-        final boolean hasNoKeyMgmt = cardinality == 0
-                || (cardinality == 1 && (allowedKeyManagement.get(KeyMgmt.NONE)
-                || allowedKeyManagement.get(KeyMgmt.OWE)));
-
-        boolean hasNoWepKeys = true;
-        if (wepKeys != null) {
-            for (int i = 0; i < wepKeys.length; i++) {
-                if (wepKeys[i] != null) {
-                    hasNoWepKeys = false;
-                    break;
-                }
-            }
-        }
-
-        return hasNoKeyMgmt && hasNoWepKeys;
-    }
-
-    /**
-     * @hide
-     * Setting this value will force scan results associated with this configuration to
-     * be included in the bucket of networks that are externally scored.
-     * If not set, associated scan results will be treated as legacy saved networks and
-     * will take precedence over networks in the scored category.
-     */
-    @SystemApi
-    public boolean useExternalScores;
-
-    /**
-     * @hide
-     * Number of time the scorer overrode a the priority based choice, when comparing two
-     * WifiConfigurations, note that since comparing WifiConfiguration happens very often
-     * potentially at every scan, this number might become very large, even on an idle
-     * system.
-     */
-    @SystemApi
-    public int numScorerOverride;
-
-    /**
-     * @hide
-     * Number of time the scorer overrode a the priority based choice, and the comparison
-     * triggered a network switch
-     */
-    @SystemApi
-    public int numScorerOverrideAndSwitchedNetwork;
-
-    /**
-     * @hide
-     * Number of time we associated to this configuration.
-     */
-    @SystemApi
-    public int numAssociation;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"RANDOMIZATION_"}, value = {
-            RANDOMIZATION_NONE,
-            RANDOMIZATION_PERSISTENT})
-    public @interface MacRandomizationSetting {}
-
-    /**
-     * Use factory MAC when connecting to this network
-     * @hide
-     */
-    @SystemApi
-    public static final int RANDOMIZATION_NONE = 0;
-    /**
-     * Generate a randomized MAC once and reuse it for all connections to this network
-     * @hide
-     */
-    @SystemApi
-    public static final int RANDOMIZATION_PERSISTENT = 1;
-
-    /**
-     * Level of MAC randomization for this network.
-     * One of {@link #RANDOMIZATION_NONE} or {@link #RANDOMIZATION_PERSISTENT}.
-     * By default this field is set to {@link #RANDOMIZATION_PERSISTENT}.
-     * @hide
-     */
-    @SystemApi
-    @MacRandomizationSetting
-    public int macRandomizationSetting = RANDOMIZATION_PERSISTENT;
-
-    /**
-     * @hide
-     * Randomized MAC address to use with this particular network
-     */
-    @NonNull
-    private MacAddress mRandomizedMacAddress;
-
-    /**
-     * @hide
-     * The wall clock time of when |mRandomizedMacAddress| should be re-randomized in aggressive
-     * randomization mode.
-     */
-    public long randomizedMacExpirationTimeMs = 0;
-
-    /**
-     * @hide
-     * Checks if the given MAC address can be used for Connected Mac Randomization
-     * by verifying that it is non-null, unicast, locally assigned, and not default mac.
-     * @param mac MacAddress to check
-     * @return true if mac is good to use
-     */
-    public static boolean isValidMacAddressForRandomization(MacAddress mac) {
-        return mac != null && !MacAddressUtils.isMulticastAddress(mac) && mac.isLocallyAssigned()
-                && !MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS).equals(mac);
-    }
-
-    /**
-     * Returns MAC address set to be the local randomized MAC address.
-     * Depending on user preference, the device may or may not use the returned MAC address for
-     * connections to this network.
-     * <p>
-     * Information is restricted to Device Owner, Profile Owner, and Carrier apps
-     * (which will only obtain addresses for configurations which they create). Other callers
-     * will receive a default "02:00:00:00:00:00" MAC address.
-     */
-    public @NonNull MacAddress getRandomizedMacAddress() {
-        return mRandomizedMacAddress;
-    }
-
-    /**
-     * @hide
-     * @param mac MacAddress to change into
-     */
-    public void setRandomizedMacAddress(@NonNull MacAddress mac) {
-        if (mac == null) {
-            Log.e(TAG, "setRandomizedMacAddress received null MacAddress.");
-            return;
-        }
-        mRandomizedMacAddress = mac;
-    }
-
-    /** @hide
-     * Boost given to RSSI on a home network for the purpose of calculating the score
-     * This adds stickiness to home networks, as defined by:
-     * - less than 4 known BSSIDs
-     * - PSK only
-     * - TODO: add a test to verify that all BSSIDs are behind same gateway
-     ***/
-    public static final int HOME_NETWORK_RSSI_BOOST = 5;
-
-    /**
-     * This class is used to contain all the information and API used for quality network selection.
-     * @hide
-     */
-    @SystemApi
-    public static class NetworkSelectionStatus {
-        /** @hide */
-        @Retention(RetentionPolicy.SOURCE)
-        @IntDef(prefix = "NETWORK_SELECTION_",
-                value = {
-                NETWORK_SELECTION_ENABLED,
-                NETWORK_SELECTION_TEMPORARY_DISABLED,
-                NETWORK_SELECTION_PERMANENTLY_DISABLED})
-        public @interface NetworkEnabledStatus {}
-        /**
-         * This network will be considered as a potential candidate to connect to during network
-         * selection.
-         */
-        public static final int NETWORK_SELECTION_ENABLED = 0;
-        /**
-         * This network was temporary disabled. May be re-enabled after a time out.
-         */
-        public static final int NETWORK_SELECTION_TEMPORARY_DISABLED = 1;
-        /**
-         * This network was permanently disabled.
-         */
-        public static final int NETWORK_SELECTION_PERMANENTLY_DISABLED = 2;
-        /**
-         * Maximum Network selection status
-         * @hide
-         */
-        public static final int NETWORK_SELECTION_STATUS_MAX = 3;
-
-        /**
-         * Quality network selection status String (for debug purpose). Use Quality network
-         * selection status value as index to extec the corresponding debug string
-         * @hide
-         */
-        public static final String[] QUALITY_NETWORK_SELECTION_STATUS = {
-                "NETWORK_SELECTION_ENABLED",
-                "NETWORK_SELECTION_TEMPORARY_DISABLED",
-                "NETWORK_SELECTION_PERMANENTLY_DISABLED"};
-
-        /** @hide */
-        @Retention(RetentionPolicy.SOURCE)
-        @IntDef(prefix = "DISABLED_", value = {
-                DISABLED_NONE,
-                DISABLED_ASSOCIATION_REJECTION,
-                DISABLED_AUTHENTICATION_FAILURE,
-                DISABLED_DHCP_FAILURE,
-                DISABLED_NO_INTERNET_TEMPORARY,
-                DISABLED_AUTHENTICATION_NO_CREDENTIALS,
-                DISABLED_NO_INTERNET_PERMANENT,
-                DISABLED_BY_WIFI_MANAGER,
-                DISABLED_BY_WRONG_PASSWORD,
-                DISABLED_AUTHENTICATION_NO_SUBSCRIPTION})
-        public @interface NetworkSelectionDisableReason {}
-
-        // Quality Network disabled reasons
-        /** Default value. Means not disabled. */
-        public static final int DISABLED_NONE = 0;
-        /**
-         * The starting index for network selection disabled reasons.
-         * @hide
-         */
-        public static final int NETWORK_SELECTION_DISABLED_STARTING_INDEX = 1;
-        /**
-         * The starting index for network selection temporarily disabled reasons.
-         * @hide
-         */
-        public static final int TEMPORARILY_DISABLED_STARTING_INDEX = 1;
-        /** This network is disabled because of multiple association rejections. */
-        public static final int DISABLED_ASSOCIATION_REJECTION = 1;
-        /** This network is disabled because of multiple authentication failure. */
-        public static final int DISABLED_AUTHENTICATION_FAILURE = 2;
-        /** This network is disabled because of multiple DHCP failure. */
-        public static final int DISABLED_DHCP_FAILURE = 3;
-        /** This network is temporarily disabled because it has no Internet access. */
-        public static final int DISABLED_NO_INTERNET_TEMPORARY = 4;
-        /**
-         * The starting index for network selection permanently disabled reasons.
-         * @hide
-         */
-        public static final int PERMANENTLY_DISABLED_STARTING_INDEX = 5;
-        /** This network is disabled due to absence of user credentials */
-        public static final int DISABLED_AUTHENTICATION_NO_CREDENTIALS = 5;
-        /**
-         * This network is permanently disabled because it has no Internet access and the user does
-         * not want to stay connected.
-         */
-        public static final int DISABLED_NO_INTERNET_PERMANENT = 6;
-        /** This network is disabled due to WifiManager disabling it explicitly. */
-        public static final int DISABLED_BY_WIFI_MANAGER = 7;
-        /** This network is disabled due to wrong password. */
-        public static final int DISABLED_BY_WRONG_PASSWORD = 8;
-        /** This network is disabled because service is not subscribed. */
-        public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9;
-        /**
-         * All other disable reasons should be strictly less than this value.
-         * @hide
-         */
-        public static final int NETWORK_SELECTION_DISABLED_MAX = 10;
-
-        /**
-         * Get an integer that is equal to the maximum integer value of all the
-         * DISABLED_* reasons
-         * e.g. {@link #DISABLED_NONE}, {@link #DISABLED_ASSOCIATION_REJECTION}, etc.
-         *
-         * All DISABLED_* constants will be contiguous in the range
-         * 0, 1, 2, 3, ..., getMaxNetworkSelectionDisableReasons()
-         *
-         * <br />
-         * For example, this can be used to iterate through all the network selection
-         * disable reasons like so:
-         * <pre>{@code
-         * for (int reason = 0; reason <= getMaxNetworkSelectionDisableReasons(); reason++) {
-         *     ...
-         * }
-         * }</pre>
-         */
-        public static int getMaxNetworkSelectionDisableReason() {
-            return NETWORK_SELECTION_DISABLED_MAX - 1;
-        }
-
-        /**
-         * Contains info about disable reasons.
-         * @hide
-         */
-        public static final class DisableReasonInfo {
-            /**
-             * String representation for the disable reason.
-             * Note that these strings are persisted in
-             * {@link
-             * com.android.server.wifi.util.XmlUtil.NetworkSelectionStatusXmlUtil#writeToXml},
-             * so do not change the string values to maintain backwards compatibility.
-             */
-            public final String mReasonStr;
-            /**
-             * Network Selection disable reason threshold, used to debounce network failures before
-             * we disable them.
-             */
-            public final int mDisableThreshold;
-            /**
-             * Network Selection disable timeout for the error. After the timeout milliseconds,
-             * enable the network again.
-             */
-            public final int mDisableTimeoutMillis;
-
-            /**
-             * Constructor
-             * @param reasonStr string representation of the error
-             * @param disableThreshold number of failures before we disable the network
-             * @param disableTimeoutMillis the timeout, in milliseconds, before we re-enable the
-             *                             network after disabling it
-             */
-            public DisableReasonInfo(String reasonStr, int disableThreshold,
-                    int disableTimeoutMillis) {
-                mReasonStr = reasonStr;
-                mDisableThreshold = disableThreshold;
-                mDisableTimeoutMillis = disableTimeoutMillis;
-            }
-        }
-
-        /**
-         * Quality network selection disable reason infos.
-         * @hide
-         */
-        public static final SparseArray<DisableReasonInfo> DISABLE_REASON_INFOS =
-                buildDisableReasonInfos();
-
-        private static SparseArray<DisableReasonInfo> buildDisableReasonInfos() {
-            SparseArray<DisableReasonInfo> reasons = new SparseArray<>();
-
-            reasons.append(DISABLED_NONE,
-                    new DisableReasonInfo(
-                            // Note that these strings are persisted in
-                            // XmlUtil.NetworkSelectionStatusXmlUtil#writeToXml,
-                            // so do not change the string values to maintain backwards
-                            // compatibility.
-                            "NETWORK_SELECTION_ENABLE",
-                            -1,
-                            Integer.MAX_VALUE));
-
-            reasons.append(DISABLED_ASSOCIATION_REJECTION,
-                    new DisableReasonInfo(
-                            // Note that there is a space at the end of this string. Cannot fix
-                            // since this string is persisted.
-                            "NETWORK_SELECTION_DISABLED_ASSOCIATION_REJECTION ",
-                            5,
-                            5 * 60 * 1000));
-
-            reasons.append(DISABLED_AUTHENTICATION_FAILURE,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_AUTHENTICATION_FAILURE",
-                            5,
-                            5 * 60 * 1000));
-
-            reasons.append(DISABLED_DHCP_FAILURE,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_DHCP_FAILURE",
-                            5,
-                            5 * 60 * 1000));
-
-            reasons.append(DISABLED_NO_INTERNET_TEMPORARY,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_NO_INTERNET_TEMPORARY",
-                            1,
-                            10 * 60 * 1000));
-
-            reasons.append(DISABLED_AUTHENTICATION_NO_CREDENTIALS,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_AUTHENTICATION_NO_CREDENTIALS",
-                            1,
-                            Integer.MAX_VALUE));
-
-            reasons.append(DISABLED_NO_INTERNET_PERMANENT,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_NO_INTERNET_PERMANENT",
-                            1,
-                            Integer.MAX_VALUE));
-
-            reasons.append(DISABLED_BY_WIFI_MANAGER,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_BY_WIFI_MANAGER",
-                            1,
-                            Integer.MAX_VALUE));
-
-            reasons.append(DISABLED_BY_WRONG_PASSWORD,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_BY_WRONG_PASSWORD",
-                            1,
-                            Integer.MAX_VALUE));
-
-            reasons.append(DISABLED_AUTHENTICATION_NO_SUBSCRIPTION,
-                    new DisableReasonInfo(
-                            "NETWORK_SELECTION_DISABLED_AUTHENTICATION_NO_SUBSCRIPTION",
-                            1,
-                            Integer.MAX_VALUE));
-
-            return reasons;
-        }
-
-        /**
-         * Get the {@link NetworkSelectionDisableReason} int code by its string value.
-         * @return the NetworkSelectionDisableReason int code corresponding to the reason string,
-         * or -1 if the reason string is unrecognized.
-         * @hide
-         */
-        @NetworkSelectionDisableReason
-        public static int getDisableReasonByString(@NonNull String reasonString) {
-            for (int i = 0; i < DISABLE_REASON_INFOS.size(); i++) {
-                int key = DISABLE_REASON_INFOS.keyAt(i);
-                DisableReasonInfo value = DISABLE_REASON_INFOS.valueAt(i);
-                if (value != null && TextUtils.equals(reasonString, value.mReasonStr)) {
-                    return key;
-                }
-            }
-            Log.e(TAG, "Unrecognized network disable reason: " + reasonString);
-            return -1;
-        }
-
-        /**
-         * Invalid time stamp for network selection disable
-         * @hide
-         */
-        public static final long INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP = -1L;
-
-        /**
-         * This constant indicates the current configuration has connect choice set
-         */
-        private static final int CONNECT_CHOICE_EXISTS = 1;
-
-        /**
-         * This constant indicates the current configuration does not have connect choice set
-         */
-        private static final int CONNECT_CHOICE_NOT_EXISTS = -1;
-
-        // fields for QualityNetwork Selection
-        /**
-         * Network selection status, should be in one of three status: enable, temporaily disabled
-         * or permanently disabled
-         */
-        @NetworkEnabledStatus
-        private int mStatus;
-
-        /**
-         * Reason for disable this network
-         */
-        @NetworkSelectionDisableReason
-        private int mNetworkSelectionDisableReason;
-
-        /**
-         * Last time we temporarily disabled the configuration
-         */
-        private long mTemporarilyDisabledTimestamp = INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP;
-
-        /**
-         * counter for each Network selection disable reason
-         */
-        private int[] mNetworkSeclectionDisableCounter = new int[NETWORK_SELECTION_DISABLED_MAX];
-
-        /**
-         * Connect Choice over this configuration
-         *
-         * When current wifi configuration is visible to the user but user explicitly choose to
-         * connect to another network X, the another networks X's configure key will be stored here.
-         * We will consider user has a preference of X over this network. And in the future,
-         * network selection will always give X a higher preference over this configuration.
-         * configKey is : "SSID"-WEP-WPA_PSK-WPA_EAP
-         */
-        private String mConnectChoice;
-
-        /**
-         * Used to cache the temporary candidate during the network selection procedure. It will be
-         * kept updating once a new scan result has a higher score than current one
-         */
-        private ScanResult mCandidate;
-
-        /**
-         * Used to cache the score of the current temporary candidate during the network
-         * selection procedure.
-         */
-        private int mCandidateScore;
-
-        /**
-         * Indicate whether this network is visible in latest Qualified Network Selection. This
-         * means there is scan result found related to this Configuration and meet the minimum
-         * requirement. The saved network need not join latest Qualified Network Selection. For
-         * example, it is disabled. True means network is visible in latest Qualified Network
-         * Selection and false means network is invisible
-         */
-        private boolean mSeenInLastQualifiedNetworkSelection;
-
-        /**
-         * Boolean indicating if we have ever successfully connected to this network.
-         *
-         * This value will be set to true upon a successful connection.
-         * This value will be set to false if a previous value was not stored in the config or if
-         * the credentials are updated (ex. a password change).
-         */
-        private boolean mHasEverConnected;
-
-        /**
-         * set whether this network is visible in latest Qualified Network Selection
-         * @param seen value set to candidate
-         * @hide
-         */
-        public void setSeenInLastQualifiedNetworkSelection(boolean seen) {
-            mSeenInLastQualifiedNetworkSelection =  seen;
-        }
-
-        /**
-         * get whether this network is visible in latest Qualified Network Selection
-         * @return returns true -- network is visible in latest Qualified Network Selection
-         *         false -- network is invisible in latest Qualified Network Selection
-         * @hide
-         */
-        public boolean getSeenInLastQualifiedNetworkSelection() {
-            return mSeenInLastQualifiedNetworkSelection;
-        }
-        /**
-         * set the temporary candidate of current network selection procedure
-         * @param scanCandidate {@link ScanResult} the candidate set to mCandidate
-         * @hide
-         */
-        public void setCandidate(ScanResult scanCandidate) {
-            mCandidate = scanCandidate;
-        }
-
-        /**
-         * get the temporary candidate of current network selection procedure
-         * @return  returns {@link ScanResult} temporary candidate of current network selection
-         * procedure
-         * @hide
-         */
-        public ScanResult getCandidate() {
-            return mCandidate;
-        }
-
-        /**
-         * set the score of the temporary candidate of current network selection procedure
-         * @param score value set to mCandidateScore
-         * @hide
-         */
-        public void setCandidateScore(int score) {
-            mCandidateScore = score;
-        }
-
-        /**
-         * get the score of the temporary candidate of current network selection procedure
-         * @return returns score of the temporary candidate of current network selection procedure
-         * @hide
-         */
-        public int getCandidateScore() {
-            return mCandidateScore;
-        }
-
-        /**
-         * get user preferred choice over this configuration
-         * @return returns configKey of user preferred choice over this configuration
-         * @hide
-         */
-        public String getConnectChoice() {
-            return mConnectChoice;
-        }
-
-        /**
-         * set user preferred choice over this configuration
-         * @param newConnectChoice, the configKey of user preferred choice over this configuration
-         * @hide
-         */
-        public void setConnectChoice(String newConnectChoice) {
-            mConnectChoice = newConnectChoice;
-        }
-
-        /** Get the current Quality network selection status as a String (for debugging). */
-        @NonNull
-        public String getNetworkStatusString() {
-            return QUALITY_NETWORK_SELECTION_STATUS[mStatus];
-        }
-
-        /** @hide */
-        public void setHasEverConnected(boolean value) {
-            mHasEverConnected = value;
-        }
-
-        /** True if the device has ever connected to this network, false otherwise. */
-        public boolean hasEverConnected() {
-            return mHasEverConnected;
-        }
-
-        /** @hide */
-        public NetworkSelectionStatus() {
-            // previously stored configs will not have this parameter, so we default to false.
-            mHasEverConnected = false;
-        }
-
-        /**
-         * NetworkSelectionStatus exports an immutable public API.
-         * However, test code has a need to construct a NetworkSelectionStatus in a specific state.
-         * (Note that mocking using Mockito does not work if the object needs to be parceled and
-         * unparceled.)
-         * Export a @SystemApi Builder to allow tests to construct a NetworkSelectionStatus object
-         * in the desired state, without sacrificing NetworkSelectionStatus's immutability.
-         */
-        @VisibleForTesting
-        public static final class Builder {
-            private final NetworkSelectionStatus mNetworkSelectionStatus =
-                    new NetworkSelectionStatus();
-
-            /**
-             * Set the current network selection status.
-             * One of:
-             * {@link #NETWORK_SELECTION_ENABLED},
-             * {@link #NETWORK_SELECTION_TEMPORARY_DISABLED},
-             * {@link #NETWORK_SELECTION_PERMANENTLY_DISABLED}
-             * @see NetworkSelectionStatus#getNetworkSelectionStatus()
-             */
-            @NonNull
-            public Builder setNetworkSelectionStatus(@NetworkEnabledStatus int status) {
-                mNetworkSelectionStatus.setNetworkSelectionStatus(status);
-                return this;
-            }
-
-            /**
-             *
-             * Set the current network's disable reason.
-             * One of the {@link #DISABLED_NONE} or DISABLED_* constants.
-             * e.g. {@link #DISABLED_ASSOCIATION_REJECTION}.
-             * @see NetworkSelectionStatus#getNetworkSelectionDisableReason()
-             */
-            @NonNull
-            public Builder setNetworkSelectionDisableReason(
-                    @NetworkSelectionDisableReason int reason) {
-                mNetworkSelectionStatus.setNetworkSelectionDisableReason(reason);
-                return this;
-            }
-
-            /**
-             * Build a NetworkSelectionStatus object.
-             */
-            @NonNull
-            public NetworkSelectionStatus build() {
-                NetworkSelectionStatus status = new NetworkSelectionStatus();
-                status.copy(mNetworkSelectionStatus);
-                return status;
-            }
-        }
-
-        /**
-         * Get the network disable reason string for a reason code (for debugging).
-         * @param reason specific error reason. One of the {@link #DISABLED_NONE} or
-         *               DISABLED_* constants e.g. {@link #DISABLED_ASSOCIATION_REJECTION}.
-         * @return network disable reason string, or null if the reason is invalid.
-         */
-        @Nullable
-        public static String getNetworkSelectionDisableReasonString(
-                @NetworkSelectionDisableReason int reason) {
-            DisableReasonInfo info = DISABLE_REASON_INFOS.get(reason);
-            if (info == null) {
-                return null;
-            } else {
-                return info.mReasonStr;
-            }
-        }
-        /**
-         * get current network disable reason
-         * @return current network disable reason in String (for debug purpose)
-         * @hide
-         */
-        public String getNetworkSelectionDisableReasonString() {
-            return getNetworkSelectionDisableReasonString(mNetworkSelectionDisableReason);
-        }
-
-        /**
-         * Get the current network network selection status.
-         * One of:
-         * {@link #NETWORK_SELECTION_ENABLED},
-         * {@link #NETWORK_SELECTION_TEMPORARY_DISABLED},
-         * {@link #NETWORK_SELECTION_PERMANENTLY_DISABLED}
-         */
-        @NetworkEnabledStatus
-        public int getNetworkSelectionStatus() {
-            return mStatus;
-        }
-
-        /**
-         * True if the current network is enabled to join network selection, false otherwise.
-         * @hide
-         */
-        public boolean isNetworkEnabled() {
-            return mStatus == NETWORK_SELECTION_ENABLED;
-        }
-
-        /**
-         * @return whether current network is temporary disabled
-         * @hide
-         */
-        public boolean isNetworkTemporaryDisabled() {
-            return mStatus == NETWORK_SELECTION_TEMPORARY_DISABLED;
-        }
-
-        /**
-         * True if the current network is permanently disabled, false otherwise.
-         * @hide
-         */
-        public boolean isNetworkPermanentlyDisabled() {
-            return mStatus == NETWORK_SELECTION_PERMANENTLY_DISABLED;
-        }
-
-        /**
-         * set current network selection status
-         * @param status network selection status to set
-         * @hide
-         */
-        public void setNetworkSelectionStatus(int status) {
-            if (status >= 0 && status < NETWORK_SELECTION_STATUS_MAX) {
-                mStatus = status;
-            }
-        }
-
-        /**
-         * Returns the current network's disable reason.
-         * One of the {@link #DISABLED_NONE} or DISABLED_* constants
-         * e.g. {@link #DISABLED_ASSOCIATION_REJECTION}.
-         */
-        @NetworkSelectionDisableReason
-        public int getNetworkSelectionDisableReason() {
-            return mNetworkSelectionDisableReason;
-        }
-
-        /**
-         * set Network disable reason
-         * @param reason Network disable reason
-         * @hide
-         */
-        public void setNetworkSelectionDisableReason(@NetworkSelectionDisableReason int reason) {
-            if (reason >= 0 && reason < NETWORK_SELECTION_DISABLED_MAX) {
-                mNetworkSelectionDisableReason = reason;
-            } else {
-                throw new IllegalArgumentException("Illegal reason value: " + reason);
-            }
-        }
-
-        /**
-         * @param timeStamp Set when current network is disabled in millisecond since January 1,
-         * 1970 00:00:00.0 UTC
-         * @hide
-         */
-        public void setDisableTime(long timeStamp) {
-            mTemporarilyDisabledTimestamp = timeStamp;
-        }
-
-        /**
-         * Returns when the current network was disabled, in milliseconds since January 1,
-         * 1970 00:00:00.0 UTC.
-         */
-        public long getDisableTime() {
-            return mTemporarilyDisabledTimestamp;
-        }
-
-        /**
-         * Get the disable counter of a specific reason.
-         * @param reason specific failure reason. One of the {@link #DISABLED_NONE} or
-         *              DISABLED_* constants e.g. {@link #DISABLED_ASSOCIATION_REJECTION}.
-         * @exception IllegalArgumentException for invalid reason
-         * @return counter number for specific error reason.
-         */
-        public int getDisableReasonCounter(@NetworkSelectionDisableReason int reason) {
-            if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
-                return mNetworkSeclectionDisableCounter[reason];
-            } else {
-                throw new IllegalArgumentException("Illegal reason value: " + reason);
-            }
-        }
-
-        /**
-         * set the counter of a specific failure reason
-         * @param reason reason for disable error
-         * @param value the counter value for this specific reason
-         * @exception throw IllegalArgumentException for illegal input
-         * @hide
-         */
-        public void setDisableReasonCounter(int reason, int value) {
-            if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
-                mNetworkSeclectionDisableCounter[reason] = value;
-            } else {
-                throw new IllegalArgumentException("Illegal reason value: " + reason);
-            }
-        }
-
-        /**
-         * increment the counter of a specific failure reason
-         * @param reason a specific failure reason
-         * @exception throw IllegalArgumentException for illegal input
-         * @hide
-         */
-        public void incrementDisableReasonCounter(int reason) {
-            if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
-                mNetworkSeclectionDisableCounter[reason]++;
-            } else {
-                throw new IllegalArgumentException("Illegal reason value: " + reason);
-            }
-        }
-
-        /**
-         * clear the counter of a specific failure reason
-         * @param reason a specific failure reason
-         * @exception throw IllegalArgumentException for illegal input
-         * @hide
-         */
-        public void clearDisableReasonCounter(int reason) {
-            if (reason >= DISABLED_NONE && reason < NETWORK_SELECTION_DISABLED_MAX) {
-                mNetworkSeclectionDisableCounter[reason] = DISABLED_NONE;
-            } else {
-                throw new IllegalArgumentException("Illegal reason value: " + reason);
-            }
-        }
-
-        /**
-         * clear all the failure reason counters
-         * @hide
-         */
-        public void clearDisableReasonCounter() {
-            Arrays.fill(mNetworkSeclectionDisableCounter, DISABLED_NONE);
-        }
-
-        /**
-         * BSSID for connection to this network (through network selection procedure)
-         */
-        private String mNetworkSelectionBSSID;
-
-        /**
-         * get current network Selection BSSID
-         * @return current network Selection BSSID
-         * @hide
-         */
-        public String getNetworkSelectionBSSID() {
-            return mNetworkSelectionBSSID;
-        }
-
-        /**
-         * set network Selection BSSID
-         * @param bssid The target BSSID for assocaition
-         * @hide
-         */
-        public void setNetworkSelectionBSSID(String bssid) {
-            mNetworkSelectionBSSID = bssid;
-        }
-
-        /** @hide */
-        public void copy(NetworkSelectionStatus source) {
-            mStatus = source.mStatus;
-            mNetworkSelectionDisableReason = source.mNetworkSelectionDisableReason;
-            for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
-                    index++) {
-                mNetworkSeclectionDisableCounter[index] =
-                        source.mNetworkSeclectionDisableCounter[index];
-            }
-            mTemporarilyDisabledTimestamp = source.mTemporarilyDisabledTimestamp;
-            mNetworkSelectionBSSID = source.mNetworkSelectionBSSID;
-            setSeenInLastQualifiedNetworkSelection(source.getSeenInLastQualifiedNetworkSelection());
-            setCandidate(source.getCandidate());
-            setCandidateScore(source.getCandidateScore());
-            setConnectChoice(source.getConnectChoice());
-            setHasEverConnected(source.hasEverConnected());
-        }
-
-        /** @hide */
-        public void writeToParcel(Parcel dest) {
-            dest.writeInt(getNetworkSelectionStatus());
-            dest.writeInt(getNetworkSelectionDisableReason());
-            for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
-                    index++) {
-                dest.writeInt(getDisableReasonCounter(index));
-            }
-            dest.writeLong(getDisableTime());
-            dest.writeString(getNetworkSelectionBSSID());
-            if (getConnectChoice() != null) {
-                dest.writeInt(CONNECT_CHOICE_EXISTS);
-                dest.writeString(getConnectChoice());
-            } else {
-                dest.writeInt(CONNECT_CHOICE_NOT_EXISTS);
-            }
-            dest.writeInt(hasEverConnected() ? 1 : 0);
-        }
-
-        /** @hide */
-        public void readFromParcel(Parcel in) {
-            setNetworkSelectionStatus(in.readInt());
-            setNetworkSelectionDisableReason(in.readInt());
-            for (int index = DISABLED_NONE; index < NETWORK_SELECTION_DISABLED_MAX;
-                    index++) {
-                setDisableReasonCounter(index, in.readInt());
-            }
-            setDisableTime(in.readLong());
-            setNetworkSelectionBSSID(in.readString());
-            if (in.readInt() == CONNECT_CHOICE_EXISTS) {
-                setConnectChoice(in.readString());
-            } else {
-                setConnectChoice(null);
-            }
-            setHasEverConnected(in.readInt() != 0);
-        }
-    }
-
-    /**
-     * @hide
-     * network selection related member
-     */
-    private NetworkSelectionStatus mNetworkSelectionStatus = new NetworkSelectionStatus();
-
-    /**
-     * This class is intended to store extra failure reason information for the most recent
-     * connection attempt, so that it may be surfaced to the settings UI
-     * @hide
-     */
-    // TODO(b/148626966): called by SUW via reflection, remove once SUW is updated
-    public static class RecentFailure {
-
-        private RecentFailure() {}
-
-        /**
-         * Association Rejection Status code (NONE for success/non-association-rejection-fail)
-         */
-        @RecentFailureReason
-        private int mAssociationStatus = RECENT_FAILURE_NONE;
-
-        /**
-         * @param status the association status code for the recent failure
-         */
-        public void setAssociationStatus(@RecentFailureReason int status) {
-            mAssociationStatus = status;
-        }
-        /**
-         * Sets the RecentFailure to NONE
-         */
-        public void clear() {
-            mAssociationStatus = RECENT_FAILURE_NONE;
-        }
-        /**
-         * Get the recent failure code. One of {@link #RECENT_FAILURE_NONE} or
-         * {@link #RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA}.
-         */
-        @RecentFailureReason
-        public int getAssociationStatus() {
-            return mAssociationStatus;
-        }
-    }
-
-    /**
-     * RecentFailure member
-     * @hide
-     */
-    // TODO(b/148626966): called by SUW via reflection, once SUW is updated, make private and
-    //  rename to mRecentFailure
-    @NonNull
-    public final RecentFailure recentFailure = new RecentFailure();
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = "RECENT_FAILURE_", value = {
-            RECENT_FAILURE_NONE,
-            RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA})
-    public @interface RecentFailureReason {}
-
-    /**
-     * No recent failure, or no specific reason given for the recent connection failure
-     * @hide
-     */
-    @SystemApi
-    public static final int RECENT_FAILURE_NONE = 0;
-    /**
-     * Connection to this network recently failed due to Association Rejection Status 17
-     * (AP is full)
-     * @hide
-     */
-    @SystemApi
-    public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17;
-
-    /**
-     * Get the failure reason for the most recent connection attempt, or
-     * {@link #RECENT_FAILURE_NONE} if there was no failure.
-     *
-     * Failure reasons include:
-     * {@link #RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA}
-     *
-     * @hide
-     */
-    @RecentFailureReason
-    @SystemApi
-    public int getRecentFailureReason() {
-        return recentFailure.getAssociationStatus();
-    }
-
-    /**
-     * Get the network selection status.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public NetworkSelectionStatus getNetworkSelectionStatus() {
-        return mNetworkSelectionStatus;
-    }
-
-    /**
-     * Set the network selection status.
-     * @hide
-     */
-    @SystemApi
-    public void setNetworkSelectionStatus(@NonNull NetworkSelectionStatus status) {
-        mNetworkSelectionStatus = status;
-    }
-
-    /**
-     * @hide
-     * Linked Configurations: represent the set of Wificonfigurations that are equivalent
-     * regarding roaming and auto-joining.
-     * The linked configuration may or may not have same SSID, and may or may not have same
-     * credentials.
-     * For instance, linked configurations will have same defaultGwMacAddress or same dhcp server.
-     */
-    public HashMap<String, Integer>  linkedConfigurations;
-
-    public WifiConfiguration() {
-        networkId = INVALID_NETWORK_ID;
-        SSID = null;
-        BSSID = null;
-        FQDN = null;
-        roamingConsortiumIds = new long[0];
-        priority = 0;
-        hiddenSSID = false;
-        allowedKeyManagement = new BitSet();
-        allowedProtocols = new BitSet();
-        allowedAuthAlgorithms = new BitSet();
-        allowedPairwiseCiphers = new BitSet();
-        allowedGroupCiphers = new BitSet();
-        allowedGroupManagementCiphers = new BitSet();
-        allowedSuiteBCiphers = new BitSet();
-        wepKeys = new String[4];
-        for (int i = 0; i < wepKeys.length; i++) {
-            wepKeys[i] = null;
-        }
-        enterpriseConfig = new WifiEnterpriseConfig();
-        ephemeral = false;
-        osu = false;
-        trusted = true; // Networks are considered trusted by default.
-        fromWifiNetworkSuggestion = false;
-        fromWifiNetworkSpecifier = false;
-        meteredHint = false;
-        meteredOverride = METERED_OVERRIDE_NONE;
-        useExternalScores = false;
-        validatedInternetAccess = false;
-        mIpConfiguration = new IpConfiguration();
-        lastUpdateUid = -1;
-        creatorUid = -1;
-        shared = true;
-        dtimInterval = 0;
-        mRandomizedMacAddress = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
-    }
-
-    /**
-     * Identify if this configuration represents a Passpoint network
-     */
-    public boolean isPasspoint() {
-        return !TextUtils.isEmpty(FQDN)
-                && !TextUtils.isEmpty(providerFriendlyName)
-                && enterpriseConfig != null
-                && enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE
-                && !TextUtils.isEmpty(mPasspointUniqueId);
-    }
-
-    /**
-     * Helper function, identify if a configuration is linked
-     * @hide
-     */
-    public boolean isLinked(WifiConfiguration config) {
-        if (config != null) {
-            if (config.linkedConfigurations != null && linkedConfigurations != null) {
-                if (config.linkedConfigurations.get(getKey()) != null
-                        && linkedConfigurations.get(config.getKey()) != null) {
-                    return true;
-                }
-            }
-        }
-        return  false;
-    }
-
-    /**
-     * Helper function, idenfity if a configuration should be treated as an enterprise network
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public boolean isEnterprise() {
-        return (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
-                || allowedKeyManagement.get(KeyMgmt.IEEE8021X)
-                || allowedKeyManagement.get(KeyMgmt.SUITE_B_192)
-                || allowedKeyManagement.get(KeyMgmt.WAPI_CERT))
-                && enterpriseConfig != null
-                && enterpriseConfig.getEapMethod() != WifiEnterpriseConfig.Eap.NONE;
-    }
-
-    private static String logTimeOfDay(long millis) {
-        Calendar c = Calendar.getInstance();
-        if (millis >= 0) {
-            c.setTimeInMillis(millis);
-            return String.format("%tm-%td %tH:%tM:%tS.%tL", c, c, c, c, c, c);
-        } else {
-            return Long.toString(millis);
-        }
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sbuf = new StringBuilder();
-        if (this.status == WifiConfiguration.Status.CURRENT) {
-            sbuf.append("* ");
-        } else if (this.status == WifiConfiguration.Status.DISABLED) {
-            sbuf.append("- DSBLE ");
-        }
-        sbuf.append("ID: ").append(this.networkId).append(" SSID: ").append(this.SSID).
-                append(" PROVIDER-NAME: ").append(this.providerFriendlyName).
-                append(" BSSID: ").append(this.BSSID).append(" FQDN: ").append(this.FQDN)
-                .append(" HOME-PROVIDER-NETWORK: ").append(this.isHomeProviderNetwork)
-                .append(" PRIO: ").append(this.priority)
-                .append(" HIDDEN: ").append(this.hiddenSSID)
-                .append(" PMF: ").append(this.requirePmf)
-                .append("CarrierId: ").append(this.carrierId)
-                .append('\n');
-
-
-        sbuf.append(" NetworkSelectionStatus ")
-                .append(mNetworkSelectionStatus.getNetworkStatusString())
-                .append("\n");
-        if (mNetworkSelectionStatus.getNetworkSelectionDisableReason() > 0) {
-            sbuf.append(" mNetworkSelectionDisableReason ")
-                    .append(mNetworkSelectionStatus.getNetworkSelectionDisableReasonString())
-                    .append("\n");
-
-            for (int index = NetworkSelectionStatus.DISABLED_NONE;
-                    index < NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX; index++) {
-                if (mNetworkSelectionStatus.getDisableReasonCounter(index) != 0) {
-                    sbuf.append(
-                            NetworkSelectionStatus.getNetworkSelectionDisableReasonString(index))
-                            .append(" counter:")
-                            .append(mNetworkSelectionStatus.getDisableReasonCounter(index))
-                            .append("\n");
-                }
-            }
-        }
-        if (mNetworkSelectionStatus.getConnectChoice() != null) {
-            sbuf.append(" connect choice: ").append(mNetworkSelectionStatus.getConnectChoice());
-        }
-        sbuf.append(" hasEverConnected: ")
-                .append(mNetworkSelectionStatus.hasEverConnected()).append("\n");
-
-        if (this.numAssociation > 0) {
-            sbuf.append(" numAssociation ").append(this.numAssociation).append("\n");
-        }
-        if (this.numNoInternetAccessReports > 0) {
-            sbuf.append(" numNoInternetAccessReports ");
-            sbuf.append(this.numNoInternetAccessReports).append("\n");
-        }
-        if (this.validatedInternetAccess) sbuf.append(" validatedInternetAccess");
-        if (this.ephemeral) sbuf.append(" ephemeral");
-        if (this.osu) sbuf.append(" osu");
-        if (this.trusted) sbuf.append(" trusted");
-        if (this.fromWifiNetworkSuggestion) sbuf.append(" fromWifiNetworkSuggestion");
-        if (this.fromWifiNetworkSpecifier) sbuf.append(" fromWifiNetworkSpecifier");
-        if (this.meteredHint) sbuf.append(" meteredHint");
-        if (this.useExternalScores) sbuf.append(" useExternalScores");
-        if (this.validatedInternetAccess || this.ephemeral || this.trusted
-                || this.fromWifiNetworkSuggestion || this.fromWifiNetworkSpecifier
-                || this.meteredHint || this.useExternalScores) {
-            sbuf.append("\n");
-        }
-        if (this.meteredOverride != METERED_OVERRIDE_NONE) {
-            sbuf.append(" meteredOverride ").append(meteredOverride).append("\n");
-        }
-        sbuf.append(" macRandomizationSetting: ").append(macRandomizationSetting).append("\n");
-        sbuf.append(" mRandomizedMacAddress: ").append(mRandomizedMacAddress).append("\n");
-        sbuf.append(" randomizedMacExpirationTimeMs: ")
-                .append(randomizedMacExpirationTimeMs == 0 ? "<none>"
-                        : logTimeOfDay(randomizedMacExpirationTimeMs)).append("\n");
-        sbuf.append(" KeyMgmt:");
-        for (int k = 0; k < this.allowedKeyManagement.size(); k++) {
-            if (this.allowedKeyManagement.get(k)) {
-                sbuf.append(" ");
-                if (k < KeyMgmt.strings.length) {
-                    sbuf.append(KeyMgmt.strings[k]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append(" Protocols:");
-        for (int p = 0; p < this.allowedProtocols.size(); p++) {
-            if (this.allowedProtocols.get(p)) {
-                sbuf.append(" ");
-                if (p < Protocol.strings.length) {
-                    sbuf.append(Protocol.strings[p]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n');
-        sbuf.append(" AuthAlgorithms:");
-        for (int a = 0; a < this.allowedAuthAlgorithms.size(); a++) {
-            if (this.allowedAuthAlgorithms.get(a)) {
-                sbuf.append(" ");
-                if (a < AuthAlgorithm.strings.length) {
-                    sbuf.append(AuthAlgorithm.strings[a]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n');
-        sbuf.append(" PairwiseCiphers:");
-        for (int pc = 0; pc < this.allowedPairwiseCiphers.size(); pc++) {
-            if (this.allowedPairwiseCiphers.get(pc)) {
-                sbuf.append(" ");
-                if (pc < PairwiseCipher.strings.length) {
-                    sbuf.append(PairwiseCipher.strings[pc]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n');
-        sbuf.append(" GroupCiphers:");
-        for (int gc = 0; gc < this.allowedGroupCiphers.size(); gc++) {
-            if (this.allowedGroupCiphers.get(gc)) {
-                sbuf.append(" ");
-                if (gc < GroupCipher.strings.length) {
-                    sbuf.append(GroupCipher.strings[gc]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n');
-        sbuf.append(" GroupMgmtCiphers:");
-        for (int gmc = 0; gmc < this.allowedGroupManagementCiphers.size(); gmc++) {
-            if (this.allowedGroupManagementCiphers.get(gmc)) {
-                sbuf.append(" ");
-                if (gmc < GroupMgmtCipher.strings.length) {
-                    sbuf.append(GroupMgmtCipher.strings[gmc]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n');
-        sbuf.append(" SuiteBCiphers:");
-        for (int sbc = 0; sbc < this.allowedSuiteBCiphers.size(); sbc++) {
-            if (this.allowedSuiteBCiphers.get(sbc)) {
-                sbuf.append(" ");
-                if (sbc < SuiteBCipher.strings.length) {
-                    sbuf.append(SuiteBCipher.strings[sbc]);
-                } else {
-                    sbuf.append("??");
-                }
-            }
-        }
-        sbuf.append('\n').append(" PSK/SAE: ");
-        if (this.preSharedKey != null) {
-            sbuf.append('*');
-        }
-
-        sbuf.append("\nEnterprise config:\n");
-        sbuf.append(enterpriseConfig);
-
-        sbuf.append("IP config:\n");
-        sbuf.append(mIpConfiguration.toString());
-
-        if (mNetworkSelectionStatus.getNetworkSelectionBSSID() != null) {
-            sbuf.append(" networkSelectionBSSID="
-                    + mNetworkSelectionStatus.getNetworkSelectionBSSID());
-        }
-        long now_ms = SystemClock.elapsedRealtime();
-        if (mNetworkSelectionStatus.getDisableTime() != NetworkSelectionStatus
-                .INVALID_NETWORK_SELECTION_DISABLE_TIMESTAMP) {
-            sbuf.append('\n');
-            long diff = now_ms - mNetworkSelectionStatus.getDisableTime();
-            if (diff <= 0) {
-                sbuf.append(" blackListed since <incorrect>");
-            } else {
-                sbuf.append(" blackListed: ").append(Long.toString(diff / 1000)).append("sec ");
-            }
-        }
-        if (creatorUid != 0) sbuf.append(" cuid=" + creatorUid);
-        if (creatorName != null) sbuf.append(" cname=" + creatorName);
-        if (lastUpdateUid != 0) sbuf.append(" luid=" + lastUpdateUid);
-        if (lastUpdateName != null) sbuf.append(" lname=" + lastUpdateName);
-        if (updateIdentifier != null) sbuf.append(" updateIdentifier=" + updateIdentifier);
-        sbuf.append(" lcuid=" + lastConnectUid);
-        sbuf.append(" allowAutojoin=" + allowAutojoin);
-        sbuf.append(" noInternetAccessExpected=" + noInternetAccessExpected);
-        sbuf.append(" mostRecentlyConnected=" + isMostRecentlyConnected);
-
-        sbuf.append(" ");
-
-        if (this.lastConnected != 0) {
-            sbuf.append('\n');
-            sbuf.append("lastConnected: ").append(logTimeOfDay(this.lastConnected));
-            sbuf.append(" ");
-        }
-        sbuf.append('\n');
-        if (this.linkedConfigurations != null) {
-            for (String key : this.linkedConfigurations.keySet()) {
-                sbuf.append(" linked: ").append(key);
-                sbuf.append('\n');
-            }
-        }
-        sbuf.append("recentFailure: ").append("Association Rejection code: ")
-                .append(recentFailure.getAssociationStatus()).append("\n");
-        return sbuf.toString();
-    }
-
-    /**
-     * Get the SSID in a human-readable format, with all additional formatting removed
-     * e.g. quotation marks around the SSID, "P" prefix
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public String getPrintableSsid() {
-        if (SSID == null) return "";
-        final int length = SSID.length();
-        if (length > 2 && (SSID.charAt(0) == '"') && SSID.charAt(length - 1) == '"') {
-            return SSID.substring(1, length - 1);
-        }
-
-        /* The ascii-encoded string format is P"<ascii-encoded-string>"
-         * The decoding is implemented in the supplicant for a newly configured
-         * network.
-         */
-        if (length > 3 && (SSID.charAt(0) == 'P') && (SSID.charAt(1) == '"') &&
-                (SSID.charAt(length-1) == '"')) {
-            WifiSsid wifiSsid = WifiSsid.createFromAsciiEncoded(
-                    SSID.substring(2, length - 1));
-            return wifiSsid.toString();
-        }
-        return SSID;
-    }
-
-    /**
-     * Get an identifier for associating credentials with this config
-     * @param current configuration contains values for additional fields
-     *                that are not part of this configuration. Used
-     *                when a config with some fields is passed by an application.
-     * @throws IllegalStateException if config is invalid for key id generation
-     * @hide
-     */
-    public String getKeyIdForCredentials(WifiConfiguration current) {
-        String keyMgmt = "";
-
-        try {
-            // Get current config details for fields that are not initialized
-            if (TextUtils.isEmpty(SSID)) SSID = current.SSID;
-            if (allowedKeyManagement.cardinality() == 0) {
-                allowedKeyManagement = current.allowedKeyManagement;
-            }
-            if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)) {
-                keyMgmt += KeyMgmt.strings[KeyMgmt.WPA_EAP];
-            }
-            if (allowedKeyManagement.get(KeyMgmt.OSEN)) {
-                keyMgmt += KeyMgmt.strings[KeyMgmt.OSEN];
-            }
-            if (allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
-                keyMgmt += KeyMgmt.strings[KeyMgmt.IEEE8021X];
-            }
-            if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
-                keyMgmt += KeyMgmt.strings[KeyMgmt.SUITE_B_192];
-            }
-            if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
-                keyMgmt += KeyMgmt.strings[KeyMgmt.WAPI_CERT];
-            }
-
-            if (TextUtils.isEmpty(keyMgmt)) {
-                throw new IllegalStateException("Not an EAP network");
-            }
-            String keyId = trimStringForKeyId(SSID) + "_" + keyMgmt + "_"
-                    + trimStringForKeyId(enterpriseConfig.getKeyId(current != null
-                    ? current.enterpriseConfig : null));
-
-            if (!fromWifiNetworkSuggestion) {
-                return keyId;
-            }
-            return keyId + "_" + trimStringForKeyId(BSSID) + "_" + trimStringForKeyId(creatorName);
-        } catch (NullPointerException e) {
-            throw new IllegalStateException("Invalid config details");
-        }
-    }
-
-    private String trimStringForKeyId(String string) {
-        if (string == null) {
-            return "";
-        }
-        // Remove quotes and spaces
-        return string.replace("\"", "").replace(" ", "");
-    }
-
-    private static BitSet readBitSet(Parcel src) {
-        int cardinality = src.readInt();
-
-        BitSet set = new BitSet();
-        for (int i = 0; i < cardinality; i++) {
-            set.set(src.readInt());
-        }
-
-        return set;
-    }
-
-    private static void writeBitSet(Parcel dest, BitSet set) {
-        int nextSetBit = -1;
-
-        dest.writeInt(set.cardinality());
-
-        while ((nextSetBit = set.nextSetBit(nextSetBit + 1)) != -1) {
-            dest.writeInt(nextSetBit);
-        }
-    }
-
-    /**
-     * Get the authentication type of the network.
-     * @return One of the {@link KeyMgmt} constants. e.g. {@link KeyMgmt#WPA2_PSK}.
-     * @hide
-     */
-    @SystemApi
-    @KeyMgmt.KeyMgmtScheme
-    public int getAuthType() {
-        if (allowedKeyManagement.cardinality() > 1) {
-            throw new IllegalStateException("More than one auth type set");
-        }
-        if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
-            return KeyMgmt.WPA_PSK;
-        } else if (allowedKeyManagement.get(KeyMgmt.WPA2_PSK)) {
-            return KeyMgmt.WPA2_PSK;
-        } else if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)) {
-            return KeyMgmt.WPA_EAP;
-        } else if (allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
-            return KeyMgmt.IEEE8021X;
-        } else if (allowedKeyManagement.get(KeyMgmt.SAE)) {
-            return KeyMgmt.SAE;
-        } else if (allowedKeyManagement.get(KeyMgmt.OWE)) {
-            return KeyMgmt.OWE;
-        } else if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
-            return KeyMgmt.SUITE_B_192;
-        } else if (allowedKeyManagement.get(KeyMgmt.WAPI_PSK)) {
-            return KeyMgmt.WAPI_PSK;
-        } else if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
-            return KeyMgmt.WAPI_CERT;
-        }
-        return KeyMgmt.NONE;
-    }
-
-    /**
-     * Return a String that can be used to uniquely identify this WifiConfiguration.
-     * <br />
-     * Note: Do not persist this value! This value is not guaranteed to remain backwards compatible.
-     */
-    @NonNull
-    public String getKey() {
-        // Passpoint ephemeral networks have their unique identifier set. Return it as is to be
-        // able to match internally.
-        if (mPasspointUniqueId != null) {
-            return mPasspointUniqueId;
-        }
-
-        String key = getSsidAndSecurityTypeString();
-        if (!shared) {
-            key += "-" + UserHandle.getUserHandleForUid(creatorUid).getIdentifier();
-        }
-
-        return key;
-    }
-
-    /** @hide
-     *  return the SSID + security type in String format.
-     */
-    public String getSsidAndSecurityTypeString() {
-        String key;
-        if (allowedKeyManagement.get(KeyMgmt.WPA_PSK)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.WPA_PSK];
-        } else if (allowedKeyManagement.get(KeyMgmt.WPA_EAP)
-                || allowedKeyManagement.get(KeyMgmt.IEEE8021X)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.WPA_EAP];
-        } else if (wepTxKeyIndex >= 0 && wepTxKeyIndex < wepKeys.length
-                && wepKeys[wepTxKeyIndex] != null) {
-            key = SSID + "WEP";
-        } else if (allowedKeyManagement.get(KeyMgmt.OWE)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.OWE];
-        } else if (allowedKeyManagement.get(KeyMgmt.SAE)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.SAE];
-        } else if (allowedKeyManagement.get(KeyMgmt.SUITE_B_192)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.SUITE_B_192];
-        } else if (allowedKeyManagement.get(KeyMgmt.WAPI_PSK)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.WAPI_PSK];
-        } else if (allowedKeyManagement.get(KeyMgmt.WAPI_CERT)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.WAPI_CERT];
-        } else if (allowedKeyManagement.get(KeyMgmt.OSEN)) {
-            key = SSID + KeyMgmt.strings[KeyMgmt.OSEN];
-        } else {
-            key = SSID + KeyMgmt.strings[KeyMgmt.NONE];
-        }
-        return key;
-    }
-
-    /**
-     * Get the IpConfiguration object associated with this WifiConfiguration.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public IpConfiguration getIpConfiguration() {
-        return new IpConfiguration(mIpConfiguration);
-    }
-
-    /**
-     * Set the {@link IpConfiguration} for this network.
-     * @param ipConfiguration the {@link IpConfiguration} to set, or null to use the default
-     *                        constructor {@link IpConfiguration#IpConfiguration()}.
-     * @hide
-     */
-    @SystemApi
-    public void setIpConfiguration(@Nullable IpConfiguration ipConfiguration) {
-        if (ipConfiguration == null) ipConfiguration = new IpConfiguration();
-        mIpConfiguration = ipConfiguration;
-    }
-
-    /**
-     * Get the {@link StaticIpConfiguration} for this network.
-     * @return the {@link StaticIpConfiguration}, or null if unset.
-     * @hide
-     */
-    @Nullable
-    @UnsupportedAppUsage
-    public StaticIpConfiguration getStaticIpConfiguration() {
-        return mIpConfiguration.getStaticIpConfiguration();
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setStaticIpConfiguration(StaticIpConfiguration staticIpConfiguration) {
-        mIpConfiguration.setStaticIpConfiguration(staticIpConfiguration);
-    }
-
-    /**
-     * Get the {@link IpConfiguration.IpAssignment} for this network.
-     * @hide
-     */
-    @NonNull
-    @UnsupportedAppUsage
-    public IpConfiguration.IpAssignment getIpAssignment() {
-        return mIpConfiguration.getIpAssignment();
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setIpAssignment(IpConfiguration.IpAssignment ipAssignment) {
-        mIpConfiguration.setIpAssignment(ipAssignment);
-    }
-
-    /**
-     * Get the {@link IpConfiguration.ProxySettings} for this network.
-     * @hide
-     */
-    @NonNull
-    @UnsupportedAppUsage
-    public IpConfiguration.ProxySettings getProxySettings() {
-        return mIpConfiguration.getProxySettings();
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setProxySettings(IpConfiguration.ProxySettings proxySettings) {
-        mIpConfiguration.setProxySettings(proxySettings);
-    }
-
-    /**
-     * Returns the HTTP proxy used by this object.
-     * @return a {@link ProxyInfo httpProxy} representing the proxy specified by this
-     *                  WifiConfiguration, or {@code null} if no proxy is specified.
-     */
-    public ProxyInfo getHttpProxy() {
-        if (mIpConfiguration.getProxySettings() == IpConfiguration.ProxySettings.NONE) {
-            return null;
-        }
-        return new ProxyInfo(mIpConfiguration.getHttpProxy());
-    }
-
-    /**
-     * Set the {@link ProxyInfo} for this WifiConfiguration. This method should only be used by a
-     * device owner or profile owner. When other apps attempt to save a {@link WifiConfiguration}
-     * with modified proxy settings, the methods {@link WifiManager#addNetwork} and
-     * {@link WifiManager#updateNetwork} fail and return {@code -1}.
-     *
-     * @param httpProxy {@link ProxyInfo} representing the httpProxy to be used by this
-     *                  WifiConfiguration. Setting this to {@code null} will explicitly set no
-     *                  proxy, removing any proxy that was previously set.
-     * @exception IllegalArgumentException for invalid httpProxy
-     */
-    public void setHttpProxy(ProxyInfo httpProxy) {
-        if (httpProxy == null) {
-            mIpConfiguration.setProxySettings(IpConfiguration.ProxySettings.NONE);
-            mIpConfiguration.setHttpProxy(null);
-            return;
-        }
-        ProxyInfo httpProxyCopy;
-        ProxySettings proxySettingCopy;
-        if (!Uri.EMPTY.equals(httpProxy.getPacFileUrl())) {
-            proxySettingCopy = IpConfiguration.ProxySettings.PAC;
-            // Construct a new PAC URL Proxy
-            httpProxyCopy = ProxyInfo.buildPacProxy(httpProxy.getPacFileUrl(), httpProxy.getPort());
-        } else {
-            proxySettingCopy = IpConfiguration.ProxySettings.STATIC;
-            // Construct a new HTTP Proxy
-            httpProxyCopy = ProxyInfo.buildDirectProxy(httpProxy.getHost(), httpProxy.getPort(),
-                    Arrays.asList(httpProxy.getExclusionList()));
-        }
-        if (!httpProxyCopy.isValid()) {
-            throw new IllegalArgumentException("Invalid ProxyInfo: " + httpProxyCopy.toString());
-        }
-        mIpConfiguration.setProxySettings(proxySettingCopy);
-        mIpConfiguration.setHttpProxy(httpProxyCopy);
-    }
-
-    /**
-     * Set the {@link ProxySettings} and {@link ProxyInfo} for this network.
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public void setProxy(@NonNull ProxySettings settings, @NonNull ProxyInfo proxy) {
-        mIpConfiguration.setProxySettings(settings);
-        mIpConfiguration.setHttpProxy(proxy);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** @hide */
-    public void setPasspointManagementObjectTree(String passpointManagementObjectTree) {
-        mPasspointManagementObjectTree = passpointManagementObjectTree;
-    }
-
-    /** @hide */
-    public String getMoTree() {
-        return mPasspointManagementObjectTree;
-    }
-
-    /** Copy constructor */
-    public WifiConfiguration(@NonNull WifiConfiguration source) {
-        if (source != null) {
-            networkId = source.networkId;
-            status = source.status;
-            SSID = source.SSID;
-            BSSID = source.BSSID;
-            FQDN = source.FQDN;
-            roamingConsortiumIds = source.roamingConsortiumIds.clone();
-            providerFriendlyName = source.providerFriendlyName;
-            isHomeProviderNetwork = source.isHomeProviderNetwork;
-            preSharedKey = source.preSharedKey;
-
-            mNetworkSelectionStatus.copy(source.getNetworkSelectionStatus());
-            apBand = source.apBand;
-            apChannel = source.apChannel;
-
-            wepKeys = new String[4];
-            for (int i = 0; i < wepKeys.length; i++) {
-                wepKeys[i] = source.wepKeys[i];
-            }
-
-            wepTxKeyIndex = source.wepTxKeyIndex;
-            priority = source.priority;
-            hiddenSSID = source.hiddenSSID;
-            allowedKeyManagement   = (BitSet) source.allowedKeyManagement.clone();
-            allowedProtocols       = (BitSet) source.allowedProtocols.clone();
-            allowedAuthAlgorithms  = (BitSet) source.allowedAuthAlgorithms.clone();
-            allowedPairwiseCiphers = (BitSet) source.allowedPairwiseCiphers.clone();
-            allowedGroupCiphers    = (BitSet) source.allowedGroupCiphers.clone();
-            allowedGroupManagementCiphers = (BitSet) source.allowedGroupManagementCiphers.clone();
-            allowedSuiteBCiphers    = (BitSet) source.allowedSuiteBCiphers.clone();
-            enterpriseConfig = new WifiEnterpriseConfig(source.enterpriseConfig);
-
-            defaultGwMacAddress = source.defaultGwMacAddress;
-
-            mIpConfiguration = new IpConfiguration(source.mIpConfiguration);
-
-            if ((source.linkedConfigurations != null)
-                    && (source.linkedConfigurations.size() > 0)) {
-                linkedConfigurations = new HashMap<String, Integer>();
-                linkedConfigurations.putAll(source.linkedConfigurations);
-            }
-            validatedInternetAccess = source.validatedInternetAccess;
-            isLegacyPasspointConfig = source.isLegacyPasspointConfig;
-            ephemeral = source.ephemeral;
-            osu = source.osu;
-            trusted = source.trusted;
-            fromWifiNetworkSuggestion = source.fromWifiNetworkSuggestion;
-            fromWifiNetworkSpecifier = source.fromWifiNetworkSpecifier;
-            meteredHint = source.meteredHint;
-            meteredOverride = source.meteredOverride;
-            useExternalScores = source.useExternalScores;
-
-            lastConnectUid = source.lastConnectUid;
-            lastUpdateUid = source.lastUpdateUid;
-            creatorUid = source.creatorUid;
-            creatorName = source.creatorName;
-            lastUpdateName = source.lastUpdateName;
-            peerWifiConfiguration = source.peerWifiConfiguration;
-
-            lastConnected = source.lastConnected;
-            lastDisconnected = source.lastDisconnected;
-            numScorerOverride = source.numScorerOverride;
-            numScorerOverrideAndSwitchedNetwork = source.numScorerOverrideAndSwitchedNetwork;
-            numAssociation = source.numAssociation;
-            allowAutojoin = source.allowAutojoin;
-            numNoInternetAccessReports = source.numNoInternetAccessReports;
-            noInternetAccessExpected = source.noInternetAccessExpected;
-            shared = source.shared;
-            recentFailure.setAssociationStatus(source.recentFailure.getAssociationStatus());
-            mRandomizedMacAddress = source.mRandomizedMacAddress;
-            macRandomizationSetting = source.macRandomizationSetting;
-            randomizedMacExpirationTimeMs = source.randomizedMacExpirationTimeMs;
-            requirePmf = source.requirePmf;
-            updateIdentifier = source.updateIdentifier;
-            carrierId = source.carrierId;
-            mPasspointUniqueId = source.mPasspointUniqueId;
-        }
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(networkId);
-        dest.writeInt(status);
-        mNetworkSelectionStatus.writeToParcel(dest);
-        dest.writeString(SSID);
-        dest.writeString(BSSID);
-        dest.writeInt(apBand);
-        dest.writeInt(apChannel);
-        dest.writeString(FQDN);
-        dest.writeString(providerFriendlyName);
-        dest.writeInt(isHomeProviderNetwork ? 1 : 0);
-        dest.writeInt(roamingConsortiumIds.length);
-        for (long roamingConsortiumId : roamingConsortiumIds) {
-            dest.writeLong(roamingConsortiumId);
-        }
-        dest.writeString(preSharedKey);
-        for (String wepKey : wepKeys) {
-            dest.writeString(wepKey);
-        }
-        dest.writeInt(wepTxKeyIndex);
-        dest.writeInt(priority);
-        dest.writeInt(hiddenSSID ? 1 : 0);
-        dest.writeInt(requirePmf ? 1 : 0);
-        dest.writeString(updateIdentifier);
-
-        writeBitSet(dest, allowedKeyManagement);
-        writeBitSet(dest, allowedProtocols);
-        writeBitSet(dest, allowedAuthAlgorithms);
-        writeBitSet(dest, allowedPairwiseCiphers);
-        writeBitSet(dest, allowedGroupCiphers);
-        writeBitSet(dest, allowedGroupManagementCiphers);
-        writeBitSet(dest, allowedSuiteBCiphers);
-
-        dest.writeParcelable(enterpriseConfig, flags);
-
-        dest.writeParcelable(mIpConfiguration, flags);
-        dest.writeString(dhcpServer);
-        dest.writeString(defaultGwMacAddress);
-        dest.writeInt(validatedInternetAccess ? 1 : 0);
-        dest.writeInt(isLegacyPasspointConfig ? 1 : 0);
-        dest.writeInt(ephemeral ? 1 : 0);
-        dest.writeInt(trusted ? 1 : 0);
-        dest.writeInt(fromWifiNetworkSuggestion ? 1 : 0);
-        dest.writeInt(fromWifiNetworkSpecifier ? 1 : 0);
-        dest.writeInt(meteredHint ? 1 : 0);
-        dest.writeInt(meteredOverride);
-        dest.writeInt(useExternalScores ? 1 : 0);
-        dest.writeInt(creatorUid);
-        dest.writeInt(lastConnectUid);
-        dest.writeInt(lastUpdateUid);
-        dest.writeString(creatorName);
-        dest.writeString(lastUpdateName);
-        dest.writeInt(numScorerOverride);
-        dest.writeInt(numScorerOverrideAndSwitchedNetwork);
-        dest.writeInt(numAssociation);
-        dest.writeBoolean(allowAutojoin);
-        dest.writeInt(numNoInternetAccessReports);
-        dest.writeInt(noInternetAccessExpected ? 1 : 0);
-        dest.writeInt(shared ? 1 : 0);
-        dest.writeString(mPasspointManagementObjectTree);
-        dest.writeInt(recentFailure.getAssociationStatus());
-        dest.writeParcelable(mRandomizedMacAddress, flags);
-        dest.writeInt(macRandomizationSetting);
-        dest.writeInt(osu ? 1 : 0);
-        dest.writeLong(randomizedMacExpirationTimeMs);
-        dest.writeInt(carrierId);
-        dest.writeString(mPasspointUniqueId);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @UnsupportedAppUsage
-    public static final @android.annotation.NonNull Creator<WifiConfiguration> CREATOR =
-        new Creator<WifiConfiguration>() {
-            public WifiConfiguration createFromParcel(Parcel in) {
-                WifiConfiguration config = new WifiConfiguration();
-                config.networkId = in.readInt();
-                config.status = in.readInt();
-                config.mNetworkSelectionStatus.readFromParcel(in);
-                config.SSID = in.readString();
-                config.BSSID = in.readString();
-                config.apBand = in.readInt();
-                config.apChannel = in.readInt();
-                config.FQDN = in.readString();
-                config.providerFriendlyName = in.readString();
-                config.isHomeProviderNetwork = in.readInt() != 0;
-                int numRoamingConsortiumIds = in.readInt();
-                config.roamingConsortiumIds = new long[numRoamingConsortiumIds];
-                for (int i = 0; i < numRoamingConsortiumIds; i++) {
-                    config.roamingConsortiumIds[i] = in.readLong();
-                }
-                config.preSharedKey = in.readString();
-                for (int i = 0; i < config.wepKeys.length; i++) {
-                    config.wepKeys[i] = in.readString();
-                }
-                config.wepTxKeyIndex = in.readInt();
-                config.priority = in.readInt();
-                config.hiddenSSID = in.readInt() != 0;
-                config.requirePmf = in.readInt() != 0;
-                config.updateIdentifier = in.readString();
-
-                config.allowedKeyManagement   = readBitSet(in);
-                config.allowedProtocols       = readBitSet(in);
-                config.allowedAuthAlgorithms  = readBitSet(in);
-                config.allowedPairwiseCiphers = readBitSet(in);
-                config.allowedGroupCiphers    = readBitSet(in);
-                config.allowedGroupManagementCiphers = readBitSet(in);
-                config.allowedSuiteBCiphers   = readBitSet(in);
-
-                config.enterpriseConfig = in.readParcelable(null);
-                config.setIpConfiguration(in.readParcelable(null));
-                config.dhcpServer = in.readString();
-                config.defaultGwMacAddress = in.readString();
-                config.validatedInternetAccess = in.readInt() != 0;
-                config.isLegacyPasspointConfig = in.readInt() != 0;
-                config.ephemeral = in.readInt() != 0;
-                config.trusted = in.readInt() != 0;
-                config.fromWifiNetworkSuggestion =  in.readInt() != 0;
-                config.fromWifiNetworkSpecifier =  in.readInt() != 0;
-                config.meteredHint = in.readInt() != 0;
-                config.meteredOverride = in.readInt();
-                config.useExternalScores = in.readInt() != 0;
-                config.creatorUid = in.readInt();
-                config.lastConnectUid = in.readInt();
-                config.lastUpdateUid = in.readInt();
-                config.creatorName = in.readString();
-                config.lastUpdateName = in.readString();
-                config.numScorerOverride = in.readInt();
-                config.numScorerOverrideAndSwitchedNetwork = in.readInt();
-                config.numAssociation = in.readInt();
-                config.allowAutojoin = in.readBoolean();
-                config.numNoInternetAccessReports = in.readInt();
-                config.noInternetAccessExpected = in.readInt() != 0;
-                config.shared = in.readInt() != 0;
-                config.mPasspointManagementObjectTree = in.readString();
-                config.recentFailure.setAssociationStatus(in.readInt());
-                config.mRandomizedMacAddress = in.readParcelable(null);
-                config.macRandomizationSetting = in.readInt();
-                config.osu = in.readInt() != 0;
-                config.randomizedMacExpirationTimeMs = in.readLong();
-                config.carrierId = in.readInt();
-                config.mPasspointUniqueId = in.readString();
-                return config;
-            }
-
-            public WifiConfiguration[] newArray(int size) {
-                return new WifiConfiguration[size];
-            }
-        };
-
-    /**
-     * Passpoint Unique identifier
-     * @hide
-     */
-    private String mPasspointUniqueId = null;
-
-    /**
-     * Set the Passpoint unique identifier
-     * @param uniqueId Passpoint unique identifier to be set
-     * @hide
-     */
-    public void setPasspointUniqueId(String uniqueId) {
-        mPasspointUniqueId = uniqueId;
-    }
-
-    /**
-     * Set the Passpoint unique identifier
-     * @hide
-     */
-    public String getPasspointUniqueId() {
-        return mPasspointUniqueId;
-    }
-
-    /**
-     * If network is one of the most recently connected.
-     * For framework internal use only. Do not parcel.
-     * @hide
-     */
-    public boolean isMostRecentlyConnected = false;
-
-    /**
-     * Whether the key mgmt indicates if the WifiConfiguration needs a preSharedKey or not.
-     * @return true if preSharedKey is needed, false otherwise.
-     * @hide
-     */
-    public boolean needsPreSharedKey() {
-        return allowedKeyManagement.get(KeyMgmt.WPA_PSK)
-                || allowedKeyManagement.get(KeyMgmt.SAE)
-                || allowedKeyManagement.get(KeyMgmt.WAPI_PSK);
-    }
-
-}
diff --git a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java b/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
deleted file mode 100644
index 77fa673..0000000
--- a/wifi/java/android/net/wifi/WifiEnterpriseConfig.java
+++ /dev/null
@@ -1,1445 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.net.wifi;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.nio.charset.StandardCharsets;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Enterprise configuration details for Wi-Fi. Stores details about the EAP method
- * and any associated credentials.
- */
-public class WifiEnterpriseConfig implements Parcelable {
-
-    /** Key prefix for WAPI AS certificates. */
-    public static final String WAPI_AS_CERTIFICATE = "WAPIAS_";
-
-    /** Key prefix for WAPI user certificates. */
-    public static final String WAPI_USER_CERTIFICATE = "WAPIUSR_";
-
-    /**
-     * Intent extra: name for WAPI AS certificates
-     */
-    public static final String EXTRA_WAPI_AS_CERTIFICATE_NAME =
-            "android.net.wifi.extra.WAPI_AS_CERTIFICATE_NAME";
-
-    /**
-     * Intent extra: data for WAPI AS certificates
-     */
-    public static final String EXTRA_WAPI_AS_CERTIFICATE_DATA =
-            "android.net.wifi.extra.WAPI_AS_CERTIFICATE_DATA";
-
-    /**
-     * Intent extra: name for WAPI USER certificates
-     */
-    public static final String EXTRA_WAPI_USER_CERTIFICATE_NAME =
-            "android.net.wifi.extra.WAPI_USER_CERTIFICATE_NAME";
-
-    /**
-     * Intent extra: data for WAPI USER certificates
-     */
-    public static final String EXTRA_WAPI_USER_CERTIFICATE_DATA =
-            "android.net.wifi.extra.WAPI_USER_CERTIFICATE_DATA";
-
-    /** @hide */
-    public static final String EMPTY_VALUE         = "NULL";
-    /** @hide */
-    public static final String EAP_KEY             = "eap";
-    /** @hide */
-    public static final String PHASE2_KEY          = "phase2";
-    /** @hide */
-    public static final String IDENTITY_KEY        = "identity";
-    /** @hide */
-    public static final String ANON_IDENTITY_KEY   = "anonymous_identity";
-    /** @hide */
-    public static final String PASSWORD_KEY        = "password";
-    /** @hide */
-    public static final String SUBJECT_MATCH_KEY   = "subject_match";
-    /** @hide */
-    public static final String ALTSUBJECT_MATCH_KEY = "altsubject_match";
-    /** @hide */
-    public static final String DOM_SUFFIX_MATCH_KEY = "domain_suffix_match";
-    /** @hide */
-    public static final String OPP_KEY_CACHING     = "proactive_key_caching";
-    /** @hide */
-    public static final String EAP_ERP             = "eap_erp";
-    /** @hide */
-    public static final String OCSP                = "ocsp";
-
-    /**
-     * String representing the keystore OpenSSL ENGINE's ID.
-     * @hide
-     */
-    public static final String ENGINE_ID_KEYSTORE = "keystore";
-
-    /**
-     * String representing the keystore URI used for wpa_supplicant.
-     * @hide
-     */
-    public static final String KEYSTORE_URI = "keystore://";
-
-    /**
-     * String representing the keystore URI used for wpa_supplicant,
-     * Unlike #KEYSTORE_URI, this supports a list of space-delimited aliases
-     * @hide
-     */
-    public static final String KEYSTORES_URI = "keystores://";
-
-    /**
-     * String to set the engine value to when it should be enabled.
-     * @hide
-     */
-    public static final String ENGINE_ENABLE = "1";
-
-    /**
-     * String to set the engine value to when it should be disabled.
-     * @hide
-     */
-    public static final String ENGINE_DISABLE = "0";
-
-    /**
-     * Key prefix for CA certificates.
-     * Note: copied from {@link android.security.Credentials#CA_CERTIFICATE} since it is @hide.
-     */
-    private static final String CA_CERTIFICATE = "CACERT_";
-    /**
-     * Key prefix for user certificates.
-     * Note: copied from {@link android.security.Credentials#USER_CERTIFICATE} since it is @hide.
-     */
-    private static final String USER_CERTIFICATE = "USRCERT_";
-    /**
-     * Key prefix for user private and secret keys.
-     * Note: copied from {@link android.security.Credentials#USER_PRIVATE_KEY} since it is @hide.
-     */
-    private static final String USER_PRIVATE_KEY = "USRPKEY_";
-
-    /** @hide */
-    public static final String CA_CERT_PREFIX = KEYSTORE_URI + CA_CERTIFICATE;
-    /** @hide */
-    public static final String CLIENT_CERT_PREFIX = KEYSTORE_URI + USER_CERTIFICATE;
-    /** @hide */
-    public static final String CLIENT_CERT_KEY     = "client_cert";
-    /** @hide */
-    public static final String CA_CERT_KEY         = "ca_cert";
-    /** @hide */
-    public static final String CA_PATH_KEY         = "ca_path";
-    /** @hide */
-    public static final String ENGINE_KEY          = "engine";
-    /** @hide */
-    public static final String ENGINE_ID_KEY       = "engine_id";
-    /** @hide */
-    public static final String PRIVATE_KEY_ID_KEY  = "key_id";
-    /** @hide */
-    public static final String REALM_KEY           = "realm";
-    /** @hide */
-    public static final String PLMN_KEY            = "plmn";
-    /** @hide */
-    public static final String CA_CERT_ALIAS_DELIMITER = " ";
-    /** @hide */
-    public static final String WAPI_CERT_SUITE_KEY = "wapi_cert_suite";
-
-    /**
-     * Do not use OCSP stapling (TLS certificate status extension)
-     * @hide
-     */
-    @SystemApi
-    public static final int OCSP_NONE = 0;
-
-    /**
-     * Try to use OCSP stapling, but not require response
-     * @hide
-     */
-    @SystemApi
-    public static final int OCSP_REQUEST_CERT_STATUS = 1;
-
-    /**
-     * Require valid OCSP stapling response
-     * @hide
-     */
-    @SystemApi
-    public static final int OCSP_REQUIRE_CERT_STATUS = 2;
-
-    /**
-     * Require valid OCSP stapling response for all not-trusted certificates in the server
-     * certificate chain
-     * @hide
-     */
-    @SystemApi
-    public static final int OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3;
-
-    /** @hide */
-    @IntDef(prefix = {"OCSP_"}, value = {
-            OCSP_NONE,
-            OCSP_REQUEST_CERT_STATUS,
-            OCSP_REQUIRE_CERT_STATUS,
-            OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface Ocsp {}
-
-    /**
-     * Whether to use/require OCSP (Online Certificate Status Protocol) to check server certificate.
-     * @hide
-     */
-    private @Ocsp int mOcsp = OCSP_NONE;
-
-    // Fields to copy verbatim from wpa_supplicant.
-    private static final String[] SUPPLICANT_CONFIG_KEYS = new String[] {
-            IDENTITY_KEY,
-            ANON_IDENTITY_KEY,
-            PASSWORD_KEY,
-            CLIENT_CERT_KEY,
-            CA_CERT_KEY,
-            SUBJECT_MATCH_KEY,
-            ENGINE_KEY,
-            ENGINE_ID_KEY,
-            PRIVATE_KEY_ID_KEY,
-            ALTSUBJECT_MATCH_KEY,
-            DOM_SUFFIX_MATCH_KEY,
-            CA_PATH_KEY
-    };
-
-    /**
-     * Fields that have unquoted values in {@link #mFields}.
-     */
-    private static final List<String> UNQUOTED_KEYS = Arrays.asList(ENGINE_KEY, OPP_KEY_CACHING,
-                                                                    EAP_ERP);
-
-    @UnsupportedAppUsage
-    private HashMap<String, String> mFields = new HashMap<String, String>();
-    private X509Certificate[] mCaCerts;
-    private PrivateKey mClientPrivateKey;
-    private X509Certificate[] mClientCertificateChain;
-    private int mEapMethod = Eap.NONE;
-    private int mPhase2Method = Phase2.NONE;
-    private boolean mIsAppInstalledDeviceKeyAndCert = false;
-    private boolean mIsAppInstalledCaCert = false;
-
-    private static final String TAG = "WifiEnterpriseConfig";
-
-    public WifiEnterpriseConfig() {
-        // Do not set defaults so that the enterprise fields that are not changed
-        // by API are not changed underneath
-        // This is essential because an app may not have all fields like password
-        // available. It allows modification of subset of fields.
-
-    }
-
-    /**
-     * Copy over the contents of the source WifiEnterpriseConfig object over to this object.
-     *
-     * @param source Source WifiEnterpriseConfig object.
-     * @param ignoreMaskedPassword Set to true to ignore masked password field, false otherwise.
-     * @param mask if |ignoreMaskedPassword| is set, check if the incoming password field is set
-     *             to this value.
-     */
-    private void copyFrom(WifiEnterpriseConfig source, boolean ignoreMaskedPassword, String mask) {
-        for (String key : source.mFields.keySet()) {
-            if (ignoreMaskedPassword && key.equals(PASSWORD_KEY)
-                    && TextUtils.equals(source.mFields.get(key), mask)) {
-                continue;
-            }
-            mFields.put(key, source.mFields.get(key));
-        }
-        if (source.mCaCerts != null) {
-            mCaCerts = Arrays.copyOf(source.mCaCerts, source.mCaCerts.length);
-        } else {
-            mCaCerts = null;
-        }
-        mClientPrivateKey = source.mClientPrivateKey;
-        if (source.mClientCertificateChain != null) {
-            mClientCertificateChain = Arrays.copyOf(
-                    source.mClientCertificateChain,
-                    source.mClientCertificateChain.length);
-        } else {
-            mClientCertificateChain = null;
-        }
-        mEapMethod = source.mEapMethod;
-        mPhase2Method = source.mPhase2Method;
-        mIsAppInstalledDeviceKeyAndCert = source.mIsAppInstalledDeviceKeyAndCert;
-        mIsAppInstalledCaCert = source.mIsAppInstalledCaCert;
-        mOcsp = source.mOcsp;
-    }
-
-    /**
-     * Copy constructor.
-     * This copies over all the fields verbatim (does not ignore masked password fields).
-     *
-     * @param source Source WifiEnterpriseConfig object.
-     */
-    public WifiEnterpriseConfig(WifiEnterpriseConfig source) {
-        copyFrom(source, false, "");
-    }
-
-    /**
-     * Copy fields from the provided external WifiEnterpriseConfig.
-     * This is needed to handle the WifiEnterpriseConfig objects which were sent by apps with the
-     * password field masked.
-     *
-     * @param externalConfig External WifiEnterpriseConfig object.
-     * @param mask String mask to compare against.
-     * @hide
-     */
-    public void copyFromExternal(WifiEnterpriseConfig externalConfig, String mask) {
-        copyFrom(externalConfig, true, convertToQuotedString(mask));
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mFields.size());
-        for (Map.Entry<String, String> entry : mFields.entrySet()) {
-            dest.writeString(entry.getKey());
-            dest.writeString(entry.getValue());
-        }
-
-        dest.writeInt(mEapMethod);
-        dest.writeInt(mPhase2Method);
-        ParcelUtil.writeCertificates(dest, mCaCerts);
-        ParcelUtil.writePrivateKey(dest, mClientPrivateKey);
-        ParcelUtil.writeCertificates(dest, mClientCertificateChain);
-        dest.writeBoolean(mIsAppInstalledDeviceKeyAndCert);
-        dest.writeBoolean(mIsAppInstalledCaCert);
-        dest.writeInt(mOcsp);
-    }
-
-    public static final @android.annotation.NonNull Creator<WifiEnterpriseConfig> CREATOR =
-            new Creator<WifiEnterpriseConfig>() {
-                @Override
-                public WifiEnterpriseConfig createFromParcel(Parcel in) {
-                    WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-                    int count = in.readInt();
-                    for (int i = 0; i < count; i++) {
-                        String key = in.readString();
-                        String value = in.readString();
-                        enterpriseConfig.mFields.put(key, value);
-                    }
-
-                    enterpriseConfig.mEapMethod = in.readInt();
-                    enterpriseConfig.mPhase2Method = in.readInt();
-                    enterpriseConfig.mCaCerts = ParcelUtil.readCertificates(in);
-                    enterpriseConfig.mClientPrivateKey = ParcelUtil.readPrivateKey(in);
-                    enterpriseConfig.mClientCertificateChain = ParcelUtil.readCertificates(in);
-                    enterpriseConfig.mIsAppInstalledDeviceKeyAndCert = in.readBoolean();
-                    enterpriseConfig.mIsAppInstalledCaCert = in.readBoolean();
-                    enterpriseConfig.mOcsp = in.readInt();
-                    return enterpriseConfig;
-                }
-
-                @Override
-                public WifiEnterpriseConfig[] newArray(int size) {
-                    return new WifiEnterpriseConfig[size];
-                }
-            };
-
-    /** The Extensible Authentication Protocol method used */
-    public static final class Eap {
-        /** No EAP method used. Represents an empty config */
-        public static final int NONE    = -1;
-        /** Protected EAP */
-        public static final int PEAP    = 0;
-        /** EAP-Transport Layer Security */
-        public static final int TLS     = 1;
-        /** EAP-Tunneled Transport Layer Security */
-        public static final int TTLS    = 2;
-        /** EAP-Password */
-        public static final int PWD     = 3;
-        /** EAP-Subscriber Identity Module [RFC-4186] */
-        public static final int SIM     = 4;
-        /** EAP-Authentication and Key Agreement [RFC-4187] */
-        public static final int AKA     = 5;
-        /** EAP-Authentication and Key Agreement Prime [RFC-5448] */
-        public static final int AKA_PRIME = 6;
-        /** Hotspot 2.0 r2 OSEN */
-        public static final int UNAUTH_TLS = 7;
-        /** WAPI Certificate */
-        public static final int WAPI_CERT = 8;
-        /** @hide */
-        public static final String[] strings =
-                { "PEAP", "TLS", "TTLS", "PWD", "SIM", "AKA", "AKA'", "WFA-UNAUTH-TLS",
-                        "WAPI_CERT" };
-
-        /** Prevent initialization */
-        private Eap() {}
-    }
-
-    /** The inner authentication method used */
-    public static final class Phase2 {
-        public static final int NONE        = 0;
-        /** Password Authentication Protocol */
-        public static final int PAP         = 1;
-        /** Microsoft Challenge Handshake Authentication Protocol */
-        public static final int MSCHAP      = 2;
-        /** Microsoft Challenge Handshake Authentication Protocol v2 */
-        public static final int MSCHAPV2    = 3;
-        /** Generic Token Card */
-        public static final int GTC         = 4;
-        /** EAP-Subscriber Identity Module [RFC-4186] */
-        public static final int SIM         = 5;
-        /** EAP-Authentication and Key Agreement [RFC-4187] */
-        public static final int AKA         = 6;
-        /** EAP-Authentication and Key Agreement Prime [RFC-5448] */
-        public static final int AKA_PRIME   = 7;
-        private static final String AUTH_PREFIX = "auth=";
-        private static final String AUTHEAP_PREFIX = "autheap=";
-        /** @hide */
-        public static final String[] strings = {EMPTY_VALUE, "PAP", "MSCHAP",
-                "MSCHAPV2", "GTC", "SIM", "AKA", "AKA'" };
-
-        /** Prevent initialization */
-        private Phase2() {}
-    }
-
-    // Loader and saver interfaces for exchanging data with wpa_supplicant.
-    // TODO: Decouple this object (which is just a placeholder of the configuration)
-    // from the implementation that knows what wpa_supplicant wants.
-    /**
-     * Interface used for retrieving supplicant configuration from WifiEnterpriseConfig
-     * @hide
-     */
-    public interface SupplicantSaver {
-        /**
-         * Set a value within wpa_supplicant configuration
-         * @param key index to set within wpa_supplciant
-         * @param value the value for the key
-         * @return true if successful; false otherwise
-         */
-        boolean saveValue(String key, String value);
-    }
-
-    /**
-     * Interface used for populating a WifiEnterpriseConfig from supplicant configuration
-     * @hide
-     */
-    public interface SupplicantLoader {
-        /**
-         * Returns a value within wpa_supplicant configuration
-         * @param key index to set within wpa_supplciant
-         * @return string value if successful; null otherwise
-         */
-        String loadValue(String key);
-    }
-
-    /**
-     * Internal use only; supply field values to wpa_supplicant config.  The configuration
-     * process aborts on the first failed call on {@code saver}.
-     * @param saver proxy for setting configuration in wpa_supplciant
-     * @return whether the save succeeded on all attempts
-     * @hide
-     */
-    public boolean saveToSupplicant(SupplicantSaver saver) {
-        if (!isEapMethodValid()) {
-            return false;
-        }
-
-        // wpa_supplicant can update the anonymous identity for these kinds of networks after
-        // framework reads them, so make sure the framework doesn't try to overwrite them.
-        boolean shouldNotWriteAnonIdentity = mEapMethod == WifiEnterpriseConfig.Eap.SIM
-                || mEapMethod == WifiEnterpriseConfig.Eap.AKA
-                || mEapMethod == WifiEnterpriseConfig.Eap.AKA_PRIME;
-        for (String key : mFields.keySet()) {
-            if (shouldNotWriteAnonIdentity && ANON_IDENTITY_KEY.equals(key)) {
-                continue;
-            }
-            if (!saver.saveValue(key, mFields.get(key))) {
-                return false;
-            }
-        }
-
-        if (!saver.saveValue(EAP_KEY, Eap.strings[mEapMethod])) {
-            return false;
-        }
-
-        if (mEapMethod != Eap.TLS && mEapMethod != Eap.UNAUTH_TLS && mPhase2Method != Phase2.NONE) {
-            boolean is_autheap = mEapMethod == Eap.TTLS && mPhase2Method == Phase2.GTC;
-            String prefix = is_autheap ? Phase2.AUTHEAP_PREFIX : Phase2.AUTH_PREFIX;
-            String value = convertToQuotedString(prefix + Phase2.strings[mPhase2Method]);
-            return saver.saveValue(PHASE2_KEY, value);
-        } else if (mPhase2Method == Phase2.NONE) {
-            // By default, send a null phase 2 to clear old configuration values.
-            return saver.saveValue(PHASE2_KEY, null);
-        } else {
-            Log.e(TAG, "WiFi enterprise configuration is invalid as it supplies a "
-                    + "phase 2 method but the phase1 method does not support it.");
-            return false;
-        }
-    }
-
-    /**
-     * Internal use only; retrieve configuration from wpa_supplicant config.
-     * @param loader proxy for retrieving configuration keys from wpa_supplicant
-     * @hide
-     */
-    public void loadFromSupplicant(SupplicantLoader loader) {
-        for (String key : SUPPLICANT_CONFIG_KEYS) {
-            String value = loader.loadValue(key);
-            if (value == null) {
-                mFields.put(key, EMPTY_VALUE);
-            } else {
-                mFields.put(key, value);
-            }
-        }
-        String eapMethod  = loader.loadValue(EAP_KEY);
-        mEapMethod = getStringIndex(Eap.strings, eapMethod, Eap.NONE);
-
-        String phase2Method = removeDoubleQuotes(loader.loadValue(PHASE2_KEY));
-        // Remove "auth=" or "autheap=" prefix.
-        if (phase2Method.startsWith(Phase2.AUTH_PREFIX)) {
-            phase2Method = phase2Method.substring(Phase2.AUTH_PREFIX.length());
-        } else if (phase2Method.startsWith(Phase2.AUTHEAP_PREFIX)) {
-            phase2Method = phase2Method.substring(Phase2.AUTHEAP_PREFIX.length());
-        }
-        mPhase2Method = getStringIndex(Phase2.strings, phase2Method, Phase2.NONE);
-    }
-
-    /**
-     * Set the EAP authentication method.
-     * @param  eapMethod is one {@link Eap#PEAP}, {@link Eap#TLS}, {@link Eap#TTLS} or
-     *                   {@link Eap#PWD}
-     * @throws IllegalArgumentException on an invalid eap method
-     */
-    public void setEapMethod(int eapMethod) {
-        switch (eapMethod) {
-            /** Valid methods */
-            case Eap.WAPI_CERT:
-                mEapMethod = eapMethod;
-                setPhase2Method(Phase2.NONE);
-                break;
-            case Eap.TLS:
-            case Eap.UNAUTH_TLS:
-                setPhase2Method(Phase2.NONE);
-                /* fall through */
-            case Eap.PEAP:
-            case Eap.PWD:
-            case Eap.TTLS:
-            case Eap.SIM:
-            case Eap.AKA:
-            case Eap.AKA_PRIME:
-                mEapMethod = eapMethod;
-                setFieldValue(OPP_KEY_CACHING, "1");
-                break;
-            default:
-                throw new IllegalArgumentException("Unknown EAP method");
-        }
-    }
-
-    /**
-     * Get the eap method.
-     * @return eap method configured
-     */
-    public int getEapMethod() {
-        return mEapMethod;
-    }
-
-    /**
-     * Set Phase 2 authentication method. Sets the inner authentication method to be used in
-     * phase 2 after setting up a secure channel
-     * @param phase2Method is the inner authentication method and can be one of {@link Phase2#NONE},
-     *                     {@link Phase2#PAP}, {@link Phase2#MSCHAP}, {@link Phase2#MSCHAPV2},
-     *                     {@link Phase2#GTC}
-     * @throws IllegalArgumentException on an invalid phase2 method
-     *
-     */
-    public void setPhase2Method(int phase2Method) {
-        switch (phase2Method) {
-            case Phase2.NONE:
-            case Phase2.PAP:
-            case Phase2.MSCHAP:
-            case Phase2.MSCHAPV2:
-            case Phase2.GTC:
-            case Phase2.SIM:
-            case Phase2.AKA:
-            case Phase2.AKA_PRIME:
-                mPhase2Method = phase2Method;
-                break;
-            default:
-                throw new IllegalArgumentException("Unknown Phase 2 method");
-        }
-    }
-
-    /**
-     * Get the phase 2 authentication method.
-     * @return a phase 2 method defined at {@link Phase2}
-     * */
-    public int getPhase2Method() {
-        return mPhase2Method;
-    }
-
-    /**
-     * Set the identity
-     * @param identity
-     */
-    public void setIdentity(String identity) {
-        setFieldValue(IDENTITY_KEY, identity, "");
-    }
-
-    /**
-     * Get the identity
-     * @return the identity
-     */
-    public String getIdentity() {
-        return getFieldValue(IDENTITY_KEY);
-    }
-
-    /**
-     * Set anonymous identity. This is used as the unencrypted identity with
-     * certain EAP types
-     * @param anonymousIdentity the anonymous identity
-     */
-    public void setAnonymousIdentity(String anonymousIdentity) {
-        setFieldValue(ANON_IDENTITY_KEY, anonymousIdentity);
-    }
-
-    /**
-     * Get the anonymous identity
-     * @return anonymous identity
-     */
-    public String getAnonymousIdentity() {
-        return getFieldValue(ANON_IDENTITY_KEY);
-    }
-
-    /**
-     * Set the password.
-     * @param password the password
-     */
-    public void setPassword(String password) {
-        setFieldValue(PASSWORD_KEY, password);
-    }
-
-    /**
-     * Get the password.
-     *
-     * Returns locally set password value. For networks fetched from
-     * framework, returns "*".
-     */
-    public String getPassword() {
-        return getFieldValue(PASSWORD_KEY);
-    }
-
-    /**
-     * Encode a CA certificate alias so it does not contain illegal character.
-     * @hide
-     */
-    public static String encodeCaCertificateAlias(String alias) {
-        byte[] bytes = alias.getBytes(StandardCharsets.UTF_8);
-        StringBuilder sb = new StringBuilder(bytes.length * 2);
-        for (byte o : bytes) {
-            sb.append(String.format("%02x", o & 0xFF));
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Decode a previously-encoded CA certificate alias.
-     * @hide
-     */
-    public static String decodeCaCertificateAlias(String alias) {
-        byte[] data = new byte[alias.length() >> 1];
-        for (int n = 0, position = 0; n < alias.length(); n += 2, position++) {
-            data[position] = (byte) Integer.parseInt(alias.substring(n,  n + 2), 16);
-        }
-        try {
-            return new String(data, StandardCharsets.UTF_8);
-        } catch (NumberFormatException e) {
-            e.printStackTrace();
-            return alias;
-        }
-    }
-
-    /**
-     * Set CA certificate alias.
-     *
-     * <p> See the {@link android.security.KeyChain} for details on installing or choosing
-     * a certificate
-     * </p>
-     * @param alias identifies the certificate
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public void setCaCertificateAlias(String alias) {
-        setFieldValue(CA_CERT_KEY, alias, CA_CERT_PREFIX);
-    }
-
-    /**
-     * Set CA certificate aliases. When creating installing the corresponding certificate to
-     * the keystore, please use alias encoded by {@link #encodeCaCertificateAlias(String)}.
-     *
-     * <p> See the {@link android.security.KeyChain} for details on installing or choosing
-     * a certificate.
-     * </p>
-     * @param aliases identifies the certificate. Can be null to indicate the absence of a
-     *                certificate.
-     * @hide
-     */
-    @SystemApi
-    public void setCaCertificateAliases(@Nullable String[] aliases) {
-        if (aliases == null) {
-            setFieldValue(CA_CERT_KEY, null, CA_CERT_PREFIX);
-        } else if (aliases.length == 1) {
-            // Backwards compatibility: use the original cert prefix if setting only one alias.
-            setCaCertificateAlias(aliases[0]);
-        } else {
-            // Use KEYSTORES_URI which supports multiple aliases.
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < aliases.length; i++) {
-                if (i > 0) {
-                    sb.append(CA_CERT_ALIAS_DELIMITER);
-                }
-                sb.append(encodeCaCertificateAlias(CA_CERTIFICATE + aliases[i]));
-            }
-            setFieldValue(CA_CERT_KEY, sb.toString(), KEYSTORES_URI);
-        }
-    }
-
-    /**
-     * Get CA certificate alias
-     * @return alias to the CA certificate
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public String getCaCertificateAlias() {
-        return getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX);
-    }
-
-    /**
-     * Get CA certificate aliases.
-     * @return alias to the CA certificate, or null if unset.
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    public String[] getCaCertificateAliases() {
-        String value = getFieldValue(CA_CERT_KEY);
-        if (value.startsWith(CA_CERT_PREFIX)) {
-            // Backwards compatibility: parse the original alias prefix.
-            return new String[] {getFieldValue(CA_CERT_KEY, CA_CERT_PREFIX)};
-        } else if (value.startsWith(KEYSTORES_URI)) {
-            String values = value.substring(KEYSTORES_URI.length());
-
-            String[] aliases = TextUtils.split(values, CA_CERT_ALIAS_DELIMITER);
-            for (int i = 0; i < aliases.length; i++) {
-                aliases[i] = decodeCaCertificateAlias(aliases[i]);
-                if (aliases[i].startsWith(CA_CERTIFICATE)) {
-                    aliases[i] = aliases[i].substring(CA_CERTIFICATE.length());
-                }
-            }
-            return aliases.length != 0 ? aliases : null;
-        } else {
-            return TextUtils.isEmpty(value) ? null : new String[] {value};
-        }
-    }
-
-    /**
-     * Specify a X.509 certificate that identifies the server.
-     *
-     * <p>A default name is automatically assigned to the certificate and used
-     * with this configuration. The framework takes care of installing the
-     * certificate when the config is saved and removing the certificate when
-     * the config is removed.
-     *
-     * Note: If no certificate is set for an Enterprise configuration, either by not calling this
-     * API (or the {@link #setCaCertificates(X509Certificate[])}, or by calling it with null, then
-     * the server certificate validation is skipped - which means that the connection is not secure.
-     *
-     * @param cert X.509 CA certificate
-     * @throws IllegalArgumentException if not a CA certificate
-     */
-    public void setCaCertificate(@Nullable X509Certificate cert) {
-        if (cert != null) {
-            if (cert.getBasicConstraints() >= 0) {
-                mIsAppInstalledCaCert = true;
-                mCaCerts = new X509Certificate[] {cert};
-            } else {
-                mCaCerts = null;
-                throw new IllegalArgumentException("Not a CA certificate");
-            }
-        } else {
-            mCaCerts = null;
-        }
-    }
-
-    /**
-     * Get CA certificate. If multiple CA certificates are configured previously,
-     * return the first one.
-     * @return X.509 CA certificate
-     */
-    @Nullable public X509Certificate getCaCertificate() {
-        if (mCaCerts != null && mCaCerts.length > 0) {
-            return mCaCerts[0];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Specify a list of X.509 certificates that identifies the server. The validation
-     * passes if the CA of server certificate matches one of the given certificates.
-
-     * <p>Default names are automatically assigned to the certificates and used
-     * with this configuration. The framework takes care of installing the
-     * certificates when the config is saved and removing the certificates when
-     * the config is removed.
-     *
-     * Note: If no certificates are set for an Enterprise configuration, either by not calling this
-     * API (or the {@link #setCaCertificate(X509Certificate)}, or by calling it with null, then the
-     * server certificate validation is skipped - which means that the
-     * connection is not secure.
-     *
-     * @param certs X.509 CA certificates
-     * @throws IllegalArgumentException if any of the provided certificates is
-     *     not a CA certificate
-     */
-    public void setCaCertificates(@Nullable X509Certificate[] certs) {
-        if (certs != null) {
-            X509Certificate[] newCerts = new X509Certificate[certs.length];
-            for (int i = 0; i < certs.length; i++) {
-                if (certs[i].getBasicConstraints() >= 0) {
-                    newCerts[i] = certs[i];
-                } else {
-                    mCaCerts = null;
-                    throw new IllegalArgumentException("Not a CA certificate");
-                }
-            }
-            mCaCerts = newCerts;
-            mIsAppInstalledCaCert = true;
-        } else {
-            mCaCerts = null;
-        }
-    }
-
-    /**
-     * Get CA certificates.
-     */
-    @Nullable public X509Certificate[] getCaCertificates() {
-        if (mCaCerts != null && mCaCerts.length > 0) {
-            return mCaCerts;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @hide
-     */
-    public void resetCaCertificate() {
-        mCaCerts = null;
-    }
-
-    /**
-     * Set the ca_path directive on wpa_supplicant.
-     *
-     * From wpa_supplicant documentation:
-     *
-     * Directory path for CA certificate files (PEM). This path may contain
-     * multiple CA certificates in OpenSSL format. Common use for this is to
-     * point to system trusted CA list which is often installed into directory
-     * like /etc/ssl/certs. If configured, these certificates are added to the
-     * list of trusted CAs. ca_cert may also be included in that case, but it is
-     * not required.
-     *
-     * Note: If no certificate path is set for an Enterprise configuration, either by not calling
-     * this API, or by calling it with null, and no certificate is set by
-     * {@link #setCaCertificate(X509Certificate)} or {@link #setCaCertificates(X509Certificate[])},
-     * then the server certificate validation is skipped - which means that the connection is not
-     * secure.
-     *
-     * @param path The path for CA certificate files, or empty string to clear.
-     * @hide
-     */
-    @SystemApi
-    public void setCaPath(@NonNull String path) {
-        setFieldValue(CA_PATH_KEY, path);
-    }
-
-    /**
-     * Get the ca_path directive from wpa_supplicant.
-     * @return The path for CA certificate files, or an empty string if unset.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public String getCaPath() {
-        return getFieldValue(CA_PATH_KEY);
-    }
-
-    /**
-     * Set Client certificate alias.
-     *
-     * <p> See the {@link android.security.KeyChain} for details on installing or choosing
-     * a certificate
-     * </p>
-     * @param alias identifies the certificate, or empty string to clear.
-     * @hide
-     */
-    @SystemApi
-    public void setClientCertificateAlias(@NonNull String alias) {
-        setFieldValue(CLIENT_CERT_KEY, alias, CLIENT_CERT_PREFIX);
-        setFieldValue(PRIVATE_KEY_ID_KEY, alias, USER_PRIVATE_KEY);
-        // Also, set engine parameters
-        if (TextUtils.isEmpty(alias)) {
-            setFieldValue(ENGINE_KEY, ENGINE_DISABLE);
-            setFieldValue(ENGINE_ID_KEY, "");
-        } else {
-            setFieldValue(ENGINE_KEY, ENGINE_ENABLE);
-            setFieldValue(ENGINE_ID_KEY, ENGINE_ID_KEYSTORE);
-        }
-    }
-
-    /**
-     * Get client certificate alias.
-     * @return alias to the client certificate, or an empty string if unset.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public String getClientCertificateAlias() {
-        return getFieldValue(CLIENT_CERT_KEY, CLIENT_CERT_PREFIX);
-    }
-
-    /**
-     * Specify a private key and client certificate for client authorization.
-     *
-     * <p>A default name is automatically assigned to the key entry and used
-     * with this configuration.  The framework takes care of installing the
-     * key entry when the config is saved and removing the key entry when
-     * the config is removed.
-
-     * @param privateKey a PrivateKey instance for the end certificate.
-     * @param clientCertificate an X509Certificate representing the end certificate.
-     * @throws IllegalArgumentException for an invalid key or certificate.
-     */
-    public void setClientKeyEntry(PrivateKey privateKey, X509Certificate clientCertificate) {
-        X509Certificate[] clientCertificates = null;
-        if (clientCertificate != null) {
-            clientCertificates = new X509Certificate[] {clientCertificate};
-        }
-        setClientKeyEntryWithCertificateChain(privateKey, clientCertificates);
-    }
-
-    /**
-     * Specify a private key and client certificate chain for client authorization.
-     *
-     * <p>A default name is automatically assigned to the key entry and used
-     * with this configuration.  The framework takes care of installing the
-     * key entry when the config is saved and removing the key entry when
-     * the config is removed.
-     *
-     * @param privateKey a PrivateKey instance for the end certificate.
-     * @param clientCertificateChain an array of X509Certificate instances which starts with
-     *         end certificate and continues with additional CA certificates necessary to
-     *         link the end certificate with some root certificate known by the authenticator.
-     * @throws IllegalArgumentException for an invalid key or certificate.
-     */
-    public void setClientKeyEntryWithCertificateChain(PrivateKey privateKey,
-            X509Certificate[] clientCertificateChain) {
-        X509Certificate[] newCerts = null;
-        if (clientCertificateChain != null && clientCertificateChain.length > 0) {
-            // We validate that this is a well formed chain that starts
-            // with an end-certificate and is followed by CA certificates.
-            // We don't validate that each following certificate verifies
-            // the previous. https://en.wikipedia.org/wiki/Chain_of_trust
-            //
-            // Basic constraints is an X.509 extension type that defines
-            // whether a given certificate is allowed to sign additional
-            // certificates and what path length restrictions may exist.
-            // We use this to judge whether the certificate is an end
-            // certificate or a CA certificate.
-            // https://cryptography.io/en/latest/x509/reference/
-            if (clientCertificateChain[0].getBasicConstraints() != -1) {
-                throw new IllegalArgumentException(
-                        "First certificate in the chain must be a client end certificate");
-            }
-
-            for (int i = 1; i < clientCertificateChain.length; i++) {
-                if (clientCertificateChain[i].getBasicConstraints() == -1) {
-                    throw new IllegalArgumentException(
-                            "All certificates following the first must be CA certificates");
-                }
-            }
-            newCerts = Arrays.copyOf(clientCertificateChain,
-                    clientCertificateChain.length);
-
-            if (privateKey == null) {
-                throw new IllegalArgumentException("Client cert without a private key");
-            }
-            if (privateKey.getEncoded() == null) {
-                throw new IllegalArgumentException("Private key cannot be encoded");
-            }
-        }
-
-        mClientPrivateKey = privateKey;
-        mClientCertificateChain = newCerts;
-        mIsAppInstalledDeviceKeyAndCert = true;
-    }
-
-    /**
-     * Get client certificate
-     *
-     * @return X.509 client certificate
-     */
-    public X509Certificate getClientCertificate() {
-        if (mClientCertificateChain != null && mClientCertificateChain.length > 0) {
-            return mClientCertificateChain[0];
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * Get the complete client certificate chain in the same order as it was last supplied.
-     *
-     * <p>If the chain was last supplied by a call to
-     * {@link #setClientKeyEntry(java.security.PrivateKey, java.security.cert.X509Certificate)}
-     * with a non-null * certificate instance, a single-element array containing the certificate
-     * will be * returned. If {@link #setClientKeyEntryWithCertificateChain(
-     * java.security.PrivateKey, java.security.cert.X509Certificate[])} was last called with a
-     * non-empty array, this array will be returned in the same order as it was supplied.
-     * Otherwise, {@code null} will be returned.
-     *
-     * @return X.509 client certificates
-     */
-    @Nullable public X509Certificate[] getClientCertificateChain() {
-        if (mClientCertificateChain != null && mClientCertificateChain.length > 0) {
-            return mClientCertificateChain;
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @hide
-     */
-    public void resetClientKeyEntry() {
-        mClientPrivateKey = null;
-        mClientCertificateChain = null;
-    }
-
-    /**
-     * Get the client private key as supplied in {@link #setClientKeyEntryWithCertificateChain}, or
-     * null if unset.
-     */
-    @Nullable
-    public PrivateKey getClientPrivateKey() {
-        return mClientPrivateKey;
-    }
-
-    /**
-     * Set subject match (deprecated). This is the substring to be matched against the subject of
-     * the authentication server certificate.
-     * @param subjectMatch substring to be matched
-     * @deprecated in favor of altSubjectMatch
-     */
-    public void setSubjectMatch(String subjectMatch) {
-        setFieldValue(SUBJECT_MATCH_KEY, subjectMatch);
-    }
-
-    /**
-     * Get subject match (deprecated)
-     * @return the subject match string
-     * @deprecated in favor of altSubjectMatch
-     */
-    public String getSubjectMatch() {
-        return getFieldValue(SUBJECT_MATCH_KEY);
-    }
-
-    /**
-     * Set alternate subject match. This is the substring to be matched against the
-     * alternate subject of the authentication server certificate.
-     *
-     * Note: If no alternate subject is set for an Enterprise configuration, either by not calling
-     * this API, or by calling it with null, or not setting domain suffix match using the
-     * {@link #setDomainSuffixMatch(String)}, then the server certificate validation is incomplete -
-     * which means that the connection is not secure.
-     *
-     * @param altSubjectMatch substring to be matched, for example
-     *                     DNS:server.example.com;EMAIL:server@example.com
-     */
-    public void setAltSubjectMatch(String altSubjectMatch) {
-        setFieldValue(ALTSUBJECT_MATCH_KEY, altSubjectMatch);
-    }
-
-    /**
-     * Get alternate subject match
-     * @return the alternate subject match string
-     */
-    public String getAltSubjectMatch() {
-        return getFieldValue(ALTSUBJECT_MATCH_KEY);
-    }
-
-    /**
-     * Set the domain_suffix_match directive on wpa_supplicant. This is the parameter to use
-     * for Hotspot 2.0 defined matching of AAA server certs per WFA HS2.0 spec, section 7.3.3.2,
-     * second paragraph.
-     *
-     * <p>From wpa_supplicant documentation:
-     * <p>Constraint for server domain name. If set, this FQDN is used as a suffix match requirement
-     * for the AAAserver certificate in SubjectAltName dNSName element(s). If a matching dNSName is
-     * found, this constraint is met.
-     * <p>Suffix match here means that the host/domain name is compared one label at a time starting
-     * from the top-level domain and all the labels in domain_suffix_match shall be included in the
-     * certificate. The certificate may include additional sub-level labels in addition to the
-     * required labels.
-     * <p>More than one match string can be provided by using semicolons to separate the strings
-     * (e.g., example.org;example.com). When multiple strings are specified, a match with any one of
-     * the values is considered a sufficient match for the certificate, i.e., the conditions are
-     * ORed ogether.
-     * <p>For example, domain_suffix_match=example.com would match test.example.com but would not
-     * match test-example.com.
-     *
-     * Note: If no domain suffix is set for an Enterprise configuration, either by not calling this
-     * API, or by calling it with null, or not setting alternate subject match using the
-     * {@link #setAltSubjectMatch(String)}, then the server certificate
-     * validation is incomplete - which means that the connection is not secure.
-     *
-     * @param domain The domain value
-     */
-    public void setDomainSuffixMatch(String domain) {
-        setFieldValue(DOM_SUFFIX_MATCH_KEY, domain);
-    }
-
-    /**
-     * Get the domain_suffix_match value. See setDomSuffixMatch.
-     * @return The domain value.
-     */
-    public String getDomainSuffixMatch() {
-        return getFieldValue(DOM_SUFFIX_MATCH_KEY);
-    }
-
-    /**
-     * Set realm for Passpoint credential; realm identifies a set of networks where your
-     * Passpoint credential can be used
-     * @param realm the realm
-     */
-    public void setRealm(String realm) {
-        setFieldValue(REALM_KEY, realm);
-    }
-
-    /**
-     * Get realm for Passpoint credential; see {@link #setRealm(String)} for more information
-     * @return the realm
-     */
-    public String getRealm() {
-        return getFieldValue(REALM_KEY);
-    }
-
-    /**
-     * Set plmn (Public Land Mobile Network) of the provider of Passpoint credential
-     * @param plmn the plmn value derived from mcc (mobile country code) & mnc (mobile network code)
-     */
-    public void setPlmn(String plmn) {
-        setFieldValue(PLMN_KEY, plmn);
-    }
-
-    /**
-     * Get plmn (Public Land Mobile Network) for Passpoint credential; see {@link #setPlmn
-     * (String)} for more information
-     * @return the plmn
-     */
-    public String getPlmn() {
-        return getFieldValue(PLMN_KEY);
-    }
-
-    /** See {@link WifiConfiguration#getKeyIdForCredentials} @hide */
-    public String getKeyId(WifiEnterpriseConfig current) {
-        // If EAP method is not initialized, use current config details
-        if (mEapMethod == Eap.NONE) {
-            return (current != null) ? current.getKeyId(null) : EMPTY_VALUE;
-        }
-        if (!isEapMethodValid()) {
-            return EMPTY_VALUE;
-        }
-        return Eap.strings[mEapMethod] + "_" + Phase2.strings[mPhase2Method];
-    }
-
-    private String removeDoubleQuotes(String string) {
-        if (TextUtils.isEmpty(string)) return "";
-        int length = string.length();
-        if ((length > 1) && (string.charAt(0) == '"')
-                && (string.charAt(length - 1) == '"')) {
-            return string.substring(1, length - 1);
-        }
-        return string;
-    }
-
-    private String convertToQuotedString(String string) {
-        return "\"" + string + "\"";
-    }
-
-    /**
-     * Returns the index at which the toBeFound string is found in the array.
-     * @param arr array of strings
-     * @param toBeFound string to be found
-     * @param defaultIndex default index to be returned when string is not found
-     * @return the index into array
-     */
-    private int getStringIndex(String arr[], String toBeFound, int defaultIndex) {
-        if (TextUtils.isEmpty(toBeFound)) return defaultIndex;
-        for (int i = 0; i < arr.length; i++) {
-            if (toBeFound.equals(arr[i])) return i;
-        }
-        return defaultIndex;
-    }
-
-    /**
-     * Returns the field value for the key with prefix removed.
-     * @param key into the hash
-     * @param prefix is the prefix that the value may have
-     * @return value
-     * @hide
-     */
-    private String getFieldValue(String key, String prefix) {
-        // TODO: Should raise an exception if |key| is EAP_KEY or PHASE2_KEY since
-        // neither of these keys should be retrieved in this manner.
-        String value = mFields.get(key);
-        // Uninitialized or known to be empty after reading from supplicant
-        if (TextUtils.isEmpty(value) || EMPTY_VALUE.equals(value)) return "";
-
-        value = removeDoubleQuotes(value);
-        if (value.startsWith(prefix)) {
-            return value.substring(prefix.length());
-        } else {
-            return value;
-        }
-    }
-
-    /**
-     * Returns the field value for the key.
-     * @param key into the hash
-     * @return value
-     * @hide
-     */
-    public String getFieldValue(String key) {
-        return getFieldValue(key, "");
-    }
-
-    /**
-     * Set a value with an optional prefix at key
-     * @param key into the hash
-     * @param value to be set
-     * @param prefix an optional value to be prefixed to actual value
-     * @hide
-     */
-    private void setFieldValue(String key, String value, String prefix) {
-        // TODO: Should raise an exception if |key| is EAP_KEY or PHASE2_KEY since
-        // neither of these keys should be set in this manner.
-        if (TextUtils.isEmpty(value)) {
-            mFields.put(key, EMPTY_VALUE);
-        } else {
-            String valueToSet;
-            if (!UNQUOTED_KEYS.contains(key)) {
-                valueToSet = convertToQuotedString(prefix + value);
-            } else {
-                valueToSet = prefix + value;
-            }
-            mFields.put(key, valueToSet);
-        }
-    }
-
-    /**
-     * Set a value at key
-     * @param key into the hash
-     * @param value to be set
-     * @hide
-     */
-    public void setFieldValue(String key, String value) {
-        setFieldValue(key, value, "");
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        for (String key : mFields.keySet()) {
-            // Don't display password in toString().
-            String value = PASSWORD_KEY.equals(key) ? "<removed>" : mFields.get(key);
-            sb.append(key).append(" ").append(value).append("\n");
-        }
-        if (mEapMethod >= 0 && mEapMethod < Eap.strings.length) {
-            sb.append("eap_method: ").append(Eap.strings[mEapMethod]).append("\n");
-        }
-        if (mPhase2Method > 0 && mPhase2Method < Phase2.strings.length) {
-            sb.append("phase2_method: ").append(Phase2.strings[mPhase2Method]).append("\n");
-        }
-        sb.append(" ocsp: ").append(mOcsp).append("\n");
-        return sb.toString();
-    }
-
-    /**
-     * Returns whether the EAP method data is valid, i.e., whether mEapMethod and mPhase2Method
-     * are valid indices into {@code Eap.strings[]} and {@code Phase2.strings[]} respectively.
-     */
-    private boolean isEapMethodValid() {
-        if (mEapMethod == Eap.NONE) {
-            Log.e(TAG, "WiFi enterprise configuration is invalid as it supplies no EAP method.");
-            return false;
-        }
-        if (mEapMethod < 0 || mEapMethod >= Eap.strings.length) {
-            Log.e(TAG, "mEapMethod is invald for WiFi enterprise configuration: " + mEapMethod);
-            return false;
-        }
-        if (mPhase2Method < 0 || mPhase2Method >= Phase2.strings.length) {
-            Log.e(TAG, "mPhase2Method is invald for WiFi enterprise configuration: "
-                    + mPhase2Method);
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Check if certificate was installed by an app, or manually (not by an app). If true,
-     * certificate and keys will be removed from key storage when this network is removed. If not,
-     * then certificates and keys remain persistent until the user manually removes them.
-     *
-     * @return true if certificate was installed by an app, false if certificate was installed
-     * manually by the user.
-     * @hide
-     */
-    public boolean isAppInstalledDeviceKeyAndCert() {
-        return mIsAppInstalledDeviceKeyAndCert;
-    }
-
-    /**
-     * Check if CA certificate was installed by an app, or manually (not by an app). If true,
-     * CA certificate will be removed from key storage when this network is removed. If not,
-     * then certificates and keys remain persistent until the user manually removes them.
-     *
-     * @return true if CA certificate was installed by an app, false if CA certificate was installed
-     * manually by the user.
-     * @hide
-     */
-    public boolean isAppInstalledCaCert() {
-        return mIsAppInstalledCaCert;
-    }
-
-    /**
-     * Set the OCSP type.
-     * @param ocsp is one of {@link ##OCSP_NONE}, {@link #OCSP_REQUEST_CERT_STATUS},
-     *                   {@link #OCSP_REQUIRE_CERT_STATUS} or
-     *                   {@link #OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS}
-     * @throws IllegalArgumentException if the OCSP type is invalid
-     * @hide
-     */
-    @SystemApi
-    public void setOcsp(@Ocsp int ocsp) {
-        if (ocsp >= OCSP_NONE && ocsp <= OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS) {
-            mOcsp = ocsp;
-        } else {
-            throw new IllegalArgumentException("Invalid OCSP type.");
-        }
-    }
-
-    /**
-     * Get the OCSP type.
-     * @hide
-     */
-    @SystemApi
-    public @Ocsp int getOcsp() {
-        return mOcsp;
-    }
-
-    /**
-     * Utility method to determine whether the configuration's authentication method is SIM-based.
-     *
-     * @return true if the credential information requires SIM card for current authentication
-     * method, otherwise it returns false.
-     */
-    public boolean isAuthenticationSimBased() {
-        if (mEapMethod == Eap.SIM || mEapMethod == Eap.AKA || mEapMethod == Eap.AKA_PRIME) {
-            return true;
-        }
-        if (mEapMethod == Eap.PEAP) {
-            return mPhase2Method == Phase2.SIM || mPhase2Method == Phase2.AKA
-                    || mPhase2Method == Phase2.AKA_PRIME;
-        }
-        return false;
-    }
-
-    /**
-     * Set the WAPI certificate suite name on wpa_supplicant.
-     *
-     * If this field is not specified, WAPI-CERT uses ASU ID from WAI packet
-     * as the certificate suite name automatically.
-     *
-     * @param wapiCertSuite The name for WAPI certificate suite, or empty string to clear.
-     * @hide
-     */
-    @SystemApi
-    public void setWapiCertSuite(@NonNull String wapiCertSuite) {
-        setFieldValue(WAPI_CERT_SUITE_KEY, wapiCertSuite);
-    }
-
-    /**
-     * Get the WAPI certificate suite name
-     * @return the certificate suite name
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    public String getWapiCertSuite() {
-        return getFieldValue(WAPI_CERT_SUITE_KEY);
-    }
-
-    /**
-     * Method determines whether the Enterprise configuration is insecure. An insecure
-     * configuration is one where EAP method requires a CA certification, i.e. PEAP, TLS, or
-     * TTLS, and any of the following conditions are met:
-     * - Both certificate and CA path are not configured.
-     * - Both alternative subject match and domain suffix match are not set.
-     *
-     * Note: this method does not exhaustively check security of the configuration - i.e. a return
-     * value of {@code false} is not a guarantee that the configuration is secure.
-     * @hide
-     */
-    public boolean isInsecure() {
-        if (mEapMethod != Eap.PEAP && mEapMethod != Eap.TLS && mEapMethod != Eap.TTLS) {
-            return false;
-        }
-        if (TextUtils.isEmpty(getAltSubjectMatch())
-                && TextUtils.isEmpty(getDomainSuffixMatch())) {
-            // Both subject and domain match are not set, it's insecure.
-            return true;
-        }
-        if (mIsAppInstalledCaCert) {
-            // CA certificate is installed by App, it's secure.
-            return false;
-        }
-        if (getCaCertificateAliases() != null) {
-            // CA certificate alias from keyStore is set, it's secure.
-            return false;
-        }
-        return TextUtils.isEmpty(getCaPath());
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiFrameworkInitializer.java b/wifi/java/android/net/wifi/WifiFrameworkInitializer.java
deleted file mode 100644
index 1507199..0000000
--- a/wifi/java/android/net/wifi/WifiFrameworkInitializer.java
+++ /dev/null
@@ -1,121 +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;
-
-import android.annotation.SystemApi;
-import android.app.SystemServiceRegistry;
-import android.content.Context;
-import android.net.wifi.aware.IWifiAwareManager;
-import android.net.wifi.aware.WifiAwareManager;
-import android.net.wifi.p2p.IWifiP2pManager;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.net.wifi.rtt.IWifiRttManager;
-import android.net.wifi.rtt.WifiRttManager;
-import android.os.HandlerThread;
-import android.os.Looper;
-
-/**
- * Class for performing registration for all Wifi services.
- *
- * @hide
- */
-@SystemApi
-public class WifiFrameworkInitializer {
-
-    /**
-     * A class implementing the lazy holder idiom: the unique static instance
-     * of {@link #INSTANCE} is instantiated in a thread-safe way (guaranteed by
-     * the language specs) the first time that NoPreloadHolder is referenced in getInstanceLooper().
-     *
-     * This is necessary because we can't spawn a new thread in {@link #registerServiceWrappers()}.
-     * {@link #registerServiceWrappers()} is called during the Zygote phase, which disallows
-     * spawning new threads. Naming the class "NoPreloadHolder" ensures that the classloader will
-     * not preload this class, inadvertently spawning the thread too early.
-     */
-    private static class NoPreloadHolder {
-        private static final HandlerThread INSTANCE = createInstance();
-
-        private static HandlerThread createInstance() {
-            HandlerThread thread = new HandlerThread("WifiManagerThread");
-            thread.start();
-            return thread;
-        }
-    }
-
-    private static Looper getInstanceLooper() {
-        return NoPreloadHolder.INSTANCE.getLooper();
-    }
-
-    private WifiFrameworkInitializer() {}
-
-    /**
-     * Called by {@link SystemServiceRegistry}'s static initializer and registers all Wifi 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.WIFI_SERVICE,
-                WifiManager.class,
-                (context, serviceBinder) -> {
-                    IWifiManager service = IWifiManager.Stub.asInterface(serviceBinder);
-                    return new WifiManager(context, service, getInstanceLooper());
-                }
-        );
-        SystemServiceRegistry.registerStaticService(
-                Context.WIFI_P2P_SERVICE,
-                WifiP2pManager.class,
-                serviceBinder -> {
-                    IWifiP2pManager service = IWifiP2pManager.Stub.asInterface(serviceBinder);
-                    return new WifiP2pManager(service);
-                }
-        );
-        SystemServiceRegistry.registerContextAwareService(
-                Context.WIFI_AWARE_SERVICE,
-                WifiAwareManager.class,
-                (context, serviceBinder) -> {
-                    IWifiAwareManager service = IWifiAwareManager.Stub.asInterface(serviceBinder);
-                    return new WifiAwareManager(context, service);
-                }
-        );
-        SystemServiceRegistry.registerContextAwareService(
-                Context.WIFI_SCANNING_SERVICE,
-                WifiScanner.class,
-                (context, serviceBinder) -> {
-                    IWifiScanner service = IWifiScanner.Stub.asInterface(serviceBinder);
-                    return new WifiScanner(context, service, getInstanceLooper());
-                }
-        );
-        SystemServiceRegistry.registerContextAwareService(
-                Context.WIFI_RTT_RANGING_SERVICE,
-                WifiRttManager.class,
-                (context, serviceBinder) -> {
-                    IWifiRttManager service = IWifiRttManager.Stub.asInterface(serviceBinder);
-                    return new WifiRttManager(context, service);
-                }
-        );
-        SystemServiceRegistry.registerContextAwareService(
-                Context.WIFI_RTT_SERVICE,
-                RttManager.class,
-                context -> {
-                    WifiRttManager wifiRttManager = context.getSystemService(WifiRttManager.class);
-                    return new RttManager(context, wifiRttManager);
-                }
-        );
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
deleted file mode 100644
index 5388367..0000000
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ /dev/null
@@ -1,1051 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.net.NetworkInfo.DetailedState;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import com.android.net.module.util.Inet4AddressUtils;
-
-import java.net.Inet4Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.EnumMap;
-import java.util.Locale;
-
-/**
- * Describes the state of any Wi-Fi connection that is active or
- * is in the process of being set up.
- */
-public class WifiInfo implements Parcelable {
-    private static final String TAG = "WifiInfo";
-    /**
-     * This is the map described in the Javadoc comment above. The positions
-     * of the elements of the array must correspond to the ordinal values
-     * of <code>DetailedState</code>.
-     */
-    private static final EnumMap<SupplicantState, DetailedState> stateMap =
-            new EnumMap<SupplicantState, DetailedState>(SupplicantState.class);
-
-    /**
-     * Default MAC address reported to a client that does not have the
-     * android.permission.LOCAL_MAC_ADDRESS permission.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String DEFAULT_MAC_ADDRESS = "02:00:00:00:00:00";
-
-    static {
-        stateMap.put(SupplicantState.DISCONNECTED, DetailedState.DISCONNECTED);
-        stateMap.put(SupplicantState.INTERFACE_DISABLED, DetailedState.DISCONNECTED);
-        stateMap.put(SupplicantState.INACTIVE, DetailedState.IDLE);
-        stateMap.put(SupplicantState.SCANNING, DetailedState.SCANNING);
-        stateMap.put(SupplicantState.AUTHENTICATING, DetailedState.CONNECTING);
-        stateMap.put(SupplicantState.ASSOCIATING, DetailedState.CONNECTING);
-        stateMap.put(SupplicantState.ASSOCIATED, DetailedState.CONNECTING);
-        stateMap.put(SupplicantState.FOUR_WAY_HANDSHAKE, DetailedState.AUTHENTICATING);
-        stateMap.put(SupplicantState.GROUP_HANDSHAKE, DetailedState.AUTHENTICATING);
-        stateMap.put(SupplicantState.COMPLETED, DetailedState.OBTAINING_IPADDR);
-        stateMap.put(SupplicantState.DORMANT, DetailedState.DISCONNECTED);
-        stateMap.put(SupplicantState.UNINITIALIZED, DetailedState.IDLE);
-        stateMap.put(SupplicantState.INVALID, DetailedState.FAILED);
-    }
-
-    private SupplicantState mSupplicantState;
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    private String mBSSID;
-    @UnsupportedAppUsage
-    private WifiSsid mWifiSsid;
-    private int mNetworkId;
-
-    /**
-     * Used to indicate that the RSSI is invalid, for example if no RSSI measurements are available
-     * yet.
-     * @hide
-     */
-    @SystemApi
-    public static final int INVALID_RSSI = -127;
-
-    /** @hide **/
-    public static final int MIN_RSSI = -126;
-
-    /** @hide **/
-    public static final int MAX_RSSI = 200;
-
-
-    /**
-     * Received Signal Strength Indicator
-     */
-    private int mRssi;
-
-    /**
-     * Wi-Fi standard for the connection
-     */
-    private @WifiAnnotations.WifiStandard int mWifiStandard;
-
-    /**
-     * The unit in which links speeds are expressed.
-     */
-    public static final String LINK_SPEED_UNITS = "Mbps";
-    private int mLinkSpeed;
-
-    /**
-     * Constant for unknown link speed.
-     */
-    public static final int LINK_SPEED_UNKNOWN = -1;
-
-    /**
-     * Tx(transmit) Link speed in Mbps
-     */
-    private int mTxLinkSpeed;
-
-    /**
-     * Max supported Tx(transmit) link speed in Mbps
-     */
-    private int mMaxSupportedTxLinkSpeed;
-
-    /**
-     * Rx(receive) Link speed in Mbps
-     */
-    private int mRxLinkSpeed;
-
-    /**
-     * Max supported Rx(receive) link speed in Mbps
-     */
-    private int mMaxSupportedRxLinkSpeed;
-
-    /**
-     * Frequency in MHz
-     */
-    public static final String FREQUENCY_UNITS = "MHz";
-    private int mFrequency;
-
-    @UnsupportedAppUsage
-    private InetAddress mIpAddress;
-    @UnsupportedAppUsage
-    private String mMacAddress = DEFAULT_MAC_ADDRESS;
-
-    /**
-     * Whether the network is ephemeral or not.
-     */
-    private boolean mEphemeral;
-
-    /**
-     * Whether the network is trusted or not.
-     */
-    private boolean mTrusted;
-
-    /**
-     * OSU (Online Sign Up) AP for Passpoint R2.
-     */
-    private boolean mOsuAp;
-
-    /**
-     * Fully qualified domain name of a Passpoint configuration
-     */
-    private String mFqdn;
-
-    /**
-     * Name of Passpoint credential provider
-     */
-    private String mProviderFriendlyName;
-
-    /**
-     * If connected to a network suggestion or specifier, store the package name of the app,
-     * else null.
-     */
-    private String mRequestingPackageName;
-
-    /**
-     * Running total count of lost (not ACKed) transmitted unicast data packets.
-     * @hide
-     */
-    public long txBad;
-    /**
-     * Running total count of transmitted unicast data retry packets.
-     * @hide
-     */
-    public long txRetries;
-    /**
-     * Running total count of successfully transmitted (ACKed) unicast data packets.
-     * @hide
-     */
-    public long txSuccess;
-    /**
-     * Running total count of received unicast data packets.
-     * @hide
-     */
-    public long rxSuccess;
-
-    private double mLostTxPacketsPerSecond;
-
-    /**
-     * Average rate of lost transmitted packets, in units of packets per second.
-     * @hide
-     */
-    @SystemApi
-    public double getLostTxPacketsPerSecond() {
-        return mLostTxPacketsPerSecond;
-    }
-
-    /** @hide */
-    public void setLostTxPacketsPerSecond(double lostTxPacketsPerSecond) {
-        mLostTxPacketsPerSecond = lostTxPacketsPerSecond;
-    }
-
-    private double mTxRetriedTxPacketsPerSecond;
-
-    /**
-     * Average rate of transmitted retry packets, in units of packets per second.
-     * @hide
-     */
-    @SystemApi
-    public double getRetriedTxPacketsPerSecond() {
-        return mTxRetriedTxPacketsPerSecond;
-    }
-
-    /** @hide */
-    public void setRetriedTxPacketsRate(double txRetriedTxPacketsPerSecond) {
-        mTxRetriedTxPacketsPerSecond = txRetriedTxPacketsPerSecond;
-    }
-
-    private double mSuccessfulTxPacketsPerSecond;
-
-    /**
-     * Average rate of successfully transmitted unicast packets, in units of packets per second.
-     * @hide
-     */
-    @SystemApi
-    public double getSuccessfulTxPacketsPerSecond() {
-        return mSuccessfulTxPacketsPerSecond;
-    }
-
-    /** @hide */
-    public void setSuccessfulTxPacketsPerSecond(double successfulTxPacketsPerSecond) {
-        mSuccessfulTxPacketsPerSecond = successfulTxPacketsPerSecond;
-    }
-
-    private double mSuccessfulRxPacketsPerSecond;
-
-    /**
-     * Average rate of received unicast data packets, in units of packets per second.
-     * @hide
-     */
-    @SystemApi
-    public double getSuccessfulRxPacketsPerSecond() {
-        return mSuccessfulRxPacketsPerSecond;
-    }
-
-    /** @hide */
-    public void setSuccessfulRxPacketsPerSecond(double successfulRxPacketsPerSecond) {
-        mSuccessfulRxPacketsPerSecond = successfulRxPacketsPerSecond;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public int score;
-
-    /**
-     * The current Wifi score.
-     * NOTE: this value should only be used for debugging purposes. Do not rely on this value for
-     * any computations. The meaning of this value can and will change at any time without warning.
-     * @hide
-     */
-    @SystemApi
-    public int getScore() {
-        return score;
-    }
-
-    /** @hide */
-    public void setScore(int score) {
-        this.score = score;
-    }
-
-    /**
-     * Flag indicating that AP has hinted that upstream connection is metered,
-     * and sensitive to heavy data transfers.
-     */
-    private boolean mMeteredHint;
-
-    /**
-     * Passpoint unique key
-     */
-    private String mPasspointUniqueId;
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public WifiInfo() {
-        mWifiSsid = null;
-        mBSSID = null;
-        mNetworkId = -1;
-        mSupplicantState = SupplicantState.UNINITIALIZED;
-        mRssi = INVALID_RSSI;
-        mLinkSpeed = LINK_SPEED_UNKNOWN;
-        mFrequency = -1;
-    }
-
-    /** @hide */
-    public void reset() {
-        setInetAddress(null);
-        setBSSID(null);
-        setSSID(null);
-        setNetworkId(-1);
-        setRssi(INVALID_RSSI);
-        setLinkSpeed(LINK_SPEED_UNKNOWN);
-        setTxLinkSpeedMbps(LINK_SPEED_UNKNOWN);
-        setRxLinkSpeedMbps(LINK_SPEED_UNKNOWN);
-        setMaxSupportedTxLinkSpeedMbps(LINK_SPEED_UNKNOWN);
-        setMaxSupportedRxLinkSpeedMbps(LINK_SPEED_UNKNOWN);
-        setFrequency(-1);
-        setMeteredHint(false);
-        setEphemeral(false);
-        setOsuAp(false);
-        setRequestingPackageName(null);
-        setFQDN(null);
-        setProviderFriendlyName(null);
-        setPasspointUniqueId(null);
-        txBad = 0;
-        txSuccess = 0;
-        rxSuccess = 0;
-        txRetries = 0;
-        mLostTxPacketsPerSecond = 0;
-        mSuccessfulTxPacketsPerSecond = 0;
-        mSuccessfulRxPacketsPerSecond = 0;
-        mTxRetriedTxPacketsPerSecond = 0;
-        score = 0;
-    }
-
-    /**
-     * Copy constructor
-     * @hide
-     */
-    public WifiInfo(WifiInfo source) {
-        if (source != null) {
-            mSupplicantState = source.mSupplicantState;
-            mBSSID = source.mBSSID;
-            mWifiSsid = source.mWifiSsid;
-            mNetworkId = source.mNetworkId;
-            mRssi = source.mRssi;
-            mLinkSpeed = source.mLinkSpeed;
-            mTxLinkSpeed = source.mTxLinkSpeed;
-            mRxLinkSpeed = source.mRxLinkSpeed;
-            mFrequency = source.mFrequency;
-            mIpAddress = source.mIpAddress;
-            mMacAddress = source.mMacAddress;
-            mMeteredHint = source.mMeteredHint;
-            mEphemeral = source.mEphemeral;
-            mTrusted = source.mTrusted;
-            mRequestingPackageName =
-                    source.mRequestingPackageName;
-            mOsuAp = source.mOsuAp;
-            mFqdn = source.mFqdn;
-            mProviderFriendlyName = source.mProviderFriendlyName;
-            txBad = source.txBad;
-            txRetries = source.txRetries;
-            txSuccess = source.txSuccess;
-            rxSuccess = source.rxSuccess;
-            mLostTxPacketsPerSecond = source.mLostTxPacketsPerSecond;
-            mTxRetriedTxPacketsPerSecond = source.mTxRetriedTxPacketsPerSecond;
-            mSuccessfulTxPacketsPerSecond = source.mSuccessfulTxPacketsPerSecond;
-            mSuccessfulRxPacketsPerSecond = source.mSuccessfulRxPacketsPerSecond;
-            score = source.score;
-            mWifiStandard = source.mWifiStandard;
-            mMaxSupportedTxLinkSpeed = source.mMaxSupportedTxLinkSpeed;
-            mMaxSupportedRxLinkSpeed = source.mMaxSupportedRxLinkSpeed;
-            mPasspointUniqueId = source.mPasspointUniqueId;
-        }
-    }
-
-    /** Builder for WifiInfo */
-    public static final class Builder {
-        private final WifiInfo mWifiInfo = new WifiInfo();
-
-        /**
-         * Set the SSID, in the form of a raw byte array.
-         * @see WifiInfo#getSSID()
-         */
-        @NonNull
-        public Builder setSsid(@NonNull byte[] ssid) {
-            mWifiInfo.setSSID(WifiSsid.createFromByteArray(ssid));
-            return this;
-        }
-
-        /**
-         * Set the BSSID.
-         * @see WifiInfo#getBSSID()
-         */
-        @NonNull
-        public Builder setBssid(@NonNull String bssid) {
-            mWifiInfo.setBSSID(bssid);
-            return this;
-        }
-
-        /**
-         * Set the RSSI, in dBm.
-         * @see WifiInfo#getRssi()
-         */
-        @NonNull
-        public Builder setRssi(int rssi) {
-            mWifiInfo.setRssi(rssi);
-            return this;
-        }
-
-        /**
-         * Set the network ID.
-         * @see WifiInfo#getNetworkId()
-         */
-        @NonNull
-        public Builder setNetworkId(int networkId) {
-            mWifiInfo.setNetworkId(networkId);
-            return this;
-        }
-
-        /**
-         * Build a WifiInfo object.
-         */
-        @NonNull
-        public WifiInfo build() {
-            return new WifiInfo(mWifiInfo);
-        }
-    }
-
-    /** @hide */
-    public void setSSID(WifiSsid wifiSsid) {
-        mWifiSsid = wifiSsid;
-    }
-
-    /**
-     * Returns the service set identifier (SSID) of the current 802.11 network.
-     * <p>
-     * If the SSID can be decoded as UTF-8, it will be returned surrounded by double
-     * quotation marks. Otherwise, it is returned as a string of hex digits.
-     * The SSID may be {@link WifiManager#UNKNOWN_SSID}, if there is no network currently connected
-     * or if the caller has insufficient permissions to access the SSID.
-     * </p>
-     * <p>
-     * Prior to {@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}, this method
-     * always returned the SSID with no quotes around it.
-     * </p>
-     *
-     * @return the SSID.
-     */
-    public String getSSID() {
-        if (mWifiSsid != null) {
-            String unicode = mWifiSsid.toString();
-            if (!TextUtils.isEmpty(unicode)) {
-                return "\"" + unicode + "\"";
-            } else {
-                String hex = mWifiSsid.getHexString();
-                return (hex != null) ? hex : WifiManager.UNKNOWN_SSID;
-            }
-        }
-        return WifiManager.UNKNOWN_SSID;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public WifiSsid getWifiSsid() {
-        return mWifiSsid;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setBSSID(String BSSID) {
-        mBSSID = BSSID;
-    }
-
-    /**
-     * Return the basic service set identifier (BSSID) of the current access point.
-     * <p>
-     * The BSSID may be
-     * <lt>{@code null}, if there is no network currently connected.</lt>
-     * <lt>{@code "02:00:00:00:00:00"}, if the caller has insufficient permissions to access the
-     * BSSID.<lt>
-     * </p>
-     *
-     * @return the BSSID, in the form of a six-byte MAC address: {@code XX:XX:XX:XX:XX:XX}
-     */
-    public String getBSSID() {
-        return mBSSID;
-    }
-
-    /**
-     * Returns the received signal strength indicator of the current 802.11
-     * network, in dBm.
-     *
-     * <p>Use {@link android.net.wifi.WifiManager#calculateSignalLevel} to convert this number into
-     * an absolute signal level which can be displayed to a user.
-     *
-     * @return the RSSI.
-     */
-    public int getRssi() {
-        return mRssi;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setRssi(int rssi) {
-        if (rssi < INVALID_RSSI)
-            rssi = INVALID_RSSI;
-        if (rssi > MAX_RSSI)
-            rssi = MAX_RSSI;
-        mRssi = rssi;
-    }
-
-    /**
-     * Sets the Wi-Fi standard
-     * @hide
-     */
-    public void setWifiStandard(@WifiAnnotations.WifiStandard int wifiStandard) {
-        mWifiStandard = wifiStandard;
-    }
-
-    /**
-     * Get connection Wi-Fi standard
-     * @return the connection Wi-Fi standard
-     */
-    public @WifiAnnotations.WifiStandard int getWifiStandard() {
-        return mWifiStandard;
-    }
-
-    /**
-     * Returns the current link speed in {@link #LINK_SPEED_UNITS}.
-     * @return the link speed or {@link #LINK_SPEED_UNKNOWN} if link speed is unknown.
-     * @see #LINK_SPEED_UNITS
-     * @see #LINK_SPEED_UNKNOWN
-     */
-    public int getLinkSpeed() {
-        return mLinkSpeed;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setLinkSpeed(int linkSpeed) {
-        mLinkSpeed = linkSpeed;
-    }
-
-    /**
-     * Returns the current transmit link speed in Mbps.
-     * @return the Tx link speed or {@link #LINK_SPEED_UNKNOWN} if link speed is unknown.
-     * @see #LINK_SPEED_UNKNOWN
-     */
-    @IntRange(from = -1)
-    public int getTxLinkSpeedMbps() {
-        return mTxLinkSpeed;
-    }
-
-    /**
-     * Returns the maximum supported transmit link speed in Mbps
-     * @return the max supported tx link speed or {@link #LINK_SPEED_UNKNOWN} if link speed is
-     * unknown. @see #LINK_SPEED_UNKNOWN
-     */
-    public int getMaxSupportedTxLinkSpeedMbps() {
-        return mMaxSupportedTxLinkSpeed;
-    }
-
-    /**
-     * Update the last transmitted packet bit rate in Mbps.
-     * @hide
-     */
-    public void setTxLinkSpeedMbps(int txLinkSpeed) {
-        mTxLinkSpeed = txLinkSpeed;
-    }
-
-    /**
-     * Set the maximum supported transmit link speed in Mbps
-     * @hide
-     */
-    public void setMaxSupportedTxLinkSpeedMbps(int maxSupportedTxLinkSpeed) {
-        mMaxSupportedTxLinkSpeed = maxSupportedTxLinkSpeed;
-    }
-
-    /**
-     * Returns the current receive link speed in Mbps.
-     * @return the Rx link speed or {@link #LINK_SPEED_UNKNOWN} if link speed is unknown.
-     * @see #LINK_SPEED_UNKNOWN
-     */
-    @IntRange(from = -1)
-    public int getRxLinkSpeedMbps() {
-        return mRxLinkSpeed;
-    }
-
-    /**
-     * Returns the maximum supported receive link speed in Mbps
-     * @return the max supported Rx link speed or {@link #LINK_SPEED_UNKNOWN} if link speed is
-     * unknown. @see #LINK_SPEED_UNKNOWN
-     */
-    public int getMaxSupportedRxLinkSpeedMbps() {
-        return mMaxSupportedRxLinkSpeed;
-    }
-
-    /**
-     * Update the last received packet bit rate in Mbps.
-     * @hide
-     */
-    public void setRxLinkSpeedMbps(int rxLinkSpeed) {
-        mRxLinkSpeed = rxLinkSpeed;
-    }
-
-    /**
-     * Set the maximum supported receive link speed in Mbps
-     * @hide
-     */
-    public void setMaxSupportedRxLinkSpeedMbps(int maxSupportedRxLinkSpeed) {
-        mMaxSupportedRxLinkSpeed = maxSupportedRxLinkSpeed;
-    }
-
-    /**
-     * Returns the current frequency in {@link #FREQUENCY_UNITS}.
-     * @return the frequency.
-     * @see #FREQUENCY_UNITS
-     */
-    public int getFrequency() {
-        return mFrequency;
-    }
-
-    /** @hide */
-    public void setFrequency(int frequency) {
-        this.mFrequency = frequency;
-    }
-
-    /**
-     * @hide
-     */
-    public boolean is24GHz() {
-        return ScanResult.is24GHz(mFrequency);
-    }
-
-    /**
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public boolean is5GHz() {
-        return ScanResult.is5GHz(mFrequency);
-    }
-
-    /**
-     * @hide
-     */
-    public boolean is6GHz() {
-        return ScanResult.is6GHz(mFrequency);
-    }
-
-    /**
-     * Record the MAC address of the WLAN interface
-     * @param macAddress the MAC address in {@code XX:XX:XX:XX:XX:XX} form
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public void setMacAddress(String macAddress) {
-        this.mMacAddress = macAddress;
-    }
-
-    public String getMacAddress() {
-        return mMacAddress;
-    }
-
-    /**
-     * @return true if {@link #getMacAddress()} has a real MAC address.
-     *
-     * @hide
-     */
-    public boolean hasRealMacAddress() {
-        return mMacAddress != null && !DEFAULT_MAC_ADDRESS.equals(mMacAddress);
-    }
-
-    /**
-     * Indicates if we've dynamically detected this active network connection as
-     * being metered.
-     *
-     * @see WifiConfiguration#isMetered(WifiConfiguration, WifiInfo)
-     * @hide
-     */
-    public void setMeteredHint(boolean meteredHint) {
-        mMeteredHint = meteredHint;
-    }
-
-    /** {@hide} */
-    @UnsupportedAppUsage
-    public boolean getMeteredHint() {
-        return mMeteredHint;
-    }
-
-    /** {@hide} */
-    public void setEphemeral(boolean ephemeral) {
-        mEphemeral = ephemeral;
-    }
-
-    /**
-     * Returns true if the current Wifi network is ephemeral, false otherwise.
-     * An ephemeral network is a network that is temporary and not persisted in the system.
-     * Ephemeral networks cannot be forgotten, only disabled with
-     * {@link WifiManager#disableEphemeralNetwork(String)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean isEphemeral() {
-        return mEphemeral;
-    }
-
-    /** {@hide} */
-    public void setTrusted(boolean trusted) {
-        mTrusted = trusted;
-    }
-
-    /** {@hide} */
-    public boolean isTrusted() {
-        return mTrusted;
-    }
-
-    /** {@hide} */
-    public void setOsuAp(boolean osuAp) {
-        mOsuAp = osuAp;
-    }
-
-    /** {@hide} */
-    @SystemApi
-    public boolean isOsuAp() {
-        return mOsuAp;
-    }
-
-    /** {@hide} */
-    @SystemApi
-    public boolean isPasspointAp() {
-        return mFqdn != null && mProviderFriendlyName != null;
-    }
-
-    /** {@hide} */
-    public void setFQDN(@Nullable String fqdn) {
-        mFqdn = fqdn;
-    }
-
-    /**
-     * Returns the Fully Qualified Domain Name of the network if it is a Passpoint network.
-     * <p>
-     * The FQDN may be
-     * <lt>{@code null} if no network currently connected, currently connected network is not
-     * passpoint network or the caller has insufficient permissions to access the FQDN.</lt>
-     * </p>
-     */
-    public @Nullable String getPasspointFqdn() {
-        return mFqdn;
-    }
-
-    /** {@hide} */
-    public void setProviderFriendlyName(@Nullable String providerFriendlyName) {
-        mProviderFriendlyName = providerFriendlyName;
-    }
-
-    /**
-     * Returns the Provider Friendly Name of the network if it is a Passpoint network.
-     * <p>
-     * The Provider Friendly Name may be
-     * <lt>{@code null} if no network currently connected, currently connected network is not
-     * passpoint network or the caller has insufficient permissions to access the Provider Friendly
-     * Name. </lt>
-     * </p>
-     */
-    public @Nullable String getPasspointProviderFriendlyName() {
-        return mProviderFriendlyName;
-    }
-
-    /** {@hide} */
-    public void setRequestingPackageName(@Nullable String packageName) {
-        mRequestingPackageName = packageName;
-    }
-
-    /**
-     * If this network was created in response to an app request (e.g. through Network Suggestion
-     * or Network Specifier), return the package name of the app that made the request.
-     * Null otherwise.
-     * @hide
-     */
-    @SystemApi
-    public @Nullable String getRequestingPackageName() {
-        return mRequestingPackageName;
-    }
-
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setNetworkId(int id) {
-        mNetworkId = id;
-    }
-
-    /**
-     * Each configured network has a unique small integer ID, used to identify
-     * the network. This method returns the ID for the currently connected network.
-     * <p>
-     * The networkId may be {@code -1} if there is no currently connected network or if the caller
-     * has insufficient permissions to access the network ID.
-     * </p>
-     *
-     * @return the network ID.
-     */
-    public int getNetworkId() {
-        return mNetworkId;
-    }
-
-    /**
-     * Return the detailed state of the supplicant's negotiation with an
-     * access point, in the form of a {@link SupplicantState SupplicantState} object.
-     * @return the current {@link SupplicantState SupplicantState}
-     */
-    public SupplicantState getSupplicantState() {
-        return mSupplicantState;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setSupplicantState(SupplicantState state) {
-        mSupplicantState = state;
-    }
-
-    /** @hide */
-    public void setInetAddress(InetAddress address) {
-        mIpAddress = address;
-    }
-
-    public int getIpAddress() {
-        int result = 0;
-        if (mIpAddress instanceof Inet4Address) {
-            result = Inet4AddressUtils.inet4AddressToIntHTL((Inet4Address) mIpAddress);
-        }
-        return result;
-    }
-
-    /**
-     * @return {@code true} if this network does not broadcast its SSID, so an
-     * SSID-specific probe request must be used for scans.
-     */
-    public boolean getHiddenSSID() {
-        if (mWifiSsid == null) return false;
-        return mWifiSsid.isHidden();
-    }
-
-    /**
-     * Map a supplicant state into a fine-grained network connectivity state.
-     * @param suppState the supplicant state
-     * @return the corresponding {@link DetailedState}
-     */
-    public static DetailedState getDetailedStateOf(SupplicantState suppState) {
-        return stateMap.get(suppState);
-    }
-
-    /**
-     * Set the <code>SupplicantState</code> from the string name
-     * of the state.
-     * @param stateName the name of the state, as a <code>String</code> returned
-     * in an event sent by {@code wpa_supplicant}.
-     */
-    @UnsupportedAppUsage
-    void setSupplicantState(String stateName) {
-        mSupplicantState = valueOf(stateName);
-    }
-
-    static SupplicantState valueOf(String stateName) {
-        if ("4WAY_HANDSHAKE".equalsIgnoreCase(stateName))
-            return SupplicantState.FOUR_WAY_HANDSHAKE;
-        else {
-            try {
-                return SupplicantState.valueOf(stateName.toUpperCase(Locale.ROOT));
-            } catch (IllegalArgumentException e) {
-                return SupplicantState.INVALID;
-            }
-        }
-    }
-
-    /**
-     * Remove double quotes (") surrounding a SSID string, if present. Otherwise, return the
-     * string unmodified. Return null if the input string was null.
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    public static String sanitizeSsid(@Nullable String string) {
-        return removeDoubleQuotes(string);
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    @Nullable
-    public static String removeDoubleQuotes(@Nullable String string) {
-        if (string == null) return null;
-        final int length = string.length();
-        if ((length > 1) && (string.charAt(0) == '"') && (string.charAt(length - 1) == '"')) {
-            return string.substring(1, length - 1);
-        }
-        return string;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sb = new StringBuffer();
-        String none = "<none>";
-
-        sb.append("SSID: ").append(mWifiSsid == null ? WifiManager.UNKNOWN_SSID : mWifiSsid)
-                .append(", BSSID: ").append(mBSSID == null ? none : mBSSID)
-                .append(", MAC: ").append(mMacAddress == null ? none : mMacAddress)
-                .append(", Supplicant state: ")
-                .append(mSupplicantState == null ? none : mSupplicantState)
-                .append(", Wi-Fi standard: ").append(mWifiStandard)
-                .append(", RSSI: ").append(mRssi)
-                .append(", Link speed: ").append(mLinkSpeed).append(LINK_SPEED_UNITS)
-                .append(", Tx Link speed: ").append(mTxLinkSpeed).append(LINK_SPEED_UNITS)
-                .append(", Max Supported Tx Link speed: ")
-                .append(mMaxSupportedTxLinkSpeed).append(LINK_SPEED_UNITS)
-                .append(", Rx Link speed: ").append(mRxLinkSpeed).append(LINK_SPEED_UNITS)
-                .append(", Max Supported Rx Link speed: ")
-                .append(mMaxSupportedRxLinkSpeed).append(LINK_SPEED_UNITS)
-                .append(", Frequency: ").append(mFrequency).append(FREQUENCY_UNITS)
-                .append(", Net ID: ").append(mNetworkId)
-                .append(", Metered hint: ").append(mMeteredHint)
-                .append(", score: ").append(Integer.toString(score));
-        return sb.toString();
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mNetworkId);
-        dest.writeInt(mRssi);
-        dest.writeInt(mLinkSpeed);
-        dest.writeInt(mTxLinkSpeed);
-        dest.writeInt(mRxLinkSpeed);
-        dest.writeInt(mFrequency);
-        if (mIpAddress != null) {
-            dest.writeByte((byte)1);
-            dest.writeByteArray(mIpAddress.getAddress());
-        } else {
-            dest.writeByte((byte)0);
-        }
-        if (mWifiSsid != null) {
-            dest.writeInt(1);
-            mWifiSsid.writeToParcel(dest, flags);
-        } else {
-            dest.writeInt(0);
-        }
-        dest.writeString(mBSSID);
-        dest.writeString(mMacAddress);
-        dest.writeInt(mMeteredHint ? 1 : 0);
-        dest.writeInt(mEphemeral ? 1 : 0);
-        dest.writeInt(mTrusted ? 1 : 0);
-        dest.writeInt(score);
-        dest.writeLong(txSuccess);
-        dest.writeDouble(mSuccessfulTxPacketsPerSecond);
-        dest.writeLong(txRetries);
-        dest.writeDouble(mTxRetriedTxPacketsPerSecond);
-        dest.writeLong(txBad);
-        dest.writeDouble(mLostTxPacketsPerSecond);
-        dest.writeLong(rxSuccess);
-        dest.writeDouble(mSuccessfulRxPacketsPerSecond);
-        mSupplicantState.writeToParcel(dest, flags);
-        dest.writeInt(mOsuAp ? 1 : 0);
-        dest.writeString(mRequestingPackageName);
-        dest.writeString(mFqdn);
-        dest.writeString(mProviderFriendlyName);
-        dest.writeInt(mWifiStandard);
-        dest.writeInt(mMaxSupportedTxLinkSpeed);
-        dest.writeInt(mMaxSupportedRxLinkSpeed);
-        dest.writeString(mPasspointUniqueId);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @UnsupportedAppUsage
-    public static final @android.annotation.NonNull Creator<WifiInfo> CREATOR =
-        new Creator<WifiInfo>() {
-            public WifiInfo createFromParcel(Parcel in) {
-                WifiInfo info = new WifiInfo();
-                info.setNetworkId(in.readInt());
-                info.setRssi(in.readInt());
-                info.setLinkSpeed(in.readInt());
-                info.setTxLinkSpeedMbps(in.readInt());
-                info.setRxLinkSpeedMbps(in.readInt());
-                info.setFrequency(in.readInt());
-                if (in.readByte() == 1) {
-                    try {
-                        info.setInetAddress(InetAddress.getByAddress(in.createByteArray()));
-                    } catch (UnknownHostException e) {}
-                }
-                if (in.readInt() == 1) {
-                    info.mWifiSsid = WifiSsid.CREATOR.createFromParcel(in);
-                }
-                info.mBSSID = in.readString();
-                info.mMacAddress = in.readString();
-                info.mMeteredHint = in.readInt() != 0;
-                info.mEphemeral = in.readInt() != 0;
-                info.mTrusted = in.readInt() != 0;
-                info.score = in.readInt();
-                info.txSuccess = in.readLong();
-                info.mSuccessfulTxPacketsPerSecond = in.readDouble();
-                info.txRetries = in.readLong();
-                info.mTxRetriedTxPacketsPerSecond = in.readDouble();
-                info.txBad = in.readLong();
-                info.mLostTxPacketsPerSecond = in.readDouble();
-                info.rxSuccess = in.readLong();
-                info.mSuccessfulRxPacketsPerSecond = in.readDouble();
-                info.mSupplicantState = SupplicantState.CREATOR.createFromParcel(in);
-                info.mOsuAp = in.readInt() != 0;
-                info.mRequestingPackageName = in.readString();
-                info.mFqdn = in.readString();
-                info.mProviderFriendlyName = in.readString();
-                info.mWifiStandard = in.readInt();
-                info.mMaxSupportedTxLinkSpeed = in.readInt();
-                info.mMaxSupportedRxLinkSpeed = in.readInt();
-                info.mPasspointUniqueId = in.readString();
-                return info;
-            }
-
-            public WifiInfo[] newArray(int size) {
-                return new WifiInfo[size];
-            }
-        };
-
-    /**
-     * Set the Passpoint unique identifier for the current connection
-     *
-     * @param passpointUniqueId Unique identifier
-     * @hide
-     */
-    public void setPasspointUniqueId(@Nullable String passpointUniqueId) {
-        mPasspointUniqueId = passpointUniqueId;
-    }
-
-    /**
-     * Get the Passpoint unique identifier for the current connection
-     *
-     * @return Passpoint unique identifier
-     * @hide
-     */
-    public @Nullable String getPasspointUniqueId() {
-        return mPasspointUniqueId;
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
deleted file mode 100644
index b7f4c96..0000000
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ /dev/null
@@ -1,6235 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
-import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.Manifest.permission.READ_WIFI_CREDENTIAL;
-
-import android.annotation.CallbackExecutor;
-import android.annotation.IntDef;
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SdkConstant;
-import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.SuppressLint;
-import android.annotation.SystemApi;
-import android.annotation.SystemService;
-import android.app.ActivityManager;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.content.Context;
-import android.content.pm.ParceledListSlice;
-import android.net.ConnectivityManager;
-import android.net.DhcpInfo;
-import android.net.MacAddress;
-import android.net.Network;
-import android.net.NetworkStack;
-import android.net.wifi.hotspot2.IProvisioningCallback;
-import android.net.wifi.hotspot2.OsuProvider;
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.hotspot2.ProvisioningCallback;
-import android.os.Binder;
-import android.os.Build;
-import android.os.Handler;
-import android.os.HandlerExecutor;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.RemoteException;
-import android.os.WorkSource;
-import android.os.connectivity.WifiActivityEnergyInfo;
-import android.text.TextUtils;
-import android.util.CloseGuard;
-import android.util.Log;
-import android.util.Pair;
-import android.util.SparseArray;
-
-import com.android.internal.annotations.GuardedBy;
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.concurrent.Executor;
-
-/**
- * This class provides the primary API for managing all aspects of Wi-Fi
- * connectivity.
- * <p>
- * On releases before {@link android.os.Build.VERSION_CODES#N}, this object
- * should only be obtained from an {@linkplain Context#getApplicationContext()
- * application context}, and not from any other derived context to avoid memory
- * leaks within the calling process.
- * <p>
- * It deals with several categories of items:
- * </p>
- * <ul>
- * <li>The list of configured networks. The list can be viewed and updated, and
- * attributes of individual entries can be modified.</li>
- * <li>The currently active Wi-Fi network, if any. Connectivity can be
- * established or torn down, and dynamic information about the state of the
- * network can be queried.</li>
- * <li>Results of access point scans, containing enough information to make
- * decisions about what access point to connect to.</li>
- * <li>It defines the names of various Intent actions that are broadcast upon
- * any sort of change in Wi-Fi state.
- * </ul>
- * <p>
- * This is the API to use when performing Wi-Fi specific operations. To perform
- * operations that pertain to network connectivity at an abstract level, use
- * {@link android.net.ConnectivityManager}.
- * </p>
- */
-@SystemService(Context.WIFI_SERVICE)
-public class WifiManager {
-
-    private static final String TAG = "WifiManager";
-    // Supplicant error codes:
-    /**
-     * The error code if there was a problem authenticating.
-     * @deprecated This is no longer supported.
-     */
-    @Deprecated
-    public static final int ERROR_AUTHENTICATING = 1;
-
-    /**
-     * The reason code if there is no error during authentication.
-     * It could also imply that there no authentication in progress,
-     * this reason code also serves as a reset value.
-     * @deprecated This is no longer supported.
-     * @hide
-     */
-    @Deprecated
-    public static final int ERROR_AUTH_FAILURE_NONE = 0;
-
-    /**
-     * The reason code if there was a timeout authenticating.
-     * @deprecated This is no longer supported.
-     * @hide
-     */
-    @Deprecated
-    public static final int ERROR_AUTH_FAILURE_TIMEOUT = 1;
-
-    /**
-     * The reason code if there was a wrong password while
-     * authenticating.
-     * @deprecated This is no longer supported.
-     * @hide
-     */
-    @Deprecated
-    public static final int ERROR_AUTH_FAILURE_WRONG_PSWD = 2;
-
-    /**
-     * The reason code if there was EAP failure while
-     * authenticating.
-     * @deprecated This is no longer supported.
-     * @hide
-     */
-    @Deprecated
-    public static final int ERROR_AUTH_FAILURE_EAP_FAILURE = 3;
-
-    /** @hide */
-    public static final int NETWORK_SUGGESTIONS_MAX_PER_APP_LOW_RAM = 256;
-
-    /** @hide */
-    public static final int NETWORK_SUGGESTIONS_MAX_PER_APP_HIGH_RAM = 1024;
-
-    /**
-     * Reason code if all of the network suggestions were successfully added or removed.
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_SUCCESS = 0;
-
-    /**
-     * Reason code if there was an internal error in the platform while processing the addition or
-     * removal of suggestions.
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL = 1;
-
-    /**
-     * Reason code if the user has disallowed "android:change_wifi_state" app-ops from the app.
-     * @see android.app.AppOpsManager#unsafeCheckOp(String, int, String).
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED = 2;
-
-    /**
-     * Reason code if one or more of the network suggestions added already exists in platform's
-     * database.
-     * Note: this code will not be returned with Android 11 as in-place modification is allowed,
-     * please check {@link #addNetworkSuggestions(List)}.
-     * @see WifiNetworkSuggestion#equals(Object)
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_DUPLICATE = 3;
-
-    /**
-     * Reason code if the number of network suggestions provided by the app crosses the max
-     * threshold set per app.
-     * The framework will reject all suggestions provided by {@link #addNetworkSuggestions(List)} if
-     * the total size exceeds the limit.
-     * @see #getMaxNumberOfNetworkSuggestionsPerApp()
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_EXCEEDS_MAX_PER_APP = 4;
-
-    /**
-     * Reason code if one or more of the network suggestions removed does not exist in platform's
-     * database.
-     * The framework won't remove any suggestions if one or more of suggestions provided
-     * by {@link #removeNetworkSuggestions(List)} does not exist in database.
-     * @see WifiNetworkSuggestion#equals(Object)
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID = 5;
-
-    /**
-     * Reason code if one or more of the network suggestions added is not allowed.
-     * The framework will reject all suggestions provided by {@link #addNetworkSuggestions(List)}
-     * if one or more of them is not allowed.
-     * This error may be caused by suggestion is using SIM-based encryption method, but calling app
-     * is not carrier privileged.
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED = 6;
-
-    /**
-     * Reason code if one or more of the network suggestions added is invalid. Framework will reject
-     * all the suggestions in the list.
-     * The framework will reject all suggestions provided by {@link #addNetworkSuggestions(List)}
-     * if one or more of them is invalid.
-     * Please use {@link WifiNetworkSuggestion.Builder} to create network suggestions.
-     */
-    public static final int STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID = 7;
-
-    /** @hide */
-    @IntDef(prefix = { "STATUS_NETWORK_SUGGESTIONS_" }, value = {
-            STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_INTERNAL,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_APP_DISALLOWED,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_DUPLICATE,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_EXCEEDS_MAX_PER_APP,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_REMOVE_INVALID,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_NOT_ALLOWED,
-            STATUS_NETWORK_SUGGESTIONS_ERROR_ADD_INVALID,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface NetworkSuggestionsStatusCode {}
-
-    /**
-     * Reason code if suggested network connection attempt failed with an unknown failure.
-     */
-    public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN = 0;
-    /**
-     * Reason code if suggested network connection attempt failed with association failure.
-     */
-    public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION = 1;
-    /**
-     * Reason code if suggested network connection attempt failed with an authentication failure.
-     */
-    public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION = 2;
-    /**
-     * Reason code if suggested network connection attempt failed with an IP provision failure.
-     */
-    public static final int STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING = 3;
-
-    /** @hide */
-    @IntDef(prefix = {"STATUS_SUGGESTION_CONNECTION_FAILURE_"},
-            value = {STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN,
-                    STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION,
-                    STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION,
-                    STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface SuggestionConnectionStatusCode {}
-
-    /**
-     * Broadcast intent action indicating whether Wi-Fi scanning is currently available.
-     * Available extras:
-     * - {@link #EXTRA_SCAN_AVAILABLE}
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_WIFI_SCAN_AVAILABILITY_CHANGED =
-            "android.net.wifi.action.WIFI_SCAN_AVAILABILITY_CHANGED";
-
-    /**
-     * A boolean extra indicating whether scanning is currently available.
-     * Sent in the broadcast {@link #ACTION_WIFI_SCAN_AVAILABILITY_CHANGED}.
-     * Its value is true if scanning is currently available, false otherwise.
-     */
-    public static final String EXTRA_SCAN_AVAILABLE = "android.net.wifi.extra.SCAN_AVAILABLE";
-
-    /**
-     * Broadcast intent action indicating that the credential of a Wi-Fi network
-     * has been changed. One extra provides the ssid of the network. Another
-     * extra provides the event type, whether the credential is saved or forgot.
-     * @hide
-     */
-    @SystemApi
-    public static final String WIFI_CREDENTIAL_CHANGED_ACTION =
-            "android.net.wifi.WIFI_CREDENTIAL_CHANGED";
-    /** @hide */
-    @SystemApi
-    public static final String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et";
-    /** @hide */
-    @SystemApi
-    public static final String EXTRA_WIFI_CREDENTIAL_SSID = "ssid";
-    /** @hide */
-    @SystemApi
-    public static final int WIFI_CREDENTIAL_SAVED = 0;
-    /** @hide */
-    @SystemApi
-    public static final int WIFI_CREDENTIAL_FORGOT = 1;
-
-    /** @hide */
-    @SystemApi
-    public static final int PASSPOINT_HOME_NETWORK = 0;
-
-    /** @hide */
-    @SystemApi
-    public static final int PASSPOINT_ROAMING_NETWORK = 1;
-
-    /**
-     * Broadcast intent action indicating that a Passpoint provider icon has been received.
-     *
-     * Included extras:
-     * {@link #EXTRA_BSSID_LONG}
-     * {@link #EXTRA_FILENAME}
-     * {@link #EXTRA_ICON}
-     *
-     * Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
-     *
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     *
-     * @hide
-     */
-    public static final String ACTION_PASSPOINT_ICON = "android.net.wifi.action.PASSPOINT_ICON";
-    /**
-     * BSSID of an AP in long representation.  The {@link #EXTRA_BSSID} contains BSSID in
-     * String representation.
-     *
-     * Retrieve with {@link android.content.Intent#getLongExtra(String, long)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_BSSID_LONG = "android.net.wifi.extra.BSSID_LONG";
-    /**
-     * Icon data.
-     *
-     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)} and cast into
-     * {@link android.graphics.drawable.Icon}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_ICON = "android.net.wifi.extra.ICON";
-    /**
-     * Name of a file.
-     *
-     * Retrieve with {@link android.content.Intent#getStringExtra(String)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_FILENAME = "android.net.wifi.extra.FILENAME";
-
-    /**
-     * Broadcast intent action indicating a Passpoint OSU Providers List element has been received.
-     *
-     * Included extras:
-     * {@link #EXTRA_BSSID_LONG}
-     * {@link #EXTRA_ANQP_ELEMENT_DATA}
-     *
-     * Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
-     *
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     *
-     * @hide
-     */
-    public static final String ACTION_PASSPOINT_OSU_PROVIDERS_LIST =
-            "android.net.wifi.action.PASSPOINT_OSU_PROVIDERS_LIST";
-    /**
-     * Raw binary data of an ANQP (Access Network Query Protocol) element.
-     *
-     * Retrieve with {@link android.content.Intent#getByteArrayExtra(String)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_ANQP_ELEMENT_DATA =
-            "android.net.wifi.extra.ANQP_ELEMENT_DATA";
-
-    /**
-     * Broadcast intent action indicating that a Passpoint Deauth Imminent frame has been received.
-     *
-     * Included extras:
-     * {@link #EXTRA_BSSID_LONG}
-     * {@link #EXTRA_ESS}
-     * {@link #EXTRA_DELAY}
-     * {@link #EXTRA_URL}
-     *
-     * Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
-     *
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     *
-     * @hide
-     */
-    public static final String ACTION_PASSPOINT_DEAUTH_IMMINENT =
-            "android.net.wifi.action.PASSPOINT_DEAUTH_IMMINENT";
-    /**
-     * Flag indicating BSS (Basic Service Set) or ESS (Extended Service Set). This will be set to
-     * {@code true} for ESS.
-     *
-     * Retrieve with {@link android.content.Intent#getBooleanExtra(String, boolean)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_ESS = "android.net.wifi.extra.ESS";
-    /**
-     * Delay in seconds.
-     *
-     * Retrieve with {@link android.content.Intent#getIntExtra(String, int)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_DELAY = "android.net.wifi.extra.DELAY";
-
-    /**
-     * Broadcast intent action indicating a Passpoint subscription remediation frame has been
-     * received.
-     *
-     * Included extras:
-     * {@link #EXTRA_BSSID_LONG}
-     * {@link #EXTRA_SUBSCRIPTION_REMEDIATION_METHOD}
-     * {@link #EXTRA_URL}
-     *
-     * Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
-     *
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     *
-     * @hide
-     */
-    public static final String ACTION_PASSPOINT_SUBSCRIPTION_REMEDIATION =
-            "android.net.wifi.action.PASSPOINT_SUBSCRIPTION_REMEDIATION";
-    /**
-     * The protocol supported by the subscription remediation server. The possible values are:
-     * 0 - OMA DM
-     * 1 - SOAP XML SPP
-     *
-     * Retrieve with {@link android.content.Intent#getIntExtra(String, int)}.
-     *
-     * @hide
-     */
-    public static final String EXTRA_SUBSCRIPTION_REMEDIATION_METHOD =
-            "android.net.wifi.extra.SUBSCRIPTION_REMEDIATION_METHOD";
-
-    /**
-     * Activity Action: Receiver should launch Passpoint OSU (Online Sign Up) view.
-     * Included extras:
-     *
-     * {@link #EXTRA_OSU_NETWORK}: {@link Network} instance associated with OSU AP.
-     * {@link #EXTRA_URL}: String representation of a server URL used for OSU process.
-     *
-     * @hide
-     */
-    @SystemApi
-    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
-    public static final String ACTION_PASSPOINT_LAUNCH_OSU_VIEW =
-            "android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW";
-
-    /**
-     * The lookup key for a {@link android.net.Network} associated with a Passpoint OSU server.
-     * Included in the {@link #ACTION_PASSPOINT_LAUNCH_OSU_VIEW} broadcast.
-     *
-     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_OSU_NETWORK = "android.net.wifi.extra.OSU_NETWORK";
-
-    /**
-     * String representation of an URL for Passpoint OSU.
-     * Included in the {@link #ACTION_PASSPOINT_LAUNCH_OSU_VIEW} broadcast.
-     *
-     * Retrieve with {@link android.content.Intent#getStringExtra(String)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_URL = "android.net.wifi.extra.URL";
-
-    /**
-     * Broadcast intent action indicating that Wi-Fi has been enabled, disabled,
-     * enabling, disabling, or unknown. One extra provides this state as an int.
-     * Another extra provides the previous state, if available.  No network-related
-     * permissions are required to subscribe to this broadcast.
-     *
-     * <p class="note">This broadcast is not delivered to manifest receivers in
-     * applications that target API version 26 or later.
-     *
-     * @see #EXTRA_WIFI_STATE
-     * @see #EXTRA_PREVIOUS_WIFI_STATE
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_STATE_CHANGED_ACTION =
-        "android.net.wifi.WIFI_STATE_CHANGED";
-    /**
-     * The lookup key for an int that indicates whether Wi-Fi is enabled,
-     * disabled, enabling, disabling, or unknown.  Retrieve it with
-     * {@link android.content.Intent#getIntExtra(String,int)}.
-     *
-     * @see #WIFI_STATE_DISABLED
-     * @see #WIFI_STATE_DISABLING
-     * @see #WIFI_STATE_ENABLED
-     * @see #WIFI_STATE_ENABLING
-     * @see #WIFI_STATE_UNKNOWN
-     */
-    public static final String EXTRA_WIFI_STATE = "wifi_state";
-    /**
-     * The previous Wi-Fi state.
-     *
-     * @see #EXTRA_WIFI_STATE
-     */
-    public static final String EXTRA_PREVIOUS_WIFI_STATE = "previous_wifi_state";
-
-    /**
-     * Wi-Fi is currently being disabled. The state will change to {@link #WIFI_STATE_DISABLED} if
-     * it finishes successfully.
-     *
-     * @see #WIFI_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     */
-    public static final int WIFI_STATE_DISABLING = 0;
-    /**
-     * Wi-Fi is disabled.
-     *
-     * @see #WIFI_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     */
-    public static final int WIFI_STATE_DISABLED = 1;
-    /**
-     * Wi-Fi is currently being enabled. The state will change to {@link #WIFI_STATE_ENABLED} if
-     * it finishes successfully.
-     *
-     * @see #WIFI_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     */
-    public static final int WIFI_STATE_ENABLING = 2;
-    /**
-     * Wi-Fi is enabled.
-     *
-     * @see #WIFI_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     */
-    public static final int WIFI_STATE_ENABLED = 3;
-    /**
-     * Wi-Fi is in an unknown state. This state will occur when an error happens while enabling
-     * or disabling.
-     *
-     * @see #WIFI_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     */
-    public static final int WIFI_STATE_UNKNOWN = 4;
-
-    /**
-     * Broadcast intent action indicating that Wi-Fi AP has been enabled, disabled,
-     * enabling, disabling, or failed.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String WIFI_AP_STATE_CHANGED_ACTION =
-        "android.net.wifi.WIFI_AP_STATE_CHANGED";
-
-    /**
-     * The lookup key for an int that indicates whether Wi-Fi AP is enabled,
-     * disabled, enabling, disabling, or failed.  Retrieve it with
-     * {@link android.content.Intent#getIntExtra(String,int)}.
-     *
-     * @see #WIFI_AP_STATE_DISABLED
-     * @see #WIFI_AP_STATE_DISABLING
-     * @see #WIFI_AP_STATE_ENABLED
-     * @see #WIFI_AP_STATE_ENABLING
-     * @see #WIFI_AP_STATE_FAILED
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_WIFI_AP_STATE = "wifi_state";
-
-    /**
-     * An extra containing the int error code for Soft AP start failure.
-     * Can be obtained from the {@link #WIFI_AP_STATE_CHANGED_ACTION} using
-     * {@link android.content.Intent#getIntExtra}.
-     * This extra will only be attached if {@link #EXTRA_WIFI_AP_STATE} is
-     * attached and is equal to {@link #WIFI_AP_STATE_FAILED}.
-     *
-     * The error code will be one of:
-     * {@link #SAP_START_FAILURE_GENERAL},
-     * {@link #SAP_START_FAILURE_NO_CHANNEL},
-     * {@link #SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_WIFI_AP_FAILURE_REASON =
-            "android.net.wifi.extra.WIFI_AP_FAILURE_REASON";
-    /**
-     * The previous Wi-Fi state.
-     *
-     * @see #EXTRA_WIFI_AP_STATE
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state";
-    /**
-     * The lookup key for a String extra that stores the interface name used for the Soft AP.
-     * This extra is included in the broadcast {@link #WIFI_AP_STATE_CHANGED_ACTION}.
-     * Retrieve its value with {@link android.content.Intent#getStringExtra(String)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_WIFI_AP_INTERFACE_NAME =
-            "android.net.wifi.extra.WIFI_AP_INTERFACE_NAME";
-    /**
-     * The lookup key for an int extra that stores the intended IP mode for this Soft AP.
-     * One of {@link #IFACE_IP_MODE_TETHERED} or {@link #IFACE_IP_MODE_LOCAL_ONLY}.
-     * This extra is included in the broadcast {@link #WIFI_AP_STATE_CHANGED_ACTION}.
-     * Retrieve its value with {@link android.content.Intent#getIntExtra(String, int)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_WIFI_AP_MODE = "android.net.wifi.extra.WIFI_AP_MODE";
-
-    /** @hide */
-    @IntDef(flag = false, prefix = { "WIFI_AP_STATE_" }, value = {
-        WIFI_AP_STATE_DISABLING,
-        WIFI_AP_STATE_DISABLED,
-        WIFI_AP_STATE_ENABLING,
-        WIFI_AP_STATE_ENABLED,
-        WIFI_AP_STATE_FAILED,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiApState {}
-
-    /**
-     * Wi-Fi AP is currently being disabled. The state will change to
-     * {@link #WIFI_AP_STATE_DISABLED} if it finishes successfully.
-     *
-     * @see #WIFI_AP_STATE_CHANGED_ACTION
-     * @see #getWifiApState()
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int WIFI_AP_STATE_DISABLING = 10;
-    /**
-     * Wi-Fi AP is disabled.
-     *
-     * @see #WIFI_AP_STATE_CHANGED_ACTION
-     * @see #getWifiState()
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int WIFI_AP_STATE_DISABLED = 11;
-    /**
-     * Wi-Fi AP is currently being enabled. The state will change to
-     * {@link #WIFI_AP_STATE_ENABLED} if it finishes successfully.
-     *
-     * @see #WIFI_AP_STATE_CHANGED_ACTION
-     * @see #getWifiApState()
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int WIFI_AP_STATE_ENABLING = 12;
-    /**
-     * Wi-Fi AP is enabled.
-     *
-     * @see #WIFI_AP_STATE_CHANGED_ACTION
-     * @see #getWifiApState()
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int WIFI_AP_STATE_ENABLED = 13;
-    /**
-     * Wi-Fi AP is in a failed state. This state will occur when an error occurs during
-     * enabling or disabling
-     *
-     * @see #WIFI_AP_STATE_CHANGED_ACTION
-     * @see #getWifiApState()
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int WIFI_AP_STATE_FAILED = 14;
-
-    /** @hide */
-    @IntDef(flag = false, prefix = { "SAP_START_FAILURE_" }, value = {
-        SAP_START_FAILURE_GENERAL,
-        SAP_START_FAILURE_NO_CHANNEL,
-        SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface SapStartFailure {}
-
-    /**
-     *  All other reasons for AP start failure besides {@link #SAP_START_FAILURE_NO_CHANNEL} and
-     *  {@link #SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}.
-     *
-     *  @hide
-     */
-    @SystemApi
-    public static final int SAP_START_FAILURE_GENERAL= 0;
-
-    /**
-     *  If Wi-Fi AP start failed, this reason code means that no legal channel exists on user
-     *  selected band due to regulatory constraints.
-     *
-     *  @hide
-     */
-    @SystemApi
-    public static final int SAP_START_FAILURE_NO_CHANNEL = 1;
-
-    /**
-     *  If Wi-Fi AP start failed, this reason code means that the specified configuration
-     *  is not supported by the current HAL version.
-     *
-     *  @hide
-     */
-    @SystemApi
-    public static final int SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION = 2;
-
-
-    /** @hide */
-    @IntDef(flag = false, prefix = { "SAP_CLIENT_BLOCKED_REASON_" }, value = {
-        SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER,
-        SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface SapClientBlockedReason {}
-
-    /**
-     *  If Soft Ap client is blocked, this reason code means that client doesn't exist in the
-     *  specified configuration {@link SoftApConfiguration.Builder#setBlockedClientList(List)}
-     *  and {@link SoftApConfiguration.Builder#setAllowedClientList(List)}
-     *  and the {@link SoftApConfiguration.Builder#setClientControlByUserEnabled(boolean)}
-     *  is configured as well.
-     *  @hide
-     */
-    @SystemApi
-    public static final int SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER = 0;
-
-    /**
-     *  If Soft Ap client is blocked, this reason code means that no more clients can be
-     *  associated to this AP since it reached maximum capacity. The maximum capacity is
-     *  the minimum of {@link SoftApConfiguration.Builder#setMaxNumberOfClients(int)} and
-     *  {@link SoftApCapability#getMaxSupportedClients} which get from
-     *  {@link WifiManager.SoftApCallback#onCapabilityChanged(SoftApCapability)}.
-     *
-     *  @hide
-     */
-    @SystemApi
-    public static final int SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS = 1;
-
-    /**
-     * Client disconnected for unspecified reason. This could for example be because the AP is being
-     * shut down.
-     * @hide
-     */
-    public static final int SAP_CLIENT_DISCONNECT_REASON_CODE_UNSPECIFIED = 2;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"IFACE_IP_MODE_"}, value = {
-            IFACE_IP_MODE_UNSPECIFIED,
-            IFACE_IP_MODE_CONFIGURATION_ERROR,
-            IFACE_IP_MODE_TETHERED,
-            IFACE_IP_MODE_LOCAL_ONLY})
-    public @interface IfaceIpMode {}
-
-    /**
-     * Interface IP mode unspecified.
-     *
-     * @see #updateInterfaceIpState(String, int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int IFACE_IP_MODE_UNSPECIFIED = -1;
-
-    /**
-     * Interface IP mode for configuration error.
-     *
-     * @see #updateInterfaceIpState(String, int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int IFACE_IP_MODE_CONFIGURATION_ERROR = 0;
-
-    /**
-     * Interface IP mode for tethering.
-     *
-     * @see #updateInterfaceIpState(String, int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int IFACE_IP_MODE_TETHERED = 1;
-
-    /**
-     * Interface IP mode for Local Only Hotspot.
-     *
-     * @see #updateInterfaceIpState(String, int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int IFACE_IP_MODE_LOCAL_ONLY = 2;
-
-    /**
-     * Broadcast intent action indicating that the wifi network settings
-     * had been reset.
-     *
-     * Note: This intent is sent as a directed broadcast to each manifest registered receiver.
-     * Intent will not be received by dynamically registered receivers.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING)
-    public static final String ACTION_NETWORK_SETTINGS_RESET =
-            "android.net.wifi.action.NETWORK_SETTINGS_RESET";
-
-    /**
-     * Broadcast intent action indicating that a connection to the supplicant has
-     * been established (and it is now possible
-     * to perform Wi-Fi operations) or the connection to the supplicant has been
-     * lost. One extra provides the connection state as a boolean, where {@code true}
-     * means CONNECTED.
-     * @deprecated This is no longer supported.
-     * @see #EXTRA_SUPPLICANT_CONNECTED
-     */
-    @Deprecated
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String SUPPLICANT_CONNECTION_CHANGE_ACTION =
-        "android.net.wifi.supplicant.CONNECTION_CHANGE";
-    /**
-     * The lookup key for a boolean that indicates whether a connection to
-     * the supplicant daemon has been gained or lost. {@code true} means
-     * a connection now exists.
-     * Retrieve it with {@link android.content.Intent#getBooleanExtra(String,boolean)}.
-     * @deprecated This is no longer supported.
-     */
-    @Deprecated
-    public static final String EXTRA_SUPPLICANT_CONNECTED = "connected";
-    /**
-     * Broadcast intent action indicating that the state of Wi-Fi connectivity
-     * has changed. An extra provides the new state
-     * in the form of a {@link android.net.NetworkInfo} object.  No network-related
-     * permissions are required to subscribe to this broadcast.
-     *
-     * <p class="note">This broadcast is not delivered to manifest receivers in
-     * applications that target API version 26 or later.
-     * @see #EXTRA_NETWORK_INFO
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String NETWORK_STATE_CHANGED_ACTION = "android.net.wifi.STATE_CHANGE";
-    /**
-     * The lookup key for a {@link android.net.NetworkInfo} object associated with the
-     * Wi-Fi network. Retrieve with
-     * {@link android.content.Intent#getParcelableExtra(String)}.
-     */
-    public static final String EXTRA_NETWORK_INFO = "networkInfo";
-    /**
-     * The lookup key for a String giving the BSSID of the access point to which
-     * we are connected. No longer used.
-     */
-    @Deprecated
-    public static final String EXTRA_BSSID = "bssid";
-    /**
-     * The lookup key for a {@link android.net.wifi.WifiInfo} object giving the
-     * information about the access point to which we are connected.
-     * No longer used.
-     */
-    @Deprecated
-    public static final String EXTRA_WIFI_INFO = "wifiInfo";
-    /**
-     * Broadcast intent action indicating that the state of establishing a connection to
-     * an access point has changed.One extra provides the new
-     * {@link SupplicantState}. Note that the supplicant state is Wi-Fi specific, and
-     * is not generally the most useful thing to look at if you are just interested in
-     * the overall state of connectivity.
-     * @see #EXTRA_NEW_STATE
-     * @see #EXTRA_SUPPLICANT_ERROR
-     * @deprecated This is no longer supported.
-     */
-    @Deprecated
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String SUPPLICANT_STATE_CHANGED_ACTION =
-        "android.net.wifi.supplicant.STATE_CHANGE";
-    /**
-     * The lookup key for a {@link SupplicantState} describing the new state
-     * Retrieve with
-     * {@link android.content.Intent#getParcelableExtra(String)}.
-     * @deprecated This is no longer supported.
-     */
-    @Deprecated
-    public static final String EXTRA_NEW_STATE = "newState";
-
-    /**
-     * The lookup key for a {@link SupplicantState} describing the supplicant
-     * error code if any
-     * Retrieve with
-     * {@link android.content.Intent#getIntExtra(String, int)}.
-     * @see #ERROR_AUTHENTICATING
-     * @deprecated This is no longer supported.
-     */
-    @Deprecated
-    public static final String EXTRA_SUPPLICANT_ERROR = "supplicantError";
-
-    /**
-     * The lookup key for a {@link SupplicantState} describing the supplicant
-     * error reason if any
-     * Retrieve with
-     * {@link android.content.Intent#getIntExtra(String, int)}.
-     * @see #ERROR_AUTH_FAILURE_#REASON_CODE
-     * @deprecated This is no longer supported.
-     * @hide
-     */
-    @Deprecated
-    public static final String EXTRA_SUPPLICANT_ERROR_REASON = "supplicantErrorReason";
-
-    /**
-     * Broadcast intent action indicating that the configured networks changed.
-     * This can be as a result of adding/updating/deleting a network.
-     * <br />
-     * {@link #EXTRA_CHANGE_REASON} contains whether the configuration was added/changed/removed.
-     * {@link #EXTRA_WIFI_CONFIGURATION} is never set starting in Android 11.
-     * {@link #EXTRA_MULTIPLE_NETWORKS_CHANGED} is set for backwards compatibility reasons, but
-     * its value is always true, even if only a single network changed.
-     * <br />
-     * The {@link android.Manifest.permission#ACCESS_WIFI_STATE ACCESS_WIFI_STATE} permission is
-     * required to receive this broadcast.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String CONFIGURED_NETWORKS_CHANGED_ACTION =
-        "android.net.wifi.CONFIGURED_NETWORKS_CHANGE";
-    /**
-     * The lookup key for a {@link android.net.wifi.WifiConfiguration} object representing
-     * the changed Wi-Fi configuration when the {@link #CONFIGURED_NETWORKS_CHANGED_ACTION}
-     * broadcast is sent.
-     * Note: this extra is never set starting in Android 11.
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_WIFI_CONFIGURATION = "wifiConfiguration";
-    /**
-     * Multiple network configurations have changed.
-     * @see #CONFIGURED_NETWORKS_CHANGED_ACTION
-     * Note: this extra is always true starting in Android 11.
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_MULTIPLE_NETWORKS_CHANGED = "multipleChanges";
-    /**
-     * The lookup key for an integer indicating the reason a Wi-Fi network configuration
-     * has changed. One of {@link #CHANGE_REASON_ADDED}, {@link #CHANGE_REASON_REMOVED},
-     * {@link #CHANGE_REASON_CONFIG_CHANGE}.
-     *
-     * @see #CONFIGURED_NETWORKS_CHANGED_ACTION
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_CHANGE_REASON = "changeReason";
-    /**
-     * The configuration is new and was added.
-     * @hide
-     */
-    @SystemApi
-    public static final int CHANGE_REASON_ADDED = 0;
-    /**
-     * The configuration was removed and is no longer present in the system's list of
-     * configured networks.
-     * @hide
-     */
-    @SystemApi
-    public static final int CHANGE_REASON_REMOVED = 1;
-    /**
-     * The configuration has changed as a result of explicit action or because the system
-     * took an automated action such as disabling a malfunctioning configuration.
-     * @hide
-     */
-    @SystemApi
-    public static final int CHANGE_REASON_CONFIG_CHANGE = 2;
-    /**
-     * An access point scan has completed, and results are available.
-     * Call {@link #getScanResults()} to obtain the results.
-     * The broadcast intent may contain an extra field with the key {@link #EXTRA_RESULTS_UPDATED}
-     * and a {@code boolean} value indicating if the scan was successful.
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String SCAN_RESULTS_AVAILABLE_ACTION = "android.net.wifi.SCAN_RESULTS";
-
-    /**
-     * Lookup key for a {@code boolean} extra in intent {@link #SCAN_RESULTS_AVAILABLE_ACTION}
-     * representing if the scan was successful or not.
-     * Scans may fail for multiple reasons, these may include:
-     * <ol>
-     * <li>An app requested too many scans in a certain period of time.
-     * This may lead to additional scan request rejections via "scan throttling" for both
-     * foreground and background apps.
-     * Note: Apps holding android.Manifest.permission.NETWORK_SETTINGS permission are
-     * exempted from scan throttling.
-     * </li>
-     * <li>The device is idle and scanning is disabled.</li>
-     * <li>Wifi hardware reported a scan failure.</li>
-     * </ol>
-     * @return true scan was successful, results are updated
-     * @return false scan was not successful, results haven't been updated since previous scan
-     */
-    public static final String EXTRA_RESULTS_UPDATED = "resultsUpdated";
-
-    /**
-     * A batch of access point scans has been completed and the results areavailable.
-     * Call {@link #getBatchedScanResults()} to obtain the results.
-     * @deprecated This API is nolonger supported.
-     * Use {@link android.net.wifi.WifiScanner} API
-     * @hide
-     */
-    @Deprecated
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String BATCHED_SCAN_RESULTS_AVAILABLE_ACTION =
-            "android.net.wifi.BATCHED_RESULTS";
-
-    /**
-     * The RSSI (signal strength) has changed.
-     *
-     * Receiver Required Permission: android.Manifest.permission.ACCESS_WIFI_STATE
-     * @see #EXTRA_NEW_RSSI
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String RSSI_CHANGED_ACTION = "android.net.wifi.RSSI_CHANGED";
-    /**
-     * The lookup key for an {@code int} giving the new RSSI in dBm.
-     */
-    public static final String EXTRA_NEW_RSSI = "newRssi";
-
-    /**
-     * @see #ACTION_LINK_CONFIGURATION_CHANGED
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public static final String LINK_CONFIGURATION_CHANGED_ACTION =
-            "android.net.wifi.LINK_CONFIGURATION_CHANGED";
-
-    /**
-     * 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 /> No permissions are required to listen to this broadcast.
-     * @hide
-     */
-    @SystemApi
-    public static final String ACTION_LINK_CONFIGURATION_CHANGED =
-            // should be android.net.wifi.action.LINK_CONFIGURATION_CHANGED, but due to
-            // @UnsupportedAppUsage leaving it as android.net.wifi.LINK_CONFIGURATION_CHANGED.
-            LINK_CONFIGURATION_CHANGED_ACTION;
-
-    /**
-     * The lookup key for a {@link android.net.LinkProperties} object associated with the
-     * Wi-Fi network.
-     * Included in the {@link #ACTION_LINK_CONFIGURATION_CHANGED} broadcast.
-     *
-     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
-     * @hide
-     */
-    @SystemApi
-    public static final String EXTRA_LINK_PROPERTIES = "android.net.wifi.extra.LINK_PROPERTIES";
-
-    /**
-     * The lookup key for a {@link android.net.NetworkCapabilities} object associated with the
-     * Wi-Fi network. Retrieve with
-     * {@link android.content.Intent#getParcelableExtra(String)}.
-     * @hide
-     */
-    public static final String EXTRA_NETWORK_CAPABILITIES = "networkCapabilities";
-
-    /**
-     * The network IDs of the configured networks could have changed.
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String NETWORK_IDS_CHANGED_ACTION = "android.net.wifi.NETWORK_IDS_CHANGED";
-
-    /**
-     * Activity Action: Show a system activity that allows the user to enable
-     * scans to be available even with Wi-Fi turned off.
-     *
-     * <p>Notification of the result of this activity is posted using the
-     * {@link android.app.Activity#onActivityResult} callback. The
-     * <code>resultCode</code>
-     * will be {@link android.app.Activity#RESULT_OK} if scan always mode has
-     * been turned on or {@link android.app.Activity#RESULT_CANCELED} if the user
-     * has rejected the request or an error has occurred.
-     */
-    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
-    public static final String ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE =
-            "android.net.wifi.action.REQUEST_SCAN_ALWAYS_AVAILABLE";
-
-    /**
-     * Activity Action: Pick a Wi-Fi network to connect to.
-     * <p>Input: Nothing.
-     * <p>Output: Nothing.
-     */
-    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
-    public static final String ACTION_PICK_WIFI_NETWORK = "android.net.wifi.PICK_WIFI_NETWORK";
-
-    /**
-     * Activity Action: Receiver should show UI to get user approval to enable WiFi.
-     * <p>Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} string extra with
-     *           the name of the app requesting the action.
-     * <p>Output: Nothing.
-     * <p>No permissions are required to send this action.
-     * @hide
-     */
-    @SystemApi
-    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
-    public static final String ACTION_REQUEST_ENABLE = "android.net.wifi.action.REQUEST_ENABLE";
-
-    /**
-     * Activity Action: Receiver should show UI to get user approval to disable WiFi.
-     * <p>Input: {@link android.content.Intent#EXTRA_PACKAGE_NAME} string extra with
-     *           the name of the app requesting the action.
-     * <p>Output: Nothing.
-     * <p>No permissions are required to send this action.
-     * @hide
-     */
-    @SystemApi
-    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
-    public static final String ACTION_REQUEST_DISABLE = "android.net.wifi.action.REQUEST_DISABLE";
-
-    /**
-     * Directed broadcast intent action indicating that the device has connected to one of the
-     * network suggestions provided by the app. This will be sent post connection to a network
-     * which was created with {@link WifiNetworkSuggestion.Builder#setIsAppInteractionRequired(
-     * boolean)}
-     * flag set.
-     * <p>
-     * Note: The broadcast is sent to the app only if it holds
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} permission.
-     *
-     * @see #EXTRA_NETWORK_SUGGESTION
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION =
-            "android.net.wifi.action.WIFI_NETWORK_SUGGESTION_POST_CONNECTION";
-    /**
-     * Sent as as a part of {@link #ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION} that holds
-     * an instance of {@link WifiNetworkSuggestion} corresponding to the connected network.
-     */
-    public static final String EXTRA_NETWORK_SUGGESTION =
-            "android.net.wifi.extra.NETWORK_SUGGESTION";
-
-    /**
-     * Internally used Wi-Fi lock mode representing the case were no locks are held.
-     * @hide
-     */
-    public static final int WIFI_MODE_NO_LOCKS_HELD = 0;
-
-    /**
-     * In this Wi-Fi lock mode, Wi-Fi will be kept active,
-     * and will behave normally, i.e., it will attempt to automatically
-     * establish a connection to a remembered access point that is
-     * within range, and will do periodic scans if there are remembered
-     * access points but none are in range.
-     *
-     * @deprecated This API is non-functional and will have no impact.
-     */
-    @Deprecated
-    public static final int WIFI_MODE_FULL = 1;
-
-    /**
-     * In this Wi-Fi lock mode, 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. No attempts
-     * will be made to automatically connect to remembered access points,
-     * nor will periodic scans be automatically performed looking for
-     * remembered access points. Scans must be explicitly requested by
-     * an application in this mode.
-     *
-     * @deprecated This API is non-functional and will have no impact.
-     */
-    @Deprecated
-    public static final int WIFI_MODE_SCAN_ONLY = 2;
-
-    /**
-     * In this Wi-Fi lock mode, Wi-Fi will not go to power save.
-     * This results in operating with low packet latency.
-     * The lock is only active when the device is connected to an access point.
-     * The lock is active even when the device screen is off or the acquiring application is
-     * running in the background.
-     * This mode will consume more power and hence should be used only
-     * when there is a need for this tradeoff.
-     * <p>
-     * An example use case is when a voice connection needs to be
-     * kept active even after the device screen goes off.
-     * Holding a {@link #WIFI_MODE_FULL_HIGH_PERF} lock for the
-     * duration of the voice call may improve the call quality.
-     * <p>
-     * When there is no support from the hardware, the {@link #WIFI_MODE_FULL_HIGH_PERF}
-     * lock will have no impact.
-     */
-    public static final int WIFI_MODE_FULL_HIGH_PERF = 3;
-
-    /**
-     * In this Wi-Fi lock mode, Wi-Fi will operate with a priority to achieve low latency.
-     * {@link #WIFI_MODE_FULL_LOW_LATENCY} lock has the following limitations:
-     * <ol>
-     * <li>The lock is only active when the device is connected to an access point.</li>
-     * <li>The lock is only active when the screen is on.</li>
-     * <li>The lock is only active when the acquiring app is running in the foreground.</li>
-     * </ol>
-     * Low latency mode optimizes for reduced packet latency,
-     * and as a result other performance measures may suffer when there are trade-offs to make:
-     * <ol>
-     * <li>Battery life may be reduced.</li>
-     * <li>Throughput may be reduced.</li>
-     * <li>Frequency of Wi-Fi scanning may be reduced. This may result in: </li>
-     * <ul>
-     * <li>The device may not roam or switch to the AP with highest signal quality.</li>
-     * <li>Location accuracy may be reduced.</li>
-     * </ul>
-     * </ol>
-     * <p>
-     * Example use cases are real time gaming or virtual reality applications where
-     * low latency is a key factor for user experience.
-     * <p>
-     * Note: For an app which acquires both {@link #WIFI_MODE_FULL_LOW_LATENCY} and
-     * {@link #WIFI_MODE_FULL_HIGH_PERF} locks, {@link #WIFI_MODE_FULL_LOW_LATENCY}
-     * lock will be effective when app is running in foreground and screen is on,
-     * while the {@link #WIFI_MODE_FULL_HIGH_PERF} lock will take effect otherwise.
-     */
-    public static final int WIFI_MODE_FULL_LOW_LATENCY = 4;
-
-
-    /** Anything worse than or equal to this will show 0 bars. */
-    @UnsupportedAppUsage
-    private static final int MIN_RSSI = -100;
-
-    /** Anything better than or equal to this will show the max bars. */
-    @UnsupportedAppUsage
-    private static final int MAX_RSSI = -55;
-
-    /**
-     * Number of RSSI levels used in the framework to initiate {@link #RSSI_CHANGED_ACTION}
-     * broadcast, where each level corresponds to a range of RSSI values.
-     * The {@link #RSSI_CHANGED_ACTION} broadcast will only fire if the RSSI
-     * change is significant enough to change the RSSI signal level.
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public static final int RSSI_LEVELS = 5;
-
-    //TODO (b/146346676): This needs to be removed, not used in the code.
-    /**
-     * Auto settings in the driver. The driver could choose to operate on both
-     * 2.4 GHz and 5 GHz or make a dynamic decision on selecting the band.
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public static final int WIFI_FREQUENCY_BAND_AUTO = 0;
-
-    /**
-     * Operation on 5 GHz alone
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public static final int WIFI_FREQUENCY_BAND_5GHZ = 1;
-
-    /**
-     * Operation on 2.4 GHz alone
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public static final int WIFI_FREQUENCY_BAND_2GHZ = 2;
-
-    /** @hide */
-    public static final boolean DEFAULT_POOR_NETWORK_AVOIDANCE_ENABLED = false;
-
-    /**
-     * Maximum number of active locks we allow.
-     * This limit was added to prevent apps from creating a ridiculous number
-     * of locks and crashing the system by overflowing the global ref table.
-     */
-    private static final int MAX_ACTIVE_LOCKS = 50;
-
-    /** Indicates an invalid SSID. */
-    public static final String UNKNOWN_SSID = "<unknown ssid>";
-
-    /** @hide */
-    public static final MacAddress ALL_ZEROS_MAC_ADDRESS =
-            MacAddress.fromString("00:00:00:00:00:00");
-
-    /* Number of currently active WifiLocks and MulticastLocks */
-    @UnsupportedAppUsage
-    private int mActiveLockCount;
-
-    private Context mContext;
-    @UnsupportedAppUsage
-    IWifiManager mService;
-    private final int mTargetSdkVersion;
-
-    private Looper mLooper;
-    private boolean mVerboseLoggingEnabled = false;
-
-    private final Object mLock = new Object(); // lock guarding access to the following vars
-    @GuardedBy("mLock")
-    private LocalOnlyHotspotCallbackProxy mLOHSCallbackProxy;
-    @GuardedBy("mLock")
-    private LocalOnlyHotspotObserverProxy mLOHSObserverProxy;
-
-    /**
-     * Create a new WifiManager instance.
-     * Applications will almost always want to use
-     * {@link android.content.Context#getSystemService Context.getSystemService} to retrieve
-     * the standard {@link android.content.Context#WIFI_SERVICE Context.WIFI_SERVICE}.
-     *
-     * @param context the application context
-     * @param service the Binder interface
-     * @param looper the Looper used to deliver callbacks
-     * @hide - hide this because it takes in a parameter of type IWifiManager, which
-     * is a system private class.
-     */
-    public WifiManager(@NonNull Context context, @NonNull IWifiManager service,
-        @NonNull Looper looper) {
-        mContext = context;
-        mService = service;
-        mLooper = looper;
-        mTargetSdkVersion = context.getApplicationInfo().targetSdkVersion;
-        updateVerboseLoggingEnabledFromService();
-    }
-
-    /**
-     * Return a list of all the networks configured for the current foreground
-     * user.
-     *
-     * Not all fields of WifiConfiguration are returned. Only the following
-     * fields are filled in:
-     * <ul>
-     * <li>networkId</li>
-     * <li>SSID</li>
-     * <li>BSSID</li>
-     * <li>priority</li>
-     * <li>allowedProtocols</li>
-     * <li>allowedKeyManagement</li>
-     * <li>allowedAuthAlgorithms</li>
-     * <li>allowedPairwiseCiphers</li>
-     * <li>allowedGroupCiphers</li>
-     * <li>status</li>
-     * </ul>
-     * @return a list of network configurations in the form of a list
-     * of {@link WifiConfiguration} objects.
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return an
-     * empty list.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps will have access to the full list.
-     * <li>Callers with Carrier privilege will receive a restricted list only containing
-     * configurations which they created.
-     * </ul>
-     */
-    @Deprecated
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE})
-    public List<WifiConfiguration> getConfiguredNetworks() {
-        try {
-            ParceledListSlice<WifiConfiguration> parceledList =
-                    mService.getConfiguredNetworks(mContext.getOpPackageName(),
-                            mContext.getAttributionTag());
-            if (parceledList == null) {
-                return Collections.emptyList();
-            }
-            return parceledList.getList();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    @SystemApi
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE, READ_WIFI_CREDENTIAL})
-    public List<WifiConfiguration> getPrivilegedConfiguredNetworks() {
-        try {
-            ParceledListSlice<WifiConfiguration> parceledList =
-                    mService.getPrivilegedConfiguredNetworks(mContext.getOpPackageName(),
-                            mContext.getAttributionTag());
-            if (parceledList == null) {
-                return Collections.emptyList();
-            }
-            return parceledList.getList();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns a list of all matching WifiConfigurations for a given list of ScanResult.
-     *
-     * An empty list will be returned when no configurations are installed or if no configurations
-     * match the ScanResult.
-     *
-     * @param scanResults a list of scanResult that represents the BSSID
-     * @return List that consists of {@link WifiConfiguration} and corresponding scanResults per
-     * network type({@link #PASSPOINT_HOME_NETWORK} and {@link #PASSPOINT_ROAMING_NETWORK}).
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    @NonNull
-    public List<Pair<WifiConfiguration, Map<Integer, List<ScanResult>>>> getAllMatchingWifiConfigs(
-            @NonNull List<ScanResult> scanResults) {
-        List<Pair<WifiConfiguration, Map<Integer, List<ScanResult>>>> configs = new ArrayList<>();
-        try {
-            Map<String, Map<Integer, List<ScanResult>>> results =
-                    mService.getAllMatchingPasspointProfilesForScanResults(scanResults);
-            if (results.isEmpty()) {
-                return configs;
-            }
-            List<WifiConfiguration> wifiConfigurations =
-                    mService.getWifiConfigsForPasspointProfiles(
-                            new ArrayList<>(results.keySet()));
-            for (WifiConfiguration configuration : wifiConfigurations) {
-                Map<Integer, List<ScanResult>> scanResultsPerNetworkType =
-                        results.get(configuration.getKey());
-                if (scanResultsPerNetworkType != null) {
-                    configs.add(Pair.create(configuration, scanResultsPerNetworkType));
-                }
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-
-        return configs;
-    }
-
-    /**
-     * Retrieve a list of {@link WifiConfiguration} for available {@link WifiNetworkSuggestion}
-     * matching the given list of {@link ScanResult}.
-     *
-     * An available {@link WifiNetworkSuggestion} must satisfy:
-     * <ul>
-     * <li> Matching one of the {@link ScanResult} from the given list.
-     * <li> and {@link WifiNetworkSuggestion.Builder#setIsUserAllowedToManuallyConnect(boolean)} set
-     * to true.
-     * </ul>
-     *
-     * @param scanResults a list of scanResult.
-     * @return a list of @link WifiConfiguration} for available {@link WifiNetworkSuggestion}
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    @NonNull
-    public List<WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(
-            @NonNull List<ScanResult> scanResults) {
-        try {
-            return mService.getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(scanResults);
-        } catch (RemoteException e) {
-            throw e.rethrowAsRuntimeException();
-        }
-    }
-
-    /**
-     * Returns a list of unique Hotspot 2.0 OSU (Online Sign-Up) providers associated with a given
-     * list of ScanResult.
-     *
-     * An empty list will be returned if no match is found.
-     *
-     * @param scanResults a list of ScanResult
-     * @return Map that consists {@link OsuProvider} and a list of matching {@link ScanResult}
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    @NonNull
-    public Map<OsuProvider, List<ScanResult>> getMatchingOsuProviders(
-            @Nullable List<ScanResult> scanResults) {
-        if (scanResults == null) {
-            return new HashMap<>();
-        }
-        try {
-            return mService.getMatchingOsuProviders(scanResults);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns the matching Passpoint R2 configurations for given OSU (Online Sign-Up) providers.
-     *
-     * Given a list of OSU providers, this only returns OSU providers that already have Passpoint R2
-     * configurations in the device.
-     * An empty map will be returned when there is no matching Passpoint R2 configuration for the
-     * given OsuProviders.
-     *
-     * @param osuProviders a set of {@link OsuProvider}
-     * @return Map that consists of {@link OsuProvider} and matching {@link PasspointConfiguration}.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    @NonNull
-    public Map<OsuProvider, PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(
-            @NonNull Set<OsuProvider> osuProviders) {
-        try {
-            return mService.getMatchingPasspointConfigsForOsuProviders(
-                    new ArrayList<>(osuProviders));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Add a new network description to the set of configured networks.
-     * The {@code networkId} field of the supplied configuration object
-     * is ignored.
-     * <p/>
-     * The new network will be marked DISABLED by default. To enable it,
-     * called {@link #enableNetwork}.
-     *
-     * @param config the set of variables that describe the configuration,
-     *            contained in a {@link WifiConfiguration} object.
-     *            If the {@link WifiConfiguration} has an Http Proxy set
-     *            the calling app must be System, or be provisioned as the Profile or Device Owner.
-     * @return the ID of the newly created network description. This is used in
-     *         other operations to specified the network to be acted upon.
-     *         Returns {@code -1} on failure.
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code -1}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public int addNetwork(WifiConfiguration config) {
-        if (config == null) {
-            return -1;
-        }
-        config.networkId = -1;
-        return addOrUpdateNetwork(config);
-    }
-
-    /**
-     * Update the network description of an existing configured network.
-     *
-     * @param config the set of variables that describe the configuration,
-     *            contained in a {@link WifiConfiguration} object. It may
-     *            be sparse, so that only the items that are being changed
-     *            are non-<code>null</code>. The {@code networkId} field
-     *            must be set to the ID of the existing network being updated.
-     *            If the {@link WifiConfiguration} has an Http Proxy set
-     *            the calling app must be System, or be provisioned as the Profile or Device Owner.
-     * @return Returns the {@code networkId} of the supplied
-     *         {@code WifiConfiguration} on success.
-     *         <br/>
-     *         Returns {@code -1} on failure, including when the {@code networkId}
-     *         field of the {@code WifiConfiguration} does not refer to an
-     *         existing network.
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code -1}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public int updateNetwork(WifiConfiguration config) {
-        if (config == null || config.networkId < 0) {
-            return -1;
-        }
-        return addOrUpdateNetwork(config);
-    }
-
-    /**
-     * Internal method for doing the RPC that creates a new network description
-     * or updates an existing one.
-     *
-     * @param config The possibly sparse object containing the variables that
-     *         are to set or updated in the network description.
-     * @return the ID of the network on success, {@code -1} on failure.
-     */
-    private int addOrUpdateNetwork(WifiConfiguration config) {
-        try {
-            return mService.addOrUpdateNetwork(config, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Interface for indicating user selection from the list of networks presented in the
-     * {@link NetworkRequestMatchCallback#onMatch(List)}.
-     *
-     * The platform will implement this callback and pass it along with the
-     * {@link NetworkRequestMatchCallback#onUserSelectionCallbackRegistration(
-     * NetworkRequestUserSelectionCallback)}. The UI component handling
-     * {@link NetworkRequestMatchCallback} will invoke {@link #select(WifiConfiguration)} or
-     * {@link #reject()} to return the user's selection back to the platform via this callback.
-     * @hide
-     */
-    @SystemApi
-    public interface NetworkRequestUserSelectionCallback {
-        /**
-         * User selected this network to connect to.
-         * @param wifiConfiguration WifiConfiguration object corresponding to the network
-         *                          user selected.
-         */
-        @SuppressLint("CallbackMethodName")
-        default void select(@NonNull WifiConfiguration wifiConfiguration) {}
-
-        /**
-         * User rejected the app's request.
-         */
-        @SuppressLint("CallbackMethodName")
-        default void reject() {}
-    }
-
-    /**
-     * Interface for network request callback. Should be implemented by applications and passed when
-     * calling {@link #registerNetworkRequestMatchCallback(Executor,
-     * WifiManager.NetworkRequestMatchCallback)}.
-     *
-     * This is meant to be implemented by a UI component to present the user with a list of networks
-     * matching the app's request. The user is allowed to pick one of these networks to connect to
-     * or reject the request by the app.
-     * @hide
-     */
-    @SystemApi
-    public interface NetworkRequestMatchCallback {
-        /**
-         * Invoked to register a callback to be invoked to convey user selection. The callback
-         * object passed in this method is to be invoked by the UI component after the service sends
-         * a list of matching scan networks using {@link #onMatch(List)} and user picks a network
-         * from that list.
-         *
-         * @param userSelectionCallback Callback object to send back the user selection.
-         */
-        default void onUserSelectionCallbackRegistration(
-                @NonNull NetworkRequestUserSelectionCallback userSelectionCallback) {}
-
-        /**
-         * Invoked when the active network request is aborted, either because
-         * <li> The app released the request, OR</li>
-         * <li> Request was overridden by a new request</li>
-         * This signals the end of processing for the current request and should stop the UI
-         * component. No subsequent calls from the UI component will be handled by the platform.
-         */
-        default void onAbort() {}
-
-        /**
-         * Invoked when a network request initiated by an app matches some networks in scan results.
-         * This may be invoked multiple times for a single network request as the platform finds new
-         * matching networks in scan results.
-         *
-         * @param scanResults List of {@link ScanResult} objects corresponding to the networks
-         *                    matching the request.
-         */
-        default void onMatch(@NonNull List<ScanResult> scanResults) {}
-
-        /**
-         * Invoked on a successful connection with the network that the user selected
-         * via {@link NetworkRequestUserSelectionCallback}.
-         *
-         * @param wifiConfiguration WifiConfiguration object corresponding to the network that the
-         *                          user selected.
-         */
-        default void onUserSelectionConnectSuccess(@NonNull WifiConfiguration wifiConfiguration) {}
-
-        /**
-         * Invoked on failure to establish connection with the network that the user selected
-         * via {@link NetworkRequestUserSelectionCallback}.
-         *
-         * @param wifiConfiguration WifiConfiguration object corresponding to the network
-         *                          user selected.
-         */
-        default void onUserSelectionConnectFailure(@NonNull WifiConfiguration wifiConfiguration) {}
-    }
-
-    /**
-     * Callback proxy for NetworkRequestUserSelectionCallback objects.
-     * @hide
-     */
-    private class NetworkRequestUserSelectionCallbackProxy implements
-            NetworkRequestUserSelectionCallback {
-        private final INetworkRequestUserSelectionCallback mCallback;
-
-        NetworkRequestUserSelectionCallbackProxy(
-                INetworkRequestUserSelectionCallback callback) {
-            mCallback = callback;
-        }
-
-        @Override
-        public void select(@NonNull WifiConfiguration wifiConfiguration) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestUserSelectionCallbackProxy: select "
-                        + "wificonfiguration: " + wifiConfiguration);
-            }
-            try {
-                mCallback.select(wifiConfiguration);
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to invoke onSelected", e);
-                throw e.rethrowFromSystemServer();
-            }
-        }
-
-        @Override
-        public void reject() {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestUserSelectionCallbackProxy: reject");
-            }
-            try {
-                mCallback.reject();
-            } catch (RemoteException e) {
-                Log.e(TAG, "Failed to invoke onRejected", e);
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Callback proxy for NetworkRequestMatchCallback objects.
-     * @hide
-     */
-    private class NetworkRequestMatchCallbackProxy extends INetworkRequestMatchCallback.Stub {
-        private final Executor mExecutor;
-        private final NetworkRequestMatchCallback mCallback;
-
-        NetworkRequestMatchCallbackProxy(Executor executor, NetworkRequestMatchCallback callback) {
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onUserSelectionCallbackRegistration(
-                INetworkRequestUserSelectionCallback userSelectionCallback) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestMatchCallbackProxy: "
-                        + "onUserSelectionCallbackRegistration callback: " + userSelectionCallback);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onUserSelectionCallbackRegistration(
-                        new NetworkRequestUserSelectionCallbackProxy(userSelectionCallback));
-            });
-        }
-
-        @Override
-        public void onAbort() {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestMatchCallbackProxy: onAbort");
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onAbort();
-            });
-        }
-
-        @Override
-        public void onMatch(List<ScanResult> scanResults) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestMatchCallbackProxy: onMatch scanResults: "
-                        + scanResults);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onMatch(scanResults);
-            });
-        }
-
-        @Override
-        public void onUserSelectionConnectSuccess(WifiConfiguration wifiConfiguration) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestMatchCallbackProxy: onUserSelectionConnectSuccess "
-                        + " wificonfiguration: " + wifiConfiguration);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onUserSelectionConnectSuccess(wifiConfiguration);
-            });
-        }
-
-        @Override
-        public void onUserSelectionConnectFailure(WifiConfiguration wifiConfiguration) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "NetworkRequestMatchCallbackProxy: onUserSelectionConnectFailure"
-                        + " wificonfiguration: " + wifiConfiguration);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onUserSelectionConnectFailure(wifiConfiguration);
-            });
-        }
-    }
-
-    /**
-     * Registers a callback for NetworkRequest matches. See {@link NetworkRequestMatchCallback}.
-     * Caller can unregister a previously registered callback using
-     * {@link #unregisterNetworkRequestMatchCallback(NetworkRequestMatchCallback)}
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#NETWORK_SETTINGS} permission. Callers
-     * without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param executor The Executor on whose thread to execute the callbacks of the {@code callback}
-     *                 object.
-     * @param callback Callback for network match events to register.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void registerNetworkRequestMatchCallback(@NonNull @CallbackExecutor Executor executor,
-            @NonNull NetworkRequestMatchCallback callback) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "registerNetworkRequestMatchCallback: callback=" + callback
-                + ", executor=" + executor);
-
-        Binder binder = new Binder();
-        try {
-            mService.registerNetworkRequestMatchCallback(
-                    binder, new NetworkRequestMatchCallbackProxy(executor, callback),
-                    callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Unregisters a callback for NetworkRequest matches. See {@link NetworkRequestMatchCallback}.
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#NETWORK_SETTINGS} permission. Callers
-     * without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param callback Callback for network match events to unregister.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void unregisterNetworkRequestMatchCallback(
-            @NonNull NetworkRequestMatchCallback callback) {
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "unregisterNetworkRequestMatchCallback: callback=" + callback);
-
-        try {
-            mService.unregisterNetworkRequestMatchCallback(callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Provide a list of network suggestions to the device. See {@link WifiNetworkSuggestion}
-     * for a detailed explanation of the parameters.
-     * When the device decides to connect to one of the provided network suggestions, platform sends
-     * a directed broadcast {@link #ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION} to the app if
-     * the network was created with
-     * {@link WifiNetworkSuggestion.Builder#setIsAppInteractionRequired(boolean)} flag set and the
-     * app holds {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}
-     * permission.
-     *<p>
-     * NOTE:
-     * <li> These networks are just a suggestion to the platform. The platform will ultimately
-     * decide on which network the device connects to. </li>
-     * <li> When an app is uninstalled or disabled, all its suggested networks are discarded.
-     * If the device is currently connected to a suggested network which is being removed then the
-     * device will disconnect from that network.</li>
-     * <li> If user reset network settings, all added suggestions will be discarded. Apps can use
-     * {@link #getNetworkSuggestions()} to check if their suggestions are in the device.</li>
-     * <li> In-place modification of existing suggestions are allowed.
-     * <li> If the provided suggestions include any previously provided suggestions by the app,
-     * previous suggestions will be updated.</li>
-     * <li>If one of the provided suggestions marks a previously unmetered suggestion as metered and
-     * the device is currently connected to that suggested network, then the device will disconnect
-     * from that network. The system will immediately re-evaluate all the network candidates
-     * and possibly reconnect back to the same suggestion. This disconnect is to make sure that any
-     * traffic flowing over unmetered networks isn't accidentally continued over a metered network.
-     * </li>
-     * </li>
-     *
-     * @param networkSuggestions List of network suggestions provided by the app.
-     * @return Status code for the operation. One of the STATUS_NETWORK_SUGGESTIONS_ values.
-     * @throws {@link SecurityException} if the caller is missing required permissions.
-     * @see WifiNetworkSuggestion#equals(Object)
-     */
-    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
-    public @NetworkSuggestionsStatusCode int addNetworkSuggestions(
-            @NonNull List<WifiNetworkSuggestion> networkSuggestions) {
-        try {
-            return mService.addNetworkSuggestions(
-                    networkSuggestions, mContext.getOpPackageName(), mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Remove some or all of the network suggestions that were previously provided by the app.
-     * If one of the suggestions being removed was used to establish connection to the current
-     * network, then the device will immediately disconnect from that network.
-     *
-     * See {@link WifiNetworkSuggestion} for a detailed explanation of the parameters.
-     * See {@link WifiNetworkSuggestion#equals(Object)} for the equivalence evaluation used.
-     *
-     * @param networkSuggestions List of network suggestions to be removed. Pass an empty list
-     *                           to remove all the previous suggestions provided by the app.
-     * @return Status code for the operation. One of the STATUS_NETWORK_SUGGESTIONS_ values.
-     * Any matching suggestions are removed from the device and will not be considered for any
-     * further connection attempts.
-     */
-    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
-    public @NetworkSuggestionsStatusCode int removeNetworkSuggestions(
-            @NonNull List<WifiNetworkSuggestion> networkSuggestions) {
-        try {
-            return mService.removeNetworkSuggestions(
-                    networkSuggestions, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get all network suggestions provided by the calling app.
-     * See {@link #addNetworkSuggestions(List)}
-     * See {@link #removeNetworkSuggestions(List)}
-     * @return a list of {@link WifiNetworkSuggestion}
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public @NonNull List<WifiNetworkSuggestion> getNetworkSuggestions() {
-        try {
-            return mService.getNetworkSuggestions(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowAsRuntimeException();
-        }
-    }
-
-    /**
-     * Returns the max number of network suggestions that are allowed per app on the device.
-     * @see #addNetworkSuggestions(List)
-     * @see #removeNetworkSuggestions(List)
-     */
-    public int getMaxNumberOfNetworkSuggestionsPerApp() {
-        return getMaxNumberOfNetworkSuggestionsPerApp(
-                mContext.getSystemService(ActivityManager.class).isLowRamDevice());
-    }
-
-    /** @hide */
-    public static int getMaxNumberOfNetworkSuggestionsPerApp(boolean isLowRamDevice) {
-        return isLowRamDevice
-                ? NETWORK_SUGGESTIONS_MAX_PER_APP_LOW_RAM
-                : NETWORK_SUGGESTIONS_MAX_PER_APP_HIGH_RAM;
-    }
-
-    /**
-     * Add or update a Passpoint configuration.  The configuration provides a credential
-     * for connecting to Passpoint networks that are operated by the Passpoint
-     * service provider specified in the configuration.
-     *
-     * Each configuration is uniquely identified by a unique key which depends on the contents of
-     * the configuration. This allows the caller to install multiple profiles with the same FQDN
-     * (Fully qualified domain name). Therefore, in order to update an existing profile, it is
-     * first required to remove it using {@link WifiManager#removePasspointConfiguration(String)}.
-     * Otherwise, a new profile will be added with both configuration.
-     *
-     * @param config The Passpoint configuration to be added
-     * @throws IllegalArgumentException if configuration is invalid or Passpoint is not enabled on
-     *                                  the device.
-     *
-     * Deprecated for general app usage - except DO/PO apps.
-     * See {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} to
-     * create a passpoint suggestion.
-     * See {@link #addNetworkSuggestions(List)}, {@link #removeNetworkSuggestions(List)} for new
-     * API to add Wi-Fi networks for consideration when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#R} or above, this API will always fail and throw
-     * {@link IllegalArgumentException}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) {
-        try {
-            if (!mService.addOrUpdatePasspointConfiguration(config, mContext.getOpPackageName())) {
-                throw new IllegalArgumentException();
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Remove the Passpoint configuration identified by its FQDN (Fully Qualified Domain Name) added
-     * by the caller.
-     *
-     * @param fqdn The FQDN of the Passpoint configuration added by the caller to be removed
-     * @throws IllegalArgumentException if no configuration is associated with the given FQDN or
-     *                                  Passpoint is not enabled on the device.
-     * @deprecated This will be non-functional in a future release.
-     */
-    @Deprecated
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_CARRIER_PROVISIONING
-    })
-    public void removePasspointConfiguration(String fqdn) {
-        try {
-            if (!mService.removePasspointConfiguration(fqdn, mContext.getOpPackageName())) {
-                throw new IllegalArgumentException();
-            }
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Return the list of installed Passpoint configurations added by the caller.
-     *
-     * An empty list will be returned when no configurations are installed.
-     *
-     * @return A list of {@link PasspointConfiguration} added by the caller
-     * @deprecated This will be non-functional in a future release.
-     */
-    @Deprecated
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    public List<PasspointConfiguration> getPasspointConfigurations() {
-        try {
-            return mService.getPasspointConfigurations(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Query for a Hotspot 2.0 release 2 OSU icon file. An {@link #ACTION_PASSPOINT_ICON} intent
-     * will be broadcasted once the request is completed.  The presence of the intent extra
-     * {@link #EXTRA_ICON} will indicate the result of the request.
-     * A missing intent extra {@link #EXTRA_ICON} will indicate a failure.
-     *
-     * @param bssid The BSSID of the AP
-     * @param fileName Name of the icon file (remote file) to query from the AP
-     *
-     * @throws UnsupportedOperationException if Passpoint is not enabled on the device.
-     * @hide
-     */
-    public void queryPasspointIcon(long bssid, String fileName) {
-        try {
-            mService.queryPasspointIcon(bssid, fileName);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Match the currently associated network against the SP matching the given FQDN
-     * @param fqdn FQDN of the SP
-     * @return ordinal [HomeProvider, RoamingProvider, Incomplete, None, Declined]
-     * @hide
-     */
-    public int matchProviderWithCurrentNetwork(String fqdn) {
-        try {
-            return mService.matchProviderWithCurrentNetwork(fqdn);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Deauthenticate and set the re-authentication hold off time for the current network
-     * @param holdoff hold off time in milliseconds
-     * @param ess set if the hold off pertains to an ESS rather than a BSS
-     * @hide
-     *
-     * TODO (140167680): This needs to be removed, the implementation is empty!
-     */
-    public void deauthenticateNetwork(long holdoff, boolean ess) {
-        try {
-            mService.deauthenticateNetwork(holdoff, ess);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Remove the specified network from the list of configured networks.
-     * This may result in the asynchronous delivery of state change
-     * events.
-     *
-     * Applications are not allowed to remove networks created by other
-     * applications.
-     *
-     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
-     *        #getConfiguredNetworks}.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean removeNetwork(int netId) {
-        try {
-            return mService.removeNetwork(netId, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow a previously configured network to be associated with. If
-     * <code>attemptConnect</code> is true, an attempt to connect to the selected
-     * network is initiated. This may result in the asynchronous delivery
-     * of state change events.
-     * <p>
-     * <b>Note:</b> Network communication may not use Wi-Fi even if Wi-Fi is connected;
-     * traffic may instead be sent through another network, such as cellular data,
-     * Bluetooth tethering, or Ethernet. For example, traffic will never use a
-     * Wi-Fi network that does not provide Internet access (e.g. a wireless
-     * printer), if another network that does offer Internet access (e.g.
-     * cellular data) is available. Applications that need to ensure that their
-     * network traffic uses Wi-Fi should use APIs such as
-     * {@link Network#bindSocket(java.net.Socket)},
-     * {@link Network#openConnection(java.net.URL)}, or
-     * {@link ConnectivityManager#bindProcessToNetwork} to do so.
-     *
-     * Applications are not allowed to enable networks created by other
-     * applications.
-     *
-     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
-     *        #getConfiguredNetworks}.
-     * @param attemptConnect The way to select a particular network to connect to is specify
-     *        {@code true} for this parameter.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}.
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean enableNetwork(int netId, boolean attemptConnect) {
-        try {
-            return mService.enableNetwork(netId, attemptConnect, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Disable a configured network. The specified network will not be
-     * a candidate for associating. This may result in the asynchronous
-     * delivery of state change events.
-     *
-     * Applications are not allowed to disable networks created by other
-     * applications.
-     *
-     * @param netId the ID of the network as returned by {@link #addNetwork} or {@link
-     *        #getConfiguredNetworks}.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean disableNetwork(int netId) {
-        try {
-            return mService.disableNetwork(netId, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Disassociate from the currently active access point. This may result
-     * in the asynchronous delivery of state change events.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean disconnect() {
-        try {
-            return mService.disconnect(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Reconnect to the currently active access point, if we are currently
-     * disconnected. This may result in the asynchronous delivery of state
-     * change events.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean reconnect() {
-        try {
-            return mService.reconnect(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Reconnect to the currently active access point, even if we are already
-     * connected. This may result in the asynchronous delivery of state
-     * change events.
-     * @return {@code true} if the operation succeeded
-     *
-     * @deprecated
-     * a) See {@link WifiNetworkSpecifier.Builder#build()} for new
-     * mechanism to trigger connection to a Wi-Fi network.
-     * b) See {@link #addNetworkSuggestions(List)},
-     * {@link #removeNetworkSuggestions(List)} for new API to add Wi-Fi networks for consideration
-     * when auto-connecting to wifi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always return false.
-     */
-    @Deprecated
-    public boolean reassociate() {
-        try {
-            return mService.reassociate(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check that the supplicant daemon is responding to requests.
-     * @return {@code true} if we were able to communicate with the supplicant and
-     * it returned the expected response to the PING message.
-     * @deprecated Will return the output of {@link #isWifiEnabled()} instead.
-     */
-    @Deprecated
-    public boolean pingSupplicant() {
-        return isWifiEnabled();
-    }
-
-    /** @hide */
-    public static final long WIFI_FEATURE_INFRA            = 0x0001L;  // Basic infrastructure mode
-    /** @hide */
-    public static final long WIFI_FEATURE_PASSPOINT        = 0x0004L;  // Support for GAS/ANQP
-    /** @hide */
-    public static final long WIFI_FEATURE_P2P              = 0x0008L;  // Wifi-Direct
-    /** @hide */
-    public static final long WIFI_FEATURE_MOBILE_HOTSPOT   = 0x0010L;  // Soft AP
-    /** @hide */
-    public static final long WIFI_FEATURE_SCANNER          = 0x0020L;  // WifiScanner APIs
-    /** @hide */
-    public static final long WIFI_FEATURE_AWARE            = 0x0040L;  // Wi-Fi AWare networking
-    /** @hide */
-    public static final long WIFI_FEATURE_D2D_RTT          = 0x0080L;  // Device-to-device RTT
-    /** @hide */
-    public static final long WIFI_FEATURE_D2AP_RTT         = 0x0100L;  // Device-to-AP RTT
-    /** @hide */
-    public static final long WIFI_FEATURE_BATCH_SCAN       = 0x0200L;  // Batched Scan (deprecated)
-    /** @hide */
-    public static final long WIFI_FEATURE_PNO              = 0x0400L;  // Preferred network offload
-    /** @hide */
-    public static final long WIFI_FEATURE_ADDITIONAL_STA   = 0x0800L;  // Support for two STAs
-    /** @hide */
-    public static final long WIFI_FEATURE_TDLS             = 0x1000L;  // Tunnel directed link setup
-    /** @hide */
-    public static final long WIFI_FEATURE_TDLS_OFFCHANNEL  = 0x2000L;  // TDLS off channel
-    /** @hide */
-    public static final long WIFI_FEATURE_EPR              = 0x4000L;  // Enhanced power reporting
-    /** @hide */
-    public static final long WIFI_FEATURE_AP_STA           = 0x8000L;  // AP STA Concurrency
-    /** @hide */
-    public static final long WIFI_FEATURE_LINK_LAYER_STATS = 0x10000L; // Link layer stats
-    /** @hide */
-    public static final long WIFI_FEATURE_LOGGER           = 0x20000L; // WiFi Logger
-    /** @hide */
-    public static final long WIFI_FEATURE_HAL_EPNO         = 0x40000L; // Enhanced PNO
-    /** @hide */
-    public static final long WIFI_FEATURE_RSSI_MONITOR     = 0x80000L; // RSSI Monitor
-    /** @hide */
-    public static final long WIFI_FEATURE_MKEEP_ALIVE      = 0x100000L; // mkeep_alive
-    /** @hide */
-    public static final long WIFI_FEATURE_CONFIG_NDO       = 0x200000L; // ND offload
-    /** @hide */
-    public static final long WIFI_FEATURE_TRANSMIT_POWER   = 0x400000L; // Capture transmit power
-    /** @hide */
-    public static final long WIFI_FEATURE_CONTROL_ROAMING  = 0x800000L; // Control firmware roaming
-    /** @hide */
-    public static final long WIFI_FEATURE_IE_WHITELIST     = 0x1000000L; // Probe IE white listing
-    /** @hide */
-    public static final long WIFI_FEATURE_SCAN_RAND        = 0x2000000L; // Random MAC & Probe seq
-    /** @hide */
-    public static final long WIFI_FEATURE_TX_POWER_LIMIT   = 0x4000000L; // Set Tx power limit
-    /** @hide */
-    public static final long WIFI_FEATURE_WPA3_SAE         = 0x8000000L; // WPA3-Personal SAE
-    /** @hide */
-    public static final long WIFI_FEATURE_WPA3_SUITE_B     = 0x10000000L; // WPA3-Enterprise Suite-B
-    /** @hide */
-    public static final long WIFI_FEATURE_OWE              = 0x20000000L; // Enhanced Open
-    /** @hide */
-    public static final long WIFI_FEATURE_LOW_LATENCY      = 0x40000000L; // Low Latency modes
-    /** @hide */
-    public static final long WIFI_FEATURE_DPP              = 0x80000000L; // DPP (Easy-Connect)
-    /** @hide */
-    public static final long WIFI_FEATURE_P2P_RAND_MAC     = 0x100000000L; // Random P2P MAC
-    /** @hide */
-    public static final long WIFI_FEATURE_CONNECTED_RAND_MAC    = 0x200000000L; // Random STA MAC
-    /** @hide */
-    public static final long WIFI_FEATURE_AP_RAND_MAC      = 0x400000000L; // Random AP MAC
-    /** @hide */
-    public static final long WIFI_FEATURE_MBO              = 0x800000000L; // MBO Support
-    /** @hide */
-    public static final long WIFI_FEATURE_OCE              = 0x1000000000L; // OCE Support
-    /** @hide */
-    public static final long WIFI_FEATURE_WAPI             = 0x2000000000L; // WAPI
-
-    /** @hide */
-    public static final long WIFI_FEATURE_FILS_SHA256     = 0x4000000000L; // FILS-SHA256
-
-    /** @hide */
-    public static final long WIFI_FEATURE_FILS_SHA384     = 0x8000000000L; // FILS-SHA384
-
-    private long getSupportedFeatures() {
-        try {
-            return mService.getSupportedFeatures();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    private boolean isFeatureSupported(long feature) {
-        return (getSupportedFeatures() & feature) == feature;
-    }
-
-    /**
-     * @return true if this adapter supports Passpoint
-     * @hide
-     */
-    public boolean isPasspointSupported() {
-        return isFeatureSupported(WIFI_FEATURE_PASSPOINT);
-    }
-
-    /**
-     * @return true if this adapter supports WifiP2pManager (Wi-Fi Direct)
-     */
-    public boolean isP2pSupported() {
-        return isFeatureSupported(WIFI_FEATURE_P2P);
-    }
-
-    /**
-     * @return true if this adapter supports portable Wi-Fi hotspot
-     * @hide
-     */
-    @SystemApi
-    public boolean isPortableHotspotSupported() {
-        return isFeatureSupported(WIFI_FEATURE_MOBILE_HOTSPOT);
-    }
-
-    /**
-     * @return true if this adapter supports WifiScanner APIs
-     * @hide
-     */
-    @SystemApi
-    public boolean isWifiScannerSupported() {
-        return isFeatureSupported(WIFI_FEATURE_SCANNER);
-    }
-
-    /**
-     * @return true if this adapter supports Neighbour Awareness Network APIs
-     * @hide
-     */
-    public boolean isWifiAwareSupported() {
-        return isFeatureSupported(WIFI_FEATURE_AWARE);
-    }
-
-    /**
-     * Query whether the device supports Station (STA) + Access point (AP) concurrency or not.
-     *
-     * @return true if this device supports STA + AP concurrency, false otherwise.
-     */
-    public boolean isStaApConcurrencySupported() {
-        return isFeatureSupported(WIFI_FEATURE_AP_STA);
-    }
-
-    /**
-     * @deprecated Please use {@link android.content.pm.PackageManager#hasSystemFeature(String)}
-     * with {@link android.content.pm.PackageManager#FEATURE_WIFI_RTT} and
-     * {@link android.content.pm.PackageManager#FEATURE_WIFI_AWARE}.
-     *
-     * @return true if this adapter supports Device-to-device RTT
-     * @hide
-     */
-    @Deprecated
-    @SystemApi
-    public boolean isDeviceToDeviceRttSupported() {
-        return isFeatureSupported(WIFI_FEATURE_D2D_RTT);
-    }
-
-    /**
-     * @deprecated Please use {@link android.content.pm.PackageManager#hasSystemFeature(String)}
-     * with {@link android.content.pm.PackageManager#FEATURE_WIFI_RTT}.
-     *
-     * @return true if this adapter supports Device-to-AP RTT
-     */
-    @Deprecated
-    public boolean isDeviceToApRttSupported() {
-        return isFeatureSupported(WIFI_FEATURE_D2AP_RTT);
-    }
-
-    /**
-     * @return true if this adapter supports offloaded connectivity scan
-     */
-    public boolean isPreferredNetworkOffloadSupported() {
-        return isFeatureSupported(WIFI_FEATURE_PNO);
-    }
-
-    /**
-     * @return true if this adapter supports multiple simultaneous connections
-     * @hide
-     */
-    public boolean isAdditionalStaSupported() {
-        return isFeatureSupported(WIFI_FEATURE_ADDITIONAL_STA);
-    }
-
-    /**
-     * @return true if this adapter supports Tunnel Directed Link Setup
-     */
-    public boolean isTdlsSupported() {
-        return isFeatureSupported(WIFI_FEATURE_TDLS);
-    }
-
-    /**
-     * @return true if this adapter supports Off Channel Tunnel Directed Link Setup
-     * @hide
-     */
-    public boolean isOffChannelTdlsSupported() {
-        return isFeatureSupported(WIFI_FEATURE_TDLS_OFFCHANNEL);
-    }
-
-    /**
-     * @return true if this adapter supports advanced power/performance counters
-     */
-    public boolean isEnhancedPowerReportingSupported() {
-        return isFeatureSupported(WIFI_FEATURE_LINK_LAYER_STATS);
-    }
-
-    /**
-     * @return true if this device supports connected MAC randomization.
-     * @hide
-     */
-    @SystemApi
-    public boolean isConnectedMacRandomizationSupported() {
-        return isFeatureSupported(WIFI_FEATURE_CONNECTED_RAND_MAC);
-    }
-
-    /**
-     * @return true if this device supports connected MAC randomization.
-     * @hide
-     */
-    @SystemApi
-    public boolean isApMacRandomizationSupported() {
-        return isFeatureSupported(WIFI_FEATURE_AP_RAND_MAC);
-    }
-
-    /**
-     * Check if the chipset supports 5GHz band.
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean is5GHzBandSupported() {
-        try {
-            return mService.is5GHzBandSupported();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check if the chipset supports 6GHz band.
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean is6GHzBandSupported() {
-        try {
-            return mService.is6GHzBandSupported();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check if the chipset supports a certain Wi-Fi standard.
-     * @param standard the IEEE 802.11 standard to check on.
-     *        valid values from {@link ScanResult}'s {@code WIFI_STANDARD_}
-     * @return {@code true} if supported, {@code false} otherwise.
-     */
-    public boolean isWifiStandardSupported(@WifiAnnotations.WifiStandard int standard) {
-        try {
-            return mService.isWifiStandardSupported(standard);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Interface for Wi-Fi activity energy info listener. Should be implemented by applications and
-     * set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface OnWifiActivityEnergyInfoListener {
-        /**
-         * Called when Wi-Fi activity energy info is available.
-         * Note: this listener is triggered at most once for each call to
-         * {@link #getWifiActivityEnergyInfoAsync}.
-         *
-         * @param info the latest {@link WifiActivityEnergyInfo}, or null if unavailable.
-         */
-        void onWifiActivityEnergyInfo(@Nullable WifiActivityEnergyInfo info);
-    }
-
-    private static class OnWifiActivityEnergyInfoProxy
-            extends IOnWifiActivityEnergyInfoListener.Stub {
-        private final Object mLock = new Object();
-        @Nullable @GuardedBy("mLock") private Executor mExecutor;
-        @Nullable @GuardedBy("mLock") private OnWifiActivityEnergyInfoListener mListener;
-
-        OnWifiActivityEnergyInfoProxy(Executor executor,
-                OnWifiActivityEnergyInfoListener listener) {
-            mExecutor = executor;
-            mListener = listener;
-        }
-
-        @Override
-        public void onWifiActivityEnergyInfo(WifiActivityEnergyInfo info) {
-            Executor executor;
-            OnWifiActivityEnergyInfoListener listener;
-            synchronized (mLock) {
-                if (mExecutor == null || mListener == null) {
-                    return;
-                }
-                executor = mExecutor;
-                listener = mListener;
-                // null out to allow garbage collection, prevent triggering listener more than once
-                mExecutor = null;
-                mListener = null;
-            }
-            Binder.clearCallingIdentity();
-            executor.execute(() -> listener.onWifiActivityEnergyInfo(info));
-        }
-    }
-
-    /**
-     * Request to get the current {@link WifiActivityEnergyInfo} asynchronously.
-     * Note: This method will return null if {@link #isEnhancedPowerReportingSupported()} returns
-     * false.
-     *
-     * @param executor the executor that the listener will be invoked on
-     * @param listener the listener that will receive the {@link WifiActivityEnergyInfo} object
-     *                 when it becomes available. The listener will be triggered at most once for
-     *                 each call to this method.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public void getWifiActivityEnergyInfoAsync(
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull OnWifiActivityEnergyInfoListener listener) {
-        Objects.requireNonNull(executor, "executor cannot be null");
-        Objects.requireNonNull(listener, "listener cannot be null");
-        try {
-            mService.getWifiActivityEnergyInfoAsync(
-                    new OnWifiActivityEnergyInfoProxy(executor, listener));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Request a scan for access points. Returns immediately. The availability
-     * of the results is made known later by means of an asynchronous event sent
-     * on completion of the scan.
-     * <p>
-     * To initiate a Wi-Fi scan, declare the
-     * {@link android.Manifest.permission#CHANGE_WIFI_STATE}
-     * permission in the manifest, and perform these steps:
-     * </p>
-     * <ol style="1">
-     * <li>Invoke the following method:
-     * {@code ((WifiManager) getSystemService(WIFI_SERVICE)).startScan()}</li>
-     * <li>
-     * Register a BroadcastReceiver to listen to
-     * {@code SCAN_RESULTS_AVAILABLE_ACTION}.</li>
-     * <li>When a broadcast is received, call:
-     * {@code ((WifiManager) getSystemService(WIFI_SERVICE)).getScanResults()}</li>
-     * </ol>
-     * @return {@code true} if the operation succeeded, i.e., the scan was initiated.
-     * @deprecated The ability for apps to trigger scan requests will be removed in a future
-     * release.
-     */
-    @Deprecated
-    public boolean startScan() {
-        return startScan(null);
-    }
-
-    /** @hide */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS)
-    public boolean startScan(WorkSource workSource) {
-        try {
-            String packageName = mContext.getOpPackageName();
-            String attributionTag = mContext.getAttributionTag();
-            return mService.startScan(packageName, attributionTag);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * WPS has been deprecated from Client mode operation.
-     *
-     * @return null
-     * @hide
-     * @deprecated This API is deprecated
-     */
-    public String getCurrentNetworkWpsNfcConfigurationToken() {
-        return null;
-    }
-
-    /**
-     * Return dynamic information about the current Wi-Fi connection, if any is active.
-     * <p>
-     * In the connected state, access to the SSID and BSSID requires
-     * the same permissions as {@link #getScanResults}. If such access is not allowed,
-     * {@link WifiInfo#getSSID} will return {@link #UNKNOWN_SSID} and
-     * {@link WifiInfo#getBSSID} will return {@code "02:00:00:00:00:00"}.
-     * {@link WifiInfo#getPasspointFqdn()} will return null.
-     * {@link WifiInfo#getPasspointProviderFriendlyName()} will return null.
-     *
-     * @return the Wi-Fi information, contained in {@link WifiInfo}.
-     */
-    public WifiInfo getConnectionInfo() {
-        try {
-            return mService.getConnectionInfo(mContext.getOpPackageName(),
-                    mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Return the results of the latest access point scan.
-     * @return the list of access points found in the most recent scan. An app must hold
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION} permission
-     * in order to get valid results.
-     */
-    public List<ScanResult> getScanResults() {
-        try {
-            return mService.getScanResults(mContext.getOpPackageName(),
-                    mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get the filtered ScanResults which match the network configurations specified by the
-     * {@code networkSuggestionsToMatch}. Suggestions which use {@link WifiConfiguration} use
-     * SSID and the security type to match. Suggestions which use {@link PasspointConfigration}
-     * use the matching rules of Hotspot 2.0.
-     * @param networkSuggestionsToMatch The list of {@link WifiNetworkSuggestion} to match against.
-     * These may or may not be suggestions which are installed on the device.
-     * @param scanResults The scan results to be filtered. Optional - if not provided(empty list),
-     * the Wi-Fi service will use the most recent scan results which the system has.
-     * @return The map of {@link WifiNetworkSuggestion} to the list of {@link ScanResult}
-     * corresponding to networks which match them.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE})
-    @NonNull
-    public Map<WifiNetworkSuggestion, List<ScanResult>> getMatchingScanResults(
-            @NonNull List<WifiNetworkSuggestion> networkSuggestionsToMatch,
-            @Nullable List<ScanResult> scanResults) {
-        if (networkSuggestionsToMatch == null) {
-            throw new IllegalArgumentException("networkSuggestions must not be null.");
-        }
-        try {
-            return mService.getMatchingScanResults(
-                    networkSuggestionsToMatch, scanResults,
-                    mContext.getOpPackageName(), mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Set if scanning is always available.
-     *
-     * If set to {@code true}, apps can issue {@link #startScan} and fetch scan results
-     * even when Wi-Fi is turned off.
-     *
-     * @param isAvailable true to enable, false to disable.
-     * @hide
-     * @see #isScanAlwaysAvailable()
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setScanAlwaysAvailable(boolean isAvailable) {
-        try {
-            mService.setScanAlwaysAvailable(isAvailable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Check if scanning is always available.
-     *
-     * If this return {@code true}, apps can issue {@link #startScan} and fetch scan results
-     * even when Wi-Fi is turned off.
-     *
-     * To change this setting, see {@link #ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE}.
-     * @deprecated The ability for apps to trigger scan requests will be removed in a future
-     * release.
-     */
-    @Deprecated
-    public boolean isScanAlwaysAvailable() {
-        try {
-            return mService.isScanAlwaysAvailable();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Tell the device to persist the current list of configured networks.
-     * <p>
-     * Note: It is possible for this method to change the network IDs of
-     * existing networks. You should assume the network IDs can be different
-     * after calling this method.
-     *
-     * @return {@code false}.
-     * @deprecated There is no need to call this method -
-     * {@link #addNetwork(WifiConfiguration)}, {@link #updateNetwork(WifiConfiguration)}
-     * and {@link #removeNetwork(int)} already persist the configurations automatically.
-     */
-    @Deprecated
-    public boolean saveConfiguration() {
-        return false;
-    }
-
-    /**
-     * Get the country code.
-     * @return the country code in ISO 3166 alpha-2 (2-letter) uppercase format, or null if
-     * there is no country code configured.
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public String getCountryCode() {
-        try {
-            return mService.getCountryCode();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Return the DHCP-assigned addresses from the last successful DHCP request,
-     * if any.
-     * @return the DHCP information
-     */
-    public DhcpInfo getDhcpInfo() {
-        try {
-            return mService.getDhcpInfo();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Enable or disable Wi-Fi.
-     * <p>
-     * Applications must have the {@link android.Manifest.permission#CHANGE_WIFI_STATE}
-     * permission to toggle wifi.
-     *
-     * @param enabled {@code true} to enable, {@code false} to disable.
-     * @return {@code false} if the request cannot be satisfied; {@code true} indicates that wifi is
-     *         either already in the requested state, or in progress toward the requested state.
-     * @throws  {@link java.lang.SecurityException} if the caller is missing required permissions.
-     *
-     * @deprecated Starting with Build.VERSION_CODES#Q, applications are not allowed to
-     * enable/disable Wi-Fi.
-     * <b>Compatibility Note:</b> For applications targeting
-     * {@link android.os.Build.VERSION_CODES#Q} or above, this API will always fail and return
-     * {@code false}. If apps are targeting an older SDK ({@link android.os.Build.VERSION_CODES#P}
-     * or below), they can continue to use this API.
-     * <p>
-     * Deprecation Exemptions:
-     * <ul>
-     * <li>Device Owner (DO), Profile Owner (PO) and system apps.
-     * </ul>
-     */
-    @Deprecated
-    public boolean setWifiEnabled(boolean enabled) {
-        try {
-            return mService.setWifiEnabled(mContext.getOpPackageName(), enabled);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Gets the Wi-Fi enabled state.
-     * @return One of {@link #WIFI_STATE_DISABLED},
-     *         {@link #WIFI_STATE_DISABLING}, {@link #WIFI_STATE_ENABLED},
-     *         {@link #WIFI_STATE_ENABLING}, {@link #WIFI_STATE_UNKNOWN}
-     * @see #isWifiEnabled()
-     */
-    public int getWifiState() {
-        try {
-            return mService.getWifiEnabledState();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Return whether Wi-Fi is enabled or disabled.
-     * @return {@code true} if Wi-Fi is enabled
-     * @see #getWifiState()
-     */
-    public boolean isWifiEnabled() {
-        return getWifiState() == WIFI_STATE_ENABLED;
-    }
-
-    /**
-     * Calculates the level of the signal. This should be used any time a signal
-     * is being shown.
-     *
-     * @param rssi The power of the signal measured in RSSI.
-     * @param numLevels The number of levels to consider in the calculated level.
-     * @return A level of the signal, given in the range of 0 to numLevels-1 (both inclusive).
-     * @deprecated Callers should use {@link #calculateSignalLevel(int)} instead to get the
-     * signal level using the system default RSSI thresholds, or otherwise compute the RSSI level
-     * themselves using their own formula.
-     */
-    @Deprecated
-    public static int calculateSignalLevel(int rssi, int numLevels) {
-        if (rssi <= MIN_RSSI) {
-            return 0;
-        } else if (rssi >= MAX_RSSI) {
-            return numLevels - 1;
-        } else {
-            float inputRange = (MAX_RSSI - MIN_RSSI);
-            float outputRange = (numLevels - 1);
-            return (int)((float)(rssi - MIN_RSSI) * outputRange / inputRange);
-        }
-    }
-
-    /**
-     * Given a raw RSSI, return the RSSI signal quality rating using the system default RSSI
-     * quality rating thresholds.
-     * @param rssi a raw RSSI value, in dBm, usually between -55 and -90
-     * @return the RSSI signal quality rating, in the range
-     * [0, {@link #getMaxSignalLevel()}], where 0 is the lowest (worst signal) RSSI
-     * rating and {@link #getMaxSignalLevel()} is the highest (best signal) RSSI rating.
-     */
-    @IntRange(from = 0)
-    public int calculateSignalLevel(int rssi) {
-        try {
-            return mService.calculateSignalLevel(rssi);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get the system default maximum signal level.
-     * This is the maximum RSSI level returned by {@link #calculateSignalLevel(int)}.
-     */
-    @IntRange(from = 0)
-    public int getMaxSignalLevel() {
-        return calculateSignalLevel(Integer.MAX_VALUE);
-    }
-
-    /**
-     * Compares two signal strengths.
-     *
-     * @param rssiA The power of the first signal measured in RSSI.
-     * @param rssiB The power of the second signal measured in RSSI.
-     * @return Returns <0 if the first signal is weaker than the second signal,
-     *         0 if the two signals have the same strength, and >0 if the first
-     *         signal is stronger than the second signal.
-     */
-    public static int compareSignalLevel(int rssiA, int rssiB) {
-        return rssiA - rssiB;
-    }
-
-    /**
-     * Call allowing ConnectivityService to update WifiService with interface mode changes.
-     *
-     * @param ifaceName String name of the updated interface, or null to represent all interfaces
-     * @param mode int representing the new mode, one of:
-     *             {@link #IFACE_IP_MODE_TETHERED},
-     *             {@link #IFACE_IP_MODE_LOCAL_ONLY},
-     *             {@link #IFACE_IP_MODE_CONFIGURATION_ERROR},
-     *             {@link #IFACE_IP_MODE_UNSPECIFIED}
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
-    })
-    public void updateInterfaceIpState(@Nullable String ifaceName, @IfaceIpMode int mode) {
-        try {
-            mService.updateInterfaceIpState(ifaceName, mode);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Start Soft AP (hotspot) mode for tethering purposes with the specified configuration.
-     * Note that starting Soft AP mode may disable station mode operation if the device does not
-     * support concurrency.
-     * @param wifiConfig SSID, security and channel details as part of WifiConfiguration, or null to
-     *                   use the persisted Soft AP configuration that was previously set using
-     *                   {@link #setWifiApConfiguration(WifiConfiguration)}.
-     * @return {@code true} if the operation succeeded, {@code false} otherwise
-     *
-     * @hide
-     */
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
-    })
-    public boolean startSoftAp(@Nullable WifiConfiguration wifiConfig) {
-        try {
-            return mService.startSoftAp(wifiConfig);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Start Soft AP (hotspot) mode for tethering purposes with the specified configuration.
-     * Note that starting Soft AP mode may disable station mode operation if the device does not
-     * support concurrency.
-     * @param softApConfig A valid SoftApConfiguration specifying the configuration of the SAP,
-     *                     or null to use the persisted Soft AP configuration that was previously
-     *                     set using {@link #setSoftApConfiguration(softApConfiguration)}.
-     * @return {@code true} if the operation succeeded, {@code false} otherwise
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
-    })
-    public boolean startTetheredHotspot(@Nullable SoftApConfiguration softApConfig) {
-        try {
-            return mService.startTetheredHotspot(softApConfig);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-
-    /**
-     * Stop SoftAp mode.
-     * Note that stopping softap mode will restore the previous wifi mode.
-     * @return {@code true} if the operation succeeds, {@code false} otherwise
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_STACK,
-            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
-    })
-    public boolean stopSoftAp() {
-        try {
-            return mService.stopSoftAp();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Request a local only hotspot that an application can use to communicate between co-located
-     * devices connected to the created WiFi hotspot.  The network created by this method will not
-     * have Internet access.  Each application can make a single request for the hotspot, but
-     * multiple applications could be requesting the hotspot at the same time.  When multiple
-     * applications have successfully registered concurrently, they will be sharing the underlying
-     * hotspot. {@link LocalOnlyHotspotCallback#onStarted(LocalOnlyHotspotReservation)} is called
-     * when the hotspot is ready for use by the application.
-     * <p>
-     * Each application can make a single active call to this method. The {@link
-     * LocalOnlyHotspotCallback#onStarted(LocalOnlyHotspotReservation)} callback supplies the
-     * requestor with a {@link LocalOnlyHotspotReservation} that contains a
-     * {@link SoftApConfiguration} with the SSID, security type and credentials needed to connect
-     * to the hotspot.  Communicating this information is up to the application.
-     * <p>
-     * If the LocalOnlyHotspot cannot be created, the {@link LocalOnlyHotspotCallback#onFailed(int)}
-     * method will be called. Example failures include errors bringing up the network or if
-     * there is an incompatible operating mode.  For example, if the user is currently using Wifi
-     * Tethering to provide an upstream to another device, LocalOnlyHotspot will not start due to
-     * an incompatible mode. The possible error codes include:
-     * {@link LocalOnlyHotspotCallback#ERROR_NO_CHANNEL},
-     * {@link LocalOnlyHotspotCallback#ERROR_GENERIC},
-     * {@link LocalOnlyHotspotCallback#ERROR_INCOMPATIBLE_MODE} and
-     * {@link LocalOnlyHotspotCallback#ERROR_TETHERING_DISALLOWED}.
-     * <p>
-     * Internally, requests will be tracked to prevent the hotspot from being torn down while apps
-     * are still using it.  The {@link LocalOnlyHotspotReservation} object passed in the  {@link
-     * LocalOnlyHotspotCallback#onStarted(LocalOnlyHotspotReservation)} call should be closed when
-     * the LocalOnlyHotspot is no longer needed using {@link LocalOnlyHotspotReservation#close()}.
-     * Since the hotspot may be shared among multiple applications, removing the final registered
-     * application request will trigger the hotspot teardown.  This means that applications should
-     * not listen to broadcasts containing wifi state to determine if the hotspot was stopped after
-     * they are done using it. Additionally, once {@link LocalOnlyHotspotReservation#close()} is
-     * called, applications will not receive callbacks of any kind.
-     * <p>
-     * Applications should be aware that the user may also stop the LocalOnlyHotspot through the
-     * Settings UI; it is not guaranteed to stay up as long as there is a requesting application.
-     * The requestors will be notified of this case via
-     * {@link LocalOnlyHotspotCallback#onStopped()}.  Other cases may arise where the hotspot is
-     * torn down (Emergency mode, etc).  Application developers should be aware that it can stop
-     * unexpectedly, but they will receive a notification if they have properly registered.
-     * <p>
-     * Applications should also be aware that this network will be shared with other applications.
-     * Applications are responsible for protecting their data on this network (e.g., TLS).
-     * <p>
-     * Applications need to have the following permissions to start LocalOnlyHotspot: {@link
-     * android.Manifest.permission#CHANGE_WIFI_STATE} and {@link
-     * android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}.  Callers without
-     * the permissions will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     * @param callback LocalOnlyHotspotCallback for the application to receive updates about
-     * operating status.
-     * @param handler Handler to be used for callbacks.  If the caller passes a null Handler, the
-     * main thread will be used.
-     */
-    @RequiresPermission(allOf = {
-            android.Manifest.permission.CHANGE_WIFI_STATE,
-            android.Manifest.permission.ACCESS_FINE_LOCATION})
-    public void startLocalOnlyHotspot(LocalOnlyHotspotCallback callback,
-            @Nullable Handler handler) {
-        Executor executor = handler == null ? null : new HandlerExecutor(handler);
-        startLocalOnlyHotspotInternal(null, executor, callback);
-    }
-
-    /**
-     * Starts a local-only hotspot with a specific configuration applied. See
-     * {@link #startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)}.
-     *
-     * Applications need either {@link android.Manifest.permission#NETWORK_SETUP_WIZARD} or
-     * {@link android.Manifest.permission#NETWORK_SETTINGS} to call this method.
-     *
-     * Since custom configuration settings may be incompatible with each other, the hotspot started
-     * through this method cannot coexist with another hotspot created through
-     * startLocalOnlyHotspot. If this is attempted, the first hotspot request wins and others
-     * receive {@link LocalOnlyHotspotCallback#ERROR_GENERIC} through
-     * {@link LocalOnlyHotspotCallback#onFailed}.
-     *
-     * @param config Custom configuration for the hotspot. See {@link SoftApConfiguration}.
-     * @param executor Executor to run callback methods on, or null to use the main thread.
-     * @param callback Callback object for updates about hotspot status, or null for no updates.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD})
-    public void startLocalOnlyHotspot(@NonNull SoftApConfiguration config,
-            @Nullable Executor executor,
-            @Nullable LocalOnlyHotspotCallback callback) {
-        Objects.requireNonNull(config);
-        startLocalOnlyHotspotInternal(config, executor, callback);
-    }
-
-    /**
-     * Common implementation of both configurable and non-configurable LOHS.
-     *
-     * @param config App-specified configuration, or null. When present, additional privileges are
-     *               required, and the hotspot cannot be shared with other clients.
-     * @param executor Executor to run callback methods on, or null to use the main thread.
-     * @param callback Callback object for updates about hotspot status, or null for no updates.
-     */
-    private void startLocalOnlyHotspotInternal(
-            @Nullable SoftApConfiguration config,
-            @Nullable Executor executor,
-            @Nullable LocalOnlyHotspotCallback callback) {
-        if (executor == null) {
-            executor = mContext.getMainExecutor();
-        }
-        synchronized (mLock) {
-            LocalOnlyHotspotCallbackProxy proxy =
-                    new LocalOnlyHotspotCallbackProxy(this, executor, callback);
-            try {
-                String packageName = mContext.getOpPackageName();
-                String featureId = mContext.getAttributionTag();
-                int returnCode = mService.startLocalOnlyHotspot(proxy, packageName, featureId,
-                        config);
-                if (returnCode != LocalOnlyHotspotCallback.REQUEST_REGISTERED) {
-                    // Send message to the proxy to make sure we call back on the correct thread
-                    proxy.onHotspotFailed(returnCode);
-                    return;
-                }
-                mLOHSCallbackProxy = proxy;
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Cancels a pending local only hotspot request.  This can be used by the calling application to
-     * cancel the existing request if the provided callback has not been triggered.  Calling this
-     * method will be equivalent to closing the returned LocalOnlyHotspotReservation, but it is not
-     * explicitly required.
-     * <p>
-     * When cancelling this request, application developers should be aware that there may still be
-     * outstanding local only hotspot requests and the hotspot may still start, or continue running.
-     * Additionally, if a callback was registered, it will no longer be triggered after calling
-     * cancel.
-     *
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public void cancelLocalOnlyHotspotRequest() {
-        synchronized (mLock) {
-            stopLocalOnlyHotspot();
-        }
-    }
-
-    /**
-     *  Method used to inform WifiService that the LocalOnlyHotspot is no longer needed.  This
-     *  method is used by WifiManager to release LocalOnlyHotspotReservations held by calling
-     *  applications and removes the internal tracking for the hotspot request.  When all requesting
-     *  applications are finished using the hotspot, it will be stopped and WiFi will return to the
-     *  previous operational mode.
-     *
-     *  This method should not be called by applications.  Instead, they should call the close()
-     *  method on their LocalOnlyHotspotReservation.
-     */
-    private void stopLocalOnlyHotspot() {
-        synchronized (mLock) {
-            if (mLOHSCallbackProxy == null) {
-                // nothing to do, the callback was already cleaned up.
-                return;
-            }
-            mLOHSCallbackProxy = null;
-            try {
-                mService.stopLocalOnlyHotspot();
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Allow callers (Settings UI) to watch LocalOnlyHotspot state changes.  Callers will
-     * receive a {@link LocalOnlyHotspotSubscription} object as a parameter of the
-     * {@link LocalOnlyHotspotObserver#onRegistered(LocalOnlyHotspotSubscription)}. The registered
-     * callers will receive the {@link LocalOnlyHotspotObserver#onStarted(SoftApConfiguration)} and
-     * {@link LocalOnlyHotspotObserver#onStopped()} callbacks.
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION ACCESS_FINE_LOCATION}
-     * permission.  Callers without the permission will trigger a
-     * {@link java.lang.SecurityException}.
-     * <p>
-     * @param observer LocalOnlyHotspotObserver callback.
-     * @param handler Handler to use for callbacks
-     *
-     * @hide
-     */
-    public void watchLocalOnlyHotspot(LocalOnlyHotspotObserver observer,
-            @Nullable Handler handler) {
-        Executor executor = handler == null ? mContext.getMainExecutor()
-                : new HandlerExecutor(handler);
-        synchronized (mLock) {
-            mLOHSObserverProxy =
-                    new LocalOnlyHotspotObserverProxy(this, executor, observer);
-            try {
-                mService.startWatchLocalOnlyHotspot(mLOHSObserverProxy);
-                mLOHSObserverProxy.registered();
-            } catch (RemoteException e) {
-                mLOHSObserverProxy = null;
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Allow callers to stop watching LocalOnlyHotspot state changes.  After calling this method,
-     * applications will no longer receive callbacks.
-     *
-     * @hide
-     */
-    public void unregisterLocalOnlyHotspotObserver() {
-        synchronized (mLock) {
-            if (mLOHSObserverProxy == null) {
-                // nothing to do, the callback was already cleaned up
-                return;
-            }
-            mLOHSObserverProxy = null;
-            try {
-                mService.stopWatchLocalOnlyHotspot();
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Gets the tethered Wi-Fi hotspot enabled state.
-     * @return One of {@link #WIFI_AP_STATE_DISABLED},
-     *         {@link #WIFI_AP_STATE_DISABLING}, {@link #WIFI_AP_STATE_ENABLED},
-     *         {@link #WIFI_AP_STATE_ENABLING}, {@link #WIFI_AP_STATE_FAILED}
-     * @see #isWifiApEnabled()
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
-    public int getWifiApState() {
-        try {
-            return mService.getWifiApEnabledState();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Return whether tethered Wi-Fi AP is enabled or disabled.
-     * @return {@code true} if tethered  Wi-Fi AP is enabled
-     * @see #getWifiApState()
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
-    public boolean isWifiApEnabled() {
-        return getWifiApState() == WIFI_AP_STATE_ENABLED;
-    }
-
-    /**
-     * Gets the tethered Wi-Fi AP Configuration.
-     * @return AP details in WifiConfiguration
-     *
-     * Note that AP detail may contain configuration which is cannot be represented
-     * by the legacy WifiConfiguration, in such cases a null will be returned.
-     *
-     * @deprecated This API is deprecated. Use {@link #getSoftApConfiguration()} instead.
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE)
-    @Deprecated
-    public WifiConfiguration getWifiApConfiguration() {
-        try {
-            return mService.getWifiApConfiguration();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Gets the Wi-Fi tethered AP Configuration.
-     * @return AP details in {@link SoftApConfiguration}
-     *
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public SoftApConfiguration getSoftApConfiguration() {
-        try {
-            return mService.getSoftApConfiguration();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Sets the tethered Wi-Fi AP Configuration.
-     * @return {@code true} if the operation succeeded, {@code false} otherwise
-     *
-     * @deprecated This API is deprecated. Use {@link #setSoftApConfiguration(SoftApConfiguration)}
-     * instead.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE)
-    @Deprecated
-    public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) {
-        try {
-            return mService.setWifiApConfiguration(wifiConfig, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Sets the tethered Wi-Fi AP Configuration.
-     *
-     * If the API is called while the tethered soft AP is enabled, the configuration will apply to
-     * the current soft AP if the new configuration only includes
-     * {@link SoftApConfiguration.Builder#setMaxNumberOfClients(int)}
-     * or {@link SoftApConfiguration.Builder#setShutdownTimeoutMillis(long)}
-     * or {@link SoftApConfiguration.Builder#setClientControlByUserEnabled(boolean)}
-     * or {@link SoftApConfiguration.Builder#setBlockedClientList(List)}
-     * or {@link SoftApConfiguration.Builder#setAllowedClientList(List)}
-     *
-     * Otherwise, the configuration changes will be applied when the Soft AP is next started
-     * (the framework will not stop/start the AP).
-     *
-     * @param softApConfig  A valid SoftApConfiguration specifying the configuration of the SAP.
-     * @return {@code true} if the operation succeeded, {@code false} otherwise
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public boolean setSoftApConfiguration(@NonNull SoftApConfiguration softApConfig) {
-        try {
-            return mService.setSoftApConfiguration(
-                    softApConfig, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Enable/Disable TDLS on a specific local route.
-     *
-     * <p>
-     * TDLS enables two wireless endpoints to talk to each other directly
-     * without going through the access point that is managing the local
-     * network. It saves bandwidth and improves quality of the link.
-     * </p>
-     * <p>
-     * This API enables/disables the option of using TDLS. If enabled, the
-     * underlying hardware is free to use TDLS or a hop through the access
-     * point. If disabled, existing TDLS session is torn down and
-     * hardware is restricted to use access point for transferring wireless
-     * packets. Default value for all routes is 'disabled', meaning restricted
-     * to use access point for transferring packets.
-     * </p>
-     *
-     * @param remoteIPAddress IP address of the endpoint to setup TDLS with
-     * @param enable true = setup and false = tear down TDLS
-     */
-    public void setTdlsEnabled(InetAddress remoteIPAddress, boolean enable) {
-        try {
-            mService.enableTdls(remoteIPAddress.getHostAddress(), enable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Similar to {@link #setTdlsEnabled(InetAddress, boolean) }, except
-     * this version allows you to specify remote endpoint with a MAC address.
-     * @param remoteMacAddress MAC address of the remote endpoint such as 00:00:0c:9f:f2:ab
-     * @param enable true = setup and false = tear down TDLS
-     */
-    public void setTdlsEnabledWithMacAddress(String remoteMacAddress, boolean enable) {
-        try {
-            mService.enableTdlsWithMacAddress(remoteMacAddress, enable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed due to an internal error.
-     * @hide
-     */
-    public static final int ERROR                       = 0;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation is already in progress
-     * @hide
-     */
-    public static final int IN_PROGRESS                 = 1;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed because the framework is busy and
-     * unable to service the request
-     * @hide
-     */
-    public static final int BUSY                        = 2;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef({ERROR, IN_PROGRESS, BUSY})
-    public @interface ActionListenerFailureReason {}
-
-    /* WPS specific errors */
-    /** WPS overlap detected
-     * @deprecated This is deprecated
-     */
-    public static final int WPS_OVERLAP_ERROR           = 3;
-    /** WEP on WPS is prohibited
-     * @deprecated This is deprecated
-     */
-    public static final int WPS_WEP_PROHIBITED          = 4;
-    /** TKIP only prohibited
-     * @deprecated This is deprecated
-     */
-    public static final int WPS_TKIP_ONLY_PROHIBITED    = 5;
-    /** Authentication failure on WPS
-     * @deprecated This is deprecated
-     */
-    public static final int WPS_AUTH_FAILURE            = 6;
-    /** WPS timed out
-     * @deprecated This is deprecated
-     */
-    public static final int WPS_TIMED_OUT               = 7;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed due to invalid inputs
-     * @hide
-     */
-    public static final int INVALID_ARGS                = 8;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed due to user permissions.
-     * @hide
-     */
-    public static final int NOT_AUTHORIZED              = 9;
-
-    /**
-     * Interface for callback invocation on an application action
-     * @hide
-     */
-    @SystemApi
-    public interface ActionListener {
-        /**
-         * The operation succeeded.
-         */
-        void onSuccess();
-        /**
-         * The operation failed.
-         * @param reason The reason for failure depends on the operation.
-         */
-        void onFailure(@ActionListenerFailureReason int reason);
-    }
-
-    /** Interface for callback invocation on a start WPS action
-     * @deprecated This is deprecated
-     */
-    public static abstract class WpsCallback {
-
-        /** WPS start succeeded
-         * @deprecated This API is deprecated
-         */
-        public abstract void onStarted(String pin);
-
-        /** WPS operation completed successfully
-         * @deprecated This API is deprecated
-         */
-        public abstract void onSucceeded();
-
-        /**
-         * WPS operation failed
-         * @param reason The reason for failure could be one of
-         * {@link #WPS_TKIP_ONLY_PROHIBITED}, {@link #WPS_OVERLAP_ERROR},
-         * {@link #WPS_WEP_PROHIBITED}, {@link #WPS_TIMED_OUT} or {@link #WPS_AUTH_FAILURE}
-         * and some generic errors.
-         * @deprecated This API is deprecated
-         */
-        public abstract void onFailed(int reason);
-    }
-
-    /**
-     * Base class for soft AP callback. Should be extended by applications and set when calling
-     * {@link WifiManager#registerSoftApCallback(Executor, SoftApCallback)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface SoftApCallback {
-        /**
-         * Called when soft AP state changes.
-         *
-         * @param state         the new AP state. One of {@link #WIFI_AP_STATE_DISABLED},
-         *                      {@link #WIFI_AP_STATE_DISABLING}, {@link #WIFI_AP_STATE_ENABLED},
-         *                      {@link #WIFI_AP_STATE_ENABLING}, {@link #WIFI_AP_STATE_FAILED}
-         * @param failureReason reason when in failed state. One of
-         *                      {@link #SAP_START_FAILURE_GENERAL},
-         *                      {@link #SAP_START_FAILURE_NO_CHANNEL},
-         *                      {@link #SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION}
-         */
-        default void onStateChanged(@WifiApState int state, @SapStartFailure int failureReason) {}
-
-        /**
-         * Called when the connected clients to soft AP changes.
-         *
-         * @param clients the currently connected clients
-         */
-        default void onConnectedClientsChanged(@NonNull List<WifiClient> clients) {}
-
-        /**
-         * Called when information of softap changes.
-         *
-         * @param softApInfo is the softap information. {@link SoftApInfo}
-         */
-        default void onInfoChanged(@NonNull SoftApInfo softApInfo) {
-            // Do nothing: can be updated to add SoftApInfo details (e.g. channel) to the UI.
-        }
-
-        /**
-         * Called when capability of softap changes.
-         *
-         * @param softApCapability is the softap capability. {@link SoftApCapability}
-         */
-        default void onCapabilityChanged(@NonNull SoftApCapability softApCapability) {
-            // Do nothing: can be updated to add SoftApCapability details (e.g. meximum supported
-            // client number) to the UI.
-        }
-
-        /**
-         * Called when client trying to connect but device blocked the client with specific reason.
-         *
-         * Can be used to ask user to update client to allowed list or blocked list
-         * when reason is {@link SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER}, or
-         * indicate the block due to maximum supported client number limitation when reason is
-         * {@link SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS}.
-         *
-         * @param client the currently blocked client.
-         * @param blockedReason one of blocked reason from {@link SapClientBlockedReason}
-         */
-        default void onBlockedClientConnecting(@NonNull WifiClient client,
-                @SapClientBlockedReason int blockedReason) {
-            // Do nothing: can be used to ask user to update client to allowed list or blocked list.
-        }
-    }
-
-    /**
-     * Callback proxy for SoftApCallback objects.
-     *
-     * @hide
-     */
-    private class SoftApCallbackProxy extends ISoftApCallback.Stub {
-        private final Executor mExecutor;
-        private final SoftApCallback mCallback;
-
-        SoftApCallbackProxy(Executor executor, SoftApCallback callback) {
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onStateChanged(int state, int failureReason) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy: onStateChanged: state=" + state
-                        + ", failureReason=" + failureReason);
-            }
-
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onStateChanged(state, failureReason);
-            });
-        }
-
-        @Override
-        public void onConnectedClientsChanged(List<WifiClient> clients) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy: onConnectedClientsChanged: clients="
-                        + clients.size() + " clients");
-            }
-
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onConnectedClientsChanged(clients);
-            });
-        }
-
-        @Override
-        public void onInfoChanged(SoftApInfo softApInfo) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy: onInfoChange: softApInfo=" + softApInfo);
-            }
-
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onInfoChanged(softApInfo);
-            });
-        }
-
-        @Override
-        public void onCapabilityChanged(SoftApCapability capability) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy: onCapabilityChanged: SoftApCapability="
-                        + capability);
-            }
-
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onCapabilityChanged(capability);
-            });
-        }
-
-        @Override
-        public void onBlockedClientConnecting(@NonNull WifiClient client, int blockedReason) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "SoftApCallbackProxy: onBlockedClientConnecting: client=" + client
-                        + " with reason = " + blockedReason);
-            }
-
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onBlockedClientConnecting(client, blockedReason);
-            });
-        }
-    }
-
-    /**
-     * Registers a callback for Soft AP. See {@link SoftApCallback}. Caller will receive the
-     * following callbacks on registration:
-     * <ul>
-     * <li> {@link SoftApCallback#onStateChanged(int, int)}</li>
-     * <li> {@link SoftApCallback#onConnectedClientsChanged(List<WifiClient>)}</li>
-     * <li> {@link SoftApCallback#onInfoChanged(SoftApInfo)}</li>
-     * <li> {@link SoftApCallback#onCapabilityChanged(SoftApCapability)}</li>
-     * </ul>
-     * These will be dispatched on registration to provide the caller with the current state
-     * (and are not an indication of any current change). Note that receiving an immediate
-     * WIFI_AP_STATE_FAILED value for soft AP state indicates that the latest attempt to start
-     * soft AP has failed. Caller can unregister a previously registered callback using
-     * {@link #unregisterSoftApCallback}
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#NETWORK_SETTINGS NETWORK_SETTINGS} permission. Callers
-     * without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param executor The Executor on whose thread to execute the callbacks of the {@code callback}
-     *                 object.
-     * @param callback Callback for soft AP events
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void registerSoftApCallback(@NonNull @CallbackExecutor Executor executor,
-            @NonNull SoftApCallback callback) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "registerSoftApCallback: callback=" + callback + ", executor=" + executor);
-
-        Binder binder = new Binder();
-        try {
-            mService.registerSoftApCallback(
-                    binder, new SoftApCallbackProxy(executor, callback), callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow callers to unregister a previously registered callback. After calling this method,
-     * applications will no longer receive soft AP events.
-     *
-     * @param callback Callback to unregister for soft AP events
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void unregisterSoftApCallback(@NonNull SoftApCallback callback) {
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "unregisterSoftApCallback: callback=" + callback);
-
-        try {
-            mService.unregisterSoftApCallback(callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * LocalOnlyHotspotReservation that contains the {@link SoftApConfiguration} for the active
-     * LocalOnlyHotspot request.
-     * <p>
-     * Applications requesting LocalOnlyHotspot for sharing will receive an instance of the
-     * LocalOnlyHotspotReservation in the
-     * {@link LocalOnlyHotspotCallback#onStarted(LocalOnlyHotspotReservation)} call.  This
-     * reservation contains the relevant {@link SoftApConfiguration}.
-     * When an application is done with the LocalOnlyHotspot, they should call {@link
-     * LocalOnlyHotspotReservation#close()}.  Once this happens, the application will not receive
-     * any further callbacks. If the LocalOnlyHotspot is stopped due to a
-     * user triggered mode change, applications will be notified via the {@link
-     * LocalOnlyHotspotCallback#onStopped()} callback.
-     */
-    public class LocalOnlyHotspotReservation implements AutoCloseable {
-
-        private final CloseGuard mCloseGuard = new CloseGuard();
-        private final SoftApConfiguration mSoftApConfig;
-        private final WifiConfiguration mWifiConfig;
-        private boolean mClosed = false;
-
-        /** @hide */
-        @VisibleForTesting
-        public LocalOnlyHotspotReservation(SoftApConfiguration config) {
-            mSoftApConfig = config;
-            mWifiConfig = config.toWifiConfiguration();
-            mCloseGuard.open("close");
-        }
-
-        /**
-         * Returns the {@link WifiConfiguration} of the current Local Only Hotspot (LOHS).
-         * May be null if hotspot enabled and security type is not
-         * {@code WifiConfiguration.KeyMgmt.None} or {@code WifiConfiguration.KeyMgmt.WPA2_PSK}.
-         *
-         * @deprecated Use {@code WifiManager#getSoftApConfiguration()} to get the
-         * LOHS configuration.
-         */
-        @Deprecated
-        @Nullable
-        public WifiConfiguration getWifiConfiguration() {
-            return mWifiConfig;
-        }
-
-        /**
-         * Returns the {@link SoftApConfiguration} of the current Local Only Hotspot (LOHS).
-         */
-        @NonNull
-        public SoftApConfiguration getSoftApConfiguration() {
-            return mSoftApConfig;
-        }
-
-        @Override
-        public void close() {
-            try {
-                synchronized (mLock) {
-                    if (!mClosed) {
-                        mClosed = true;
-                        stopLocalOnlyHotspot();
-                        mCloseGuard.close();
-                    }
-                }
-            } catch (Exception e) {
-                Log.e(TAG, "Failed to stop Local Only Hotspot.");
-            } finally {
-                Reference.reachabilityFence(this);
-            }
-        }
-
-        @Override
-        protected void finalize() throws Throwable {
-            try {
-                if (mCloseGuard != null) {
-                    mCloseGuard.warnIfOpen();
-                }
-                close();
-            } finally {
-                super.finalize();
-            }
-        }
-    }
-
-    /**
-     * Callback class for applications to receive updates about the LocalOnlyHotspot status.
-     */
-    public static class LocalOnlyHotspotCallback {
-        /** @hide */
-        public static final int REQUEST_REGISTERED = 0;
-
-        public static final int ERROR_NO_CHANNEL = 1;
-        public static final int ERROR_GENERIC = 2;
-        public static final int ERROR_INCOMPATIBLE_MODE = 3;
-        public static final int ERROR_TETHERING_DISALLOWED = 4;
-
-        /** LocalOnlyHotspot start succeeded. */
-        public void onStarted(LocalOnlyHotspotReservation reservation) {};
-
-        /**
-         * LocalOnlyHotspot stopped.
-         * <p>
-         * The LocalOnlyHotspot can be disabled at any time by the user.  When this happens,
-         * applications will be notified that it was stopped. This will not be invoked when an
-         * application calls {@link LocalOnlyHotspotReservation#close()}.
-         */
-        public void onStopped() {};
-
-        /**
-         * LocalOnlyHotspot failed to start.
-         * <p>
-         * Applications can attempt to call
-         * {@link WifiManager#startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)} again at
-         * a later time.
-         * <p>
-         * @param reason The reason for failure could be one of: {@link
-         * #ERROR_TETHERING_DISALLOWED}, {@link #ERROR_INCOMPATIBLE_MODE},
-         * {@link #ERROR_NO_CHANNEL}, or {@link #ERROR_GENERIC}.
-         */
-        public void onFailed(int reason) { };
-    }
-
-    /**
-     * Callback proxy for LocalOnlyHotspotCallback objects.
-     */
-    private static class LocalOnlyHotspotCallbackProxy extends ILocalOnlyHotspotCallback.Stub {
-        private final WeakReference<WifiManager> mWifiManager;
-        private final Executor mExecutor;
-        private final LocalOnlyHotspotCallback mCallback;
-
-        /**
-         * Constructs a {@link LocalOnlyHotspotCallbackProxy} using the specified executor.  All
-         * callbacks will run using the given executor.
-         *
-         * @param manager WifiManager
-         * @param executor Executor for delivering callbacks.
-         * @param callback LocalOnlyHotspotCallback to notify the calling application, or null.
-         */
-        LocalOnlyHotspotCallbackProxy(
-                @NonNull WifiManager manager,
-                @NonNull Executor executor,
-                @Nullable LocalOnlyHotspotCallback callback) {
-            mWifiManager = new WeakReference<>(manager);
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onHotspotStarted(SoftApConfiguration config) {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            if (config == null) {
-                Log.e(TAG, "LocalOnlyHotspotCallbackProxy: config cannot be null.");
-                onHotspotFailed(LocalOnlyHotspotCallback.ERROR_GENERIC);
-                return;
-            }
-            final LocalOnlyHotspotReservation reservation =
-                    manager.new LocalOnlyHotspotReservation(config);
-            if (mCallback == null) return;
-            mExecutor.execute(() -> mCallback.onStarted(reservation));
-        }
-
-        @Override
-        public void onHotspotStopped() {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            Log.w(TAG, "LocalOnlyHotspotCallbackProxy: hotspot stopped");
-            if (mCallback == null) return;
-            mExecutor.execute(() -> mCallback.onStopped());
-        }
-
-        @Override
-        public void onHotspotFailed(int reason) {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            Log.w(TAG, "LocalOnlyHotspotCallbackProxy: failed to start.  reason: "
-                    + reason);
-            if (mCallback == null) return;
-            mExecutor.execute(() -> mCallback.onFailed(reason));
-        }
-    }
-
-    /**
-     * LocalOnlyHotspotSubscription that is an AutoCloseable object for tracking applications
-     * watching for LocalOnlyHotspot changes.
-     *
-     * @hide
-     */
-    public class LocalOnlyHotspotSubscription implements AutoCloseable {
-        private final CloseGuard mCloseGuard = new CloseGuard();
-
-        /** @hide */
-        @VisibleForTesting
-        public LocalOnlyHotspotSubscription() {
-            mCloseGuard.open("close");
-        }
-
-        @Override
-        public void close() {
-            try {
-                unregisterLocalOnlyHotspotObserver();
-                mCloseGuard.close();
-            } catch (Exception e) {
-                Log.e(TAG, "Failed to unregister LocalOnlyHotspotObserver.");
-            } finally {
-                Reference.reachabilityFence(this);
-            }
-        }
-
-        @Override
-        protected void finalize() throws Throwable {
-            try {
-                if (mCloseGuard != null) {
-                    mCloseGuard.warnIfOpen();
-                }
-                close();
-            } finally {
-                super.finalize();
-            }
-        }
-    }
-
-    /**
-     * Class to notify calling applications that watch for changes in LocalOnlyHotspot of updates.
-     *
-     * @hide
-     */
-    public static class LocalOnlyHotspotObserver {
-        /**
-         * Confirm registration for LocalOnlyHotspotChanges by returning a
-         * LocalOnlyHotspotSubscription.
-         */
-        public void onRegistered(LocalOnlyHotspotSubscription subscription) {};
-
-        /**
-         * LocalOnlyHotspot started with the supplied config.
-         */
-        public void onStarted(SoftApConfiguration config) {};
-
-        /**
-         * LocalOnlyHotspot stopped.
-         */
-        public void onStopped() {};
-    }
-
-    /**
-     * Callback proxy for LocalOnlyHotspotObserver objects.
-     */
-    private static class LocalOnlyHotspotObserverProxy extends ILocalOnlyHotspotCallback.Stub {
-        private final WeakReference<WifiManager> mWifiManager;
-        private final Executor mExecutor;
-        private final LocalOnlyHotspotObserver mObserver;
-
-        /**
-         * Constructs a {@link LocalOnlyHotspotObserverProxy} using the specified looper.
-         * All callbacks will be delivered on the thread of the specified looper.
-         *
-         * @param manager WifiManager
-         * @param executor Executor for delivering callbacks
-         * @param observer LocalOnlyHotspotObserver to notify the calling application.
-         */
-        LocalOnlyHotspotObserverProxy(WifiManager manager, Executor executor,
-                final LocalOnlyHotspotObserver observer) {
-            mWifiManager = new WeakReference<>(manager);
-            mExecutor = executor;
-            mObserver = observer;
-        }
-
-        public void registered() throws RemoteException {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            mExecutor.execute(() ->
-                    mObserver.onRegistered(manager.new LocalOnlyHotspotSubscription()));
-        }
-
-        @Override
-        public void onHotspotStarted(SoftApConfiguration config) {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            if (config == null) {
-                Log.e(TAG, "LocalOnlyHotspotObserverProxy: config cannot be null.");
-                return;
-            }
-            mExecutor.execute(() -> mObserver.onStarted(config));
-        }
-
-        @Override
-        public void onHotspotStopped() {
-            WifiManager manager = mWifiManager.get();
-            if (manager == null) return;
-
-            mExecutor.execute(() -> mObserver.onStopped());
-        }
-
-        @Override
-        public void onHotspotFailed(int reason) {
-            // do nothing
-        }
-    }
-
-    /**
-     * Callback proxy for ActionListener objects.
-     */
-    private class ActionListenerProxy extends IActionListener.Stub {
-        private final String mActionTag;
-        private final Handler mHandler;
-        private final ActionListener mCallback;
-
-        ActionListenerProxy(String actionTag, Looper looper, ActionListener callback) {
-            mActionTag = actionTag;
-            mHandler = new Handler(looper);
-            mCallback = callback;
-        }
-
-        @Override
-        public void onSuccess() {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "ActionListenerProxy:" + mActionTag + ": onSuccess");
-            }
-            mHandler.post(() -> {
-                mCallback.onSuccess();
-            });
-        }
-
-        @Override
-        public void onFailure(@ActionListenerFailureReason int reason) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "ActionListenerProxy:" + mActionTag + ": onFailure=" + reason);
-            }
-            mHandler.post(() -> {
-                mCallback.onFailure(reason);
-            });
-        }
-    }
-
-    private void connectInternal(@Nullable WifiConfiguration config, int networkId,
-            @Nullable ActionListener listener) {
-        ActionListenerProxy listenerProxy = null;
-        Binder binder = null;
-        if (listener != null) {
-            listenerProxy = new ActionListenerProxy("connect", mLooper, listener);
-            binder = new Binder();
-        }
-        try {
-            mService.connect(config, networkId, binder, listenerProxy,
-                    listener == null ? 0 : listener.hashCode());
-        } catch (RemoteException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
-        } catch (SecurityException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
-        }
-    }
-
-    /**
-     * Connect to a network with the given configuration. The network also
-     * gets added to the list of configured networks for the foreground user.
-     *
-     * For a new network, this function is used instead of a
-     * sequence of addNetwork(), enableNetwork(), and reconnect()
-     *
-     * @param config the set of variables that describe the configuration,
-     *            contained in a {@link WifiConfiguration} object.
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be
-     * initialized again
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    public void connect(@NonNull WifiConfiguration config, @Nullable ActionListener listener) {
-        if (config == null) throw new IllegalArgumentException("config cannot be null");
-        connectInternal(config, WifiConfiguration.INVALID_NETWORK_ID, listener);
-    }
-
-    /**
-     * Connect to a network with the given networkId.
-     *
-     * This function is used instead of a enableNetwork() and reconnect()
-     *
-     * <li> This API will cause reconnect if the credentials of the current active
-     * connection has been changed.</li>
-     * <li> This API will cause reconnect if the current active connection is marked metered.</li>
-     *
-     * @param networkId the ID of the network as returned by {@link #addNetwork} or {@link
-     *        getConfiguredNetworks}.
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be
-     * initialized again
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    public void connect(int networkId, @Nullable ActionListener listener) {
-        if (networkId < 0) throw new IllegalArgumentException("Network id cannot be negative");
-        connectInternal(null, networkId, listener);
-    }
-
-    /**
-     * Save the given network to the list of configured networks for the
-     * foreground user. If the network already exists, the configuration
-     * is updated. Any new network is enabled by default.
-     *
-     * For a new network, this function is used instead of a
-     * sequence of addNetwork() and enableNetwork().
-     *
-     * For an existing network, it accomplishes the task of updateNetwork()
-     *
-     * <li> This API will cause reconnect if the credentials of the current active
-     * connection has been changed.</li>
-     * <li> This API will cause disconnect if the current active connection is marked metered.</li>
-     *
-     * @param config the set of variables that describe the configuration,
-     *            contained in a {@link WifiConfiguration} object.
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be
-     * initialized again
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    public void save(@NonNull WifiConfiguration config, @Nullable ActionListener listener) {
-        if (config == null) throw new IllegalArgumentException("config cannot be null");
-        ActionListenerProxy listenerProxy = null;
-        Binder binder = null;
-        if (listener != null) {
-            listenerProxy = new ActionListenerProxy("save", mLooper, listener);
-            binder = new Binder();
-        }
-        try {
-            mService.save(config, binder, listenerProxy,
-                    listener == null ? 0 : listener.hashCode());
-        } catch (RemoteException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
-        } catch (SecurityException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
-        }
-    }
-
-    /**
-     * Delete the network from the list of configured networks for the
-     * foreground user.
-     *
-     * This function is used instead of a sequence of removeNetwork()
-     *
-     * @param config the set of variables that describe the configuration,
-     *            contained in a {@link WifiConfiguration} object.
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be
-     * initialized again
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    public void forget(int netId, @Nullable ActionListener listener) {
-        if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
-        ActionListenerProxy listenerProxy = null;
-        Binder binder = null;
-        if (listener != null) {
-            listenerProxy = new ActionListenerProxy("forget", mLooper, listener);
-            binder = new Binder();
-        }
-        try {
-            mService.forget(netId, binder, listenerProxy,
-                    listener == null ? 0 : listener.hashCode());
-        } catch (RemoteException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(ERROR);
-        } catch (SecurityException e) {
-            if (listenerProxy != null) listenerProxy.onFailure(NOT_AUTHORIZED);
-        }
-    }
-
-    /**
-     * Disable network
-     *
-     * @param netId is the network Id
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be
-     * initialized again
-     * @deprecated This API is deprecated. Use {@link #disableNetwork(int)} instead.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    @Deprecated
-    public void disable(int netId, @Nullable ActionListener listener) {
-        if (netId < 0) throw new IllegalArgumentException("Network id cannot be negative");
-        // Simple wrapper which forwards the call to disableNetwork. This is a temporary
-        // implementation until we can remove this API completely.
-        boolean status = disableNetwork(netId);
-        if (listener != null) {
-            if (status) {
-                listener.onSuccess();
-            } else {
-                listener.onFailure(ERROR);
-            }
-        }
-    }
-
-    /**
-     * Enable/disable auto-join globally.
-     *
-     * @param allowAutojoin true to allow auto-join, false to disallow auto-join
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void allowAutojoinGlobal(boolean allowAutojoin) {
-        try {
-            mService.allowAutojoinGlobal(allowAutojoin);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-
-    /**
-     * Sets the user choice for allowing auto-join to a network.
-     * The updated choice will be made available through the updated config supplied by the
-     * CONFIGURED_NETWORKS_CHANGED broadcast.
-     *
-     * @param netId the id of the network to allow/disallow auto-join for.
-     * @param allowAutojoin true to allow auto-join, false to disallow auto-join
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void allowAutojoin(int netId, boolean allowAutojoin) {
-        try {
-            mService.allowAutojoin(netId, allowAutojoin);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Configure auto-join settings for a Passpoint profile.
-     *
-     * @param fqdn the FQDN (fully qualified domain name) of the passpoint profile.
-     * @param allowAutojoin true to enable auto-join, false to disable auto-join.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void allowAutojoinPasspoint(@NonNull String fqdn, boolean allowAutojoin) {
-        try {
-            mService.allowAutojoinPasspoint(fqdn, allowAutojoin);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Configure MAC randomization setting for a Passpoint profile.
-     * MAC randomization is enabled by default.
-     *
-     * @param fqdn the FQDN (fully qualified domain name) of the passpoint profile.
-     * @param enable true to enable MAC randomization, false to disable MAC randomization.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setMacRandomizationSettingPasspointEnabled(@NonNull String fqdn, boolean enable) {
-        try {
-            mService.setMacRandomizationSettingPasspointEnabled(fqdn, enable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Sets the user's choice of metered override for a Passpoint profile.
-     *
-     * @param fqdn the FQDN (fully qualified domain name) of the passpoint profile.
-     * @param meteredOverride One of three values: {@link WifiConfiguration#METERED_OVERRIDE_NONE},
-     *                        {@link WifiConfiguration#METERED_OVERRIDE_METERED},
-     *                        {@link WifiConfiguration#METERED_OVERRIDE_NOT_METERED}
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setPasspointMeteredOverride(@NonNull String fqdn,
-            @WifiConfiguration.MeteredOverride int meteredOverride) {
-        try {
-            mService.setPasspointMeteredOverride(fqdn, meteredOverride);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Temporarily disable a network. Should always trigger with user disconnect network.
-     *
-     * @param network Input can be SSID or FQDN. And caller must ensure that the SSID passed thru
-     *                this API matched the WifiConfiguration.SSID rules, and thus be surrounded by
-     *                quotes.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK
-    })
-    public void disableEphemeralNetwork(@NonNull String network) {
-        if (TextUtils.isEmpty(network)) {
-            throw new IllegalArgumentException("SSID cannot be null or empty!");
-        }
-        try {
-            mService.disableEphemeralNetwork(network, mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * WPS suport has been deprecated from Client mode and this method will immediately trigger
-     * {@link WpsCallback#onFailed(int)} with a generic error.
-     *
-     * @param config WPS configuration (does not support {@link WpsInfo#LABEL})
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be initialized again
-     * @deprecated This API is deprecated
-     */
-    public void startWps(WpsInfo config, WpsCallback listener) {
-        if (listener != null ) {
-            listener.onFailed(ERROR);
-        }
-    }
-
-    /**
-     * WPS support has been deprecated from Client mode and this method will immediately trigger
-     * {@link WpsCallback#onFailed(int)} with a generic error.
-     *
-     * @param listener for callbacks on success or failure. Can be null.
-     * @throws IllegalStateException if the WifiManager instance needs to be initialized again
-     * @deprecated This API is deprecated
-     */
-    public void cancelWps(WpsCallback listener) {
-        if (listener != null) {
-            listener.onFailed(ERROR);
-        }
-    }
-
-    /**
-     * Allows an application to keep the Wi-Fi radio awake.
-     * Normally the Wi-Fi radio may turn off when the user has not used the device in a while.
-     * Acquiring a WifiLock will keep the radio on until the lock is released.  Multiple
-     * applications may hold WifiLocks, and the radio will only be allowed to turn off when no
-     * WifiLocks are held in any application.
-     * <p>
-     * Before using a WifiLock, consider carefully if your application requires Wi-Fi access, or
-     * could function over a mobile network, if available.  A program that needs to download large
-     * files should hold a WifiLock to ensure that the download will complete, but a program whose
-     * network usage is occasional or low-bandwidth should not hold a WifiLock to avoid adversely
-     * affecting battery life.
-     * <p>
-     * Note that WifiLocks cannot override the user-level "Wi-Fi Enabled" setting, nor Airplane
-     * Mode.  They simply keep the radio from turning off when Wi-Fi is already on but the device
-     * is idle.
-     * <p>
-     * Any application using a WifiLock must request the {@code android.permission.WAKE_LOCK}
-     * permission in an {@code <uses-permission>} element of the application's manifest.
-     */
-    public class WifiLock {
-        private String mTag;
-        private final IBinder mBinder;
-        private int mRefCount;
-        int mLockType;
-        private boolean mRefCounted;
-        private boolean mHeld;
-        private WorkSource mWorkSource;
-
-        private WifiLock(int lockType, String tag) {
-            mTag = tag;
-            mLockType = lockType;
-            mBinder = new Binder();
-            mRefCount = 0;
-            mRefCounted = true;
-            mHeld = false;
-        }
-
-        /**
-         * Locks the Wi-Fi radio on until {@link #release} is called.
-         *
-         * If this WifiLock is reference-counted, each call to {@code acquire} will increment the
-         * reference count, and the radio will remain locked as long as the reference count is
-         * above zero.
-         *
-         * If this WifiLock is not reference-counted, the first call to {@code acquire} will lock
-         * the radio, but subsequent calls will be ignored.  Only one call to {@link #release}
-         * will be required, regardless of the number of times that {@code acquire} is called.
-         */
-        public void acquire() {
-            synchronized (mBinder) {
-                if (mRefCounted ? (++mRefCount == 1) : (!mHeld)) {
-                    try {
-                        mService.acquireWifiLock(mBinder, mLockType, mTag, mWorkSource);
-                        synchronized (WifiManager.this) {
-                            if (mActiveLockCount >= MAX_ACTIVE_LOCKS) {
-                                mService.releaseWifiLock(mBinder);
-                                throw new UnsupportedOperationException(
-                                            "Exceeded maximum number of wifi locks");
-                            }
-                            mActiveLockCount++;
-                        }
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                    mHeld = true;
-                }
-            }
-        }
-
-        /**
-         * Unlocks the Wi-Fi radio, allowing it to turn off when the device is idle.
-         *
-         * If this WifiLock is reference-counted, each call to {@code release} will decrement the
-         * reference count, and the radio will be unlocked only when the reference count reaches
-         * zero.  If the reference count goes below zero (that is, if {@code release} is called
-         * a greater number of times than {@link #acquire}), an exception is thrown.
-         *
-         * If this WifiLock is not reference-counted, the first call to {@code release} (after
-         * the radio was locked using {@link #acquire}) will unlock the radio, and subsequent
-         * calls will be ignored.
-         */
-        public void release() {
-            synchronized (mBinder) {
-                if (mRefCounted ? (--mRefCount == 0) : (mHeld)) {
-                    try {
-                        mService.releaseWifiLock(mBinder);
-                        synchronized (WifiManager.this) {
-                            mActiveLockCount--;
-                        }
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                    mHeld = false;
-                }
-                if (mRefCount < 0) {
-                    throw new RuntimeException("WifiLock under-locked " + mTag);
-                }
-            }
-        }
-
-        /**
-         * Controls whether this is a reference-counted or non-reference-counted WifiLock.
-         *
-         * Reference-counted WifiLocks keep track of the number of calls to {@link #acquire} and
-         * {@link #release}, and only allow the radio to sleep when every call to {@link #acquire}
-         * has been balanced with a call to {@link #release}.  Non-reference-counted WifiLocks
-         * lock the radio whenever {@link #acquire} is called and it is unlocked, and unlock the
-         * radio whenever {@link #release} is called and it is locked.
-         *
-         * @param refCounted true if this WifiLock should keep a reference count
-         */
-        public void setReferenceCounted(boolean refCounted) {
-            mRefCounted = refCounted;
-        }
-
-        /**
-         * Checks whether this WifiLock is currently held.
-         *
-         * @return true if this WifiLock is held, false otherwise
-         */
-        public boolean isHeld() {
-            synchronized (mBinder) {
-                return mHeld;
-            }
-        }
-
-        public void setWorkSource(WorkSource ws) {
-            synchronized (mBinder) {
-                if (ws != null && ws.isEmpty()) {
-                    ws = null;
-                }
-                boolean changed = true;
-                if (ws == null) {
-                    mWorkSource = null;
-                } else {
-                    ws = ws.withoutNames();
-                    if (mWorkSource == null) {
-                        changed = mWorkSource != null;
-                        mWorkSource = new WorkSource(ws);
-                    } else {
-                        changed = !mWorkSource.equals(ws);
-                        if (changed) {
-                            mWorkSource.set(ws);
-                        }
-                    }
-                }
-                if (changed && mHeld) {
-                    try {
-                        mService.updateWifiLockWorkSource(mBinder, mWorkSource);
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                }
-            }
-        }
-
-        public String toString() {
-            String s1, s2, s3;
-            synchronized (mBinder) {
-                s1 = Integer.toHexString(System.identityHashCode(this));
-                s2 = mHeld ? "held; " : "";
-                if (mRefCounted) {
-                    s3 = "refcounted: refcount = " + mRefCount;
-                } else {
-                    s3 = "not refcounted";
-                }
-                return "WifiLock{ " + s1 + "; " + s2 + s3 + " }";
-            }
-        }
-
-        @Override
-        protected void finalize() throws Throwable {
-            super.finalize();
-            synchronized (mBinder) {
-                if (mHeld) {
-                    try {
-                        mService.releaseWifiLock(mBinder);
-                        synchronized (WifiManager.this) {
-                            mActiveLockCount--;
-                        }
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     * Creates a new WifiLock.
-     *
-     * @param lockType the type of lock to create. See {@link #WIFI_MODE_FULL_HIGH_PERF}
-     * and {@link #WIFI_MODE_FULL_LOW_LATENCY} for descriptions of the types of Wi-Fi locks.
-     * @param tag a tag for the WifiLock to identify it in debugging messages.  This string is
-     *            never shown to the user under normal conditions, but should be descriptive
-     *            enough to identify your application and the specific WifiLock within it, if it
-     *            holds multiple WifiLocks.
-     *
-     * @return a new, unacquired WifiLock with the given tag.
-     *
-     * @see WifiLock
-     */
-    public WifiLock createWifiLock(int lockType, String tag) {
-        return new WifiLock(lockType, tag);
-    }
-
-    /**
-     * Creates a new WifiLock.
-     *
-     * @param tag a tag for the WifiLock to identify it in debugging messages.  This string is
-     *            never shown to the user under normal conditions, but should be descriptive
-     *            enough to identify your application and the specific WifiLock within it, if it
-     *            holds multiple WifiLocks.
-     *
-     * @return a new, unacquired WifiLock with the given tag.
-     *
-     * @see WifiLock
-     *
-     * @deprecated This API is non-functional.
-     */
-    @Deprecated
-    public WifiLock createWifiLock(String tag) {
-        return new WifiLock(WIFI_MODE_FULL, tag);
-    }
-
-    /**
-     * Create a new MulticastLock
-     *
-     * @param tag a tag for the MulticastLock to identify it in debugging
-     *            messages.  This string is never shown to the user under
-     *            normal conditions, but should be descriptive enough to
-     *            identify your application and the specific MulticastLock
-     *            within it, if it holds multiple MulticastLocks.
-     *
-     * @return a new, unacquired MulticastLock with the given tag.
-     *
-     * @see MulticastLock
-     */
-    public MulticastLock createMulticastLock(String tag) {
-        return new MulticastLock(tag);
-    }
-
-    /**
-     * Allows an application to receive Wifi Multicast packets.
-     * Normally the Wifi stack filters out packets not explicitly
-     * addressed to this device.  Acquring a MulticastLock will
-     * cause the stack to receive packets addressed to multicast
-     * addresses.  Processing these extra packets can cause a noticeable
-     * battery drain and should be disabled when not needed.
-     */
-    public class MulticastLock {
-        private String mTag;
-        private final IBinder mBinder;
-        private int mRefCount;
-        private boolean mRefCounted;
-        private boolean mHeld;
-
-        private MulticastLock(String tag) {
-            mTag = tag;
-            mBinder = new Binder();
-            mRefCount = 0;
-            mRefCounted = true;
-            mHeld = false;
-        }
-
-        /**
-         * Locks Wifi Multicast on until {@link #release} is called.
-         *
-         * If this MulticastLock is reference-counted each call to
-         * {@code acquire} will increment the reference count, and the
-         * wifi interface will receive multicast packets as long as the
-         * reference count is above zero.
-         *
-         * If this MulticastLock is not reference-counted, the first call to
-         * {@code acquire} will turn on the multicast packets, but subsequent
-         * calls will be ignored.  Only one call to {@link #release} will
-         * be required, regardless of the number of times that {@code acquire}
-         * is called.
-         *
-         * Note that other applications may also lock Wifi Multicast on.
-         * Only they can relinquish their lock.
-         *
-         * Also note that applications cannot leave Multicast locked on.
-         * When an app exits or crashes, any Multicast locks will be released.
-         */
-        public void acquire() {
-            synchronized (mBinder) {
-                if (mRefCounted ? (++mRefCount == 1) : (!mHeld)) {
-                    try {
-                        mService.acquireMulticastLock(mBinder, mTag);
-                        synchronized (WifiManager.this) {
-                            if (mActiveLockCount >= MAX_ACTIVE_LOCKS) {
-                                mService.releaseMulticastLock(mTag);
-                                throw new UnsupportedOperationException(
-                                        "Exceeded maximum number of wifi locks");
-                            }
-                            mActiveLockCount++;
-                        }
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                    mHeld = true;
-                }
-            }
-        }
-
-        /**
-         * Unlocks Wifi Multicast, restoring the filter of packets
-         * not addressed specifically to this device and saving power.
-         *
-         * If this MulticastLock is reference-counted, each call to
-         * {@code release} will decrement the reference count, and the
-         * multicast packets will only stop being received when the reference
-         * count reaches zero.  If the reference count goes below zero (that
-         * is, if {@code release} is called a greater number of times than
-         * {@link #acquire}), an exception is thrown.
-         *
-         * If this MulticastLock is not reference-counted, the first call to
-         * {@code release} (after the radio was multicast locked using
-         * {@link #acquire}) will unlock the multicast, and subsequent calls
-         * will be ignored.
-         *
-         * Note that if any other Wifi Multicast Locks are still outstanding
-         * this {@code release} call will not have an immediate effect.  Only
-         * when all applications have released all their Multicast Locks will
-         * the Multicast filter be turned back on.
-         *
-         * Also note that when an app exits or crashes all of its Multicast
-         * Locks will be automatically released.
-         */
-        public void release() {
-            synchronized (mBinder) {
-                if (mRefCounted ? (--mRefCount == 0) : (mHeld)) {
-                    try {
-                        mService.releaseMulticastLock(mTag);
-                        synchronized (WifiManager.this) {
-                            mActiveLockCount--;
-                        }
-                    } catch (RemoteException e) {
-                        throw e.rethrowFromSystemServer();
-                    }
-                    mHeld = false;
-                }
-                if (mRefCount < 0) {
-                    throw new RuntimeException("MulticastLock under-locked "
-                            + mTag);
-                }
-            }
-        }
-
-        /**
-         * Controls whether this is a reference-counted or non-reference-
-         * counted MulticastLock.
-         *
-         * Reference-counted MulticastLocks keep track of the number of calls
-         * to {@link #acquire} and {@link #release}, and only stop the
-         * reception of multicast packets when every call to {@link #acquire}
-         * has been balanced with a call to {@link #release}.  Non-reference-
-         * counted MulticastLocks allow the reception of multicast packets
-         * whenever {@link #acquire} is called and stop accepting multicast
-         * packets whenever {@link #release} is called.
-         *
-         * @param refCounted true if this MulticastLock should keep a reference
-         * count
-         */
-        public void setReferenceCounted(boolean refCounted) {
-            mRefCounted = refCounted;
-        }
-
-        /**
-         * Checks whether this MulticastLock is currently held.
-         *
-         * @return true if this MulticastLock is held, false otherwise
-         */
-        public boolean isHeld() {
-            synchronized (mBinder) {
-                return mHeld;
-            }
-        }
-
-        public String toString() {
-            String s1, s2, s3;
-            synchronized (mBinder) {
-                s1 = Integer.toHexString(System.identityHashCode(this));
-                s2 = mHeld ? "held; " : "";
-                if (mRefCounted) {
-                    s3 = "refcounted: refcount = " + mRefCount;
-                } else {
-                    s3 = "not refcounted";
-                }
-                return "MulticastLock{ " + s1 + "; " + s2 + s3 + " }";
-            }
-        }
-
-        @Override
-        protected void finalize() throws Throwable {
-            super.finalize();
-            setReferenceCounted(false);
-            release();
-        }
-    }
-
-    /**
-     * Check multicast filter status.
-     *
-     * @return true if multicast packets are allowed.
-     *
-     * @hide pending API council approval
-     */
-    public boolean isMulticastEnabled() {
-        try {
-            return mService.isMulticastEnabled();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Initialize the multicast filtering to 'on'
-     * @hide no intent to publish
-     */
-    @UnsupportedAppUsage
-    public boolean initializeMulticastFiltering() {
-        try {
-            mService.initializeMulticastFiltering();
-            return true;
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Set Wi-Fi verbose logging level from developer settings.
-     *
-     * @param enable true to enable verbose logging, false to disable.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setVerboseLoggingEnabled(boolean enable) {
-        enableVerboseLogging(enable ? 1 : 0);
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage(
-            maxTargetSdk = Build.VERSION_CODES.Q,
-            publicAlternatives = "Use {@code #setVerboseLoggingEnabled(boolean)} instead."
-    )
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void enableVerboseLogging (int verbose) {
-        try {
-            mService.enableVerboseLogging(verbose);
-        } catch (Exception e) {
-            //ignore any failure here
-            Log.e(TAG, "enableVerboseLogging " + e.toString());
-        }
-    }
-
-    /**
-     * Get the persisted Wi-Fi verbose logging level, set by
-     * {@link #setVerboseLoggingEnabled(boolean)}.
-     * No permissions are required to call this method.
-     *
-     * @return true to indicate that verbose logging is enabled, false to indicate that verbose
-     * logging is disabled.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean isVerboseLoggingEnabled() {
-        return getVerboseLoggingLevel() > 0;
-    }
-
-    /** @hide */
-    // TODO(b/145484145): remove once SUW stops calling this via reflection
-    @UnsupportedAppUsage(
-            maxTargetSdk = Build.VERSION_CODES.Q,
-            publicAlternatives = "Use {@code #isVerboseLoggingEnabled()} instead."
-    )
-    public int getVerboseLoggingLevel() {
-        try {
-            return mService.getVerboseLoggingLevel();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Removes all saved Wi-Fi networks, Passpoint configurations, ephemeral networks, Network
-     * Requests, and Network Suggestions.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void factoryReset() {
-        try {
-            mService.factoryReset(mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get {@link Network} object of current wifi network, or null if not connected.
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    public Network getCurrentNetwork() {
-        try {
-            return mService.getCurrentNetwork();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Deprecated
-     * returns false
-     * @hide
-     * @deprecated
-     */
-    public boolean setEnableAutoJoinWhenAssociated(boolean enabled) {
-        return false;
-    }
-
-    /**
-     * Deprecated
-     * returns false
-     * @hide
-     * @deprecated
-     */
-    public boolean getEnableAutoJoinWhenAssociated() {
-        return false;
-    }
-
-    /**
-     * Returns a byte stream representing the data that needs to be backed up to save the
-     * current Wifi state.
-     * This Wifi state can be restored by calling {@link #restoreBackupData(byte[])}.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public byte[] retrieveBackupData() {
-        try {
-            return mService.retrieveBackupData();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Restore state from the backed up data.
-     * @param data byte stream in the same format produced by {@link #retrieveBackupData()}
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void restoreBackupData(@NonNull byte[] data) {
-        try {
-            mService.restoreBackupData(data);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns a byte stream representing the data that needs to be backed up to save the
-     * current soft ap config data.
-     *
-     * This soft ap config can be restored by calling {@link #restoreSoftApBackupData(byte[])}
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public byte[] retrieveSoftApBackupData() {
-        try {
-            return mService.retrieveSoftApBackupData();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns soft ap config from the backed up data or null if data is invalid.
-     * @param data byte stream in the same format produced by {@link #retrieveSoftApBackupData()}
-     *
-     * @hide
-     */
-    @Nullable
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public SoftApConfiguration restoreSoftApBackupData(@NonNull byte[] data) {
-        try {
-            return mService.restoreSoftApBackupData(data);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Restore state from the older version of back up data.
-     * The old backup data was essentially a backup of wpa_supplicant.conf
-     * and ipconfig.txt file.
-     * @param supplicantData bytes representing wpa_supplicant.conf
-     * @param ipConfigData bytes representing ipconfig.txt
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void restoreSupplicantBackupData(
-            @NonNull byte[] supplicantData, @NonNull byte[] ipConfigData) {
-        try {
-            mService.restoreSupplicantBackupData(supplicantData, ipConfigData);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Start subscription provisioning flow
-     *
-     * @param provider {@link OsuProvider} to provision with
-     * @param executor the Executor on which to run the callback.
-     * @param callback {@link ProvisioningCallback} for updates regarding provisioning flow
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD
-    })
-    public void startSubscriptionProvisioning(@NonNull OsuProvider provider,
-            @NonNull @CallbackExecutor Executor executor, @NonNull ProvisioningCallback callback) {
-        // Verify arguments
-        if (executor == null) {
-            throw new IllegalArgumentException("executor must not be null");
-        }
-        if (callback == null) {
-            throw new IllegalArgumentException("callback must not be null");
-        }
-        try {
-            mService.startSubscriptionProvisioning(provider,
-                    new ProvisioningCallbackProxy(executor, callback));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Helper class to support OSU Provisioning callbacks
-     */
-    private static class ProvisioningCallbackProxy extends IProvisioningCallback.Stub {
-        private final Executor mExecutor;
-        private final ProvisioningCallback mCallback;
-
-        ProvisioningCallbackProxy(Executor executor, ProvisioningCallback callback) {
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onProvisioningStatus(int status) {
-            mExecutor.execute(() -> mCallback.onProvisioningStatus(status));
-        }
-
-        @Override
-        public void onProvisioningFailure(int status) {
-            mExecutor.execute(() -> mCallback.onProvisioningFailure(status));
-        }
-
-        @Override
-        public void onProvisioningComplete() {
-            mExecutor.execute(() -> mCallback.onProvisioningComplete());
-        }
-    }
-
-    /**
-     * Interface for Traffic state callback. Should be extended by applications and set when
-     * calling {@link #registerTrafficStateCallback(Executor, WifiManager.TrafficStateCallback)}.
-     * @hide
-     */
-    @SystemApi
-    public interface TrafficStateCallback {
-        /** @hide */
-        @Retention(RetentionPolicy.SOURCE)
-        @IntDef(prefix = {"DATA_ACTIVITY_"}, value = {
-                DATA_ACTIVITY_NONE,
-                DATA_ACTIVITY_IN,
-                DATA_ACTIVITY_OUT,
-                DATA_ACTIVITY_INOUT})
-        @interface DataActivity {}
-
-        // Lowest bit indicates data reception and the second lowest bit indicates data transmitted
-        /** No data in or out */
-        int DATA_ACTIVITY_NONE         = 0x00;
-        /** Data in, no data out */
-        int DATA_ACTIVITY_IN           = 0x01;
-        /** Data out, no data in */
-        int DATA_ACTIVITY_OUT          = 0x02;
-        /** Data in and out */
-        int DATA_ACTIVITY_INOUT        = 0x03;
-
-        /**
-         * Callback invoked to inform clients about the current traffic state.
-         *
-         * @param state One of the values: {@link #DATA_ACTIVITY_NONE}, {@link #DATA_ACTIVITY_IN},
-         * {@link #DATA_ACTIVITY_OUT} & {@link #DATA_ACTIVITY_INOUT}.
-         */
-        void onStateChanged(@DataActivity int state);
-    }
-
-    /**
-     * Callback proxy for TrafficStateCallback objects.
-     *
-     * @hide
-     */
-    private class TrafficStateCallbackProxy extends ITrafficStateCallback.Stub {
-        private final Executor mExecutor;
-        private final TrafficStateCallback mCallback;
-
-        TrafficStateCallbackProxy(Executor executor, TrafficStateCallback callback) {
-            mExecutor = executor;
-            mCallback = callback;
-        }
-
-        @Override
-        public void onStateChanged(int state) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "TrafficStateCallbackProxy: onStateChanged state=" + state);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mCallback.onStateChanged(state);
-            });
-        }
-    }
-
-    /**
-     * Registers a callback for monitoring traffic state. See {@link TrafficStateCallback}. These
-     * callbacks will be invoked periodically by platform to inform clients about the current
-     * traffic state. Caller can unregister a previously registered callback using
-     * {@link #unregisterTrafficStateCallback(TrafficStateCallback)}
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#NETWORK_SETTINGS NETWORK_SETTINGS} permission. Callers
-     * without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param executor The Executor on whose thread to execute the callbacks of the {@code callback}
-     *                 object.
-     * @param callback Callback for traffic state events
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void registerTrafficStateCallback(@NonNull @CallbackExecutor Executor executor,
-                                             @NonNull TrafficStateCallback callback) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "registerTrafficStateCallback: callback=" + callback + ", executor=" + executor);
-
-        Binder binder = new Binder();
-        try {
-            mService.registerTrafficStateCallback(
-                    binder, new TrafficStateCallbackProxy(executor, callback), callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow callers to unregister a previously registered callback. After calling this method,
-     * applications will no longer receive traffic state notifications.
-     *
-     * @param callback Callback to unregister for traffic state events
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void unregisterTrafficStateCallback(@NonNull TrafficStateCallback callback) {
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "unregisterTrafficStateCallback: callback=" + callback);
-
-        try {
-            mService.unregisterTrafficStateCallback(callback.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Helper method to update the local verbose logging flag based on the verbose logging
-     * level from wifi service.
-     */
-    private void updateVerboseLoggingEnabledFromService() {
-        mVerboseLoggingEnabled = isVerboseLoggingEnabled();
-    }
-
-    /**
-     * @return true if this device supports WPA3-Personal SAE
-     */
-    public boolean isWpa3SaeSupported() {
-        return isFeatureSupported(WIFI_FEATURE_WPA3_SAE);
-    }
-
-    /**
-     * @return true if this device supports WPA3-Enterprise Suite-B-192
-     */
-    public boolean isWpa3SuiteBSupported() {
-        return isFeatureSupported(WIFI_FEATURE_WPA3_SUITE_B);
-    }
-
-    /**
-     * @return true if this device supports Wi-Fi Enhanced Open (OWE)
-     */
-    public boolean isEnhancedOpenSupported() {
-        return isFeatureSupported(WIFI_FEATURE_OWE);
-    }
-
-    /**
-     * Wi-Fi Easy Connect (DPP) introduces standardized mechanisms to simplify the provisioning and
-     * configuration of Wi-Fi devices.
-     * For more details, visit <a href="https://www.wi-fi.org/">https://www.wi-fi.org/</a> and
-     * search for "Easy Connect" or "Device Provisioning Protocol specification".
-     *
-     * @return true if this device supports Wi-Fi Easy-connect (Device Provisioning Protocol)
-     */
-    public boolean isEasyConnectSupported() {
-        return isFeatureSupported(WIFI_FEATURE_DPP);
-    }
-
-    /**
-     * @return true if this device supports WAPI.
-     */
-    public boolean isWapiSupported() {
-        return isFeatureSupported(WIFI_FEATURE_WAPI);
-    }
-
-    /**
-     * Gets the factory Wi-Fi MAC addresses.
-     * @return Array of String representing Wi-Fi MAC addresses sorted lexically or an empty Array
-     * if failed.
-     * @hide
-     */
-    @NonNull
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public String[] getFactoryMacAddresses() {
-        try {
-            return mService.getFactoryMacAddresses();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"DEVICE_MOBILITY_STATE_"}, value = {
-            DEVICE_MOBILITY_STATE_UNKNOWN,
-            DEVICE_MOBILITY_STATE_HIGH_MVMT,
-            DEVICE_MOBILITY_STATE_LOW_MVMT,
-            DEVICE_MOBILITY_STATE_STATIONARY})
-    public @interface DeviceMobilityState {}
-
-    /**
-     * Unknown device mobility state
-     *
-     * @see #setDeviceMobilityState(int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int DEVICE_MOBILITY_STATE_UNKNOWN = 0;
-
-    /**
-     * High movement device mobility state.
-     * e.g. on a bike, in a motor vehicle
-     *
-     * @see #setDeviceMobilityState(int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int DEVICE_MOBILITY_STATE_HIGH_MVMT = 1;
-
-    /**
-     * Low movement device mobility state.
-     * e.g. walking, running
-     *
-     * @see #setDeviceMobilityState(int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int DEVICE_MOBILITY_STATE_LOW_MVMT = 2;
-
-    /**
-     * Stationary device mobility state
-     *
-     * @see #setDeviceMobilityState(int)
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int DEVICE_MOBILITY_STATE_STATIONARY = 3;
-
-    /**
-     * Updates the device mobility state. Wifi uses this information to adjust the interval between
-     * Wifi scans in order to balance power consumption with scan accuracy.
-     * The default mobility state when the device boots is {@link #DEVICE_MOBILITY_STATE_UNKNOWN}.
-     * This API should be called whenever there is a change in the mobility state.
-     * @param state the updated device mobility state
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE)
-    public void setDeviceMobilityState(@DeviceMobilityState int state) {
-        try {
-            mService.setDeviceMobilityState(state);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /* Easy Connect - AKA Device Provisioning Protocol (DPP) */
-
-    /**
-     * Easy Connect Network role: Station.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_NETWORK_ROLE_STA = 0;
-
-    /**
-     * Easy Connect Network role: Access Point.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final int EASY_CONNECT_NETWORK_ROLE_AP = 1;
-
-    /** @hide */
-    @IntDef(prefix = {"EASY_CONNECT_NETWORK_ROLE_"}, value = {
-            EASY_CONNECT_NETWORK_ROLE_STA,
-            EASY_CONNECT_NETWORK_ROLE_AP,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface EasyConnectNetworkRole {
-    }
-
-    /**
-     * Start Easy Connect (DPP) in Configurator-Initiator role. The current device will initiate
-     * Easy Connect bootstrapping with a peer, and configure the peer with the SSID and password of
-     * the specified network using the Easy Connect protocol on an encrypted link.
-     *
-     * @param enrolleeUri         URI of the Enrollee obtained separately (e.g. QR code scanning)
-     * @param selectedNetworkId   Selected network ID to be sent to the peer
-     * @param enrolleeNetworkRole The network role of the enrollee
-     * @param callback            Callback for status updates
-     * @param executor            The Executor on which to run the callback.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD})
-    public void startEasyConnectAsConfiguratorInitiator(@NonNull String enrolleeUri,
-            int selectedNetworkId, @EasyConnectNetworkRole int enrolleeNetworkRole,
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull EasyConnectStatusCallback callback) {
-        Binder binder = new Binder();
-        try {
-            mService.startDppAsConfiguratorInitiator(binder, enrolleeUri, selectedNetworkId,
-                    enrolleeNetworkRole, new EasyConnectCallbackProxy(executor, callback));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Start Easy Connect (DPP) in Enrollee-Initiator role. The current device will initiate Easy
-     * Connect bootstrapping with a peer, and receive the SSID and password from the peer
-     * configurator.
-     *
-     * @param configuratorUri URI of the Configurator obtained separately (e.g. QR code scanning)
-     * @param callback        Callback for status updates
-     * @param executor        The Executor on which to run the callback.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD})
-    public void startEasyConnectAsEnrolleeInitiator(@NonNull String configuratorUri,
-            @NonNull @CallbackExecutor Executor executor,
-            @NonNull EasyConnectStatusCallback callback) {
-        Binder binder = new Binder();
-        try {
-            mService.startDppAsEnrolleeInitiator(binder, configuratorUri,
-                    new EasyConnectCallbackProxy(executor, callback));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Stop or abort a current Easy Connect (DPP) session. This call, once processed, will
-     * terminate any ongoing transaction, and clean up all associated resources. Caller should not
-     * expect any callbacks once this call is made. However, due to the asynchronous nature of
-     * this call, a callback may be fired if it was already pending in the queue.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_SETUP_WIZARD})
-    public void stopEasyConnectSession() {
-        try {
-            /* Request lower layers to stop/abort and clear resources */
-            mService.stopDppSession();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Helper class to support Easy Connect (DPP) callbacks
-     *
-     * @hide
-     */
-    private static class EasyConnectCallbackProxy extends IDppCallback.Stub {
-        private final Executor mExecutor;
-        private final EasyConnectStatusCallback mEasyConnectStatusCallback;
-
-        EasyConnectCallbackProxy(Executor executor,
-                EasyConnectStatusCallback easyConnectStatusCallback) {
-            mExecutor = executor;
-            mEasyConnectStatusCallback = easyConnectStatusCallback;
-        }
-
-        @Override
-        public void onSuccessConfigReceived(int newNetworkId) {
-            Log.d(TAG, "Easy Connect onSuccessConfigReceived callback");
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mEasyConnectStatusCallback.onEnrolleeSuccess(newNetworkId);
-            });
-        }
-
-        @Override
-        public void onSuccess(int status) {
-            Log.d(TAG, "Easy Connect onSuccess callback");
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mEasyConnectStatusCallback.onConfiguratorSuccess(status);
-            });
-        }
-
-        @Override
-        public void onFailure(int status, String ssid, String channelList,
-                int[] operatingClassArray) {
-            Log.d(TAG, "Easy Connect onFailure callback");
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                SparseArray<int[]> channelListArray = parseDppChannelList(channelList);
-                mEasyConnectStatusCallback.onFailure(status, ssid, channelListArray,
-                        operatingClassArray);
-            });
-        }
-
-        @Override
-        public void onProgress(int status) {
-            Log.d(TAG, "Easy Connect onProgress callback");
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> {
-                mEasyConnectStatusCallback.onProgress(status);
-            });
-        }
-    }
-
-    /**
-     * Interface for Wi-Fi usability statistics listener. Should be implemented by applications and
-     * set when calling {@link WifiManager#addOnWifiUsabilityStatsListener(Executor,
-     * OnWifiUsabilityStatsListener)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface OnWifiUsabilityStatsListener {
-        /**
-         * Called when Wi-Fi usability statistics is updated.
-         *
-         * @param seqNum The sequence number of statistics, used to derive the timing of updated
-         *               Wi-Fi usability statistics, set by framework and incremented by one after
-         *               each update.
-         * @param isSameBssidAndFreq The flag to indicate whether the BSSID and the frequency of
-         *                           network stays the same or not relative to the last update of
-         *                           Wi-Fi usability stats.
-         * @param stats The updated Wi-Fi usability statistics.
-         */
-        void onWifiUsabilityStats(int seqNum, boolean isSameBssidAndFreq,
-                @NonNull WifiUsabilityStatsEntry stats);
-    }
-
-    /**
-     * Adds a listener for Wi-Fi usability statistics. See {@link OnWifiUsabilityStatsListener}.
-     * Multiple listeners can be added. Callers will be invoked periodically by framework to
-     * inform clients about the current Wi-Fi usability statistics. Callers can remove a previously
-     * added listener using {@link removeOnWifiUsabilityStatsListener}.
-     *
-     * @param executor The executor on which callback will be invoked.
-     * @param listener Listener for Wifi usability statistics.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE)
-    public void addOnWifiUsabilityStatsListener(@NonNull @CallbackExecutor Executor executor,
-            @NonNull OnWifiUsabilityStatsListener listener) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (listener == null) throw new IllegalArgumentException("listener cannot be null");
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "addOnWifiUsabilityStatsListener: listener=" + listener);
-        }
-        try {
-            mService.addOnWifiUsabilityStatsListener(new Binder(),
-                    new IOnWifiUsabilityStatsListener.Stub() {
-                        @Override
-                        public void onWifiUsabilityStats(int seqNum, boolean isSameBssidAndFreq,
-                                WifiUsabilityStatsEntry stats) {
-                            if (mVerboseLoggingEnabled) {
-                                Log.v(TAG, "OnWifiUsabilityStatsListener: "
-                                        + "onWifiUsabilityStats: seqNum=" + seqNum);
-                            }
-                            Binder.clearCallingIdentity();
-                            executor.execute(() -> listener.onWifiUsabilityStats(
-                                    seqNum, isSameBssidAndFreq, stats));
-                        }
-                    },
-                    listener.hashCode()
-            );
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow callers to remove a previously registered listener. After calling this method,
-     * applications will no longer receive Wi-Fi usability statistics.
-     *
-     * @param listener Listener to remove the Wi-Fi usability statistics.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE)
-    public void removeOnWifiUsabilityStatsListener(@NonNull OnWifiUsabilityStatsListener listener) {
-        if (listener == null) throw new IllegalArgumentException("listener cannot be null");
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "removeOnWifiUsabilityStatsListener: listener=" + listener);
-        }
-        try {
-            mService.removeOnWifiUsabilityStatsListener(listener.hashCode());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Provide a Wi-Fi usability score information to be recorded (but not acted upon) by the
-     * framework. The Wi-Fi usability score is derived from {@link OnWifiUsabilityStatsListener}
-     * where a score is matched to Wi-Fi usability statistics using the sequence number. The score
-     * is used to quantify whether Wi-Fi is usable in a future time.
-     *
-     * @param seqNum Sequence number of the Wi-Fi usability score.
-     * @param score The Wi-Fi usability score, expected range: [0, 100].
-     * @param predictionHorizonSec Prediction horizon of the Wi-Fi usability score in second,
-     *                             expected range: [0, 30].
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE)
-    public void updateWifiUsabilityScore(int seqNum, int score, int predictionHorizonSec) {
-        try {
-            mService.updateWifiUsabilityScore(seqNum, score, predictionHorizonSec);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Abstract class for scan results callback. Should be extended by applications and set when
-     * calling {@link WifiManager#registerScanResultsCallback(Executor, ScanResultsCallback)}.
-     */
-    public abstract static class ScanResultsCallback {
-        private final ScanResultsCallbackProxy mScanResultsCallbackProxy;
-
-        public ScanResultsCallback() {
-            mScanResultsCallbackProxy = new ScanResultsCallbackProxy();
-        }
-
-        /**
-         * Called when new scan results are available.
-         * Clients should use {@link WifiManager#getScanResults()} to get the scan results.
-         */
-        public abstract void onScanResultsAvailable();
-
-        /*package*/ @NonNull ScanResultsCallbackProxy getProxy() {
-            return mScanResultsCallbackProxy;
-        }
-
-        private static class ScanResultsCallbackProxy extends IScanResultsCallback.Stub {
-            private final Object mLock = new Object();
-            @Nullable @GuardedBy("mLock") private Executor mExecutor;
-            @Nullable @GuardedBy("mLock") private ScanResultsCallback mCallback;
-
-            ScanResultsCallbackProxy() {
-                mCallback = null;
-                mExecutor = null;
-            }
-
-            /*package*/ void initProxy(@NonNull Executor executor,
-                    @NonNull ScanResultsCallback callback) {
-                synchronized (mLock) {
-                    mExecutor = executor;
-                    mCallback = callback;
-                }
-            }
-
-            /*package*/ void cleanUpProxy() {
-                synchronized (mLock) {
-                    mExecutor = null;
-                    mCallback = null;
-                }
-            }
-
-            @Override
-            public void onScanResultsAvailable() {
-                ScanResultsCallback callback;
-                Executor executor;
-                synchronized (mLock) {
-                    executor = mExecutor;
-                    callback = mCallback;
-                }
-                if (callback == null || executor == null) {
-                    return;
-                }
-                Binder.clearCallingIdentity();
-                executor.execute(callback::onScanResultsAvailable);
-            }
-        }
-
-    }
-
-    /**
-     * Register a callback for Scan Results. See {@link ScanResultsCallback}.
-     * Caller will receive the event when scan results are available.
-     * Caller should use {@link WifiManager#getScanResults()} requires
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} to get the scan results.
-     * Caller can remove a previously registered callback using
-     * {@link WifiManager#unregisterScanResultsCallback(ScanResultsCallback)}
-     * Same caller can add multiple listeners.
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} permission. Callers
-     * without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param executor The executor to execute the callback of the {@code callback} object.
-     * @param callback callback for Scan Results events
-     */
-
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public void registerScanResultsCallback(@NonNull @CallbackExecutor Executor executor,
-            @NonNull ScanResultsCallback callback) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-
-        Log.v(TAG, "registerScanResultsCallback: callback=" + callback
-                + ", executor=" + executor);
-        ScanResultsCallback.ScanResultsCallbackProxy proxy = callback.getProxy();
-        proxy.initProxy(executor, callback);
-        try {
-            mService.registerScanResultsCallback(proxy);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow callers to unregister a previously registered callback. After calling this method,
-     * applications will no longer receive Scan Results events.
-     *
-     * @param callback callback to unregister for Scan Results events
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public void unregisterScanResultsCallback(@NonNull ScanResultsCallback callback) {
-        if (callback == null) throw new IllegalArgumentException("callback cannot be null");
-        Log.v(TAG, "unregisterScanResultsCallback: Callback=" + callback);
-        ScanResultsCallback.ScanResultsCallbackProxy proxy = callback.getProxy();
-        try {
-            mService.unregisterScanResultsCallback(proxy);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        } finally {
-            proxy.cleanUpProxy();
-        }
-    }
-
-    /**
-     * Interface for suggestion connection status listener.
-     * Should be implemented by applications and set when calling
-     * {@link WifiManager#addSuggestionConnectionStatusListener(
-     * Executor, SuggestionConnectionStatusListener)}.
-     */
-    public interface SuggestionConnectionStatusListener {
-
-        /**
-         * Called when the framework attempted to connect to a suggestion provided by the
-         * registering app, but the connection to the suggestion failed.
-         * @param wifiNetworkSuggestion The suggestion which failed to connect.
-         * @param failureReason the connection failure reason code. One of
-         * {@link #STATUS_SUGGESTION_CONNECTION_FAILURE_ASSOCIATION},
-         * {@link #STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION},
-         * {@link #STATUS_SUGGESTION_CONNECTION_FAILURE_IP_PROVISIONING}
-         * {@link #STATUS_SUGGESTION_CONNECTION_FAILURE_UNKNOWN}
-         */
-        void onConnectionStatus(
-                @NonNull WifiNetworkSuggestion wifiNetworkSuggestion,
-                @SuggestionConnectionStatusCode int failureReason);
-    }
-
-    private class SuggestionConnectionStatusListenerProxy extends
-            ISuggestionConnectionStatusListener.Stub {
-        private final Executor mExecutor;
-        private final SuggestionConnectionStatusListener mListener;
-
-        SuggestionConnectionStatusListenerProxy(@NonNull Executor executor,
-                @NonNull SuggestionConnectionStatusListener listener) {
-            mExecutor = executor;
-            mListener = listener;
-        }
-
-        @Override
-        public void onConnectionStatus(@NonNull WifiNetworkSuggestion wifiNetworkSuggestion,
-                int failureReason) {
-            mExecutor.execute(() ->
-                    mListener.onConnectionStatus(wifiNetworkSuggestion, failureReason));
-        }
-
-    }
-
-    /**
-     * Add a listener for suggestion networks. See {@link SuggestionConnectionStatusListener}.
-     * Caller will receive the event when suggested network have connection failure.
-     * Caller can remove a previously registered listener using
-     * {@link WifiManager#removeSuggestionConnectionStatusListener(
-     * SuggestionConnectionStatusListener)}
-     * Same caller can add multiple listeners to monitor the event.
-     * <p>
-     * Applications should have the
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE} permissions.
-     * Callers without the permission will trigger a {@link java.lang.SecurityException}.
-     * <p>
-     *
-     * @param executor The executor to execute the listener of the {@code listener} object.
-     * @param listener listener for suggestion network connection failure.
-     */
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, ACCESS_WIFI_STATE})
-    public void addSuggestionConnectionStatusListener(@NonNull @CallbackExecutor Executor executor,
-            @NonNull SuggestionConnectionStatusListener listener) {
-        if (listener == null) throw new IllegalArgumentException("Listener cannot be null");
-        if (executor == null) throw new IllegalArgumentException("Executor cannot be null");
-        Log.v(TAG, "addSuggestionConnectionStatusListener listener=" + listener
-                + ", executor=" + executor);
-        try {
-            mService.registerSuggestionConnectionStatusListener(new Binder(),
-                    new SuggestionConnectionStatusListenerProxy(executor, listener),
-                    listener.hashCode(), mContext.getOpPackageName(), mContext.getAttributionTag());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-
-    }
-
-    /**
-     * Allow callers to remove a previously registered listener. After calling this method,
-     * applications will no longer receive suggestion connection events through that listener.
-     *
-     * @param listener listener to remove.
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public void removeSuggestionConnectionStatusListener(
-            @NonNull SuggestionConnectionStatusListener listener) {
-        if (listener == null) throw new IllegalArgumentException("Listener cannot be null");
-        Log.v(TAG, "removeSuggestionConnectionStatusListener: listener=" + listener);
-        try {
-            mService.unregisterSuggestionConnectionStatusListener(listener.hashCode(),
-                    mContext.getOpPackageName());
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Parse the list of channels the DPP enrollee reports when it fails to find an AP.
-     *
-     * @param channelList List of channels in the format defined in the DPP specification.
-     * @return A parsed sparse array, where the operating class is the key.
-     * @hide
-     */
-    @VisibleForTesting
-    public static SparseArray<int[]> parseDppChannelList(String channelList) {
-        SparseArray<int[]> channelListArray = new SparseArray<>();
-
-        if (TextUtils.isEmpty(channelList)) {
-            return channelListArray;
-        }
-        StringTokenizer str = new StringTokenizer(channelList, ",");
-        String classStr = null;
-        List<Integer> channelsInClass = new ArrayList<>();
-
-        try {
-            while (str.hasMoreElements()) {
-                String cur = str.nextToken();
-
-                /**
-                 * Example for a channel list:
-                 *
-                 * 81/1,2,3,4,5,6,7,8,9,10,11,115/36,40,44,48,118/52,56,60,64,121/100,104,108,112,
-                 * 116,120,124,128,132,136,140,0/144,124/149,153,157,161,125/165
-                 *
-                 * Detect operating class by the delimiter of '/' and use a string tokenizer with
-                 * ',' as a delimiter.
-                 */
-                int classDelim = cur.indexOf('/');
-                if (classDelim != -1) {
-                    if (classStr != null) {
-                        // Store the last channel array in the sparse array, where the operating
-                        // class is the key (as an integer).
-                        int[] channelsArray = new int[channelsInClass.size()];
-                        for (int i = 0; i < channelsInClass.size(); i++) {
-                            channelsArray[i] = channelsInClass.get(i);
-                        }
-                        channelListArray.append(Integer.parseInt(classStr), channelsArray);
-                        channelsInClass = new ArrayList<>();
-                    }
-
-                    // Init a new operating class and store the first channel
-                    classStr = cur.substring(0, classDelim);
-                    String channelStr = cur.substring(classDelim + 1);
-                    channelsInClass.add(Integer.parseInt(channelStr));
-                } else {
-                    if (classStr == null) {
-                        // Invalid format
-                        Log.e(TAG, "Cannot parse DPP channel list");
-                        return new SparseArray<>();
-                    }
-                    channelsInClass.add(Integer.parseInt(cur));
-                }
-            }
-
-            // Store the last array
-            if (classStr != null) {
-                int[] channelsArray = new int[channelsInClass.size()];
-                for (int i = 0; i < channelsInClass.size(); i++) {
-                    channelsArray[i] = channelsInClass.get(i);
-                }
-                channelListArray.append(Integer.parseInt(classStr), channelsArray);
-            }
-            return channelListArray;
-        } catch (NumberFormatException e) {
-            Log.e(TAG, "Cannot parse DPP channel list");
-            return new SparseArray<>();
-        }
-    }
-
-    /**
-     * Callback interface for framework to receive network status updates and trigger of updating
-     * {@link WifiUsabilityStatsEntry}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface ScoreUpdateObserver {
-        /**
-         * Called by applications to indicate network status.
-         *
-         * @param sessionId The ID to indicate current Wi-Fi network connection obtained from
-         *                  {@link WifiConnectedNetworkScorer#onStart(int)}.
-         * @param score The score representing link quality of current Wi-Fi network connection.
-         *              Populated by connected network scorer in applications..
-         */
-        void notifyScoreUpdate(int sessionId, int score);
-
-        /**
-         * Called by applications to trigger an update of {@link WifiUsabilityStatsEntry}.
-         * To receive update applications need to add WifiUsabilityStatsEntry listener. See
-         * {@link addOnWifiUsabilityStatsListener(Executor, OnWifiUsabilityStatsListener)}.
-         *
-         * @param sessionId The ID to indicate current Wi-Fi network connection obtained from
-         *                  {@link WifiConnectedNetworkScorer#onStart(int)}.
-         */
-        void triggerUpdateOfWifiUsabilityStats(int sessionId);
-    }
-
-    /**
-     * Callback proxy for {@link ScoreUpdateObserver} objects.
-     *
-     * @hide
-     */
-    private class ScoreUpdateObserverProxy implements ScoreUpdateObserver {
-        private final IScoreUpdateObserver mScoreUpdateObserver;
-
-        private ScoreUpdateObserverProxy(IScoreUpdateObserver observer) {
-            mScoreUpdateObserver = observer;
-        }
-
-        @Override
-        public void notifyScoreUpdate(int sessionId, int score) {
-            try {
-                mScoreUpdateObserver.notifyScoreUpdate(sessionId, score);
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-
-        @Override
-        public void triggerUpdateOfWifiUsabilityStats(int sessionId) {
-            try {
-                mScoreUpdateObserver.triggerUpdateOfWifiUsabilityStats(sessionId);
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /**
-     * Interface for Wi-Fi connected network scorer. Should be implemented by applications and set
-     * when calling
-     * {@link WifiManager#setWifiConnectedNetworkScorer(Executor, WifiConnectedNetworkScorer)}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface WifiConnectedNetworkScorer {
-        /**
-         * Called by framework to indicate the start of a network connection.
-         * @param sessionId The ID to indicate current Wi-Fi network connection.
-         */
-        void onStart(int sessionId);
-
-        /**
-         * Called by framework to indicate the end of a network connection.
-         * @param sessionId The ID to indicate current Wi-Fi network connection obtained from
-         *                  {@link WifiConnectedNetworkScorer#onStart(int)}.
-         */
-        void onStop(int sessionId);
-
-        /**
-         * Framework sets callback for score change events after application sets its scorer.
-         * @param observerImpl The instance for {@link WifiManager#ScoreUpdateObserver}. Should be
-         * implemented and instantiated by framework.
-         */
-        void onSetScoreUpdateObserver(@NonNull ScoreUpdateObserver observerImpl);
-    }
-
-    /**
-     * Callback proxy for {@link WifiConnectedNetworkScorer} objects.
-     *
-     * @hide
-     */
-    private class WifiConnectedNetworkScorerProxy extends IWifiConnectedNetworkScorer.Stub {
-        private Executor mExecutor;
-        private WifiConnectedNetworkScorer mScorer;
-
-        WifiConnectedNetworkScorerProxy(Executor executor, WifiConnectedNetworkScorer scorer) {
-            mExecutor = executor;
-            mScorer = scorer;
-        }
-
-        @Override
-        public void onStart(int sessionId) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "WifiConnectedNetworkScorer: " + "onStart: sessionId=" + sessionId);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mScorer.onStart(sessionId));
-        }
-
-        @Override
-        public void onStop(int sessionId) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "WifiConnectedNetworkScorer: " + "onStop: sessionId=" + sessionId);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mScorer.onStop(sessionId));
-        }
-
-        @Override
-        public void onSetScoreUpdateObserver(IScoreUpdateObserver observerImpl) {
-            if (mVerboseLoggingEnabled) {
-                Log.v(TAG, "WifiConnectedNetworkScorer: "
-                        + "onSetScoreUpdateObserver: observerImpl=" + observerImpl);
-            }
-            Binder.clearCallingIdentity();
-            mExecutor.execute(() -> mScorer.onSetScoreUpdateObserver(
-                    new ScoreUpdateObserverProxy(observerImpl)));
-        }
-    }
-
-    /**
-     * Set a callback for Wi-Fi connected network scorer.  See {@link WifiConnectedNetworkScorer}.
-     * Only a single scorer can be set. Caller will be invoked periodically by framework to inform
-     * client about start and stop of Wi-Fi connection. Caller can clear a previously set scorer
-     * using {@link clearWifiConnectedNetworkScorer()}.
-     *
-     * @param executor The executor on which callback will be invoked.
-     * @param scorer Scorer for Wi-Fi network implemented by application.
-     * @return true Scorer is set successfully.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE)
-    public boolean setWifiConnectedNetworkScorer(@NonNull @CallbackExecutor Executor executor,
-            @NonNull WifiConnectedNetworkScorer scorer) {
-        if (executor == null) throw new IllegalArgumentException("executor cannot be null");
-        if (scorer == null) throw new IllegalArgumentException("scorer cannot be null");
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "setWifiConnectedNetworkScorer: scorer=" + scorer);
-        }
-        try {
-            return mService.setWifiConnectedNetworkScorer(new Binder(),
-                    new WifiConnectedNetworkScorerProxy(executor, scorer));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Allow caller to clear a previously set scorer. After calling this method,
-     * client will no longer receive information about start and stop of Wi-Fi connection.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE)
-    public void clearWifiConnectedNetworkScorer() {
-        if (mVerboseLoggingEnabled) {
-            Log.v(TAG, "clearWifiConnectedNetworkScorer");
-        }
-        try {
-            mService.clearWifiConnectedNetworkScorer();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Enable/disable wifi scan throttling from 3rd party apps.
-     *
-     * <p>
-     * The throttling limits for apps are described in
-     * <a href="Wi-Fi Scan Throttling">
-     * https://developer.android.com/guide/topics/connectivity/wifi-scan#wifi-scan-throttling</a>
-     * </p>
-     *
-     * @param enable true to allow scan throttling, false to disallow scan throttling.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setScanThrottleEnabled(boolean enable) {
-        try {
-            mService.setScanThrottleEnabled(enable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get the persisted Wi-Fi scan throttle state. Defaults to true, unless changed by the user via
-     * Developer options.
-     *
-     * <p>
-     * The throttling limits for apps are described in
-     * <a href="Wi-Fi Scan Throttling">
-     * https://developer.android.com/guide/topics/connectivity/wifi-scan#wifi-scan-throttling</a>
-     * </p>
-     *
-     * @return true to indicate that scan throttling is enabled, false to indicate that scan
-     * throttling is disabled.
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public boolean isScanThrottleEnabled() {
-        try {
-            return mService.isScanThrottleEnabled();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Enable/disable wifi auto wakeup feature.
-     *
-     * <p>
-     * The feature is described in
-     * <a href="Wi-Fi Turn on automatically">
-     * https://source.android.com/devices/tech/connect/wifi-infrastructure
-     * #turn_on_wi-fi_automatically
-     * </a>
-     *
-     * @param enable true to enable, false to disable.
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void setAutoWakeupEnabled(boolean enable) {
-        try {
-            mService.setAutoWakeupEnabled(enable);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get the persisted Wi-Fi auto wakeup feature state. Defaults to false, unless changed by the
-     * user via Settings.
-     *
-     * <p>
-     * The feature is described in
-     * <a href="Wi-Fi Turn on automatically">
-     * https://source.android.com/devices/tech/connect/wifi-infrastructure
-     * #turn_on_wi-fi_automatically
-     * </a>
-     *
-     * @return true to indicate that wakeup feature is enabled, false to indicate that wakeup
-     * feature is disabled.
-     */
-    @RequiresPermission(ACCESS_WIFI_STATE)
-    public boolean isAutoWakeupEnabled() {
-        try {
-            return mService.isAutoWakeupEnabled();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiMigration.java b/wifi/java/android/net/wifi/WifiMigration.java
deleted file mode 100755
index 5792d27..0000000
--- a/wifi/java/android/net/wifi/WifiMigration.java
+++ /dev/null
@@ -1,558 +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.net.wifi;
-
-import static android.os.Environment.getDataMiscCeDirectory;
-import static android.os.Environment.getDataMiscDirectory;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.content.Context;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.UserHandle;
-import android.provider.Settings;
-import android.util.AtomicFile;
-import android.util.SparseArray;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Objects;
-
-/**
- * Class used to provide one time hooks for existing OEM devices to migrate their config store
- * data and other settings to the wifi apex.
- * @hide
- */
-@SystemApi
-public final class WifiMigration {
-    /**
-     * Directory to read the wifi config store files from under.
-     */
-    private static final String LEGACY_WIFI_STORE_DIRECTORY_NAME = "wifi";
-    /**
-     * Config store file for general shared store file.
-     * AOSP Path on Android 10: /data/misc/wifi/WifiConfigStore.xml
-     */
-    public static final int STORE_FILE_SHARED_GENERAL = 0;
-    /**
-     * Config store file for softap shared store file.
-     * AOSP Path on Android 10: /data/misc/wifi/softap.conf
-     */
-    public static final int STORE_FILE_SHARED_SOFTAP = 1;
-    /**
-     * Config store file for general user store file.
-     * AOSP Path on Android 10: /data/misc_ce/<userId>/wifi/WifiConfigStore.xml
-     */
-    public static final int STORE_FILE_USER_GENERAL = 2;
-    /**
-     * Config store file for network suggestions user store file.
-     * AOSP Path on Android 10: /data/misc_ce/<userId>/wifi/WifiConfigStoreNetworkSuggestions.xml
-     */
-    public static final int STORE_FILE_USER_NETWORK_SUGGESTIONS = 3;
-
-    /** @hide */
-    @IntDef(prefix = { "STORE_FILE_SHARED_" }, value = {
-            STORE_FILE_SHARED_GENERAL,
-            STORE_FILE_SHARED_SOFTAP,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface SharedStoreFileId { }
-
-    /** @hide */
-    @IntDef(prefix = { "STORE_FILE_USER_" }, value = {
-            STORE_FILE_USER_GENERAL,
-            STORE_FILE_USER_NETWORK_SUGGESTIONS
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface UserStoreFileId { }
-
-    /**
-     * Mapping of Store file Id to Store file names.
-     *
-     * NOTE: This is the default path for the files on AOSP devices. If the OEM has modified
-     * the path or renamed the files, please edit this appropriately.
-     */
-    private static final SparseArray<String> STORE_ID_TO_FILE_NAME =
-            new SparseArray<String>() {{
-                put(STORE_FILE_SHARED_GENERAL, "WifiConfigStore.xml");
-                put(STORE_FILE_SHARED_SOFTAP, "WifiConfigStoreSoftAp.xml");
-                put(STORE_FILE_USER_GENERAL, "WifiConfigStore.xml");
-                put(STORE_FILE_USER_NETWORK_SUGGESTIONS, "WifiConfigStoreNetworkSuggestions.xml");
-            }};
-
-    /**
-     * Pre-apex wifi shared folder.
-     */
-    private static File getLegacyWifiSharedDirectory() {
-        return new File(getDataMiscDirectory(), LEGACY_WIFI_STORE_DIRECTORY_NAME);
-    }
-
-    /**
-     * Pre-apex wifi user folder.
-     */
-    private static File getLegacyWifiUserDirectory(int userId) {
-        return new File(getDataMiscCeDirectory(userId), LEGACY_WIFI_STORE_DIRECTORY_NAME);
-    }
-
-    /**
-     * Legacy files were stored as AtomicFile. So, always use AtomicFile to operate on it to ensure
-     * data integrity.
-     */
-    private static AtomicFile getSharedAtomicFile(@SharedStoreFileId int storeFileId) {
-        return new AtomicFile(new File(
-                getLegacyWifiSharedDirectory(),
-                STORE_ID_TO_FILE_NAME.get(storeFileId)));
-    }
-
-    /**
-     * Legacy files were stored as AtomicFile. So, always use AtomicFile to operate on it to ensure
-     * data integrity.
-     */
-    private static AtomicFile getUserAtomicFile(@UserStoreFileId  int storeFileId, int userId) {
-        return new AtomicFile(new File(
-                getLegacyWifiUserDirectory(userId),
-                STORE_ID_TO_FILE_NAME.get(storeFileId)));
-    }
-
-    private WifiMigration() { }
-
-    /**
-     * Load data from legacy shared wifi config store file.
-     * <p>
-     * Expected AOSP format is available in the sample files under {@code /frameworks/base/wifi/
-     * java/android/net/wifi/migration_samples}.
-     * </p>
-     * <p>
-     * Note:
-     * <li>OEMs need to change the implementation of
-     * {@link #convertAndRetrieveSharedConfigStoreFile(int)} only if their existing config store
-     * format or file locations differs from the vanilla AOSP implementation.</li>
-     * <li>The wifi apex will invoke
-     * {@link #convertAndRetrieveSharedConfigStoreFile(int)}
-     * method on every bootup, it is the responsibility of the OEM implementation to ensure that
-     * they perform the necessary in place conversion of their config store file to conform to the
-     * AOSP format. The OEM should ensure that the method should only return the
-     * {@link InputStream} stream for the data to be migrated only on the first bootup.</li>
-     * <li>Once the migration is done, the apex will invoke
-     * {@link #removeSharedConfigStoreFile(int)} to delete the store file.</li>
-     * <li>The only relevant invocation of {@link #convertAndRetrieveSharedConfigStoreFile(int)}
-     * occurs when a previously released device upgrades to the wifi apex from an OEM
-     * implementation of the wifi stack.
-     * <li>Ensure that the legacy file paths are accessible to the wifi module (sepolicy rules, file
-     * permissions, etc). Since the wifi service continues to run inside system_server process, this
-     * method will be called from the same context (so ideally the file should still be accessible).
-     * </li>
-     *
-     * @param storeFileId Identifier for the config store file. One of
-     * {@link #STORE_FILE_SHARED_GENERAL} or {@link #STORE_FILE_SHARED_GENERAL}
-     * @return Instance of {@link InputStream} for migrating data, null if no migration is
-     * necessary.
-     * @throws IllegalArgumentException on invalid storeFileId.
-     */
-    @Nullable
-    public static InputStream convertAndRetrieveSharedConfigStoreFile(
-            @SharedStoreFileId int storeFileId) {
-        if (storeFileId != STORE_FILE_SHARED_GENERAL && storeFileId !=  STORE_FILE_SHARED_SOFTAP) {
-            throw new IllegalArgumentException("Invalid shared store file id");
-        }
-        try {
-            // OEMs should do conversions necessary here before returning the stream.
-            return getSharedAtomicFile(storeFileId).openRead();
-        } catch (FileNotFoundException e) {
-            // Special handling for softap.conf.
-            // Note: OEM devices upgrading from Q -> R will only have the softap.conf file.
-            // Test devices running previous R builds however may have already migrated to the
-            // XML format. So, check for that above before falling back to check for legacy file.
-            if (storeFileId == STORE_FILE_SHARED_SOFTAP) {
-                return SoftApConfToXmlMigrationUtil.convert();
-            }
-            return null;
-        }
-    }
-
-    /**
-     * Remove the legacy shared wifi config store file.
-     *
-     * @param storeFileId Identifier for the config store file. One of
-     * {@link #STORE_FILE_SHARED_GENERAL} or {@link #STORE_FILE_SHARED_GENERAL}
-     * @throws IllegalArgumentException on invalid storeFileId.
-     */
-    public static void removeSharedConfigStoreFile(@SharedStoreFileId int storeFileId) {
-        if (storeFileId != STORE_FILE_SHARED_GENERAL && storeFileId !=  STORE_FILE_SHARED_SOFTAP) {
-            throw new IllegalArgumentException("Invalid shared store file id");
-        }
-        AtomicFile file = getSharedAtomicFile(storeFileId);
-        if (file.exists()) {
-            file.delete();
-            return;
-        }
-        // Special handling for softap.conf.
-        // Note: OEM devices upgrading from Q -> R will only have the softap.conf file.
-        // Test devices running previous R builds however may have already migrated to the
-        // XML format. So, check for that above before falling back to check for legacy file.
-        if (storeFileId == STORE_FILE_SHARED_SOFTAP) {
-            SoftApConfToXmlMigrationUtil.remove();
-        }
-    }
-
-    /**
-     * Load data from legacy user wifi config store file.
-     * <p>
-     * Expected AOSP format is available in the sample files under {@code /frameworks/base/wifi/
-     * java/android/net/wifi/migration_samples}.
-     * </p>
-     * <p>
-     * Note:
-     * <li>OEMs need to change the implementation of
-     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)} only if their existing config
-     * store format or file locations differs from the vanilla AOSP implementation.</li>
-     * <li>The wifi apex will invoke
-     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)}
-     * method on every bootup, it is the responsibility of the OEM implementation to ensure that
-     * they perform the necessary in place conversion of their config store file to conform to the
-     * AOSP format. The OEM should ensure that the method should only return the
-     * {@link InputStream} stream for the data to be migrated only on the first bootup.</li>
-     * <li>Once the migration is done, the apex will invoke
-     * {@link #removeUserConfigStoreFile(int, UserHandle)} to delete the store file.</li>
-     * <li>The only relevant invocation of
-     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)} occurs when a previously
-     * released device upgrades to the wifi apex from an OEM implementation of the wifi
-     * stack.
-     * </li>
-     * <li>Ensure that the legacy file paths are accessible to the wifi module (sepolicy rules, file
-     * permissions, etc). Since the wifi service continues to run inside system_server process, this
-     * method will be called from the same context (so ideally the file should still be accessible).
-     * </li>
-     *
-     * @param storeFileId Identifier for the config store file. One of
-     * {@link #STORE_FILE_USER_GENERAL} or {@link #STORE_FILE_USER_NETWORK_SUGGESTIONS}
-     * @param userHandle User handle.
-     * @return Instance of {@link InputStream} for migrating data, null if no migration is
-     * necessary.
-     * @throws IllegalArgumentException on invalid storeFileId or userHandle.
-     */
-    @Nullable
-    public static InputStream convertAndRetrieveUserConfigStoreFile(
-            @UserStoreFileId int storeFileId, @NonNull UserHandle userHandle) {
-        if (storeFileId != STORE_FILE_USER_GENERAL
-                && storeFileId !=  STORE_FILE_USER_NETWORK_SUGGESTIONS) {
-            throw new IllegalArgumentException("Invalid user store file id");
-        }
-        Objects.requireNonNull(userHandle);
-        try {
-            // OEMs should do conversions necessary here before returning the stream.
-            return getUserAtomicFile(storeFileId, userHandle.getIdentifier()).openRead();
-        } catch (FileNotFoundException e) {
-            return null;
-        }
-    }
-
-    /**
-     * Remove the legacy user wifi config store file.
-     *
-     * @param storeFileId Identifier for the config store file. One of
-     * {@link #STORE_FILE_USER_GENERAL} or {@link #STORE_FILE_USER_NETWORK_SUGGESTIONS}
-     * @param userHandle User handle.
-     * @throws IllegalArgumentException on invalid storeFileId or userHandle.
-    */
-    public static void removeUserConfigStoreFile(
-            @UserStoreFileId int storeFileId, @NonNull UserHandle userHandle) {
-        if (storeFileId != STORE_FILE_USER_GENERAL
-                && storeFileId !=  STORE_FILE_USER_NETWORK_SUGGESTIONS) {
-            throw new IllegalArgumentException("Invalid user store file id");
-        }
-        Objects.requireNonNull(userHandle);
-        AtomicFile file = getUserAtomicFile(storeFileId, userHandle.getIdentifier());
-        if (file.exists()) {
-            file.delete();
-        }
-    }
-
-    /**
-     * Container for all the wifi settings data to migrate.
-     */
-    public static final class SettingsMigrationData implements Parcelable {
-        private final boolean mScanAlwaysAvailable;
-        private final boolean mP2pFactoryResetPending;
-        private final String mP2pDeviceName;
-        private final boolean mSoftApTimeoutEnabled;
-        private final boolean mWakeupEnabled;
-        private final boolean mScanThrottleEnabled;
-        private final boolean mVerboseLoggingEnabled;
-
-        private SettingsMigrationData(boolean scanAlwaysAvailable, boolean p2pFactoryResetPending,
-                @Nullable String p2pDeviceName, boolean softApTimeoutEnabled, boolean wakeupEnabled,
-                boolean scanThrottleEnabled, boolean verboseLoggingEnabled) {
-            mScanAlwaysAvailable = scanAlwaysAvailable;
-            mP2pFactoryResetPending = p2pFactoryResetPending;
-            mP2pDeviceName = p2pDeviceName;
-            mSoftApTimeoutEnabled = softApTimeoutEnabled;
-            mWakeupEnabled = wakeupEnabled;
-            mScanThrottleEnabled = scanThrottleEnabled;
-            mVerboseLoggingEnabled = verboseLoggingEnabled;
-        }
-
-        public static final @NonNull Parcelable.Creator<SettingsMigrationData> CREATOR =
-                new Parcelable.Creator<SettingsMigrationData>() {
-                    @Override
-                    public SettingsMigrationData createFromParcel(Parcel in) {
-                        boolean scanAlwaysAvailable = in.readBoolean();
-                        boolean p2pFactoryResetPending = in.readBoolean();
-                        String p2pDeviceName = in.readString();
-                        boolean softApTimeoutEnabled = in.readBoolean();
-                        boolean wakeupEnabled = in.readBoolean();
-                        boolean scanThrottleEnabled = in.readBoolean();
-                        boolean verboseLoggingEnabled = in.readBoolean();
-                        return new SettingsMigrationData(
-                                scanAlwaysAvailable, p2pFactoryResetPending,
-                                p2pDeviceName, softApTimeoutEnabled, wakeupEnabled,
-                                scanThrottleEnabled, verboseLoggingEnabled);
-                    }
-
-                    @Override
-                    public SettingsMigrationData[] newArray(int size) {
-                        return new SettingsMigrationData[size];
-                    }
-                };
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(@NonNull Parcel dest, int flags) {
-            dest.writeBoolean(mScanAlwaysAvailable);
-            dest.writeBoolean(mP2pFactoryResetPending);
-            dest.writeString(mP2pDeviceName);
-            dest.writeBoolean(mSoftApTimeoutEnabled);
-            dest.writeBoolean(mWakeupEnabled);
-            dest.writeBoolean(mScanThrottleEnabled);
-            dest.writeBoolean(mVerboseLoggingEnabled);
-        }
-
-        /**
-         * @return True if scans are allowed even when wifi is toggled off, false otherwise.
-         */
-        public boolean isScanAlwaysAvailable() {
-            return mScanAlwaysAvailable;
-        }
-
-        /**
-         * @return indicate whether factory reset request is pending.
-         */
-        public boolean isP2pFactoryResetPending() {
-            return mP2pFactoryResetPending;
-        }
-
-        /**
-         * @return the Wi-Fi peer-to-peer device name
-         */
-        public @Nullable String getP2pDeviceName() {
-            return mP2pDeviceName;
-        }
-
-        /**
-         * @return Whether soft AP will shut down after a timeout period when no devices are
-         * connected.
-         */
-        public boolean isSoftApTimeoutEnabled() {
-            return mSoftApTimeoutEnabled;
-        }
-
-        /**
-         * @return whether Wi-Fi Wakeup feature is enabled.
-         */
-        public boolean isWakeUpEnabled() {
-            return mWakeupEnabled;
-        }
-
-        /**
-         * @return Whether wifi scan throttle is enabled or not.
-         */
-        public boolean isScanThrottleEnabled() {
-            return mScanThrottleEnabled;
-        }
-
-        /**
-         * @return Whether to enable verbose logging in Wi-Fi.
-         */
-        public boolean isVerboseLoggingEnabled() {
-            return mVerboseLoggingEnabled;
-        }
-
-        /**
-         * Builder to create instance of {@link SettingsMigrationData}.
-         */
-        public static final class Builder {
-            private boolean mScanAlwaysAvailable;
-            private boolean mP2pFactoryResetPending;
-            private String mP2pDeviceName;
-            private boolean mSoftApTimeoutEnabled;
-            private boolean mWakeupEnabled;
-            private boolean mScanThrottleEnabled;
-            private boolean mVerboseLoggingEnabled;
-
-            public Builder() {
-            }
-
-            /**
-             * Setting to allow scans even when wifi is toggled off.
-             *
-             * @param available true if available, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setScanAlwaysAvailable(boolean available) {
-                mScanAlwaysAvailable = available;
-                return this;
-            }
-
-            /**
-             * Indicate whether factory reset request is pending.
-             *
-             * @param pending true if pending, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setP2pFactoryResetPending(boolean pending) {
-                mP2pFactoryResetPending = pending;
-                return this;
-            }
-
-            /**
-             * The Wi-Fi peer-to-peer device name
-             *
-             * @param name Name if set, null otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setP2pDeviceName(@Nullable String name) {
-                mP2pDeviceName = name;
-                return this;
-            }
-
-            /**
-             * Whether soft AP will shut down after a timeout period when no devices are connected.
-             *
-             * @param enabled true if enabled, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setSoftApTimeoutEnabled(boolean enabled) {
-                mSoftApTimeoutEnabled = enabled;
-                return this;
-            }
-
-            /**
-             * Value to specify if Wi-Fi Wakeup feature is enabled.
-             *
-             * @param enabled true if enabled, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setWakeUpEnabled(boolean enabled) {
-                mWakeupEnabled = enabled;
-                return this;
-            }
-
-            /**
-             * Whether wifi scan throttle is enabled or not.
-             *
-             * @param enabled true if enabled, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setScanThrottleEnabled(boolean enabled) {
-                mScanThrottleEnabled = enabled;
-                return this;
-            }
-
-            /**
-             * Setting to enable verbose logging in Wi-Fi.
-             *
-             * @param enabled true if enabled, false otherwise.
-             * @return Instance of {@link Builder} to enable chaining of the builder method.
-             */
-            public @NonNull Builder setVerboseLoggingEnabled(boolean enabled) {
-                mVerboseLoggingEnabled = enabled;
-                return this;
-            }
-
-            /**
-             * Build an instance of {@link SettingsMigrationData}.
-             *
-             * @return Instance of {@link SettingsMigrationData}.
-             */
-            public @NonNull SettingsMigrationData build() {
-                return new SettingsMigrationData(mScanAlwaysAvailable, mP2pFactoryResetPending,
-                        mP2pDeviceName, mSoftApTimeoutEnabled, mWakeupEnabled, mScanThrottleEnabled,
-                        mVerboseLoggingEnabled);
-            }
-        }
-    }
-
-    /**
-     * Load data from Settings.Global values.
-     *
-     * <p>
-     * Note:
-     * <li> This is method is invoked once on the first bootup. OEM can safely delete these settings
-     * once the migration is complete. The first & only relevant invocation of
-     * {@link #loadFromSettings(Context)} ()} occurs when a previously released
-     * device upgrades to the wifi apex from an OEM implementation of the wifi stack.
-     * </li>
-     *
-     * @param context Context to use for loading the settings provider.
-     * @return Instance of {@link SettingsMigrationData} for migrating data.
-     */
-    @NonNull
-    public static SettingsMigrationData loadFromSettings(@NonNull Context context) {
-        if (Settings.Global.getInt(
-                context.getContentResolver(), Settings.Global.WIFI_MIGRATION_COMPLETED, 0) == 1) {
-            // migration already complete, ignore.
-            return null;
-        }
-        SettingsMigrationData data = new SettingsMigrationData.Builder()
-                .setScanAlwaysAvailable(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1)
-                .setP2pFactoryResetPending(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.WIFI_P2P_PENDING_FACTORY_RESET, 0) == 1)
-                .setP2pDeviceName(
-                        Settings.Global.getString(context.getContentResolver(),
-                                Settings.Global.WIFI_P2P_DEVICE_NAME))
-                .setSoftApTimeoutEnabled(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.SOFT_AP_TIMEOUT_ENABLED, 1) == 1)
-                .setWakeUpEnabled(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.WIFI_WAKEUP_ENABLED, 0) == 1)
-                .setScanThrottleEnabled(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.WIFI_SCAN_THROTTLE_ENABLED, 1) == 1)
-                .setVerboseLoggingEnabled(
-                        Settings.Global.getInt(context.getContentResolver(),
-                                Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED, 0) == 1)
-                .build();
-        Settings.Global.putInt(
-                context.getContentResolver(), Settings.Global.WIFI_MIGRATION_COMPLETED, 1);
-        return data;
-
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiNetworkAgentSpecifier.java b/wifi/java/android/net/wifi/WifiNetworkAgentSpecifier.java
deleted file mode 100644
index 0d13805..0000000
--- a/wifi/java/android/net/wifi/WifiNetworkAgentSpecifier.java
+++ /dev/null
@@ -1,163 +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.net.wifi;
-
-import static com.android.internal.util.Preconditions.checkNotNull;
-import static com.android.internal.util.Preconditions.checkState;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.MacAddress;
-import android.net.MatchAllNetworkSpecifier;
-import android.net.NetworkRequest;
-import android.net.NetworkSpecifier;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Objects;
-
-/**
- * Network specifier object used by wifi's {@link android.net.NetworkAgent}.
- * @hide
- */
-public final class WifiNetworkAgentSpecifier extends NetworkSpecifier implements Parcelable {
-    /**
-     * Security credentials for the currently connected network.
-     */
-    private final WifiConfiguration mWifiConfiguration;
-
-    public WifiNetworkAgentSpecifier(@NonNull WifiConfiguration wifiConfiguration) {
-        checkNotNull(wifiConfiguration);
-
-        mWifiConfiguration = wifiConfiguration;
-    }
-
-    /**
-     * @hide
-     */
-    public static final @android.annotation.NonNull Creator<WifiNetworkAgentSpecifier> CREATOR =
-            new Creator<WifiNetworkAgentSpecifier>() {
-                @Override
-                public WifiNetworkAgentSpecifier createFromParcel(@NonNull Parcel in) {
-                    WifiConfiguration wifiConfiguration = in.readParcelable(null);
-                    return new WifiNetworkAgentSpecifier(wifiConfiguration);
-                }
-
-                @Override
-                public WifiNetworkAgentSpecifier[] newArray(int size) {
-                    return new WifiNetworkAgentSpecifier[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeParcelable(mWifiConfiguration, flags);
-    }
-
-    @Override
-    public boolean canBeSatisfiedBy(@Nullable NetworkSpecifier other) {
-        if (this == other) {
-            return true;
-        }
-        // Any generic requests should be satisifed by a specific wifi network.
-        if (other == null || other instanceof MatchAllNetworkSpecifier) {
-            return true;
-        }
-        if (other instanceof WifiNetworkSpecifier) {
-            return satisfiesNetworkSpecifier((WifiNetworkSpecifier) other);
-        }
-        return equals(other);
-    }
-
-    /**
-     * Match {@link WifiNetworkSpecifier} in app's {@link NetworkRequest} with the
-     * {@link WifiNetworkAgentSpecifier} in wifi platform's {@link android.net.NetworkAgent}.
-     */
-    public boolean satisfiesNetworkSpecifier(@NonNull WifiNetworkSpecifier ns) {
-        // None of these should be null by construction.
-        // {@link WifiNetworkSpecifier.Builder} enforces non-null in {@link WifiNetworkSpecifier}.
-        // {@link WifiNetworkFactory} ensures non-null in {@link WifiNetworkAgentSpecifier}.
-        checkNotNull(ns);
-        checkNotNull(ns.ssidPatternMatcher);
-        checkNotNull(ns.bssidPatternMatcher);
-        checkNotNull(ns.wifiConfiguration.allowedKeyManagement);
-        checkNotNull(this.mWifiConfiguration.SSID);
-        checkNotNull(this.mWifiConfiguration.BSSID);
-        checkNotNull(this.mWifiConfiguration.allowedKeyManagement);
-
-        final String ssidWithQuotes = this.mWifiConfiguration.SSID;
-        checkState(ssidWithQuotes.startsWith("\"") && ssidWithQuotes.endsWith("\""));
-        final String ssidWithoutQuotes = ssidWithQuotes.substring(1, ssidWithQuotes.length() - 1);
-        if (!ns.ssidPatternMatcher.match(ssidWithoutQuotes)) {
-            return false;
-        }
-        final MacAddress bssid = MacAddress.fromString(this.mWifiConfiguration.BSSID);
-        final MacAddress matchBaseAddress = ns.bssidPatternMatcher.first;
-        final MacAddress matchMask = ns.bssidPatternMatcher.second;
-        if (!bssid.matches(matchBaseAddress, matchMask))  {
-            return false;
-        }
-        if (!ns.wifiConfiguration.allowedKeyManagement.equals(
-                this.mWifiConfiguration.allowedKeyManagement)) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(
-                mWifiConfiguration.SSID,
-                mWifiConfiguration.BSSID,
-                mWifiConfiguration.allowedKeyManagement);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof WifiNetworkAgentSpecifier)) {
-            return false;
-        }
-        WifiNetworkAgentSpecifier lhs = (WifiNetworkAgentSpecifier) obj;
-        return Objects.equals(this.mWifiConfiguration.SSID, lhs.mWifiConfiguration.SSID)
-                && Objects.equals(this.mWifiConfiguration.BSSID, lhs.mWifiConfiguration.BSSID)
-                && Objects.equals(this.mWifiConfiguration.allowedKeyManagement,
-                    lhs.mWifiConfiguration.allowedKeyManagement);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder("WifiNetworkAgentSpecifier [");
-        sb.append("WifiConfiguration=")
-                .append(", SSID=").append(mWifiConfiguration.SSID)
-                .append(", BSSID=").append(mWifiConfiguration.BSSID)
-                .append("]");
-        return sb.toString();
-    }
-
-    @Override
-    public NetworkSpecifier redact() {
-        return null;
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiNetworkConnectionStatistics.java b/wifi/java/android/net/wifi/WifiNetworkConnectionStatistics.java
deleted file mode 100644
index 95b2e77..0000000
--- a/wifi/java/android/net/wifi/WifiNetworkConnectionStatistics.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * Connection Statistics For a WiFi Network.
- * @hide
- */
-@SystemApi
-public class WifiNetworkConnectionStatistics implements Parcelable {
-    private static final String TAG = "WifiNetworkConnnectionStatistics";
-
-    public int numConnection;
-    public int numUsage;
-
-    public WifiNetworkConnectionStatistics(int connection, int usage) {
-        numConnection = connection;
-        numUsage = usage;
-    }
-
-    public WifiNetworkConnectionStatistics() { }
-
-    @NonNull
-    @Override
-    public String toString() {
-        StringBuilder sbuf = new StringBuilder();
-        sbuf.append("c=").append(numConnection);
-        sbuf.append(" u=").append(numUsage);
-        return sbuf.toString();
-    }
-
-
-    /** copy constructor*/
-    public WifiNetworkConnectionStatistics(WifiNetworkConnectionStatistics source) {
-        numConnection = source.numConnection;
-        numUsage = source.numUsage;
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(numConnection);
-        dest.writeInt(numUsage);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiNetworkConnectionStatistics> CREATOR =
-        new Creator<WifiNetworkConnectionStatistics>() {
-            public WifiNetworkConnectionStatistics createFromParcel(Parcel in) {
-                int numConnection = in.readInt();
-                int numUsage = in.readInt();
-                WifiNetworkConnectionStatistics stats =
-                        new WifiNetworkConnectionStatistics(numConnection, numUsage);
-                return stats;
-            }
-
-            public WifiNetworkConnectionStatistics[] newArray(int size) {
-                return new WifiNetworkConnectionStatistics[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/WifiNetworkScoreCache.java b/wifi/java/android/net/wifi/WifiNetworkScoreCache.java
deleted file mode 100755
index 378549d..0000000
--- a/wifi/java/android/net/wifi/WifiNetworkScoreCache.java
+++ /dev/null
@@ -1,316 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.Manifest.permission;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.content.Context;
-import android.net.INetworkScoreCache;
-import android.net.NetworkKey;
-import android.net.ScoredNetwork;
-import android.os.Handler;
-import android.os.Process;
-import android.util.Log;
-import android.util.LruCache;
-
-import com.android.internal.annotations.GuardedBy;
-
-import java.io.FileDescriptor;
-import java.io.PrintWriter;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * {@link INetworkScoreCache} implementation for Wifi Networks.
- *
- * TODO: This should not be part of wifi mainline module.
- * @hide
- */
-public class WifiNetworkScoreCache extends INetworkScoreCache.Stub {
-    private static final String TAG = "WifiNetworkScoreCache";
-    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
-
-    // A Network scorer returns a score in the range [-128, +127]
-    // We treat the lowest possible score as though there were no score, effectively allowing the
-    // scorer to provide an RSSI threshold below which a network should not be used.
-    public static final int INVALID_NETWORK_SCORE = Byte.MIN_VALUE;
-
-    /** Default number entries to be stored in the {@link LruCache}. */
-    private static final int DEFAULT_MAX_CACHE_SIZE = 100;
-
-    // See {@link #CacheListener}.
-    @Nullable
-    @GuardedBy("mLock")
-    private CacheListener mListener;
-
-    private final Context mContext;
-    private final Object mLock = new Object();
-
-    // The key is of the form "<ssid>"<bssid>
-    // TODO: What about SSIDs that can't be encoded as UTF-8?
-    @GuardedBy("mLock")
-    private final LruCache<String, ScoredNetwork> mCache;
-
-    public WifiNetworkScoreCache(Context context) {
-        this(context, null /* listener */);
-    }
-
-    /**
-     * Instantiates a WifiNetworkScoreCache.
-     *
-     * @param context Application context
-     * @param listener CacheListener for cache updates
-     */
-    public WifiNetworkScoreCache(Context context, @Nullable CacheListener listener) {
-        this(context, listener, DEFAULT_MAX_CACHE_SIZE);
-    }
-
-    public WifiNetworkScoreCache(
-            Context context, @Nullable CacheListener listener, int maxCacheSize) {
-        mContext = context.getApplicationContext();
-        mListener = listener;
-        mCache = new LruCache<>(maxCacheSize);
-    }
-
-    @Override public final void updateScores(List<ScoredNetwork> networks) {
-        if (networks == null || networks.isEmpty()) {
-           return;
-        }
-        if (DBG) {
-            Log.d(TAG, "updateScores list size=" + networks.size());
-        }
-
-        boolean changed = false;
-
-        synchronized(mLock) {
-            for (ScoredNetwork network : networks) {
-                String networkKey = buildNetworkKey(network);
-                if (networkKey == null) {
-                    if (DBG) {
-                        Log.d(TAG, "Failed to build network key for ScoredNetwork" + network);
-                    }
-                    continue;
-                }
-                mCache.put(networkKey, network);
-                changed = true;
-            }
-
-            if (mListener != null && changed) {
-                mListener.post(networks);
-            }
-        }
-    }
-
-    @Override public final void clearScores() {
-        synchronized (mLock) {
-            mCache.evictAll();
-        }
-    }
-
-    /**
-     * Returns whether there is any score info for the given ScanResult.
-     *
-     * This includes null-score info, so it should only be used when determining whether to request
-     * scores from the network scorer.
-     */
-    public boolean isScoredNetwork(ScanResult result) {
-        return getScoredNetwork(result) != null;
-    }
-
-    /**
-     * Returns whether there is a non-null score curve for the given ScanResult.
-     *
-     * A null score curve has special meaning - we should never connect to an ephemeral network if
-     * the score curve is null.
-     */
-    public boolean hasScoreCurve(ScanResult result) {
-        ScoredNetwork network = getScoredNetwork(result);
-        return network != null && network.rssiCurve != null;
-    }
-
-    public int getNetworkScore(ScanResult result) {
-        int score = INVALID_NETWORK_SCORE;
-
-        ScoredNetwork network = getScoredNetwork(result);
-        if (network != null && network.rssiCurve != null) {
-            score = network.rssiCurve.lookupScore(result.level);
-            if (DBG) {
-                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
-                        + " score " + Integer.toString(score)
-                        + " RSSI " + result.level);
-            }
-        }
-        return score;
-    }
-
-    /**
-     * Returns the ScoredNetwork metered hint for a given ScanResult.
-     *
-     * If there is no ScoredNetwork associated with the ScanResult then false will be returned.
-     */
-    public boolean getMeteredHint(ScanResult result) {
-        ScoredNetwork network = getScoredNetwork(result);
-        return network != null && network.meteredHint;
-    }
-
-    public int getNetworkScore(ScanResult result, boolean isActiveNetwork) {
-        int score = INVALID_NETWORK_SCORE;
-
-        ScoredNetwork network = getScoredNetwork(result);
-        if (network != null && network.rssiCurve != null) {
-            score = network.rssiCurve.lookupScore(result.level, isActiveNetwork);
-            if (DBG) {
-                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
-                        + " score " + Integer.toString(score)
-                        + " RSSI " + result.level
-                        + " isActiveNetwork " + isActiveNetwork);
-            }
-        }
-        return score;
-    }
-
-    @Nullable
-    public ScoredNetwork getScoredNetwork(ScanResult result) {
-        String key = buildNetworkKey(result);
-        if (key == null) return null;
-
-        synchronized(mLock) {
-            ScoredNetwork network = mCache.get(key);
-            return network;
-        }
-    }
-
-    /** Returns the ScoredNetwork for the given key. */
-    @Nullable
-    public ScoredNetwork getScoredNetwork(NetworkKey networkKey) {
-        String key = buildNetworkKey(networkKey);
-        if (key == null) {
-            if (DBG) {
-                Log.d(TAG, "Could not build key string for Network Key: " + networkKey);
-            }
-            return null;
-        }
-        synchronized (mLock) {
-            return mCache.get(key);
-        }
-    }
-
-    private String buildNetworkKey(ScoredNetwork network) {
-        if (network == null) {
-            return null;
-        }
-        return buildNetworkKey(network.networkKey);
-    }
-
-    private String buildNetworkKey(NetworkKey networkKey) {
-        if (networkKey == null) {
-            return null;
-        }
-        if (networkKey.wifiKey == null) return null;
-        if (networkKey.type == NetworkKey.TYPE_WIFI) {
-            String key = networkKey.wifiKey.ssid;
-            if (key == null) return null;
-            if (networkKey.wifiKey.bssid != null) {
-                key = key + networkKey.wifiKey.bssid;
-            }
-            return key;
-        }
-        return null;
-    }
-
-    private String buildNetworkKey(ScanResult result) {
-        if (result == null || result.SSID == null) {
-            return null;
-        }
-        StringBuilder key = new StringBuilder("\"");
-        key.append(result.SSID);
-        key.append("\"");
-        if (result.BSSID != null) {
-            key.append(result.BSSID);
-        }
-        return key.toString();
-    }
-
-    @Override protected final void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
-        mContext.enforceCallingOrSelfPermission(permission.DUMP, TAG);
-        String header = String.format("WifiNetworkScoreCache (%s/%d)",
-                mContext.getPackageName(), Process.myUid());
-        writer.println(header);
-        writer.println("  All score curves:");
-        synchronized (mLock) {
-            for (ScoredNetwork score : mCache.snapshot().values()) {
-                writer.println("    " + score);
-            }
-            writer.println("  Network scores for latest ScanResults:");
-            WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-            for (ScanResult scanResult : wifiManager.getScanResults()) {
-                writer.println(
-                        "    " + buildNetworkKey(scanResult) + ": " + getNetworkScore(scanResult));
-            }
-        }
-    }
-
-    /** Registers a CacheListener instance, replacing the previous listener if it existed. */
-    public void registerListener(CacheListener listener) {
-        synchronized (mLock) {
-            mListener = listener;
-        }
-    }
-
-    /** Removes the registered CacheListener. */
-    public void unregisterListener() {
-        synchronized (mLock) {
-            mListener = null;
-        }
-    }
-
-    /** Listener for updates to the cache inside WifiNetworkScoreCache. */
-    public abstract static class CacheListener {
-        private Handler mHandler;
-
-        /**
-         * Constructor for CacheListener.
-         *
-         * @param handler the Handler on which to invoke the {@link #networkCacheUpdated} method.
-         *          This cannot be null.
-         */
-        public CacheListener(@NonNull Handler handler) {
-            Objects.requireNonNull(handler);
-            mHandler = handler;
-        }
-
-        /** Invokes the {@link #networkCacheUpdated(List<ScoredNetwork>)} method on the handler. */
-        void post(List<ScoredNetwork> updatedNetworks) {
-            mHandler.post(new Runnable() {
-                @Override
-                public void run() {
-                    networkCacheUpdated(updatedNetworks);
-                }
-            });
-        }
-
-        /**
-         * Invoked whenever the cache is updated.
-         *
-         * <p>Clearing the cache does not invoke this method.
-         *
-         * @param updatedNetworks the networks that were updated
-         */
-        public abstract void networkCacheUpdated(List<ScoredNetwork> updatedNetworks);
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java b/wifi/java/android/net/wifi/WifiNetworkSpecifier.java
deleted file mode 100644
index b0213b0..0000000
--- a/wifi/java/android/net/wifi/WifiNetworkSpecifier.java
+++ /dev/null
@@ -1,563 +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.net.wifi;
-
-import static com.android.internal.util.Preconditions.checkNotNull;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.MacAddress;
-import android.net.NetworkRequest;
-import android.net.NetworkSpecifier;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.PatternMatcher;
-import android.text.TextUtils;
-import android.util.Pair;
-
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.Objects;
-
-/**
- * Network specifier object used to request a local Wi-Fi network. Apps should use the
- * {@link WifiNetworkSpecifier.Builder} class to create an instance.
- */
-public final class WifiNetworkSpecifier extends NetworkSpecifier implements Parcelable {
-    private static final String TAG = "WifiNetworkSpecifier";
-
-    /**
-     * Builder used to create {@link WifiNetworkSpecifier} objects.
-     */
-    public static final class Builder {
-        private static final String MATCH_ALL_SSID_PATTERN_PATH = ".*";
-        private static final String MATCH_EMPTY_SSID_PATTERN_PATH = "";
-        private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN1 =
-                new Pair<>(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS);
-        private static final Pair<MacAddress, MacAddress> MATCH_NO_BSSID_PATTERN2 =
-                new Pair<>(WifiManager.ALL_ZEROS_MAC_ADDRESS, MacAddress.BROADCAST_ADDRESS);
-        private static final Pair<MacAddress, MacAddress> MATCH_ALL_BSSID_PATTERN =
-                new Pair<>(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        private static final MacAddress MATCH_EXACT_BSSID_PATTERN_MASK =
-                MacAddress.BROADCAST_ADDRESS;
-
-        /**
-         * SSID pattern match specified by the app.
-         */
-        private @Nullable PatternMatcher mSsidPatternMatcher;
-        /**
-         * BSSID pattern match specified by the app.
-         * Pair of <BaseAddress, Mask>.
-         */
-        private @Nullable Pair<MacAddress, MacAddress> mBssidPatternMatcher;
-        /**
-         * Whether this is an OWE network or not.
-         */
-        private boolean mIsEnhancedOpen;
-        /**
-         * Pre-shared key for use with WPA-PSK networks.
-         */
-        private @Nullable String mWpa2PskPassphrase;
-        /**
-         * Pre-shared key for use with WPA3-SAE networks.
-         */
-        private @Nullable String mWpa3SaePassphrase;
-        /**
-         * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the WPA-EAP networks.
-         */
-        private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig;
-        /**
-         * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the SuiteB networks.
-         */
-        private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig;
-        /**
-         * This is a network that does not broadcast its SSID, so an
-         * SSID-specific probe request must be used for scans.
-         */
-        private boolean mIsHiddenSSID;
-
-        public Builder() {
-            mSsidPatternMatcher = null;
-            mBssidPatternMatcher = null;
-            mIsEnhancedOpen = false;
-            mWpa2PskPassphrase = null;
-            mWpa3SaePassphrase = null;
-            mWpa2EnterpriseConfig = null;
-            mWpa3EnterpriseConfig = null;
-            mIsHiddenSSID = false;
-        }
-
-        /**
-         * Set the unicode SSID match pattern to use for filtering networks from scan results.
-         * <p>
-         * <li>Overrides any previous value set using {@link #setSsid(String)} or
-         * {@link #setSsidPattern(PatternMatcher)}.</li>
-         *
-         * @param ssidPattern Instance of {@link PatternMatcher} containing the UTF-8 encoded
-         *                    string pattern to use for matching the network's SSID.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setSsidPattern(@NonNull PatternMatcher ssidPattern) {
-            checkNotNull(ssidPattern);
-            mSsidPatternMatcher = ssidPattern;
-            return this;
-        }
-
-        /**
-         * Set the unicode SSID for the network.
-         * <p>
-         * <li>Sets the SSID to use for filtering networks from scan results. Will only match
-         * networks whose SSID is identical to the UTF-8 encoding of the specified value.</li>
-         * <li>Overrides any previous value set using {@link #setSsid(String)} or
-         * {@link #setSsidPattern(PatternMatcher)}.</li>
-         *
-         * @param ssid The SSID of the network. It must be valid Unicode.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the SSID is not valid unicode.
-         */
-        public @NonNull Builder setSsid(@NonNull String ssid) {
-            checkNotNull(ssid);
-            final CharsetEncoder unicodeEncoder = StandardCharsets.UTF_8.newEncoder();
-            if (!unicodeEncoder.canEncode(ssid)) {
-                throw new IllegalArgumentException("SSID is not a valid unicode string");
-            }
-            mSsidPatternMatcher = new PatternMatcher(ssid, PatternMatcher.PATTERN_LITERAL);
-            return this;
-        }
-
-        /**
-         * Set the BSSID match pattern to use for filtering networks from scan results.
-         * Will match all networks with BSSID which satisfies the following:
-         * {@code BSSID & mask == baseAddress}.
-         * <p>
-         * <li>Overrides any previous value set using {@link #setBssid(MacAddress)} or
-         * {@link #setBssidPattern(MacAddress, MacAddress)}.</li>
-         *
-         * @param baseAddress Base address for BSSID pattern.
-         * @param mask Mask for BSSID pattern.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setBssidPattern(
-                @NonNull MacAddress baseAddress, @NonNull MacAddress mask) {
-            checkNotNull(baseAddress);
-            checkNotNull(mask);
-            mBssidPatternMatcher = Pair.create(baseAddress, mask);
-            return this;
-        }
-
-        /**
-         * Set the BSSID to use for filtering networks from scan results. Will only match network
-         * whose BSSID is identical to the specified value.
-         * <p>
-         * <li>Sets the BSSID to use for filtering networks from scan results. Will only match
-         * networks whose BSSID is identical to specified value.</li>
-         * <li>Overrides any previous value set using {@link #setBssid(MacAddress)} or
-         * {@link #setBssidPattern(MacAddress, MacAddress)}.</li>
-         *
-         * @param bssid BSSID of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setBssid(@NonNull MacAddress bssid) {
-            checkNotNull(bssid);
-            mBssidPatternMatcher = Pair.create(bssid, MATCH_EXACT_BSSID_PATTERN_MASK);
-            return this;
-        }
-
-        /**
-         * Specifies whether this represents an Enhanced Open (OWE) network.
-         *
-         * @param isEnhancedOpen {@code true} to indicate that the network uses enhanced open,
-         *                       {@code false} otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsEnhancedOpen(boolean isEnhancedOpen) {
-            mIsEnhancedOpen = isEnhancedOpen;
-            return this;
-        }
-
-        /**
-         * Set the ASCII WPA2 passphrase for this network. Needed for authenticating to
-         * WPA2-PSK networks.
-         *
-         * @param passphrase passphrase of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the passphrase is not ASCII encodable.
-         */
-        public @NonNull Builder setWpa2Passphrase(@NonNull String passphrase) {
-            checkNotNull(passphrase);
-            final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-            if (!asciiEncoder.canEncode(passphrase)) {
-                throw new IllegalArgumentException("passphrase not ASCII encodable");
-            }
-            mWpa2PskPassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Set the ASCII WPA3 passphrase for this network. Needed for authenticating to WPA3-SAE
-         * networks.
-         *
-         * @param passphrase passphrase of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the passphrase is not ASCII encodable.
-         */
-        public @NonNull Builder setWpa3Passphrase(@NonNull String passphrase) {
-            checkNotNull(passphrase);
-            final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-            if (!asciiEncoder.canEncode(passphrase)) {
-                throw new IllegalArgumentException("passphrase not ASCII encodable");
-            }
-            mWpa3SaePassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA2-EAP networks. See {@link WifiEnterpriseConfig} for description.
-         *
-         * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setWpa2EnterpriseConfig(
-                @NonNull WifiEnterpriseConfig enterpriseConfig) {
-            checkNotNull(enterpriseConfig);
-            mWpa2EnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-            return this;
-        }
-
-        /**
-         * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA3-SuiteB networks. See {@link WifiEnterpriseConfig} for description.
-         *
-         * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setWpa3EnterpriseConfig(
-                @NonNull WifiEnterpriseConfig enterpriseConfig) {
-            checkNotNull(enterpriseConfig);
-            mWpa3EnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-            return this;
-        }
-
-        /**
-         * Specifies whether this represents a hidden network.
-         * <p>
-         * <li>Setting this disallows the usage of {@link #setSsidPattern(PatternMatcher)} since
-         * hidden networks need to be explicitly probed for.</li>
-         * <li>If not set, defaults to false (i.e not a hidden network).</li>
-         *
-         * @param isHiddenSsid {@code true} to indicate that the network is hidden, {@code false}
-         *                     otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsHiddenSsid(boolean isHiddenSsid) {
-            mIsHiddenSSID = isHiddenSsid;
-            return this;
-        }
-
-        private void setSecurityParamsInWifiConfiguration(
-                @NonNull WifiConfiguration configuration) {
-            if (!TextUtils.isEmpty(mWpa2PskPassphrase)) { // WPA-PSK network.
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-                // WifiConfiguration.preSharedKey needs quotes around ASCII password.
-                configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\"";
-            } else if (!TextUtils.isEmpty(mWpa3SaePassphrase)) { // WPA3-SAE network.
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
-                // WifiConfiguration.preSharedKey needs quotes around ASCII password.
-                configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\"";
-            } 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);
-                configuration.enterpriseConfig = mWpa3EnterpriseConfig;
-            } else if (mIsEnhancedOpen) { // OWE network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
-            } else { // Open network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OPEN);
-            }
-        }
-
-        /**
-         * Helper method to build WifiConfiguration object from the builder.
-         * @return Instance of {@link WifiConfiguration}.
-         */
-        private WifiConfiguration buildWifiConfiguration() {
-            final WifiConfiguration wifiConfiguration = new WifiConfiguration();
-            // WifiConfiguration.SSID needs quotes around unicode SSID.
-            if (mSsidPatternMatcher.getType() == PatternMatcher.PATTERN_LITERAL) {
-                wifiConfiguration.SSID = "\"" + mSsidPatternMatcher.getPath() + "\"";
-            }
-            if (mBssidPatternMatcher.second == MATCH_EXACT_BSSID_PATTERN_MASK) {
-                wifiConfiguration.BSSID = mBssidPatternMatcher.first.toString();
-            }
-            setSecurityParamsInWifiConfiguration(wifiConfiguration);
-            wifiConfiguration.hiddenSSID = mIsHiddenSSID;
-            return wifiConfiguration;
-        }
-
-        private boolean hasSetAnyPattern() {
-            return mSsidPatternMatcher != null || mBssidPatternMatcher != null;
-        }
-
-        private void setMatchAnyPatternIfUnset() {
-            if (mSsidPatternMatcher == null) {
-                mSsidPatternMatcher = new PatternMatcher(MATCH_ALL_SSID_PATTERN_PATH,
-                        PatternMatcher.PATTERN_SIMPLE_GLOB);
-            }
-            if (mBssidPatternMatcher == null) {
-                mBssidPatternMatcher = MATCH_ALL_BSSID_PATTERN;
-            }
-        }
-
-        private boolean hasSetMatchNonePattern() {
-            if (mSsidPatternMatcher.getType() != PatternMatcher.PATTERN_PREFIX
-                    && mSsidPatternMatcher.getPath().equals(MATCH_EMPTY_SSID_PATTERN_PATH)) {
-                return true;
-            }
-            if (mBssidPatternMatcher.equals(MATCH_NO_BSSID_PATTERN1)) {
-                return true;
-            }
-            if (mBssidPatternMatcher.equals(MATCH_NO_BSSID_PATTERN2)) {
-                return true;
-            }
-            return false;
-        }
-
-        private boolean hasSetMatchAllPattern() {
-            if ((mSsidPatternMatcher.match(MATCH_EMPTY_SSID_PATTERN_PATH))
-                    && mBssidPatternMatcher.equals(MATCH_ALL_BSSID_PATTERN)) {
-                return true;
-            }
-            return false;
-        }
-
-        private void validateSecurityParams() {
-            int numSecurityTypes = 0;
-            numSecurityTypes += mIsEnhancedOpen ? 1 : 0;
-            numSecurityTypes += !TextUtils.isEmpty(mWpa2PskPassphrase) ? 1 : 0;
-            numSecurityTypes += !TextUtils.isEmpty(mWpa3SaePassphrase) ? 1 : 0;
-            numSecurityTypes += mWpa2EnterpriseConfig != null ? 1 : 0;
-            numSecurityTypes += mWpa3EnterpriseConfig != null ? 1 : 0;
-            if (numSecurityTypes > 1) {
-                throw new IllegalStateException("only one of setIsEnhancedOpen, setWpa2Passphrase,"
-                        + "setWpa3Passphrase, setWpa2EnterpriseConfig or setWpa3EnterpriseConfig"
-                        + " can be invoked for network specifier");
-            }
-        }
-
-        /**
-         * Create a specifier object used to request a local Wi-Fi network. The generated
-         * {@link NetworkSpecifier} should be used in
-         * {@link NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} when building
-         * the {@link NetworkRequest}. These specifiers can only be used to request a local wifi
-         * network (i.e no internet capability). So, the device will not switch it's default route
-         * to wifi if there are other transports (cellular for example) available.
-         *<p>
-         * Note: Apps can set a combination of network match params:
-         * <li> SSID Pattern using {@link #setSsidPattern(PatternMatcher)} OR Specific SSID using
-         * {@link #setSsid(String)}. </li>
-         * AND/OR
-         * <li> BSSID Pattern using {@link #setBssidPattern(MacAddress, MacAddress)} OR Specific
-         * BSSID using {@link #setBssid(MacAddress)} </li>
-         * to trigger connection to a network that matches the set params.
-         * The system will find the set of networks matching the request and present the user
-         * with a system dialog which will allow the user to select a specific Wi-Fi network to
-         * connect to or to deny the request.
-         *</p>
-         *
-         * For example:
-         * To connect to an open network with a SSID prefix of "test" and a BSSID OUI of "10:03:23":
-         *
-         * <pre>{@code
-         * final NetworkSpecifier specifier =
-         *      new Builder()
-         *      .setSsidPattern(new PatternMatcher("test", PatterMatcher.PATTERN_PREFIX))
-         *      .setBssidPattern(MacAddress.fromString("10:03:23:00:00:00"),
-         *                       MacAddress.fromString("ff:ff:ff:00:00:00"))
-         *      .build()
-         * final NetworkRequest request =
-         *      new NetworkRequest.Builder()
-         *      .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
-         *      .removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
-         *      .setNetworkSpecifier(specifier)
-         *      .build();
-         * final ConnectivityManager connectivityManager =
-         *      context.getSystemService(Context.CONNECTIVITY_SERVICE);
-         * final NetworkCallback networkCallback = new NetworkCallback() {
-         *      ...
-         *      {@literal @}Override
-         *      void onAvailable(...) {}
-         *      // etc.
-         * };
-         * connectivityManager.requestNetwork(request, networkCallback);
-         * }</pre>
-         *
-         * @return Instance of {@link NetworkSpecifier}.
-         * @throws IllegalStateException on invalid params set.
-         */
-        public @NonNull WifiNetworkSpecifier build() {
-            if (!hasSetAnyPattern()) {
-                throw new IllegalStateException("one of setSsidPattern/setSsid/setBssidPattern/"
-                        + "setBssid should be invoked for specifier");
-            }
-            setMatchAnyPatternIfUnset();
-            if (hasSetMatchNonePattern()) {
-                throw new IllegalStateException("cannot set match-none pattern for specifier");
-            }
-            if (hasSetMatchAllPattern()) {
-                throw new IllegalStateException("cannot set match-all pattern for specifier");
-            }
-            if (mIsHiddenSSID && mSsidPatternMatcher.getType() != PatternMatcher.PATTERN_LITERAL) {
-                throw new IllegalStateException("setSsid should also be invoked when "
-                        + "setIsHiddenSsid is invoked for network specifier");
-            }
-            validateSecurityParams();
-
-            return new WifiNetworkSpecifier(
-                    mSsidPatternMatcher,
-                    mBssidPatternMatcher,
-                    buildWifiConfiguration());
-        }
-    }
-
-    /**
-     * SSID pattern match specified by the app.
-     * @hide
-     */
-    public final PatternMatcher ssidPatternMatcher;
-
-    /**
-     * BSSID pattern match specified by the app.
-     * Pair of <BaseAddress, Mask>.
-     * @hide
-     */
-    public final Pair<MacAddress, MacAddress> bssidPatternMatcher;
-
-    /**
-     * Security credentials for the network.
-     * <p>
-     * Note: {@link WifiConfiguration#SSID} & {@link WifiConfiguration#BSSID} fields from
-     * WifiConfiguration are not used. Instead we use the {@link #ssidPatternMatcher} &
-     * {@link #bssidPatternMatcher} fields embedded directly
-     * within {@link WifiNetworkSpecifier}.
-     * @hide
-     */
-    public final WifiConfiguration wifiConfiguration;
-
-    /** @hide */
-    public WifiNetworkSpecifier() throws IllegalAccessException {
-        throw new IllegalAccessException("Use the builder to create an instance");
-    }
-
-    /** @hide */
-    public WifiNetworkSpecifier(@NonNull PatternMatcher ssidPatternMatcher,
-                                @NonNull Pair<MacAddress, MacAddress> bssidPatternMatcher,
-                                @NonNull WifiConfiguration wifiConfiguration) {
-        checkNotNull(ssidPatternMatcher);
-        checkNotNull(bssidPatternMatcher);
-        checkNotNull(wifiConfiguration);
-
-        this.ssidPatternMatcher = ssidPatternMatcher;
-        this.bssidPatternMatcher = bssidPatternMatcher;
-        this.wifiConfiguration = wifiConfiguration;
-    }
-
-    public static final @NonNull Creator<WifiNetworkSpecifier> CREATOR =
-            new Creator<WifiNetworkSpecifier>() {
-                @Override
-                public WifiNetworkSpecifier createFromParcel(Parcel in) {
-                    PatternMatcher ssidPatternMatcher = in.readParcelable(/* classLoader */null);
-                    MacAddress baseAddress = in.readParcelable(null);
-                    MacAddress mask = in.readParcelable(null);
-                    Pair<MacAddress, MacAddress> bssidPatternMatcher =
-                            Pair.create(baseAddress, mask);
-                    WifiConfiguration wifiConfiguration = in.readParcelable(null);
-                    return new WifiNetworkSpecifier(ssidPatternMatcher, bssidPatternMatcher,
-                            wifiConfiguration);
-                }
-
-                @Override
-                public WifiNetworkSpecifier[] newArray(int size) {
-                    return new WifiNetworkSpecifier[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeParcelable(ssidPatternMatcher, flags);
-        dest.writeParcelable(bssidPatternMatcher.first, flags);
-        dest.writeParcelable(bssidPatternMatcher.second, flags);
-        dest.writeParcelable(wifiConfiguration, flags);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(
-                ssidPatternMatcher.getPath(), ssidPatternMatcher.getType(), bssidPatternMatcher,
-                wifiConfiguration.allowedKeyManagement);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof WifiNetworkSpecifier)) {
-            return false;
-        }
-        WifiNetworkSpecifier lhs = (WifiNetworkSpecifier) obj;
-        return Objects.equals(this.ssidPatternMatcher.getPath(),
-                    lhs.ssidPatternMatcher.getPath())
-                && Objects.equals(this.ssidPatternMatcher.getType(),
-                    lhs.ssidPatternMatcher.getType())
-                && Objects.equals(this.bssidPatternMatcher,
-                    lhs.bssidPatternMatcher)
-                && Objects.equals(this.wifiConfiguration.allowedKeyManagement,
-                    lhs.wifiConfiguration.allowedKeyManagement);
-    }
-
-    @Override
-    public String toString() {
-        return new StringBuilder()
-                .append("WifiNetworkSpecifier [")
-                .append(", SSID Match pattern=").append(ssidPatternMatcher)
-                .append(", BSSID Match pattern=").append(bssidPatternMatcher)
-                .append(", SSID=").append(wifiConfiguration.SSID)
-                .append(", BSSID=").append(wifiConfiguration.BSSID)
-                .append("]")
-                .toString();
-    }
-
-    /** @hide */
-    @Override
-    public boolean canBeSatisfiedBy(NetworkSpecifier other) {
-        if (other instanceof WifiNetworkAgentSpecifier) {
-            return ((WifiNetworkAgentSpecifier) other).satisfiesNetworkSpecifier(this);
-        }
-        // Specific requests are checked for equality although testing for equality of 2 patterns do
-        // not make much sense!
-        return equals(other);
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java b/wifi/java/android/net/wifi/WifiNetworkSuggestion.java
deleted file mode 100644
index 4d3a2c0..0000000
--- a/wifi/java/android/net/wifi/WifiNetworkSuggestion.java
+++ /dev/null
@@ -1,962 +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.net.wifi;
-
-import static com.android.internal.util.Preconditions.checkNotNull;
-
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-
-import java.nio.charset.CharsetEncoder;
-import java.nio.charset.StandardCharsets;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * The Network Suggestion object is used to provide a Wi-Fi network for consideration when
- * auto-connecting to networks. Apps cannot directly create this object, they must use
- * {@link WifiNetworkSuggestion.Builder#build()} to obtain an instance of this object.
- *<p>
- * Apps can provide a list of such networks to the platform using
- * {@link WifiManager#addNetworkSuggestions(List)}.
- */
-public final class WifiNetworkSuggestion implements Parcelable {
-    /**
-     * Builder used to create {@link WifiNetworkSuggestion} objects.
-     */
-    public static final class Builder {
-        private static final int UNASSIGNED_PRIORITY = -1;
-
-        /**
-         * SSID of the network.
-         */
-        private String mSsid;
-        /**
-         * Optional BSSID within the network.
-         */
-        private MacAddress mBssid;
-        /**
-         * Whether this is an OWE network or not.
-         */
-        private boolean mIsEnhancedOpen;
-        /**
-         * Pre-shared key for use with WPA-PSK networks.
-         */
-        private @Nullable String mWpa2PskPassphrase;
-        /**
-         * Pre-shared key for use with WPA3-SAE networks.
-         */
-        private @Nullable String mWpa3SaePassphrase;
-        /**
-         * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the WPA-EAP networks.
-         */
-        private @Nullable WifiEnterpriseConfig mWpa2EnterpriseConfig;
-        /**
-         * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the SuiteB networks.
-         */
-        private @Nullable WifiEnterpriseConfig mWpa3EnterpriseConfig;
-        /**
-         * The passpoint config for use with Hotspot 2.0 network
-         */
-        private @Nullable PasspointConfiguration mPasspointConfiguration;
-        /**
-         * This is a network that does not broadcast its SSID, so an
-         * SSID-specific probe request must be used for scans.
-         */
-        private boolean mIsHiddenSSID;
-        /**
-         * Whether app needs to log in to captive portal to obtain Internet access.
-         */
-        private boolean mIsAppInteractionRequired;
-        /**
-         * Whether user needs to log in to captive portal to obtain Internet access.
-         */
-        private boolean mIsUserInteractionRequired;
-        /**
-         * Whether this network is metered or not.
-         */
-        private int mMeteredOverride;
-        /**
-         * Priority of this network among other network suggestions provided by the app.
-         * The lower the number, the higher the priority (i.e value of 0 = highest priority).
-         */
-        private int mPriority;
-
-        /**
-         * The carrier ID identifies the operator who provides this network configuration.
-         *    see {@link TelephonyManager#getSimCarrierId()}
-         */
-        private int mCarrierId;
-
-        /**
-         * Whether this network is shared credential with user to allow user manually connect.
-         */
-        private boolean mIsSharedWithUser;
-
-        /**
-         * Whether the setCredentialSharedWithUser have been called.
-         */
-        private boolean mIsSharedWithUserSet;
-
-        /**
-         * Whether this network is initialized with auto-join enabled (the default) or not.
-         */
-        private boolean mIsInitialAutojoinEnabled;
-
-        /**
-         * Pre-shared key for use with WAPI-PSK networks.
-         */
-        private @Nullable String mWapiPskPassphrase;
-
-        /**
-         * The enterprise configuration details specifying the EAP method,
-         * certificates and other settings associated with the WAPI networks.
-         */
-        private @Nullable WifiEnterpriseConfig mWapiEnterpriseConfig;
-
-        /**
-         * Whether this network will be brought up as untrusted (TRUSTED capability bit removed).
-         */
-        private boolean mIsNetworkUntrusted;
-
-        public Builder() {
-            mSsid = null;
-            mBssid =  null;
-            mIsEnhancedOpen = false;
-            mWpa2PskPassphrase = null;
-            mWpa3SaePassphrase = null;
-            mWpa2EnterpriseConfig = null;
-            mWpa3EnterpriseConfig = null;
-            mPasspointConfiguration = null;
-            mIsHiddenSSID = false;
-            mIsAppInteractionRequired = false;
-            mIsUserInteractionRequired = false;
-            mMeteredOverride = WifiConfiguration.METERED_OVERRIDE_NONE;
-            mIsSharedWithUser = true;
-            mIsSharedWithUserSet = false;
-            mIsInitialAutojoinEnabled = true;
-            mPriority = UNASSIGNED_PRIORITY;
-            mCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
-            mWapiPskPassphrase = null;
-            mWapiEnterpriseConfig = null;
-            mIsNetworkUntrusted = false;
-        }
-
-        /**
-         * Set the unicode SSID for the network.
-         * <p>
-         * <li>Overrides any previous value set using {@link #setSsid(String)}.</li>
-         *
-         * @param ssid The SSID of the network. It must be valid Unicode.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the SSID is not valid unicode.
-         */
-        public @NonNull Builder setSsid(@NonNull String ssid) {
-            checkNotNull(ssid);
-            final CharsetEncoder unicodeEncoder = StandardCharsets.UTF_8.newEncoder();
-            if (!unicodeEncoder.canEncode(ssid)) {
-                throw new IllegalArgumentException("SSID is not a valid unicode string");
-            }
-            mSsid = new String(ssid);
-            return this;
-        }
-
-        /**
-         * Set the BSSID to use for filtering networks from scan results. Will only match network
-         * whose BSSID is identical to the specified value.
-         * <p>
-         * <li Sets a specific BSSID for the network suggestion. If set, only the specified BSSID
-         * with the specified SSID will be considered for connection.
-         * <li>If set, only the specified BSSID with the specified SSID will be considered for
-         * connection.</li>
-         * <li>If not set, all BSSIDs with the specified SSID will be considered for connection.
-         * </li>
-         * <li>Overrides any previous value set using {@link #setBssid(MacAddress)}.</li>
-         *
-         * @param bssid BSSID of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setBssid(@NonNull MacAddress bssid) {
-            checkNotNull(bssid);
-            mBssid = MacAddress.fromBytes(bssid.toByteArray());
-            return this;
-        }
-
-        /**
-         * Specifies whether this represents an Enhanced Open (OWE) network.
-         *
-         * @param isEnhancedOpen {@code true} to indicate that the network used enhanced open,
-         *                       {@code false} otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsEnhancedOpen(boolean isEnhancedOpen) {
-            mIsEnhancedOpen = isEnhancedOpen;
-            return this;
-        }
-
-        /**
-         * Set the ASCII WPA2 passphrase for this network. Needed for authenticating to
-         * WPA2-PSK networks.
-         *
-         * @param passphrase passphrase of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the passphrase is not ASCII encodable.
-         */
-        public @NonNull Builder setWpa2Passphrase(@NonNull String passphrase) {
-            checkNotNull(passphrase);
-            final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-            if (!asciiEncoder.canEncode(passphrase)) {
-                throw new IllegalArgumentException("passphrase not ASCII encodable");
-            }
-            mWpa2PskPassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Set the ASCII WPA3 passphrase for this network. Needed for authenticating to WPA3-SAE
-         * networks.
-         *
-         * @param passphrase passphrase of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the passphrase is not ASCII encodable.
-         */
-        public @NonNull Builder setWpa3Passphrase(@NonNull String passphrase) {
-            checkNotNull(passphrase);
-            final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-            if (!asciiEncoder.canEncode(passphrase)) {
-                throw new IllegalArgumentException("passphrase not ASCII encodable");
-            }
-            mWpa3SaePassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA2 enterprise networks. See {@link WifiEnterpriseConfig} for description.
-         *
-         * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if configuration CA certificate or
-         *                                  AltSubjectMatch/DomainSuffixMatch is not set.
-         */
-        public @NonNull Builder setWpa2EnterpriseConfig(
-                @NonNull WifiEnterpriseConfig enterpriseConfig) {
-            checkNotNull(enterpriseConfig);
-            if (enterpriseConfig.isInsecure()) {
-                throw new IllegalArgumentException("Enterprise configuration is insecure");
-            }
-            mWpa2EnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-            return this;
-        }
-
-        /**
-         * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WPA3 enterprise networks. See {@link WifiEnterpriseConfig} for description.
-         *
-         * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if configuration CA certificate or
-         *                                  AltSubjectMatch/DomainSuffixMatch is not set.
-         */
-        public @NonNull Builder setWpa3EnterpriseConfig(
-                @NonNull WifiEnterpriseConfig enterpriseConfig) {
-            checkNotNull(enterpriseConfig);
-            if (enterpriseConfig.isInsecure()) {
-                throw new IllegalArgumentException("Enterprise configuration is insecure");
-            }
-            mWpa3EnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-            return this;
-        }
-
-        /**
-         * Set the associated Passpoint configuration for this network. Needed for authenticating
-         * to Hotspot 2.0 networks. See {@link PasspointConfiguration} for description.
-         *
-         * @param passpointConfig Instance of {@link PasspointConfiguration}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if passpoint configuration is invalid.
-         */
-        public @NonNull Builder setPasspointConfig(
-                @NonNull PasspointConfiguration passpointConfig) {
-            checkNotNull(passpointConfig);
-            if (!passpointConfig.validate()) {
-                throw new IllegalArgumentException("Passpoint configuration is invalid");
-            }
-            mPasspointConfiguration = passpointConfig;
-            return this;
-        }
-
-        /**
-         * Set the carrier ID of the network operator. The carrier ID associates a Suggested
-         * network with a specific carrier (and therefore SIM). The carrier ID must be provided
-         * for any network which uses the SIM-based authentication: e.g. EAP-SIM, EAP-AKA,
-         * EAP-AKA', and EAP-PEAP with SIM-based phase 2 authentication.
-         * @param carrierId see {@link TelephonyManager#getSimCarrierId()}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         *
-         * @hide
-         */
-        @SystemApi
-        @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING)
-        public @NonNull Builder setCarrierId(int carrierId) {
-            mCarrierId = carrierId;
-            return this;
-        }
-
-        /**
-         * Set the ASCII WAPI passphrase for this network. Needed for authenticating to
-         * WAPI-PSK networks.
-         *
-         * @param passphrase passphrase of the network.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the passphrase is not ASCII encodable.
-         *
-         */
-        public @NonNull Builder setWapiPassphrase(@NonNull String passphrase) {
-            checkNotNull(passphrase);
-            final CharsetEncoder asciiEncoder = StandardCharsets.US_ASCII.newEncoder();
-            if (!asciiEncoder.canEncode(passphrase)) {
-                throw new IllegalArgumentException("passphrase not ASCII encodable");
-            }
-            mWapiPskPassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Set the associated enterprise configuration for this network. Needed for authenticating
-         * to WAPI-CERT networks. See {@link WifiEnterpriseConfig} for description.
-         *
-         * @param enterpriseConfig Instance of {@link WifiEnterpriseConfig}.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setWapiEnterpriseConfig(
-                @NonNull WifiEnterpriseConfig enterpriseConfig) {
-            checkNotNull(enterpriseConfig);
-            mWapiEnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-            return this;
-        }
-
-        /**
-         * Specifies whether this represents a hidden network.
-         * <p>
-         * <li>If not set, defaults to false (i.e not a hidden network).</li>
-         *
-         * @param isHiddenSsid {@code true} to indicate that the network is hidden, {@code false}
-         *                     otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsHiddenSsid(boolean isHiddenSsid) {
-            mIsHiddenSSID = isHiddenSsid;
-            return this;
-        }
-
-        /**
-         * Specifies whether the app needs to log in to a captive portal to obtain Internet access.
-         * <p>
-         * This will dictate if the directed broadcast
-         * {@link WifiManager#ACTION_WIFI_NETWORK_SUGGESTION_POST_CONNECTION} will be sent to the
-         * app after successfully connecting to the network.
-         * Use this for captive portal type networks where the app needs to authenticate the user
-         * before the device can access the network.
-         * <p>
-         * <li>If not set, defaults to false (i.e no app interaction required).</li>
-         *
-         * @param isAppInteractionRequired {@code true} to indicate that app interaction is
-         *                                 required, {@code false} otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsAppInteractionRequired(boolean isAppInteractionRequired) {
-            mIsAppInteractionRequired = isAppInteractionRequired;
-            return this;
-        }
-
-        /**
-         * Specifies whether the user needs to log in to a captive portal to obtain Internet access.
-         * <p>
-         * <li>If not set, defaults to false (i.e no user interaction required).</li>
-         *
-         * @param isUserInteractionRequired {@code true} to indicate that user interaction is
-         *                                  required, {@code false} otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsUserInteractionRequired(boolean isUserInteractionRequired) {
-            mIsUserInteractionRequired = isUserInteractionRequired;
-            return this;
-        }
-
-        /**
-         * Specify the priority of this network among other network suggestions provided by the same
-         * app (priorities have no impact on suggestions by different apps). The higher the number,
-         * the higher the priority (i.e value of 0 = lowest priority).
-         * <p>
-         * <li>If not set, defaults a lower priority than any assigned priority.</li>
-         *
-         * @param priority Integer number representing the priority among suggestions by the app.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         * @throws IllegalArgumentException if the priority value is negative.
-         */
-        public @NonNull Builder setPriority(@IntRange(from = 0) int priority) {
-            if (priority < 0) {
-                throw new IllegalArgumentException("Invalid priority value " + priority);
-            }
-            mPriority = priority;
-            return this;
-        }
-
-        /**
-         * Specifies whether this network is metered.
-         * <p>
-         * <li>If not set, defaults to detect automatically.</li>
-         *
-         * @param isMetered {@code true} to indicate that the network is metered, {@code false}
-         *                  for not metered.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsMetered(boolean isMetered) {
-            if (isMetered) {
-                mMeteredOverride = WifiConfiguration.METERED_OVERRIDE_METERED;
-            } else {
-                mMeteredOverride = WifiConfiguration.METERED_OVERRIDE_NOT_METERED;
-            }
-            return this;
-        }
-
-        /**
-         * Specifies whether the network credentials provided with this suggestion can be used by
-         * the user to explicitly (manually) connect to this network. If true this network will
-         * appear in the Wi-Fi Picker (in Settings) and the user will be able to select and connect
-         * to it with the provided credentials. If false, the user will need to enter network
-         * credentials and the resulting configuration will become a user saved network.
-         * <p>
-         * <li>Note: Only valid for secure (non-open) networks.
-         * <li>If not set, defaults to true (i.e. allow user to manually connect) for secure
-         * networks and false for open networks.</li>
-         *
-         * @param isShared {@code true} to indicate that the credentials may be used by the user to
-         *                              manually connect to the network, {@code false} otherwise.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setCredentialSharedWithUser(boolean isShared) {
-            mIsSharedWithUser = isShared;
-            mIsSharedWithUserSet = true;
-            return this;
-        }
-
-        /**
-         * Specifies whether the suggestion is created with auto-join enabled or disabled. The
-         * user may modify the auto-join configuration of a suggestion directly once the device
-         * associates to the network.
-         * <p>
-         * If auto-join is initialized as disabled the user may still be able to manually connect
-         * to the network. Therefore, disabling auto-join only makes sense if
-         * {@link #setCredentialSharedWithUser(boolean)} is set to true (the default) which
-         * itself implies a secure (non-open) network.
-         * <p>
-         * If not set, defaults to true (i.e. auto-join is initialized as enabled).
-         *
-         * @param enabled true for initializing with auto-join enabled (the default), false to
-         *                initializing with auto-join disabled.
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setIsInitialAutojoinEnabled(boolean enabled) {
-            mIsInitialAutojoinEnabled = enabled;
-            return this;
-        }
-
-        /**
-         * Specifies whether the system will bring up the network (if selected) as untrusted. An
-         * untrusted network has its {@link android.net.NetworkCapabilities#NET_CAPABILITY_TRUSTED}
-         * capability removed. The Wi-Fi network selection process may use this information to
-         * influence priority of the suggested network for Wi-Fi network selection (most likely to
-         * reduce it). The connectivity service may use this information to influence the overall
-         * network configuration of the device.
-         * <p>
-         * <li> An untrusted network's credentials may not be shared with the user using
-         * {@link #setCredentialSharedWithUser(boolean)}.</li>
-         * <li> If not set, defaults to false (i.e. network is trusted).</li>
-         *
-         * @param isUntrusted Boolean indicating whether the network should be brought up untrusted
-         *                    (if true) or trusted (if false).
-         * @return Instance of {@link Builder} to enable chaining of the builder method.
-         */
-        public @NonNull Builder setUntrusted(boolean isUntrusted) {
-            mIsNetworkUntrusted = isUntrusted;
-            return this;
-        }
-
-        private void setSecurityParamsInWifiConfiguration(
-                @NonNull WifiConfiguration configuration) {
-            if (!TextUtils.isEmpty(mWpa2PskPassphrase)) { // WPA-PSK network.
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
-                // WifiConfiguration.preSharedKey needs quotes around ASCII password.
-                configuration.preSharedKey = "\"" + mWpa2PskPassphrase + "\"";
-            } else if (!TextUtils.isEmpty(mWpa3SaePassphrase)) { // WPA3-SAE network.
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
-                // WifiConfiguration.preSharedKey needs quotes around ASCII password.
-                configuration.preSharedKey = "\"" + mWpa3SaePassphrase + "\"";
-            } 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);
-                configuration.enterpriseConfig = mWpa3EnterpriseConfig;
-            } else if (mIsEnhancedOpen) { // OWE network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
-            } else if (!TextUtils.isEmpty(mWapiPskPassphrase)) { // WAPI-PSK network.
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_WAPI_PSK);
-                // WifiConfiguration.preSharedKey needs quotes around ASCII password.
-                configuration.preSharedKey = "\"" + mWapiPskPassphrase + "\"";
-            } else if (mWapiEnterpriseConfig != null) { // WAPI-CERT network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_WAPI_CERT);
-                configuration.enterpriseConfig = mWapiEnterpriseConfig;
-            } else { // Open network
-                configuration.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OPEN);
-            }
-        }
-
-        /**
-         * Helper method to build WifiConfiguration object from the builder.
-         * @return Instance of {@link WifiConfiguration}.
-         */
-        private WifiConfiguration buildWifiConfiguration() {
-            final WifiConfiguration wifiConfiguration = new WifiConfiguration();
-            // WifiConfiguration.SSID needs quotes around unicode SSID.
-            wifiConfiguration.SSID = "\"" + mSsid + "\"";
-            if (mBssid != null) {
-                wifiConfiguration.BSSID = mBssid.toString();
-            }
-
-            setSecurityParamsInWifiConfiguration(wifiConfiguration);
-
-            wifiConfiguration.hiddenSSID = mIsHiddenSSID;
-            wifiConfiguration.priority = mPriority;
-            wifiConfiguration.meteredOverride = mMeteredOverride;
-            wifiConfiguration.carrierId = mCarrierId;
-            wifiConfiguration.trusted = !mIsNetworkUntrusted;
-            return wifiConfiguration;
-        }
-
-        private void validateSecurityParams() {
-            int numSecurityTypes = 0;
-            numSecurityTypes += mIsEnhancedOpen ? 1 : 0;
-            numSecurityTypes += !TextUtils.isEmpty(mWpa2PskPassphrase) ? 1 : 0;
-            numSecurityTypes += !TextUtils.isEmpty(mWpa3SaePassphrase) ? 1 : 0;
-            numSecurityTypes += !TextUtils.isEmpty(mWapiPskPassphrase) ? 1 : 0;
-            numSecurityTypes += mWpa2EnterpriseConfig != null ? 1 : 0;
-            numSecurityTypes += mWpa3EnterpriseConfig != null ? 1 : 0;
-            numSecurityTypes += mWapiEnterpriseConfig != null ? 1 : 0;
-            numSecurityTypes += mPasspointConfiguration != null ? 1 : 0;
-            if (numSecurityTypes > 1) {
-                throw new IllegalStateException("only one of setIsEnhancedOpen, setWpa2Passphrase,"
-                        + " setWpa3Passphrase, setWpa2EnterpriseConfig, setWpa3EnterpriseConfig"
-                        + " setWapiPassphrase, setWapiCertSuite, setIsWapiCertSuiteAuto"
-                        + " or setPasspointConfig can be invoked for network suggestion");
-            }
-        }
-
-        private WifiConfiguration buildWifiConfigurationForPasspoint() {
-            WifiConfiguration wifiConfiguration = new WifiConfiguration();
-            wifiConfiguration.FQDN = mPasspointConfiguration.getHomeSp().getFqdn();
-            wifiConfiguration.setPasspointUniqueId(mPasspointConfiguration.getUniqueId());
-            wifiConfiguration.priority = mPriority;
-            wifiConfiguration.meteredOverride = mMeteredOverride;
-            wifiConfiguration.trusted = !mIsNetworkUntrusted;
-            mPasspointConfiguration.setCarrierId(mCarrierId);
-            mPasspointConfiguration.setMeteredOverride(wifiConfiguration.meteredOverride);
-            return wifiConfiguration;
-        }
-
-        /**
-         * Create a network suggestion object for use in
-         * {@link WifiManager#addNetworkSuggestions(List)}.
-         *
-         *<p class="note">
-         * <b>Note:</b> Apps can set a combination of SSID using {@link #setSsid(String)} and BSSID
-         * using {@link #setBssid(MacAddress)} to provide more fine grained network suggestions to
-         * the platform.
-         * </p>
-         *
-         * For example:
-         * To provide credentials for one open, one WPA2, one WPA3 network with their
-         * corresponding SSID's and one with Passpoint config:
-         *
-         * <pre>{@code
-         * final WifiNetworkSuggestion suggestion1 =
-         *      new Builder()
-         *      .setSsid("test111111")
-         *      .build();
-         * final WifiNetworkSuggestion suggestion2 =
-         *      new Builder()
-         *      .setSsid("test222222")
-         *      .setWpa2Passphrase("test123456")
-         *      .build();
-         * final WifiNetworkSuggestion suggestion3 =
-         *      new Builder()
-         *      .setSsid("test333333")
-         *      .setWpa3Passphrase("test6789")
-         *      .build();
-         * final PasspointConfiguration passpointConfig= new PasspointConfiguration();
-         * // configure passpointConfig to include a valid Passpoint configuration
-         * final WifiNetworkSuggestion suggestion4 =
-         *      new Builder()
-         *      .setPasspointConfig(passpointConfig)
-         *      .build();
-         * final List<WifiNetworkSuggestion> suggestionsList =
-         *      new ArrayList<WifiNetworkSuggestion> { {
-         *          add(suggestion1);
-         *          add(suggestion2);
-         *          add(suggestion3);
-         *          add(suggestion4);
-         *      } };
-         * final WifiManager wifiManager =
-         *      context.getSystemService(Context.WIFI_SERVICE);
-         * wifiManager.addNetworkSuggestions(suggestionsList);
-         * // ...
-         * }</pre>
-         *
-         * @return Instance of {@link WifiNetworkSuggestion}
-         * @throws IllegalStateException on invalid params set
-         * @see WifiNetworkSuggestion
-         */
-        public @NonNull WifiNetworkSuggestion build() {
-            validateSecurityParams();
-            WifiConfiguration wifiConfiguration;
-            if (mPasspointConfiguration != null) {
-                if (mSsid != null) {
-                    throw new IllegalStateException("setSsid should not be invoked for suggestion "
-                            + "with Passpoint configuration");
-                }
-                if (mIsHiddenSSID) {
-                    throw new IllegalStateException("setIsHiddenSsid should not be invoked for "
-                            + "suggestion with Passpoint configuration");
-                }
-                wifiConfiguration = buildWifiConfigurationForPasspoint();
-            } else {
-                if (mSsid == null) {
-                    throw new IllegalStateException("setSsid should be invoked for suggestion");
-                }
-                if (TextUtils.isEmpty(mSsid)) {
-                    throw new IllegalStateException("invalid ssid for suggestion");
-                }
-                if (mBssid != null
-                        && (mBssid.equals(MacAddress.BROADCAST_ADDRESS)
-                        || mBssid.equals(WifiManager.ALL_ZEROS_MAC_ADDRESS))) {
-                    throw new IllegalStateException("invalid bssid for suggestion");
-                }
-                wifiConfiguration = buildWifiConfiguration();
-                if (wifiConfiguration.isOpenNetwork()) {
-                    if (mIsSharedWithUserSet && mIsSharedWithUser) {
-                        throw new IllegalStateException("Open network should not be "
-                                + "setCredentialSharedWithUser to true");
-                    }
-                    mIsSharedWithUser = false;
-                }
-            }
-            if (!mIsSharedWithUser && !mIsInitialAutojoinEnabled) {
-                throw new IllegalStateException("Should have not a network with both "
-                        + "setCredentialSharedWithUser and "
-                        + "setIsAutojoinEnabled set to false");
-            }
-            if (mIsNetworkUntrusted) {
-                if (mIsSharedWithUserSet && mIsSharedWithUser) {
-                    throw new IllegalStateException("Should not be both"
-                            + "setCredentialSharedWithUser and +"
-                            + "setIsNetworkAsUntrusted to true");
-                }
-                mIsSharedWithUser = false;
-            }
-            return new WifiNetworkSuggestion(
-                    wifiConfiguration,
-                    mPasspointConfiguration,
-                    mIsAppInteractionRequired,
-                    mIsUserInteractionRequired,
-                    mIsSharedWithUser,
-                    mIsInitialAutojoinEnabled);
-        }
-    }
-
-    /**
-     * Network configuration for the provided network.
-     * @hide
-     */
-    @NonNull
-    public final WifiConfiguration wifiConfiguration;
-
-    /**
-     * Passpoint configuration for the provided network.
-     * @hide
-     */
-    @Nullable
-    public final PasspointConfiguration passpointConfiguration;
-
-    /**
-     * Whether app needs to log in to captive portal to obtain Internet access.
-     * @hide
-     */
-    public final boolean isAppInteractionRequired;
-
-    /**
-     * Whether user needs to log in to captive portal to obtain Internet access.
-     * @hide
-     */
-    public final boolean isUserInteractionRequired;
-
-    /**
-     * Whether app share credential with the user, allow user use provided credential to
-     * connect network manually.
-     * @hide
-     */
-    public final boolean isUserAllowedToManuallyConnect;
-
-    /**
-     * Whether the suggestion will be initialized as auto-joined or not.
-     * @hide
-     */
-    public final boolean isInitialAutoJoinEnabled;
-
-    /** @hide */
-    public WifiNetworkSuggestion() {
-        this.wifiConfiguration = new WifiConfiguration();
-        this.passpointConfiguration = null;
-        this.isAppInteractionRequired = false;
-        this.isUserInteractionRequired = false;
-        this.isUserAllowedToManuallyConnect = true;
-        this.isInitialAutoJoinEnabled = true;
-    }
-
-    /** @hide */
-    public WifiNetworkSuggestion(@NonNull WifiConfiguration networkConfiguration,
-                                 @Nullable PasspointConfiguration passpointConfiguration,
-                                 boolean isAppInteractionRequired,
-                                 boolean isUserInteractionRequired,
-                                 boolean isUserAllowedToManuallyConnect,
-                                 boolean isInitialAutoJoinEnabled) {
-        checkNotNull(networkConfiguration);
-        this.wifiConfiguration = networkConfiguration;
-        this.passpointConfiguration = passpointConfiguration;
-
-        this.isAppInteractionRequired = isAppInteractionRequired;
-        this.isUserInteractionRequired = isUserInteractionRequired;
-        this.isUserAllowedToManuallyConnect = isUserAllowedToManuallyConnect;
-        this.isInitialAutoJoinEnabled = isInitialAutoJoinEnabled;
-    }
-
-    public static final @NonNull Creator<WifiNetworkSuggestion> CREATOR =
-            new Creator<WifiNetworkSuggestion>() {
-                @Override
-                public WifiNetworkSuggestion createFromParcel(Parcel in) {
-                    return new WifiNetworkSuggestion(
-                            in.readParcelable(null), // wifiConfiguration
-                            in.readParcelable(null), // PasspointConfiguration
-                            in.readBoolean(), // isAppInteractionRequired
-                            in.readBoolean(), // isUserInteractionRequired
-                            in.readBoolean(), // isSharedCredentialWithUser
-                            in.readBoolean()  // isAutojoinEnabled
-                    );
-                }
-
-                @Override
-                public WifiNetworkSuggestion[] newArray(int size) {
-                    return new WifiNetworkSuggestion[size];
-                }
-            };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeParcelable(wifiConfiguration, flags);
-        dest.writeParcelable(passpointConfiguration, flags);
-        dest.writeBoolean(isAppInteractionRequired);
-        dest.writeBoolean(isUserInteractionRequired);
-        dest.writeBoolean(isUserAllowedToManuallyConnect);
-        dest.writeBoolean(isInitialAutoJoinEnabled);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(wifiConfiguration.SSID, wifiConfiguration.BSSID,
-                wifiConfiguration.allowedKeyManagement, wifiConfiguration.getKey());
-    }
-
-    /**
-     * Equals for network suggestions.
-     */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof WifiNetworkSuggestion)) {
-            return false;
-        }
-        WifiNetworkSuggestion lhs = (WifiNetworkSuggestion) obj;
-        if (this.passpointConfiguration == null ^ lhs.passpointConfiguration == null) {
-            return false;
-        }
-
-        return TextUtils.equals(this.wifiConfiguration.SSID, lhs.wifiConfiguration.SSID)
-                && TextUtils.equals(this.wifiConfiguration.BSSID, lhs.wifiConfiguration.BSSID)
-                && Objects.equals(this.wifiConfiguration.allowedKeyManagement,
-                lhs.wifiConfiguration.allowedKeyManagement)
-                && TextUtils.equals(this.wifiConfiguration.getKey(),
-                lhs.wifiConfiguration.getKey());
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder("WifiNetworkSuggestion[ ")
-                .append("SSID=").append(wifiConfiguration.SSID)
-                .append(", BSSID=").append(wifiConfiguration.BSSID)
-                .append(", FQDN=").append(wifiConfiguration.FQDN)
-                .append(", isAppInteractionRequired=").append(isAppInteractionRequired)
-                .append(", isUserInteractionRequired=").append(isUserInteractionRequired)
-                .append(", isCredentialSharedWithUser=").append(isUserAllowedToManuallyConnect)
-                .append(", isInitialAutoJoinEnabled=").append(isInitialAutoJoinEnabled)
-                .append(", isUnTrusted=").append(!wifiConfiguration.trusted)
-                .append(" ]");
-        return sb.toString();
-    }
-
-    /**
-     * Get the {@link WifiConfiguration} associated with this Suggestion.
-     * @hide
-     */
-    @SystemApi
-    @NonNull
-    public WifiConfiguration getWifiConfiguration() {
-        return wifiConfiguration;
-    }
-
-    /**
-     * Get the BSSID, or null if unset.
-     * @see Builder#setBssid(MacAddress)
-     */
-    @Nullable
-    public MacAddress getBssid() {
-        if (wifiConfiguration.BSSID == null) {
-            return null;
-        }
-        return MacAddress.fromString(wifiConfiguration.BSSID);
-    }
-
-    /** @see Builder#setCredentialSharedWithUser(boolean) */
-    public boolean isCredentialSharedWithUser() {
-        return isUserAllowedToManuallyConnect;
-    }
-
-    /** @see Builder#setIsAppInteractionRequired(boolean) */
-    public boolean isAppInteractionRequired() {
-        return isAppInteractionRequired;
-    }
-
-    /** @see Builder#setIsEnhancedOpen(boolean)  */
-    public boolean isEnhancedOpen() {
-        return wifiConfiguration.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OWE);
-    }
-
-    /** @see Builder#setIsHiddenSsid(boolean)  */
-    public boolean isHiddenSsid() {
-        return wifiConfiguration.hiddenSSID;
-    }
-
-    /** @see Builder#setIsInitialAutojoinEnabled(boolean)  */
-    public boolean isInitialAutojoinEnabled() {
-        return isInitialAutoJoinEnabled;
-    }
-
-    /** @see Builder#setIsMetered(boolean)  */
-    public boolean isMetered() {
-        return wifiConfiguration.meteredOverride == WifiConfiguration.METERED_OVERRIDE_METERED;
-    }
-
-    /** @see Builder#setIsUserInteractionRequired(boolean)  */
-    public boolean isUserInteractionRequired() {
-        return isUserInteractionRequired;
-    }
-
-    /**
-     * Get the {@link PasspointConfiguration} associated with this Suggestion, or null if this
-     * Suggestion is not for a Passpoint network.
-     */
-    @Nullable
-    public PasspointConfiguration getPasspointConfig() {
-        return passpointConfiguration;
-    }
-
-    /** @see Builder#setPriority(int)  */
-    @IntRange(from = 0)
-    public int getPriority() {
-        return wifiConfiguration.priority;
-    }
-
-    /**
-     * Return the SSID of the network, or null if this is a Passpoint network.
-     * @see Builder#setSsid(String)
-     */
-    @Nullable
-    public String getSsid() {
-        if (wifiConfiguration.SSID == null) {
-            return null;
-        }
-        return WifiInfo.sanitizeSsid(wifiConfiguration.SSID);
-    }
-
-    /** @see Builder#setUntrusted(boolean)  */
-    public boolean isUntrusted() {
-        return !wifiConfiguration.trusted;
-    }
-
-    /**
-     * Get the WifiEnterpriseConfig, or null if unset.
-     * @see Builder#setWapiEnterpriseConfig(WifiEnterpriseConfig)
-     * @see Builder#setWpa2EnterpriseConfig(WifiEnterpriseConfig)
-     * @see Builder#setWpa3EnterpriseConfig(WifiEnterpriseConfig)
-     */
-    @Nullable
-    public WifiEnterpriseConfig getEnterpriseConfig() {
-        return wifiConfiguration.enterpriseConfig;
-    }
-
-    /**
-     * Get the passphrase, or null if unset.
-     * @see Builder#setWapiPassphrase(String)
-     * @see Builder#setWpa2Passphrase(String)
-     * @see Builder#setWpa3Passphrase(String)
-     */
-    @Nullable
-    public String getPassphrase() {
-        if (wifiConfiguration.preSharedKey == null) {
-            return null;
-        }
-        return WifiInfo.removeDoubleQuotes(wifiConfiguration.preSharedKey);
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiScanner.java b/wifi/java/android/net/wifi/WifiScanner.java
deleted file mode 100644
index 4163c88..0000000
--- a/wifi/java/android/net/wifi/WifiScanner.java
+++ /dev/null
@@ -1,1676 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.Manifest;
-import android.annotation.CallbackExecutor;
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SuppressLint;
-import android.annotation.SystemApi;
-import android.annotation.SystemService;
-import android.content.Context;
-import android.os.Binder;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.RemoteException;
-import android.os.WorkSource;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.SparseArray;
-
-import com.android.internal.util.AsyncChannel;
-import com.android.internal.util.Protocol;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-import java.util.concurrent.Executor;
-
-/**
- * This class provides a way to scan the Wifi universe around the device
- * @hide
- */
-@SystemApi
-@SystemService(Context.WIFI_SCANNING_SERVICE)
-public class WifiScanner {
-
-    /** @hide */
-    public static final int WIFI_BAND_INDEX_24_GHZ = 0;
-    /** @hide */
-    public static final int WIFI_BAND_INDEX_5_GHZ = 1;
-    /** @hide */
-    public static final int WIFI_BAND_INDEX_5_GHZ_DFS_ONLY = 2;
-    /** @hide */
-    public static final int WIFI_BAND_INDEX_6_GHZ = 3;
-    /** @hide */
-    public static final int WIFI_BAND_COUNT = 4;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"WIFI_BAND_INDEX_"}, value = {
-            WIFI_BAND_INDEX_24_GHZ,
-            WIFI_BAND_INDEX_5_GHZ,
-            WIFI_BAND_INDEX_5_GHZ_DFS_ONLY,
-            WIFI_BAND_INDEX_6_GHZ})
-    public @interface WifiBandIndex {}
-
-    /** no band specified; use channel list instead */
-    public static final int WIFI_BAND_UNSPECIFIED = 0;
-    /** 2.4 GHz band */
-    public static final int WIFI_BAND_24_GHZ = 1 << WIFI_BAND_INDEX_24_GHZ;
-    /** 5 GHz band excluding DFS channels */
-    public static final int WIFI_BAND_5_GHZ = 1 << WIFI_BAND_INDEX_5_GHZ;
-    /** DFS channels from 5 GHz band only */
-    public static final int WIFI_BAND_5_GHZ_DFS_ONLY  = 1 << WIFI_BAND_INDEX_5_GHZ_DFS_ONLY;
-    /** 6 GHz band */
-    public static final int WIFI_BAND_6_GHZ = 1 << WIFI_BAND_INDEX_6_GHZ;
-
-    /**
-     * Combination of bands
-     * Note that those are only the common band combinations,
-     * other combinations can be created by combining any of the basic bands above
-     */
-    /** Both 2.4 GHz band and 5 GHz band; no DFS channels */
-    public static final int WIFI_BAND_BOTH = WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ;
-    /**
-     * 2.4Ghz band + DFS channels from 5 GHz band only
-     * @hide
-     */
-    public static final int WIFI_BAND_24_GHZ_WITH_5GHZ_DFS  =
-            WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY;
-    /** 5 GHz band including DFS channels */
-    public static final int WIFI_BAND_5_GHZ_WITH_DFS  = WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY;
-    /** Both 2.4 GHz band and 5 GHz band; with DFS channels */
-    public static final int WIFI_BAND_BOTH_WITH_DFS =
-            WIFI_BAND_24_GHZ | WIFI_BAND_5_GHZ | WIFI_BAND_5_GHZ_DFS_ONLY;
-    /** 2.4 GHz band and 5 GHz band (no DFS channels) and 6 GHz */
-    public static final int WIFI_BAND_24_5_6_GHZ = WIFI_BAND_BOTH | WIFI_BAND_6_GHZ;
-    /** 2.4 GHz band and 5 GHz band; with DFS channels and 6 GHz */
-    public static final int WIFI_BAND_24_5_WITH_DFS_6_GHZ =
-            WIFI_BAND_BOTH_WITH_DFS | WIFI_BAND_6_GHZ;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"WIFI_BAND_"}, value = {
-            WIFI_BAND_UNSPECIFIED,
-            WIFI_BAND_24_GHZ,
-            WIFI_BAND_5_GHZ,
-            WIFI_BAND_BOTH,
-            WIFI_BAND_5_GHZ_DFS_ONLY,
-            WIFI_BAND_24_GHZ_WITH_5GHZ_DFS,
-            WIFI_BAND_5_GHZ_WITH_DFS,
-            WIFI_BAND_BOTH_WITH_DFS,
-            WIFI_BAND_6_GHZ,
-            WIFI_BAND_24_5_6_GHZ,
-            WIFI_BAND_24_5_WITH_DFS_6_GHZ})
-    public @interface WifiBand {}
-
-    /**
-     * All bands
-     * @hide
-     */
-    public static final int WIFI_BAND_ALL = (1 << WIFI_BAND_COUNT) - 1;
-
-    /** Minimum supported scanning period */
-    public static final int MIN_SCAN_PERIOD_MS = 1000;
-    /** Maximum supported scanning period */
-    public static final int MAX_SCAN_PERIOD_MS = 1024000;
-
-    /** No Error */
-    public static final int REASON_SUCCEEDED = 0;
-    /** Unknown error */
-    public static final int REASON_UNSPECIFIED = -1;
-    /** Invalid listener */
-    public static final int REASON_INVALID_LISTENER = -2;
-    /** Invalid request */
-    public static final int REASON_INVALID_REQUEST = -3;
-    /** Invalid request */
-    public static final int REASON_NOT_AUTHORIZED = -4;
-    /** An outstanding request with the same listener hasn't finished yet. */
-    public static final int REASON_DUPLICATE_REQEUST = -5;
-
-    /** @hide */
-    public static final String GET_AVAILABLE_CHANNELS_EXTRA = "Channels";
-
-    /**
-     * Generic action callback invocation interface
-     *  @hide
-     */
-    @SystemApi
-    public static interface ActionListener {
-        public void onSuccess();
-        public void onFailure(int reason, String description);
-    }
-
-    /**
-     * Test if scan is a full scan. i.e. scanning all available bands.
-     * For backward compatibility, since some apps don't include 6GHz in their requests yet,
-     * lacking 6GHz band does not cause the result to be false.
-     *
-     * @param bandScanned bands that are fully scanned
-     * @param excludeDfs when true, DFS band is excluded from the check
-     * @return true if all bands are scanned, false otherwise
-     *
-     * @hide
-     */
-    public static boolean isFullBandScan(@WifiBand int bandScanned, boolean excludeDfs) {
-        return (bandScanned | WIFI_BAND_6_GHZ | (excludeDfs ? WIFI_BAND_5_GHZ_DFS_ONLY : 0))
-                == WIFI_BAND_ALL;
-    }
-
-    /**
-     * Returns a list of all the possible channels for the given band(s).
-     *
-     * @param band one of the WifiScanner#WIFI_BAND_* constants, e.g. {@link #WIFI_BAND_24_GHZ}
-     * @return a list of all the frequencies, in MHz, for the given band(s) e.g. channel 1 is
-     * 2412, or null if an error occurred.
-     *
-     * @hide
-     */
-    @SystemApi
-    @NonNull
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public List<Integer> getAvailableChannels(int band) {
-        try {
-            Bundle bundle = mService.getAvailableChannels(band, mContext.getOpPackageName(),
-                    mContext.getAttributionTag());
-            List<Integer> channels = bundle.getIntegerArrayList(GET_AVAILABLE_CHANNELS_EXTRA);
-            return channels == null ? new ArrayList<>() : channels;
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * provides channel specification for scanning
-     */
-    public static class ChannelSpec {
-        /**
-         * channel frequency in MHz; for example channel 1 is specified as 2412
-         */
-        public int frequency;
-        /**
-         * if true, scan this channel in passive fashion.
-         * This flag is ignored on DFS channel specification.
-         * @hide
-         */
-        public boolean passive;                                    /* ignored on DFS channels */
-        /**
-         * how long to dwell on this channel
-         * @hide
-         */
-        public int dwellTimeMS;                                    /* not supported for now */
-
-        /**
-         * default constructor for channel spec
-         */
-        public ChannelSpec(int frequency) {
-            this.frequency = frequency;
-            passive = false;
-            dwellTimeMS = 0;
-        }
-    }
-
-    /**
-     * reports {@link ScanListener#onResults} when underlying buffers are full
-     * this is simply the lack of the {@link #REPORT_EVENT_AFTER_EACH_SCAN} flag
-     * @deprecated It is not supported anymore.
-     */
-    @Deprecated
-    public static final int REPORT_EVENT_AFTER_BUFFER_FULL = 0;
-    /**
-     * reports {@link ScanListener#onResults} after each scan
-     */
-    public static final int REPORT_EVENT_AFTER_EACH_SCAN = (1 << 0);
-    /**
-     * reports {@link ScanListener#onFullResult} whenever each beacon is discovered
-     */
-    public static final int REPORT_EVENT_FULL_SCAN_RESULT = (1 << 1);
-    /**
-     * Do not place scans in the chip's scan history buffer
-     */
-    public static final int REPORT_EVENT_NO_BATCH = (1 << 2);
-
-    /**
-     * Optimize the scan for lower latency.
-     * @see ScanSettings#type
-     */
-    public static final int SCAN_TYPE_LOW_LATENCY = 0;
-    /**
-     * Optimize the scan for lower power usage.
-     * @see ScanSettings#type
-     */
-    public static final int SCAN_TYPE_LOW_POWER = 1;
-    /**
-     * Optimize the scan for higher accuracy.
-     * @see ScanSettings#type
-     */
-    public static final int SCAN_TYPE_HIGH_ACCURACY = 2;
-
-    /** {@hide} */
-    public static final String SCAN_PARAMS_SCAN_SETTINGS_KEY = "ScanSettings";
-    /** {@hide} */
-    public static final String SCAN_PARAMS_WORK_SOURCE_KEY = "WorkSource";
-    /** {@hide} */
-    public static final String REQUEST_PACKAGE_NAME_KEY = "PackageName";
-    /** {@hide} */
-    public static final String REQUEST_FEATURE_ID_KEY = "FeatureId";
-
-    /**
-     * scan configuration parameters to be sent to {@link #startBackgroundScan}
-     */
-    public static class ScanSettings implements Parcelable {
-        /** Hidden network to be scanned for. */
-        public static class HiddenNetwork {
-            /** SSID of the network */
-            @NonNull
-            public final String ssid;
-
-            /** Default constructor for HiddenNetwork. */
-            public HiddenNetwork(@NonNull String ssid) {
-                this.ssid = ssid;
-            }
-        }
-
-        /** one of the WIFI_BAND values */
-        public int band;
-        /** list of channels; used when band is set to WIFI_BAND_UNSPECIFIED */
-        public ChannelSpec[] channels;
-        /**
-         * List of hidden networks to scan for. Explicit probe requests are sent out for such
-         * networks during scan. Only valid for single scan requests.
-         */
-        @NonNull
-        @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-        public final List<HiddenNetwork> hiddenNetworks = new ArrayList<>();
-        /**
-         * period of background scan; in millisecond, 0 => single shot scan
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int periodInMs;
-        /**
-         * must have a valid REPORT_EVENT value
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int reportEvents;
-        /**
-         * defines number of bssids to cache from each scan
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int numBssidsPerScan;
-        /**
-         * defines number of scans to cache; use it with REPORT_EVENT_AFTER_BUFFER_FULL
-         * to wake up at fixed interval
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int maxScansToCache;
-        /**
-         * if maxPeriodInMs is non zero or different than period, then this bucket is
-         * a truncated binary exponential backoff bucket and the scan period will grow
-         * exponentially as per formula: actual_period(N) = period * (2 ^ (N/stepCount))
-         * to maxPeriodInMs
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int maxPeriodInMs;
-        /**
-         * for truncated binary exponential back off bucket, number of scans to perform
-         * for a given period
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public int stepCount;
-        /**
-         * Flag to indicate if the scan settings are targeted for PNO scan.
-         * {@hide}
-         */
-        public boolean isPnoScan;
-        /**
-         * Indicate the type of scan to be performed by the wifi chip.
-         *
-         * On devices with multiple hardware radio chains (and hence different modes of scan),
-         * this type serves as an indication to the hardware on what mode of scan to perform.
-         * Only apps holding {@link android.Manifest.permission.NETWORK_STACK} permission can set
-         * this value.
-         *
-         * Note: This serves as an intent and not as a stipulation, the wifi chip
-         * might honor or ignore the indication based on the current radio conditions. Always
-         * use the {@link ScanResult#radioChainInfos} to figure out the radio chain configuration
-         * used to receive the corresponding scan result.
-         *
-         * One of {@link #SCAN_TYPE_LOW_LATENCY}, {@link #SCAN_TYPE_LOW_POWER},
-         * {@link #SCAN_TYPE_HIGH_ACCURACY}.
-         * Default value: {@link #SCAN_TYPE_LOW_LATENCY}.
-         */
-        @WifiAnnotations.ScanType
-        @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-        public int type = SCAN_TYPE_LOW_LATENCY;
-        /**
-         * This scan request may ignore location settings while receiving scans. This should only
-         * be used in emergency situations.
-         * {@hide}
-         */
-        @SystemApi
-        public boolean ignoreLocationSettings;
-        /**
-         * This scan request will be hidden from app-ops noting for location information. This
-         * should only be used by FLP/NLP module on the device which is using the scan results to
-         * compute results for behalf on their clients. FLP/NLP module using this flag should ensure
-         * that they note in app-ops the eventual delivery of location information computed using
-         * these results to their client .
-         * {@hide}
-         */
-        @SystemApi
-        public boolean hideFromAppOps;
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(band);
-            dest.writeInt(periodInMs);
-            dest.writeInt(reportEvents);
-            dest.writeInt(numBssidsPerScan);
-            dest.writeInt(maxScansToCache);
-            dest.writeInt(maxPeriodInMs);
-            dest.writeInt(stepCount);
-            dest.writeInt(isPnoScan ? 1 : 0);
-            dest.writeInt(type);
-            dest.writeInt(ignoreLocationSettings ? 1 : 0);
-            dest.writeInt(hideFromAppOps ? 1 : 0);
-            if (channels != null) {
-                dest.writeInt(channels.length);
-                for (int i = 0; i < channels.length; i++) {
-                    dest.writeInt(channels[i].frequency);
-                    dest.writeInt(channels[i].dwellTimeMS);
-                    dest.writeInt(channels[i].passive ? 1 : 0);
-                }
-            } else {
-                dest.writeInt(0);
-            }
-            dest.writeInt(hiddenNetworks.size());
-            for (HiddenNetwork hiddenNetwork : hiddenNetworks) {
-                dest.writeString(hiddenNetwork.ssid);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<ScanSettings> CREATOR =
-                new Creator<ScanSettings>() {
-                    public ScanSettings createFromParcel(Parcel in) {
-                        ScanSettings settings = new ScanSettings();
-                        settings.band = in.readInt();
-                        settings.periodInMs = in.readInt();
-                        settings.reportEvents = in.readInt();
-                        settings.numBssidsPerScan = in.readInt();
-                        settings.maxScansToCache = in.readInt();
-                        settings.maxPeriodInMs = in.readInt();
-                        settings.stepCount = in.readInt();
-                        settings.isPnoScan = in.readInt() == 1;
-                        settings.type = in.readInt();
-                        settings.ignoreLocationSettings = in.readInt() == 1;
-                        settings.hideFromAppOps = in.readInt() == 1;
-                        int num_channels = in.readInt();
-                        settings.channels = new ChannelSpec[num_channels];
-                        for (int i = 0; i < num_channels; i++) {
-                            int frequency = in.readInt();
-                            ChannelSpec spec = new ChannelSpec(frequency);
-                            spec.dwellTimeMS = in.readInt();
-                            spec.passive = in.readInt() == 1;
-                            settings.channels[i] = spec;
-                        }
-                        int numNetworks = in.readInt();
-                        settings.hiddenNetworks.clear();
-                        for (int i = 0; i < numNetworks; i++) {
-                            String ssid = in.readString();
-                            settings.hiddenNetworks.add(new HiddenNetwork(ssid));
-                        }
-                        return settings;
-                    }
-
-                    public ScanSettings[] newArray(int size) {
-                        return new ScanSettings[size];
-                    }
-                };
-    }
-
-    /**
-     * all the information garnered from a single scan
-     */
-    public static class ScanData implements Parcelable {
-        /** scan identifier */
-        private int mId;
-        /** additional information about scan
-         * 0 => no special issues encountered in the scan
-         * non-zero => scan was truncated, so results may not be complete
-         */
-        private int mFlags;
-        /**
-         * Indicates the buckets that were scanned to generate these results.
-         * This is not relevant to WifiScanner API users and is used internally.
-         * {@hide}
-         */
-        private int mBucketsScanned;
-        /**
-         * Bands scanned. One of the WIFI_BAND values.
-         * Will be {@link #WIFI_BAND_UNSPECIFIED} if the list of channels do not fully cover
-         * any of the bands.
-         * {@hide}
-         */
-        private int mBandScanned;
-        /** all scan results discovered in this scan, sorted by timestamp in ascending order */
-        private final List<ScanResult> mResults;
-
-        ScanData() {
-            mResults = new ArrayList<>();
-        }
-
-        public ScanData(int id, int flags, ScanResult[] results) {
-            mId = id;
-            mFlags = flags;
-            mResults = new ArrayList<>(Arrays.asList(results));
-        }
-
-        /** {@hide} */
-        public ScanData(int id, int flags, int bucketsScanned, int bandScanned,
-                        ScanResult[] results) {
-            this(id, flags, bucketsScanned, bandScanned, new ArrayList<>(Arrays.asList(results)));
-        }
-
-        /** {@hide} */
-        public ScanData(int id, int flags, int bucketsScanned, int bandScanned,
-                        List<ScanResult> results) {
-            mId = id;
-            mFlags = flags;
-            mBucketsScanned = bucketsScanned;
-            mBandScanned = bandScanned;
-            mResults = results;
-        }
-
-        public ScanData(ScanData s) {
-            mId = s.mId;
-            mFlags = s.mFlags;
-            mBucketsScanned = s.mBucketsScanned;
-            mBandScanned = s.mBandScanned;
-            mResults = new ArrayList<>();
-            for (ScanResult scanResult : s.mResults) {
-                mResults.add(new ScanResult(scanResult));
-            }
-        }
-
-        public int getId() {
-            return mId;
-        }
-
-        public int getFlags() {
-            return mFlags;
-        }
-
-        /** {@hide} */
-        public int getBucketsScanned() {
-            return mBucketsScanned;
-        }
-
-        /** {@hide} */
-        public int getBandScanned() {
-            return mBandScanned;
-        }
-
-        public ScanResult[] getResults() {
-            return mResults.toArray(new ScanResult[0]);
-        }
-
-        /** {@hide} */
-        public void addResults(@NonNull ScanResult[] newResults) {
-            for (ScanResult result : newResults) {
-                mResults.add(new ScanResult(result));
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(mId);
-            dest.writeInt(mFlags);
-            dest.writeInt(mBucketsScanned);
-            dest.writeInt(mBandScanned);
-            dest.writeParcelableList(mResults, 0);
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<ScanData> CREATOR =
-                new Creator<ScanData>() {
-                    public ScanData createFromParcel(Parcel in) {
-                        int id = in.readInt();
-                        int flags = in.readInt();
-                        int bucketsScanned = in.readInt();
-                        int bandScanned = in.readInt();
-                        List<ScanResult> results = new ArrayList<>();
-                        in.readParcelableList(results, ScanResult.class.getClassLoader());
-                        return new ScanData(id, flags, bucketsScanned, bandScanned, results);
-                    }
-
-                    public ScanData[] newArray(int size) {
-                        return new ScanData[size];
-                    }
-                };
-    }
-
-    public static class ParcelableScanData implements Parcelable {
-
-        public ScanData mResults[];
-
-        public ParcelableScanData(ScanData[] results) {
-            mResults = results;
-        }
-
-        public ScanData[] getResults() {
-            return mResults;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            if (mResults != null) {
-                dest.writeInt(mResults.length);
-                for (int i = 0; i < mResults.length; i++) {
-                    ScanData result = mResults[i];
-                    result.writeToParcel(dest, flags);
-                }
-            } else {
-                dest.writeInt(0);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<ParcelableScanData> CREATOR =
-                new Creator<ParcelableScanData>() {
-                    public ParcelableScanData createFromParcel(Parcel in) {
-                        int n = in.readInt();
-                        ScanData results[] = new ScanData[n];
-                        for (int i = 0; i < n; i++) {
-                            results[i] = ScanData.CREATOR.createFromParcel(in);
-                        }
-                        return new ParcelableScanData(results);
-                    }
-
-                    public ParcelableScanData[] newArray(int size) {
-                        return new ParcelableScanData[size];
-                    }
-                };
-    }
-
-    public static class ParcelableScanResults implements Parcelable {
-
-        public ScanResult mResults[];
-
-        public ParcelableScanResults(ScanResult[] results) {
-            mResults = results;
-        }
-
-        public ScanResult[] getResults() {
-            return mResults;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            if (mResults != null) {
-                dest.writeInt(mResults.length);
-                for (int i = 0; i < mResults.length; i++) {
-                    ScanResult result = mResults[i];
-                    result.writeToParcel(dest, flags);
-                }
-            } else {
-                dest.writeInt(0);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<ParcelableScanResults> CREATOR =
-                new Creator<ParcelableScanResults>() {
-                    public ParcelableScanResults createFromParcel(Parcel in) {
-                        int n = in.readInt();
-                        ScanResult results[] = new ScanResult[n];
-                        for (int i = 0; i < n; i++) {
-                            results[i] = ScanResult.CREATOR.createFromParcel(in);
-                        }
-                        return new ParcelableScanResults(results);
-                    }
-
-                    public ParcelableScanResults[] newArray(int size) {
-                        return new ParcelableScanResults[size];
-                    }
-                };
-    }
-
-    /** {@hide} */
-    public static final String PNO_PARAMS_PNO_SETTINGS_KEY = "PnoSettings";
-    /** {@hide} */
-    public static final String PNO_PARAMS_SCAN_SETTINGS_KEY = "ScanSettings";
-    /**
-     * PNO scan configuration parameters to be sent to {@link #startPnoScan}.
-     * Note: This structure needs to be in sync with |wifi_epno_params| struct in gscan HAL API.
-     * {@hide}
-     */
-    public static class PnoSettings implements Parcelable {
-        /**
-         * Pno network to be added to the PNO scan filtering.
-         * {@hide}
-         */
-        public static class PnoNetwork {
-            /*
-             * Pno flags bitmask to be set in {@link #PnoNetwork.flags}
-             */
-            /** Whether directed scan needs to be performed (for hidden SSIDs) */
-            public static final byte FLAG_DIRECTED_SCAN = (1 << 0);
-            /** Whether PNO event shall be triggered if the network is found on A band */
-            public static final byte FLAG_A_BAND = (1 << 1);
-            /** Whether PNO event shall be triggered if the network is found on G band */
-            public static final byte FLAG_G_BAND = (1 << 2);
-            /**
-             * Whether strict matching is required
-             * If required then the firmware must store the network's SSID and not just a hash
-             */
-            public static final byte FLAG_STRICT_MATCH = (1 << 3);
-            /**
-             * If this SSID should be considered the same network as the currently connected
-             * one for scoring.
-             */
-            public static final byte FLAG_SAME_NETWORK = (1 << 4);
-
-            /*
-             * Code for matching the beacon AUTH IE - additional codes. Bitmask to be set in
-             * {@link #PnoNetwork.authBitField}
-             */
-            /** Open Network */
-            public static final byte AUTH_CODE_OPEN = (1 << 0);
-            /** WPA_PSK or WPA2PSK */
-            public static final byte AUTH_CODE_PSK = (1 << 1);
-            /** any EAPOL */
-            public static final byte AUTH_CODE_EAPOL = (1 << 2);
-
-            /** SSID of the network */
-            public String ssid;
-            /** Bitmask of the FLAG_XXX */
-            public byte flags = 0;
-            /** Bitmask of the ATUH_XXX */
-            public byte authBitField = 0;
-            /** frequencies on which the particular network needs to be scanned for */
-            public int[] frequencies = {};
-
-            /**
-             * default constructor for PnoNetwork
-             */
-            public PnoNetwork(String ssid) {
-                this.ssid = ssid;
-            }
-
-            @Override
-            public int hashCode() {
-                return Objects.hash(ssid, flags, authBitField);
-            }
-
-            @Override
-            public boolean equals(Object obj) {
-                if (this == obj) {
-                    return true;
-                }
-                if (!(obj instanceof PnoNetwork)) {
-                    return false;
-                }
-                PnoNetwork lhs = (PnoNetwork) obj;
-                return TextUtils.equals(this.ssid, lhs.ssid)
-                        && this.flags == lhs.flags
-                        && this.authBitField == lhs.authBitField;
-            }
-        }
-
-        /** Connected vs Disconnected PNO flag {@hide} */
-        public boolean isConnected;
-        /** Minimum 5GHz RSSI for a BSSID to be considered */
-        public int min5GHzRssi;
-        /** Minimum 2.4GHz RSSI for a BSSID to be considered */
-        public int min24GHzRssi;
-        /** Minimum 6GHz RSSI for a BSSID to be considered */
-        public int min6GHzRssi;
-        /** Pno Network filter list */
-        public PnoNetwork[] networkList;
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(isConnected ? 1 : 0);
-            dest.writeInt(min5GHzRssi);
-            dest.writeInt(min24GHzRssi);
-            dest.writeInt(min6GHzRssi);
-            if (networkList != null) {
-                dest.writeInt(networkList.length);
-                for (int i = 0; i < networkList.length; i++) {
-                    dest.writeString(networkList[i].ssid);
-                    dest.writeByte(networkList[i].flags);
-                    dest.writeByte(networkList[i].authBitField);
-                    dest.writeIntArray(networkList[i].frequencies);
-                }
-            } else {
-                dest.writeInt(0);
-            }
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<PnoSettings> CREATOR =
-                new Creator<PnoSettings>() {
-                    public PnoSettings createFromParcel(Parcel in) {
-                        PnoSettings settings = new PnoSettings();
-                        settings.isConnected = in.readInt() == 1;
-                        settings.min5GHzRssi = in.readInt();
-                        settings.min24GHzRssi = in.readInt();
-                        settings.min6GHzRssi = in.readInt();
-                        int numNetworks = in.readInt();
-                        settings.networkList = new PnoNetwork[numNetworks];
-                        for (int i = 0; i < numNetworks; i++) {
-                            String ssid = in.readString();
-                            PnoNetwork network = new PnoNetwork(ssid);
-                            network.flags = in.readByte();
-                            network.authBitField = in.readByte();
-                            network.frequencies = in.createIntArray();
-                            settings.networkList[i] = network;
-                        }
-                        return settings;
-                    }
-
-                    public PnoSettings[] newArray(int size) {
-                        return new PnoSettings[size];
-                    }
-                };
-
-    }
-
-    /**
-     * interface to get scan events on; specify this on {@link #startBackgroundScan} or
-     * {@link #startScan}
-     */
-    public interface ScanListener extends ActionListener {
-        /**
-         * Framework co-ordinates scans across multiple apps; so it may not give exactly the
-         * same period requested. If period of a scan is changed; it is reported by this event.
-         * @deprecated Background scan support has always been hardware vendor dependent. This
-         * support may not be present on newer devices. Use {@link #startScan(ScanSettings,
-         * ScanListener)} instead for single scans.
-         */
-        @Deprecated
-        public void onPeriodChanged(int periodInMs);
-        /**
-         * reports results retrieved from background scan and single shot scans
-         */
-        public void onResults(ScanData[] results);
-        /**
-         * reports full scan result for each access point found in scan
-         */
-        public void onFullResult(ScanResult fullScanResult);
-    }
-
-    /**
-     * interface to get PNO scan events on; specify this on {@link #startDisconnectedPnoScan} and
-     * {@link #startConnectedPnoScan}.
-     * {@hide}
-     */
-    public interface PnoScanListener extends ScanListener {
-        /**
-         * Invoked when one of the PNO networks are found in scan results.
-         */
-        void onPnoNetworkFound(ScanResult[] results);
-    }
-
-    /**
-     * Enable/Disable wifi scanning.
-     *
-     * @param enable set to true to enable scanning, set to false to disable all types of scanning.
-     *
-     * @see WifiManager#ACTION_WIFI_SCAN_AVAILABILITY_CHANGED
-     * {@hide}
-     */
-    @SystemApi
-    @RequiresPermission(Manifest.permission.NETWORK_STACK)
-    public void setScanningEnabled(boolean enable) {
-        validateChannel();
-        mAsyncChannel.sendMessage(enable ? CMD_ENABLE : CMD_DISABLE);
-    }
-
-    /**
-     * Register a listener that will receive results from all single scans.
-     * Either the {@link ScanListener#onSuccess()} or  {@link ScanListener#onFailure(int, String)}
-     * method will be called once when the listener is registered.
-     * Afterwards (assuming onSuccess was called), all subsequent single scan results will be
-     * delivered to the listener. It is possible that onFullResult will not be called for all
-     * results of the first scan if the listener was registered during the scan.
-     *
-     * @param executor the Executor on which to run the callback.
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this request, and must also be specified to cancel the request.
-     *                 Multiple requests should also not share this object.
-     */
-    @RequiresPermission(Manifest.permission.NETWORK_STACK)
-    public void registerScanListener(@NonNull @CallbackExecutor Executor executor,
-            @NonNull ScanListener listener) {
-        Objects.requireNonNull(executor, "executor cannot be null");
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = addListener(listener, executor);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        mAsyncChannel.sendMessage(CMD_REGISTER_SCAN_LISTENER, 0, key);
-    }
-
-    /**
-     * Overload of {@link #registerScanListener(Executor, ScanListener)} that executes the callback
-     * synchronously.
-     * @hide
-     */
-    @RequiresPermission(Manifest.permission.NETWORK_STACK)
-    public void registerScanListener(@NonNull ScanListener listener) {
-        registerScanListener(new SynchronousExecutor(), listener);
-    }
-
-    /**
-     * Deregister a listener for ongoing single scans
-     * @param listener specifies which scan to cancel; must be same object as passed in {@link
-     *  #registerScanListener}
-     */
-    public void unregisterScanListener(@NonNull ScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = removeListener(listener);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        mAsyncChannel.sendMessage(CMD_DEREGISTER_SCAN_LISTENER, 0, key);
-    }
-
-    /** start wifi scan in background
-     * @param settings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startBackgroundScan(ScanSettings settings, ScanListener listener) {
-        startBackgroundScan(settings, listener, null);
-    }
-
-    /** start wifi scan in background
-     * @param settings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param workSource WorkSource to blame for power usage
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     * @deprecated Background scan support has always been hardware vendor dependent. This support
-     * may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
-     * instead for single scans.
-     */
-    @Deprecated
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startBackgroundScan(ScanSettings settings, ScanListener listener,
-            WorkSource workSource) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = addListener(listener);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putParcelable(SCAN_PARAMS_SCAN_SETTINGS_KEY, settings);
-        scanParams.putParcelable(SCAN_PARAMS_WORK_SOURCE_KEY, workSource);
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        mAsyncChannel.sendMessage(CMD_START_BACKGROUND_SCAN, 0, key, scanParams);
-    }
-
-    /**
-     * stop an ongoing wifi scan
-     * @param listener specifies which scan to cancel; must be same object as passed in {@link
-     *  #startBackgroundScan}
-     * @deprecated Background scan support has always been hardware vendor dependent. This support
-     * may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
-     * instead for single scans.
-     */
-    @Deprecated
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void stopBackgroundScan(ScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = removeListener(listener);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        mAsyncChannel.sendMessage(CMD_STOP_BACKGROUND_SCAN, 0, key, scanParams);
-    }
-
-    /**
-     * reports currently available scan results on appropriate listeners
-     * @return true if all scan results were reported correctly
-     * @deprecated Background scan support has always been hardware vendor dependent. This support
-     * may not be present on newer devices. Use {@link #startScan(ScanSettings, ScanListener)}
-     * instead for single scans.
-     */
-    @Deprecated
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public boolean getScanResults() {
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        Message reply =
-                mAsyncChannel.sendMessageSynchronously(CMD_GET_SCAN_RESULTS, 0, 0, scanParams);
-        return reply.what == CMD_OP_SUCCEEDED;
-    }
-
-    /**
-     * starts a single scan and reports results asynchronously
-     * @param settings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startScan(ScanSettings settings, ScanListener listener) {
-        startScan(settings, listener, null);
-    }
-
-    /**
-     * starts a single scan and reports results asynchronously
-     * @param settings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     * @param workSource WorkSource to blame for power usage
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startScan(ScanSettings settings, ScanListener listener, WorkSource workSource) {
-        startScan(settings, null, listener, workSource);
-    }
-
-    /**
-     * starts a single scan and reports results asynchronously
-     * @param settings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param executor the Executor on which to run the callback.
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     * @param workSource WorkSource to blame for power usage
-     * @hide
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void startScan(ScanSettings settings, @Nullable @CallbackExecutor Executor executor,
-            ScanListener listener, WorkSource workSource) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = addListener(listener, executor);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putParcelable(SCAN_PARAMS_SCAN_SETTINGS_KEY, settings);
-        scanParams.putParcelable(SCAN_PARAMS_WORK_SOURCE_KEY, workSource);
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        mAsyncChannel.sendMessage(CMD_START_SINGLE_SCAN, 0, key, scanParams);
-    }
-
-    /**
-     * stops an ongoing single shot scan; only useful after {@link #startScan} if onResults()
-     * hasn't been called on the listener, ignored otherwise
-     * @param listener
-     */
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public void stopScan(ScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = removeListener(listener);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        mAsyncChannel.sendMessage(CMD_STOP_SINGLE_SCAN, 0, key, scanParams);
-    }
-
-    /**
-     * Retrieve the most recent scan results from a single scan request.
-     */
-    @NonNull
-    @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE)
-    public List<ScanResult> getSingleScanResults() {
-        validateChannel();
-        Bundle scanParams = new Bundle();
-        scanParams.putString(REQUEST_PACKAGE_NAME_KEY, mContext.getOpPackageName());
-        scanParams.putString(REQUEST_FEATURE_ID_KEY, mContext.getAttributionTag());
-        Message reply = mAsyncChannel.sendMessageSynchronously(CMD_GET_SINGLE_SCAN_RESULTS, 0, 0,
-                scanParams);
-        if (reply.what == WifiScanner.CMD_OP_SUCCEEDED) {
-            return Arrays.asList(((ParcelableScanResults) reply.obj).getResults());
-        }
-        OperationResult result = (OperationResult) reply.obj;
-        Log.e(TAG, "Error retrieving SingleScan results reason: " + result.reason
-                + " description: " + result.description);
-        return new ArrayList<>();
-    }
-
-    private void startPnoScan(ScanSettings scanSettings, PnoSettings pnoSettings, int key) {
-        // Bundle up both the settings and send it across.
-        Bundle pnoParams = new Bundle();
-        // Set the PNO scan flag.
-        scanSettings.isPnoScan = true;
-        pnoParams.putParcelable(PNO_PARAMS_SCAN_SETTINGS_KEY, scanSettings);
-        pnoParams.putParcelable(PNO_PARAMS_PNO_SETTINGS_KEY, pnoSettings);
-        mAsyncChannel.sendMessage(CMD_START_PNO_SCAN, 0, key, pnoParams);
-    }
-    /**
-     * Start wifi connected PNO scan
-     * @param scanSettings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param pnoSettings specifies various parameters for PNO; for more information look at
-     * {@link PnoSettings}
-     * @param executor the Executor on which to run the callback.
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     * {@hide}
-     */
-    public void startConnectedPnoScan(ScanSettings scanSettings, PnoSettings pnoSettings,
-            @NonNull @CallbackExecutor Executor executor, PnoScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        Objects.requireNonNull(pnoSettings, "pnoSettings cannot be null");
-        int key = addListener(listener, executor);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        pnoSettings.isConnected = true;
-        startPnoScan(scanSettings, pnoSettings, key);
-    }
-    /**
-     * Start wifi disconnected PNO scan
-     * @param scanSettings specifies various parameters for the scan; for more information look at
-     * {@link ScanSettings}
-     * @param pnoSettings specifies various parameters for PNO; for more information look at
-     * {@link PnoSettings}
-     * @param listener specifies the object to report events to. This object is also treated as a
-     *                 key for this scan, and must also be specified to cancel the scan. Multiple
-     *                 scans should also not share this object.
-     * {@hide}
-     */
-    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void startDisconnectedPnoScan(ScanSettings scanSettings, PnoSettings pnoSettings,
-            @NonNull @CallbackExecutor Executor executor, PnoScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        Objects.requireNonNull(pnoSettings, "pnoSettings cannot be null");
-        int key = addListener(listener, executor);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        pnoSettings.isConnected = false;
-        startPnoScan(scanSettings, pnoSettings, key);
-    }
-    /**
-     * Stop an ongoing wifi PNO scan
-     * @param listener specifies which scan to cancel; must be same object as passed in {@link
-     *  #startPnoScan}
-     * {@hide}
-     */
-    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void stopPnoScan(ScanListener listener) {
-        Objects.requireNonNull(listener, "listener cannot be null");
-        int key = removeListener(listener);
-        if (key == INVALID_KEY) return;
-        validateChannel();
-        mAsyncChannel.sendMessage(CMD_STOP_PNO_SCAN, 0, key);
-    }
-
-    /** specifies information about an access point of interest */
-    @Deprecated
-    public static class BssidInfo {
-        /** bssid of the access point; in XX:XX:XX:XX:XX:XX format */
-        public String bssid;
-        /** low signal strength threshold; more information at {@link ScanResult#level} */
-        public int low;                                            /* minimum RSSI */
-        /** high signal threshold; more information at {@link ScanResult#level} */
-        public int high;                                           /* maximum RSSI */
-        /** channel frequency (in KHz) where you may find this BSSID */
-        public int frequencyHint;
-    }
-
-    /** @hide */
-    @SystemApi
-    @Deprecated
-    public static class WifiChangeSettings implements Parcelable {
-        public int rssiSampleSize;                          /* sample size for RSSI averaging */
-        public int lostApSampleSize;                        /* samples to confirm AP's loss */
-        public int unchangedSampleSize;                     /* samples to confirm no change */
-        public int minApsBreachingThreshold;                /* change threshold to trigger event */
-        public int periodInMs;                              /* scan period in millisecond */
-        public BssidInfo[] bssidInfos;
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<WifiChangeSettings> CREATOR =
-                new Creator<WifiChangeSettings>() {
-                    public WifiChangeSettings createFromParcel(Parcel in) {
-                        return new WifiChangeSettings();
-                    }
-
-                    public WifiChangeSettings[] newArray(int size) {
-                        return new WifiChangeSettings[size];
-                    }
-                };
-
-    }
-
-    /** configure WifiChange detection
-     * @param rssiSampleSize number of samples used for RSSI averaging
-     * @param lostApSampleSize number of samples to confirm an access point's loss
-     * @param unchangedSampleSize number of samples to confirm there are no changes
-     * @param minApsBreachingThreshold minimum number of access points that need to be
-     *                                 out of range to detect WifiChange
-     * @param periodInMs indicates period of scan to find changes
-     * @param bssidInfos access points to watch
-     */
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void configureWifiChange(
-            int rssiSampleSize,                             /* sample size for RSSI averaging */
-            int lostApSampleSize,                           /* samples to confirm AP's loss */
-            int unchangedSampleSize,                        /* samples to confirm no change */
-            int minApsBreachingThreshold,                   /* change threshold to trigger event */
-            int periodInMs,                                 /* period of scan */
-            BssidInfo[] bssidInfos                          /* signal thresholds to cross */
-            )
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * interface to get wifi change events on; use this on {@link #startTrackingWifiChange}
-     */
-    @Deprecated
-    public interface WifiChangeListener extends ActionListener {
-        /** indicates that changes were detected in wifi environment
-         * @param results indicate the access points that exhibited change
-         */
-        public void onChanging(ScanResult[] results);           /* changes are found */
-        /** indicates that no wifi changes are being detected for a while
-         * @param results indicate the access points that are bing monitored for change
-         */
-        public void onQuiescence(ScanResult[] results);         /* changes settled down */
-    }
-
-    /**
-     * track changes in wifi environment
-     * @param listener object to report events on; this object must be unique and must also be
-     *                 provided on {@link #stopTrackingWifiChange}
-     */
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void startTrackingWifiChange(WifiChangeListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * stop tracking changes in wifi environment
-     * @param listener object that was provided to report events on {@link
-     * #stopTrackingWifiChange}
-     */
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void stopTrackingWifiChange(WifiChangeListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** @hide */
-    @SystemApi
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void configureWifiChange(WifiChangeSettings settings) {
-        throw new UnsupportedOperationException();
-    }
-
-    /** interface to receive hotlist events on; use this on {@link #setHotlist} */
-    @Deprecated
-    public static interface BssidListener extends ActionListener {
-        /** indicates that access points were found by on going scans
-         * @param results list of scan results, one for each access point visible currently
-         */
-        public void onFound(ScanResult[] results);
-        /** indicates that access points were missed by on going scans
-         * @param results list of scan results, for each access point that is not visible anymore
-         */
-        public void onLost(ScanResult[] results);
-    }
-
-    /** @hide */
-    @SystemApi
-    @Deprecated
-    public static class HotlistSettings implements Parcelable {
-        public BssidInfo[] bssidInfos;
-        public int apLostThreshold;
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<HotlistSettings> CREATOR =
-                new Creator<HotlistSettings>() {
-                    public HotlistSettings createFromParcel(Parcel in) {
-                        HotlistSettings settings = new HotlistSettings();
-                        return settings;
-                    }
-
-                    public HotlistSettings[] newArray(int size) {
-                        return new HotlistSettings[size];
-                    }
-                };
-    }
-
-    /**
-     * set interesting access points to find
-     * @param bssidInfos access points of interest
-     * @param apLostThreshold number of scans needed to indicate that AP is lost
-     * @param listener object provided to report events on; this object must be unique and must
-     *                 also be provided on {@link #stopTrackingBssids}
-     */
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void startTrackingBssids(BssidInfo[] bssidInfos,
-                                    int apLostThreshold, BssidListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-    /**
-     * remove tracking of interesting access points
-     * @param listener same object provided in {@link #startTrackingBssids}
-     */
-    @Deprecated
-    @SuppressLint("RequiresPermission")
-    public void stopTrackingBssids(BssidListener listener) {
-        throw new UnsupportedOperationException();
-    }
-
-
-    /* private members and methods */
-
-    private static final String TAG = "WifiScanner";
-    private static final boolean DBG = false;
-
-    /* commands for Wifi Service */
-    private static final int BASE = Protocol.BASE_WIFI_SCANNER;
-
-    /** @hide */
-    public static final int CMD_START_BACKGROUND_SCAN       = BASE + 2;
-    /** @hide */
-    public static final int CMD_STOP_BACKGROUND_SCAN        = BASE + 3;
-    /** @hide */
-    public static final int CMD_GET_SCAN_RESULTS            = BASE + 4;
-    /** @hide */
-    public static final int CMD_SCAN_RESULT                 = BASE + 5;
-    /** @hide */
-    public static final int CMD_OP_SUCCEEDED                = BASE + 17;
-    /** @hide */
-    public static final int CMD_OP_FAILED                   = BASE + 18;
-    /** @hide */
-    public static final int CMD_FULL_SCAN_RESULT            = BASE + 20;
-    /** @hide */
-    public static final int CMD_START_SINGLE_SCAN           = BASE + 21;
-    /** @hide */
-    public static final int CMD_STOP_SINGLE_SCAN            = BASE + 22;
-    /** @hide */
-    public static final int CMD_SINGLE_SCAN_COMPLETED       = BASE + 23;
-    /** @hide */
-    public static final int CMD_START_PNO_SCAN              = BASE + 24;
-    /** @hide */
-    public static final int CMD_STOP_PNO_SCAN               = BASE + 25;
-    /** @hide */
-    public static final int CMD_PNO_NETWORK_FOUND           = BASE + 26;
-    /** @hide */
-    public static final int CMD_REGISTER_SCAN_LISTENER      = BASE + 27;
-    /** @hide */
-    public static final int CMD_DEREGISTER_SCAN_LISTENER    = BASE + 28;
-    /** @hide */
-    public static final int CMD_GET_SINGLE_SCAN_RESULTS     = BASE + 29;
-    /** @hide */
-    public static final int CMD_ENABLE                      = BASE + 30;
-    /** @hide */
-    public static final int CMD_DISABLE                     = BASE + 31;
-
-    private Context mContext;
-    private IWifiScanner mService;
-
-    private static final int INVALID_KEY = 0;
-    private int mListenerKey = 1;
-
-    private final SparseArray mListenerMap = new SparseArray();
-    private final SparseArray<Executor> mExecutorMap = new SparseArray<>();
-    private final Object mListenerMapLock = new Object();
-
-    private AsyncChannel mAsyncChannel;
-    private final Handler mInternalHandler;
-
-    /**
-     * Create a new WifiScanner instance.
-     * Applications will almost always want to use
-     * {@link android.content.Context#getSystemService Context.getSystemService()} to retrieve
-     * the standard {@link android.content.Context#WIFI_SERVICE Context.WIFI_SERVICE}.
-     *
-     * @param context the application context
-     * @param service the Binder interface for {@link Context#WIFI_SCANNING_SERVICE}
-     * @param looper the Looper used to deliver callbacks
-     *
-     * @hide
-     */
-    public WifiScanner(@NonNull Context context, @NonNull IWifiScanner service,
-            @NonNull Looper looper) {
-        mContext = context;
-        mService = service;
-
-        Messenger messenger = null;
-        try {
-            messenger = mService.getMessenger();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-
-        if (messenger == null) {
-            throw new IllegalStateException("getMessenger() returned null!  This is invalid.");
-        }
-
-        mAsyncChannel = new AsyncChannel();
-
-        mInternalHandler = new ServiceHandler(looper);
-        mAsyncChannel.connectSync(mContext, mInternalHandler, messenger);
-        // We cannot use fullyConnectSync because it sends the FULL_CONNECTION message
-        // synchronously, which causes WifiScanningService to receive the wrong replyTo value.
-        mAsyncChannel.sendMessage(AsyncChannel.CMD_CHANNEL_FULL_CONNECTION);
-    }
-
-    private void validateChannel() {
-        if (mAsyncChannel == null) throw new IllegalStateException(
-                "No permission to access and change wifi or a bad initialization");
-    }
-
-    private int addListener(ActionListener listener) {
-        return addListener(listener, null);
-    }
-
-    // Add a listener into listener map. If the listener already exists, return INVALID_KEY and
-    // send an error message to internal handler; Otherwise add the listener to the listener map and
-    // return the key of the listener.
-    private int addListener(ActionListener listener, Executor executor) {
-        synchronized (mListenerMapLock) {
-            boolean keyExists = (getListenerKey(listener) != INVALID_KEY);
-            // Note we need to put the listener into listener map even if it's a duplicate as the
-            // internal handler will need the key to find the listener. In case of duplicates,
-            // removing duplicate key logic will be handled in internal handler.
-            int key = putListener(listener);
-            if (keyExists) {
-                if (DBG) Log.d(TAG, "listener key already exists");
-                OperationResult operationResult = new OperationResult(REASON_DUPLICATE_REQEUST,
-                        "Outstanding request with same key not stopped yet");
-                Message message = Message.obtain(mInternalHandler, CMD_OP_FAILED, 0, key,
-                        operationResult);
-                message.sendToTarget();
-                return INVALID_KEY;
-            } else {
-                mExecutorMap.put(key, executor);
-                return key;
-            }
-        }
-    }
-
-    private int putListener(Object listener) {
-        if (listener == null) return INVALID_KEY;
-        int key;
-        synchronized (mListenerMapLock) {
-            do {
-                key = mListenerKey++;
-            } while (key == INVALID_KEY);
-            mListenerMap.put(key, listener);
-        }
-        return key;
-    }
-
-    private static class ListenerWithExecutor {
-        @Nullable final Object mListener;
-        @Nullable final Executor mExecutor;
-
-        ListenerWithExecutor(@Nullable Object listener, @Nullable Executor executor) {
-            mListener = listener;
-            mExecutor = executor;
-        }
-    }
-
-    private ListenerWithExecutor getListenerWithExecutor(int key) {
-        if (key == INVALID_KEY) return new ListenerWithExecutor(null, null);
-        synchronized (mListenerMapLock) {
-            Object listener = mListenerMap.get(key);
-            Executor executor = mExecutorMap.get(key);
-            return new ListenerWithExecutor(listener, executor);
-        }
-    }
-
-    private int getListenerKey(Object listener) {
-        if (listener == null) return INVALID_KEY;
-        synchronized (mListenerMapLock) {
-            int index = mListenerMap.indexOfValue(listener);
-            if (index == -1) {
-                return INVALID_KEY;
-            } else {
-                return mListenerMap.keyAt(index);
-            }
-        }
-    }
-
-    private Object removeListener(int key) {
-        if (key == INVALID_KEY) return null;
-        synchronized (mListenerMapLock) {
-            Object listener = mListenerMap.get(key);
-            mListenerMap.remove(key);
-            mExecutorMap.remove(key);
-            return listener;
-        }
-    }
-
-    private int removeListener(Object listener) {
-        int key = getListenerKey(listener);
-        if (key == INVALID_KEY) {
-            Log.e(TAG, "listener cannot be found");
-            return key;
-        }
-        synchronized (mListenerMapLock) {
-            mListenerMap.remove(key);
-            mExecutorMap.remove(key);
-            return key;
-        }
-    }
-
-    /** @hide */
-    public static class OperationResult implements Parcelable {
-        public int reason;
-        public String description;
-
-        public OperationResult(int reason, String description) {
-            this.reason = reason;
-            this.description = description;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public int describeContents() {
-            return 0;
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeInt(reason);
-            dest.writeString(description);
-        }
-
-        /** Implement the Parcelable interface {@hide} */
-        public static final @NonNull Creator<OperationResult> CREATOR =
-                new Creator<OperationResult>() {
-                    public OperationResult createFromParcel(Parcel in) {
-                        int reason = in.readInt();
-                        String description = in.readString();
-                        return new OperationResult(reason, description);
-                    }
-
-                    public OperationResult[] newArray(int size) {
-                        return new OperationResult[size];
-                    }
-                };
-    }
-
-    private class ServiceHandler extends Handler {
-        ServiceHandler(Looper looper) {
-            super(looper);
-        }
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case AsyncChannel.CMD_CHANNEL_FULLY_CONNECTED:
-                    return;
-                case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
-                    Log.e(TAG, "Channel connection lost");
-                    // This will cause all further async API calls on the WifiManager
-                    // to fail and throw an exception
-                    mAsyncChannel = null;
-                    getLooper().quit();
-                    return;
-            }
-
-            ListenerWithExecutor listenerWithExecutor = getListenerWithExecutor(msg.arg2);
-            Object listener = listenerWithExecutor.mListener;
-
-            if (listener == null) {
-                if (DBG) Log.d(TAG, "invalid listener key = " + msg.arg2);
-                return;
-            } else {
-                if (DBG) Log.d(TAG, "listener key = " + msg.arg2);
-            }
-
-            Executor executor = listenerWithExecutor.mExecutor;
-            if (executor == null) {
-                executor = new SynchronousExecutor();
-            }
-
-            switch (msg.what) {
-                /* ActionListeners grouped together */
-                case CMD_OP_SUCCEEDED: {
-                    ActionListener actionListener = (ActionListener) listener;
-                    Binder.clearCallingIdentity();
-                    executor.execute(actionListener::onSuccess);
-                } break;
-                case CMD_OP_FAILED: {
-                    OperationResult result = (OperationResult) msg.obj;
-                    ActionListener actionListener = (ActionListener) listener;
-                    removeListener(msg.arg2);
-                    Binder.clearCallingIdentity();
-                    executor.execute(() ->
-                            actionListener.onFailure(result.reason, result.description));
-                } break;
-                case CMD_SCAN_RESULT: {
-                    ScanListener scanListener = (ScanListener) listener;
-                    ParcelableScanData parcelableScanData = (ParcelableScanData) msg.obj;
-                    Binder.clearCallingIdentity();
-                    executor.execute(() -> scanListener.onResults(parcelableScanData.getResults()));
-                } break;
-                case CMD_FULL_SCAN_RESULT: {
-                    ScanResult result = (ScanResult) msg.obj;
-                    ScanListener scanListener = ((ScanListener) listener);
-                    Binder.clearCallingIdentity();
-                    executor.execute(() -> scanListener.onFullResult(result));
-                } break;
-                case CMD_SINGLE_SCAN_COMPLETED: {
-                    if (DBG) Log.d(TAG, "removing listener for single scan");
-                    removeListener(msg.arg2);
-                } break;
-                case CMD_PNO_NETWORK_FOUND: {
-                    PnoScanListener pnoScanListener = (PnoScanListener) listener;
-                    ParcelableScanResults parcelableScanResults = (ParcelableScanResults) msg.obj;
-                    Binder.clearCallingIdentity();
-                    executor.execute(() ->
-                            pnoScanListener.onPnoNetworkFound(parcelableScanResults.getResults()));
-                } break;
-                default: {
-                    if (DBG) Log.d(TAG, "Ignoring message " + msg.what);
-                } break;
-            }
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/WifiSsid.java b/wifi/java/android/net/wifi/WifiSsid.java
deleted file mode 100644
index 704ae81..0000000
--- a/wifi/java/android/net/wifi/WifiSsid.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.io.ByteArrayOutputStream;
-import java.nio.ByteBuffer;
-import java.nio.CharBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.CoderResult;
-import java.nio.charset.CodingErrorAction;
-import java.util.Arrays;
-import java.util.Locale;
-
-/**
- * Stores SSID octets and handles conversion.
- *
- * For Ascii encoded string, any octet < 32 or > 127 is encoded as
- * a "\x" followed by the hex representation of the octet.
- * Exception chars are ", \, \e, \n, \r, \t which are escaped by a \
- * See src/utils/common.c for the implementation in the supplicant.
- *
- * @hide
- */
-public final class WifiSsid implements Parcelable {
-    private static final String TAG = "WifiSsid";
-
-    @UnsupportedAppUsage
-    public final ByteArrayOutputStream octets = new ByteArrayOutputStream(32);
-
-    private static final int HEX_RADIX = 16;
-
-    @UnsupportedAppUsage
-    public static final String NONE = WifiManager.UNKNOWN_SSID;
-
-    private WifiSsid() {
-    }
-
-    /**
-     * Create a WifiSsid from a raw byte array. If the byte array is null, return an empty WifiSsid
-     * object.
-     */
-    @NonNull
-    public static WifiSsid createFromByteArray(@Nullable byte[] ssid) {
-        WifiSsid wifiSsid = new WifiSsid();
-        if (ssid != null) {
-            wifiSsid.octets.write(ssid, 0 /* the start offset */, ssid.length);
-        }
-        return wifiSsid;
-    }
-
-    @UnsupportedAppUsage
-    public static WifiSsid createFromAsciiEncoded(String asciiEncoded) {
-        WifiSsid a = new WifiSsid();
-        a.convertToBytes(asciiEncoded);
-        return a;
-    }
-
-    public static WifiSsid createFromHex(String hexStr) {
-        WifiSsid a = new WifiSsid();
-        if (hexStr == null) return a;
-
-        if (hexStr.startsWith("0x") || hexStr.startsWith("0X")) {
-            hexStr = hexStr.substring(2);
-        }
-
-        for (int i = 0; i < hexStr.length()-1; i += 2) {
-            int val;
-            try {
-                val = Integer.parseInt(hexStr.substring(i, i + 2), HEX_RADIX);
-            } catch(NumberFormatException e) {
-                val = 0;
-            }
-            a.octets.write(val);
-        }
-        return a;
-    }
-
-    /* This function is equivalent to printf_decode() at src/utils/common.c in
-     * the supplicant */
-    private void convertToBytes(String asciiEncoded) {
-        int i = 0;
-        int val = 0;
-        while (i< asciiEncoded.length()) {
-            char c = asciiEncoded.charAt(i);
-            switch (c) {
-                case '\\':
-                    i++;
-                    switch(asciiEncoded.charAt(i)) {
-                        case '\\':
-                            octets.write('\\');
-                            i++;
-                            break;
-                        case '"':
-                            octets.write('"');
-                            i++;
-                            break;
-                        case 'n':
-                            octets.write('\n');
-                            i++;
-                            break;
-                        case 'r':
-                            octets.write('\r');
-                            i++;
-                            break;
-                        case 't':
-                            octets.write('\t');
-                            i++;
-                            break;
-                        case 'e':
-                            octets.write(27); //escape char
-                            i++;
-                            break;
-                        case 'x':
-                            i++;
-                            try {
-                                val = Integer.parseInt(asciiEncoded.substring(i, i + 2), HEX_RADIX);
-                            } catch (NumberFormatException e) {
-                                val = -1;
-                            } catch (StringIndexOutOfBoundsException e) {
-                                val = -1;
-                            }
-                            if (val < 0) {
-                                val = Character.digit(asciiEncoded.charAt(i), HEX_RADIX);
-                                if (val < 0) break;
-                                octets.write(val);
-                                i++;
-                            } else {
-                                octets.write(val);
-                                i += 2;
-                            }
-                            break;
-                        case '0':
-                        case '1':
-                        case '2':
-                        case '3':
-                        case '4':
-                        case '5':
-                        case '6':
-                        case '7':
-                            val = asciiEncoded.charAt(i) - '0';
-                            i++;
-                            if (asciiEncoded.charAt(i) >= '0' && asciiEncoded.charAt(i) <= '7') {
-                                val = val * 8 + asciiEncoded.charAt(i) - '0';
-                                i++;
-                            }
-                            if (asciiEncoded.charAt(i) >= '0' && asciiEncoded.charAt(i) <= '7') {
-                                val = val * 8 + asciiEncoded.charAt(i) - '0';
-                                i++;
-                            }
-                            octets.write(val);
-                            break;
-                        default:
-                            break;
-                    }
-                    break;
-                default:
-                    octets.write(c);
-                    i++;
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Converts this SSID to an unquoted UTF-8 String representation.
-     * @return the SSID string, or {@link WifiManager#UNKNOWN_SSID} if there was an error.
-     */
-    @Override
-    public String toString() {
-        byte[] ssidBytes = octets.toByteArray();
-        // Supplicant returns \x00\x00\x00\x00\x00\x00\x00\x00 hex string
-        // for a hidden access point. Make sure we maintain the previous
-        // behavior of returning empty string for this case.
-        if (octets.size() <= 0 || isArrayAllZeroes(ssidBytes)) return "";
-        // TODO: Handle conversion to other charsets upon failure
-        Charset charset = Charset.forName("UTF-8");
-        CharsetDecoder decoder = charset.newDecoder()
-                .onMalformedInput(CodingErrorAction.REPLACE)
-                .onUnmappableCharacter(CodingErrorAction.REPLACE);
-        CharBuffer out = CharBuffer.allocate(32);
-
-        CoderResult result = decoder.decode(ByteBuffer.wrap(ssidBytes), out, true);
-        out.flip();
-        if (result.isError()) {
-            return WifiManager.UNKNOWN_SSID;
-        }
-        return out.toString();
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof WifiSsid)) {
-            return false;
-        }
-        WifiSsid that = (WifiSsid) thatObject;
-        return Arrays.equals(octets.toByteArray(), that.octets.toByteArray());
-    }
-
-    @Override
-    public int hashCode() {
-        return Arrays.hashCode(octets.toByteArray());
-    }
-
-    private boolean isArrayAllZeroes(byte[] ssidBytes) {
-        for (int i = 0; i< ssidBytes.length; i++) {
-            if (ssidBytes[i] != 0) return false;
-        }
-        return true;
-    }
-
-    /** @hide */
-    public boolean isHidden() {
-        return isArrayAllZeroes(octets.toByteArray());
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public byte[] getOctets() {
-        return octets.toByteArray();
-    }
-
-    /** @hide */
-    public String getHexString() {
-        String out = "0x";
-        byte[] ssidbytes = getOctets();
-        for (int i = 0; i < octets.size(); i++) {
-            out += String.format(Locale.US, "%02x", ssidbytes[i]);
-        }
-        return (octets.size() > 0) ? out : null;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(octets.size());
-        dest.writeByteArray(octets.toByteArray());
-    }
-
-    /** Implement the Parcelable interface */
-    @UnsupportedAppUsage
-    public static final @NonNull Creator<WifiSsid> CREATOR =
-            new Creator<WifiSsid>() {
-                @Override
-                public WifiSsid createFromParcel(Parcel in) {
-                    WifiSsid ssid = new WifiSsid();
-                    int length = in.readInt();
-                    byte[] b = new byte[length];
-                    in.readByteArray(b);
-                    ssid.octets.write(b, 0, length);
-                    return ssid;
-                }
-
-                @Override
-                public WifiSsid[] newArray(int size) {
-                    return new WifiSsid[size];
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/WifiUsabilityStatsEntry.java b/wifi/java/android/net/wifi/WifiUsabilityStatsEntry.java
deleted file mode 100644
index 8f3635f..0000000
--- a/wifi/java/android/net/wifi/WifiUsabilityStatsEntry.java
+++ /dev/null
@@ -1,351 +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;
-
-import android.annotation.IntDef;
-import android.annotation.SystemApi;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import android.telephony.Annotation.NetworkType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * This class makes a subset of
- * com.android.server.wifi.nano.WifiMetricsProto.WifiUsabilityStatsEntry parcelable.
- *
- * @hide
- */
-@SystemApi
-public final class WifiUsabilityStatsEntry implements Parcelable {
-    /** {@hide} */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"PROBE_STATUS_"}, value = {
-            PROBE_STATUS_UNKNOWN,
-            PROBE_STATUS_NO_PROBE,
-            PROBE_STATUS_SUCCESS,
-            PROBE_STATUS_FAILURE})
-    public @interface ProbeStatus {}
-
-    /** Link probe status is unknown */
-    public static final int PROBE_STATUS_UNKNOWN = 0;
-    /** Link probe is not triggered */
-    public static final int PROBE_STATUS_NO_PROBE = 1;
-    /** Link probe is triggered and the result is success */
-    public static final int PROBE_STATUS_SUCCESS = 2;
-    /** Link probe is triggered and the result is failure */
-    public static final int PROBE_STATUS_FAILURE = 3;
-
-    /** Absolute milliseconds from device boot when these stats were sampled */
-    private final long mTimeStampMillis;
-    /** The RSSI (in dBm) at the sample time */
-    private final int mRssi;
-    /** Link speed at the sample time in Mbps */
-    private final int mLinkSpeedMbps;
-    /** The total number of tx success counted from the last radio chip reset */
-    private final long mTotalTxSuccess;
-    /** The total number of MPDU data packet retries counted from the last radio chip reset */
-    private final long mTotalTxRetries;
-    /** The total number of tx bad counted from the last radio chip reset */
-    private final long mTotalTxBad;
-    /** The total number of rx success counted from the last radio chip reset */
-    private final long mTotalRxSuccess;
-    /** The total time the wifi radio is on in ms counted from the last radio chip reset */
-    private final long mTotalRadioOnTimeMillis;
-    /** The total time the wifi radio is doing tx in ms counted from the last radio chip reset */
-    private final long mTotalRadioTxTimeMillis;
-    /** The total time the wifi radio is doing rx in ms counted from the last radio chip reset */
-    private final long mTotalRadioRxTimeMillis;
-    /** The total time spent on all types of scans in ms counted from the last radio chip reset */
-    private final long mTotalScanTimeMillis;
-    /** The total time spent on nan scans in ms counted from the last radio chip reset */
-    private final long mTotalNanScanTimeMillis;
-    /** The total time spent on background scans in ms counted from the last radio chip reset */
-    private final long mTotalBackgroundScanTimeMillis;
-    /** The total time spent on roam scans in ms counted from the last radio chip reset */
-    private final long mTotalRoamScanTimeMillis;
-    /** The total time spent on pno scans in ms counted from the last radio chip reset */
-    private final long mTotalPnoScanTimeMillis;
-    /** The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio
-     * chip reset */
-    private final long mTotalHotspot2ScanTimeMillis;
-    /** The total time CCA is on busy status on the current frequency in ms counted from the last
-     * radio chip reset */
-    private final long mTotalCcaBusyFreqTimeMillis;
-    /** The total radio on time on the current frequency from the last radio chip reset */
-    private final long mTotalRadioOnFreqTimeMillis;
-    /** The total number of beacons received from the last radio chip reset */
-    private final long mTotalBeaconRx;
-    /** The status of link probe since last stats update */
-    @ProbeStatus private final int mProbeStatusSinceLastUpdate;
-    /** The elapsed time of the most recent link probe since last stats update */
-    private final int mProbeElapsedTimeSinceLastUpdateMillis;
-    /** The MCS rate of the most recent link probe since last stats update */
-    private final int mProbeMcsRateSinceLastUpdate;
-    /** Rx link speed at the sample time in Mbps */
-    private final int mRxLinkSpeedMbps;
-    private final @NetworkType int mCellularDataNetworkType;
-    private final int mCellularSignalStrengthDbm;
-    private final int mCellularSignalStrengthDb;
-    private final boolean mIsSameRegisteredCell;
-
-    /** Constructor function {@hide} */
-    public WifiUsabilityStatsEntry(long timeStampMillis, int rssi, int linkSpeedMbps,
-            long totalTxSuccess, long totalTxRetries, long totalTxBad, long totalRxSuccess,
-            long totalRadioOnTimeMillis, long totalRadioTxTimeMillis, long totalRadioRxTimeMillis,
-            long totalScanTimeMillis, long totalNanScanTimeMillis,
-            long totalBackgroundScanTimeMillis,
-            long totalRoamScanTimeMillis, long totalPnoScanTimeMillis,
-            long totalHotspot2ScanTimeMillis,
-            long totalCcaBusyFreqTimeMillis, long totalRadioOnFreqTimeMillis, long totalBeaconRx,
-            @ProbeStatus int probeStatusSinceLastUpdate, int probeElapsedTimeSinceLastUpdateMillis,
-            int probeMcsRateSinceLastUpdate, int rxLinkSpeedMbps,
-            @NetworkType int cellularDataNetworkType,
-            int cellularSignalStrengthDbm, int cellularSignalStrengthDb,
-            boolean isSameRegisteredCell) {
-        mTimeStampMillis = timeStampMillis;
-        mRssi = rssi;
-        mLinkSpeedMbps = linkSpeedMbps;
-        mTotalTxSuccess = totalTxSuccess;
-        mTotalTxRetries = totalTxRetries;
-        mTotalTxBad = totalTxBad;
-        mTotalRxSuccess = totalRxSuccess;
-        mTotalRadioOnTimeMillis = totalRadioOnTimeMillis;
-        mTotalRadioTxTimeMillis = totalRadioTxTimeMillis;
-        mTotalRadioRxTimeMillis = totalRadioRxTimeMillis;
-        mTotalScanTimeMillis = totalScanTimeMillis;
-        mTotalNanScanTimeMillis = totalNanScanTimeMillis;
-        mTotalBackgroundScanTimeMillis = totalBackgroundScanTimeMillis;
-        mTotalRoamScanTimeMillis = totalRoamScanTimeMillis;
-        mTotalPnoScanTimeMillis = totalPnoScanTimeMillis;
-        mTotalHotspot2ScanTimeMillis = totalHotspot2ScanTimeMillis;
-        mTotalCcaBusyFreqTimeMillis = totalCcaBusyFreqTimeMillis;
-        mTotalRadioOnFreqTimeMillis = totalRadioOnFreqTimeMillis;
-        mTotalBeaconRx = totalBeaconRx;
-        mProbeStatusSinceLastUpdate = probeStatusSinceLastUpdate;
-        mProbeElapsedTimeSinceLastUpdateMillis = probeElapsedTimeSinceLastUpdateMillis;
-        mProbeMcsRateSinceLastUpdate = probeMcsRateSinceLastUpdate;
-        mRxLinkSpeedMbps = rxLinkSpeedMbps;
-        mCellularDataNetworkType = cellularDataNetworkType;
-        mCellularSignalStrengthDbm = cellularSignalStrengthDbm;
-        mCellularSignalStrengthDb = cellularSignalStrengthDb;
-        mIsSameRegisteredCell = isSameRegisteredCell;
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mTimeStampMillis);
-        dest.writeInt(mRssi);
-        dest.writeInt(mLinkSpeedMbps);
-        dest.writeLong(mTotalTxSuccess);
-        dest.writeLong(mTotalTxRetries);
-        dest.writeLong(mTotalTxBad);
-        dest.writeLong(mTotalRxSuccess);
-        dest.writeLong(mTotalRadioOnTimeMillis);
-        dest.writeLong(mTotalRadioTxTimeMillis);
-        dest.writeLong(mTotalRadioRxTimeMillis);
-        dest.writeLong(mTotalScanTimeMillis);
-        dest.writeLong(mTotalNanScanTimeMillis);
-        dest.writeLong(mTotalBackgroundScanTimeMillis);
-        dest.writeLong(mTotalRoamScanTimeMillis);
-        dest.writeLong(mTotalPnoScanTimeMillis);
-        dest.writeLong(mTotalHotspot2ScanTimeMillis);
-        dest.writeLong(mTotalCcaBusyFreqTimeMillis);
-        dest.writeLong(mTotalRadioOnFreqTimeMillis);
-        dest.writeLong(mTotalBeaconRx);
-        dest.writeInt(mProbeStatusSinceLastUpdate);
-        dest.writeInt(mProbeElapsedTimeSinceLastUpdateMillis);
-        dest.writeInt(mProbeMcsRateSinceLastUpdate);
-        dest.writeInt(mRxLinkSpeedMbps);
-        dest.writeInt(mCellularDataNetworkType);
-        dest.writeInt(mCellularSignalStrengthDbm);
-        dest.writeInt(mCellularSignalStrengthDb);
-        dest.writeBoolean(mIsSameRegisteredCell);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiUsabilityStatsEntry> CREATOR =
-            new Creator<WifiUsabilityStatsEntry>() {
-        public WifiUsabilityStatsEntry createFromParcel(Parcel in) {
-            return new WifiUsabilityStatsEntry(
-                    in.readLong(), in.readInt(),
-                    in.readInt(), in.readLong(), in.readLong(),
-                    in.readLong(), in.readLong(), in.readLong(),
-                    in.readLong(), in.readLong(), in.readLong(),
-                    in.readLong(), in.readLong(), in.readLong(),
-                    in.readLong(), in.readLong(), in.readLong(),
-                    in.readLong(), in.readLong(), in.readInt(),
-                    in.readInt(), in.readInt(), in.readInt(),
-                    in.readInt(), in.readInt(), in.readInt(),
-                    in.readBoolean()
-            );
-        }
-
-        public WifiUsabilityStatsEntry[] newArray(int size) {
-            return new WifiUsabilityStatsEntry[size];
-        }
-    };
-
-    /** Absolute milliseconds from device boot when these stats were sampled */
-    public long getTimeStampMillis() {
-        return mTimeStampMillis;
-    }
-
-    /** The RSSI (in dBm) at the sample time */
-    public int getRssi() {
-        return mRssi;
-    }
-
-    /** Link speed at the sample time in Mbps */
-    public int getLinkSpeedMbps() {
-        return mLinkSpeedMbps;
-    }
-
-    /** The total number of tx success counted from the last radio chip reset */
-    public long getTotalTxSuccess() {
-        return mTotalTxSuccess;
-    }
-
-    /** The total number of MPDU data packet retries counted from the last radio chip reset */
-    public long getTotalTxRetries() {
-        return mTotalTxRetries;
-    }
-
-    /** The total number of tx bad counted from the last radio chip reset */
-    public long getTotalTxBad() {
-        return mTotalTxBad;
-    }
-
-    /** The total number of rx success counted from the last radio chip reset */
-    public long getTotalRxSuccess() {
-        return mTotalRxSuccess;
-    }
-
-    /** The total time the wifi radio is on in ms counted from the last radio chip reset */
-    public long getTotalRadioOnTimeMillis() {
-        return mTotalRadioOnTimeMillis;
-    }
-
-    /** The total time the wifi radio is doing tx in ms counted from the last radio chip reset */
-    public long getTotalRadioTxTimeMillis() {
-        return mTotalRadioTxTimeMillis;
-    }
-
-    /** The total time the wifi radio is doing rx in ms counted from the last radio chip reset */
-    public long getTotalRadioRxTimeMillis() {
-        return mTotalRadioRxTimeMillis;
-    }
-
-    /** The total time spent on all types of scans in ms counted from the last radio chip reset */
-    public long getTotalScanTimeMillis() {
-        return mTotalScanTimeMillis;
-    }
-
-    /** The total time spent on nan scans in ms counted from the last radio chip reset */
-    public long getTotalNanScanTimeMillis() {
-        return mTotalNanScanTimeMillis;
-    }
-
-    /** The total time spent on background scans in ms counted from the last radio chip reset */
-    public long getTotalBackgroundScanTimeMillis() {
-        return mTotalBackgroundScanTimeMillis;
-    }
-
-    /** The total time spent on roam scans in ms counted from the last radio chip reset */
-    public long getTotalRoamScanTimeMillis() {
-        return mTotalRoamScanTimeMillis;
-    }
-
-    /** The total time spent on pno scans in ms counted from the last radio chip reset */
-    public long getTotalPnoScanTimeMillis() {
-        return mTotalPnoScanTimeMillis;
-    }
-
-    /** The total time spent on hotspot2.0 scans and GAS exchange in ms counted from the last radio
-     * chip reset */
-    public long getTotalHotspot2ScanTimeMillis() {
-        return mTotalHotspot2ScanTimeMillis;
-    }
-
-    /** The total time CCA is on busy status on the current frequency in ms counted from the last
-     * radio chip reset */
-    public long getTotalCcaBusyFreqTimeMillis() {
-        return mTotalCcaBusyFreqTimeMillis;
-    }
-
-    /** The total radio on time on the current frequency from the last radio chip reset */
-    public long getTotalRadioOnFreqTimeMillis() {
-        return mTotalRadioOnFreqTimeMillis;
-    }
-
-    /** The total number of beacons received from the last radio chip reset */
-    public long getTotalBeaconRx() {
-        return mTotalBeaconRx;
-    }
-
-    /** The status of link probe since last stats update */
-    @ProbeStatus public int getProbeStatusSinceLastUpdate() {
-        return mProbeStatusSinceLastUpdate;
-    }
-
-    /** The elapsed time of the most recent link probe since last stats update */
-    public int getProbeElapsedTimeSinceLastUpdateMillis() {
-        return mProbeElapsedTimeSinceLastUpdateMillis;
-    }
-
-    /** The MCS rate of the most recent link probe since last stats update */
-    public int getProbeMcsRateSinceLastUpdate() {
-        return mProbeMcsRateSinceLastUpdate;
-    }
-
-    /** Rx link speed at the sample time in Mbps */
-    public int getRxLinkSpeedMbps() {
-        return mRxLinkSpeedMbps;
-    }
-
-    /** Cellular data network type currently in use on the device for data transmission */
-    @NetworkType public int getCellularDataNetworkType() {
-        return mCellularDataNetworkType;
-    }
-
-    /**
-     * Cellular signal strength in dBm, NR: CsiRsrp, LTE: Rsrp, WCDMA/TDSCDMA: Rscp,
-     * CDMA: Rssi, EVDO: Rssi, GSM: Rssi
-     */
-    public int getCellularSignalStrengthDbm() {
-        return mCellularSignalStrengthDbm;
-    }
-
-    /**
-     * Cellular signal strength in dB, NR: CsiSinr, LTE: Rsrq, WCDMA: EcNo, TDSCDMA: invalid,
-     * CDMA: Ecio, EVDO: SNR, GSM: invalid
-     */
-    public int getCellularSignalStrengthDb() {
-        return mCellularSignalStrengthDb;
-    }
-
-    /** Whether the primary registered cell of current entry is same as that of previous entry */
-    public boolean isSameRegisteredCell() {
-        return mIsSameRegisteredCell;
-    }
-}
diff --git a/wifi/java/android/net/wifi/WpsInfo.java b/wifi/java/android/net/wifi/WpsInfo.java
deleted file mode 100644
index 689ace5b..0000000
--- a/wifi/java/android/net/wifi/WpsInfo.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * A class representing Wi-Fi Protected Setup
- *
- * {@see android.net.wifi.p2p.WifiP2pConfig}
- */
-public class WpsInfo implements Parcelable {
-
-    /** Push button configuration */
-    public static final int PBC     = 0;
-    /** Display pin method configuration - pin is generated and displayed on device */
-    public static final int DISPLAY = 1;
-    /** Keypad pin method configuration - pin is entered on device */
-    public static final int KEYPAD  = 2;
-    /** Label pin method configuration - pin is labelled on device */
-    public static final int LABEL   = 3;
-    /** Invalid configuration */
-    public static final int INVALID = 4;
-
-    /** Wi-Fi Protected Setup. www.wi-fi.org/wifi-protected-setup has details */
-    public int setup;
-
-    /** Passed with pin method KEYPAD */
-    public String BSSID;
-
-    /** Passed with pin method configuration */
-    public String pin;
-
-    public WpsInfo() {
-        setup = INVALID;
-        BSSID = null;
-        pin = null;
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append(" setup: ").append(setup);
-        sbuf.append('\n');
-        sbuf.append(" BSSID: ").append(BSSID);
-        sbuf.append('\n');
-        sbuf.append(" pin: ").append(pin);
-        sbuf.append('\n');
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /* Copy constructor */
-    public WpsInfo(WpsInfo source) {
-        if (source != null) {
-            setup = source.setup;
-            BSSID = source.BSSID;
-            pin = source.pin;
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(setup);
-        dest.writeString(BSSID);
-        dest.writeString(pin);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WpsInfo> CREATOR =
-        new Creator<WpsInfo>() {
-            public WpsInfo createFromParcel(Parcel in) {
-                WpsInfo config = new WpsInfo();
-                config.setup = in.readInt();
-                config.BSSID = in.readString();
-                config.pin = in.readString();
-                return config;
-            }
-
-            public WpsInfo[] newArray(int size) {
-                return new WpsInfo[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/aware/AttachCallback.java b/wifi/java/android/net/wifi/aware/AttachCallback.java
deleted file mode 100644
index c368b46..0000000
--- a/wifi/java/android/net/wifi/aware/AttachCallback.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-/**
- * Base class for Aware attach callbacks. Should be extended by applications and set when calling
- * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}. These are callbacks
- * applying to the Aware connection as a whole - not to specific publish or subscribe sessions -
- * for that see {@link DiscoverySessionCallback}.
- */
-public class AttachCallback {
-    /**
-     * Called when Aware attach operation
-     * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}
-     * is completed and that we can now start discovery sessions or connections.
-     *
-     * @param session The Aware object on which we can execute further Aware operations - e.g.
-     *                discovery, connections.
-     */
-    public void onAttached(WifiAwareSession session) {
-        /* empty */
-    }
-
-    /**
-     * Called when Aware attach operation
-     * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)} failed.
-     */
-    public void onAttachFailed() {
-        /* empty */
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/Characteristics.java b/wifi/java/android/net/wifi/aware/Characteristics.java
deleted file mode 100644
index d5fd48e..0000000
--- a/wifi/java/android/net/wifi/aware/Characteristics.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.IntDef;
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-/**
- * The characteristics of the Wi-Fi Aware implementation.
- */
-public final class Characteristics implements Parcelable {
-    /** @hide */
-    public static final String KEY_MAX_SERVICE_NAME_LENGTH = "key_max_service_name_length";
-    /** @hide */
-    public static final String KEY_MAX_SERVICE_SPECIFIC_INFO_LENGTH =
-            "key_max_service_specific_info_length";
-    /** @hide */
-    public static final String KEY_MAX_MATCH_FILTER_LENGTH = "key_max_match_filter_length";
-    /** @hide */
-    public static final String KEY_SUPPORTED_CIPHER_SUITES = "key_supported_cipher_suites";
-
-    private Bundle mCharacteristics = new Bundle();
-
-    /** @hide : should not be created by apps */
-    public Characteristics(Bundle characteristics) {
-        mCharacteristics = characteristics;
-    }
-
-    /**
-     * Returns the maximum string length that can be used to specify a Aware service name. Restricts
-     * the parameters of the {@link PublishConfig.Builder#setServiceName(String)} and
-     * {@link SubscribeConfig.Builder#setServiceName(String)}.
-     *
-     * @return A positive integer, maximum string length of Aware service name.
-     */
-    public int getMaxServiceNameLength() {
-        return mCharacteristics.getInt(KEY_MAX_SERVICE_NAME_LENGTH);
-    }
-
-    /**
-     * Returns the maximum length of byte array that can be used to specify a Aware service specific
-     * information field: the arbitrary load used in discovery or the message length of Aware
-     * message exchange. Restricts the parameters of the
-     * {@link PublishConfig.Builder#setServiceSpecificInfo(byte[])},
-     * {@link SubscribeConfig.Builder#setServiceSpecificInfo(byte[])}, and
-     * {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])}
-     * variants.
-     *
-     * @return A positive integer, maximum length of byte array for Aware messaging.
-     */
-    public int getMaxServiceSpecificInfoLength() {
-        return mCharacteristics.getInt(KEY_MAX_SERVICE_SPECIFIC_INFO_LENGTH);
-    }
-
-    /**
-     * Returns the maximum length of byte array that can be used to specify a Aware match filter.
-     * Restricts the parameters of the
-     * {@link PublishConfig.Builder#setMatchFilter(java.util.List)} and
-     * {@link SubscribeConfig.Builder#setMatchFilter(java.util.List)}.
-     *
-     * @return A positive integer, maximum length of byte array for Aware discovery match filter.
-     */
-    public int getMaxMatchFilterLength() {
-        return mCharacteristics.getInt(KEY_MAX_MATCH_FILTER_LENGTH);
-    }
-
-    /** @hide */
-    @IntDef(flag = true, prefix = { "WIFI_AWARE_CIPHER_SUITE_" }, value = {
-            WIFI_AWARE_CIPHER_SUITE_NCS_SK_128,
-            WIFI_AWARE_CIPHER_SUITE_NCS_SK_256,
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiAwareCipherSuites {}
-
-    /**
-     * Wi-Fi Aware supported ciphier suite representing NCS SK 128: 128 bit shared-key.
-     */
-    public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_128 = 1 << 0;
-
-    /**
-     * Wi-Fi Aware supported ciphier suite representing NCS SK 256: 256 bit shared-key.
-     */
-    public static final int WIFI_AWARE_CIPHER_SUITE_NCS_SK_256 = 1 << 1;
-
-    /**
-     * Returns the set of cipher suites supported by the device for use in Wi-Fi Aware data-paths.
-     * The device automatically picks the strongest cipher suite when initiating a data-path setup.
-     *
-     * @return A set of flags from {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_128}, or
-     * {@link #WIFI_AWARE_CIPHER_SUITE_NCS_SK_256}.
-     */
-    public @WifiAwareCipherSuites int getSupportedCipherSuites() {
-        return mCharacteristics.getInt(KEY_SUPPORTED_CIPHER_SUITES);
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeBundle(mCharacteristics);
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public static final @android.annotation.NonNull Creator<Characteristics> CREATOR =
-            new Creator<Characteristics>() {
-                @Override
-                public Characteristics createFromParcel(Parcel in) {
-                    Characteristics c = new Characteristics(in.readBundle());
-                    return c;
-                }
-
-                @Override
-                public Characteristics[] newArray(int size) {
-                    return new Characteristics[size];
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/aware/ConfigRequest.aidl b/wifi/java/android/net/wifi/aware/ConfigRequest.aidl
deleted file mode 100644
index 68a7c85..0000000
--- a/wifi/java/android/net/wifi/aware/ConfigRequest.aidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-parcelable ConfigRequest;
diff --git a/wifi/java/android/net/wifi/aware/ConfigRequest.java b/wifi/java/android/net/wifi/aware/ConfigRequest.java
deleted file mode 100644
index 61ab92c..0000000
--- a/wifi/java/android/net/wifi/aware/ConfigRequest.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Arrays;
-
-/**
- * Defines a request object to configure a Wi-Fi Aware network. Built using
- * {@link ConfigRequest.Builder}. Configuration is requested using
- * {@link WifiAwareManager#attach(AttachCallback, android.os.Handler)}.
- * Note that the actual achieved configuration may be different from the
- * requested configuration - since different applications may request different
- * configurations.
- *
- * @hide
- */
-public final class ConfigRequest implements Parcelable {
-    /**
-     * Lower range of possible cluster ID.
-     */
-    public static final int CLUSTER_ID_MIN = 0;
-
-    /**
-     * Upper range of possible cluster ID.
-     */
-    public static final int CLUSTER_ID_MAX = 0xFFFF;
-
-    /**
-     * Indices for configuration variables which are specified per band.
-     */
-    public static final int NAN_BAND_24GHZ = 0;
-    public static final int NAN_BAND_5GHZ = 1;
-    public static final int NAN_BAND_6GHZ = 2;
-
-    /**
-     * Magic values for Discovery Window (DW) interval configuration
-     */
-    public static final int DW_INTERVAL_NOT_INIT = -1;
-    public static final int DW_DISABLE = 0; // only valid for 5GHz
-
-    /**
-     * Indicates whether 5G band support is requested.
-     */
-    public final boolean mSupport5gBand;
-
-    /**
-     * Indicates whether 6G band support is requested.
-     */
-    public final boolean mSupport6gBand;
-
-    /**
-     * Specifies the desired master preference.
-     */
-    public final int mMasterPreference;
-
-    /**
-     * Specifies the desired lower range of the cluster ID. Must be lower then
-     * {@link ConfigRequest#mClusterHigh}.
-     */
-    public final int mClusterLow;
-
-    /**
-     * Specifies the desired higher range of the cluster ID. Must be higher then
-     * {@link ConfigRequest#mClusterLow}.
-     */
-    public final int mClusterHigh;
-
-    /**
-     * Specifies the discovery window interval for the device on NAN_BAND_*.
-     */
-    public final int mDiscoveryWindowInterval[];
-
-    private ConfigRequest(boolean support5gBand, boolean support6gBand, int masterPreference,
-            int clusterLow, int clusterHigh, int[] discoveryWindowInterval) {
-        mSupport5gBand = support5gBand;
-        mSupport6gBand = support6gBand;
-        mMasterPreference = masterPreference;
-        mClusterLow = clusterLow;
-        mClusterHigh = clusterHigh;
-        mDiscoveryWindowInterval = discoveryWindowInterval;
-    }
-
-    @Override
-    public String toString() {
-        return "ConfigRequest [mSupport5gBand=" + mSupport5gBand
-                + ", mSupport6gBand=" + mSupport6gBand
-                + ", mMasterPreference=" + mMasterPreference
-                + ", mClusterLow=" + mClusterLow
-                + ", mClusterHigh=" + mClusterHigh
-                + ", mDiscoveryWindowInterval=" + Arrays.toString(mDiscoveryWindowInterval) + "]";
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mSupport5gBand ? 1 : 0);
-        dest.writeInt(mSupport6gBand ? 1 : 0);
-        dest.writeInt(mMasterPreference);
-        dest.writeInt(mClusterLow);
-        dest.writeInt(mClusterHigh);
-        dest.writeIntArray(mDiscoveryWindowInterval);
-    }
-
-    public static final @android.annotation.NonNull Creator<ConfigRequest> CREATOR = new Creator<ConfigRequest>() {
-        @Override
-        public ConfigRequest[] newArray(int size) {
-            return new ConfigRequest[size];
-        }
-
-        @Override
-        public ConfigRequest createFromParcel(Parcel in) {
-            boolean support5gBand = in.readInt() != 0;
-            boolean support6gBand = in.readInt() != 0;
-            int masterPreference = in.readInt();
-            int clusterLow = in.readInt();
-            int clusterHigh = in.readInt();
-            int discoveryWindowInterval[] = in.createIntArray();
-
-            return new ConfigRequest(support5gBand, support6gBand, masterPreference, clusterLow,
-                    clusterHigh, discoveryWindowInterval);
-        }
-    };
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof ConfigRequest)) {
-            return false;
-        }
-
-        ConfigRequest lhs = (ConfigRequest) o;
-
-        return mSupport5gBand == lhs.mSupport5gBand
-                && mSupport6gBand == lhs.mSupport6gBand
-                && mMasterPreference == lhs.mMasterPreference
-                && mClusterLow == lhs.mClusterLow && mClusterHigh == lhs.mClusterHigh
-                && Arrays.equals(mDiscoveryWindowInterval, lhs.mDiscoveryWindowInterval);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = 17;
-
-        result = 31 * result + (mSupport5gBand ? 1 : 0);
-        result = 31 * result + (mSupport6gBand ? 1 : 0);
-        result = 31 * result + mMasterPreference;
-        result = 31 * result + mClusterLow;
-        result = 31 * result + mClusterHigh;
-        result = 31 * result + Arrays.hashCode(mDiscoveryWindowInterval);
-
-        return result;
-    }
-
-    /**
-     * Verifies that the contents of the ConfigRequest are valid. Otherwise
-     * throws an IllegalArgumentException.
-     */
-    public void validate() throws IllegalArgumentException {
-        if (mMasterPreference < 0) {
-            throw new IllegalArgumentException(
-                    "Master Preference specification must be non-negative");
-        }
-        if (mMasterPreference == 1 || mMasterPreference == 255 || mMasterPreference > 255) {
-            throw new IllegalArgumentException("Master Preference specification must not "
-                    + "exceed 255 or use 1 or 255 (reserved values)");
-        }
-        if (mClusterLow < CLUSTER_ID_MIN) {
-            throw new IllegalArgumentException("Cluster specification must be non-negative");
-        }
-        if (mClusterLow > CLUSTER_ID_MAX) {
-            throw new IllegalArgumentException("Cluster specification must not exceed 0xFFFF");
-        }
-        if (mClusterHigh < CLUSTER_ID_MIN) {
-            throw new IllegalArgumentException("Cluster specification must be non-negative");
-        }
-        if (mClusterHigh > CLUSTER_ID_MAX) {
-            throw new IllegalArgumentException("Cluster specification must not exceed 0xFFFF");
-        }
-        if (mClusterLow > mClusterHigh) {
-            throw new IllegalArgumentException(
-                    "Invalid argument combination - must have Cluster Low <= Cluster High");
-        }
-        if (mDiscoveryWindowInterval.length != 3) {
-            throw new IllegalArgumentException(
-                    "Invalid discovery window interval: must have 3 elements (2.4 & 5 & 6");
-        }
-        if (mDiscoveryWindowInterval[NAN_BAND_24GHZ] != DW_INTERVAL_NOT_INIT &&
-                (mDiscoveryWindowInterval[NAN_BAND_24GHZ] < 1 // valid for 2.4GHz: [1-5]
-                || mDiscoveryWindowInterval[NAN_BAND_24GHZ] > 5)) {
-            throw new IllegalArgumentException(
-                    "Invalid discovery window interval for 2.4GHz: valid is UNSET or [1,5]");
-        }
-        if (mDiscoveryWindowInterval[NAN_BAND_5GHZ] != DW_INTERVAL_NOT_INIT &&
-                (mDiscoveryWindowInterval[NAN_BAND_5GHZ] < 0 // valid for 5GHz: [0-5]
-                || mDiscoveryWindowInterval[NAN_BAND_5GHZ] > 5)) {
-            throw new IllegalArgumentException(
-                "Invalid discovery window interval for 5GHz: valid is UNSET or [0,5]");
-        }
-        if (mDiscoveryWindowInterval[NAN_BAND_6GHZ] != DW_INTERVAL_NOT_INIT
-                && (mDiscoveryWindowInterval[NAN_BAND_6GHZ] < 0 // valid for 6GHz: [0-5]
-                || mDiscoveryWindowInterval[NAN_BAND_6GHZ] > 5)) {
-            throw new IllegalArgumentException(
-                "Invalid discovery window interval for 6GHz: valid is UNSET or [0,5]");
-        }
-    }
-
-    /**
-     * Builder used to build {@link ConfigRequest} objects.
-     */
-    public static final class Builder {
-        private boolean mSupport5gBand = true;
-        private boolean mSupport6gBand = false;
-        private int mMasterPreference = 0;
-        private int mClusterLow = CLUSTER_ID_MIN;
-        private int mClusterHigh = CLUSTER_ID_MAX;
-        private int[] mDiscoveryWindowInterval = {DW_INTERVAL_NOT_INIT, DW_INTERVAL_NOT_INIT,
-                DW_INTERVAL_NOT_INIT};
-
-        /**
-         * Specify whether 5G band support is required in this request. Disabled by default.
-         *
-         * @param support5gBand Support for 5G band is required.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setSupport5gBand(boolean support5gBand) {
-            mSupport5gBand = support5gBand;
-            return this;
-        }
-
-        /**
-         * Specify whether 6G band support is required in this request. Disabled by default.
-         *
-         * @param support6gBand Support for 6G band is required.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setSupport6gBand(boolean support6gBand) {
-            mSupport6gBand = support6gBand;
-            return this;
-        }
-
-        /**
-         * Specify the Master Preference requested. The permitted range is 0 (the default) to
-         * 255 with 1 and 255 excluded (reserved).
-         *
-         * @param masterPreference The requested master preference
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setMasterPreference(int masterPreference) {
-            if (masterPreference < 0) {
-                throw new IllegalArgumentException(
-                        "Master Preference specification must be non-negative");
-            }
-            if (masterPreference == 1 || masterPreference == 255 || masterPreference > 255) {
-                throw new IllegalArgumentException("Master Preference specification must not "
-                        + "exceed 255 or use 1 or 255 (reserved values)");
-            }
-
-            mMasterPreference = masterPreference;
-            return this;
-        }
-
-        /**
-         * The Cluster ID is generated randomly for new Aware networks. Specify
-         * the lower range of the cluster ID. The upper range is specified using
-         * the {@link ConfigRequest.Builder#setClusterHigh(int)}. The permitted
-         * range is 0 (the default) to the value specified by
-         * {@link ConfigRequest.Builder#setClusterHigh(int)}. Equality of Low and High is
-         * permitted which restricts the Cluster ID to the specified value.
-         *
-         * @param clusterLow The lower range of the generated cluster ID.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setClusterLow(..).setClusterHigh(..)}.
-         */
-        public Builder setClusterLow(int clusterLow) {
-            if (clusterLow < CLUSTER_ID_MIN) {
-                throw new IllegalArgumentException("Cluster specification must be non-negative");
-            }
-            if (clusterLow > CLUSTER_ID_MAX) {
-                throw new IllegalArgumentException("Cluster specification must not exceed 0xFFFF");
-            }
-
-            mClusterLow = clusterLow;
-            return this;
-        }
-
-        /**
-         * The Cluster ID is generated randomly for new Aware networks. Specify
-         * the lower upper of the cluster ID. The lower range is specified using
-         * the {@link ConfigRequest.Builder#setClusterLow(int)}. The permitted
-         * range is the value specified by
-         * {@link ConfigRequest.Builder#setClusterLow(int)} to 0xFFFF (the default). Equality of
-         * Low and High is permitted which restricts the Cluster ID to the specified value.
-         *
-         * @param clusterHigh The upper range of the generated cluster ID.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setClusterLow(..).setClusterHigh(..)}.
-         */
-        public Builder setClusterHigh(int clusterHigh) {
-            if (clusterHigh < CLUSTER_ID_MIN) {
-                throw new IllegalArgumentException("Cluster specification must be non-negative");
-            }
-            if (clusterHigh > CLUSTER_ID_MAX) {
-                throw new IllegalArgumentException("Cluster specification must not exceed 0xFFFF");
-            }
-
-            mClusterHigh = clusterHigh;
-            return this;
-        }
-
-        /**
-         * The discovery window interval specifies the discovery windows in which the device will be
-         * awake. The configuration enables trading off latency vs. power (higher interval means
-         * higher discovery latency but lower power).
-         *
-         * @param band Either {@link #NAN_BAND_24GHZ} or {@link #NAN_BAND_5GHZ} or
-         *        {@link #NAN_BAND_6GHZ}.
-         * @param interval A value of 1, 2, 3, 4, or 5 indicating an interval of 2^(interval-1). For
-         *                 the 5GHz band a value of 0 indicates that the device will not be awake
-         *                 for any discovery windows.
-         *
-         * @return The builder itself to facilitate chaining operations
-         *         {@code builder.setDiscoveryWindowInterval(...).setMasterPreference(...)}.
-         */
-        public Builder setDiscoveryWindowInterval(int band, int interval) {
-            if (band != NAN_BAND_24GHZ && band != NAN_BAND_5GHZ && band != NAN_BAND_6GHZ) {
-                throw new IllegalArgumentException("Invalid band value");
-            }
-            if ((band == NAN_BAND_24GHZ && (interval < 1 || interval > 5))
-                    || (band == NAN_BAND_5GHZ && (interval < 0 || interval > 5))
-                    || (band == NAN_BAND_6GHZ && (interval < 0 || interval > 5))) {
-                throw new IllegalArgumentException(
-                        "Invalid interval value: 2.4 GHz [1,5] or 5GHz/6GHz [0,5]");
-            }
-
-            mDiscoveryWindowInterval[band] = interval;
-            return this;
-        }
-
-        /**
-         * Build {@link ConfigRequest} given the current requests made on the
-         * builder.
-         */
-        public ConfigRequest build() {
-            if (mClusterLow > mClusterHigh) {
-                throw new IllegalArgumentException(
-                        "Invalid argument combination - must have Cluster Low <= Cluster High");
-            }
-
-            return new ConfigRequest(mSupport5gBand, mSupport6gBand, mMasterPreference, mClusterLow,
-                    mClusterHigh, mDiscoveryWindowInterval);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/DiscoverySession.java b/wifi/java/android/net/wifi/aware/DiscoverySession.java
deleted file mode 100644
index 4d92ae1..0000000
--- a/wifi/java/android/net/wifi/aware/DiscoverySession.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.NetworkSpecifier;
-import android.util.CloseGuard;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-
-/**
- * A class representing a single publish or subscribe Aware session. This object
- * will not be created directly - only its child classes are available:
- * {@link PublishDiscoverySession} and {@link SubscribeDiscoverySession}. This
- * class provides functionality common to both publish and subscribe discovery sessions:
- * <ul>
- *      <li>Sending messages: {@link #sendMessage(PeerHandle, int, byte[])} method.
- *      <li>Creating a network-specifier when requesting a Aware connection using
- *      {@link WifiAwareNetworkSpecifier.Builder}.
- * </ul>
- * <p>
- * The {@link #close()} method must be called to destroy discovery sessions once they are
- * no longer needed.
- */
-public class DiscoverySession implements AutoCloseable {
-    private static final String TAG = "DiscoverySession";
-    private static final boolean DBG = false;
-    private static final boolean VDBG = false; // STOPSHIP if true
-
-    private static final int MAX_SEND_RETRY_COUNT = 5;
-
-    /** @hide */
-    protected WeakReference<WifiAwareManager> mMgr;
-    /** @hide */
-    protected final int mClientId;
-    /** @hide */
-    protected final int mSessionId;
-    /** @hide */
-    protected boolean mTerminated = false;
-
-    private final CloseGuard mCloseGuard = new CloseGuard();
-
-    /**
-     * Return the maximum permitted retry count when sending messages using
-     * {@link #sendMessage(PeerHandle, int, byte[], int)}.
-     *
-     * @return Maximum retry count when sending messages.
-     *
-     * @hide
-     */
-    public static int getMaxSendRetryCount() {
-        return MAX_SEND_RETRY_COUNT;
-    }
-
-    /** @hide */
-    public DiscoverySession(WifiAwareManager manager, int clientId, int sessionId) {
-        if (VDBG) {
-            Log.v(TAG, "New discovery session created: manager=" + manager + ", clientId="
-                    + clientId + ", sessionId=" + sessionId);
-        }
-
-        mMgr = new WeakReference<>(manager);
-        mClientId = clientId;
-        mSessionId = sessionId;
-
-        mCloseGuard.open("close");
-    }
-
-    /**
-     * Destroy the publish or subscribe session - free any resources, and stop
-     * transmitting packets on-air (for an active session) or listening for
-     * matches (for a passive session). The session may not be used for any
-     * additional operations after its destruction.
-     * <p>
-     *     This operation must be done on a session which is no longer needed. Otherwise system
-     *     resources will continue to be utilized until the application exits. The only
-     *     exception is a session for which we received a termination callback,
-     *     {@link DiscoverySessionCallback#onSessionTerminated()}.
-     */
-    @Override
-    public void close() {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "destroy: called post GC on WifiAwareManager");
-            return;
-        }
-        mgr.terminateSession(mClientId, mSessionId);
-        mTerminated = true;
-        mMgr.clear();
-        mCloseGuard.close();
-        Reference.reachabilityFence(this);
-    }
-
-    /**
-     * Sets the status of the session to terminated - i.e. an indication that
-     * already terminated rather than executing a termination.
-     *
-     * @hide
-     */
-    public void setTerminated() {
-        if (mTerminated) {
-            Log.w(TAG, "terminate: already terminated.");
-            return;
-        }
-
-        mTerminated = true;
-        mMgr.clear();
-        mCloseGuard.close();
-    }
-
-    /** @hide */
-    @Override
-    protected void finalize() throws Throwable {
-        try {
-            if (mCloseGuard != null) {
-                mCloseGuard.warnIfOpen();
-            }
-
-            if (!mTerminated) {
-                close();
-            }
-        } finally {
-            super.finalize();
-        }
-    }
-
-    /**
-     * Access the client ID of the Aware session.
-     *
-     * Note: internal visibility for testing.
-     *
-     * @return The internal client ID.
-     *
-     * @hide
-     */
-    @VisibleForTesting
-    public int getClientId() {
-        return mClientId;
-    }
-
-    /**
-     * Access the discovery session ID of the Aware session.
-     *
-     * Note: internal visibility for testing.
-     *
-     * @return The internal discovery session ID.
-     *
-     * @hide
-     */
-    @VisibleForTesting
-    public int getSessionId() {
-        return mSessionId;
-    }
-
-    /**
-     * Sends a message to the specified destination. Aware messages are transmitted in the context
-     * of a discovery session - executed subsequent to a publish/subscribe
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} event.
-     * <p>
-     *     Aware messages are not guaranteed delivery. Callbacks on
-     *     {@link DiscoverySessionCallback} indicate message was transmitted successfully,
-     *     {@link DiscoverySessionCallback#onMessageSendSucceeded(int)}, or transmission
-     *     failed (possibly after several retries) -
-     *     {@link DiscoverySessionCallback#onMessageSendFailed(int)}.
-     * <p>
-     *     The peer will get a callback indicating a message was received using
-     *     {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     *     byte[])}.
-     *
-     * @param peerHandle The peer's handle for the message. Must be a result of an
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} or
-     * {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     * byte[])} events.
-     * @param messageId An arbitrary integer used by the caller to identify the message. The same
-     *            integer ID will be returned in the callbacks indicating message send success or
-     *            failure. The {@code messageId} is not used internally by the Aware service - it
-     *                  can be arbitrary and non-unique.
-     * @param message The message to be transmitted.
-     * @param retryCount An integer specifying how many additional service-level (as opposed to PHY
-     *            or MAC level) retries should be attempted if there is no ACK from the receiver
-     *            (note: no retransmissions are attempted in other failure cases). A value of 0
-     *            indicates no retries. Max permitted value is {@link #getMaxSendRetryCount()}.
-     *
-     * @hide
-     */
-    public void sendMessage(@NonNull PeerHandle peerHandle, int messageId,
-            @Nullable byte[] message, int retryCount) {
-        if (mTerminated) {
-            Log.w(TAG, "sendMessage: called on terminated session");
-            return;
-        }
-
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "sendMessage: called post GC on WifiAwareManager");
-            return;
-        }
-
-        mgr.sendMessage(mClientId, mSessionId, peerHandle, message, messageId, retryCount);
-    }
-
-    /**
-     * Sends a message to the specified destination. Aware messages are transmitted in the context
-     * of a discovery session - executed subsequent to a publish/subscribe
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} event.
-     * <p>
-     *     Aware messages are not guaranteed delivery. Callbacks on
-     *     {@link DiscoverySessionCallback} indicate message was transmitted successfully,
-     *     {@link DiscoverySessionCallback#onMessageSendSucceeded(int)}, or transmission
-     *     failed (possibly after several retries) -
-     *     {@link DiscoverySessionCallback#onMessageSendFailed(int)}.
-     * <p>
-     * The peer will get a callback indicating a message was received using
-     * {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     * byte[])}.
-     *
-     * @param peerHandle The peer's handle for the message. Must be a result of an
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} or
-     * {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     * byte[])} events.
-     * @param messageId An arbitrary integer used by the caller to identify the message. The same
-     *            integer ID will be returned in the callbacks indicating message send success or
-     *            failure. The {@code messageId} is not used internally by the Aware service - it
-     *                  can be arbitrary and non-unique.
-     * @param message The message to be transmitted.
-     */
-    public void sendMessage(@NonNull PeerHandle peerHandle, int messageId,
-            @Nullable byte[] message) {
-        sendMessage(peerHandle, messageId, message, 0);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an unencrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     * This method should be used when setting up a connection with a peer discovered through Aware
-     * discovery or communication (in such scenarios the MAC address of the peer is shielded by
-     * an opaque peer ID handle). If an Aware connection is needed to a peer discovered using other
-     * OOB (out-of-band) mechanism then use the alternative
-     * {@link WifiAwareSession#createNetworkSpecifierOpen(int, byte[])} method - which uses the
-     * peer's MAC address.
-     * <p>
-     * Note: per the Wi-Fi Aware specification the roles are fixed - a Subscriber is an INITIATOR
-     * and a Publisher is a RESPONDER.
-     * <p>
-     * To set up an encrypted link use the
-     * {@link #createNetworkSpecifierPassphrase(PeerHandle, String)} API.
-     * @deprecated Use the replacement {@link WifiAwareNetworkSpecifier.Builder}.
-     *
-     * @param peerHandle The peer's handle obtained through
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], java.util.List)}
-     *                   or
-     *                   {@link DiscoverySessionCallback#onMessageReceived(PeerHandle, byte[])}.
-     *                   On a RESPONDER this value is used to gate the acceptance of a connection
-     *                   request from only that peer.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     */
-    @Deprecated
-    public NetworkSpecifier createNetworkSpecifierOpen(@NonNull PeerHandle peerHandle) {
-        if (mTerminated) {
-            Log.w(TAG, "createNetworkSpecifierOpen: called on terminated session");
-            return null;
-        }
-
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "createNetworkSpecifierOpen: called post GC on WifiAwareManager");
-            return null;
-        }
-
-        int role = this instanceof SubscribeDiscoverySession
-                ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER;
-
-        return mgr.createNetworkSpecifier(mClientId, role, mSessionId, peerHandle, null, null);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an encrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     * This method should be used when setting up a connection with a peer discovered through Aware
-     * discovery or communication (in such scenarios the MAC address of the peer is shielded by
-     * an opaque peer ID handle). If an Aware connection is needed to a peer discovered using other
-     * OOB (out-of-band) mechanism then use the alternative
-     * {@link WifiAwareSession#createNetworkSpecifierPassphrase(int, byte[], String)} method -
-     * which uses the peer's MAC address.
-     * <p>
-     * Note: per the Wi-Fi Aware specification the roles are fixed - a Subscriber is an INITIATOR
-     * and a Publisher is a RESPONDER.
-     * @deprecated Use the replacement {@link WifiAwareNetworkSpecifier.Builder}.
-     *
-     * @param peerHandle The peer's handle obtained through
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} or
-     * {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     * byte[])}. On a RESPONDER this value is used to gate the acceptance of a connection request
-     *                   from only that peer.
-     * @param passphrase The passphrase to be used to encrypt the link. The PMK is generated from
-     *                   the passphrase. Use the
-     *                   {@link #createNetworkSpecifierOpen(PeerHandle)} API to
-     *                   specify an open (unencrypted) link.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     */
-    @Deprecated
-    public NetworkSpecifier createNetworkSpecifierPassphrase(
-            @NonNull PeerHandle peerHandle, @NonNull String passphrase) {
-        if (!WifiAwareUtils.validatePassphrase(passphrase)) {
-            throw new IllegalArgumentException("Passphrase must meet length requirements");
-        }
-
-        if (mTerminated) {
-            Log.w(TAG, "createNetworkSpecifierPassphrase: called on terminated session");
-            return null;
-        }
-
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "createNetworkSpecifierPassphrase: called post GC on WifiAwareManager");
-            return null;
-        }
-
-        int role = this instanceof SubscribeDiscoverySession
-                ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER;
-
-        return mgr.createNetworkSpecifier(mClientId, role, mSessionId, peerHandle, null,
-                passphrase);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an encrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     * This method should be used when setting up a connection with a peer discovered through Aware
-     * discovery or communication (in such scenarios the MAC address of the peer is shielded by
-     * an opaque peer ID handle). If an Aware connection is needed to a peer discovered using other
-     * OOB (out-of-band) mechanism then use the alternative
-     * {@link WifiAwareSession#createNetworkSpecifierPmk(int, byte[], byte[])} method - which uses
-     * the peer's MAC address.
-     * <p>
-     * Note: per the Wi-Fi Aware specification the roles are fixed - a Subscriber is an INITIATOR
-     * and a Publisher is a RESPONDER.
-     * @deprecated Use the replacement {@link WifiAwareNetworkSpecifier.Builder}.
-     *
-     * @param peerHandle The peer's handle obtained through
-     * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle,
-     * byte[], java.util.List)} or
-     * {@link DiscoverySessionCallback#onMessageReceived(PeerHandle,
-     * byte[])}. On a RESPONDER this value is used to gate the acceptance of a connection request
-     *                   from only that peer.
-     * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-     *            encrypting the data-path. Use the
-     *            {@link #createNetworkSpecifierPassphrase(PeerHandle, String)} to specify a
-     *            Passphrase or {@link #createNetworkSpecifierOpen(PeerHandle)} to specify an
-     *            open (unencrypted) link.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     *
-     * @hide
-     */
-    @Deprecated
-    @SystemApi
-    public NetworkSpecifier createNetworkSpecifierPmk(@NonNull PeerHandle peerHandle,
-            @NonNull byte[] pmk) {
-        if (!WifiAwareUtils.validatePmk(pmk)) {
-            throw new IllegalArgumentException("PMK must 32 bytes");
-        }
-
-        if (mTerminated) {
-            Log.w(TAG, "createNetworkSpecifierPmk: called on terminated session");
-            return null;
-        }
-
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "createNetworkSpecifierPmk: called post GC on WifiAwareManager");
-            return null;
-        }
-
-        int role = this instanceof SubscribeDiscoverySession
-                ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER;
-
-        return mgr.createNetworkSpecifier(mClientId, role, mSessionId, peerHandle, pmk, null);
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
deleted file mode 100644
index bfb0462..0000000
--- a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-
-import java.util.List;
-
-/**
- * Base class for Aware session events callbacks. Should be extended by
- * applications wanting notifications. The callbacks are set when a
- * publish or subscribe session is created using
- * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
- * android.os.Handler)} or
- * {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
- * android.os.Handler)}.
- * <p>
- * A single callback is set at session creation - it cannot be replaced.
- */
-public class DiscoverySessionCallback {
-    /**
-     * Called when a publish operation is started successfully in response to a
-     * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
-     * android.os.Handler)} operation.
-     *
-     * @param session The {@link PublishDiscoverySession} used to control the
-     *            discovery session.
-     */
-    public void onPublishStarted(@NonNull PublishDiscoverySession session) {
-        /* empty */
-    }
-
-    /**
-     * Called when a subscribe operation is started successfully in response to a
-     * {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
-     * android.os.Handler)} operation.
-     *
-     * @param session The {@link SubscribeDiscoverySession} used to control the
-     *            discovery session.
-     */
-    public void onSubscribeStarted(@NonNull SubscribeDiscoverySession session) {
-        /* empty */
-    }
-
-    /**
-     * Called when a publish or subscribe discovery session configuration update request
-     * succeeds. Called in response to
-     * {@link PublishDiscoverySession#updatePublish(PublishConfig)} or
-     * {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}.
-     */
-    public void onSessionConfigUpdated() {
-        /* empty */
-    }
-
-    /**
-     * Called when a publish or subscribe discovery session cannot be created:
-     * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
-     * android.os.Handler)} or
-     * {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
-     * android.os.Handler)}, or when a configuration update fails:
-     * {@link PublishDiscoverySession#updatePublish(PublishConfig)} or
-     * {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}.
-     * <p>
-     *     For discovery session updates failure leaves the session running with its previous
-     *     configuration - the discovery session is not terminated.
-     */
-    public void onSessionConfigFailed() {
-        /* empty */
-    }
-
-    /**
-     * Called when a discovery session (publish or subscribe) terminates. Termination may be due
-     * to user-request (either directly through {@link DiscoverySession#close()} or
-     * application-specified expiration, e.g. {@link PublishConfig.Builder#setTtlSec(int)}
-     * or {@link SubscribeConfig.Builder#setTtlSec(int)}).
-     */
-    public void onSessionTerminated() {
-        /* empty */
-    }
-
-    /**
-     * Called when a discovery (publish or subscribe) operation results in a
-     * service discovery.
-     * <p>
-     * Note that this method and
-     * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} may be called
-     * multiple times per service discovery.
-     *
-     * @param peerHandle An opaque handle to the peer matching our discovery operation.
-     * @param serviceSpecificInfo The service specific information (arbitrary
-     *            byte array) provided by the peer as part of its discovery
-     *            configuration.
-     * @param matchFilter The filter which resulted in this service discovery. For
-     * {@link PublishConfig#PUBLISH_TYPE_UNSOLICITED},
-     * {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE} discovery sessions this is the publisher's
-     *                    match filter. For {@link PublishConfig#PUBLISH_TYPE_SOLICITED},
-     *                    {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE} discovery sessions this
-     *                    is the subscriber's match filter.
-     */
-    public void onServiceDiscovered(PeerHandle peerHandle,
-            byte[] serviceSpecificInfo, List<byte[]> matchFilter) {
-        /* empty */
-    }
-
-    /**
-     * Called when a discovery (publish or subscribe) operation results in a
-     * service discovery. Called when a Subscribe service was configured with a range requirement
-     * {@link SubscribeConfig.Builder#setMinDistanceMm(int)} and/or
-     * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} and the Publish service was configured
-     * with {@link PublishConfig.Builder#setRangingEnabled(boolean)}.
-     * <p>
-     * If either Publisher or Subscriber does not enable Ranging, or if Ranging is temporarily
-     * disabled by the underlying device, service discovery proceeds without ranging and the
-     * {@link #onServiceDiscovered(PeerHandle, byte[], List)} is called.
-     * <p>
-     * Note that this method and {@link #onServiceDiscovered(PeerHandle, byte[], List)} may be
-     * called multiple times per service discovery.
-     *
-     * @param peerHandle An opaque handle to the peer matching our discovery operation.
-     * @param serviceSpecificInfo The service specific information (arbitrary
-     *            byte array) provided by the peer as part of its discovery
-     *            configuration.
-     * @param matchFilter The filter which resulted in this service discovery. For
-     * {@link PublishConfig#PUBLISH_TYPE_UNSOLICITED},
-     * {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE} discovery sessions this is the publisher's
-     *                    match filter. For {@link PublishConfig#PUBLISH_TYPE_SOLICITED},
-     *                    {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE} discovery sessions this
-     *                    is the subscriber's match filter.
-     * @param distanceMm The measured distance to the Publisher in mm. Note: the measured distance
-     *                   may be negative for very close devices.
-     */
-    public void onServiceDiscoveredWithinRange(PeerHandle peerHandle,
-        byte[] serviceSpecificInfo, List<byte[]> matchFilter, int distanceMm) {
-        /* empty */
-    }
-
-    /**
-     * Called in response to
-     * {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])}
-     * when a message is transmitted successfully - i.e. when it was received successfully by the
-     * peer (corresponds to an ACK being received).
-     * <p>
-     * Note that either this callback or
-     * {@link DiscoverySessionCallback#onMessageSendFailed(int)} will be
-     * received - never both.
-     *
-     * @param messageId The arbitrary message ID specified when sending the message.
-     */
-    public void onMessageSendSucceeded(@SuppressWarnings("unused") int messageId) {
-        /* empty */
-    }
-
-    /**
-     * Called when message transmission initiated with
-     * {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])} fails. E.g. when no ACK is
-     * received from the peer.
-     * <p>
-     * Note that either this callback or
-     * {@link DiscoverySessionCallback#onMessageSendSucceeded(int)} will be received
-     * - never both.
-     *
-     * @param messageId The arbitrary message ID specified when sending the message.
-     */
-    public void onMessageSendFailed(@SuppressWarnings("unused") int messageId) {
-        /* empty */
-    }
-
-    /**
-     * Called when a message is received from a discovery session peer - in response to the
-     * peer's {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])}.
-     *
-     * @param peerHandle An opaque handle to the peer matching our discovery operation.
-     * @param message A byte array containing the message.
-     */
-    public void onMessageReceived(PeerHandle peerHandle, byte[] message) {
-        /* empty */
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl
deleted file mode 100644
index 421a8af..0000000
--- a/wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-/**
- * Callback interface that WifiAwareManager implements
- *
- * {@hide}
- */
-oneway interface IWifiAwareDiscoverySessionCallback
-{
-    void onSessionStarted(int discoverySessionId);
-    void onSessionConfigSuccess();
-    void onSessionConfigFail(int reason);
-    void onSessionTerminated(int reason);
-
-    void onMatch(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter);
-    void onMatchWithDistance(int peerId, in byte[] serviceSpecificInfo, in byte[] matchFilter,
-            int distanceMm);
-
-    void onMessageSendSuccess(int messageId);
-    void onMessageSendFail(int messageId, int reason);
-    void onMessageReceived(int peerId, in byte[] message);
-}
diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl
deleted file mode 100644
index b646567..0000000
--- a/wifi/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.net.wifi.aware.ConfigRequest;
-
-/**
- * Callback interface that WifiAwareManager implements
- *
- * {@hide}
- */
-oneway interface IWifiAwareEventCallback
-{
-    void onConnectSuccess(int clientId);
-    void onConnectFail(int reason);
-    void onIdentityChanged(in byte[] mac);
-}
diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl
deleted file mode 100644
index 0e7289c..0000000
--- a/wifi/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl
+++ /dev/null
@@ -1,27 +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.net.wifi.aware;
-
-/**
- * Callback for IWifiAwareManager.getMacAddressFromPeerHandle
- *
- * @hide
- */
-oneway interface IWifiAwareMacAddressProvider
-{
-    void macAddress(in Map peerIdToMacMap);
-}
diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl
deleted file mode 100644
index 88f95ad..0000000
--- a/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.app.PendingIntent;
-
-import android.net.wifi.aware.ConfigRequest;
-import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
-import android.net.wifi.aware.IWifiAwareEventCallback;
-import android.net.wifi.aware.IWifiAwareMacAddressProvider;
-import android.net.wifi.aware.PublishConfig;
-import android.net.wifi.aware.SubscribeConfig;
-import android.net.wifi.aware.Characteristics;
-
-/**
- * Interface that WifiAwareService implements
- *
- * {@hide}
- */
-interface IWifiAwareManager
-{
-    // Aware API
-    boolean isUsageEnabled();
-    Characteristics getCharacteristics();
-
-    // client API
-    void connect(in IBinder binder, in String callingPackage, in String callingFeatureId,
-            in IWifiAwareEventCallback callback, in ConfigRequest configRequest,
-            boolean notifyOnIdentityChanged);
-    void disconnect(int clientId, in IBinder binder);
-
-    void publish(in String callingPackage, in String callingFeatureId, int clientId,
-            in PublishConfig publishConfig, in IWifiAwareDiscoverySessionCallback callback);
-    void subscribe(in String callingPackage, in String callingFeatureId, int clientId,
-            in SubscribeConfig subscribeConfig, in IWifiAwareDiscoverySessionCallback callback);
-
-    // session API
-    void updatePublish(int clientId, int discoverySessionId, in PublishConfig publishConfig);
-    void updateSubscribe(int clientId, int discoverySessionId, in SubscribeConfig subscribeConfig);
-    void sendMessage(int clientId, int discoverySessionId, int peerId, in byte[] message,
-        int messageId, int retryCount);
-    void terminateSession(int clientId, int discoverySessionId);
-
-    // internal APIs: intended to be used between System Services (restricted permissions)
-    void requestMacAddresses(int uid, in List peerIds, in IWifiAwareMacAddressProvider callback);
-}
diff --git a/wifi/java/android/net/wifi/aware/IdentityChangedListener.java b/wifi/java/android/net/wifi/aware/IdentityChangedListener.java
deleted file mode 100644
index a8b19b3..0000000
--- a/wifi/java/android/net/wifi/aware/IdentityChangedListener.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-/**
- * Base class for a listener which is called with the MAC address of the Aware interface whenever
- * it is changed. Change may be due to device joining a cluster, starting a cluster, or discovery
- * interface change (addresses are randomized at regular intervals). The implication is that
- * peers you've been communicating with may no longer recognize you and you need to re-establish
- * your identity - e.g. by starting a discovery session. This actual MAC address of the
- * interface may also be useful if the application uses alternative (non-Aware) discovery but needs
- * to set up a Aware connection. The provided Aware discovery interface MAC address can then be used
- * in {@link WifiAwareSession#createNetworkSpecifierOpen(int, byte[])} or
- * {@link WifiAwareSession#createNetworkSpecifierPassphrase(int, byte[], String)}.
- */
-public class IdentityChangedListener {
-    /**
-     * @param mac The MAC address of the Aware discovery interface. The application must have the
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} to get the actual MAC address,
-     *            otherwise all 0's will be provided.
-     */
-    public void onIdentityChanged(byte[] mac) {
-        /* empty */
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/ParcelablePeerHandle.java b/wifi/java/android/net/wifi/aware/ParcelablePeerHandle.java
deleted file mode 100644
index ca473db..0000000
--- a/wifi/java/android/net/wifi/aware/ParcelablePeerHandle.java
+++ /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.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-/**
- * A Parcelable {@link PeerHandle}. Can be constructed from a {@code PeerHandle} and then passed
- * to any of the APIs which take a {@code PeerHandle} as inputs.
- */
-public final class ParcelablePeerHandle extends PeerHandle implements Parcelable {
-    /**
-     * Construct a parcelable version of {@link PeerHandle}.
-     *
-     * @param peerHandle The {@link PeerHandle} to be made parcelable.
-     */
-    public ParcelablePeerHandle(@NonNull PeerHandle peerHandle) {
-        super(peerHandle.peerId);
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(peerId);
-    }
-
-    public static final @android.annotation.NonNull Creator<ParcelablePeerHandle> CREATOR =
-            new Creator<ParcelablePeerHandle>() {
-                @Override
-                public ParcelablePeerHandle[] newArray(int size) {
-                    return new ParcelablePeerHandle[size];
-                }
-
-                @Override
-                public ParcelablePeerHandle createFromParcel(Parcel in) {
-                    int peerHandle = in.readInt();
-                    return new ParcelablePeerHandle(new PeerHandle(peerHandle));
-                }
-            };
-}
diff --git a/wifi/java/android/net/wifi/aware/PeerHandle.java b/wifi/java/android/net/wifi/aware/PeerHandle.java
deleted file mode 100644
index 422e177..0000000
--- a/wifi/java/android/net/wifi/aware/PeerHandle.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-/**
- * Opaque object used to represent a Wi-Fi Aware peer. Obtained from discovery sessions in
- * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], java.util.List)} or
- * received messages in {@link DiscoverySessionCallback#onMessageReceived(PeerHandle, byte[])}, and
- * used when sending messages e,g, {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])},
- * or when configuring a network link to a peer, e.g.
- * {@link DiscoverySession#createNetworkSpecifierOpen(PeerHandle)} or
- * {@link DiscoverySession#createNetworkSpecifierPassphrase(PeerHandle, String)}.
- * <p>
- * Note that while a {@code PeerHandle} can be used to track a particular peer (i.e. you can compare
- * the values received from subsequent messages) - it is good practice not to rely on it. Instead
- * use an application level peer identifier encoded in the message,
- * {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])}, and/or in the Publish
- * configuration's service-specific information field,
- * {@link PublishConfig.Builder#setServiceSpecificInfo(byte[])}, or match filter,
- * {@link PublishConfig.Builder#setMatchFilter(java.util.List)}.
- * <p>A parcelable handle object is available with {@link ParcelablePeerHandle}.
- */
-public class PeerHandle {
-    /** @hide */
-    public PeerHandle(int peerId) {
-        this.peerId = peerId;
-    }
-
-    /** @hide */
-    public int peerId;
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof PeerHandle)) {
-            return false;
-        }
-
-        return peerId == ((PeerHandle) o).peerId;
-    }
-
-    @Override
-    public int hashCode() {
-        return peerId;
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/PublishConfig.java b/wifi/java/android/net/wifi/aware/PublishConfig.java
deleted file mode 100644
index a8844c1..0000000
--- a/wifi/java/android/net/wifi/aware/PublishConfig.java
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.wifi.util.HexEncoding;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Defines the configuration of a Aware publish session. Built using
- * {@link PublishConfig.Builder}. A publish session is created using
- * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
- * android.os.Handler)} or updated using
- * {@link PublishDiscoverySession#updatePublish(PublishConfig)}.
- */
-public final class PublishConfig implements Parcelable {
-    /** @hide */
-    @IntDef({
-            PUBLISH_TYPE_UNSOLICITED, PUBLISH_TYPE_SOLICITED })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface PublishTypes {
-    }
-
-    /**
-     * Defines an unsolicited publish session - a publish session where the publisher is
-     * advertising itself by broadcasting on-the-air. An unsolicited publish session is paired
-     * with an passive subscribe session {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE}.
-     * Configuration is done using {@link PublishConfig.Builder#setPublishType(int)}.
-     */
-    public static final int PUBLISH_TYPE_UNSOLICITED = 0;
-
-    /**
-     * Defines a solicited publish session - a publish session which is silent, waiting for a
-     * matching active subscribe session - and responding to it in unicast. A
-     * solicited publish session is paired with an active subscribe session
-     * {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE}. Configuration is done using
-     * {@link PublishConfig.Builder#setPublishType(int)}.
-     */
-    public static final int PUBLISH_TYPE_SOLICITED = 1;
-
-    /** @hide */
-    public final byte[] mServiceName;
-
-    /** @hide */
-    public final byte[] mServiceSpecificInfo;
-
-    /** @hide */
-    public final byte[] mMatchFilter;
-
-    /** @hide */
-    public final int mPublishType;
-
-    /** @hide */
-    public final int mTtlSec;
-
-    /** @hide */
-    public final boolean mEnableTerminateNotification;
-
-    /** @hide */
-    public final boolean mEnableRanging;
-
-    /** @hide */
-    public PublishConfig(byte[] serviceName, byte[] serviceSpecificInfo, byte[] matchFilter,
-            int publishType, int ttlSec, boolean enableTerminateNotification,
-            boolean enableRanging) {
-        mServiceName = serviceName;
-        mServiceSpecificInfo = serviceSpecificInfo;
-        mMatchFilter = matchFilter;
-        mPublishType = publishType;
-        mTtlSec = ttlSec;
-        mEnableTerminateNotification = enableTerminateNotification;
-        mEnableRanging = enableRanging;
-    }
-
-    @Override
-    public String toString() {
-        return "PublishConfig [mServiceName='" + (mServiceName == null ? "<null>" : String.valueOf(
-                HexEncoding.encode(mServiceName))) + ", mServiceName.length=" + (
-                mServiceName == null ? 0 : mServiceName.length) + ", mServiceSpecificInfo='" + (
-                (mServiceSpecificInfo == null) ? "<null>" : String.valueOf(
-                        HexEncoding.encode(mServiceSpecificInfo)))
-                + ", mServiceSpecificInfo.length=" + (mServiceSpecificInfo == null ? 0
-                : mServiceSpecificInfo.length) + ", mMatchFilter="
-                + (new TlvBufferUtils.TlvIterable(0, 1, mMatchFilter)).toString()
-                + ", mMatchFilter.length=" + (mMatchFilter == null ? 0 : mMatchFilter.length)
-                + ", mPublishType=" + mPublishType + ", mTtlSec=" + mTtlSec
-                + ", mEnableTerminateNotification=" + mEnableTerminateNotification
-                + ", mEnableRanging=" + mEnableRanging + "]";
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeByteArray(mServiceName);
-        dest.writeByteArray(mServiceSpecificInfo);
-        dest.writeByteArray(mMatchFilter);
-        dest.writeInt(mPublishType);
-        dest.writeInt(mTtlSec);
-        dest.writeInt(mEnableTerminateNotification ? 1 : 0);
-        dest.writeInt(mEnableRanging ? 1 : 0);
-    }
-
-    public static final @android.annotation.NonNull Creator<PublishConfig> CREATOR = new Creator<PublishConfig>() {
-        @Override
-        public PublishConfig[] newArray(int size) {
-            return new PublishConfig[size];
-        }
-
-        @Override
-        public PublishConfig createFromParcel(Parcel in) {
-            byte[] serviceName = in.createByteArray();
-            byte[] ssi = in.createByteArray();
-            byte[] matchFilter = in.createByteArray();
-            int publishType = in.readInt();
-            int ttlSec = in.readInt();
-            boolean enableTerminateNotification = in.readInt() != 0;
-            boolean enableRanging = in.readInt() != 0;
-
-            return new PublishConfig(serviceName, ssi, matchFilter, publishType,
-                    ttlSec, enableTerminateNotification, enableRanging);
-        }
-    };
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof PublishConfig)) {
-            return false;
-        }
-
-        PublishConfig lhs = (PublishConfig) o;
-
-        return Arrays.equals(mServiceName, lhs.mServiceName) && Arrays.equals(mServiceSpecificInfo,
-                lhs.mServiceSpecificInfo) && Arrays.equals(mMatchFilter, lhs.mMatchFilter)
-                && mPublishType == lhs.mPublishType
-                && mTtlSec == lhs.mTtlSec
-                && mEnableTerminateNotification == lhs.mEnableTerminateNotification
-                && mEnableRanging == lhs.mEnableRanging;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(Arrays.hashCode(mServiceName), Arrays.hashCode(mServiceSpecificInfo),
-                Arrays.hashCode(mMatchFilter), mPublishType, mTtlSec, mEnableTerminateNotification,
-                mEnableRanging);
-    }
-
-    /**
-     * Verifies that the contents of the PublishConfig are valid. Otherwise
-     * throws an IllegalArgumentException.
-     *
-     * @hide
-     */
-    public void assertValid(Characteristics characteristics, boolean rttSupported)
-            throws IllegalArgumentException {
-        WifiAwareUtils.validateServiceName(mServiceName);
-
-        if (!TlvBufferUtils.isValid(mMatchFilter, 0, 1)) {
-            throw new IllegalArgumentException(
-                    "Invalid txFilter configuration - LV fields do not match up to length");
-        }
-        if (mPublishType < PUBLISH_TYPE_UNSOLICITED || mPublishType > PUBLISH_TYPE_SOLICITED) {
-            throw new IllegalArgumentException("Invalid publishType - " + mPublishType);
-        }
-        if (mTtlSec < 0) {
-            throw new IllegalArgumentException("Invalid ttlSec - must be non-negative");
-        }
-
-        if (characteristics != null) {
-            int maxServiceNameLength = characteristics.getMaxServiceNameLength();
-            if (maxServiceNameLength != 0 && mServiceName.length > maxServiceNameLength) {
-                throw new IllegalArgumentException(
-                        "Service name longer than supported by device characteristics");
-            }
-            int maxServiceSpecificInfoLength = characteristics.getMaxServiceSpecificInfoLength();
-            if (maxServiceSpecificInfoLength != 0 && mServiceSpecificInfo != null
-                    && mServiceSpecificInfo.length > maxServiceSpecificInfoLength) {
-                throw new IllegalArgumentException(
-                        "Service specific info longer than supported by device characteristics");
-            }
-            int maxMatchFilterLength = characteristics.getMaxMatchFilterLength();
-            if (maxMatchFilterLength != 0 && mMatchFilter != null
-                    && mMatchFilter.length > maxMatchFilterLength) {
-                throw new IllegalArgumentException(
-                        "Match filter longer than supported by device characteristics");
-            }
-        }
-
-        if (!rttSupported && mEnableRanging) {
-            throw new IllegalArgumentException("Ranging is not supported");
-        }
-    }
-
-    /**
-     * Builder used to build {@link PublishConfig} objects.
-     */
-    public static final class Builder {
-        private byte[] mServiceName;
-        private byte[] mServiceSpecificInfo;
-        private byte[] mMatchFilter;
-        private int mPublishType = PUBLISH_TYPE_UNSOLICITED;
-        private int mTtlSec = 0;
-        private boolean mEnableTerminateNotification = true;
-        private boolean mEnableRanging = false;
-
-        /**
-         * Specify the service name of the publish session. The actual on-air
-         * value is a 6 byte hashed representation of this string.
-         * <p>
-         * The Service Name is a UTF-8 encoded string from 1 to 255 bytes in length.
-         * The only acceptable single-byte UTF-8 symbols for a Service Name are alphanumeric
-         * values (A-Z, a-z, 0-9), the hyphen ('-'), and the period ('.'). All valid multi-byte
-         * UTF-8 characters are acceptable in a Service Name.
-         * <p>
-         * Must be called - an empty ServiceName is not valid.
-         *
-         * @param serviceName The service name for the publish session.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setServiceName(@NonNull String serviceName) {
-            if (serviceName == null) {
-                throw new IllegalArgumentException("Invalid service name - must be non-null");
-            }
-            mServiceName = serviceName.getBytes(StandardCharsets.UTF_8);
-            return this;
-        }
-
-        /**
-         * Specify service specific information for the publish session. This is
-         * a free-form byte array available to the application to send
-         * additional information as part of the discovery operation - it
-         * will not be used to determine whether a publish/subscribe match
-         * occurs.
-         * <p>
-         *     Optional. Empty by default.
-         *
-         * @param serviceSpecificInfo A byte-array for the service-specific
-         *            information field.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setServiceSpecificInfo(@Nullable byte[] serviceSpecificInfo) {
-            mServiceSpecificInfo = serviceSpecificInfo;
-            return this;
-        }
-
-        /**
-         * The match filter for a publish session. Used to determine whether a service
-         * discovery occurred - in addition to relying on the service name.
-         * <p>
-         *     Optional. Empty by default.
-         *
-         * @param matchFilter A list of match filter entries (each of which is an arbitrary byte
-         *                    array).
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setMatchFilter(@Nullable List<byte[]> matchFilter) {
-            mMatchFilter = new TlvBufferUtils.TlvConstructor(0, 1).allocateAndPut(
-                    matchFilter).getArray();
-            return this;
-        }
-
-        /**
-         * Specify the type of the publish session: solicited (aka active - publish
-         * packets are transmitted over-the-air), or unsolicited (aka passive -
-         * no publish packets are transmitted, a match is made against an active
-         * subscribe session whose packets are transmitted over-the-air).
-         *
-         * @param publishType Publish session type:
-         *            {@link PublishConfig#PUBLISH_TYPE_SOLICITED} or
-         *            {@link PublishConfig#PUBLISH_TYPE_UNSOLICITED} (the default).
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setPublishType(@PublishTypes int publishType) {
-            if (publishType < PUBLISH_TYPE_UNSOLICITED || publishType > PUBLISH_TYPE_SOLICITED) {
-                throw new IllegalArgumentException("Invalid publishType - " + publishType);
-            }
-            mPublishType = publishType;
-            return this;
-        }
-
-        /**
-         * Sets the time interval (in seconds) an unsolicited (
-         * {@link PublishConfig.Builder#setPublishType(int)}) publish session
-         * will be alive - broadcasting a packet. When the TTL is reached
-         * an event will be generated for
-         * {@link DiscoverySessionCallback#onSessionTerminated()} [unless
-         * {@link #setTerminateNotificationEnabled(boolean)} disables the callback].
-         * <p>
-         *     Optional. 0 by default - indicating the session doesn't terminate on its own.
-         *     Session will be terminated when {@link DiscoverySession#close()} is
-         *     called.
-         *
-         * @param ttlSec Lifetime of a publish session in seconds.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setTtlSec(int ttlSec) {
-            if (ttlSec < 0) {
-                throw new IllegalArgumentException("Invalid ttlSec - must be non-negative");
-            }
-            mTtlSec = ttlSec;
-            return this;
-        }
-
-        /**
-         * Configure whether a publish terminate notification
-         * {@link DiscoverySessionCallback#onSessionTerminated()} is reported
-         * back to the callback.
-         *
-         * @param enable If true the terminate callback will be called when the
-         *            publish is terminated. Otherwise it will not be called.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setTerminateNotificationEnabled(boolean enable) {
-            mEnableTerminateNotification = enable;
-            return this;
-        }
-
-        /**
-         * Configure whether the publish discovery session supports ranging and allows peers to
-         * measure distance to it. This API is used in conjunction with
-         * {@link SubscribeConfig.Builder#setMinDistanceMm(int)} and
-         * {@link SubscribeConfig.Builder#setMaxDistanceMm(int)} to specify a minimum and/or
-         * maximum distance at which discovery will be triggered.
-         * <p>
-         * Optional. Disabled by default - i.e. any peer attempt to measure distance to this device
-         * will be refused and discovery will proceed without ranging constraints.
-         * <p>
-         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
-         * as described in {@link android.net.wifi.rtt}.
-         *
-         * @param enable If true, ranging is supported on request of the peer.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setRangingEnabled(boolean enable) {
-            mEnableRanging = enable;
-            return this;
-        }
-
-        /**
-         * Build {@link PublishConfig} given the current requests made on the
-         * builder.
-         */
-        public PublishConfig build() {
-            return new PublishConfig(mServiceName, mServiceSpecificInfo, mMatchFilter, mPublishType,
-                    mTtlSec, mEnableTerminateNotification, mEnableRanging);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java b/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java
deleted file mode 100644
index 1c99c87..0000000
--- a/wifi/java/android/net/wifi/aware/PublishDiscoverySession.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.util.Log;
-
-/**
- * A class representing a Aware publish session. Created when
- * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback,
- * android.os.Handler)} is called and a discovery session is created and returned in
- * {@link DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)}. See
- * baseline functionality of all discovery sessions in {@link DiscoverySession}. This
- * object allows updating an existing/running publish discovery session using
- * {@link #updatePublish(PublishConfig)}.
- */
-public class PublishDiscoverySession extends DiscoverySession {
-    private static final String TAG = "PublishDiscoverySession";
-
-    /** @hide */
-    public PublishDiscoverySession(WifiAwareManager manager, int clientId, int sessionId) {
-        super(manager, clientId, sessionId);
-    }
-
-    /**
-     * Re-configure the currently active publish session. The
-     * {@link DiscoverySessionCallback} is not replaced - the same listener used
-     * at creation is still used. The results of the configuration are returned using
-     * {@link DiscoverySessionCallback}:
-     * <ul>
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigUpdated()}: configuration
-     *     update succeeded.
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigFailed()}: configuration
-     *     update failed. The publish discovery session is still running using its previous
-     *     configuration (i.e. update failure does not terminate the session).
-     * </ul>
-     *
-     * @param publishConfig The new discovery publish session configuration ({@link PublishConfig}).
-     */
-    public void updatePublish(@NonNull PublishConfig publishConfig) {
-        if (mTerminated) {
-            Log.w(TAG, "updatePublish: called on terminated session");
-            return;
-        } else {
-            WifiAwareManager mgr = mMgr.get();
-            if (mgr == null) {
-                Log.w(TAG, "updatePublish: called post GC on WifiAwareManager");
-                return;
-            }
-
-            mgr.updatePublish(mClientId, mSessionId, publishConfig);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/SubscribeConfig.java b/wifi/java/android/net/wifi/aware/SubscribeConfig.java
deleted file mode 100644
index 76780f4..0000000
--- a/wifi/java/android/net/wifi/aware/SubscribeConfig.java
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.net.wifi.util.HexEncoding;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Defines the configuration of a Aware subscribe session. Built using
- * {@link SubscribeConfig.Builder}. Subscribe is done using
- * {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
- * android.os.Handler)} or
- * {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}.
- */
-public final class SubscribeConfig implements Parcelable {
-    /** @hide */
-    @IntDef({
-            SUBSCRIBE_TYPE_PASSIVE, SUBSCRIBE_TYPE_ACTIVE })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface SubscribeTypes {
-    }
-
-    /**
-     * Defines a passive subscribe session - a subscribe session where
-     * subscribe packets are not transmitted over-the-air and the device listens
-     * and matches to transmitted publish packets. Configuration is done using
-     * {@link SubscribeConfig.Builder#setSubscribeType(int)}.
-     */
-    public static final int SUBSCRIBE_TYPE_PASSIVE = 0;
-
-    /**
-     * Defines an active subscribe session - a subscribe session where
-     * subscribe packets are transmitted over-the-air. Configuration is done
-     * using {@link SubscribeConfig.Builder#setSubscribeType(int)}.
-     */
-    public static final int SUBSCRIBE_TYPE_ACTIVE = 1;
-
-    /** @hide */
-    public final byte[] mServiceName;
-
-    /** @hide */
-    public final byte[] mServiceSpecificInfo;
-
-    /** @hide */
-    public final byte[] mMatchFilter;
-
-    /** @hide */
-    public final int mSubscribeType;
-
-    /** @hide */
-    public final int mTtlSec;
-
-    /** @hide */
-    public final boolean mEnableTerminateNotification;
-
-    /** @hide */
-    public final boolean mMinDistanceMmSet;
-
-    /** @hide */
-    public final int mMinDistanceMm;
-
-    /** @hide */
-    public final boolean mMaxDistanceMmSet;
-
-    /** @hide */
-    public final int mMaxDistanceMm;
-
-    /** @hide */
-    public SubscribeConfig(byte[] serviceName, byte[] serviceSpecificInfo, byte[] matchFilter,
-            int subscribeType, int ttlSec, boolean enableTerminateNotification,
-            boolean minDistanceMmSet, int minDistanceMm, boolean maxDistanceMmSet,
-            int maxDistanceMm) {
-        mServiceName = serviceName;
-        mServiceSpecificInfo = serviceSpecificInfo;
-        mMatchFilter = matchFilter;
-        mSubscribeType = subscribeType;
-        mTtlSec = ttlSec;
-        mEnableTerminateNotification = enableTerminateNotification;
-        mMinDistanceMm = minDistanceMm;
-        mMinDistanceMmSet = minDistanceMmSet;
-        mMaxDistanceMm = maxDistanceMm;
-        mMaxDistanceMmSet = maxDistanceMmSet;
-    }
-
-    @Override
-    public String toString() {
-        return "SubscribeConfig [mServiceName='" + (mServiceName == null ? "<null>"
-                : String.valueOf(HexEncoding.encode(mServiceName))) + ", mServiceName.length=" + (
-                mServiceName == null ? 0 : mServiceName.length) + ", mServiceSpecificInfo='" + (
-                (mServiceSpecificInfo == null) ? "<null>" : String.valueOf(
-                        HexEncoding.encode(mServiceSpecificInfo)))
-                + ", mServiceSpecificInfo.length=" + (mServiceSpecificInfo == null ? 0
-                : mServiceSpecificInfo.length) + ", mMatchFilter="
-                + (new TlvBufferUtils.TlvIterable(0, 1, mMatchFilter)).toString()
-                + ", mMatchFilter.length=" + (mMatchFilter == null ? 0 : mMatchFilter.length)
-                + ", mSubscribeType=" + mSubscribeType + ", mTtlSec=" + mTtlSec
-                + ", mEnableTerminateNotification=" + mEnableTerminateNotification
-                + ", mMinDistanceMm=" + mMinDistanceMm
-                + ", mMinDistanceMmSet=" + mMinDistanceMmSet
-                + ", mMaxDistanceMm=" + mMaxDistanceMm
-                + ", mMaxDistanceMmSet=" + mMaxDistanceMmSet + "]";
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeByteArray(mServiceName);
-        dest.writeByteArray(mServiceSpecificInfo);
-        dest.writeByteArray(mMatchFilter);
-        dest.writeInt(mSubscribeType);
-        dest.writeInt(mTtlSec);
-        dest.writeInt(mEnableTerminateNotification ? 1 : 0);
-        dest.writeInt(mMinDistanceMm);
-        dest.writeInt(mMinDistanceMmSet ? 1 : 0);
-        dest.writeInt(mMaxDistanceMm);
-        dest.writeInt(mMaxDistanceMmSet ? 1 : 0);
-    }
-
-    public static final @android.annotation.NonNull Creator<SubscribeConfig> CREATOR = new Creator<SubscribeConfig>() {
-        @Override
-        public SubscribeConfig[] newArray(int size) {
-            return new SubscribeConfig[size];
-        }
-
-        @Override
-        public SubscribeConfig createFromParcel(Parcel in) {
-            byte[] serviceName = in.createByteArray();
-            byte[] ssi = in.createByteArray();
-            byte[] matchFilter = in.createByteArray();
-            int subscribeType = in.readInt();
-            int ttlSec = in.readInt();
-            boolean enableTerminateNotification = in.readInt() != 0;
-            int minDistanceMm = in.readInt();
-            boolean minDistanceMmSet = in.readInt() != 0;
-            int maxDistanceMm = in.readInt();
-            boolean maxDistanceMmSet = in.readInt() != 0;
-
-            return new SubscribeConfig(serviceName, ssi, matchFilter, subscribeType, ttlSec,
-                    enableTerminateNotification, minDistanceMmSet, minDistanceMm, maxDistanceMmSet,
-                    maxDistanceMm);
-        }
-    };
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof SubscribeConfig)) {
-            return false;
-        }
-
-        SubscribeConfig lhs = (SubscribeConfig) o;
-
-        if (!(Arrays.equals(mServiceName, lhs.mServiceName) && Arrays.equals(
-                mServiceSpecificInfo, lhs.mServiceSpecificInfo) && Arrays.equals(mMatchFilter,
-                lhs.mMatchFilter) && mSubscribeType == lhs.mSubscribeType && mTtlSec == lhs.mTtlSec
-                && mEnableTerminateNotification == lhs.mEnableTerminateNotification
-                && mMinDistanceMmSet == lhs.mMinDistanceMmSet
-                && mMaxDistanceMmSet == lhs.mMaxDistanceMmSet)) {
-            return false;
-        }
-
-        if (mMinDistanceMmSet && mMinDistanceMm != lhs.mMinDistanceMm) {
-            return false;
-        }
-
-        if (mMaxDistanceMmSet && mMaxDistanceMm != lhs.mMaxDistanceMm) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        int result = Objects.hash(Arrays.hashCode(mServiceName),
-                Arrays.hashCode(mServiceSpecificInfo), Arrays.hashCode(mMatchFilter),
-                mSubscribeType, mTtlSec, mEnableTerminateNotification, mMinDistanceMmSet,
-                mMaxDistanceMmSet);
-
-        if (mMinDistanceMmSet) {
-            result = Objects.hash(result, mMinDistanceMm);
-        }
-        if (mMaxDistanceMmSet) {
-            result = Objects.hash(result, mMaxDistanceMm);
-        }
-
-        return result;
-    }
-
-    /**
-     * Verifies that the contents of the SubscribeConfig are valid. Otherwise
-     * throws an IllegalArgumentException.
-     *
-     * @hide
-     */
-    public void assertValid(Characteristics characteristics, boolean rttSupported)
-            throws IllegalArgumentException {
-        WifiAwareUtils.validateServiceName(mServiceName);
-
-        if (!TlvBufferUtils.isValid(mMatchFilter, 0, 1)) {
-            throw new IllegalArgumentException(
-                    "Invalid matchFilter configuration - LV fields do not match up to length");
-        }
-        if (mSubscribeType < SUBSCRIBE_TYPE_PASSIVE || mSubscribeType > SUBSCRIBE_TYPE_ACTIVE) {
-            throw new IllegalArgumentException("Invalid subscribeType - " + mSubscribeType);
-        }
-        if (mTtlSec < 0) {
-            throw new IllegalArgumentException("Invalid ttlSec - must be non-negative");
-        }
-
-        if (characteristics != null) {
-            int maxServiceNameLength = characteristics.getMaxServiceNameLength();
-            if (maxServiceNameLength != 0 && mServiceName.length > maxServiceNameLength) {
-                throw new IllegalArgumentException(
-                        "Service name longer than supported by device characteristics");
-            }
-            int maxServiceSpecificInfoLength = characteristics.getMaxServiceSpecificInfoLength();
-            if (maxServiceSpecificInfoLength != 0 && mServiceSpecificInfo != null
-                    && mServiceSpecificInfo.length > maxServiceSpecificInfoLength) {
-                throw new IllegalArgumentException(
-                        "Service specific info longer than supported by device characteristics");
-            }
-            int maxMatchFilterLength = characteristics.getMaxMatchFilterLength();
-            if (maxMatchFilterLength != 0 && mMatchFilter != null
-                    && mMatchFilter.length > maxMatchFilterLength) {
-                throw new IllegalArgumentException(
-                        "Match filter longer than supported by device characteristics");
-            }
-        }
-
-        if (mMinDistanceMmSet && mMinDistanceMm < 0) {
-            throw new IllegalArgumentException("Minimum distance must be non-negative");
-        }
-        if (mMaxDistanceMmSet && mMaxDistanceMm < 0) {
-            throw new IllegalArgumentException("Maximum distance must be non-negative");
-        }
-        if (mMinDistanceMmSet && mMaxDistanceMmSet && mMaxDistanceMm <= mMinDistanceMm) {
-            throw new IllegalArgumentException(
-                    "Maximum distance must be greater than minimum distance");
-        }
-
-        if (!rttSupported && (mMinDistanceMmSet || mMaxDistanceMmSet)) {
-            throw new IllegalArgumentException("Ranging is not supported");
-        }
-    }
-
-    /**
-     * Builder used to build {@link SubscribeConfig} objects.
-     */
-    public static final class Builder {
-        private byte[] mServiceName;
-        private byte[] mServiceSpecificInfo;
-        private byte[] mMatchFilter;
-        private int mSubscribeType = SUBSCRIBE_TYPE_PASSIVE;
-        private int mTtlSec = 0;
-        private boolean mEnableTerminateNotification = true;
-        private boolean mMinDistanceMmSet = false;
-        private int mMinDistanceMm;
-        private boolean mMaxDistanceMmSet = false;
-        private int mMaxDistanceMm;
-
-        /**
-         * Specify the service name of the subscribe session. The actual on-air
-         * value is a 6 byte hashed representation of this string.
-         * <p>
-         * The Service Name is a UTF-8 encoded string from 1 to 255 bytes in length.
-         * The only acceptable single-byte UTF-8 symbols for a Service Name are alphanumeric
-         * values (A-Z, a-z, 0-9), the hyphen ('-'), and the period ('.'). All valid multi-byte
-         * UTF-8 characters are acceptable in a Service Name.
-         * <p>
-         * Must be called - an empty ServiceName is not valid.
-         *
-         * @param serviceName The service name for the subscribe session.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setServiceName(@NonNull String serviceName) {
-            if (serviceName == null) {
-                throw new IllegalArgumentException("Invalid service name - must be non-null");
-            }
-            mServiceName = serviceName.getBytes(StandardCharsets.UTF_8);
-            return this;
-        }
-
-        /**
-         * Specify service specific information for the subscribe session. This is
-         * a free-form byte array available to the application to send
-         * additional information as part of the discovery operation - i.e. it
-         * will not be used to determine whether a publish/subscribe match
-         * occurs.
-         * <p>
-         *     Optional. Empty by default.
-         *
-         * @param serviceSpecificInfo A byte-array for the service-specific
-         *            information field.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setServiceSpecificInfo(@Nullable byte[] serviceSpecificInfo) {
-            mServiceSpecificInfo = serviceSpecificInfo;
-            return this;
-        }
-
-        /**
-         * The match filter for a subscribe session. Used to determine whether a service
-         * discovery occurred - in addition to relying on the service name.
-         * <p>
-         *     Optional. Empty by default.
-         *
-         * @param matchFilter A list of match filter entries (each of which is an arbitrary byte
-         *                    array).
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setMatchFilter(@Nullable List<byte[]> matchFilter) {
-            mMatchFilter = new TlvBufferUtils.TlvConstructor(0, 1).allocateAndPut(
-                    matchFilter).getArray();
-            return this;
-        }
-
-        /**
-         * Sets the type of the subscribe session: active (subscribe packets are
-         * transmitted over-the-air), or passive (no subscribe packets are
-         * transmitted, a match is made against a solicited/active publish
-         * session whose packets are transmitted over-the-air).
-         *
-         * @param subscribeType Subscribe session type:
-         *            {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE} or
-         *            {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE}.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setSubscribeType(@SubscribeTypes int subscribeType) {
-            if (subscribeType < SUBSCRIBE_TYPE_PASSIVE || subscribeType > SUBSCRIBE_TYPE_ACTIVE) {
-                throw new IllegalArgumentException("Invalid subscribeType - " + subscribeType);
-            }
-            mSubscribeType = subscribeType;
-            return this;
-        }
-
-        /**
-         * Sets the time interval (in seconds) an active (
-         * {@link SubscribeConfig.Builder#setSubscribeType(int)}) subscribe session
-         * will be alive - i.e. broadcasting a packet. When the TTL is reached
-         * an event will be generated for
-         * {@link DiscoverySessionCallback#onSessionTerminated()}.
-         * <p>
-         *     Optional. 0 by default - indicating the session doesn't terminate on its own.
-         *     Session will be terminated when {@link DiscoverySession#close()} is
-         *     called.
-         *
-         * @param ttlSec Lifetime of a subscribe session in seconds.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setTtlSec(int ttlSec) {
-            if (ttlSec < 0) {
-                throw new IllegalArgumentException("Invalid ttlSec - must be non-negative");
-            }
-            mTtlSec = ttlSec;
-            return this;
-        }
-
-        /**
-         * Configure whether a subscribe terminate notification
-         * {@link DiscoverySessionCallback#onSessionTerminated()} is reported
-         * back to the callback.
-         *
-         * @param enable If true the terminate callback will be called when the
-         *            subscribe is terminated. Otherwise it will not be called.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setTerminateNotificationEnabled(boolean enable) {
-            mEnableTerminateNotification = enable;
-            return this;
-        }
-
-        /**
-         * Configure the minimum distance to a discovered publisher at which to trigger a discovery
-         * notification. I.e. discovery will be triggered if we've found a matching publisher
-         * (based on the other criteria in this configuration) <b>and</b> the distance to the
-         * publisher is larger than the value specified in this API. Can be used in conjunction with
-         * {@link #setMaxDistanceMm(int)} to specify a geofence, i.e. discovery with min <=
-         * distance <= max.
-         * <p>
-         * For ranging to be used in discovery it must also be enabled on the publisher using
-         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. However, ranging may
-         * not be available or enabled on the publisher or may be temporarily disabled on either
-         * subscriber or publisher - in such cases discovery will proceed without ranging.
-         * <p>
-         * When ranging is enabled and available on both publisher and subscriber and a service
-         * is discovered based on geofence constraints the
-         * {@link DiscoverySessionCallback#onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)}
-         * is called, otherwise the
-         * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}
-         * is called.
-         * <p>
-         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
-         * as described in {@link android.net.wifi.rtt}.
-         *
-         * @param minDistanceMm Minimum distance, in mm, to the publisher above which to trigger
-         *                      discovery.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setMinDistanceMm(int minDistanceMm) {
-            mMinDistanceMm = minDistanceMm;
-            mMinDistanceMmSet = true;
-            return this;
-        }
-
-        /**
-         * Configure the maximum distance to a discovered publisher at which to trigger a discovery
-         * notification. I.e. discovery will be triggered if we've found a matching publisher
-         * (based on the other criteria in this configuration) <b>and</b> the distance to the
-         * publisher is smaller than the value specified in this API. Can be used in conjunction
-         * with {@link #setMinDistanceMm(int)} to specify a geofence, i.e. discovery with min <=
-         * distance <= max.
-         * <p>
-         * For ranging to be used in discovery it must also be enabled on the publisher using
-         * {@link PublishConfig.Builder#setRangingEnabled(boolean)}. However, ranging may
-         * not be available or enabled on the publisher or may be temporarily disabled on either
-         * subscriber or publisher - in such cases discovery will proceed without ranging.
-         * <p>
-         * When ranging is enabled and available on both publisher and subscriber and a service
-         * is discovered based on geofence constraints the
-         * {@link DiscoverySessionCallback#onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)}
-         * is called, otherwise the
-         * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}
-         * is called.
-         * <p>
-         * The device must support Wi-Fi RTT for this feature to be used. Feature support is checked
-         * as described in {@link android.net.wifi.rtt}.
-         *
-         * @param maxDistanceMm Maximum distance, in mm, to the publisher below which to trigger
-         *                      discovery.
-         *
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder setMaxDistanceMm(int maxDistanceMm) {
-            mMaxDistanceMm = maxDistanceMm;
-            mMaxDistanceMmSet = true;
-            return this;
-        }
-
-        /**
-         * Build {@link SubscribeConfig} given the current requests made on the
-         * builder.
-         */
-        public SubscribeConfig build() {
-            return new SubscribeConfig(mServiceName, mServiceSpecificInfo, mMatchFilter,
-                    mSubscribeType, mTtlSec, mEnableTerminateNotification,
-                    mMinDistanceMmSet, mMinDistanceMm, mMaxDistanceMmSet, mMaxDistanceMm);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java b/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java
deleted file mode 100644
index ca88a90..0000000
--- a/wifi/java/android/net/wifi/aware/SubscribeDiscoverySession.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.util.Log;
-
-/**
- * A class representing a Aware subscribe session. Created when
- * {@link WifiAwareSession#subscribe(SubscribeConfig,
- * DiscoverySessionCallback, android.os.Handler)}
- * is called and a discovery session is created and returned in
- * {@link DiscoverySessionCallback#onSubscribeStarted(SubscribeDiscoverySession)}.
- * See baseline functionality of all discovery sessions in {@link DiscoverySession}.
- * This object allows updating an existing/running subscribe discovery session using
- * {@link #updateSubscribe(SubscribeConfig)}.
- */
-public class SubscribeDiscoverySession extends DiscoverySession {
-    private static final String TAG = "SubscribeDiscSession";
-
-    /**
-     * {@hide}
-     */
-    public SubscribeDiscoverySession(WifiAwareManager manager, int clientId,
-            int sessionId) {
-        super(manager, clientId, sessionId);
-    }
-
-    /**
-     * Re-configure the currently active subscribe session. The
-     * {@link DiscoverySessionCallback} is not replaced - the same listener used
-     * at creation is still used. The results of the configuration are returned using
-     * {@link DiscoverySessionCallback}:
-     * <ul>
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigUpdated()}: configuration
-     *     update succeeded.
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigFailed()}: configuration
-     *     update failed. The subscribe discovery session is still running using its previous
-     *     configuration (i.e. update failure does not terminate the session).
-     * </ul>
-     *
-     * @param subscribeConfig The new discovery subscribe session configuration
-     *                        ({@link SubscribeConfig}).
-     */
-    public void updateSubscribe(@NonNull SubscribeConfig subscribeConfig) {
-        if (mTerminated) {
-            Log.w(TAG, "updateSubscribe: called on terminated session");
-            return;
-        } else {
-            WifiAwareManager mgr = mMgr.get();
-            if (mgr == null) {
-                Log.w(TAG, "updateSubscribe: called post GC on WifiAwareManager");
-                return;
-            }
-
-            mgr.updateSubscribe(mClientId, mSessionId, subscribeConfig);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/TlvBufferUtils.java b/wifi/java/android/net/wifi/aware/TlvBufferUtils.java
deleted file mode 100644
index 2d3cc1e..0000000
--- a/wifi/java/android/net/wifi/aware/TlvBufferUtils.java
+++ /dev/null
@@ -1,714 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.Nullable;
-
-import java.nio.BufferOverflowException;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-
-/**
- * Utility class to construct and parse byte arrays using the TLV format -
- * Type/Length/Value format. The utilities accept a configuration of the size of
- * the Type field and the Length field. A Type field size of 0 is allowed -
- * allowing usage for LV (no T) array formats.
- *
- * @hide
- */
-public class TlvBufferUtils {
-    private TlvBufferUtils() {
-        // no reason to ever create this class
-    }
-
-    /**
-     * Utility class to construct byte arrays using the TLV format -
-     * Type/Length/Value.
-     * <p>
-     * A constructor is created specifying the size of the Type (T) and Length
-     * (L) fields. A specification of zero size T field is allowed - resulting
-     * in LV type format.
-     * <p>
-     * The byte array is either provided (using
-     * {@link TlvConstructor#wrap(byte[])}) or allocated (using
-     * {@link TlvConstructor#allocate(int)}).
-     * <p>
-     * Values are added to the structure using the {@code TlvConstructor.put*()}
-     * methods.
-     * <p>
-     * The final byte array is obtained using {@link TlvConstructor#getArray()}.
-     */
-    public static class TlvConstructor {
-        private int mTypeSize;
-        private int mLengthSize;
-        private ByteOrder mByteOrder = ByteOrder.BIG_ENDIAN;
-
-        private byte[] mArray;
-        private int mArrayLength;
-        private int mPosition;
-
-        /**
-         * Define a TLV constructor with the specified size of the Type (T) and
-         * Length (L) fields.
-         *
-         * @param typeSize Number of bytes used for the Type (T) field. Values
-         *            of 0, 1, or 2 bytes are allowed. A specification of 0
-         *            bytes implies that the field being constructed has the LV
-         *            format rather than the TLV format.
-         * @param lengthSize Number of bytes used for the Length (L) field.
-         *            Values of 1 or 2 bytes are allowed.
-         */
-        public TlvConstructor(int typeSize, int lengthSize) {
-            if (typeSize < 0 || typeSize > 2 || lengthSize <= 0 || lengthSize > 2) {
-                throw new IllegalArgumentException(
-                        "Invalid sizes - typeSize=" + typeSize + ", lengthSize=" + lengthSize);
-            }
-            mTypeSize = typeSize;
-            mLengthSize = lengthSize;
-            mPosition = 0;
-        }
-
-        /**
-         * Configure the TLV constructor to use a particular byte order. Should be
-         * {@link ByteOrder#BIG_ENDIAN} (the default at construction) or
-         * {@link ByteOrder#LITTLE_ENDIAN}.
-         *
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor setByteOrder(ByteOrder byteOrder) {
-            mByteOrder = byteOrder;
-            return this;
-        }
-
-        /**
-         * Set the byte array to be used to construct the TLV.
-         *
-         * @param array Byte array to be formatted.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor wrap(@Nullable byte[] array) {
-            mArray = array;
-            mArrayLength = (array == null) ? 0 : array.length;
-            mPosition = 0;
-            return this;
-        }
-
-        /**
-         * Allocates a new byte array to be used ot construct a TLV.
-         *
-         * @param capacity The size of the byte array to be allocated.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor allocate(int capacity) {
-            mArray = new byte[capacity];
-            mArrayLength = capacity;
-            mPosition = 0;
-            return this;
-        }
-
-        /**
-         * Creates a TLV array (of the previously specified Type and Length sizes) from the input
-         * list. Allocates an array matching the contents (and required Type and Length
-         * fields), copies the contents, and set the Length fields. The Type field is set to 0.
-         *
-         * @param list A list of fields to be added to the TLV buffer.
-         * @return The constructor of the TLV.
-         */
-        public TlvConstructor allocateAndPut(@Nullable List<byte[]> list) {
-            if (list != null) {
-                int size = 0;
-                for (byte[] field : list) {
-                    size += mTypeSize + mLengthSize;
-                    if (field != null) {
-                        size += field.length;
-                    }
-                }
-                allocate(size);
-                for (byte[] field : list) {
-                    putByteArray(0, field);
-                }
-            }
-            return this;
-        }
-
-        /**
-         * Copies a byte into the TLV with the indicated type. For an LV
-         * formatted structure (i.e. typeLength=0 in {@link TlvConstructor
-         * TlvConstructor(int, int)} ) the type field is ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param b The byte to be inserted into the structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putByte(int type, byte b) {
-            checkLength(1);
-            addHeader(type, 1);
-            mArray[mPosition++] = b;
-            return this;
-        }
-
-        /**
-         * Copies a raw byte into the TLV buffer - without a type or a length.
-         *
-         * @param b The byte to be inserted into the structure.
-         * @return The constructor to facilitate chaining {@code cts.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putRawByte(byte b) {
-            checkRawLength(1);
-            mArray[mPosition++] = b;
-            return this;
-        }
-
-        /**
-         * Copies a byte array into the TLV with the indicated type. For an LV
-         * formatted structure (i.e. typeLength=0 in {@link TlvConstructor
-         * TlvConstructor(int, int)} ) the type field is ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param array The array to be copied into the TLV structure.
-         * @param offset Start copying from the array at the specified offset.
-         * @param length Copy the specified number (length) of bytes from the
-         *            array.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putByteArray(int type, @Nullable byte[] array, int offset,
-                int length) {
-            checkLength(length);
-            addHeader(type, length);
-            if (length != 0) {
-                System.arraycopy(array, offset, mArray, mPosition, length);
-            }
-            mPosition += length;
-            return this;
-        }
-
-        /**
-         * Copies a byte array into the TLV with the indicated type. For an LV
-         * formatted structure (i.e. typeLength=0 in {@link TlvConstructor
-         * TlvConstructor(int, int)} ) the type field is ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param array The array to be copied (in full) into the TLV structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putByteArray(int type, @Nullable byte[] array) {
-            return putByteArray(type, array, 0, (array == null) ? 0 : array.length);
-        }
-
-        /**
-         * Copies a byte array into the TLV - without a type or a length.
-         *
-         * @param array The array to be copied (in full) into the TLV structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putRawByteArray(@Nullable byte[] array) {
-            if (array == null) return this;
-
-            checkRawLength(array.length);
-            System.arraycopy(array, 0, mArray, mPosition, array.length);
-            mPosition += array.length;
-            return this;
-        }
-
-        /**
-         * Places a zero length element (i.e. Length field = 0) into the TLV.
-         * For an LV formatted structure (i.e. typeLength=0 in
-         * {@link TlvConstructor TlvConstructor(int, int)} ) the type field is
-         * ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putZeroLengthElement(int type) {
-            checkLength(0);
-            addHeader(type, 0);
-            return this;
-        }
-
-        /**
-         * Copies short into the TLV with the indicated type. For an LV
-         * formatted structure (i.e. typeLength=0 in {@link TlvConstructor
-         * TlvConstructor(int, int)} ) the type field is ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param data The short to be inserted into the structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putShort(int type, short data) {
-            checkLength(2);
-            addHeader(type, 2);
-            pokeShort(mArray, mPosition, data, mByteOrder);
-            mPosition += 2;
-            return this;
-        }
-
-        /**
-         * Copies integer into the TLV with the indicated type. For an LV
-         * formatted structure (i.e. typeLength=0 in {@link TlvConstructor
-         * TlvConstructor(int, int)} ) the type field is ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param data The integer to be inserted into the structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putInt(int type, int data) {
-            checkLength(4);
-            addHeader(type, 4);
-            pokeInt(mArray, mPosition, data, mByteOrder);
-            mPosition += 4;
-            return this;
-        }
-
-        /**
-         * Copies a String's byte representation into the TLV with the indicated
-         * type. For an LV formatted structure (i.e. typeLength=0 in
-         * {@link TlvConstructor TlvConstructor(int, int)} ) the type field is
-         * ignored.
-         *
-         * @param type The value to be placed into the Type field.
-         * @param data The string whose bytes are to be inserted into the
-         *            structure.
-         * @return The constructor to facilitate chaining
-         *         {@code ctr.putXXX(..).putXXX(..)}.
-         */
-        public TlvConstructor putString(int type, @Nullable String data) {
-            byte[] bytes = null;
-            int length = 0;
-            if (data != null) {
-                bytes = data.getBytes();
-                length = bytes.length;
-            }
-            return putByteArray(type, bytes, 0, length);
-        }
-
-        /**
-         * Returns the constructed TLV formatted byte-array. This array is a copy of the wrapped
-         * or allocated array - truncated to just the significant bytes - i.e. those written into
-         * the (T)LV.
-         *
-         * @return The byte array containing the TLV formatted structure.
-         */
-        public byte[] getArray() {
-            return Arrays.copyOf(mArray, getActualLength());
-        }
-
-        /**
-         * Returns the size of the TLV formatted portion of the wrapped or
-         * allocated byte array. The array itself is returned with
-         * {@link TlvConstructor#getArray()}.
-         *
-         * @return The size of the TLV formatted portion of the byte array.
-         */
-        private int getActualLength() {
-            return mPosition;
-        }
-
-        private void checkLength(int dataLength) {
-            if (mPosition + mTypeSize + mLengthSize + dataLength > mArrayLength) {
-                throw new BufferOverflowException();
-            }
-        }
-
-        private void checkRawLength(int dataLength) {
-            if (mPosition + dataLength > mArrayLength) {
-                throw new BufferOverflowException();
-            }
-        }
-
-        private void addHeader(int type, int length) {
-            if (mTypeSize == 1) {
-                mArray[mPosition] = (byte) type;
-            } else if (mTypeSize == 2) {
-                pokeShort(mArray, mPosition, (short) type, mByteOrder);
-            }
-            mPosition += mTypeSize;
-
-            if (mLengthSize == 1) {
-                mArray[mPosition] = (byte) length;
-            } else if (mLengthSize == 2) {
-                pokeShort(mArray, mPosition, (short) length, mByteOrder);
-            }
-            mPosition += mLengthSize;
-        }
-    }
-
-    /**
-     * Utility class used when iterating over a TLV formatted byte-array. Use
-     * {@link TlvIterable} to iterate over array. A {@link TlvElement}
-     * represents each entry in a TLV formatted byte-array.
-     */
-    public static class TlvElement {
-        /**
-         * The Type (T) field of the current TLV element. Note that for LV
-         * formatted byte-arrays (i.e. TLV whose Type/T size is 0) the value of
-         * this field is undefined.
-         */
-        public int type;
-
-        /**
-         * The Length (L) field of the current TLV element.
-         */
-        public int length;
-
-        /**
-         * Control of the endianess of the TLV element - true for big-endian, false for little-
-         * endian.
-         */
-        public ByteOrder byteOrder = ByteOrder.BIG_ENDIAN;
-
-        /**
-         * The Value (V) field - a raw byte array representing the current TLV
-         * element where the entry starts at {@link TlvElement#offset}.
-         */
-        private byte[] mRefArray;
-
-        /**
-         * The offset to be used into {@link TlvElement#mRefArray} to access the
-         * raw data representing the current TLV element.
-         */
-        public int offset;
-
-        private TlvElement(int type, int length, @Nullable byte[] refArray, int offset) {
-            this.type = type;
-            this.length = length;
-            mRefArray = refArray;
-            this.offset = offset;
-
-            if (offset + length > refArray.length) {
-                throw new BufferOverflowException();
-            }
-        }
-
-        /**
-         * Return the raw byte array of the Value (V) field.
-         *
-         * @return The Value (V) field as a byte array.
-         */
-        public byte[] getRawData() {
-            return Arrays.copyOfRange(mRefArray, offset, offset + length);
-        }
-
-        /**
-         * Utility function to return a byte representation of a TLV element of
-         * length 1. Note: an attempt to call this function on a TLV item whose
-         * {@link TlvElement#length} is != 1 will result in an exception.
-         *
-         * @return byte representation of current TLV element.
-         */
-        public byte getByte() {
-            if (length != 1) {
-                throw new IllegalArgumentException(
-                        "Accesing a byte from a TLV element of length " + length);
-            }
-            return mRefArray[offset];
-        }
-
-        /**
-         * Utility function to return a short representation of a TLV element of
-         * length 2. Note: an attempt to call this function on a TLV item whose
-         * {@link TlvElement#length} is != 2 will result in an exception.
-         *
-         * @return short representation of current TLV element.
-         */
-        public short getShort() {
-            if (length != 2) {
-                throw new IllegalArgumentException(
-                        "Accesing a short from a TLV element of length " + length);
-            }
-            return peekShort(mRefArray, offset, byteOrder);
-        }
-
-        /**
-         * Utility function to return an integer representation of a TLV element
-         * of length 4. Note: an attempt to call this function on a TLV item
-         * whose {@link TlvElement#length} is != 4 will result in an exception.
-         *
-         * @return integer representation of current TLV element.
-         */
-        public int getInt() {
-            if (length != 4) {
-                throw new IllegalArgumentException(
-                        "Accesing an int from a TLV element of length " + length);
-            }
-            return peekInt(mRefArray, offset, byteOrder);
-        }
-
-        /**
-         * Utility function to return a String representation of a TLV element.
-         *
-         * @return String repersentation of the current TLV element.
-         */
-        public String getString() {
-            return new String(mRefArray, offset, length);
-        }
-    }
-
-    /**
-     * Utility class to iterate over a TLV formatted byte-array.
-     */
-    public static class TlvIterable implements Iterable<TlvElement> {
-        private int mTypeSize;
-        private int mLengthSize;
-        private ByteOrder mByteOrder = ByteOrder.BIG_ENDIAN;
-        private byte[] mArray;
-        private int mArrayLength;
-
-        /**
-         * Constructs a TlvIterable object - specifying the format of the TLV
-         * (the sizes of the Type and Length fields), and the byte array whose
-         * data is to be parsed.
-         *
-         * @param typeSize Number of bytes used for the Type (T) field. Valid
-         *            values are 0 (i.e. indicating the format is LV rather than
-         *            TLV), 1, and 2 bytes.
-         * @param lengthSize Number of bytes used for the Length (L) field.
-         *            Values values are 1 or 2 bytes.
-         * @param array The TLV formatted byte-array to parse.
-         */
-        public TlvIterable(int typeSize, int lengthSize, @Nullable byte[] array) {
-            if (typeSize < 0 || typeSize > 2 || lengthSize <= 0 || lengthSize > 2) {
-                throw new IllegalArgumentException(
-                        "Invalid sizes - typeSize=" + typeSize + ", lengthSize=" + lengthSize);
-            }
-            mTypeSize = typeSize;
-            mLengthSize = lengthSize;
-            mArray = array;
-            mArrayLength = (array == null) ? 0 : array.length;
-        }
-
-        /**
-         * Configure the TLV iterator to use little-endian byte ordering.
-         */
-        public void setByteOrder(ByteOrder byteOrder) {
-            mByteOrder = byteOrder;
-        }
-
-        /**
-         * Prints out a parsed representation of the TLV-formatted byte array.
-         * Whenever possible bytes, shorts, and integer are printed out (for
-         * fields whose length is 1, 2, or 4 respectively).
-         */
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-
-            builder.append("[");
-            boolean first = true;
-            for (TlvElement tlv : this) {
-                if (!first) {
-                    builder.append(",");
-                }
-                first = false;
-                builder.append(" (");
-                if (mTypeSize != 0) {
-                    builder.append("T=" + tlv.type + ",");
-                }
-                builder.append("L=" + tlv.length + ") ");
-                if (tlv.length == 0) {
-                    builder.append("<null>");
-                } else if (tlv.length == 1) {
-                    builder.append(tlv.getByte());
-                } else if (tlv.length == 2) {
-                    builder.append(tlv.getShort());
-                } else if (tlv.length == 4) {
-                    builder.append(tlv.getInt());
-                } else {
-                    builder.append("<bytes>");
-                }
-                if (tlv.length != 0) {
-                    builder.append(" (S='" + tlv.getString() + "')");
-                }
-            }
-            builder.append("]");
-
-            return builder.toString();
-        }
-
-        /**
-         * Returns a List with the raw contents (no types) of the iterator.
-         */
-        public List<byte[]> toList() {
-            List<byte[]> list = new ArrayList<>();
-            for (TlvElement tlv : this) {
-                list.add(Arrays.copyOfRange(tlv.mRefArray, tlv.offset, tlv.offset + tlv.length));
-            }
-
-            return list;
-        }
-
-        /**
-         * Returns an iterator to step through a TLV formatted byte-array. The
-         * individual elements returned by the iterator are {@link TlvElement}.
-         */
-        @Override
-        public Iterator<TlvElement> iterator() {
-            return new Iterator<TlvElement>() {
-                private int mOffset = 0;
-
-                @Override
-                public boolean hasNext() {
-                    return mOffset < mArrayLength;
-                }
-
-                @Override
-                public TlvElement next() {
-                    if (!hasNext()) {
-                        throw new NoSuchElementException();
-                    }
-
-                    int type = 0;
-                    if (mTypeSize == 1) {
-                        type = mArray[mOffset];
-                    } else if (mTypeSize == 2) {
-                        type = peekShort(mArray, mOffset, mByteOrder);
-                    }
-                    mOffset += mTypeSize;
-
-                    int length = 0;
-                    if (mLengthSize == 1) {
-                        length = mArray[mOffset];
-                    } else if (mLengthSize == 2) {
-                        length = peekShort(mArray, mOffset, mByteOrder);
-                    }
-                    mOffset += mLengthSize;
-
-                    TlvElement tlv = new TlvElement(type, length, mArray, mOffset);
-                    tlv.byteOrder = mByteOrder;
-                    mOffset += length;
-                    return tlv;
-                }
-
-                @Override
-                public void remove() {
-                    throw new UnsupportedOperationException();
-                }
-            };
-        }
-    }
-
-    /**
-     * Validates that a (T)LV array is constructed correctly. I.e. that its specified Length
-     * fields correctly fill the specified length (and do not overshoot). Uses big-endian
-     * byte ordering.
-     *
-     * @param array The (T)LV array to verify.
-     * @param typeSize The size (in bytes) of the type field. Valid values are 0, 1, or 2.
-     * @param lengthSize The size (in bytes) of the length field. Valid values are 1 or 2.
-     * @return A boolean indicating whether the array is valid (true) or invalid (false).
-     */
-    public static boolean isValid(@Nullable byte[] array, int typeSize, int lengthSize) {
-        return isValidEndian(array, typeSize, lengthSize, ByteOrder.BIG_ENDIAN);
-    }
-
-    /**
-     * Validates that a (T)LV array is constructed correctly. I.e. that its specified Length
-     * fields correctly fill the specified length (and do not overshoot).
-     *
-     * @param array The (T)LV array to verify.
-     * @param typeSize The size (in bytes) of the type field. Valid values are 0, 1, or 2.
-     * @param lengthSize The size (in bytes) of the length field. Valid values are 1 or 2.
-     * @param byteOrder The endianness of the byte array: {@link ByteOrder#BIG_ENDIAN} or
-     *                  {@link ByteOrder#LITTLE_ENDIAN}.
-     * @return A boolean indicating whether the array is valid (true) or invalid (false).
-     */
-    public static boolean isValidEndian(@Nullable byte[] array, int typeSize, int lengthSize,
-            ByteOrder byteOrder) {
-        if (typeSize < 0 || typeSize > 2) {
-            throw new IllegalArgumentException(
-                    "Invalid arguments - typeSize must be 0, 1, or 2: typeSize=" + typeSize);
-        }
-        if (lengthSize <= 0 || lengthSize > 2) {
-            throw new IllegalArgumentException(
-                    "Invalid arguments - lengthSize must be 1 or 2: lengthSize=" + lengthSize);
-        }
-        if (array == null) {
-            return true;
-        }
-
-        int nextTlvIndex = 0;
-        while (nextTlvIndex + typeSize + lengthSize <= array.length) {
-            nextTlvIndex += typeSize;
-            if (lengthSize == 1) {
-                nextTlvIndex += lengthSize + array[nextTlvIndex];
-            } else {
-                nextTlvIndex += lengthSize + peekShort(array, nextTlvIndex, byteOrder);
-            }
-        }
-
-        return nextTlvIndex == array.length;
-    }
-
-    private static void pokeShort(byte[] dst, int offset, short value, ByteOrder order) {
-        if (order == ByteOrder.BIG_ENDIAN) {
-            dst[offset++] = (byte) ((value >> 8) & 0xff);
-            dst[offset  ] = (byte) ((value >> 0) & 0xff);
-        } else {
-            dst[offset++] = (byte) ((value >> 0) & 0xff);
-            dst[offset  ] = (byte) ((value >> 8) & 0xff);
-        }
-    }
-
-    private static void pokeInt(byte[] dst, int offset, int value, ByteOrder order) {
-        if (order == ByteOrder.BIG_ENDIAN) {
-            dst[offset++] = (byte) ((value >> 24) & 0xff);
-            dst[offset++] = (byte) ((value >> 16) & 0xff);
-            dst[offset++] = (byte) ((value >>  8) & 0xff);
-            dst[offset  ] = (byte) ((value >>  0) & 0xff);
-        } else {
-            dst[offset++] = (byte) ((value >>  0) & 0xff);
-            dst[offset++] = (byte) ((value >>  8) & 0xff);
-            dst[offset++] = (byte) ((value >> 16) & 0xff);
-            dst[offset  ] = (byte) ((value >> 24) & 0xff);
-        }
-    }
-
-    private static short peekShort(byte[] src, int offset, ByteOrder order) {
-        if (order == ByteOrder.BIG_ENDIAN) {
-            return (short) ((src[offset] << 8) | (src[offset + 1] & 0xff));
-        } else {
-            return (short) ((src[offset + 1] << 8) | (src[offset] & 0xff));
-        }
-    }
-
-    private static int peekInt(byte[] src, int offset, ByteOrder order) {
-        if (order == ByteOrder.BIG_ENDIAN) {
-            return ((src[offset++] & 0xff) << 24)
-                    | ((src[offset++] & 0xff) << 16)
-                    | ((src[offset++] & 0xff) <<  8)
-                    | ((src[offset  ] & 0xff) <<  0);
-        } else {
-            return ((src[offset++] & 0xff) <<  0)
-                    | ((src[offset++] & 0xff) <<  8)
-                    | ((src[offset++] & 0xff) << 16)
-                    | ((src[offset  ] & 0xff) << 24);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareAgentNetworkSpecifier.java b/wifi/java/android/net/wifi/aware/WifiAwareAgentNetworkSpecifier.java
deleted file mode 100644
index 9ae3bd0..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareAgentNetworkSpecifier.java
+++ /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.
- */
-
-package android.net.wifi.aware;
-
-import android.net.NetworkSpecifier;
-import android.net.wifi.util.HexEncoding;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.Log;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringJoiner;
-
-/**
- * A network specifier object used to represent the capabilities of an network agent. A collection
- * of multiple WifiAwareNetworkSpecifier objects whose matching critiera (satisfiedBy) is an OR:
- * a match on any of the network specifiers in the collection is a match.
- *
- * This class is not intended for use in network requests.
- *
- * @hide
- */
-public class WifiAwareAgentNetworkSpecifier extends NetworkSpecifier implements Parcelable {
-    private static final String TAG = "WifiAwareAgentNs";
-
-    private static final boolean VDBG = false; // STOPSHIP if true
-
-    private Set<ByteArrayWrapper> mNetworkSpecifiers = new HashSet<>();
-    private MessageDigest mDigester;
-
-    public WifiAwareAgentNetworkSpecifier() {
-        initialize();
-    }
-
-    public WifiAwareAgentNetworkSpecifier(WifiAwareNetworkSpecifier ns) {
-        initialize();
-        mNetworkSpecifiers.add(convert(ns));
-    }
-
-    public WifiAwareAgentNetworkSpecifier(WifiAwareNetworkSpecifier[] nss) {
-        initialize();
-        for (WifiAwareNetworkSpecifier ns : nss) {
-            mNetworkSpecifiers.add(convert(ns));
-        }
-    }
-
-    public boolean isEmpty() {
-        return mNetworkSpecifiers.isEmpty();
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeArray(mNetworkSpecifiers.toArray());
-    }
-
-    public static final @android.annotation.NonNull Creator<WifiAwareAgentNetworkSpecifier> CREATOR =
-            new Creator<WifiAwareAgentNetworkSpecifier>() {
-                @Override
-                public WifiAwareAgentNetworkSpecifier createFromParcel(Parcel in) {
-                    WifiAwareAgentNetworkSpecifier agentNs = new WifiAwareAgentNetworkSpecifier();
-                    Object[] objs = in.readArray(null);
-                    for (Object obj : objs) {
-                        agentNs.mNetworkSpecifiers.add((ByteArrayWrapper) obj);
-                    }
-                    return agentNs;
-                }
-
-                @Override
-                public WifiAwareAgentNetworkSpecifier[] newArray(int size) {
-                    return new WifiAwareAgentNetworkSpecifier[size];
-                }
-            };
-
-    @Override
-    public int hashCode() {
-        return mNetworkSpecifiers.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == this) {
-            return true;
-        }
-        if (!(obj instanceof WifiAwareAgentNetworkSpecifier)) {
-            return false;
-        }
-        return mNetworkSpecifiers.equals(((WifiAwareAgentNetworkSpecifier) obj).mNetworkSpecifiers);
-    }
-
-    @Override
-    public String toString() {
-        StringJoiner sj = new StringJoiner(",");
-        for (ByteArrayWrapper baw: mNetworkSpecifiers) {
-            sj.add(baw.toString());
-        }
-        return sj.toString();
-    }
-
-    @Override
-    public boolean canBeSatisfiedBy(NetworkSpecifier other) {
-        if (!(other instanceof WifiAwareAgentNetworkSpecifier)) {
-            return false;
-        }
-        WifiAwareAgentNetworkSpecifier otherNs = (WifiAwareAgentNetworkSpecifier) other;
-
-        // called as old.satifiedBy(new): satisfied if old contained in new
-        for (ByteArrayWrapper baw: mNetworkSpecifiers) {
-            if (!otherNs.mNetworkSpecifiers.contains(baw)) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public boolean satisfiesAwareNetworkSpecifier(WifiAwareNetworkSpecifier ns) {
-        if (VDBG) Log.v(TAG, "satisfiesAwareNetworkSpecifier: ns=" + ns);
-        ByteArrayWrapper nsBytes = convert(ns);
-        return mNetworkSpecifiers.contains(nsBytes);
-    }
-
-    @Override
-    public NetworkSpecifier redact() {
-        return null;
-    }
-
-    private void initialize() {
-        try {
-            mDigester = MessageDigest.getInstance("SHA-256");
-        } catch (NoSuchAlgorithmException e) {
-            Log.e(TAG, "Can not instantiate a SHA-256 digester!? Will match nothing.");
-            return;
-        }
-    }
-
-    private ByteArrayWrapper convert(WifiAwareNetworkSpecifier ns) {
-        if (mDigester == null) {
-            return null;
-        }
-
-        Parcel parcel = Parcel.obtain();
-        ns.writeToParcel(parcel, 0);
-        byte[] bytes = parcel.marshall();
-
-        mDigester.reset();
-        mDigester.update(bytes);
-        return new ByteArrayWrapper(mDigester.digest());
-    }
-
-    private static class ByteArrayWrapper implements Parcelable {
-        private byte[] mData;
-
-        ByteArrayWrapper(byte[] data) {
-            mData = data;
-        }
-
-        @Override
-        public int hashCode() {
-            return Arrays.hashCode(mData);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (obj == this) {
-                return true;
-            }
-            if (!(obj instanceof ByteArrayWrapper)) {
-                return false;
-            }
-            return Arrays.equals(((ByteArrayWrapper) obj).mData, mData);
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeByteArray(mData);
-        }
-
-        public static final @android.annotation.NonNull Creator<ByteArrayWrapper> CREATOR =
-                new Creator<ByteArrayWrapper>() {
-                    @Override
-                    public ByteArrayWrapper createFromParcel(Parcel in) {
-                        return new ByteArrayWrapper(in.createByteArray());
-                    }
-
-                    @Override
-                    public ByteArrayWrapper[] newArray(int size) {
-                        return new ByteArrayWrapper[size];
-                    }
-                };
-
-        @Override
-        public String toString() {
-            return new String(HexEncoding.encode(mData));
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareManager.java b/wifi/java/android/net/wifi/aware/WifiAwareManager.java
deleted file mode 100644
index c2ae17c..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareManager.java
+++ /dev/null
@@ -1,824 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SdkConstant;
-import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.SystemService;
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.NetworkRequest;
-import android.net.NetworkSpecifier;
-import android.net.wifi.util.HexEncoding;
-import android.os.Binder;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.RemoteException;
-import android.util.Log;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.ref.WeakReference;
-import java.nio.BufferOverflowException;
-import java.util.List;
-
-/**
- * This class provides the primary API for managing Wi-Fi Aware operations:
- * discovery and peer-to-peer data connections.
- * <p>
- * The class provides access to:
- * <ul>
- * <li>Initialize a Aware cluster (peer-to-peer synchronization). Refer to
- * {@link #attach(AttachCallback, Handler)}.
- * <li>Create discovery sessions (publish or subscribe sessions). Refer to
- * {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback, Handler)} and
- * {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback, Handler)}.
- * <li>Create a Aware network specifier to be used with
- * {@link ConnectivityManager#requestNetwork(NetworkRequest, ConnectivityManager.NetworkCallback)}
- * to set-up a Aware connection with a peer. Refer to {@link WifiAwareNetworkSpecifier.Builder}.
- * </ul>
- * <p>
- *     Aware may not be usable when Wi-Fi is disabled (and other conditions). To validate that
- *     the functionality is available use the {@link #isAvailable()} function. To track
- *     changes in Aware usability register for the {@link #ACTION_WIFI_AWARE_STATE_CHANGED}
- *     broadcast. Note that this broadcast is not sticky - you should register for it and then
- *     check the above API to avoid a race condition.
- * <p>
- *     An application must use {@link #attach(AttachCallback, Handler)} to initialize a
- *     Aware cluster - before making any other Aware operation. Aware cluster membership is a
- *     device-wide operation - the API guarantees that the device is in a cluster or joins a
- *     Aware cluster (or starts one if none can be found). Information about attach success (or
- *     failure) are returned in callbacks of {@link AttachCallback}. Proceed with Aware
- *     discovery or connection setup only after receiving confirmation that Aware attach
- *     succeeded - {@link AttachCallback#onAttached(WifiAwareSession)}. When an
- *     application is finished using Aware it <b>must</b> use the
- *     {@link WifiAwareSession#close()} API to indicate to the Aware service that the device
- *     may detach from the Aware cluster. The device will actually disable Aware once the last
- *     application detaches.
- * <p>
- *     Once a Aware attach is confirmed use the
- *     {@link WifiAwareSession#publish(PublishConfig, DiscoverySessionCallback, Handler)}
- *     or
- *     {@link WifiAwareSession#subscribe(SubscribeConfig, DiscoverySessionCallback,
- *     Handler)} to create publish or subscribe Aware discovery sessions. Events are called on the
- *     provided callback object {@link DiscoverySessionCallback}. Specifically, the
- *     {@link DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)}
- *     and
- *     {@link DiscoverySessionCallback#onSubscribeStarted(
- *SubscribeDiscoverySession)}
- *     return {@link PublishDiscoverySession} and
- *     {@link SubscribeDiscoverySession}
- *     objects respectively on which additional session operations can be performed, e.g. updating
- *     the session {@link PublishDiscoverySession#updatePublish(PublishConfig)} and
- *     {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}. Sessions can
- *     also be used to send messages using the
- *     {@link DiscoverySession#sendMessage(PeerHandle, int, byte[])} APIs. When an
- *     application is finished with a discovery session it <b>must</b> terminate it using the
- *     {@link DiscoverySession#close()} API.
- * <p>
- *    Creating connections between Aware devices is managed by the standard
- *    {@link ConnectivityManager#requestNetwork(NetworkRequest,
- *    ConnectivityManager.NetworkCallback)}.
- *    The {@link NetworkRequest} object should be constructed with:
- *    <ul>
- *        <li>{@link NetworkRequest.Builder#addTransportType(int)} of
- *        {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
- *        <li>{@link NetworkRequest.Builder#setNetworkSpecifier(String)} using
- *        {@link WifiAwareNetworkSpecifier.Builder}.
- *    </ul>
- */
-@SystemService(Context.WIFI_AWARE_SERVICE)
-public class WifiAwareManager {
-    private static final String TAG = "WifiAwareManager";
-    private static final boolean DBG = false;
-    private static final boolean VDBG = false; // STOPSHIP if true
-
-    /**
-     * Broadcast intent action to indicate that the state of Wi-Fi Aware availability has changed.
-     * Use the {@link #isAvailable()} to query the current status.
-     * This broadcast is <b>not</b> sticky, use the {@link #isAvailable()} API after registering
-     * the broadcast to check the current state of Wi-Fi Aware.
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_WIFI_AWARE_STATE_CHANGED =
-            "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED";
-
-    /** @hide */
-    @IntDef({
-            WIFI_AWARE_DATA_PATH_ROLE_INITIATOR, WIFI_AWARE_DATA_PATH_ROLE_RESPONDER})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface DataPathRole {
-    }
-
-    /**
-     * Connection creation role is that of INITIATOR. Used to create a network specifier string
-     * when requesting a Aware network.
-     *
-     * @see WifiAwareSession#createNetworkSpecifierOpen(int, byte[])
-     * @see WifiAwareSession#createNetworkSpecifierPassphrase(int, byte[], String)
-     */
-    public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0;
-
-    /**
-     * Connection creation role is that of RESPONDER. Used to create a network specifier string
-     * when requesting a Aware network.
-     *
-     * @see WifiAwareSession#createNetworkSpecifierOpen(int, byte[])
-     * @see WifiAwareSession#createNetworkSpecifierPassphrase(int, byte[], String)
-     */
-    public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1;
-
-    private final Context mContext;
-    private final IWifiAwareManager mService;
-
-    private final Object mLock = new Object(); // lock access to the following vars
-
-    /** @hide */
-    public WifiAwareManager(@NonNull Context context, @NonNull IWifiAwareManager service) {
-        mContext = context;
-        mService = service;
-    }
-
-    /**
-     * Returns the current status of Aware API: whether or not Aware is available. To track
-     * changes in the state of Aware API register for the
-     * {@link #ACTION_WIFI_AWARE_STATE_CHANGED} broadcast.
-     *
-     * @return A boolean indicating whether the app can use the Aware API at this time (true) or
-     * not (false).
-     */
-    public boolean isAvailable() {
-        try {
-            return mService.isUsageEnabled();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Returns the characteristics of the Wi-Fi Aware interface: a set of parameters which specify
-     * limitations on configurations, e.g. the maximum service name length.
-     *
-     * @return An object specifying configuration limitations of Aware.
-     */
-    public Characteristics getCharacteristics() {
-        try {
-            return mService.getCharacteristics();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Attach to the Wi-Fi Aware service - enabling the application to create discovery sessions or
-     * create connections to peers. The device will attach to an existing cluster if it can find
-     * one or create a new cluster (if it is the first to enable Aware in its vicinity). Results
-     * (e.g. successful attach to a cluster) are provided to the {@code attachCallback} object.
-     * An application <b>must</b> call {@link WifiAwareSession#close()} when done with the
-     * Wi-Fi Aware object.
-     * <p>
-     * Note: a Aware cluster is a shared resource - if the device is already attached to a cluster
-     * then this function will simply indicate success immediately using the same {@code
-     * attachCallback}.
-     *
-     * @param attachCallback A callback for attach events, extended from
-     * {@link AttachCallback}.
-     * @param handler The Handler on whose thread to execute the callbacks of the {@code
-     * attachCallback} object. If a null is provided then the application's main thread will be
-     *                used.
-     */
-    public void attach(@NonNull AttachCallback attachCallback, @Nullable Handler handler) {
-        attach(handler, null, attachCallback, null);
-    }
-
-    /**
-     * Attach to the Wi-Fi Aware service - enabling the application to create discovery sessions or
-     * create connections to peers. The device will attach to an existing cluster if it can find
-     * one or create a new cluster (if it is the first to enable Aware in its vicinity). Results
-     * (e.g. successful attach to a cluster) are provided to the {@code attachCallback} object.
-     * An application <b>must</b> call {@link WifiAwareSession#close()} when done with the
-     * Wi-Fi Aware object.
-     * <p>
-     * Note: a Aware cluster is a shared resource - if the device is already attached to a cluster
-     * then this function will simply indicate success immediately using the same {@code
-     * attachCallback}.
-     * <p>
-     * This version of the API attaches a listener to receive the MAC address of the Aware interface
-     * on startup and whenever it is updated (it is randomized at regular intervals for privacy).
-     * The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
-     * permission to execute this attach request. Otherwise, use the
-     * {@link #attach(AttachCallback, Handler)} version. Note that aside from permission
-     * requirements this listener will wake up the host at regular intervals causing higher power
-     * consumption, do not use it unless the information is necessary (e.g. for OOB discovery).
-     *
-     * @param attachCallback A callback for attach events, extended from
-     * {@link AttachCallback}.
-     * @param identityChangedListener A listener for changed identity, extended from
-     * {@link IdentityChangedListener}.
-     * @param handler The Handler on whose thread to execute the callbacks of the {@code
-     * attachCallback} and {@code identityChangedListener} objects. If a null is provided then the
-     *                application's main thread will be used.
-     */
-    public void attach(@NonNull AttachCallback attachCallback,
-            @NonNull IdentityChangedListener identityChangedListener,
-            @Nullable Handler handler) {
-        attach(handler, null, attachCallback, identityChangedListener);
-    }
-
-    /** @hide */
-    public void attach(Handler handler, ConfigRequest configRequest,
-            AttachCallback attachCallback,
-            IdentityChangedListener identityChangedListener) {
-        if (VDBG) {
-            Log.v(TAG, "attach(): handler=" + handler + ", callback=" + attachCallback
-                    + ", configRequest=" + configRequest + ", identityChangedListener="
-                    + identityChangedListener);
-        }
-
-        if (attachCallback == null) {
-            throw new IllegalArgumentException("Null callback provided");
-        }
-
-        synchronized (mLock) {
-            Looper looper = (handler == null) ? Looper.getMainLooper() : handler.getLooper();
-
-            try {
-                Binder binder = new Binder();
-                mService.connect(binder, mContext.getOpPackageName(), mContext.getAttributionTag(),
-                        new WifiAwareEventCallbackProxy(this, looper, binder, attachCallback,
-                                identityChangedListener), configRequest,
-                        identityChangedListener != null);
-            } catch (RemoteException e) {
-                throw e.rethrowFromSystemServer();
-            }
-        }
-    }
-
-    /** @hide */
-    public void disconnect(int clientId, Binder binder) {
-        if (VDBG) Log.v(TAG, "disconnect()");
-
-        try {
-            mService.disconnect(clientId, binder);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void publish(int clientId, Looper looper, PublishConfig publishConfig,
-            DiscoverySessionCallback callback) {
-        if (VDBG) Log.v(TAG, "publish(): clientId=" + clientId + ", config=" + publishConfig);
-
-        if (callback == null) {
-            throw new IllegalArgumentException("Null callback provided");
-        }
-
-        try {
-            mService.publish(mContext.getOpPackageName(), mContext.getAttributionTag(), clientId,
-                    publishConfig,
-                    new WifiAwareDiscoverySessionCallbackProxy(this, looper, true, callback,
-                            clientId));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void updatePublish(int clientId, int sessionId, PublishConfig publishConfig) {
-        if (VDBG) {
-            Log.v(TAG, "updatePublish(): clientId=" + clientId + ",sessionId=" + sessionId
-                    + ", config=" + publishConfig);
-        }
-
-        try {
-            mService.updatePublish(clientId, sessionId, publishConfig);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void subscribe(int clientId, Looper looper, SubscribeConfig subscribeConfig,
-            DiscoverySessionCallback callback) {
-        if (VDBG) {
-            if (VDBG) {
-                Log.v(TAG,
-                        "subscribe(): clientId=" + clientId + ", config=" + subscribeConfig);
-            }
-        }
-
-        if (callback == null) {
-            throw new IllegalArgumentException("Null callback provided");
-        }
-
-        try {
-            mService.subscribe(mContext.getOpPackageName(), mContext.getAttributionTag(), clientId,
-                    subscribeConfig,
-                    new WifiAwareDiscoverySessionCallbackProxy(this, looper, false, callback,
-                            clientId));
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void updateSubscribe(int clientId, int sessionId, SubscribeConfig subscribeConfig) {
-        if (VDBG) {
-            Log.v(TAG, "updateSubscribe(): clientId=" + clientId + ",sessionId=" + sessionId
-                    + ", config=" + subscribeConfig);
-        }
-
-        try {
-            mService.updateSubscribe(clientId, sessionId, subscribeConfig);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void terminateSession(int clientId, int sessionId) {
-        if (VDBG) {
-            Log.d(TAG,
-                    "terminateSession(): clientId=" + clientId + ", sessionId=" + sessionId);
-        }
-
-        try {
-            mService.terminateSession(clientId, sessionId);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public void sendMessage(int clientId, int sessionId, PeerHandle peerHandle, byte[] message,
-            int messageId, int retryCount) {
-        if (peerHandle == null) {
-            throw new IllegalArgumentException(
-                    "sendMessage: invalid peerHandle - must be non-null");
-        }
-
-        if (VDBG) {
-            Log.v(TAG, "sendMessage(): clientId=" + clientId + ", sessionId=" + sessionId
-                    + ", peerHandle=" + peerHandle.peerId + ", messageId="
-                    + messageId + ", retryCount=" + retryCount);
-        }
-
-        try {
-            mService.sendMessage(clientId, sessionId, peerHandle.peerId, message, messageId,
-                    retryCount);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void requestMacAddresses(int uid, List<Integer> peerIds,
-            IWifiAwareMacAddressProvider callback) {
-        try {
-            mService.requestMacAddresses(uid, peerIds, callback);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /** @hide */
-    public NetworkSpecifier createNetworkSpecifier(int clientId, int role, int sessionId,
-            @NonNull PeerHandle peerHandle, @Nullable byte[] pmk, @Nullable String passphrase) {
-        if (VDBG) {
-            Log.v(TAG, "createNetworkSpecifier: role=" + role + ", sessionId=" + sessionId
-                    + ", peerHandle=" + ((peerHandle == null) ? peerHandle : peerHandle.peerId)
-                    + ", pmk=" + ((pmk == null) ? "null" : "non-null")
-                    + ", passphrase=" + ((passphrase == null) ? "null" : "non-null"));
-        }
-
-        if (!WifiAwareUtils.isLegacyVersion(mContext, Build.VERSION_CODES.Q)) {
-            throw new UnsupportedOperationException(
-                    "API deprecated - use WifiAwareNetworkSpecifier.Builder");
-        }
-
-        if (role != WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                && role != WIFI_AWARE_DATA_PATH_ROLE_RESPONDER) {
-            throw new IllegalArgumentException(
-                    "createNetworkSpecifier: Invalid 'role' argument when creating a network "
-                            + "specifier");
-        }
-        if (role == WIFI_AWARE_DATA_PATH_ROLE_INITIATOR || !WifiAwareUtils.isLegacyVersion(mContext,
-                Build.VERSION_CODES.P)) {
-            if (peerHandle == null) {
-                throw new IllegalArgumentException(
-                        "createNetworkSpecifier: Invalid peer handle - cannot be null");
-            }
-        }
-
-        return new WifiAwareNetworkSpecifier(
-                (peerHandle == null) ? WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_IB_ANY_PEER
-                        : WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_IB,
-                role,
-                clientId,
-                sessionId,
-                peerHandle != null ? peerHandle.peerId : 0, // 0 is an invalid peer ID
-                null, // peerMac (not used in this method)
-                pmk,
-                passphrase,
-                0, // no port info for deprecated IB APIs
-                -1); // no transport info for deprecated IB APIs
-    }
-
-    /** @hide */
-    public NetworkSpecifier createNetworkSpecifier(int clientId, @DataPathRole int role,
-            @NonNull byte[] peer, @Nullable byte[] pmk, @Nullable String passphrase) {
-        if (VDBG) {
-            Log.v(TAG, "createNetworkSpecifier: role=" + role
-                    + ", pmk=" + ((pmk == null) ? "null" : "non-null")
-                    + ", passphrase=" + ((passphrase == null) ? "null" : "non-null"));
-        }
-
-        if (role != WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                && role != WIFI_AWARE_DATA_PATH_ROLE_RESPONDER) {
-            throw new IllegalArgumentException(
-                    "createNetworkSpecifier: Invalid 'role' argument when creating a network "
-                            + "specifier");
-        }
-        if (role == WIFI_AWARE_DATA_PATH_ROLE_INITIATOR || !WifiAwareUtils.isLegacyVersion(mContext,
-                Build.VERSION_CODES.P)) {
-            if (peer == null) {
-                throw new IllegalArgumentException(
-                        "createNetworkSpecifier: Invalid peer MAC - cannot be null");
-            }
-        }
-        if (peer != null && peer.length != 6) {
-            throw new IllegalArgumentException("createNetworkSpecifier: Invalid peer MAC address");
-        }
-
-        return new WifiAwareNetworkSpecifier(
-                (peer == null) ? WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER
-                        : WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_OOB,
-                role,
-                clientId,
-                0, // 0 is an invalid session ID
-                0, // 0 is an invalid peer ID
-                peer,
-                pmk,
-                passphrase,
-                0, // no port info for OOB APIs
-                -1); // no transport protocol info for OOB APIs
-    }
-
-    private static class WifiAwareEventCallbackProxy extends IWifiAwareEventCallback.Stub {
-        private static final int CALLBACK_CONNECT_SUCCESS = 0;
-        private static final int CALLBACK_CONNECT_FAIL = 1;
-        private static final int CALLBACK_IDENTITY_CHANGED = 2;
-
-        private final Handler mHandler;
-        private final WeakReference<WifiAwareManager> mAwareManager;
-        private final Binder mBinder;
-        private final Looper mLooper;
-
-        /**
-         * Constructs a {@link AttachCallback} using the specified looper.
-         * All callbacks will delivered on the thread of the specified looper.
-         *
-         * @param looper The looper on which to execute the callbacks.
-         */
-        WifiAwareEventCallbackProxy(WifiAwareManager mgr, Looper looper, Binder binder,
-                final AttachCallback attachCallback,
-                final IdentityChangedListener identityChangedListener) {
-            mAwareManager = new WeakReference<>(mgr);
-            mLooper = looper;
-            mBinder = binder;
-
-            if (VDBG) Log.v(TAG, "WifiAwareEventCallbackProxy ctor: looper=" + looper);
-            mHandler = new Handler(looper) {
-                @Override
-                public void handleMessage(Message msg) {
-                    if (DBG) {
-                        Log.d(TAG, "WifiAwareEventCallbackProxy: What=" + msg.what + ", msg="
-                                + msg);
-                    }
-
-                    WifiAwareManager mgr = mAwareManager.get();
-                    if (mgr == null) {
-                        Log.w(TAG, "WifiAwareEventCallbackProxy: handleMessage post GC");
-                        return;
-                    }
-
-                    switch (msg.what) {
-                        case CALLBACK_CONNECT_SUCCESS:
-                            attachCallback.onAttached(
-                                    new WifiAwareSession(mgr, mBinder, msg.arg1));
-                            break;
-                        case CALLBACK_CONNECT_FAIL:
-                            mAwareManager.clear();
-                            attachCallback.onAttachFailed();
-                            break;
-                        case CALLBACK_IDENTITY_CHANGED:
-                            if (identityChangedListener == null) {
-                                Log.e(TAG, "CALLBACK_IDENTITY_CHANGED: null listener.");
-                            } else {
-                                identityChangedListener.onIdentityChanged((byte[]) msg.obj);
-                            }
-                            break;
-                    }
-                }
-            };
-        }
-
-        @Override
-        public void onConnectSuccess(int clientId) {
-            if (VDBG) Log.v(TAG, "onConnectSuccess");
-
-            Message msg = mHandler.obtainMessage(CALLBACK_CONNECT_SUCCESS);
-            msg.arg1 = clientId;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onConnectFail(int reason) {
-            if (VDBG) Log.v(TAG, "onConnectFail: reason=" + reason);
-
-            Message msg = mHandler.obtainMessage(CALLBACK_CONNECT_FAIL);
-            msg.arg1 = reason;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onIdentityChanged(byte[] mac) {
-            if (VDBG) Log.v(TAG, "onIdentityChanged: mac=" + new String(HexEncoding.encode(mac)));
-
-            Message msg = mHandler.obtainMessage(CALLBACK_IDENTITY_CHANGED);
-            msg.obj = mac;
-            mHandler.sendMessage(msg);
-        }
-    }
-
-    private static class WifiAwareDiscoverySessionCallbackProxy extends
-            IWifiAwareDiscoverySessionCallback.Stub {
-        private static final int CALLBACK_SESSION_STARTED = 0;
-        private static final int CALLBACK_SESSION_CONFIG_SUCCESS = 1;
-        private static final int CALLBACK_SESSION_CONFIG_FAIL = 2;
-        private static final int CALLBACK_SESSION_TERMINATED = 3;
-        private static final int CALLBACK_MATCH = 4;
-        private static final int CALLBACK_MESSAGE_SEND_SUCCESS = 5;
-        private static final int CALLBACK_MESSAGE_SEND_FAIL = 6;
-        private static final int CALLBACK_MESSAGE_RECEIVED = 7;
-        private static final int CALLBACK_MATCH_WITH_DISTANCE = 8;
-
-        private static final String MESSAGE_BUNDLE_KEY_MESSAGE = "message";
-        private static final String MESSAGE_BUNDLE_KEY_MESSAGE2 = "message2";
-
-        private final WeakReference<WifiAwareManager> mAwareManager;
-        private final boolean mIsPublish;
-        private final DiscoverySessionCallback mOriginalCallback;
-        private final int mClientId;
-
-        private final Handler mHandler;
-        private DiscoverySession mSession;
-
-        WifiAwareDiscoverySessionCallbackProxy(WifiAwareManager mgr, Looper looper,
-                boolean isPublish, DiscoverySessionCallback originalCallback,
-                int clientId) {
-            mAwareManager = new WeakReference<>(mgr);
-            mIsPublish = isPublish;
-            mOriginalCallback = originalCallback;
-            mClientId = clientId;
-
-            if (VDBG) {
-                Log.v(TAG, "WifiAwareDiscoverySessionCallbackProxy ctor: isPublish=" + isPublish);
-            }
-
-            mHandler = new Handler(looper) {
-                @Override
-                public void handleMessage(Message msg) {
-                    if (DBG) Log.d(TAG, "What=" + msg.what + ", msg=" + msg);
-
-                    if (mAwareManager.get() == null) {
-                        Log.w(TAG, "WifiAwareDiscoverySessionCallbackProxy: handleMessage post GC");
-                        return;
-                    }
-
-                    switch (msg.what) {
-                        case CALLBACK_SESSION_STARTED:
-                            onProxySessionStarted(msg.arg1);
-                            break;
-                        case CALLBACK_SESSION_CONFIG_SUCCESS:
-                            mOriginalCallback.onSessionConfigUpdated();
-                            break;
-                        case CALLBACK_SESSION_CONFIG_FAIL:
-                            mOriginalCallback.onSessionConfigFailed();
-                            if (mSession == null) {
-                                /*
-                                 * creation failed (as opposed to update
-                                 * failing)
-                                 */
-                                mAwareManager.clear();
-                            }
-                            break;
-                        case CALLBACK_SESSION_TERMINATED:
-                            onProxySessionTerminated(msg.arg1);
-                            break;
-                        case CALLBACK_MATCH:
-                        case CALLBACK_MATCH_WITH_DISTANCE:
-                            {
-                            List<byte[]> matchFilter = null;
-                            byte[] arg = msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE2);
-                            try {
-                                matchFilter = new TlvBufferUtils.TlvIterable(0, 1, arg).toList();
-                            } catch (BufferOverflowException e) {
-                                matchFilter = null;
-                                Log.e(TAG, "onServiceDiscovered: invalid match filter byte array '"
-                                        + new String(HexEncoding.encode(arg))
-                                        + "' - cannot be parsed: e=" + e);
-                            }
-                            if (msg.what == CALLBACK_MATCH) {
-                                mOriginalCallback.onServiceDiscovered(new PeerHandle(msg.arg1),
-                                        msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
-                                        matchFilter);
-                            } else {
-                                mOriginalCallback.onServiceDiscoveredWithinRange(
-                                        new PeerHandle(msg.arg1),
-                                        msg.getData().getByteArray(MESSAGE_BUNDLE_KEY_MESSAGE),
-                                        matchFilter, msg.arg2);
-                            }
-                            break;
-                        }
-                        case CALLBACK_MESSAGE_SEND_SUCCESS:
-                            mOriginalCallback.onMessageSendSucceeded(msg.arg1);
-                            break;
-                        case CALLBACK_MESSAGE_SEND_FAIL:
-                            mOriginalCallback.onMessageSendFailed(msg.arg1);
-                            break;
-                        case CALLBACK_MESSAGE_RECEIVED:
-                            mOriginalCallback.onMessageReceived(new PeerHandle(msg.arg1),
-                                    (byte[]) msg.obj);
-                            break;
-                    }
-                }
-            };
-        }
-
-        @Override
-        public void onSessionStarted(int sessionId) {
-            if (VDBG) Log.v(TAG, "onSessionStarted: sessionId=" + sessionId);
-
-            Message msg = mHandler.obtainMessage(CALLBACK_SESSION_STARTED);
-            msg.arg1 = sessionId;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onSessionConfigSuccess() {
-            if (VDBG) Log.v(TAG, "onSessionConfigSuccess");
-
-            Message msg = mHandler.obtainMessage(CALLBACK_SESSION_CONFIG_SUCCESS);
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onSessionConfigFail(int reason) {
-            if (VDBG) Log.v(TAG, "onSessionConfigFail: reason=" + reason);
-
-            Message msg = mHandler.obtainMessage(CALLBACK_SESSION_CONFIG_FAIL);
-            msg.arg1 = reason;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onSessionTerminated(int reason) {
-            if (VDBG) Log.v(TAG, "onSessionTerminated: reason=" + reason);
-
-            Message msg = mHandler.obtainMessage(CALLBACK_SESSION_TERMINATED);
-            msg.arg1 = reason;
-            mHandler.sendMessage(msg);
-        }
-
-        private void onMatchCommon(int messageType, int peerId, byte[] serviceSpecificInfo,
-                byte[] matchFilter, int distanceMm) {
-            Bundle data = new Bundle();
-            data.putByteArray(MESSAGE_BUNDLE_KEY_MESSAGE, serviceSpecificInfo);
-            data.putByteArray(MESSAGE_BUNDLE_KEY_MESSAGE2, matchFilter);
-
-            Message msg = mHandler.obtainMessage(messageType);
-            msg.arg1 = peerId;
-            msg.arg2 = distanceMm;
-            msg.setData(data);
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onMatch(int peerId, byte[] serviceSpecificInfo, byte[] matchFilter) {
-            if (VDBG) Log.v(TAG, "onMatch: peerId=" + peerId);
-
-            onMatchCommon(CALLBACK_MATCH, peerId, serviceSpecificInfo, matchFilter, 0);
-        }
-
-        @Override
-        public void onMatchWithDistance(int peerId, byte[] serviceSpecificInfo, byte[] matchFilter,
-                int distanceMm) {
-            if (VDBG) {
-                Log.v(TAG, "onMatchWithDistance: peerId=" + peerId + ", distanceMm=" + distanceMm);
-            }
-
-            onMatchCommon(CALLBACK_MATCH_WITH_DISTANCE, peerId, serviceSpecificInfo, matchFilter,
-                    distanceMm);
-        }
-
-        @Override
-        public void onMessageSendSuccess(int messageId) {
-            if (VDBG) Log.v(TAG, "onMessageSendSuccess");
-
-            Message msg = mHandler.obtainMessage(CALLBACK_MESSAGE_SEND_SUCCESS);
-            msg.arg1 = messageId;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onMessageSendFail(int messageId, int reason) {
-            if (VDBG) Log.v(TAG, "onMessageSendFail: reason=" + reason);
-
-            Message msg = mHandler.obtainMessage(CALLBACK_MESSAGE_SEND_FAIL);
-            msg.arg1 = messageId;
-            msg.arg2 = reason;
-            mHandler.sendMessage(msg);
-        }
-
-        @Override
-        public void onMessageReceived(int peerId, byte[] message) {
-            if (VDBG) {
-                Log.v(TAG, "onMessageReceived: peerId=" + peerId);
-            }
-
-            Message msg = mHandler.obtainMessage(CALLBACK_MESSAGE_RECEIVED);
-            msg.arg1 = peerId;
-            msg.obj = message;
-            mHandler.sendMessage(msg);
-        }
-
-        /*
-         * Proxied methods
-         */
-        public void onProxySessionStarted(int sessionId) {
-            if (VDBG) Log.v(TAG, "Proxy: onSessionStarted: sessionId=" + sessionId);
-            if (mSession != null) {
-                Log.e(TAG,
-                        "onSessionStarted: sessionId=" + sessionId + ": session already created!?");
-                throw new IllegalStateException(
-                        "onSessionStarted: sessionId=" + sessionId + ": session already created!?");
-            }
-
-            WifiAwareManager mgr = mAwareManager.get();
-            if (mgr == null) {
-                Log.w(TAG, "onProxySessionStarted: mgr GC'd");
-                return;
-            }
-
-            if (mIsPublish) {
-                PublishDiscoverySession session = new PublishDiscoverySession(mgr,
-                        mClientId, sessionId);
-                mSession = session;
-                mOriginalCallback.onPublishStarted(session);
-            } else {
-                SubscribeDiscoverySession
-                        session = new SubscribeDiscoverySession(mgr, mClientId, sessionId);
-                mSession = session;
-                mOriginalCallback.onSubscribeStarted(session);
-            }
-        }
-
-        public void onProxySessionTerminated(int reason) {
-            if (VDBG) Log.v(TAG, "Proxy: onSessionTerminated: reason=" + reason);
-            if (mSession != null) {
-                mSession.setTerminated();
-                mSession = null;
-            } else {
-                Log.w(TAG, "Proxy: onSessionTerminated called but mSession is null!?");
-            }
-            mAwareManager.clear();
-            mOriginalCallback.onSessionTerminated();
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareNetworkInfo.java b/wifi/java/android/net/wifi/aware/WifiAwareNetworkInfo.java
deleted file mode 100644
index 60fe604..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareNetworkInfo.java
+++ /dev/null
@@ -1,182 +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.net.wifi.aware;
-
-import android.annotation.Nullable;
-import android.net.NetworkCapabilities;
-import android.net.TransportInfo;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.net.Inet6Address;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Objects;
-
-/**
- * Wi-Fi Aware-specific network information. The information can be extracted from the
- * {@link android.net.NetworkCapabilities} of the network using
- * {@link NetworkCapabilities#getTransportInfo()}.
- * The {@link NetworkCapabilities} is provided by the connectivity service to apps, e.g. received
- * through the
- * {@link android.net.ConnectivityManager.NetworkCallback#onCapabilitiesChanged(android.net.Network,
- * android.net.NetworkCapabilities)} callback.
- * <p>
- * The Wi-Fi Aware-specific network information include the peer's scoped link-local IPv6 address
- * for the Wi-Fi Aware link, as well as (optionally) the port and transport protocol specified by
- * the peer.
- * The scoped link-local IPv6, port, and transport protocol can then be used to create a
- * {@link java.net.Socket} connection to the peer.
- * <p>
- * Note: these are the peer's IPv6 and port information - not the local device's!
- */
-public final class WifiAwareNetworkInfo implements TransportInfo, Parcelable {
-    private Inet6Address mIpv6Addr;
-    private int mPort = 0; // a value of 0 is considered invalid
-    private int mTransportProtocol = -1; // a value of -1 is considered invalid
-
-    /** @hide */
-    public WifiAwareNetworkInfo(Inet6Address ipv6Addr) {
-        mIpv6Addr = ipv6Addr;
-    }
-
-    /** @hide */
-    public WifiAwareNetworkInfo(Inet6Address ipv6Addr, int port, int transportProtocol) {
-        mIpv6Addr = ipv6Addr;
-        mPort = port;
-        mTransportProtocol = transportProtocol;
-    }
-
-    /**
-     * Get the scoped link-local IPv6 address of the Wi-Fi Aware peer (not of the local device!).
-     *
-     * @return An IPv6 address.
-     */
-    @Nullable
-    public Inet6Address getPeerIpv6Addr() {
-        return mIpv6Addr;
-    }
-
-    /**
-     * Get the port number to be used to create a network connection to the Wi-Fi Aware peer.
-     * The port information is provided by the app running on the peer which requested the
-     * connection, using the {@link WifiAwareNetworkSpecifier.Builder#setPort(int)}.
-     *
-     * @return A port number on the peer. A value of 0 indicates that no port was specified by the
-     *         peer.
-     */
-    public int getPort() {
-        return mPort;
-    }
-
-    /**
-     * Get the transport protocol to be used to communicate over a network connection to the Wi-Fi
-     * Aware peer. The transport protocol is provided by the app running on the peer which requested
-     * the connection, using the
-     * {@link WifiAwareNetworkSpecifier.Builder#setTransportProtocol(int)}.
-     * <p>
-     * The transport protocol number is assigned by the Internet Assigned Numbers Authority
-     * (IANA) https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml.
-     *
-     * @return A transport protocol id. A value of -1 indicates that no transport protocol was
-     *         specified by the peer.
-     */
-    public int getTransportProtocol() {
-        return mTransportProtocol;
-    }
-
-    // parcelable methods
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeByteArray(mIpv6Addr.getAddress());
-        NetworkInterface ni = mIpv6Addr.getScopedInterface();
-        dest.writeString(ni == null ? null : ni.getName());
-        dest.writeInt(mPort);
-        dest.writeInt(mTransportProtocol);
-    }
-
-    public static final @android.annotation.NonNull Creator<WifiAwareNetworkInfo> CREATOR =
-            new Creator<WifiAwareNetworkInfo>() {
-                @Override
-                public WifiAwareNetworkInfo createFromParcel(Parcel in) {
-                    byte[] addr = in.createByteArray();
-                    String interfaceName = in.readString();
-                    int port = in.readInt();
-                    int transportProtocol = in.readInt();
-                    Inet6Address ipv6Addr;
-                    try {
-                        NetworkInterface ni = null;
-                        if (interfaceName != null) {
-                            try {
-                                ni = NetworkInterface.getByName(interfaceName);
-                            } catch (SocketException e) {
-                                e.printStackTrace();
-                            }
-                        }
-                        ipv6Addr = Inet6Address.getByAddress(null, addr, ni);
-                    } catch (UnknownHostException e) {
-                        e.printStackTrace();
-                        return new WifiAwareNetworkInfo(null);
-                    }
-                    return new WifiAwareNetworkInfo(ipv6Addr, port, transportProtocol);
-                }
-
-                @Override
-                public WifiAwareNetworkInfo[] newArray(int size) {
-                    return new WifiAwareNetworkInfo[size];
-                }
-            };
-
-
-    // object methods
-
-    @Override
-    public String toString() {
-        return new StringBuilder("AwareNetworkInfo: IPv6=").append(mIpv6Addr).append(
-                ", port=").append(mPort).append(", transportProtocol=").append(
-                mTransportProtocol).toString();
-    }
-
-    /** @hide */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof WifiAwareNetworkInfo)) {
-            return false;
-        }
-
-        WifiAwareNetworkInfo lhs = (WifiAwareNetworkInfo) obj;
-        return Objects.equals(mIpv6Addr, lhs.mIpv6Addr) && mPort == lhs.mPort
-                && mTransportProtocol == lhs.mTransportProtocol;
-    }
-
-    /** @hide */
-    @Override
-    public int hashCode() {
-        return Objects.hash(mIpv6Addr, mPort, mTransportProtocol);
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java b/wifi/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java
deleted file mode 100644
index 3547750..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareNetworkSpecifier.java
+++ /dev/null
@@ -1,446 +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.net.wifi.aware;
-
-import static android.net.wifi.aware.WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR;
-
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.net.NetworkSpecifier;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * Network specifier object used to request a Wi-Fi Aware network. Apps should use the
- * {@link WifiAwareNetworkSpecifier.Builder} class to create an instance.
- */
-public final class WifiAwareNetworkSpecifier extends NetworkSpecifier implements Parcelable {
-    /**
-     * TYPE: in band, specific peer: role, client_id, session_id, peer_id, pmk/passphrase optional
-     * @hide
-     */
-    public static final int NETWORK_SPECIFIER_TYPE_IB = 0;
-
-    /**
-     * TYPE: in band, any peer: role, client_id, session_id, pmk/passphrase optional
-     * [only permitted for RESPONDER]
-     * @hide
-     */
-    public static final int NETWORK_SPECIFIER_TYPE_IB_ANY_PEER = 1;
-
-    /**
-     * TYPE: out-of-band: role, client_id, peer_mac, pmk/passphrase optional
-     * @hide
-     */
-    public static final int NETWORK_SPECIFIER_TYPE_OOB = 2;
-
-    /**
-     * TYPE: out-of-band, any peer: role, client_id, pmk/passphrase optional
-     * [only permitted for RESPONDER]
-     * @hide
-     */
-    public static final int NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER = 3;
-
-    /** @hide */
-    public static final int NETWORK_SPECIFIER_TYPE_MAX_VALID = NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER;
-
-    /**
-     * One of the NETWORK_SPECIFIER_TYPE_* constants. The type of the network specifier object.
-     * @hide
-     */
-    public final int type;
-
-    /**
-     * The role of the device: WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR or
-     * WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER.
-     * @hide
-     */
-    public final int role;
-
-    /**
-     * The client ID of the device.
-     * @hide
-     */
-    public final int clientId;
-
-    /**
-     * The session ID in which context to request a data-path. Only relevant for IB requests.
-     * @hide
-     */
-    public final int sessionId;
-
-    /**
-     * The peer ID of the device which the data-path should be connected to. Only relevant for
-     * IB requests (i.e. not IB_ANY_PEER or OOB*).
-     * @hide
-     */
-    public final int peerId;
-
-    /**
-     * The peer MAC address of the device which the data-path should be connected to. Only relevant
-     * for OB requests (i.e. not OOB_ANY_PEER or IB*).
-     * @hide
-     */
-    public final byte[] peerMac;
-
-    /**
-     * The PMK of the requested data-path. Can be null. Only one or none of pmk or passphrase should
-     * be specified.
-     * @hide
-     */
-    public final byte[] pmk;
-
-    /**
-     * The Passphrase of the requested data-path. Can be null. Only one or none of the pmk or
-     * passphrase should be specified.
-     * @hide
-     */
-    public final String passphrase;
-
-    /**
-     * The port information to be used for this link. This information will be communicated to the
-     * peer as part of the layer 2 link setup.
-     *
-     * Information only allowed on secure links since a single layer-2 link is set up for all
-     * requestors. Therefore if multiple apps on a single device request links to the same peer
-     * device they all get the same link. However, the link is only set up on the first request -
-     * hence only the first can transmit the port information. But we don't want to expose that
-     * information to other apps. Limiting to secure links would (usually) imply single app usage.
-     *
-     * @hide
-     */
-    public final int port;
-
-    /**
-     * The transport protocol information to be used for this link. This information will be
-     * communicated to the peer as part of the layer 2 link setup.
-     *
-     * Information only allowed on secure links since a single layer-2 link is set up for all
-     * requestors. Therefore if multiple apps on a single device request links to the same peer
-     * device they all get the same link. However, the link is only set up on the first request -
-     * hence only the first can transmit the port information. But we don't want to expose that
-     * information to other apps. Limiting to secure links would (usually) imply single app usage.
-     *
-     * @hide
-     */
-    public final int transportProtocol;
-
-    /** @hide */
-    public WifiAwareNetworkSpecifier(int type, int role, int clientId, int sessionId, int peerId,
-            byte[] peerMac, byte[] pmk, String passphrase, int port, int transportProtocol) {
-        this.type = type;
-        this.role = role;
-        this.clientId = clientId;
-        this.sessionId = sessionId;
-        this.peerId = peerId;
-        this.peerMac = peerMac;
-        this.pmk = pmk;
-        this.passphrase = passphrase;
-        this.port = port;
-        this.transportProtocol = transportProtocol;
-    }
-
-    public static final @android.annotation.NonNull Creator<WifiAwareNetworkSpecifier> CREATOR =
-            new Creator<WifiAwareNetworkSpecifier>() {
-                @Override
-                public WifiAwareNetworkSpecifier createFromParcel(Parcel in) {
-                    return new WifiAwareNetworkSpecifier(
-                        in.readInt(), // type
-                        in.readInt(), // role
-                        in.readInt(), // clientId
-                        in.readInt(), // sessionId
-                        in.readInt(), // peerId
-                        in.createByteArray(), // peerMac
-                        in.createByteArray(), // pmk
-                        in.readString(), // passphrase
-                        in.readInt(), // port
-                        in.readInt()); // transportProtocol
-                }
-
-                @Override
-                public WifiAwareNetworkSpecifier[] newArray(int size) {
-                    return new WifiAwareNetworkSpecifier[size];
-                }
-            };
-
-    /**
-     * Indicates whether the network specifier specifies an OOB (out-of-band) data-path - i.e. a
-     * data-path created without a corresponding Aware discovery session.
-     *
-     * @hide
-     */
-    public boolean isOutOfBand() {
-        return type == NETWORK_SPECIFIER_TYPE_OOB || type == NETWORK_SPECIFIER_TYPE_OOB_ANY_PEER;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(type);
-        dest.writeInt(role);
-        dest.writeInt(clientId);
-        dest.writeInt(sessionId);
-        dest.writeInt(peerId);
-        dest.writeByteArray(peerMac);
-        dest.writeByteArray(pmk);
-        dest.writeString(passphrase);
-        dest.writeInt(port);
-        dest.writeInt(transportProtocol);
-    }
-
-    /** @hide */
-    @Override
-    public boolean canBeSatisfiedBy(NetworkSpecifier other) {
-        // MatchAllNetworkSpecifier is taken care in NetworkCapabilities#satisfiedBySpecifier.
-        if (other instanceof WifiAwareAgentNetworkSpecifier) {
-            return ((WifiAwareAgentNetworkSpecifier) other).satisfiesAwareNetworkSpecifier(this);
-        }
-        return equals(other);
-    }
-
-    /** @hide */
-    @Override
-    public int hashCode() {
-        return Objects.hash(type, role, clientId, sessionId, peerId, Arrays.hashCode(peerMac),
-                Arrays.hashCode(pmk), passphrase, port, transportProtocol);
-    }
-
-    /** @hide */
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-
-        if (!(obj instanceof WifiAwareNetworkSpecifier)) {
-            return false;
-        }
-
-        WifiAwareNetworkSpecifier lhs = (WifiAwareNetworkSpecifier) obj;
-
-        return type == lhs.type
-                && role == lhs.role
-                && clientId == lhs.clientId
-                && sessionId == lhs.sessionId
-                && peerId == lhs.peerId
-                && Arrays.equals(peerMac, lhs.peerMac)
-                && Arrays.equals(pmk, lhs.pmk)
-                && Objects.equals(passphrase, lhs.passphrase)
-                && port == lhs.port
-                && transportProtocol == lhs.transportProtocol;
-    }
-
-    /** @hide */
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder("WifiAwareNetworkSpecifier [");
-        sb.append("type=").append(type)
-                .append(", role=").append(role)
-                .append(", clientId=").append(clientId)
-                .append(", sessionId=").append(sessionId)
-                .append(", peerId=").append(peerId)
-                // masking potential PII (although low impact information)
-                .append(", peerMac=").append((peerMac == null) ? "<null>" : "<non-null>")
-                // masking PII
-                .append(", pmk=").append((pmk == null) ? "<null>" : "<non-null>")
-                // masking PII
-                .append(", passphrase=").append((passphrase == null) ? "<null>" : "<non-null>")
-                .append(", port=").append(port).append(", transportProtocol=")
-                .append(transportProtocol)
-                .append("]");
-        return sb.toString();
-    }
-
-    /**
-     * A builder class for a Wi-Fi Aware network specifier to set up an Aware connection with a
-     * peer.
-     */
-    public static final class Builder {
-        private DiscoverySession mDiscoverySession;
-        private PeerHandle mPeerHandle;
-        private String mPskPassphrase;
-        private byte[] mPmk;
-        private int mPort = 0; // invalid value
-        private int mTransportProtocol = -1; // invalid value
-
-        /**
-         * Create a builder for {@link WifiAwareNetworkSpecifier} used in requests to set up a
-         * Wi-Fi Aware connection with a peer.
-         *
-         * @param discoverySession A Wi-Fi Aware discovery session in whose context the connection
-         *                         is created.
-         * @param peerHandle The handle of the peer to which the Wi-Fi Aware connection is
-         *                   requested. The peer is discovered through Wi-Fi Aware discovery. The
-         *                   handle can be obtained through
-         * {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], java.util.List)}
-         *                   or
-         *                   {@link DiscoverySessionCallback#onMessageReceived(PeerHandle, byte[])}.
-         */
-        public Builder(@NonNull DiscoverySession discoverySession, @NonNull PeerHandle peerHandle) {
-            if (discoverySession == null) {
-                throw new IllegalArgumentException("Non-null discoverySession required");
-            }
-            if (peerHandle == null) {
-                throw new IllegalArgumentException("Non-null peerHandle required");
-            }
-            mDiscoverySession = discoverySession;
-            mPeerHandle = peerHandle;
-        }
-
-        /**
-         * Configure the PSK Passphrase for the Wi-Fi Aware connection being requested. This method
-         * is optional - if not called, then an Open (unencrypted) connection will be created.
-         *
-         * @param pskPassphrase The (optional) passphrase to be used to encrypt the link. Use the
-         *                      {@link #setPmk(byte[])} to specify a PMK.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setPskPassphrase(@NonNull String pskPassphrase) {
-            if (!WifiAwareUtils.validatePassphrase(pskPassphrase)) {
-                throw new IllegalArgumentException("Passphrase must meet length requirements");
-            }
-            mPskPassphrase = pskPassphrase;
-            return this;
-        }
-
-        /**
-         * Configure the PMK for the Wi-Fi Aware connection being requested. This method
-         * is optional - if not called, then an Open (unencrypted) connection will be created.
-         *
-         * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-         *            encrypting the data-path. Use the {@link #setPskPassphrase(String)} to
-         *            specify a Passphrase.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setPmk(@NonNull byte[] pmk) {
-            if (!WifiAwareUtils.validatePmk(pmk)) {
-                throw new IllegalArgumentException("PMK must 32 bytes");
-            }
-            mPmk = pmk;
-            return this;
-        }
-
-        /**
-         * Configure the port number which will be used to create a connection over this link. This
-         * configuration should only be done on the server device, e.g. the device creating the
-         * {@link java.net.ServerSocket}.
-         * <p>Notes:
-         * <ul>
-         *     <li>The server device must be the Publisher device!
-         *     <li>The port information can only be specified on secure links, specified using
-         *     {@link #setPskPassphrase(String)} or {@link #setPmk(byte[])}.
-         * </ul>
-         *
-         * @param port A positive integer indicating the port to be used for communication.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull Builder setPort(@IntRange(from = 0, to = 65535) int port) {
-            if (port <= 0 || port > 65535) {
-                throw new IllegalArgumentException("The port must be a positive value (0, 65535]");
-            }
-            mPort = port;
-            return this;
-        }
-
-        /**
-         * Configure the transport protocol which will be used to create a connection over this
-         * link. This configuration should only be done on the server device, e.g. the device
-         * creating the {@link java.net.ServerSocket} for TCP.
-         * <p>Notes:
-         * <ul>
-         *     <li>The server device must be the Publisher device!
-         *     <li>The transport protocol information can only be specified on secure links,
-         *     specified using {@link #setPskPassphrase(String)} or {@link #setPmk(byte[])}.
-         * </ul>
-         * The transport protocol number is assigned by the Internet Assigned Numbers Authority
-         * (IANA) https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml.
-         *
-         * @param transportProtocol The transport protocol to be used for communication.
-         * @return the current {@link Builder} builder, enabling chaining of builder
-         *         methods.
-         */
-        public @NonNull
-                Builder setTransportProtocol(@IntRange(from = 0, to = 255) int transportProtocol) {
-            if (transportProtocol < 0 || transportProtocol > 255) {
-                throw new IllegalArgumentException(
-                        "The transport protocol must be in range [0, 255]");
-            }
-            mTransportProtocol = transportProtocol;
-            return this;
-        }
-
-        /**
-         * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)}
-         * for a WiFi Aware connection (link) to the specified peer. The
-         * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-         * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-         * <p> The default builder constructor will initialize a NetworkSpecifier which requests an
-         * open (non-encrypted) link. To request an encrypted link use the
-         * {@link #setPskPassphrase(String)} or {@link #setPmk(byte[])} builder methods.
-         *
-         * @return A {@link NetworkSpecifier} to be used to construct
-         * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass
-         * to {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-         * android.net.ConnectivityManager.NetworkCallback)}
-         * [or other varieties of that API].
-         */
-        public @NonNull WifiAwareNetworkSpecifier build() {
-            if (mDiscoverySession == null) {
-                throw new IllegalStateException("Null discovery session!?");
-            }
-            if (mPeerHandle == null) {
-                throw new IllegalStateException("Null peerHandle!?");
-            }
-            if (mPskPassphrase != null & mPmk != null) {
-                throw new IllegalStateException(
-                        "Can only specify a Passphrase or a PMK - not both!");
-            }
-
-            int role = mDiscoverySession instanceof SubscribeDiscoverySession
-                    ? WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                    : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER;
-
-            if (mPort != 0 || mTransportProtocol != -1) {
-                if (role != WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER) {
-                    throw new IllegalStateException(
-                            "Port and transport protocol information can only "
-                                    + "be specified on the Publisher device (which is the server");
-                }
-                if (TextUtils.isEmpty(mPskPassphrase) && mPmk == null) {
-                    throw new IllegalStateException("Port and transport protocol information can "
-                            + "only be specified on a secure link");
-                }
-            }
-
-            return new WifiAwareNetworkSpecifier(
-                    WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_IB, role,
-                    mDiscoverySession.mClientId, mDiscoverySession.mSessionId, mPeerHandle.peerId,
-                    null, mPmk, mPskPassphrase, mPort, mTransportProtocol);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareSession.java b/wifi/java/android/net/wifi/aware/WifiAwareSession.java
deleted file mode 100644
index fe0872c..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareSession.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.NetworkSpecifier;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.Looper;
-import android.util.CloseGuard;
-import android.util.Log;
-
-import com.android.internal.annotations.VisibleForTesting;
-
-import java.lang.ref.Reference;
-import java.lang.ref.WeakReference;
-
-/**
- * This class represents a Wi-Fi Aware session - an attachment to the Wi-Fi Aware service through
- * which the app can execute discovery operations.
- */
-public class WifiAwareSession implements AutoCloseable {
-    private static final String TAG = "WifiAwareSession";
-    private static final boolean DBG = false;
-    private static final boolean VDBG = false; // STOPSHIP if true
-
-    private final WeakReference<WifiAwareManager> mMgr;
-    private final Binder mBinder;
-    private final int mClientId;
-
-    private boolean mTerminated = true;
-    private final CloseGuard mCloseGuard = new CloseGuard();
-
-    /** @hide */
-    public WifiAwareSession(WifiAwareManager manager, Binder binder, int clientId) {
-        if (VDBG) Log.v(TAG, "New session created: manager=" + manager + ", clientId=" + clientId);
-
-        mMgr = new WeakReference<>(manager);
-        mBinder = binder;
-        mClientId = clientId;
-        mTerminated = false;
-
-        mCloseGuard.open("close");
-    }
-
-    /**
-     * Destroy the Wi-Fi Aware service session and, if no other applications are attached to Aware,
-     * also disable Aware. This method destroys all outstanding operations - i.e. all publish and
-     * subscribes are terminated, and any outstanding data-links are shut-down. However, it is
-     * good practice to destroy these discovery sessions and connections explicitly before a
-     * session-wide destroy.
-     * <p>
-     * An application may re-attach after a destroy using
-     * {@link WifiAwareManager#attach(AttachCallback, Handler)} .
-     */
-    @Override
-    public void close() {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.w(TAG, "destroy: called post GC on WifiAwareManager");
-            return;
-        }
-        mgr.disconnect(mClientId, mBinder);
-        mTerminated = true;
-        mMgr.clear();
-        mCloseGuard.close();
-        Reference.reachabilityFence(this);
-    }
-
-    /** @hide */
-    @Override
-    protected void finalize() throws Throwable {
-        try {
-            if (mCloseGuard != null) {
-                mCloseGuard.warnIfOpen();
-            }
-
-            if (!mTerminated) {
-                close();
-            }
-        } finally {
-            super.finalize();
-        }
-    }
-
-    /**
-     * Access the client ID of the Aware session.
-     *
-     * Note: internal visibility for testing.
-     *
-     * @return The internal client ID.
-     *
-     * @hide
-     */
-    @VisibleForTesting
-    public int getClientId() {
-        return mClientId;
-    }
-
-    /**
-     * Issue a request to the Aware service to create a new Aware publish discovery session, using
-     * the specified {@code publishConfig} configuration. The results of the publish operation
-     * are routed to the callbacks of {@link DiscoverySessionCallback}:
-     * <ul>
-     *     <li>
-     *     {@link DiscoverySessionCallback#onPublishStarted(
-     *PublishDiscoverySession)}
-     *     is called when the publish session is created and provides a handle to the session.
-     *     Further operations on the publish session can be executed on that object.
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigFailed()} is called if the
-     *     publish operation failed.
-     * </ul>
-     * <p>
-     * Other results of the publish session operations will also be routed to callbacks
-     * on the {@code callback} object. The resulting publish session can be modified using
-     * {@link PublishDiscoverySession#updatePublish(PublishConfig)}.
-     * <p>
-     *      An application must use the {@link DiscoverySession#close()} to
-     *      terminate the publish discovery session once it isn't needed. This will free
-     *      resources as well terminate any on-air transmissions.
-     * <p>The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
-     * permission to start a publish discovery session.
-     *
-     * @param publishConfig The {@link PublishConfig} specifying the
-     *            configuration of the requested publish session.
-     * @param callback A {@link DiscoverySessionCallback} derived object to be used for
-     *                 session event callbacks.
-     * @param handler The Handler on whose thread to execute the callbacks of the {@code
-     * callback} object. If a null is provided then the application's main thread will be used.
-     */
-    public void publish(@NonNull PublishConfig publishConfig,
-            @NonNull DiscoverySessionCallback callback, @Nullable Handler handler) {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.e(TAG, "publish: called post GC on WifiAwareManager");
-            return;
-        }
-        if (mTerminated) {
-            Log.e(TAG, "publish: called after termination");
-            return;
-        }
-        mgr.publish(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(),
-                publishConfig, callback);
-    }
-
-    /**
-     * Issue a request to the Aware service to create a new Aware subscribe discovery session, using
-     * the specified {@code subscribeConfig} configuration. The results of the subscribe
-     * operation are routed to the callbacks of {@link DiscoverySessionCallback}:
-     * <ul>
-     *     <li>
-     *  {@link DiscoverySessionCallback#onSubscribeStarted(
-     *SubscribeDiscoverySession)}
-     *     is called when the subscribe session is created and provides a handle to the session.
-     *     Further operations on the subscribe session can be executed on that object.
-     *     <li>{@link DiscoverySessionCallback#onSessionConfigFailed()} is called if the
-     *     subscribe operation failed.
-     * </ul>
-     * <p>
-     * Other results of the subscribe session operations will also be routed to callbacks
-     * on the {@code callback} object. The resulting subscribe session can be modified using
-     * {@link SubscribeDiscoverySession#updateSubscribe(SubscribeConfig)}.
-     * <p>
-     *      An application must use the {@link DiscoverySession#close()} to
-     *      terminate the subscribe discovery session once it isn't needed. This will free
-     *      resources as well terminate any on-air transmissions.
-     * <p>The application must have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION}
-     * permission to start a subscribe discovery session.
-     *
-     * @param subscribeConfig The {@link SubscribeConfig} specifying the
-     *            configuration of the requested subscribe session.
-     * @param callback A {@link DiscoverySessionCallback} derived object to be used for
-     *                 session event callbacks.
-     * @param handler The Handler on whose thread to execute the callbacks of the {@code
-     * callback} object. If a null is provided then the application's main thread will be used.
-     */
-    public void subscribe(@NonNull SubscribeConfig subscribeConfig,
-            @NonNull DiscoverySessionCallback callback, @Nullable Handler handler) {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.e(TAG, "publish: called post GC on WifiAwareManager");
-            return;
-        }
-        if (mTerminated) {
-            Log.e(TAG, "publish: called after termination");
-            return;
-        }
-        mgr.subscribe(mClientId, (handler == null) ? Looper.getMainLooper() : handler.getLooper(),
-                subscribeConfig, callback);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an unencrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     *     This API is targeted for applications which can obtain the peer MAC address using OOB
-     *     (out-of-band) discovery. Aware discovery does not provide the MAC address of the peer -
-     *     when using Aware discovery use the alternative network specifier method -
-     *     {@link android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder}.
-     * <p>
-     * To set up an encrypted link use the
-     * {@link #createNetworkSpecifierPassphrase(int, byte[], String)} API.
-     *
-     * @param role  The role of this device:
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
-     * @param peer  The MAC address of the peer's Aware discovery interface. On a RESPONDER this
-     *              value is used to gate the acceptance of a connection request from only that
-     *              peer.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     */
-    public NetworkSpecifier createNetworkSpecifierOpen(
-            @WifiAwareManager.DataPathRole int role, @NonNull byte[] peer) {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.e(TAG, "createNetworkSpecifierOpen: called post GC on WifiAwareManager");
-            return null;
-        }
-        if (mTerminated) {
-            Log.e(TAG, "createNetworkSpecifierOpen: called after termination");
-            return null;
-        }
-        return mgr.createNetworkSpecifier(mClientId, role, peer, null, null);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an encrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     *     This API is targeted for applications which can obtain the peer MAC address using OOB
-     *     (out-of-band) discovery. Aware discovery does not provide the MAC address of the peer -
-     *     when using Aware discovery use the alternative network specifier method -
-     *     {@link android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder}.
-     *
-     * @param role  The role of this device:
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
-     * @param peer  The MAC address of the peer's Aware discovery interface. On a RESPONDER this
-     *              value is used to gate the acceptance of a connection request from only that
-     *              peer.
-     * @param passphrase The passphrase to be used to encrypt the link. The PMK is generated from
-     *                   the passphrase. Use {@link #createNetworkSpecifierOpen(int, byte[])} to
-     *                   specify an open (unencrypted) link.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     */
-    public NetworkSpecifier createNetworkSpecifierPassphrase(
-            @WifiAwareManager.DataPathRole int role, @NonNull byte[] peer,
-            @NonNull String passphrase) {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.e(TAG, "createNetworkSpecifierPassphrase: called post GC on WifiAwareManager");
-            return null;
-        }
-        if (mTerminated) {
-            Log.e(TAG, "createNetworkSpecifierPassphrase: called after termination");
-            return null;
-        }
-        if (!WifiAwareUtils.validatePassphrase(passphrase)) {
-            throw new IllegalArgumentException("Passphrase must meet length requirements");
-        }
-
-        return mgr.createNetworkSpecifier(mClientId, role, peer, null, passphrase);
-    }
-
-    /**
-     * Create a {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} for
-     * an encrypted WiFi Aware connection (link) to the specified peer. The
-     * {@link android.net.NetworkRequest.Builder#addTransportType(int)} should be set to
-     * {@link android.net.NetworkCapabilities#TRANSPORT_WIFI_AWARE}.
-     * <p>
-     *     This API is targeted for applications which can obtain the peer MAC address using OOB
-     *     (out-of-band) discovery. Aware discovery does not provide the MAC address of the peer -
-     *     when using Aware discovery use the alternative network specifier method -
-     *     {@link android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder}.
-     *
-     * @param role  The role of this device:
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
-     *              {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
-     * @param peer  The MAC address of the peer's Aware discovery interface. On a RESPONDER this
-     *              value is used to gate the acceptance of a connection request from only that
-     *              peer.
-     * @param pmk A PMK (pairwise master key, see IEEE 802.11i) specifying the key to use for
-     *            encrypting the data-path. Use the
-     *            {@link #createNetworkSpecifierPassphrase(int, byte[], String)} to specify a
-     *            Passphrase or {@link #createNetworkSpecifierOpen(int, byte[])} to specify an
-     *            open (unencrypted) link.
-     *
-     * @return A {@link NetworkSpecifier} to be used to construct
-     * {@link android.net.NetworkRequest.Builder#setNetworkSpecifier(NetworkSpecifier)} to pass to
-     * {@link android.net.ConnectivityManager#requestNetwork(android.net.NetworkRequest,
-     * android.net.ConnectivityManager.NetworkCallback)}
-     * [or other varieties of that API].
-     *
-     * @hide
-     */
-    @SystemApi
-    public NetworkSpecifier createNetworkSpecifierPmk(
-            @WifiAwareManager.DataPathRole int role, @NonNull byte[] peer, @NonNull byte[] pmk) {
-        WifiAwareManager mgr = mMgr.get();
-        if (mgr == null) {
-            Log.e(TAG, "createNetworkSpecifierPmk: called post GC on WifiAwareManager");
-            return null;
-        }
-        if (mTerminated) {
-            Log.e(TAG, "createNetworkSpecifierPmk: called after termination");
-            return null;
-        }
-        if (!WifiAwareUtils.validatePmk(pmk)) {
-            throw new IllegalArgumentException("PMK must 32 bytes");
-        }
-        return mgr.createNetworkSpecifier(mClientId, role, peer, pmk, null);
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/WifiAwareUtils.java b/wifi/java/android/net/wifi/aware/WifiAwareUtils.java
deleted file mode 100644
index 3ece93d..0000000
--- a/wifi/java/android/net/wifi/aware/WifiAwareUtils.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import android.content.Context;
-import android.content.pm.PackageManager;
-import android.hardware.wifi.V1_0.Constants;
-
-/**
- * Provides utilities for the Wifi Aware manager/service.
- *
- * @hide
- */
-public class WifiAwareUtils {
-    /**
-     * Per spec: The Service Name is a UTF-8 encoded string from 1 to 255 bytes in length. The
-     * only acceptable single-byte UTF-8 symbols for a Service Name are alphanumeric values (A-Z,
-     * a-z, 0-9), the hyphen ('-'), and the period ('.'). All valid multi-byte UTF-8 characters
-     * are acceptable in a Service Name.
-     */
-    public static void validateServiceName(byte[] serviceNameData) throws IllegalArgumentException {
-        if (serviceNameData == null) {
-            throw new IllegalArgumentException("Invalid service name - null");
-        }
-
-        if (serviceNameData.length < 1 || serviceNameData.length > 255) {
-            throw new IllegalArgumentException("Invalid service name length - must be between "
-                    + "1 and 255 bytes (UTF-8 encoding)");
-        }
-
-        int index = 0;
-        while (index < serviceNameData.length) {
-            byte b = serviceNameData[index];
-            if ((b & 0x80) == 0x00) {
-                if (!((b >= '0' && b <= '9') || (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z')
-                        || b == '-' || b == '.')) {
-                    throw new IllegalArgumentException("Invalid service name - illegal characters,"
-                            + " allowed = (0-9, a-z,A-Z, -, .)");
-                }
-            }
-            ++index;
-        }
-    }
-
-    /**
-     * Validates that the passphrase is a non-null string of the right size (per the HAL min/max
-     * length parameters).
-     *
-     * @param passphrase Passphrase to test
-     * @return true if passphrase is valid, false if not
-     */
-    public static boolean validatePassphrase(String passphrase) {
-        if (passphrase == null
-                || passphrase.length() < Constants.NanParamSizeLimits.MIN_PASSPHRASE_LENGTH
-                || passphrase.length() > Constants.NanParamSizeLimits.MAX_PASSPHRASE_LENGTH) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Validates that the PMK is a non-null byte array of the right size (32 bytes per spec).
-     *
-     * @param pmk PMK to test
-     * @return true if PMK is valid, false if not
-     */
-    public static boolean validatePmk(byte[] pmk) {
-        if (pmk == null || pmk.length != 32) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns true if the App version is older than minVersion.
-     */
-    public static boolean isLegacyVersion(Context context, int minVersion) {
-        try {
-            if (context.getPackageManager().getApplicationInfo(context.getOpPackageName(), 0)
-                    .targetSdkVersion < minVersion) {
-                return true;
-            }
-        } catch (PackageManager.NameNotFoundException e) {
-            // In case of exception, assume known app (more strict checking)
-            // Note: This case will never happen since checkPackage is
-            // called to verify valididity before checking App's version.
-        }
-        return false;
-    }
-}
diff --git a/wifi/java/android/net/wifi/aware/package.html b/wifi/java/android/net/wifi/aware/package.html
deleted file mode 100644
index c4f2e1f..0000000
--- a/wifi/java/android/net/wifi/aware/package.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<HTML>
-<BODY>
-<p>Provides classes which allow applications to use Wi-Fi Aware to discover peers and create
-    connections to them.</p>
-<p>Using the Wi-Fi Aware APIs, applications can advertise services, discover peers which are
-    advertising services, and connect to them.
-    Wi-Fi Aware is independent of Wi-Fi infrastructure (i.e. a device may or may
-    not be associated with an AP concurrent to using Wi-Fi Aware). </p>
-<p>The primary entry point to Wi-Fi Aware capabilities is the
-    {@link android.net.wifi.aware.WifiAwareManager} class, which is acquired by calling
-    {@link android.content.Context#getSystemService(String)
-    Context.getSystemService(Context.WIFI_AWARE_SERVICE)}</p>
-
-<p>Some APIs may require the following user permissions:</p>
-<ul>
-    <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li>
-    <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li>
-    <li>{@link android.Manifest.permission#ACCESS_FINE_LOCATION}</li>
-</ul>
-
-<p class="note"><strong>Note:</strong> Not all Android-powered devices support Wi-Fi Aware
-    functionality.
-    If your application only works with Wi-Fi Aware (i.e. it should only be installed on devices which
-    support Wi-Fi Aware), declare so with a <a
-            href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
-        {@code <uses-feature>}</a>
-    element in the manifest file:</p>
-<pre>
-&lt;manifest ...>
-    &lt;uses-feature android:name="android.hardware.wifi.aware" />
-    ...
-&lt;/manifest>
-</pre>
-<p>Alternatively, if you application does not require Wi-Fi Aware but can take advantage of it if
-    available, you can perform
-    the check at run-time in your code using {@link
-    android.content.pm.PackageManager#hasSystemFeature(String)} with {@link
-    android.content.pm.PackageManager#FEATURE_WIFI_AWARE}:</p>
-<pre>
-    getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_AWARE)
-</pre>
-</BODY>
-</HTML>
diff --git a/wifi/java/android/net/wifi/hotspot2/ConfigParser.java b/wifi/java/android/net/wifi/hotspot2/ConfigParser.java
deleted file mode 100644
index bb01365..0000000
--- a/wifi/java/android/net/wifi/hotspot2/ConfigParser.java
+++ /dev/null
@@ -1,486 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2;
-
-import android.net.wifi.hotspot2.omadm.PpsMoParser;
-import android.text.TextUtils;
-import android.util.Base64;
-import android.util.Log;
-import android.util.Pair;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.LineNumberReader;
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.PrivateKey;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Utility class for building PasspointConfiguration from an installation file.
- */
-public final class ConfigParser {
-    private static final String TAG = "ConfigParser";
-
-    // Header names.
-    private static final String CONTENT_TYPE = "Content-Type";
-    private static final String CONTENT_TRANSFER_ENCODING = "Content-Transfer-Encoding";
-
-    // MIME types.
-    private static final String TYPE_MULTIPART_MIXED = "multipart/mixed";
-    private static final String TYPE_WIFI_CONFIG = "application/x-wifi-config";
-    private static final String TYPE_PASSPOINT_PROFILE = "application/x-passpoint-profile";
-    private static final String TYPE_CA_CERT = "application/x-x509-ca-cert";
-    private static final String TYPE_PKCS12 = "application/x-pkcs12";
-
-    private static final String ENCODING_BASE64 = "base64";
-    private static final String BOUNDARY = "boundary=";
-
-    /**
-     * Class represent a MIME (Multipurpose Internet Mail Extension) part.
-     */
-    private static class MimePart {
-        /**
-         * Content type of the part.
-         */
-        public String type = null;
-
-        /**
-         * Decoded data.
-         */
-        public byte[] data = null;
-
-        /**
-         * Flag indicating if this is the last part (ending with --{boundary}--).
-         */
-        public boolean isLast = false;
-    }
-
-    /**
-     * Class represent the MIME (Multipurpose Internet Mail Extension) header.
-     */
-    private static class MimeHeader {
-        /**
-         * Content type.
-         */
-        public String contentType = null;
-
-        /**
-         * Boundary string (optional), only applies for the outter MIME header.
-         */
-        public String boundary = null;
-
-        /**
-         * Encoding type.
-         */
-        public String encodingType = null;
-    }
-
-    /**
-     * @hide
-     */
-    public ConfigParser() {}
-
-    /**
-     * Parse the Hotspot 2.0 Release 1 configuration data into a {@link PasspointConfiguration}
-     * object.  The configuration data is a base64 encoded MIME multipart data.  Below is
-     * the format of the decoded message:
-     *
-     * Content-Type: multipart/mixed; boundary={boundary}
-     * Content-Transfer-Encoding: base64
-     * [Skip uninterested headers]
-     *
-     * --{boundary}
-     * Content-Type: application/x-passpoint-profile
-     * Content-Transfer-Encoding: base64
-     *
-     * [base64 encoded Passpoint profile data]
-     * --{boundary}
-     * Content-Type: application/x-x509-ca-cert
-     * Content-Transfer-Encoding: base64
-     *
-     * [base64 encoded X509 CA certificate data]
-     * --{boundary}
-     * Content-Type: application/x-pkcs12
-     * Content-Transfer-Encoding: base64
-     *
-     * [base64 encoded PKCS#12 ASN.1 structure containing client certificate chain]
-     * --{boundary}
-     *
-     * @param mimeType MIME type of the encoded data.
-     * @param data A base64 encoded MIME multipart message containing the Passpoint profile
-     *             (required), CA (Certificate Authority) certificate (optional), and client
-     *             certificate chain (optional).
-     * @return {@link PasspointConfiguration}
-     */
-    public static PasspointConfiguration parsePasspointConfig(String mimeType, byte[] data) {
-        // Verify MIME type.
-        if (!TextUtils.equals(mimeType, TYPE_WIFI_CONFIG)) {
-            Log.e(TAG, "Unexpected MIME type: " + mimeType);
-            return null;
-        }
-
-        try {
-            // Decode the data.
-            byte[] decodedData = Base64.decode(new String(data, StandardCharsets.ISO_8859_1),
-                    Base64.DEFAULT);
-            Map<String, byte[]> mimeParts = parseMimeMultipartMessage(new LineNumberReader(
-                    new InputStreamReader(new ByteArrayInputStream(decodedData),
-                            StandardCharsets.ISO_8859_1)));
-            return createPasspointConfig(mimeParts);
-        } catch (IOException | IllegalArgumentException e) {
-            Log.e(TAG, "Failed to parse installation file: " + e.getMessage());
-            return null;
-        }
-    }
-
-    /**
-     * Create a {@link PasspointConfiguration} object from list of MIME (Multipurpose Internet
-     * Mail Extension) parts.
-     *
-     * @param mimeParts Map of content type and content data.
-     * @return {@link PasspointConfiguration}
-     * @throws IOException
-     */
-    private static PasspointConfiguration createPasspointConfig(Map<String, byte[]> mimeParts)
-            throws IOException {
-        byte[] profileData = mimeParts.get(TYPE_PASSPOINT_PROFILE);
-        if (profileData == null) {
-            throw new IOException("Missing Passpoint Profile");
-        }
-
-        PasspointConfiguration config = PpsMoParser.parseMoText(new String(profileData));
-        if (config == null) {
-            throw new IOException("Failed to parse Passpoint profile");
-        }
-
-        // Credential is needed for storing the certificates and private client key.
-        if (config.getCredential() == null) {
-            throw new IOException("Passpoint profile missing credential");
-        }
-
-        // Don't allow the installer to make changes to the update identifier. This is an
-        // indicator of an R2 (or newer) network.
-        if (config.getUpdateIdentifier() != Integer.MIN_VALUE) {
-            config.setUpdateIdentifier(Integer.MIN_VALUE);
-        }
-
-        // Parse CA (Certificate Authority) certificate.
-        byte[] caCertData = mimeParts.get(TYPE_CA_CERT);
-        if (caCertData != null) {
-            try {
-                config.getCredential().setCaCertificate(parseCACert(caCertData));
-            } catch (CertificateException e) {
-                throw new IOException("Failed to parse CA Certificate");
-            }
-        }
-
-        // Parse PKCS12 data for client private key and certificate chain.
-        byte[] pkcs12Data = mimeParts.get(TYPE_PKCS12);
-        if (pkcs12Data != null) {
-            try {
-                Pair<PrivateKey, List<X509Certificate>> clientKey = parsePkcs12(pkcs12Data);
-                config.getCredential().setClientPrivateKey(clientKey.first);
-                config.getCredential().setClientCertificateChain(
-                        clientKey.second.toArray(new X509Certificate[clientKey.second.size()]));
-            } catch(GeneralSecurityException | IOException e) {
-                throw new IOException("Failed to parse PCKS12 string");
-            }
-        }
-        return config;
-    }
-
-    /**
-     * Parse a MIME (Multipurpose Internet Mail Extension) multipart message from the given
-     * input stream.
-     *
-     * @param in The input stream for reading the message data
-     * @return A map of a content type and content data pair
-     * @throws IOException
-     */
-    private static Map<String, byte[]> parseMimeMultipartMessage(LineNumberReader in)
-            throws IOException {
-        // Parse the outer MIME header.
-        MimeHeader header = parseHeaders(in);
-        if (!TextUtils.equals(header.contentType, TYPE_MULTIPART_MIXED)) {
-            throw new IOException("Invalid content type: " + header.contentType);
-        }
-        if (TextUtils.isEmpty(header.boundary)) {
-            throw new IOException("Missing boundary string");
-        }
-        if (!TextUtils.equals(header.encodingType, ENCODING_BASE64)) {
-            throw new IOException("Unexpected encoding: " + header.encodingType);
-        }
-
-        // Read pass the first boundary string.
-        for (;;) {
-            String line = in.readLine();
-            if (line == null) {
-                throw new IOException("Unexpected EOF before first boundary @ " +
-                        in.getLineNumber());
-            }
-            if (line.equals("--" + header.boundary)) {
-                break;
-            }
-        }
-
-        // Parse each MIME part.
-        Map<String, byte[]> mimeParts = new HashMap<>();
-        boolean isLast = false;
-        do {
-            MimePart mimePart = parseMimePart(in, header.boundary);
-            mimeParts.put(mimePart.type, mimePart.data);
-            isLast = mimePart.isLast;
-        } while(!isLast);
-        return mimeParts;
-    }
-
-    /**
-     * Parse a MIME (Multipurpose Internet Mail Extension) part.  We expect the data to
-     * be encoded in base64.
-     *
-     * @param in Input stream to read the data from
-     * @param boundary Boundary string indicate the end of the part
-     * @return {@link MimePart}
-     * @throws IOException
-     */
-    private static MimePart parseMimePart(LineNumberReader in, String boundary)
-            throws IOException {
-        MimeHeader header = parseHeaders(in);
-        // Expect encoding type to be base64.
-        if (!TextUtils.equals(header.encodingType, ENCODING_BASE64)) {
-            throw new IOException("Unexpected encoding type: " + header.encodingType);
-        }
-
-        // Check for a valid content type.
-        if (!TextUtils.equals(header.contentType, TYPE_PASSPOINT_PROFILE) &&
-                !TextUtils.equals(header.contentType, TYPE_CA_CERT) &&
-                !TextUtils.equals(header.contentType, TYPE_PKCS12)) {
-            throw new IOException("Unexpected content type: " + header.contentType);
-        }
-
-        StringBuilder text = new StringBuilder();
-        boolean isLast = false;
-        String partBoundary = "--" + boundary;
-        String endBoundary = partBoundary + "--";
-        for (;;) {
-            String line = in.readLine();
-            if (line == null) {
-                throw new IOException("Unexpected EOF file in body @ " + in.getLineNumber());
-            }
-            // Check for boundary line.
-            if (line.startsWith(partBoundary)) {
-                if (line.equals(endBoundary)) {
-                    isLast = true;
-                }
-                break;
-            }
-            text.append(line);
-        }
-
-        MimePart part = new MimePart();
-        part.type = header.contentType;
-        part.data = Base64.decode(text.toString(), Base64.DEFAULT);
-        part.isLast = isLast;
-        return part;
-    }
-
-    /**
-     * Parse a MIME (Multipurpose Internet Mail Extension) header from the input stream.
-     * @param in Input stream to read from.
-     * @return {@link MimeHeader}
-     * @throws IOException
-     */
-    private static MimeHeader parseHeaders(LineNumberReader in)
-            throws IOException {
-        MimeHeader header = new MimeHeader();
-
-        // Read the header from the input stream.
-        Map<String, String> headers = readHeaders(in);
-
-        // Parse each header.
-        for (Map.Entry<String, String> entry : headers.entrySet()) {
-            switch (entry.getKey()) {
-                case CONTENT_TYPE:
-                    Pair<String, String> value = parseContentType(entry.getValue());
-                    header.contentType = value.first;
-                    header.boundary = value.second;
-                    break;
-                case CONTENT_TRANSFER_ENCODING:
-                    header.encodingType = entry.getValue();
-                    break;
-                default:
-                    Log.d(TAG, "Ignore header: " + entry.getKey());
-                    break;
-            }
-        }
-        return header;
-    }
-
-    /**
-     * Parse the Content-Type header value.  The value will contain the content type string and
-     * an optional boundary string separated by a ";".  Below are examples of valid Content-Type
-     * header value:
-     *   multipart/mixed; boundary={boundary}
-     *   application/x-passpoint-profile
-     *
-     * @param contentType The Content-Type value string
-     * @return A pair of content type and boundary string
-     * @throws IOException
-     */
-    private static Pair<String, String> parseContentType(String contentType) throws IOException {
-        String[] attributes = contentType.split(";");
-        String type = null;
-        String boundary = null;
-
-        if (attributes.length < 1) {
-            throw new IOException("Invalid Content-Type: " + contentType);
-        }
-
-        // The type is always the first attribute.
-        type = attributes[0].trim();
-        // Look for boundary string from the rest of the attributes.
-        for (int i = 1; i < attributes.length; i++) {
-            String attribute = attributes[i].trim();
-            if (!attribute.startsWith(BOUNDARY)) {
-                Log.d(TAG, "Ignore Content-Type attribute: " + attributes[i]);
-                continue;
-            }
-            boundary = attribute.substring(BOUNDARY.length());
-            // Remove the leading and trailing quote if present.
-            if (boundary.length() > 1 && boundary.startsWith("\"") && boundary.endsWith("\"")) {
-                boundary = boundary.substring(1, boundary.length()-1);
-            }
-        }
-
-        return new Pair<String, String>(type, boundary);
-    }
-
-    /**
-     * Read the headers from the given input stream.  The header section is terminated by
-     * an empty line.
-     *
-     * @param in The input stream to read from
-     * @return Map of key-value pairs.
-     * @throws IOException
-     */
-    private static Map<String, String> readHeaders(LineNumberReader in)
-            throws IOException {
-        Map<String, String> headers = new HashMap<>();
-        String line;
-        String name = null;
-        StringBuilder value = null;
-        for (;;) {
-            line = in.readLine();
-            if (line == null) {
-                throw new IOException("Missing line @ " + in.getLineNumber());
-            }
-
-            // End of headers section.
-            if (line.length() == 0 || line.trim().length() == 0) {
-                // Save the previous header line.
-                if (name != null) {
-                    headers.put(name, value.toString());
-                }
-                break;
-            }
-
-            int nameEnd = line.indexOf(':');
-            if (nameEnd < 0) {
-                if (value != null) {
-                    // Continuation line for the header value.
-                    value.append(' ').append(line.trim());
-                } else {
-                    throw new IOException("Bad header line: '" + line + "' @ " +
-                            in.getLineNumber());
-                }
-            } else {
-                // New header line detected, make sure it doesn't start with a whitespace.
-                if (Character.isWhitespace(line.charAt(0))) {
-                    throw new IOException("Illegal blank prefix in header line '" + line +
-                            "' @ " + in.getLineNumber());
-                }
-
-                if (name != null) {
-                    // Save the previous header line.
-                    headers.put(name, value.toString());
-                }
-
-                // Setup the current header line.
-                name = line.substring(0, nameEnd).trim();
-                value = new StringBuilder();
-                value.append(line.substring(nameEnd+1).trim());
-            }
-        }
-        return headers;
-    }
-
-    /**
-     * Parse a CA (Certificate Authority) certificate data and convert it to a
-     * X509Certificate object.
-     *
-     * @param octets Certificate data
-     * @return X509Certificate
-     * @throws CertificateException
-     */
-    private static X509Certificate parseCACert(byte[] octets) throws CertificateException {
-        CertificateFactory factory = CertificateFactory.getInstance("X.509");
-        return (X509Certificate) factory.generateCertificate(new ByteArrayInputStream(octets));
-    }
-
-    private static Pair<PrivateKey, List<X509Certificate>> parsePkcs12(byte[] octets)
-            throws GeneralSecurityException, IOException {
-        KeyStore ks = KeyStore.getInstance("PKCS12");
-        ByteArrayInputStream in = new ByteArrayInputStream(octets);
-        ks.load(in, new char[0]);
-        in.close();
-
-        // Only expects one set of key and certificate chain.
-        if (ks.size() != 1) {
-            throw new IOException("Unexpected key size: " + ks.size());
-        }
-
-        String alias = ks.aliases().nextElement();
-        if (alias == null) {
-            throw new IOException("No alias found");
-        }
-
-        PrivateKey clientKey = (PrivateKey) ks.getKey(alias, null);
-        List<X509Certificate> clientCertificateChain = null;
-        Certificate[] chain = ks.getCertificateChain(alias);
-        if (chain != null) {
-            clientCertificateChain = new ArrayList<>();
-            for (Certificate certificate : chain) {
-                if (!(certificate instanceof X509Certificate)) {
-                    throw new IOException("Unexpceted certificate type: " +
-                            certificate.getClass());
-                }
-                clientCertificateChain.add((X509Certificate) certificate);
-            }
-        }
-        return new Pair<PrivateKey, List<X509Certificate>>(clientKey, clientCertificateChain);
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/IProvisioningCallback.aidl b/wifi/java/android/net/wifi/hotspot2/IProvisioningCallback.aidl
deleted file mode 100644
index a6bdd5b6..0000000
--- a/wifi/java/android/net/wifi/hotspot2/IProvisioningCallback.aidl
+++ /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.
- */
-
-package android.net.wifi.hotspot2;
-
-/**
- * Interface for Provisioning callback.
- *
- * @hide
- */
-oneway interface IProvisioningCallback
-{
-    /**
-     * Service to manager callback providing failure notification
-     */
-    void onProvisioningFailure(int status);
-
-    /**
-     * Service to manager callback providing Provisioning status
-     */
-    void onProvisioningStatus(int status);
-
-    /**
-     * Service to manager callback providing completion of Provisioning/Remediation flow
-     */
-    void onProvisioningComplete();
-}
-
diff --git a/wifi/java/android/net/wifi/hotspot2/OsuProvider.java b/wifi/java/android/net/wifi/hotspot2/OsuProvider.java
deleted file mode 100644
index f0a0607..0000000
--- a/wifi/java/android/net/wifi/hotspot2/OsuProvider.java
+++ /dev/null
@@ -1,270 +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.net.wifi.hotspot2;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.Uri;
-import android.net.wifi.WifiSsid;
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Contained information for a Hotspot 2.0 OSU (Online Sign-Up provider).
- *
- * @hide
- */
-@SystemApi
-public final class OsuProvider implements Parcelable {
-    /**
-     * OSU (Online Sign-Up) method: OMA DM (Open Mobile Alliance Device Management).
-     * For more info, refer to Section 8.3 of the Hotspot 2.0 Release 2 Technical Specification.
-     * @hide
-     */
-    public static final int METHOD_OMA_DM = 0;
-
-    /**
-     * OSU (Online Sign-Up) method: SOAP XML SPP (Subscription Provisioning Protocol).
-     * For more info, refer to Section 8.4 of the Hotspot 2.0 Release 2 Technical Specification.
-     * @hide
-     */
-    public static final int METHOD_SOAP_XML_SPP = 1;
-
-    /**
-     * SSID of the network to connect for service sign-up.
-     */
-    private WifiSsid mOsuSsid;
-
-    /**
-     * Map of friendly names expressed as different language for the OSU provider.
-     */
-    private final Map<String, String> mFriendlyNames;
-
-    /**
-     * Description of the OSU provider.
-     */
-    private final String mServiceDescription;
-
-    /**
-     * URI to browse to for service sign-up.
-     */
-    private final Uri mServerUri;
-
-    /**
-     * Network Access Identifier used for authenticating with the OSU network when OSEN is used.
-     */
-    private final String mNetworkAccessIdentifier;
-
-    /**
-     * List of OSU (Online Sign-Up) method supported.
-     */
-    private final List<Integer> mMethodList;
-
-    /** @hide */
-    public OsuProvider(String osuSsid, Map<String, String> friendlyNames,
-            String serviceDescription, Uri serverUri, String nai, List<Integer> methodList) {
-        this(WifiSsid.createFromByteArray(osuSsid.getBytes(StandardCharsets.UTF_8)),
-                friendlyNames, serviceDescription, serverUri, nai, methodList);
-    }
-
-    /** @hide */
-    public OsuProvider(WifiSsid osuSsid, Map<String, String> friendlyNames,
-            String serviceDescription, Uri serverUri, String nai, List<Integer> methodList) {
-        mOsuSsid = osuSsid;
-        mFriendlyNames = friendlyNames;
-        mServiceDescription = serviceDescription;
-        mServerUri = serverUri;
-        mNetworkAccessIdentifier = nai;
-        if (methodList == null) {
-            mMethodList = new ArrayList<>();
-        } else {
-            mMethodList = new ArrayList<>(methodList);
-        }
-    }
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     * @hide
-     */
-    public OsuProvider(OsuProvider source) {
-        if (source == null) {
-            mOsuSsid = null;
-            mFriendlyNames = null;
-            mServiceDescription = null;
-            mServerUri = null;
-            mNetworkAccessIdentifier = null;
-            mMethodList = new ArrayList<>();
-            return;
-        }
-
-        mOsuSsid = source.mOsuSsid;
-        mFriendlyNames = source.mFriendlyNames;
-        mServiceDescription = source.mServiceDescription;
-        mServerUri = source.mServerUri;
-        mNetworkAccessIdentifier = source.mNetworkAccessIdentifier;
-        if (source.mMethodList == null) {
-            mMethodList = new ArrayList<>();
-        } else {
-            mMethodList = new ArrayList<>(source.mMethodList);
-        }
-    }
-
-    /** @hide */
-    public WifiSsid getOsuSsid() {
-        return mOsuSsid;
-    }
-
-    /** @hide */
-    public void setOsuSsid(WifiSsid osuSsid) {
-        mOsuSsid = osuSsid;
-    }
-
-    /**
-     * Return the friendly Name for current language from the list of friendly names of OSU
-     * provider.
-     *
-     * The string matching the default locale will be returned if it is found, otherwise the string
-     * in english or the first string in the list will be returned if english is not found.
-     * A null will be returned if the list is empty.
-     *
-     * @return String matching the default locale, null otherwise
-     */
-    public @Nullable String getFriendlyName() {
-        if (mFriendlyNames == null || mFriendlyNames.isEmpty()) return null;
-        String lang = Locale.getDefault().getLanguage();
-        String friendlyName = mFriendlyNames.get(lang);
-        if (friendlyName != null) {
-            return friendlyName;
-        }
-        friendlyName = mFriendlyNames.get("en");
-        if (friendlyName != null) {
-            return friendlyName;
-        }
-        return mFriendlyNames.get(mFriendlyNames.keySet().stream().findFirst().get());
-    }
-
-    /** @hide */
-    public Map<String, String> getFriendlyNameList() {
-        return mFriendlyNames;
-    }
-
-    /** @hide */
-    public String getServiceDescription() {
-        return mServiceDescription;
-    }
-
-    public @Nullable Uri getServerUri() {
-        return mServerUri;
-    }
-
-    /** @hide */
-    public String getNetworkAccessIdentifier() {
-        return mNetworkAccessIdentifier;
-    }
-
-    /** @hide */
-    public List<Integer> getMethodList() {
-        return mMethodList;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeParcelable(mOsuSsid, flags);
-        dest.writeString(mServiceDescription);
-        dest.writeParcelable(mServerUri, flags);
-        dest.writeString(mNetworkAccessIdentifier);
-        dest.writeList(mMethodList);
-        Bundle bundle = new Bundle();
-        bundle.putSerializable("friendlyNameMap", (HashMap<String, String>) mFriendlyNames);
-        dest.writeBundle(bundle);
-    }
-
-    @Override
-    public boolean equals(@Nullable Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof OsuProvider)) {
-            return false;
-        }
-        OsuProvider that = (OsuProvider) thatObject;
-        return Objects.equals(mOsuSsid, that.mOsuSsid)
-                && Objects.equals(mFriendlyNames, that.mFriendlyNames)
-                && TextUtils.equals(mServiceDescription, that.mServiceDescription)
-                && Objects.equals(mServerUri, that.mServerUri)
-                && TextUtils.equals(mNetworkAccessIdentifier, that.mNetworkAccessIdentifier)
-                && Objects.equals(mMethodList, that.mMethodList);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mOsuSsid, mServiceDescription, mFriendlyNames,
-                mServerUri, mNetworkAccessIdentifier, mMethodList);
-    }
-
-    @NonNull
-    @Override
-    public String toString() {
-        return "OsuProvider{mOsuSsid=" + mOsuSsid
-                + " mFriendlyNames=" + mFriendlyNames
-                + " mServiceDescription=" + mServiceDescription
-                + " mServerUri=" + mServerUri
-                + " mNetworkAccessIdentifier=" + mNetworkAccessIdentifier
-                + " mMethodList=" + mMethodList;
-    }
-
-    public static final @android.annotation.NonNull Creator<OsuProvider> CREATOR =
-            new Creator<OsuProvider>() {
-                @Override
-                public OsuProvider createFromParcel(Parcel in) {
-                    WifiSsid osuSsid = in.readParcelable(null);
-                    String serviceDescription = in.readString();
-                    Uri serverUri = in.readParcelable(null);
-                    String nai = in.readString();
-                    List<Integer> methodList = new ArrayList<>();
-                    in.readList(methodList, null);
-                    Bundle bundle = in.readBundle();
-                    Map<String, String> friendlyNamesMap = (HashMap) bundle.getSerializable(
-                            "friendlyNameMap");
-                    return new OsuProvider(osuSsid, friendlyNamesMap, serviceDescription,
-                            serverUri, nai, methodList);
-                }
-
-            @Override
-            public OsuProvider[] newArray(int size) {
-                return new OsuProvider[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java b/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
deleted file mode 100644
index d1d1780..0000000
--- a/wifi/java/android/net/wifi/hotspot2/PasspointConfiguration.java
+++ /dev/null
@@ -1,921 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2;
-
-import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_NONE;
-import static android.net.wifi.WifiConfiguration.MeteredOverride;
-
-import android.annotation.CurrentTimeMillisLong;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-import android.net.wifi.hotspot2.pps.Policy;
-import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.os.Bundle;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Class representing Passpoint configuration.  This contains configurations specified in
- * PerProviderSubscription (PPS) Management Object (MO) tree.
- *
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- */
-public final class PasspointConfiguration implements Parcelable {
-    private static final String TAG = "PasspointConfiguration";
-
-    /**
-     * Number of bytes for certificate SHA-256 fingerprint byte array.
-     */
-    private static final int CERTIFICATE_SHA256_BYTES = 32;
-
-    /**
-     * Maximum bytes for URL string.
-     */
-    private static final int MAX_URL_BYTES = 1023;
-
-    /**
-     * Integer value used for indicating null value in the Parcel.
-     */
-    private static final int NULL_VALUE = -1;
-
-    /**
-     * Configurations under HomeSp subtree.
-     */
-    private HomeSp mHomeSp = null;
-
-    /**
-     * Set the Home SP (Service Provider) information.
-     *
-     * @param homeSp The Home SP information to set to
-     */
-    public void setHomeSp(HomeSp homeSp) { mHomeSp = homeSp; }
-    /**
-     * Get the Home SP (Service Provider) information.
-     *
-     * @return Home SP information
-     */
-    public HomeSp getHomeSp() { return mHomeSp; }
-
-    /**
-     * Configurations under AAAServerTrustedNames subtree.
-     */
-    private String[] mAaaServerTrustedNames = null;
-    /**
-     * Set the AAA server trusted names information.
-     *
-     * @param aaaServerTrustedNames The AAA server trusted names information to set to
-     * @hide
-     */
-    public void setAaaServerTrustedNames(@Nullable String[] aaaServerTrustedNames) {
-        mAaaServerTrustedNames = aaaServerTrustedNames;
-    }
-    /**
-     * Get the AAA server trusted names information.
-     *
-     * @return AAA server trusted names information
-     * @hide
-     */
-    public @Nullable String[] getAaaServerTrustedNames() {
-        return mAaaServerTrustedNames;
-    }
-
-    /**
-     * Configurations under Credential subtree.
-     */
-    private Credential mCredential = null;
-    /**
-     * Set the credential information.
-     *
-     * @param credential The credential information to set to
-     */
-    public void setCredential(Credential credential) {
-        mCredential = credential;
-    }
-    /**
-     * Get the credential information.
-     *
-     * @return credential information
-     */
-    public Credential getCredential() {
-        return mCredential;
-    }
-
-    /**
-     * Configurations under Policy subtree.
-     */
-    private Policy mPolicy = null;
-    /**
-     * @hide
-     */
-    public void setPolicy(Policy policy) {
-        mPolicy = policy;
-    }
-    /**
-     * @hide
-     */
-    public Policy getPolicy() {
-        return mPolicy;
-    }
-
-    /**
-     * Meta data for performing subscription update.
-     */
-    private UpdateParameter mSubscriptionUpdate = null;
-    /**
-     * @hide
-     */
-    public void setSubscriptionUpdate(UpdateParameter subscriptionUpdate) {
-        mSubscriptionUpdate = subscriptionUpdate;
-    }
-    /**
-     * @hide
-     */
-    public UpdateParameter getSubscriptionUpdate() {
-        return mSubscriptionUpdate;
-    }
-
-    /**
-     * List of HTTPS URL for retrieving trust root certificate and the corresponding SHA-256
-     * fingerprint of the certificate.  The certificates are used for verifying AAA server's
-     * identity during EAP authentication.
-     */
-    private Map<String, byte[]> mTrustRootCertList = null;
-    /**
-     * @hide
-     */
-    public void setTrustRootCertList(Map<String, byte[]> trustRootCertList) {
-        mTrustRootCertList = trustRootCertList;
-    }
-    /**
-     * @hide
-     */
-    public Map<String, byte[]> getTrustRootCertList() {
-        return mTrustRootCertList;
-    }
-
-    /**
-     * Set by the subscription server, updated every time the configuration is updated by
-     * the subscription server.
-     *
-     * Use Integer.MIN_VALUE to indicate unset value.
-     */
-    private int mUpdateIdentifier = Integer.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setUpdateIdentifier(int updateIdentifier) {
-        mUpdateIdentifier = updateIdentifier;
-    }
-    /**
-     * @hide
-     */
-    public int getUpdateIdentifier() {
-        return mUpdateIdentifier;
-    }
-
-    /**
-     * The priority of the credential.
-     *
-     * Use Integer.MIN_VALUE to indicate unset value.
-     */
-    private int mCredentialPriority = Integer.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setCredentialPriority(int credentialPriority) {
-        mCredentialPriority = credentialPriority;
-    }
-    /**
-     * @hide
-     */
-    public int getCredentialPriority() {
-        return mCredentialPriority;
-    }
-
-    /**
-     * The time this subscription is created. It is in the format of number
-     * of milliseconds since January 1, 1970, 00:00:00 GMT.
-     *
-     * Use Long.MIN_VALUE to indicate unset value.
-     */
-    private long mSubscriptionCreationTimeInMillis = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setSubscriptionCreationTimeInMillis(long subscriptionCreationTimeInMillis) {
-        mSubscriptionCreationTimeInMillis = subscriptionCreationTimeInMillis;
-    }
-    /**
-     * @hide
-     */
-    public long getSubscriptionCreationTimeInMillis() {
-        return mSubscriptionCreationTimeInMillis;
-    }
-
-    /**
-     * The time this subscription will expire. It is in the format of number
-     * of milliseconds since January 1, 1970, 00:00:00 GMT.
-     *
-     * Use Long.MIN_VALUE to indicate unset value.
-     */
-    private long mSubscriptionExpirationTimeMillis = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setSubscriptionExpirationTimeInMillis(long subscriptionExpirationTimeInMillis) {
-        mSubscriptionExpirationTimeMillis = subscriptionExpirationTimeInMillis;
-    }
-    /**
-     *  Utility method to get the time this subscription will expire. It is in the format of number
-     *  of milliseconds since January 1, 1970, 00:00:00 GMT.
-     *
-     *  @return The time this subscription will expire, or Long.MIN_VALUE to indicate unset value
-     */
-    @CurrentTimeMillisLong
-    public long getSubscriptionExpirationTimeMillis() {
-        return mSubscriptionExpirationTimeMillis;
-    }
-
-    /**
-     * The type of the subscription.  This is defined by the provider and the value is provider
-     * specific.
-     */
-    private String mSubscriptionType = null;
-    /**
-     * @hide
-     */
-    public void setSubscriptionType(String subscriptionType) {
-        mSubscriptionType = subscriptionType;
-    }
-    /**
-     * @hide
-     */
-    public String getSubscriptionType() {
-        return mSubscriptionType;
-    }
-
-    /**
-     * The time period for usage statistics accumulation. A value of zero means that usage
-     * statistics are not accumulated on a periodic basis (e.g., a one-time limit for
-     * “pay as you go” - PAYG service). A non-zero value specifies the usage interval in minutes.
-     */
-    private long mUsageLimitUsageTimePeriodInMinutes = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setUsageLimitUsageTimePeriodInMinutes(long usageLimitUsageTimePeriodInMinutes) {
-        mUsageLimitUsageTimePeriodInMinutes = usageLimitUsageTimePeriodInMinutes;
-    }
-    /**
-     * @hide
-     */
-    public long getUsageLimitUsageTimePeriodInMinutes() {
-        return mUsageLimitUsageTimePeriodInMinutes;
-    }
-
-    /**
-     * The time at which usage statistic accumulation  begins.  It is in the format of number
-     * of milliseconds since January 1, 1970, 00:00:00 GMT.
-     *
-     * Use Long.MIN_VALUE to indicate unset value.
-     */
-    private long mUsageLimitStartTimeInMillis = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setUsageLimitStartTimeInMillis(long usageLimitStartTimeInMillis) {
-        mUsageLimitStartTimeInMillis = usageLimitStartTimeInMillis;
-    }
-    /**
-     * @hide
-     */
-    public long getUsageLimitStartTimeInMillis() {
-        return mUsageLimitStartTimeInMillis;
-    }
-
-    /**
-     * The cumulative data limit in megabytes for the {@link #usageLimitUsageTimePeriodInMinutes}.
-     * A value of zero indicate unlimited data usage.
-     *
-     * Use Long.MIN_VALUE to indicate unset value.
-     */
-    private long mUsageLimitDataLimit = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setUsageLimitDataLimit(long usageLimitDataLimit) {
-        mUsageLimitDataLimit = usageLimitDataLimit;
-    }
-    /**
-     * @hide
-     */
-    public long getUsageLimitDataLimit() {
-        return mUsageLimitDataLimit;
-    }
-
-    /**
-     * The cumulative time limit in minutes for the {@link #usageLimitUsageTimePeriodInMinutes}.
-     * A value of zero indicate unlimited time usage.
-     */
-    private long mUsageLimitTimeLimitInMinutes = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setUsageLimitTimeLimitInMinutes(long usageLimitTimeLimitInMinutes) {
-        mUsageLimitTimeLimitInMinutes = usageLimitTimeLimitInMinutes;
-    }
-    /**
-     * @hide
-     */
-    public long getUsageLimitTimeLimitInMinutes() {
-        return mUsageLimitTimeLimitInMinutes;
-    }
-
-    /**
-     * The map of OSU service provider names whose each element is presented in different
-     * languages for the service provider, which is used for finding a matching
-     * PasspointConfiguration with a given service provider name.
-     */
-    private Map<String, String> mServiceFriendlyNames = null;
-
-    /**
-     * @hide
-     */
-    public void setServiceFriendlyNames(Map<String, String> serviceFriendlyNames) {
-        mServiceFriendlyNames = serviceFriendlyNames;
-    }
-
-    /**
-     * @hide
-     */
-    public Map<String, String> getServiceFriendlyNames() {
-        return mServiceFriendlyNames;
-    }
-
-    /**
-     * Return the friendly Name for current language from the list of friendly names of OSU
-     * provider.
-     * The string matching the default locale will be returned if it is found, otherwise the
-     * first string in the list will be returned.  A null will be returned if the list is empty.
-     *
-     * @return String matching the default locale, null otherwise
-     * @hide
-     */
-    public String getServiceFriendlyName() {
-        if (mServiceFriendlyNames == null || mServiceFriendlyNames.isEmpty()) return null;
-        String lang = Locale.getDefault().getLanguage();
-        String friendlyName = mServiceFriendlyNames.get(lang);
-        if (friendlyName != null) {
-            return friendlyName;
-        }
-        friendlyName = mServiceFriendlyNames.get("en");
-        if (friendlyName != null) {
-            return friendlyName;
-        }
-        return mServiceFriendlyNames.get(mServiceFriendlyNames.keySet().stream().findFirst().get());
-    }
-
-    /**
-     * The carrier ID identifies the operator who provides this network configuration.
-     *    see {@link TelephonyManager#getSimCarrierId()}
-     */
-    private int mCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID;
-
-    /**
-     * Set the carrier ID associated with current configuration.
-     * @param carrierId {@code mCarrierId}
-     * @hide
-     */
-    public void setCarrierId(int carrierId) {
-        this.mCarrierId = carrierId;
-    }
-
-    /**
-     * Get the carrier ID associated with current configuration.
-     * @return {@code mCarrierId}
-     * @hide
-     */
-    public int getCarrierId() {
-        return mCarrierId;
-    }
-
-    /**
-     * The auto-join configuration specifies whether or not the Passpoint Configuration is
-     * considered for auto-connection. If true then yes, if false then it isn't considered as part
-     * of auto-connection - but can still be manually connected to.
-     */
-    private boolean mIsAutojoinEnabled = true;
-
-    /**
-     * The mac randomization setting specifies whether a randomized or device MAC address will
-     * be used to connect to the passpoint network. If true, a randomized MAC will be used.
-     * Otherwise, the device MAC address will be used.
-     */
-    private boolean mIsMacRandomizationEnabled = true;
-
-    /**
-     * Indicates if the end user has expressed an explicit opinion about the
-     * meteredness of this network, such as through the Settings app.
-     * This value is one of {@link #METERED_OVERRIDE_NONE}, {@link #METERED_OVERRIDE_METERED},
-     * or {@link #METERED_OVERRIDE_NOT_METERED}.
-     * <p>
-     * This should always override any values from {@link WifiInfo#getMeteredHint()}.
-     *
-     * By default this field is set to {@link #METERED_OVERRIDE_NONE}.
-     */
-    private int mMeteredOverride = METERED_OVERRIDE_NONE;
-
-    /**
-     * Configures the auto-association status of this Passpoint configuration. A value of true
-     * indicates that the configuration will be considered for auto-connection, a value of false
-     * indicates that only manual connection will work - the framework will not auto-associate to
-     * this Passpoint network.
-     *
-     * @param autojoinEnabled true to be considered for framework auto-connection, false otherwise.
-     * @hide
-     */
-    public void setAutojoinEnabled(boolean autojoinEnabled) {
-        mIsAutojoinEnabled = autojoinEnabled;
-    }
-
-    /**
-     * Configures the MAC randomization setting for this Passpoint configuration.
-     * If set to true, the framework will use a randomized MAC address to connect to this Passpoint
-     * network. Otherwise, the framework will use the device MAC address.
-     *
-     * @param enabled true to use randomized MAC address, false to use device MAC address.
-     * @hide
-     */
-    public void setMacRandomizationEnabled(boolean enabled) {
-        mIsMacRandomizationEnabled = enabled;
-    }
-
-    /**
-     * Sets the metered override setting for this Passpoint configuration.
-     *
-     * @param meteredOverride One of the values in {@link MeteredOverride}
-     * @hide
-     */
-    public void setMeteredOverride(@MeteredOverride int meteredOverride) {
-        mMeteredOverride = meteredOverride;
-    }
-
-    /**
-     * Indicates whether the Passpoint configuration may be auto-connected to by the framework. A
-     * value of true indicates that auto-connection can happen, a value of false indicates that it
-     * cannot. However, even when auto-connection is not possible manual connection by the user is
-     * possible.
-     *
-     * @return the auto-join configuration: true for auto-connection (or join) enabled, false
-     * otherwise.
-     * @hide
-     */
-    @SystemApi
-    public boolean isAutojoinEnabled() {
-        return mIsAutojoinEnabled;
-    }
-
-    /**
-     * Indicates whether the user chose this configuration to be treated as metered or not.
-     *
-     * @return One of the values in {@link MeteredOverride}
-     * @hide
-     */
-    @SystemApi
-    @MeteredOverride
-    public int getMeteredOverride() {
-        return mMeteredOverride;
-    }
-
-    /**
-     * Indicates whether a randomized MAC address or device MAC address will be used for
-     * connections to this Passpoint network. If true, a randomized MAC address will be used.
-     * Otherwise, the device MAC address will be used.
-     *
-     * @return true for MAC randomization enabled. False for disabled.
-     * @hide
-     */
-    @SystemApi
-    public boolean isMacRandomizationEnabled() {
-        return mIsMacRandomizationEnabled;
-    }
-
-    /**
-     * Constructor for creating PasspointConfiguration with default values.
-     */
-    public PasspointConfiguration() {}
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     */
-    public PasspointConfiguration(PasspointConfiguration source) {
-        if (source == null) {
-            return;
-        }
-
-        if (source.mHomeSp != null) {
-            mHomeSp = new HomeSp(source.mHomeSp);
-        }
-        if (source.mCredential != null) {
-            mCredential = new Credential(source.mCredential);
-        }
-        if (source.mPolicy != null) {
-            mPolicy = new Policy(source.mPolicy);
-        }
-        if (source.mTrustRootCertList != null) {
-            mTrustRootCertList = Collections.unmodifiableMap(source.mTrustRootCertList);
-        }
-        if (source.mSubscriptionUpdate != null) {
-            mSubscriptionUpdate = new UpdateParameter(source.mSubscriptionUpdate);
-        }
-        mUpdateIdentifier = source.mUpdateIdentifier;
-        mCredentialPriority = source.mCredentialPriority;
-        mSubscriptionCreationTimeInMillis = source.mSubscriptionCreationTimeInMillis;
-        mSubscriptionExpirationTimeMillis = source.mSubscriptionExpirationTimeMillis;
-        mSubscriptionType = source.mSubscriptionType;
-        mUsageLimitDataLimit = source.mUsageLimitDataLimit;
-        mUsageLimitStartTimeInMillis = source.mUsageLimitStartTimeInMillis;
-        mUsageLimitTimeLimitInMinutes = source.mUsageLimitTimeLimitInMinutes;
-        mUsageLimitUsageTimePeriodInMinutes = source.mUsageLimitUsageTimePeriodInMinutes;
-        mServiceFriendlyNames = source.mServiceFriendlyNames;
-        mAaaServerTrustedNames = source.mAaaServerTrustedNames;
-        mCarrierId = source.mCarrierId;
-        mIsAutojoinEnabled = source.mIsAutojoinEnabled;
-        mIsMacRandomizationEnabled = source.mIsMacRandomizationEnabled;
-        mMeteredOverride = source.mMeteredOverride;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeParcelable(mHomeSp, flags);
-        dest.writeParcelable(mCredential, flags);
-        dest.writeParcelable(mPolicy, flags);
-        dest.writeParcelable(mSubscriptionUpdate, flags);
-        writeTrustRootCerts(dest, mTrustRootCertList);
-        dest.writeInt(mUpdateIdentifier);
-        dest.writeInt(mCredentialPriority);
-        dest.writeLong(mSubscriptionCreationTimeInMillis);
-        dest.writeLong(mSubscriptionExpirationTimeMillis);
-        dest.writeString(mSubscriptionType);
-        dest.writeLong(mUsageLimitUsageTimePeriodInMinutes);
-        dest.writeLong(mUsageLimitStartTimeInMillis);
-        dest.writeLong(mUsageLimitDataLimit);
-        dest.writeLong(mUsageLimitTimeLimitInMinutes);
-        dest.writeStringArray(mAaaServerTrustedNames);
-        Bundle bundle = new Bundle();
-        bundle.putSerializable("serviceFriendlyNames",
-                (HashMap<String, String>) mServiceFriendlyNames);
-        dest.writeBundle(bundle);
-        dest.writeInt(mCarrierId);
-        dest.writeBoolean(mIsAutojoinEnabled);
-        dest.writeBoolean(mIsMacRandomizationEnabled);
-        dest.writeInt(mMeteredOverride);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof PasspointConfiguration)) {
-            return false;
-        }
-        PasspointConfiguration that = (PasspointConfiguration) thatObject;
-        return (mHomeSp == null ? that.mHomeSp == null : mHomeSp.equals(that.mHomeSp))
-                && (mAaaServerTrustedNames == null ? that.mAaaServerTrustedNames == null
-                : Arrays.equals(mAaaServerTrustedNames, that.mAaaServerTrustedNames))
-                && (mCredential == null ? that.mCredential == null
-                : mCredential.equals(that.mCredential))
-                && (mPolicy == null ? that.mPolicy == null : mPolicy.equals(that.mPolicy))
-                && (mSubscriptionUpdate == null ? that.mSubscriptionUpdate == null
-                : mSubscriptionUpdate.equals(that.mSubscriptionUpdate))
-                && isTrustRootCertListEquals(mTrustRootCertList, that.mTrustRootCertList)
-                && mUpdateIdentifier == that.mUpdateIdentifier
-                && mCredentialPriority == that.mCredentialPriority
-                && mSubscriptionCreationTimeInMillis == that.mSubscriptionCreationTimeInMillis
-                && mSubscriptionExpirationTimeMillis == that.mSubscriptionExpirationTimeMillis
-                && TextUtils.equals(mSubscriptionType, that.mSubscriptionType)
-                && mUsageLimitUsageTimePeriodInMinutes == that.mUsageLimitUsageTimePeriodInMinutes
-                && mUsageLimitStartTimeInMillis == that.mUsageLimitStartTimeInMillis
-                && mUsageLimitDataLimit == that.mUsageLimitDataLimit
-                && mUsageLimitTimeLimitInMinutes == that.mUsageLimitTimeLimitInMinutes
-                && mCarrierId == that.mCarrierId
-                && mIsAutojoinEnabled == that.mIsAutojoinEnabled
-                && mIsMacRandomizationEnabled == that.mIsMacRandomizationEnabled
-                && mMeteredOverride == that.mMeteredOverride
-                && (mServiceFriendlyNames == null ? that.mServiceFriendlyNames == null
-                : mServiceFriendlyNames.equals(that.mServiceFriendlyNames));
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mHomeSp, mCredential, mPolicy, mSubscriptionUpdate, mTrustRootCertList,
-                mUpdateIdentifier, mCredentialPriority, mSubscriptionCreationTimeInMillis,
-                mSubscriptionExpirationTimeMillis, mUsageLimitUsageTimePeriodInMinutes,
-                mUsageLimitStartTimeInMillis, mUsageLimitDataLimit, mUsageLimitTimeLimitInMinutes,
-                mServiceFriendlyNames, mCarrierId, mIsAutojoinEnabled, mIsMacRandomizationEnabled,
-                mMeteredOverride);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("UpdateIdentifier: ").append(mUpdateIdentifier).append("\n");
-        builder.append("CredentialPriority: ").append(mCredentialPriority).append("\n");
-        builder.append("SubscriptionCreationTime: ").append(
-                mSubscriptionCreationTimeInMillis != Long.MIN_VALUE
-                ? new Date(mSubscriptionCreationTimeInMillis) : "Not specified").append("\n");
-        builder.append("SubscriptionExpirationTime: ").append(
-                mSubscriptionExpirationTimeMillis != Long.MIN_VALUE
-                ? new Date(mSubscriptionExpirationTimeMillis) : "Not specified").append("\n");
-        builder.append("UsageLimitStartTime: ").append(mUsageLimitStartTimeInMillis != Long.MIN_VALUE
-                ? new Date(mUsageLimitStartTimeInMillis) : "Not specified").append("\n");
-        builder.append("UsageTimePeriod: ").append(mUsageLimitUsageTimePeriodInMinutes)
-                .append("\n");
-        builder.append("UsageLimitDataLimit: ").append(mUsageLimitDataLimit).append("\n");
-        builder.append("UsageLimitTimeLimit: ").append(mUsageLimitTimeLimitInMinutes).append("\n");
-        builder.append("Provisioned by a subscription server: ")
-                .append(isOsuProvisioned() ? "Yes" : "No").append("\n");
-        if (mHomeSp != null) {
-            builder.append("HomeSP Begin ---\n");
-            builder.append(mHomeSp);
-            builder.append("HomeSP End ---\n");
-        }
-        if (mCredential != null) {
-            builder.append("Credential Begin ---\n");
-            builder.append(mCredential);
-            builder.append("Credential End ---\n");
-        }
-        if (mPolicy != null) {
-            builder.append("Policy Begin ---\n");
-            builder.append(mPolicy);
-            builder.append("Policy End ---\n");
-        }
-        if (mSubscriptionUpdate != null) {
-            builder.append("SubscriptionUpdate Begin ---\n");
-            builder.append(mSubscriptionUpdate);
-            builder.append("SubscriptionUpdate End ---\n");
-        }
-        if (mTrustRootCertList != null) {
-            builder.append("TrustRootCertServers: ").append(mTrustRootCertList.keySet())
-                    .append("\n");
-        }
-        if (mAaaServerTrustedNames != null) {
-            builder.append("AAAServerTrustedNames: ")
-                    .append(String.join(";", mAaaServerTrustedNames)).append("\n");
-        }
-        if (mServiceFriendlyNames != null) {
-            builder.append("ServiceFriendlyNames: ").append(mServiceFriendlyNames);
-        }
-        builder.append("CarrierId:" + mCarrierId);
-        builder.append("IsAutojoinEnabled:" + mIsAutojoinEnabled);
-        builder.append("mIsMacRandomizationEnabled:" + mIsMacRandomizationEnabled);
-        builder.append("mMeteredOverride:" + mMeteredOverride);
-        return builder.toString();
-    }
-
-    /**
-     * Validate the R1 configuration data.
-     *
-     * @return true on success or false on failure
-     * @hide
-     */
-    public boolean validate() {
-        // Optional: PerProviderSubscription/<X+>/SubscriptionUpdate
-        if (mSubscriptionUpdate != null && !mSubscriptionUpdate.validate()) {
-            return false;
-        }
-        return validateForCommonR1andR2();
-    }
-
-    /**
-     * Validate the R2 configuration data.
-     *
-     * @return true on success or false on failure
-     * @hide
-     */
-    public boolean validateForR2() {
-        // Required: PerProviderSubscription/UpdateIdentifier
-        if (mUpdateIdentifier == Integer.MIN_VALUE) {
-            return false;
-        }
-
-        // Required: PerProviderSubscription/<X+>/SubscriptionUpdate
-        if (mSubscriptionUpdate == null || !mSubscriptionUpdate.validate()) {
-            return false;
-        }
-        return validateForCommonR1andR2();
-    }
-
-    private boolean validateForCommonR1andR2() {
-        // Required: PerProviderSubscription/<X+>/HomeSP
-        if (mHomeSp == null || !mHomeSp.validate()) {
-            return false;
-        }
-
-        // Required: PerProviderSubscription/<X+>/Credential
-        if (mCredential == null || !mCredential.validate()) {
-            return false;
-        }
-
-        // Optional: PerProviderSubscription/<X+>/Policy
-        if (mPolicy != null && !mPolicy.validate()) {
-            return false;
-        }
-
-        if (mTrustRootCertList != null) {
-            for (Map.Entry<String, byte[]> entry : mTrustRootCertList.entrySet()) {
-                String url = entry.getKey();
-                byte[] certFingerprint = entry.getValue();
-                if (TextUtils.isEmpty(url)) {
-                    Log.d(TAG, "Empty URL");
-                    return false;
-                }
-                if (url.getBytes(StandardCharsets.UTF_8).length > MAX_URL_BYTES) {
-                    Log.d(TAG, "URL bytes exceeded the max: "
-                            + url.getBytes(StandardCharsets.UTF_8).length);
-                    return false;
-                }
-
-                if (certFingerprint == null) {
-                    Log.d(TAG, "Fingerprint not specified");
-                    return false;
-                }
-                if (certFingerprint.length != CERTIFICATE_SHA256_BYTES) {
-                    Log.d(TAG, "Incorrect size of trust root certificate SHA-256 fingerprint: "
-                            + certFingerprint.length);
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    public static final @android.annotation.NonNull Creator<PasspointConfiguration> CREATOR =
-        new Creator<PasspointConfiguration>() {
-            @Override
-            public PasspointConfiguration createFromParcel(Parcel in) {
-                PasspointConfiguration config = new PasspointConfiguration();
-                config.setHomeSp(in.readParcelable(null));
-                config.setCredential(in.readParcelable(null));
-                config.setPolicy(in.readParcelable(null));
-                config.setSubscriptionUpdate(in.readParcelable(null));
-                config.setTrustRootCertList(readTrustRootCerts(in));
-                config.setUpdateIdentifier(in.readInt());
-                config.setCredentialPriority(in.readInt());
-                config.setSubscriptionCreationTimeInMillis(in.readLong());
-                config.setSubscriptionExpirationTimeInMillis(in.readLong());
-                config.setSubscriptionType(in.readString());
-                config.setUsageLimitUsageTimePeriodInMinutes(in.readLong());
-                config.setUsageLimitStartTimeInMillis(in.readLong());
-                config.setUsageLimitDataLimit(in.readLong());
-                config.setUsageLimitTimeLimitInMinutes(in.readLong());
-                config.setAaaServerTrustedNames(in.createStringArray());
-                Bundle bundle = in.readBundle();
-                Map<String, String> friendlyNamesMap = (HashMap) bundle.getSerializable(
-                        "serviceFriendlyNames");
-                config.setServiceFriendlyNames(friendlyNamesMap);
-                config.mCarrierId = in.readInt();
-                config.mIsAutojoinEnabled = in.readBoolean();
-                config.mIsMacRandomizationEnabled = in.readBoolean();
-                config.mMeteredOverride = in.readInt();
-                return config;
-            }
-
-            @Override
-            public PasspointConfiguration[] newArray(int size) {
-                return new PasspointConfiguration[size];
-            }
-
-            /**
-             * Helper function for reading trust root certificate info list from a Parcel.
-             *
-             * @param in The Parcel to read from
-             * @return The list of trust root certificate URL with the corresponding certificate
-             *         fingerprint
-             */
-            private Map<String, byte[]> readTrustRootCerts(Parcel in) {
-                int size = in.readInt();
-                if (size == NULL_VALUE) {
-                    return null;
-                }
-                Map<String, byte[]> trustRootCerts = new HashMap<>(size);
-                for (int i = 0; i < size; i++) {
-                    String key = in.readString();
-                    byte[] value = in.createByteArray();
-                    trustRootCerts.put(key, value);
-                }
-                return trustRootCerts;
-            }
-        };
-
-    /**
-     * Helper function for writing trust root certificate information list.
-     *
-     * @param dest The Parcel to write to
-     * @param trustRootCerts The list of trust root certificate URL with the corresponding
-     *                       certificate fingerprint
-     */
-    private static void writeTrustRootCerts(Parcel dest, Map<String, byte[]> trustRootCerts) {
-        if (trustRootCerts == null) {
-            dest.writeInt(NULL_VALUE);
-            return;
-        }
-        dest.writeInt(trustRootCerts.size());
-        for (Map.Entry<String, byte[]> entry : trustRootCerts.entrySet()) {
-            dest.writeString(entry.getKey());
-            dest.writeByteArray(entry.getValue());
-        }
-    }
-
-    /**
-     * Helper function for comparing two trust root certificate list.  Cannot use Map#equals
-     * method since the value type (byte[]) doesn't override equals method.
-     *
-     * @param list1 The first trust root certificate list
-     * @param list2 The second trust root certificate list
-     * @return true if the two list are equal
-     */
-    private static boolean isTrustRootCertListEquals(Map<String, byte[]> list1,
-            Map<String, byte[]> list2) {
-        if (list1 == null || list2 == null) {
-            return list1 == list2;
-        }
-        if (list1.size() != list2.size()) {
-            return false;
-        }
-        for (Map.Entry<String, byte[]> entry : list1.entrySet()) {
-            if (!Arrays.equals(entry.getValue(), list2.get(entry.getKey()))) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Indicates if the Passpoint Configuration was provisioned by a subscription (OSU) server,
-     * which means that it's an R2 (or R3) profile.
-     *
-     * @return true if the Passpoint Configuration was provisioned by a subscription server.
-     */
-    public boolean isOsuProvisioned() {
-        return getUpdateIdentifier() != Integer.MIN_VALUE;
-    }
-
-    /**
-     * Get a unique identifier for a PasspointConfiguration object. The identifier depends on the
-     * configuration that identify the service provider under the HomeSp subtree, and on the
-     * credential configuration under the Credential subtree.
-     * The method throws an {@link IllegalStateException} if the configuration under HomeSp subtree
-     * or the configuration under Credential subtree are not initialized.
-     *
-     * @return A unique identifier
-     */
-    public @NonNull String getUniqueId() {
-        if (mCredential == null || mHomeSp == null || TextUtils.isEmpty(mHomeSp.getFqdn())) {
-            throw new IllegalStateException("Credential or HomeSP are not initialized");
-        }
-
-        StringBuilder sb = new StringBuilder();
-        sb.append(String.format("%s_%x%x", mHomeSp.getFqdn(), mHomeSp.getUniqueId(),
-                mCredential.getUniqueId()));
-        return sb.toString();
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java b/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java
deleted file mode 100644
index 1d499b6..0000000
--- a/wifi/java/android/net/wifi/hotspot2/ProvisioningCallback.java
+++ /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.
- */
-
-package android.net.wifi.hotspot2;
-
-import android.annotation.SystemApi;
-import android.net.wifi.WifiManager;
-import android.os.Handler;
-
-/**
- * Base class for provisioning callbacks. Should be extended by applications and set when calling
- * {@link WifiManager#startSubscriptionProvisioning(OsuProvider, ProvisioningCallback, Handler)}.
- *
- * @hide
- */
-@SystemApi
-public abstract class ProvisioningCallback {
-
-    /**
-     * The reason code for Provisioning Failure due to connection failure to OSU AP.
-     */
-    public static final int OSU_FAILURE_AP_CONNECTION = 1;
-
-    /**
-     * The reason code for invalid server URL address.
-     */
-    public static final int OSU_FAILURE_SERVER_URL_INVALID = 2;
-
-    /**
-     * The reason code for provisioning failure due to connection failure to the server.
-     */
-    public static final int OSU_FAILURE_SERVER_CONNECTION = 3;
-
-    /**
-     * The reason code for provisioning failure due to invalid server certificate.
-     */
-    public static final int OSU_FAILURE_SERVER_VALIDATION = 4;
-
-    /**
-     * The reason code for provisioning failure due to invalid service provider.
-     */
-    public static final int OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5;
-
-    /**
-     * The reason code for provisioning failure when a provisioning flow is aborted.
-     */
-    public static final int OSU_FAILURE_PROVISIONING_ABORTED = 6;
-
-    /**
-     * The reason code for provisioning failure when a provisioning flow is not possible.
-     */
-    public static final int OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7;
-
-    /**
-     * The reason code for provisioning failure due to invalid web url format for an OSU web page.
-     */
-    public static final int OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8;
-
-    /**
-     * The reason code for provisioning failure when a command received is not the expected command
-     * type.
-     */
-    public static final int OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9;
-
-    /**
-     * The reason code for provisioning failure when a SOAP message is not the expected message
-     * type.
-     */
-    public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10;
-
-    /**
-     * The reason code for provisioning failure when a SOAP message exchange fails.
-     */
-    public static final int OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11;
-
-    /**
-     * The reason code for provisioning failure when a redirect listener fails to start.
-     */
-    public static final int OSU_FAILURE_START_REDIRECT_LISTENER = 12;
-
-    /**
-     * The reason code for provisioning failure when a redirect listener timed out to receive a HTTP
-     * redirect response.
-     */
-    public static final int OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13;
-
-    /**
-     * The reason code for provisioning failure when there is no OSU activity to listen to
-     * {@link WifiManager#ACTION_PASSPOINT_LAUNCH_OSU_VIEW} intent.
-     */
-    public static final int OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14;
-
-    /**
-     * The reason code for provisioning failure when the status of a SOAP message is not the
-     * expected message status.
-     */
-    public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15;
-
-    /**
-     * The reason code for provisioning failure when there is no PPS MO.
-     * MO.
-     */
-    public static final int OSU_FAILURE_NO_PPS_MO = 16;
-
-    /**
-     * The reason code for provisioning failure when there is no AAAServerTrustRoot node in a PPS
-     * MO.
-     */
-    public static final int OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17;
-
-    /**
-     * The reason code for provisioning failure when there is no TrustRoot node for remediation
-     * server in a PPS MO.
-     */
-    public static final int OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18;
-
-    /**
-     * The reason code for provisioning failure when there is no TrustRoot node for policy server in
-     * a PPS MO.
-     */
-    public static final int OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19;
-
-    /**
-     * The reason code for provisioning failure when failing to retrieve trust root certificates
-     * used for validating server certificate for AAA, Remediation and Policy server.
-     */
-    public static final int OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20;
-
-    /**
-     * The reason code for provisioning failure when there is no trust root certificate for AAA
-     * server.
-     */
-    public static final int OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21;
-
-    /**
-     * The reason code for provisioning failure when a {@link PasspointConfiguration} is failed to
-     * install.
-     */
-    public static final int OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22;
-
-    /**
-     * The reason code for provisioning failure when an {@link OsuProvider} is not found for
-     * provisioning.
-     */
-    public static final int OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23;
-
-    /**
-     * The status code for provisioning flow to indicate connecting to OSU AP
-     */
-    public static final int OSU_STATUS_AP_CONNECTING = 1;
-
-    /**
-     * The status code for provisioning flow to indicate the OSU AP is connected.
-     */
-    public static final int OSU_STATUS_AP_CONNECTED = 2;
-
-    /**
-     * The status code for provisioning flow to indicate connecting to the server.
-     */
-    public static final int OSU_STATUS_SERVER_CONNECTING = 3;
-
-    /**
-     * The status code for provisioning flow to indicate the server certificate is validated.
-     */
-    public static final int OSU_STATUS_SERVER_VALIDATED = 4;
-
-    /**
-     * The status code for provisioning flow to indicate the server is connected
-     */
-    public static final int OSU_STATUS_SERVER_CONNECTED = 5;
-
-    /**
-     * The status code for provisioning flow to indicate starting the first SOAP exchange.
-     */
-    public static final int OSU_STATUS_INIT_SOAP_EXCHANGE = 6;
-
-    /**
-     * The status code for provisioning flow to indicate waiting for a HTTP redirect response.
-     */
-    public static final int OSU_STATUS_WAITING_FOR_REDIRECT_RESPONSE = 7;
-
-    /**
-     * The status code for provisioning flow to indicate a HTTP redirect response is received.
-     */
-    public static final int OSU_STATUS_REDIRECT_RESPONSE_RECEIVED = 8;
-
-    /**
-     * The status code for provisioning flow to indicate starting the second SOAP exchange.
-     */
-    public static final int OSU_STATUS_SECOND_SOAP_EXCHANGE = 9;
-
-    /**
-     * The status code for provisioning flow to indicate starting the third SOAP exchange.
-     */
-    public static final int OSU_STATUS_THIRD_SOAP_EXCHANGE = 10;
-
-    /**
-     * The status code for provisioning flow to indicate starting a step retrieving trust root
-     * certs.
-     */
-    public static final int OSU_STATUS_RETRIEVING_TRUST_ROOT_CERTS = 11;
-
-    /**
-     * Provisioning status for OSU failure
-     *
-     * @param status indicates error condition
-     */
-    public abstract void onProvisioningFailure(int status);
-
-    /**
-     * Provisioning status when OSU is in progress
-     *
-     * @param status indicates status of OSU flow
-     */
-    public abstract void onProvisioningStatus(int status);
-
-    /**
-     * Provisioning complete when provisioning/remediation flow completes
-     */
-    public abstract void onProvisioningComplete();
-}
-
diff --git a/wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java b/wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java
deleted file mode 100644
index ae60ed4..0000000
--- a/wifi/java/android/net/wifi/hotspot2/omadm/PpsMoParser.java
+++ /dev/null
@@ -1,1787 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.omadm;
-
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-import android.net.wifi.hotspot2.pps.Policy;
-import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.text.TextUtils;
-import android.util.Log;
-import android.util.Pair;
-
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Utility class for converting OMA-DM (Open Mobile Alliance's Device Management)
- * PPS-MO (PerProviderSubscription Management Object) XML tree to a
- * {@link PasspointConfiguration} object.
- *
- * Currently this only supports PerProviderSubscription/HomeSP and
- * PerProviderSubscription/Credential subtree for Hotspot 2.0 Release 1 support.
- *
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- *
- * Below is a sample XML string for a Release 1 PPS MO tree:
- *
- * <MgmtTree xmlns="syncml:dmddf1.2">
- *   <VerDTD>1.2</VerDTD>
- *   <Node>
- *     <NodeName>PerProviderSubscription</NodeName>
- *     <RTProperties>
- *       <Type>
- *         <DDFName>urn:wfa:mo:hotspot2dot0­perprovidersubscription:1.0</DDFName>
- *       </Type>
- *     </RTProperties>
- *     <Node>
- *       <NodeName>i001</NodeName>
- *       <Node>
- *         <NodeName>HomeSP</NodeName>
- *         <Node>
- *           <NodeName>FriendlyName</NodeName>
- *           <Value>Century House</Value>
- *         </Node>
- *         <Node>
- *           <NodeName>FQDN</NodeName>
- *           <Value>mi6.co.uk</Value>
- *         </Node>
- *         <Node>
- *           <NodeName>RoamingConsortiumOI</NodeName>
- *           <Value>112233,445566</Value>
- *         </Node>
- *       </Node>
- *       <Node>
- *         <NodeName>Credential</NodeName>
- *         <Node>
- *           <NodeName>Realm</NodeName>
- *           <Value>shaken.stirred.com</Value>
- *         </Node>
- *         <Node>
- *           <NodeName>UsernamePassword</NodeName>
- *           <Node>
- *             <NodeName>Username</NodeName>
- *             <Value>james</Value>
- *           </Node>
- *           <Node>
- *             <NodeName>Password</NodeName>
- *             <Value>Ym9uZDAwNw==</Value>
- *           </Node>
- *           <Node>
- *             <NodeName>EAPMethod</NodeName>
- *             <Node>
- *               <NodeName>EAPType</NodeName>
- *               <Value>21</Value>
- *             </Node>
- *             <Node>
- *               <NodeName>InnerMethod</NodeName>
- *               <Value>MS-CHAP-V2</Value>
- *             </Node>
- *           </Node>
- *         </Node>
- *       </Node>
- *     </Node>
- *   </Node>
- * </MgmtTree>
- */
-public final class PpsMoParser {
-    private static final String TAG = "PpsMoParser";
-
-    /**
-     * XML tags expected in the PPS MO (PerProviderSubscription Management Object) XML tree.
-     */
-    private static final String TAG_MANAGEMENT_TREE = "MgmtTree";
-    private static final String TAG_VER_DTD = "VerDTD";
-    private static final String TAG_NODE = "Node";
-    private static final String TAG_NODE_NAME = "NodeName";
-    private static final String TAG_RT_PROPERTIES = "RTProperties";
-    private static final String TAG_TYPE = "Type";
-    private static final String TAG_DDF_NAME = "DDFName";
-    private static final String TAG_VALUE = "Value";
-
-    /**
-     * Name for PerProviderSubscription node.
-     */
-    private static final String NODE_PER_PROVIDER_SUBSCRIPTION = "PerProviderSubscription";
-
-    /**
-     * Fields under PerProviderSubscription.
-     */
-    private static final String NODE_UPDATE_IDENTIFIER = "UpdateIdentifier";
-    private static final String NODE_AAA_SERVER_TRUST_ROOT = "AAAServerTrustRoot";
-    private static final String NODE_SUBSCRIPTION_UPDATE = "SubscriptionUpdate";
-    private static final String NODE_SUBSCRIPTION_PARAMETER = "SubscriptionParameters";
-    private static final String NODE_TYPE_OF_SUBSCRIPTION = "TypeOfSubscription";
-    private static final String NODE_USAGE_LIMITS = "UsageLimits";
-    private static final String NODE_DATA_LIMIT = "DataLimit";
-    private static final String NODE_START_DATE = "StartDate";
-    private static final String NODE_TIME_LIMIT = "TimeLimit";
-    private static final String NODE_USAGE_TIME_PERIOD = "UsageTimePeriod";
-    private static final String NODE_CREDENTIAL_PRIORITY = "CredentialPriority";
-    private static final String NODE_EXTENSION = "Extension";
-
-    /**
-     * Fields under Extension/Android subtree.
-     */
-    /*
-     * This node is used to put Android specific extension nodes and must be put
-     * under "Extension" node. Nodes with unknown names are allowed under this subtree.
-     * If there is any new node added in later release, it won't break older release parsing.
-     * <p>
-     * Ex:
-     * <Node>
-     *   <NodeName>Extension</NodeName>
-     *   <Node>
-     *     <NodeName>Android</NodeName>
-     *     <Node>
-     *       <NodeName>AndroidSpecificAttribute</NodeName>
-     *       <Value>AndroidSpecificValue</Value>
-     *     </Node>
-     *     <Node>
-     *       <NodeName>AndroidSpecificAttribute2</NodeName>
-     *       <Value>AndroidSpecificValue2</Value>
-     *     </Node>
-     *   </Node>
-     * </Node>
-     */
-    private static final String NODE_VENDOR_ANDROID = "Android";
-    /*
-     * This node describes AAA server trusted names. The trusted name must be put in
-     * a leaf named "FQDN". More than one trusted names can be provided by using
-     * semicolons to separate the strings (e.g., example.org;example.com).
-     * <p>
-     * Ex:
-     * <Node>
-     *   <NodeName>AAAServerTrustedNames</NodeName>
-     *   <Node>
-     *     <NodeName>FQDN</NodeName>
-     *     <Value>trusted.com;auth.net</Value>
-     *  </Node>
-     * <Node>
-     */
-    private static final String NODE_AAA_SERVER_TRUSTED_NAMES = "AAAServerTrustedNames";
-
-    /**
-     * Fields under HomeSP subtree.
-     */
-    private static final String NODE_HOMESP = "HomeSP";
-    private static final String NODE_FQDN = "FQDN";
-    private static final String NODE_FRIENDLY_NAME = "FriendlyName";
-    private static final String NODE_ROAMING_CONSORTIUM_OI = "RoamingConsortiumOI";
-    private static final String NODE_NETWORK_ID = "NetworkID";
-    private static final String NODE_SSID = "SSID";
-    private static final String NODE_HESSID = "HESSID";
-    private static final String NODE_ICON_URL = "IconURL";
-    private static final String NODE_HOME_OI_LIST = "HomeOIList";
-    private static final String NODE_HOME_OI = "HomeOI";
-    private static final String NODE_HOME_OI_REQUIRED = "HomeOIRequired";
-    private static final String NODE_OTHER_HOME_PARTNERS = "OtherHomePartners";
-
-    /**
-     * Fields under Credential subtree.
-     */
-    private static final String NODE_CREDENTIAL = "Credential";
-    private static final String NODE_CREATION_DATE = "CreationDate";
-    private static final String NODE_EXPIRATION_DATE = "ExpirationDate";
-    private static final String NODE_USERNAME_PASSWORD = "UsernamePassword";
-    private static final String NODE_USERNAME = "Username";
-    private static final String NODE_PASSWORD = "Password";
-    private static final String NODE_MACHINE_MANAGED = "MachineManaged";
-    private static final String NODE_SOFT_TOKEN_APP = "SoftTokenApp";
-    private static final String NODE_ABLE_TO_SHARE = "AbleToShare";
-    private static final String NODE_EAP_METHOD = "EAPMethod";
-    private static final String NODE_EAP_TYPE = "EAPType";
-    private static final String NODE_VENDOR_ID = "VendorId";
-    private static final String NODE_VENDOR_TYPE = "VendorType";
-    private static final String NODE_INNER_EAP_TYPE = "InnerEAPType";
-    private static final String NODE_INNER_VENDOR_ID = "InnerVendorID";
-    private static final String NODE_INNER_VENDOR_TYPE = "InnerVendorType";
-    private static final String NODE_INNER_METHOD = "InnerMethod";
-    private static final String NODE_DIGITAL_CERTIFICATE = "DigitalCertificate";
-    private static final String NODE_CERTIFICATE_TYPE = "CertificateType";
-    private static final String NODE_CERT_SHA256_FINGERPRINT = "CertSHA256Fingerprint";
-    private static final String NODE_REALM = "Realm";
-    private static final String NODE_SIM = "SIM";
-    private static final String NODE_SIM_IMSI = "IMSI";
-    private static final String NODE_CHECK_AAA_SERVER_CERT_STATUS = "CheckAAAServerCertStatus";
-
-    /**
-     * Fields under Policy subtree.
-     */
-    private static final String NODE_POLICY = "Policy";
-    private static final String NODE_PREFERRED_ROAMING_PARTNER_LIST =
-            "PreferredRoamingPartnerList";
-    private static final String NODE_FQDN_MATCH = "FQDN_Match";
-    private static final String NODE_PRIORITY = "Priority";
-    private static final String NODE_COUNTRY = "Country";
-    private static final String NODE_MIN_BACKHAUL_THRESHOLD = "MinBackhaulThreshold";
-    private static final String NODE_NETWORK_TYPE = "NetworkType";
-    private static final String NODE_DOWNLINK_BANDWIDTH = "DLBandwidth";
-    private static final String NODE_UPLINK_BANDWIDTH = "ULBandwidth";
-    private static final String NODE_POLICY_UPDATE = "PolicyUpdate";
-    private static final String NODE_UPDATE_INTERVAL = "UpdateInterval";
-    private static final String NODE_UPDATE_METHOD = "UpdateMethod";
-    private static final String NODE_RESTRICTION = "Restriction";
-    private static final String NODE_URI = "URI";
-    private static final String NODE_TRUST_ROOT = "TrustRoot";
-    private static final String NODE_CERT_URL = "CertURL";
-    private static final String NODE_SP_EXCLUSION_LIST = "SPExclusionList";
-    private static final String NODE_REQUIRED_PROTO_PORT_TUPLE = "RequiredProtoPortTuple";
-    private static final String NODE_IP_PROTOCOL = "IPProtocol";
-    private static final String NODE_PORT_NUMBER = "PortNumber";
-    private static final String NODE_MAXIMUM_BSS_LOAD_VALUE = "MaximumBSSLoadValue";
-    private static final String NODE_OTHER = "Other";
-
-    /**
-     * URN (Unique Resource Name) for PerProviderSubscription Management Object Tree.
-     */
-    private static final String PPS_MO_URN =
-            "urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0";
-
-    /**
-     * Exception for generic parsing errors.
-     */
-    private static class ParsingException extends Exception {
-        public ParsingException(String message) {
-            super(message);
-        }
-    }
-
-    /**
-     * Class representing a node within the PerProviderSubscription tree.
-     * This is used to flatten out and eliminate the extra layering in the XMLNode tree,
-     * to make the data parsing easier and cleaner.
-     *
-     * A PPSNode can be an internal or a leaf node, but not both.
-     *
-     */
-    private static abstract class PPSNode {
-        private final String mName;
-        public PPSNode(String name) {
-            mName = name;
-        }
-
-        /**
-         * @return the name of the node
-         */
-        public String getName() {
-            return mName;
-        }
-
-        /**
-         * Applies for internal node only.
-         *
-         * @return the list of children nodes.
-         */
-        public abstract List<PPSNode> getChildren();
-
-        /**
-         * Applies for leaf node only.
-         *
-         * @return the string value of the node
-         */
-        public abstract String getValue();
-
-        /**
-         * @return a flag indicating if this is a leaf or an internal node
-         */
-        public abstract boolean isLeaf();
-    }
-
-    /**
-     * Class representing a leaf node in a PPS (PerProviderSubscription) tree.
-     */
-    private static class LeafNode extends PPSNode {
-        private final String mValue;
-        public LeafNode(String nodeName, String value) {
-            super(nodeName);
-            mValue = value;
-        }
-
-        @Override
-        public String getValue() {
-            return mValue;
-        }
-
-        @Override
-        public List<PPSNode> getChildren() {
-            return null;
-        }
-
-        @Override
-        public boolean isLeaf() {
-            return true;
-        }
-    }
-
-    /**
-     * Class representing an internal node in a PPS (PerProviderSubscription) tree.
-     */
-    private static class InternalNode extends PPSNode {
-        private final List<PPSNode> mChildren;
-        public InternalNode(String nodeName, List<PPSNode> children) {
-            super(nodeName);
-            mChildren = children;
-        }
-
-        @Override
-        public String getValue() {
-            return null;
-        }
-
-        @Override
-        public List<PPSNode> getChildren() {
-            return mChildren;
-        }
-
-        @Override
-        public boolean isLeaf() {
-            return false;
-        }
-    }
-
-    /**
-     * @hide
-     */
-    public PpsMoParser() {}
-
-    /**
-     * Convert a XML string representation of a PPS MO (PerProviderSubscription
-     * Management Object) tree to a {@link PasspointConfiguration} object.
-     *
-     * @param xmlString XML string representation of a PPS MO tree
-     * @return {@link PasspointConfiguration} or null
-     */
-    public static PasspointConfiguration parseMoText(String xmlString) {
-        // Convert the XML string to a XML tree.
-        XMLParser xmlParser = new XMLParser();
-        XMLNode root = null;
-        try {
-            root = xmlParser.parse(xmlString);
-        } catch(IOException | SAXException e) {
-            return null;
-        }
-        if (root == null) {
-            return null;
-        }
-
-        // Verify root node is a "MgmtTree" node.
-        if (root.getTag() != TAG_MANAGEMENT_TREE) {
-            Log.e(TAG, "Root is not a MgmtTree");
-            return null;
-        }
-
-        String verDtd = null;    // Used for detecting duplicate VerDTD element.
-        PasspointConfiguration config = null;
-        for (XMLNode child : root.getChildren()) {
-            switch(child.getTag()) {
-                case TAG_VER_DTD:
-                    if (verDtd != null) {
-                        Log.e(TAG, "Duplicate VerDTD element");
-                        return null;
-                    }
-                    verDtd = child.getText();
-                    break;
-                case TAG_NODE:
-                    if (config != null) {
-                        Log.e(TAG, "Unexpected multiple Node element under MgmtTree");
-                        return null;
-                    }
-                    try {
-                        config = parsePpsNode(child);
-                    } catch (ParsingException e) {
-                        Log.e(TAG, e.getMessage());
-                        return null;
-                    }
-                    break;
-                default:
-                    Log.e(TAG, "Unknown node: " + child.getTag());
-                    return null;
-            }
-        }
-        return config;
-    }
-
-    /**
-     * Parse a PerProviderSubscription node. Below is the format of the XML tree (with
-     * each XML element represent a node in the tree):
-     *
-     * <Node>
-     *   <NodeName>PerProviderSubscription</NodeName>
-     *   <RTProperties>
-     *     ...
-     *   </RTPProperties>
-     *   <Node>
-     *     <NodeName>UpdateIdentifier</NodeName>
-     *     <Value>...</Value>
-     *   </Node>
-     *   <Node>
-     *     ...
-     *   </Node>
-     * </Node>
-     *
-     * @param node XMLNode that contains PerProviderSubscription node.
-     * @return PasspointConfiguration or null
-     * @throws ParsingException
-     */
-    private static PasspointConfiguration parsePpsNode(XMLNode node)
-            throws ParsingException {
-        PasspointConfiguration config = null;
-        String nodeName = null;
-        int updateIdentifier = Integer.MIN_VALUE;
-        for (XMLNode child : node.getChildren()) {
-            switch (child.getTag()) {
-                case TAG_NODE_NAME:
-                    if (nodeName != null) {
-                        throw new ParsingException("Duplicate NodeName: " + child.getText());
-                    }
-                    nodeName = child.getText();
-                    if (!TextUtils.equals(nodeName, NODE_PER_PROVIDER_SUBSCRIPTION)) {
-                        throw new ParsingException("Unexpected NodeName: " + nodeName);
-                    }
-                    break;
-                case TAG_NODE:
-                    // A node can be either an UpdateIdentifier node or a PerProviderSubscription
-                    // instance node.  Flatten out the XML tree first by converting it to a PPS
-                    // tree to reduce the complexity of the parsing code.
-                    PPSNode ppsNodeRoot = buildPpsNode(child);
-                    if (TextUtils.equals(ppsNodeRoot.getName(), NODE_UPDATE_IDENTIFIER)) {
-                        if (updateIdentifier != Integer.MIN_VALUE) {
-                            throw new ParsingException("Multiple node for UpdateIdentifier");
-                        }
-                        updateIdentifier = parseInteger(getPpsNodeValue(ppsNodeRoot));
-                    } else {
-                        // Only one PerProviderSubscription instance is expected and allowed.
-                        if (config != null) {
-                            throw new ParsingException("Multiple PPS instance");
-                        }
-                        config = parsePpsInstance(ppsNodeRoot);
-                    }
-                    break;
-                case TAG_RT_PROPERTIES:
-                    // Parse and verify URN stored in the RT (Run Time) Properties.
-                    String urn = parseUrn(child);
-                    if (!TextUtils.equals(urn, PPS_MO_URN)) {
-                        throw new ParsingException("Unknown URN: " + urn);
-                    }
-                    break;
-                default:
-                    throw new ParsingException("Unknown tag under PPS node: " + child.getTag());
-            }
-        }
-        if (config != null && updateIdentifier != Integer.MIN_VALUE) {
-            config.setUpdateIdentifier(updateIdentifier);
-        }
-        return config;
-    }
-
-    /**
-     * Parse the URN stored in the RTProperties. Below is the format of the RTPProperties node:
-     *
-     * <RTProperties>
-     *   <Type>
-     *     <DDFName>urn:...</DDFName>
-     *   </Type>
-     * </RTProperties>
-     *
-     * @param node XMLNode that contains RTProperties node.
-     * @return URN String of URN.
-     * @throws ParsingException
-     */
-    private static String parseUrn(XMLNode node) throws ParsingException {
-        if (node.getChildren().size() != 1)
-            throw new ParsingException("Expect RTPProperties node to only have one child");
-
-        XMLNode typeNode = node.getChildren().get(0);
-        if (typeNode.getChildren().size() != 1) {
-            throw new ParsingException("Expect Type node to only have one child");
-        }
-        if (!TextUtils.equals(typeNode.getTag(), TAG_TYPE)) {
-            throw new ParsingException("Unexpected tag for Type: " + typeNode.getTag());
-        }
-
-        XMLNode ddfNameNode = typeNode.getChildren().get(0);
-        if (!ddfNameNode.getChildren().isEmpty()) {
-            throw new ParsingException("Expect DDFName node to have no child");
-        }
-        if (!TextUtils.equals(ddfNameNode.getTag(), TAG_DDF_NAME)) {
-            throw new ParsingException("Unexpected tag for DDFName: " + ddfNameNode.getTag());
-        }
-
-        return ddfNameNode.getText();
-    }
-
-    /**
-     * Convert a XML tree represented by XMLNode to a PPS (PerProviderSubscription) instance tree
-     * represented by PPSNode.  This flattens out the XML tree to allow easier and cleaner parsing
-     * of the PPS configuration data.  Only three types of XML tag are expected: "NodeName",
-     * "Node", and "Value".
-     *
-     * The original XML tree (each XML element represent a node):
-     *
-     * <Node>
-     *   <NodeName>root</NodeName>
-     *   <Node>
-     *     <NodeName>child1</NodeName>
-     *     <Value>value1</Value>
-     *   </Node>
-     *   <Node>
-     *     <NodeName>child2</NodeName>
-     *     <Node>
-     *       <NodeName>grandchild1</NodeName>
-     *       ...
-     *     </Node>
-     *   </Node>
-     *   ...
-     * </Node>
-     *
-     * The converted PPS tree:
-     *
-     * [root] --- [child1, value1]
-     *   |
-     *   ---------[child2] --------[grandchild1] --- ...
-     *
-     * @param node XMLNode pointed to the root of a XML tree
-     * @return PPSNode pointing to the root of a PPS tree
-     * @throws ParsingException
-     */
-    private static PPSNode buildPpsNode(XMLNode node) throws ParsingException {
-        String nodeName = null;
-        String nodeValue = null;
-        List<PPSNode> childNodes = new ArrayList<PPSNode>();
-        // Names of parsed child nodes, use for detecting multiple child nodes with the same name.
-        Set<String> parsedNodes = new HashSet<String>();
-
-        for (XMLNode child : node.getChildren()) {
-            String tag = child.getTag();
-            if (TextUtils.equals(tag, TAG_NODE_NAME)) {
-                if (nodeName != null) {
-                    throw new ParsingException("Duplicate NodeName node");
-                }
-                nodeName = child.getText();
-            } else if (TextUtils.equals(tag, TAG_NODE)) {
-                PPSNode ppsNode = buildPpsNode(child);
-                if (parsedNodes.contains(ppsNode.getName())) {
-                    throw new ParsingException("Duplicate node: " + ppsNode.getName());
-                }
-                parsedNodes.add(ppsNode.getName());
-                childNodes.add(ppsNode);
-            } else if (TextUtils.equals(tag, TAG_VALUE)) {
-               if (nodeValue != null) {
-                   throw new ParsingException("Duplicate Value node");
-               }
-               nodeValue = child.getText();
-            } else {
-                throw new ParsingException("Unknown tag: " + tag);
-            }
-        }
-
-        if (nodeName == null) {
-            throw new ParsingException("Invalid node: missing NodeName");
-        }
-        if (nodeValue == null && childNodes.size() == 0) {
-            throw new ParsingException("Invalid node: " + nodeName +
-                    " missing both value and children");
-        }
-        if (nodeValue != null && childNodes.size() > 0) {
-            throw new ParsingException("Invalid node: " + nodeName +
-                    " contained both value and children");
-        }
-
-        if (nodeValue != null) {
-            return new LeafNode(nodeName, nodeValue);
-        }
-        return new InternalNode(nodeName, childNodes);
-    }
-
-    /**
-     * Return the value of a PPSNode.  An exception will be thrown if the given node
-     * is not a leaf node.
-     *
-     * @param node PPSNode to retrieve the value from
-     * @return String representing the value of the node
-     * @throws ParsingException
-     */
-    private static String getPpsNodeValue(PPSNode node) throws ParsingException {
-        if (!node.isLeaf()) {
-            throw new ParsingException("Cannot get value from a non-leaf node: " + node.getName());
-        }
-        return node.getValue();
-    }
-
-    /**
-     * Parse a PPS (PerProviderSubscription) configurations from a PPS tree.
-     *
-     * @param root PPSNode representing the root of the PPS tree
-     * @return PasspointConfiguration
-     * @throws ParsingException
-     */
-    private static PasspointConfiguration parsePpsInstance(PPSNode root)
-            throws ParsingException {
-        if (root.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for PPS instance");
-        }
-
-        PasspointConfiguration config = new PasspointConfiguration();
-        for (PPSNode child : root.getChildren()) {
-            switch(child.getName()) {
-                case NODE_HOMESP:
-                    config.setHomeSp(parseHomeSP(child));
-                    break;
-                case NODE_CREDENTIAL:
-                    config.setCredential(parseCredential(child));
-                    break;
-                case NODE_POLICY:
-                    config.setPolicy(parsePolicy(child));
-                    break;
-                case NODE_AAA_SERVER_TRUST_ROOT:
-                    config.setTrustRootCertList(parseAAAServerTrustRootList(child));
-                    break;
-                case NODE_SUBSCRIPTION_UPDATE:
-                    config.setSubscriptionUpdate(parseUpdateParameter(child));
-                    break;
-                case NODE_SUBSCRIPTION_PARAMETER:
-                    parseSubscriptionParameter(child, config);
-                    break;
-                case NODE_CREDENTIAL_PRIORITY:
-                    config.setCredentialPriority(parseInteger(getPpsNodeValue(child)));
-                    break;
-                case NODE_EXTENSION:
-                    // All vendor specific information will be under this node.
-                    parseExtension(child, config);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node: " + child.getName());
-            }
-        }
-        return config;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/HomeSP subtree
-     * @return HomeSP
-     * @throws ParsingException
-     */
-    private static HomeSp parseHomeSP(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for HomeSP");
-        }
-
-        HomeSp homeSp = new HomeSp();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_FQDN:
-                    homeSp.setFqdn(getPpsNodeValue(child));
-                    break;
-                case NODE_FRIENDLY_NAME:
-                    homeSp.setFriendlyName(getPpsNodeValue(child));
-                    break;
-                case NODE_ROAMING_CONSORTIUM_OI:
-                    homeSp.setRoamingConsortiumOis(
-                            parseRoamingConsortiumOI(getPpsNodeValue(child)));
-                    break;
-                case NODE_ICON_URL:
-                    homeSp.setIconUrl(getPpsNodeValue(child));
-                    break;
-                case NODE_NETWORK_ID:
-                    homeSp.setHomeNetworkIds(parseNetworkIds(child));
-                    break;
-                case NODE_HOME_OI_LIST:
-                    Pair<List<Long>, List<Long>> homeOIs = parseHomeOIList(child);
-                    homeSp.setMatchAllOis(convertFromLongList(homeOIs.first));
-                    homeSp.setMatchAnyOis(convertFromLongList(homeOIs.second));
-                    break;
-                case NODE_OTHER_HOME_PARTNERS:
-                    homeSp.setOtherHomePartners(parseOtherHomePartners(child));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under HomeSP: " + child.getName());
-            }
-        }
-        return homeSp;
-    }
-
-    /**
-     * Parse the roaming consortium OI string, which contains a list of OIs separated by ",".
-     *
-     * @param oiStr string containing list of OIs (Organization Identifiers) separated by ","
-     * @return long[]
-     * @throws ParsingException
-     */
-    private static long[] parseRoamingConsortiumOI(String oiStr)
-            throws ParsingException {
-        String[] oiStrArray = oiStr.split(",");
-        long[] oiArray = new long[oiStrArray.length];
-        for (int i = 0; i < oiStrArray.length; i++) {
-            oiArray[i] = parseLong(oiStrArray[i], 16);
-        }
-        return oiArray;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/NetworkID subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/HomeSP/NetworkID
-     *             subtree
-     * @return HashMap<String, Long> representing list of <SSID, HESSID> pair.
-     * @throws ParsingException
-     */
-    static private Map<String, Long> parseNetworkIds(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for NetworkID");
-        }
-
-        Map<String, Long> networkIds = new HashMap<>();
-        for (PPSNode child : node.getChildren()) {
-            Pair<String, Long> networkId = parseNetworkIdInstance(child);
-            networkIds.put(networkId.first, networkId.second);
-        }
-        return networkIds;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/NetworkID/<X+> subtree.
-     * The instance name (<X+>) is irrelevant and must be unique for each instance, which
-     * is verified when the PPS tree is constructed {@link #buildPpsNode}.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/HomeSP/NetworkID/<X+> subtree
-     * @return Pair<String, Long> representing <SSID, HESSID> pair.
-     * @throws ParsingException
-     */
-    static private Pair<String, Long> parseNetworkIdInstance(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for NetworkID instance");
-        }
-
-        String ssid = null;
-        Long hessid = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_SSID:
-                    ssid = getPpsNodeValue(child);
-                    break;
-                case NODE_HESSID:
-                    hessid = parseLong(getPpsNodeValue(child), 16);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under NetworkID instance: " +
-                            child.getName());
-            }
-        }
-        if (ssid == null)
-            throw new ParsingException("NetworkID instance missing SSID");
-
-        return new Pair<String, Long>(ssid, hessid);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/HomeOIList subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/HomeSP/HomeOIList
-     *             subtree
-     * @return Pair<List<Long>, List<Long>> containing both MatchAllOIs and MatchAnyOIs list.
-     * @throws ParsingException
-     */
-    private static Pair<List<Long>, List<Long>> parseHomeOIList(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for HomeOIList");
-        }
-
-        List<Long> matchAllOIs = new ArrayList<Long>();
-        List<Long> matchAnyOIs = new ArrayList<Long>();
-        for (PPSNode child : node.getChildren()) {
-            Pair<Long, Boolean> homeOI = parseHomeOIInstance(child);
-            if (homeOI.second.booleanValue()) {
-                matchAllOIs.add(homeOI.first);
-            } else {
-                matchAnyOIs.add(homeOI.first);
-            }
-        }
-        return new Pair<List<Long>, List<Long>>(matchAllOIs, matchAnyOIs);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/HomeOIList/<X+> subtree.
-     * The instance name (<X+>) is irrelevant and must be unique for each instance, which
-     * is verified when the PPS tree is constructed {@link #buildPpsNode}.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/HomeSP/HomeOIList/<X+> subtree
-     * @return Pair<Long, Boolean> containing a HomeOI and a HomeOIRequired flag
-     * @throws ParsingException
-     */
-    private static Pair<Long, Boolean> parseHomeOIInstance(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for HomeOI instance");
-        }
-
-        Long oi = null;
-        Boolean required = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_HOME_OI:
-                    try {
-                        oi = Long.valueOf(getPpsNodeValue(child), 16);
-                    } catch (NumberFormatException e) {
-                        throw new ParsingException("Invalid HomeOI: " + getPpsNodeValue(child));
-                    }
-                    break;
-                case NODE_HOME_OI_REQUIRED:
-                    required = Boolean.valueOf(getPpsNodeValue(child));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under NetworkID instance: " +
-                            child.getName());
-            }
-        }
-        if (oi == null) {
-            throw new ParsingException("HomeOI instance missing OI field");
-        }
-        if (required == null) {
-            throw new ParsingException("HomeOI instance missing required field");
-        }
-        return new Pair<Long, Boolean>(oi, required);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/OtherHomePartners subtree.
-     * This contains a list of FQDN (Fully Qualified Domain Name) that are considered
-     * home partners.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/HomeSP/OtherHomePartners subtree
-     * @return String[] list of partner's FQDN
-     * @throws ParsingException
-     */
-    private static String[] parseOtherHomePartners(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for OtherHomePartners");
-        }
-        List<String> otherHomePartners = new ArrayList<String>();
-        for (PPSNode child : node.getChildren()) {
-            String fqdn = parseOtherHomePartnerInstance(child);
-            otherHomePartners.add(fqdn);
-        }
-        return otherHomePartners.toArray(new String[otherHomePartners.size()]);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/HomeSP/OtherHomePartners/<X+> subtree.
-     * The instance name (<X+>) is irrelevant and must be unique for each instance, which
-     * is verified when the PPS tree is constructed {@link #buildPpsNode}.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/HomeSP/OtherHomePartners/<X+> subtree
-     * @return String FQDN of the partner
-     * @throws ParsingException
-     */
-    private static String parseOtherHomePartnerInstance(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for OtherHomePartner instance");
-        }
-        String fqdn = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_FQDN:
-                    fqdn = getPpsNodeValue(child);
-                    break;
-                default:
-                    throw new ParsingException(
-                            "Unknown node under OtherHomePartner instance: " + child.getName());
-            }
-        }
-        if (fqdn == null) {
-            throw new ParsingException("OtherHomePartner instance missing FQDN field");
-        }
-        return fqdn;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Credential subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/Credential subtree
-     * @return Credential
-     * @throws ParsingException
-     */
-    private static Credential parseCredential(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for Credential");
-        }
-
-        Credential credential = new Credential();
-        for (PPSNode child: node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_CREATION_DATE:
-                    credential.setCreationTimeInMillis(parseDate(getPpsNodeValue(child)));
-                    break;
-                case NODE_EXPIRATION_DATE:
-                    credential.setExpirationTimeInMillis(parseDate(getPpsNodeValue(child)));
-                    break;
-                case NODE_USERNAME_PASSWORD:
-                    credential.setUserCredential(parseUserCredential(child));
-                    break;
-                case NODE_DIGITAL_CERTIFICATE:
-                    credential.setCertCredential(parseCertificateCredential(child));
-                    break;
-                case NODE_REALM:
-                    credential.setRealm(getPpsNodeValue(child));
-                    break;
-                case NODE_CHECK_AAA_SERVER_CERT_STATUS:
-                    credential.setCheckAaaServerCertStatus(
-                            Boolean.parseBoolean(getPpsNodeValue(child)));
-                    break;
-                case NODE_SIM:
-                    credential.setSimCredential(parseSimCredential(child));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under Credential: " +
-                            child.getName());
-            }
-        }
-        return credential;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Credential/UsernamePassword subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Credential/UsernamePassword subtree
-     * @return Credential.UserCredential
-     * @throws ParsingException
-     */
-    private static Credential.UserCredential parseUserCredential(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for UsernamePassword");
-        }
-
-        Credential.UserCredential userCred = new Credential.UserCredential();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_USERNAME:
-                    userCred.setUsername(getPpsNodeValue(child));
-                    break;
-                case NODE_PASSWORD:
-                    userCred.setPassword(getPpsNodeValue(child));
-                    break;
-                case NODE_MACHINE_MANAGED:
-                    userCred.setMachineManaged(Boolean.parseBoolean(getPpsNodeValue(child)));
-                    break;
-                case NODE_SOFT_TOKEN_APP:
-                    userCred.setSoftTokenApp(getPpsNodeValue(child));
-                    break;
-                case NODE_ABLE_TO_SHARE:
-                    userCred.setAbleToShare(Boolean.parseBoolean(getPpsNodeValue(child)));
-                    break;
-                case NODE_EAP_METHOD:
-                    parseEAPMethod(child, userCred);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under UsernamePassword: "
-                            + child.getName());
-            }
-        }
-        return userCred;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Credential/UsernamePassword/EAPMethod
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Credential/UsernamePassword/EAPMethod subtree
-     * @param userCred UserCredential to be updated with EAP method values.
-     * @throws ParsingException
-     */
-    private static void parseEAPMethod(PPSNode node, Credential.UserCredential userCred)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for EAPMethod");
-        }
-
-        for (PPSNode child : node.getChildren()) {
-            switch(child.getName()) {
-                case NODE_EAP_TYPE:
-                    userCred.setEapType(parseInteger(getPpsNodeValue(child)));
-                    break;
-                case NODE_INNER_METHOD:
-                    userCred.setNonEapInnerMethod(getPpsNodeValue(child));
-                    break;
-                case NODE_VENDOR_ID:
-                case NODE_VENDOR_TYPE:
-                case NODE_INNER_EAP_TYPE:
-                case NODE_INNER_VENDOR_ID:
-                case NODE_INNER_VENDOR_TYPE:
-                    // Only EAP-TTLS is currently supported for user credential, which doesn't
-                    // use any of these parameters.
-                    Log.d(TAG, "Ignore unsupported EAP method parameter: " + child.getName());
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under EAPMethod: " + child.getName());
-            }
-        }
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Credential/DigitalCertificate subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Credential/DigitalCertificate subtree
-     * @return Credential.CertificateCredential
-     * @throws ParsingException
-     */
-    private static Credential.CertificateCredential parseCertificateCredential(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for CertificateCredential");
-        }
-
-        Credential.CertificateCredential certCred = new Credential.CertificateCredential();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_CERTIFICATE_TYPE:
-                    certCred.setCertType(getPpsNodeValue(child));
-                    break;
-                case NODE_CERT_SHA256_FINGERPRINT:
-                    certCred.setCertSha256Fingerprint(parseHexString(getPpsNodeValue(child)));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under CertificateCredential: "
-                            + child.getName());
-            }
-        }
-        return certCred;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Credential/SIM subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/Credential/SIM
-     *             subtree
-     * @return Credential.SimCredential
-     * @throws ParsingException
-     */
-    private static Credential.SimCredential parseSimCredential(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for SimCredential");
-        }
-
-        Credential.SimCredential simCred = new Credential.SimCredential();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_SIM_IMSI:
-                    simCred.setImsi(getPpsNodeValue(child));
-                    break;
-                case NODE_EAP_TYPE:
-                    simCred.setEapType(parseInteger(getPpsNodeValue(child)));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under SimCredential: "
-                            + child.getName());
-            }
-        }
-        return simCred;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/Policy subtree
-     * @return {@link Policy}
-     * @throws ParsingException
-     */
-    private static Policy parsePolicy(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for Policy");
-        }
-
-        Policy policy = new Policy();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_PREFERRED_ROAMING_PARTNER_LIST:
-                    policy.setPreferredRoamingPartnerList(parsePreferredRoamingPartnerList(child));
-                    break;
-                case NODE_MIN_BACKHAUL_THRESHOLD:
-                    parseMinBackhaulThreshold(child, policy);
-                    break;
-                case NODE_POLICY_UPDATE:
-                    policy.setPolicyUpdate(parseUpdateParameter(child));
-                    break;
-                case NODE_SP_EXCLUSION_LIST:
-                    policy.setExcludedSsidList(parseSpExclusionList(child));
-                    break;
-                case NODE_REQUIRED_PROTO_PORT_TUPLE:
-                    policy.setRequiredProtoPortMap(parseRequiredProtoPortTuple(child));
-                    break;
-                case NODE_MAXIMUM_BSS_LOAD_VALUE:
-                    policy.setMaximumBssLoadValue(parseInteger(getPpsNodeValue(child)));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under Policy: " + child.getName());
-            }
-        }
-        return policy;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/PreferredRoamingPartnerList
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/PreferredRoamingPartnerList subtree
-     * @return List of {@link Policy#RoamingPartner}
-     * @throws ParsingException
-     */
-    private static List<Policy.RoamingPartner> parsePreferredRoamingPartnerList(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for PreferredRoamingPartnerList");
-        }
-        List<Policy.RoamingPartner> partnerList = new ArrayList<>();
-        for (PPSNode child : node.getChildren()) {
-            partnerList.add(parsePreferredRoamingPartner(child));
-        }
-        return partnerList;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/PreferredRoamingPartnerList/<X+>
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/PreferredRoamingPartnerList/<X+> subtree
-     * @return {@link Policy#RoamingPartner}
-     * @throws ParsingException
-     */
-    private static Policy.RoamingPartner parsePreferredRoamingPartner(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for PreferredRoamingPartner "
-                    + "instance");
-        }
-
-        Policy.RoamingPartner roamingPartner = new Policy.RoamingPartner();
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_FQDN_MATCH:
-                    // FQDN_Match field is in the format of "[FQDN],[MatchInfo]", where [MatchInfo]
-                    // is either "exactMatch" for exact match of FQDN or "includeSubdomains" for
-                    // matching all FQDNs with the same sub-domain.
-                    String fqdnMatch = getPpsNodeValue(child);
-                    String[] fqdnMatchArray = fqdnMatch.split(",");
-                    if (fqdnMatchArray.length != 2) {
-                        throw new ParsingException("Invalid FQDN_Match: " + fqdnMatch);
-                    }
-                    roamingPartner.setFqdn(fqdnMatchArray[0]);
-                    if (TextUtils.equals(fqdnMatchArray[1], "exactMatch")) {
-                        roamingPartner.setFqdnExactMatch(true);
-                    } else if (TextUtils.equals(fqdnMatchArray[1], "includeSubdomains")) {
-                        roamingPartner.setFqdnExactMatch(false);
-                    } else {
-                        throw new ParsingException("Invalid FQDN_Match: " + fqdnMatch);
-                    }
-                    break;
-                case NODE_PRIORITY:
-                    roamingPartner.setPriority(parseInteger(getPpsNodeValue(child)));
-                    break;
-                case NODE_COUNTRY:
-                    roamingPartner.setCountries(getPpsNodeValue(child));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under PreferredRoamingPartnerList "
-                            + "instance " + child.getName());
-            }
-        }
-        return roamingPartner;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/MinBackhaulThreshold subtree
-     * into the given policy.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/MinBackhaulThreshold subtree
-     * @param policy The policy to store the MinBackhualThreshold configuration
-     * @throws ParsingException
-     */
-    private static void parseMinBackhaulThreshold(PPSNode node, Policy policy)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for MinBackhaulThreshold");
-        }
-        for (PPSNode child : node.getChildren()) {
-            parseMinBackhaulThresholdInstance(child, policy);
-        }
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/MinBackhaulThreshold/<X+> subtree
-     * into the given policy.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/MinBackhaulThreshold/<X+> subtree
-     * @param policy The policy to store the MinBackhaulThreshold configuration
-     * @throws ParsingException
-     */
-    private static void parseMinBackhaulThresholdInstance(PPSNode node, Policy policy)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for MinBackhaulThreshold instance");
-        }
-        String networkType = null;
-        long downlinkBandwidth = Long.MIN_VALUE;
-        long uplinkBandwidth = Long.MIN_VALUE;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_NETWORK_TYPE:
-                    networkType = getPpsNodeValue(child);
-                    break;
-                case NODE_DOWNLINK_BANDWIDTH:
-                    downlinkBandwidth = parseLong(getPpsNodeValue(child), 10);
-                    break;
-                case NODE_UPLINK_BANDWIDTH:
-                    uplinkBandwidth = parseLong(getPpsNodeValue(child), 10);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under MinBackhaulThreshold instance "
-                            + child.getName());
-            }
-        }
-        if (networkType == null) {
-            throw new ParsingException("Missing NetworkType field");
-        }
-
-        if (TextUtils.equals(networkType, "home")) {
-            policy.setMinHomeDownlinkBandwidth(downlinkBandwidth);
-            policy.setMinHomeUplinkBandwidth(uplinkBandwidth);
-        } else if (TextUtils.equals(networkType, "roaming")) {
-            policy.setMinRoamingDownlinkBandwidth(downlinkBandwidth);
-            policy.setMinRoamingUplinkBandwidth(uplinkBandwidth);
-        } else {
-            throw new ParsingException("Invalid network type: " + networkType);
-        }
-    }
-
-    /**
-     * Parse update parameters. This contained configurations from either
-     * PerProviderSubscription/Policy/PolicyUpdate or PerProviderSubscription/SubscriptionUpdate
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the PerProviderSubscription/Policy/PolicyUpdate
-     *             or PerProviderSubscription/SubscriptionUpdate subtree
-     * @return {@link UpdateParameter}
-     * @throws ParsingException
-     */
-    private static UpdateParameter parseUpdateParameter(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for Update Parameters");
-        }
-
-        UpdateParameter updateParam = new UpdateParameter();
-        for (PPSNode child : node.getChildren()) {
-            switch(child.getName()) {
-                case NODE_UPDATE_INTERVAL:
-                    updateParam.setUpdateIntervalInMinutes(parseLong(getPpsNodeValue(child), 10));
-                    break;
-                case NODE_UPDATE_METHOD:
-                    updateParam.setUpdateMethod(getPpsNodeValue(child));
-                    break;
-                case NODE_RESTRICTION:
-                    updateParam.setRestriction(getPpsNodeValue(child));
-                    break;
-                case NODE_URI:
-                    updateParam.setServerUri(getPpsNodeValue(child));
-                    break;
-                case NODE_USERNAME_PASSWORD:
-                    Pair<String, String> usernamePassword = parseUpdateUserCredential(child);
-                    updateParam.setUsername(usernamePassword.first);
-                    updateParam.setBase64EncodedPassword(usernamePassword.second);
-                    break;
-                case NODE_TRUST_ROOT:
-                    Pair<String, byte[]> trustRoot = parseTrustRoot(child);
-                    updateParam.setTrustRootCertUrl(trustRoot.first);
-                    updateParam.setTrustRootCertSha256Fingerprint(trustRoot.second);
-                    break;
-                case NODE_OTHER:
-                    Log.d(TAG, "Ignore unsupported paramter: " + child.getName());
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under Update Parameters: "
-                            + child.getName());
-            }
-        }
-        return updateParam;
-    }
-
-    /**
-     * Parse username and password parameters associated with policy or subscription update.
-     * This contained configurations under either
-     * PerProviderSubscription/Policy/PolicyUpdate/UsernamePassword or
-     * PerProviderSubscription/SubscriptionUpdate/UsernamePassword subtree.
-     *
-     * @param node PPSNode representing the root of the UsernamePassword subtree
-     * @return Pair of username and password
-     * @throws ParsingException
-     */
-    private static Pair<String, String> parseUpdateUserCredential(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for UsernamePassword");
-        }
-
-        String username = null;
-        String password = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_USERNAME:
-                    username = getPpsNodeValue(child);
-                    break;
-                case NODE_PASSWORD:
-                    password = getPpsNodeValue(child);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under UsernamePassword: "
-                            + child.getName());
-            }
-        }
-        return Pair.create(username, password);
-    }
-
-    /**
-     * Parse the trust root parameters associated with policy update, subscription update, or AAA
-     * server trust root.
-     *
-     * This contained configurations under either
-     * PerProviderSubscription/Policy/PolicyUpdate/TrustRoot or
-     * PerProviderSubscription/SubscriptionUpdate/TrustRoot or
-     * PerProviderSubscription/AAAServerTrustRoot/<X+> subtree.
-     *
-     * @param node PPSNode representing the root of the TrustRoot subtree
-     * @return Pair of Certificate URL and fingerprint
-     * @throws ParsingException
-     */
-    private static Pair<String, byte[]> parseTrustRoot(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for TrustRoot");
-        }
-
-        String certUrl = null;
-        byte[] certFingerprint = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_CERT_URL:
-                    certUrl = getPpsNodeValue(child);
-                    break;
-                case NODE_CERT_SHA256_FINGERPRINT:
-                    certFingerprint = parseHexString(getPpsNodeValue(child));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under TrustRoot: "
-                            + child.getName());
-            }
-        }
-        return Pair.create(certUrl, certFingerprint);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/SPExclusionList subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/SPExclusionList subtree
-     * @return Array of excluded SSIDs
-     * @throws ParsingException
-     */
-    private static String[] parseSpExclusionList(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for SPExclusionList");
-        }
-        List<String> ssidList = new ArrayList<>();
-        for (PPSNode child : node.getChildren()) {
-            ssidList.add(parseSpExclusionInstance(child));
-        }
-        return ssidList.toArray(new String[ssidList.size()]);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/SPExclusionList/<X+> subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/SPExclusionList/<X+> subtree
-     * @return String
-     * @throws ParsingException
-     */
-    private static String parseSpExclusionInstance(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for SPExclusion instance");
-        }
-        String ssid = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_SSID:
-                    ssid = getPpsNodeValue(child);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under SPExclusion instance");
-            }
-        }
-        return ssid;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/RequiredProtoPortTuple subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/RequiredProtoPortTuple subtree
-     * @return Map of IP Protocol to Port Number tuples
-     * @throws ParsingException
-     */
-    private static Map<Integer, String> parseRequiredProtoPortTuple(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for RequiredProtoPortTuple");
-        }
-        Map<Integer, String> protoPortTupleMap = new HashMap<>();
-        for (PPSNode child : node.getChildren()) {
-            Pair<Integer, String> protoPortTuple = parseProtoPortTuple(child);
-            protoPortTupleMap.put(protoPortTuple.first, protoPortTuple.second);
-        }
-        return protoPortTupleMap;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Policy/RequiredProtoPortTuple/<X+>
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Policy/RequiredProtoPortTuple/<X+> subtree
-     * @return Pair of IP Protocol to Port Number tuple
-     * @throws ParsingException
-     */
-    private static Pair<Integer, String> parseProtoPortTuple(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for RequiredProtoPortTuple "
-                    + "instance");
-        }
-        int proto = Integer.MIN_VALUE;
-        String ports = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_IP_PROTOCOL:
-                    proto = parseInteger(getPpsNodeValue(child));
-                    break;
-                case NODE_PORT_NUMBER:
-                    ports = getPpsNodeValue(child);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under RequiredProtoPortTuple instance"
-                            + child.getName());
-            }
-        }
-        if (proto == Integer.MIN_VALUE) {
-            throw new ParsingException("Missing IPProtocol field");
-        }
-        if (ports == null) {
-            throw new ParsingException("Missing PortNumber field");
-        }
-        return Pair.create(proto, ports);
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/AAAServerTrustRoot subtree.
-     *
-     * @param node PPSNode representing the root of PerProviderSubscription/AAAServerTrustRoot
-     *             subtree
-     * @return Map of certificate URL with the corresponding certificate fingerprint
-     * @throws ParsingException
-     */
-    private static Map<String, byte[]> parseAAAServerTrustRootList(PPSNode node)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for AAAServerTrustRoot");
-        }
-        Map<String, byte[]> certList = new HashMap<>();
-        for (PPSNode child : node.getChildren()) {
-            Pair<String, byte[]> certTuple = parseTrustRoot(child);
-            certList.put(certTuple.first, certTuple.second);
-        }
-        return certList;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/SubscriptionParameter subtree.
-     *
-     * @param node PPSNode representing the root of PerProviderSubscription/SubscriptionParameter
-     *             subtree
-     * @param config Instance of {@link PasspointConfiguration}
-     * @throws ParsingException
-     */
-    private static void parseSubscriptionParameter(PPSNode node, PasspointConfiguration config)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for SubscriptionParameter");
-        }
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_CREATION_DATE:
-                    config.setSubscriptionCreationTimeInMillis(parseDate(getPpsNodeValue(child)));
-                    break;
-                case NODE_EXPIRATION_DATE:
-                    config.setSubscriptionExpirationTimeInMillis(parseDate(getPpsNodeValue(child)));
-                    break;
-                case NODE_TYPE_OF_SUBSCRIPTION:
-                    config.setSubscriptionType(getPpsNodeValue(child));
-                    break;
-                case NODE_USAGE_LIMITS:
-                    parseUsageLimits(child, config);
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under SubscriptionParameter"
-                            + child.getName());
-            }
-        }
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/SubscriptionParameter/UsageLimits
-     * subtree.
-     *
-     * @param node PPSNode representing the root of
-     *             PerProviderSubscription/SubscriptionParameter/UsageLimits subtree
-     * @param config Instance of {@link PasspointConfiguration}
-     * @throws ParsingException
-     */
-    private static void parseUsageLimits(PPSNode node, PasspointConfiguration config)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for UsageLimits");
-        }
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_DATA_LIMIT:
-                    config.setUsageLimitDataLimit(parseLong(getPpsNodeValue(child), 10));
-                    break;
-                case NODE_START_DATE:
-                    config.setUsageLimitStartTimeInMillis(parseDate(getPpsNodeValue(child)));
-                    break;
-                case NODE_TIME_LIMIT:
-                    config.setUsageLimitTimeLimitInMinutes(parseLong(getPpsNodeValue(child), 10));
-                    break;
-                case NODE_USAGE_TIME_PERIOD:
-                    config.setUsageLimitUsageTimePeriodInMinutes(
-                            parseLong(getPpsNodeValue(child), 10));
-                    break;
-                default:
-                    throw new ParsingException("Unknown node under UsageLimits"
-                            + child.getName());
-            }
-        }
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Extension/Android/AAAServerTrustedNames
-     * subtree.
-     *
-     * @param node PPSNode representing the root of the
-     *             PerProviderSubscription/Extension/Android/AAAServerTrustedNames subtree
-     * @return String[] list of trusted name
-     * @throws ParsingException
-     */
-    private static String[] parseAaaServerTrustedNames(PPSNode node) throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for AAAServerTrustedNames instance");
-        }
-        String fqdnListStr = null;
-        String[] fqdnListArray = null;
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_FQDN:
-                    fqdnListStr = getPpsNodeValue(child);
-                    fqdnListArray = fqdnListStr.split(";");
-                    break;
-                default:
-                    throw new ParsingException(
-                            "Unknown node under AAAServerTrustedNames instance: "
-                            + child.getName());
-            }
-        }
-        if (fqdnListArray == null) {
-            throw new ParsingException("AAAServerTrustedNames instance missing FQDN field");
-        }
-
-        return fqdnListArray;
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Extension/Android subtree.
-     *
-     * @param node PPSNode representing the root of PerProviderSubscription/Extension
-     *             subtree
-     * @param config Instance of {@link PasspointConfiguration}
-     * @throws ParsingException
-     */
-    private static void parseVendorAndroidExtension(PPSNode node, PasspointConfiguration config)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for AndroidExtension");
-        }
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_AAA_SERVER_TRUSTED_NAMES:
-                    config.setAaaServerTrustedNames(parseAaaServerTrustedNames(child));
-                    break;
-                default:
-                    // Don't raise an exception for unknown nodes to avoid breaking old release
-                    Log.w(TAG, "Unknown node under Android Extension: " + child.getName());
-            }
-        }
-    }
-
-    /**
-     * Parse configurations under PerProviderSubscription/Extension subtree.
-     *
-     * @param node PPSNode representing the root of PerProviderSubscription/Extension
-     *             subtree
-     * @param config Instance of {@link PasspointConfiguration}
-     * @throws ParsingException
-     */
-    private static void parseExtension(PPSNode node, PasspointConfiguration config)
-            throws ParsingException {
-        if (node.isLeaf()) {
-            throw new ParsingException("Leaf node not expected for Extension");
-        }
-        for (PPSNode child : node.getChildren()) {
-            switch (child.getName()) {
-                case NODE_VENDOR_ANDROID:
-                    parseVendorAndroidExtension(child, config);
-                    break;
-                default:
-                    // Unknown nodes under Extension won't raise exception.
-                    // This allows adding new nodes in the future and
-                    // won't break older release.
-                    Log.w(TAG, "Unknown node under Extension: " + child.getName());
-            }
-        }
-    }
-
-    /**
-     * Convert a hex string to a byte array.
-     *
-     * @param str String containing hex values
-     * @return byte[]
-     * @throws ParsingException
-     */
-    private static byte[] parseHexString(String str) throws ParsingException {
-        if ((str.length() & 1) == 1) {
-            throw new ParsingException("Odd length hex string: " + str + ", length: "
-                    + str.length());
-        }
-
-        byte[] result = new byte[str.length() / 2];
-        for (int i = 0; i < result.length; i++) {
-          int index = i * 2;
-          try {
-              result[i] = (byte) Integer.parseInt(str.substring(index, index + 2), 16);
-          } catch (NumberFormatException e) {
-              throw new ParsingException("Invalid hex string: " + str);
-          }
-        }
-        return result;
-    }
-
-    /**
-     * Convert a date string to the number of milliseconds since January 1, 1970, 00:00:00 GMT.
-     *
-     * @param dateStr String in the format of yyyy-MM-dd'T'HH:mm:ss'Z'
-     * @return number of milliseconds
-     * @throws ParsingException
-     */
-    private static long parseDate(String dateStr) throws ParsingException {
-        try {
-            DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
-            return format.parse(dateStr).getTime();
-        } catch (ParseException pe) {
-            throw new ParsingException("Badly formatted time: " + dateStr);
-        }
-    }
-
-    /**
-     * Parse an integer string.
-     *
-     * @param value String of integer value
-     * @return int
-     * @throws ParsingException
-     */
-    private static int parseInteger(String value) throws ParsingException {
-        try {
-            return Integer.parseInt(value);
-        } catch (NumberFormatException e) {
-            throw new ParsingException("Invalid integer value: " + value);
-        }
-    }
-
-    /**
-     * Parse a string representing a long integer.
-     *
-     * @param value String of long integer value
-     * @return long
-     * @throws ParsingException
-     */
-    private static long parseLong(String value, int radix) throws ParsingException {
-        try {
-            return Long.parseLong(value, radix);
-        } catch (NumberFormatException e) {
-            throw new ParsingException("Invalid long integer value: " + value);
-        }
-    }
-
-    /**
-     * Convert a List<Long> to a primitive long array long[].
-     *
-     * @param list List to be converted
-     * @return long[]
-     */
-    private static long[] convertFromLongList(List<Long> list) {
-        Long[] objectArray = list.toArray(new Long[list.size()]);
-        long[] primitiveArray = new long[objectArray.length];
-        for (int i = 0; i < objectArray.length; i++) {
-            primitiveArray[i] = objectArray[i].longValue();
-        }
-        return primitiveArray;
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/omadm/XMLNode.java b/wifi/java/android/net/wifi/hotspot2/omadm/XMLNode.java
deleted file mode 100644
index 959d505..0000000
--- a/wifi/java/android/net/wifi/hotspot2/omadm/XMLNode.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.omadm;
-
-import android.text.TextUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * A class represent a node in an XML tree. Each node is an XML element.
- * Used by {@link XMLParser} for parsing/converting each XML element to XMLNode.
- *
- * @hide
- */
-public class XMLNode {
-    private final String mTag;
-    private final List<XMLNode> mChildren;
-    private final XMLNode mParent;
-    private StringBuilder mTextBuilder;
-    private String mText;
-
-    public XMLNode(XMLNode parent, String tag) {
-        mTag = tag;
-        mParent = parent;
-        mChildren = new ArrayList<>();
-        mTextBuilder = new StringBuilder();
-        mText = null;
-    }
-
-    /**
-     * Adding a text to this node. Invoked by {@link XMLParser#characters}.
-     *
-     * @param text String to be added
-     */
-    public void addText(String text) {
-        mTextBuilder.append(text);
-    }
-
-    /**
-     * Adding a child node to this node. Invoked by {@link XMLParser#startElement}.
-     *
-     * @param child XMLNode to be added
-     */
-    public void addChild(XMLNode child) {
-        mChildren.add(child);
-    }
-
-    /**
-     * Invoked when the end of the XML element is detected. Used for further processing
-     * of the text enclosed within this XML element. Invoked by {@link XMLParser#endElement}.
-     */
-    public void close() {
-        // Remove the leading and the trailing whitespaces.
-        mText = mTextBuilder.toString().trim();
-        mTextBuilder = null;
-    }
-
-    public String getTag() {
-        return mTag;
-    }
-
-    public XMLNode getParent() {
-        return mParent;
-    }
-
-    public String getText() {
-        return mText;
-    }
-
-    public List<XMLNode> getChildren() {
-        return mChildren;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof XMLNode)) {
-            return false;
-        }
-        XMLNode that = (XMLNode) thatObject;
-
-        return TextUtils.equals(mTag, that.mTag) &&
-                TextUtils.equals(mText, that.mText) &&
-                mChildren.equals(that.mChildren);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mTag, mText, mChildren);
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/omadm/XMLParser.java b/wifi/java/android/net/wifi/hotspot2/omadm/XMLParser.java
deleted file mode 100644
index 948052c..0000000
--- a/wifi/java/android/net/wifi/hotspot2/omadm/XMLParser.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.omadm;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import android.text.TextUtils;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Class for parsing an XML string to an XML tree represented by {@link XMLNode}.
- *
- * The original XML string:
- * <root>
- *   <tag1>text1</tag1>
- *   <tag2>
- *     <tag3>text3</tag3>
- *   </tag2>
- * </root>
- *
- * The XML tree representation:
- *                  [root]
- *                     |
- *                     |
- *   [tag1, text1]-----|-----[tag2]
- *                             |
- *                             |
- *                       [tag3, text3]
- *
- * @hide
- */
-public class XMLParser extends DefaultHandler {
-    private XMLNode mRoot = null;
-    private XMLNode mCurrent = null;
-
-    public XMLNode parse(String text) throws IOException, SAXException {
-        if (TextUtils.isEmpty(text)) {
-            throw new IOException("XML string not provided");
-        }
-
-        // Reset pointers.
-        mRoot = null;
-        mCurrent = null;
-
-        try {
-            SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
-            parser.parse(new InputSource(new StringReader(text)), this);
-            return mRoot;
-        } catch (ParserConfigurationException pce) {
-            throw new SAXException(pce);
-        }
-    }
-
-    @Override
-    public void startElement(String uri, String localName, String qName, Attributes attributes)
-            throws SAXException {
-        XMLNode parent = mCurrent;
-
-        mCurrent = new XMLNode(parent, qName);
-
-        if (mRoot == null) {
-            mRoot = mCurrent;
-        } else if (parent == null) {
-            throw new SAXException("More than one root nodes");
-        } else {
-            parent.addChild(mCurrent);
-        }
-    }
-
-    @Override
-    public void endElement(String uri, String localName, String qName) throws SAXException {
-        if (!qName.equals(mCurrent.getTag())) {
-            throw new SAXException("End tag '" + qName + "' doesn't match current node: " +
-                    mCurrent);
-        }
-
-        mCurrent.close();
-        mCurrent = mCurrent.getParent();
-    }
-
-    @Override
-    public void characters(char[] ch, int start, int length) throws SAXException {
-        mCurrent.addText(new String(ch, start, length));
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java b/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
deleted file mode 100644
index fa806e7..0000000
--- a/wifi/java/android/net/wifi/hotspot2/pps/Credential.java
+++ /dev/null
@@ -1,1302 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.pps;
-
-import android.net.wifi.EAPConstants;
-import android.net.wifi.ParcelUtil;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Log;
-
-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.Date;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-/**
- * Class representing Credential subtree in the PerProviderSubscription (PPS)
- * Management Object (MO) tree.
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- *
- * In addition to the fields in the Credential subtree, this will also maintain necessary
- * information for the private key and certificates associated with this credential.
- */
-public final class Credential implements Parcelable {
-    private static final String TAG = "Credential";
-
-    /**
-     * Max string length for realm.  Refer to Credential/Realm node in Hotspot 2.0 Release 2
-     * Technical Specification Section 9.1 for more info.
-     */
-    private static final int MAX_REALM_BYTES = 253;
-
-    /**
-     * The time this credential is created. It is in the format of number
-     * of milliseconds since January 1, 1970, 00:00:00 GMT.
-     * Using Long.MIN_VALUE to indicate unset value.
-     */
-    private long mCreationTimeInMillis = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setCreationTimeInMillis(long creationTimeInMillis) {
-        mCreationTimeInMillis = creationTimeInMillis;
-    }
-    /**
-     * @hide
-     */
-    public long getCreationTimeInMillis() {
-        return mCreationTimeInMillis;
-    }
-
-    /**
-     * The time this credential will expire. It is in the format of number
-     * of milliseconds since January 1, 1970, 00:00:00 GMT.
-    * Using Long.MIN_VALUE to indicate unset value.
-     */
-    private long mExpirationTimeInMillis = Long.MIN_VALUE;
-    /**
-     * @hide
-     */
-    public void setExpirationTimeInMillis(long expirationTimeInMillis) {
-        mExpirationTimeInMillis = expirationTimeInMillis;
-    }
-    /**
-     * @hide
-     */
-    public long getExpirationTimeInMillis() {
-        return mExpirationTimeInMillis;
-    }
-
-    /**
-     * The realm associated with this credential.  It will be used to determine
-     * if this credential can be used to authenticate with a given hotspot by
-     * comparing the realm specified in that hotspot's ANQP element.
-     */
-    private String mRealm = null;
-    /**
-     * Set the realm associated with this credential.
-     *
-     * @param realm The realm to set to
-     */
-    public void setRealm(String realm) {
-        mRealm = realm;
-    }
-    /**
-     * Get the realm associated with this credential.
-     *
-     * @return the realm associated with this credential
-     */
-    public String getRealm() {
-        return mRealm;
-    }
-
-    /**
-     * When set to true, the device should check AAA (Authentication, Authorization,
-     * and Accounting) server's certificate during EAP (Extensible Authentication
-     * Protocol) authentication.
-     */
-    private boolean mCheckAaaServerCertStatus = false;
-    /**
-     * @hide
-     */
-    public void setCheckAaaServerCertStatus(boolean checkAaaServerCertStatus) {
-        mCheckAaaServerCertStatus = checkAaaServerCertStatus;
-    }
-    /**
-     * @hide
-     */
-    public boolean getCheckAaaServerCertStatus() {
-        return mCheckAaaServerCertStatus;
-    }
-
-    /**
-     * Username-password based credential.
-     * Contains the fields under PerProviderSubscription/Credential/UsernamePassword subtree.
-     */
-    public static final class UserCredential implements Parcelable {
-        /**
-         * Maximum string length for username.  Refer to Credential/UsernamePassword/Username
-         * node in Hotspot 2.0 Release 2 Technical Specification Section 9.1 for more info.
-         */
-        private static final int MAX_USERNAME_BYTES = 63;
-
-        /**
-         * Maximum string length for password.  Refer to Credential/UsernamePassword/Password
-         * in Hotspot 2.0 Release 2 Technical Specification Section 9.1 for more info.
-         */
-        private static final int MAX_PASSWORD_BYTES = 255;
-
-        /**
-         * Supported authentication methods.
-         * @hide
-         */
-        public static final String AUTH_METHOD_PAP = "PAP";
-        /** @hide */
-        public static final String AUTH_METHOD_MSCHAP = "MS-CHAP";
-        /** @hide */
-        public static final String AUTH_METHOD_MSCHAPV2 = "MS-CHAP-V2";
-
-        /**
-         * Supported Non-EAP inner methods.  Refer to
-         * Credential/UsernamePassword/EAPMethod/InnerEAPType in Hotspot 2.0 Release 2 Technical
-         * Specification Section 9.1 for more info.
-         */
-        private static final Set<String> SUPPORTED_AUTH = new HashSet<String>(
-                Arrays.asList(AUTH_METHOD_PAP, AUTH_METHOD_MSCHAP, AUTH_METHOD_MSCHAPV2));
-
-        /**
-         * Username of the credential.
-         */
-        private String mUsername = null;
-        /**
-         * Set the username associated with this user credential.
-         *
-         * @param username The username to set to
-         */
-        public void setUsername(String username) {
-            mUsername = username;
-        }
-        /**
-         * Get the username associated with this user credential.
-         *
-         * @return the username associated with this user credential
-         */
-        public String getUsername() {
-            return mUsername;
-        }
-
-        /**
-         * Base64-encoded password.
-         */
-        private String mPassword = null;
-        /**
-         * Set the Base64-encoded password associated with this user credential.
-         *
-         * @param password The password to set to
-         */
-        public void setPassword(String password) {
-            mPassword = password;
-        }
-        /**
-         * Get the Base64-encoded password associated with this user credential.
-         *
-         * @return the Base64-encoded password associated with this user credential
-         */
-        public String getPassword() {
-            return mPassword;
-        }
-
-        /**
-         * Flag indicating if the password is machine managed.
-         */
-        private boolean mMachineManaged = false;
-        /**
-         * @hide
-         */
-        public void setMachineManaged(boolean machineManaged) {
-            mMachineManaged = machineManaged;
-        }
-        /**
-         * @hide
-         */
-        public boolean getMachineManaged() {
-            return mMachineManaged;
-        }
-
-        /**
-         * The name of the application used to generate the password.
-         */
-        private String mSoftTokenApp = null;
-        /**
-         * @hide
-         */
-        public void setSoftTokenApp(String softTokenApp) {
-            mSoftTokenApp = softTokenApp;
-        }
-        /**
-         * @hide
-         */
-        public String getSoftTokenApp() {
-            return mSoftTokenApp;
-        }
-
-        /**
-         * Flag indicating if this credential is usable on other mobile devices as well.
-         */
-        private boolean mAbleToShare = false;
-        /**
-         * @hide
-         */
-        public void setAbleToShare(boolean ableToShare) {
-            mAbleToShare = ableToShare;
-        }
-        /**
-         * @hide
-         */
-        public boolean getAbleToShare() {
-            return mAbleToShare;
-        }
-
-        /**
-         * EAP (Extensible Authentication Protocol) method type.
-         * Refer to
-         * <a href="http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4">
-         * EAP Numbers</a> for valid values.
-         * Using Integer.MIN_VALUE to indicate unset value.
-         */
-        private int mEapType = Integer.MIN_VALUE;
-        /**
-         * Set the EAP (Extensible Authentication Protocol) method type associated with this
-         * user credential.
-         * Refer to
-         * <a href="http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4">
-         * EAP Numbers</a> for valid values.
-         *
-         * @param eapType The EAP method type associated with this user credential
-         */
-        public void setEapType(int eapType) {
-            mEapType = eapType;
-        }
-        /**
-         * Get the EAP (Extensible Authentication Protocol) method type associated with this
-         * user credential.
-         *
-         * @return EAP method type
-         */
-        public int getEapType() {
-            return mEapType;
-        }
-
-        /**
-         * Non-EAP inner authentication method.
-         */
-        private String mNonEapInnerMethod = null;
-        /**
-         * Set the inner non-EAP method associated with this user credential.
-         *
-         * @param nonEapInnerMethod The non-EAP inner method to set to
-         */
-        public void setNonEapInnerMethod(String nonEapInnerMethod) {
-            mNonEapInnerMethod = nonEapInnerMethod;
-        }
-        /**
-         * Get the inner non-EAP method associated with this user credential.
-         *
-         * @return Non-EAP inner method associated with this user credential
-         */
-        public String getNonEapInnerMethod() {
-            return mNonEapInnerMethod;
-        }
-
-        /**
-         * Constructor for creating UserCredential with default values.
-         */
-        public UserCredential() {}
-
-        /**
-         * Copy constructor.
-         *
-         * @param source The source to copy from
-         */
-        public UserCredential(UserCredential source) {
-            if (source != null) {
-                mUsername = source.mUsername;
-                mPassword = source.mPassword;
-                mMachineManaged = source.mMachineManaged;
-                mSoftTokenApp = source.mSoftTokenApp;
-                mAbleToShare = source.mAbleToShare;
-                mEapType = source.mEapType;
-                mNonEapInnerMethod = source.mNonEapInnerMethod;
-            }
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeString(mUsername);
-            dest.writeString(mPassword);
-            dest.writeInt(mMachineManaged ? 1 : 0);
-            dest.writeString(mSoftTokenApp);
-            dest.writeInt(mAbleToShare ? 1 : 0);
-            dest.writeInt(mEapType);
-            dest.writeString(mNonEapInnerMethod);
-        }
-
-        @Override
-        public boolean equals(Object thatObject) {
-            if (this == thatObject) {
-                return true;
-            }
-            if (!(thatObject instanceof UserCredential)) {
-                return false;
-            }
-
-            UserCredential that = (UserCredential) thatObject;
-            return TextUtils.equals(mUsername, that.mUsername)
-                    && TextUtils.equals(mPassword, that.mPassword)
-                    && mMachineManaged == that.mMachineManaged
-                    && TextUtils.equals(mSoftTokenApp, that.mSoftTokenApp)
-                    && mAbleToShare == that.mAbleToShare
-                    && mEapType == that.mEapType
-                    && TextUtils.equals(mNonEapInnerMethod, that.mNonEapInnerMethod);
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mUsername, mPassword, mMachineManaged, mSoftTokenApp,
-                    mAbleToShare, mEapType, mNonEapInnerMethod);
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-            builder.append("Username: ").append(mUsername).append("\n");
-            builder.append("MachineManaged: ").append(mMachineManaged).append("\n");
-            builder.append("SoftTokenApp: ").append(mSoftTokenApp).append("\n");
-            builder.append("AbleToShare: ").append(mAbleToShare).append("\n");
-            builder.append("EAPType: ").append(mEapType).append("\n");
-            builder.append("AuthMethod: ").append(mNonEapInnerMethod).append("\n");
-            return builder.toString();
-        }
-
-        /**
-         * Validate the configuration data.
-         *
-         * @return true on success or false on failure
-         * @hide
-         */
-        public boolean validate() {
-            if (TextUtils.isEmpty(mUsername)) {
-                Log.d(TAG, "Missing username");
-                return false;
-            }
-            if (mUsername.getBytes(StandardCharsets.UTF_8).length > MAX_USERNAME_BYTES) {
-                Log.d(TAG, "username exceeding maximum length: "
-                        + mUsername.getBytes(StandardCharsets.UTF_8).length);
-                return false;
-            }
-
-            if (TextUtils.isEmpty(mPassword)) {
-                Log.d(TAG, "Missing password");
-                return false;
-            }
-            if (mPassword.getBytes(StandardCharsets.UTF_8).length > MAX_PASSWORD_BYTES) {
-                Log.d(TAG, "password exceeding maximum length: "
-                        + mPassword.getBytes(StandardCharsets.UTF_8).length);
-                return false;
-            }
-
-            // Only supports EAP-TTLS for user credential.
-            if (mEapType != EAPConstants.EAP_TTLS) {
-                Log.d(TAG, "Invalid EAP Type for user credential: " + mEapType);
-                return false;
-            }
-
-            // Verify Non-EAP inner method for EAP-TTLS.
-            if (!SUPPORTED_AUTH.contains(mNonEapInnerMethod)) {
-                Log.d(TAG, "Invalid non-EAP inner method for EAP-TTLS: " + mNonEapInnerMethod);
-                return false;
-            }
-            return true;
-        }
-
-        public static final @android.annotation.NonNull Creator<UserCredential> CREATOR =
-            new Creator<UserCredential>() {
-                @Override
-                public UserCredential createFromParcel(Parcel in) {
-                    UserCredential userCredential = new UserCredential();
-                    userCredential.setUsername(in.readString());
-                    userCredential.setPassword(in.readString());
-                    userCredential.setMachineManaged(in.readInt() != 0);
-                    userCredential.setSoftTokenApp(in.readString());
-                    userCredential.setAbleToShare(in.readInt() != 0);
-                    userCredential.setEapType(in.readInt());
-                    userCredential.setNonEapInnerMethod(in.readString());
-                    return userCredential;
-                }
-
-                @Override
-                public UserCredential[] newArray(int size) {
-                    return new UserCredential[size];
-                }
-            };
-    }
-    private UserCredential mUserCredential = null;
-    /**
-     * Set the user credential information.
-     *
-     * @param userCredential The user credential to set to
-     */
-    public void setUserCredential(UserCredential userCredential) {
-        mUserCredential = userCredential;
-    }
-    /**
-     * Get the user credential information.
-     *
-     * @return user credential information
-     */
-    public UserCredential getUserCredential() {
-        return mUserCredential;
-    }
-
-    /**
-     * Certificate based credential.  This is used for EAP-TLS.
-     * Contains fields under PerProviderSubscription/Credential/DigitalCertificate subtree.
-     */
-    public static final class CertificateCredential implements Parcelable {
-        /**
-         * Supported certificate types.
-         * @hide
-         */
-        public static final String CERT_TYPE_X509V3 = "x509v3";
-
-        /**
-         * Certificate SHA-256 fingerprint length.
-         */
-        private static final int CERT_SHA256_FINGER_PRINT_LENGTH = 32;
-
-        /**
-         * Certificate type.
-         */
-        private String mCertType = null;
-        /**
-         * Set the certificate type associated with this certificate credential.
-         *
-         * @param certType The certificate type to set to
-         */
-        public void setCertType(String certType) {
-            mCertType = certType;
-        }
-        /**
-         * Get the certificate type associated with this certificate credential.
-         *
-         * @return certificate type
-         */
-        public String getCertType() {
-            return mCertType;
-        }
-
-        /**
-         * The SHA-256 fingerprint of the certificate.
-         */
-        private byte[] mCertSha256Fingerprint = null;
-        /**
-         * Set the certificate SHA-256 fingerprint associated with this certificate credential.
-         *
-         * @param certSha256Fingerprint The certificate fingerprint to set to
-         */
-        public void setCertSha256Fingerprint(byte[] certSha256Fingerprint) {
-            mCertSha256Fingerprint = certSha256Fingerprint;
-        }
-        /**
-         * Get the certificate SHA-256 fingerprint associated with this certificate credential.
-         *
-         * @return certificate SHA-256 fingerprint
-         */
-        public byte[] getCertSha256Fingerprint() {
-            return mCertSha256Fingerprint;
-        }
-
-        /**
-         * Constructor for creating CertificateCredential with default values.
-         */
-        public CertificateCredential() {}
-
-        /**
-         * Copy constructor.
-         *
-         * @param source The source to copy from
-         */
-        public CertificateCredential(CertificateCredential source) {
-            if (source != null) {
-                mCertType = source.mCertType;
-                if (source.mCertSha256Fingerprint != null) {
-                    mCertSha256Fingerprint = Arrays.copyOf(source.mCertSha256Fingerprint,
-                                                          source.mCertSha256Fingerprint.length);
-                }
-            }
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeString(mCertType);
-            dest.writeByteArray(mCertSha256Fingerprint);
-        }
-
-        @Override
-        public boolean equals(Object thatObject) {
-            if (this == thatObject) {
-                return true;
-            }
-            if (!(thatObject instanceof CertificateCredential)) {
-                return false;
-            }
-
-            CertificateCredential that = (CertificateCredential) thatObject;
-            return TextUtils.equals(mCertType, that.mCertType)
-                    && Arrays.equals(mCertSha256Fingerprint, that.mCertSha256Fingerprint);
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mCertType, Arrays.hashCode(mCertSha256Fingerprint));
-        }
-
-        @Override
-        public String toString() {
-            return "CertificateType: " + mCertType + "\n";
-        }
-
-        /**
-         * Validate the configuration data.
-         *
-         * @return true on success or false on failure
-         * @hide
-         */
-        public boolean validate() {
-            if (!TextUtils.equals(CERT_TYPE_X509V3, mCertType)) {
-                Log.d(TAG, "Unsupported certificate type: " + mCertType);
-                return false;
-            }
-            if (mCertSha256Fingerprint == null
-                    || mCertSha256Fingerprint.length != CERT_SHA256_FINGER_PRINT_LENGTH) {
-                Log.d(TAG, "Invalid SHA-256 fingerprint");
-                return false;
-            }
-            return true;
-        }
-
-        public static final @android.annotation.NonNull Creator<CertificateCredential> CREATOR =
-            new Creator<CertificateCredential>() {
-                @Override
-                public CertificateCredential createFromParcel(Parcel in) {
-                    CertificateCredential certCredential = new CertificateCredential();
-                    certCredential.setCertType(in.readString());
-                    certCredential.setCertSha256Fingerprint(in.createByteArray());
-                    return certCredential;
-                }
-
-                @Override
-                public CertificateCredential[] newArray(int size) {
-                    return new CertificateCredential[size];
-                }
-            };
-    }
-    private CertificateCredential mCertCredential = null;
-    /**
-     * Set the certificate credential information.
-     *
-     * @param certCredential The certificate credential to set to
-     */
-    public void setCertCredential(CertificateCredential certCredential) {
-        mCertCredential = certCredential;
-    }
-    /**
-     * Get the certificate credential information.
-     *
-     * @return certificate credential information
-     */
-    public CertificateCredential getCertCredential() {
-        return mCertCredential;
-    }
-
-    /**
-     * SIM (Subscriber Identify Module) based credential.
-     * Contains fields under PerProviderSubscription/Credential/SIM subtree.
-     */
-    public static final class SimCredential implements Parcelable {
-        /**
-         * Maximum string length for IMSI.
-         */
-        private static final int MAX_IMSI_LENGTH = 15;
-
-        /**
-         * International Mobile Subscriber Identity, is used to identify the user
-         * of a cellular network and is a unique identification associated with all
-         * cellular networks
-         */
-        private String mImsi = null;
-        /**
-         * Set the IMSI (International Mobile Subscriber Identity) associated with this SIM
-         * credential.
-         *
-         * @param imsi The IMSI to set to
-         */
-        public void setImsi(String imsi) {
-            mImsi = imsi;
-        }
-        /**
-         * Get the IMSI (International Mobile Subscriber Identity) associated with this SIM
-         * credential.
-         *
-         * @return IMSI associated with this SIM credential
-         */
-        public String getImsi() {
-            return mImsi;
-        }
-
-        /**
-         * EAP (Extensible Authentication Protocol) method type for using SIM credential.
-         * Refer to http://www.iana.org/assignments/eap-numbers/eap-numbers.xml#eap-numbers-4
-         * for valid values.
-         * Using Integer.MIN_VALUE to indicate unset value.
-         */
-        private int mEapType = Integer.MIN_VALUE;
-        /**
-         * Set the EAP (Extensible Authentication Protocol) method type associated with this
-         * SIM credential.
-         *
-         * @param eapType The EAP method type to set to
-         */
-        public void setEapType(int eapType) {
-            mEapType = eapType;
-        }
-        /**
-         * Get the EAP (Extensible Authentication Protocol) method type associated with this
-         * SIM credential.
-         *
-         * @return EAP method type associated with this SIM credential
-         */
-        public int getEapType() {
-            return mEapType;
-        }
-
-        /**
-         * Constructor for creating SimCredential with default values.
-         */
-        public SimCredential() {}
-
-        /**
-         * Copy constructor
-         *
-         * @param source The source to copy from
-         */
-        public SimCredential(SimCredential source) {
-            if (source != null) {
-                mImsi = source.mImsi;
-                mEapType = source.mEapType;
-            }
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public boolean equals(Object thatObject) {
-            if (this == thatObject) {
-                return true;
-            }
-            if (!(thatObject instanceof SimCredential)) {
-                return false;
-            }
-
-            SimCredential that = (SimCredential) thatObject;
-            return TextUtils.equals(mImsi, that.mImsi)
-                    && mEapType == that.mEapType;
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mImsi, mEapType);
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-            String imsi;
-            if (mImsi != null) {
-                if (mImsi.length() > 6 && mImsi.charAt(6) != '*') {
-                    // Truncate the full IMSI from the log
-                    imsi = mImsi.substring(0, 6) + "****";
-                } else {
-                    imsi = mImsi;
-                }
-                builder.append("IMSI: ").append(imsi).append("\n");
-            }
-            builder.append("EAPType: ").append(mEapType).append("\n");
-            return builder.toString();
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeString(mImsi);
-            dest.writeInt(mEapType);
-        }
-
-        /**
-         * Validate the configuration data.
-         *
-         * @return true on success or false on failure
-         * @hide
-         */
-        public boolean validate() {
-            // Note: this only validate the format of IMSI string itself.  Additional verification
-            // will be done by WifiService at the time of provisioning to verify against the IMSI
-            // of the SIM card installed in the device.
-            if (!verifyImsi()) {
-                return false;
-            }
-            if (mEapType != EAPConstants.EAP_SIM && mEapType != EAPConstants.EAP_AKA
-                    && mEapType != EAPConstants.EAP_AKA_PRIME) {
-                Log.d(TAG, "Invalid EAP Type for SIM credential: " + mEapType);
-                return false;
-            }
-            return true;
-        }
-
-        public static final @android.annotation.NonNull Creator<SimCredential> CREATOR =
-            new Creator<SimCredential>() {
-                @Override
-                public SimCredential createFromParcel(Parcel in) {
-                    SimCredential simCredential = new SimCredential();
-                    simCredential.setImsi(in.readString());
-                    simCredential.setEapType(in.readInt());
-                    return simCredential;
-                }
-
-                @Override
-                public SimCredential[] newArray(int size) {
-                    return new SimCredential[size];
-                }
-            };
-
-        /**
-         * Verify the IMSI (International Mobile Subscriber Identity) string.  The string
-         * should contain zero or more numeric digits, and might ends with a "*" for prefix
-         * matching.
-         *
-         * @return true if IMSI is valid, false otherwise.
-         */
-        private boolean verifyImsi() {
-            if (TextUtils.isEmpty(mImsi)) {
-                Log.d(TAG, "Missing IMSI");
-                return false;
-            }
-            if (mImsi.length() > MAX_IMSI_LENGTH) {
-                Log.d(TAG, "IMSI exceeding maximum length: " + mImsi.length());
-                return false;
-            }
-
-            // Locate the first non-digit character.
-            int nonDigit;
-            char stopChar = '\0';
-            for (nonDigit = 0; nonDigit < mImsi.length(); nonDigit++) {
-                stopChar = mImsi.charAt(nonDigit);
-                if (stopChar < '0' || stopChar > '9') {
-                    break;
-                }
-            }
-
-            if (nonDigit == mImsi.length()) {
-                return true;
-            }
-            else if (nonDigit == mImsi.length()-1 && stopChar == '*') {
-                // Prefix matching.
-                return true;
-            }
-            return false;
-        }
-    }
-    private SimCredential mSimCredential = null;
-    /**
-     * Set the SIM credential information.
-     *
-     * @param simCredential The SIM credential to set to
-     */
-    public void setSimCredential(SimCredential simCredential) {
-        mSimCredential = simCredential;
-    }
-    /**
-     * Get the SIM credential information.
-     *
-     * @return SIM credential information
-     */
-    public SimCredential getSimCredential() {
-        return mSimCredential;
-    }
-
-    /**
-     * CA (Certificate Authority) X509 certificates.
-     */
-    private X509Certificate[] mCaCertificates = null;
-
-    /**
-     * Set the CA (Certification Authority) certificate associated with this credential.
-     *
-     * @param caCertificate The CA certificate to set to
-     */
-    public void setCaCertificate(X509Certificate caCertificate) {
-        mCaCertificates = null;
-        if (caCertificate != null) {
-            mCaCertificates = new X509Certificate[] {caCertificate};
-        }
-    }
-
-    /**
-     * Set the CA (Certification Authority) certificates associated with this credential.
-     *
-     * @param caCertificates The list of CA certificates to set to
-     * @hide
-     */
-    public void setCaCertificates(X509Certificate[] caCertificates) {
-        mCaCertificates = caCertificates;
-    }
-
-    /**
-     * Get the CA (Certification Authority) certificate associated with this credential.
-     *
-     * @return CA certificate associated with this credential, {@code null} if certificate is not
-     * set or certificate is more than one.
-     */
-    public X509Certificate getCaCertificate() {
-        return mCaCertificates == null || mCaCertificates.length > 1 ? null : mCaCertificates[0];
-    }
-
-    /**
-     * Get the CA (Certification Authority) certificates associated with this credential.
-     *
-     * @return The list of CA certificates associated with this credential
-     * @hide
-     */
-    public X509Certificate[] getCaCertificates() {
-        return mCaCertificates;
-    }
-
-    /**
-     * Client side X509 certificate chain.
-     */
-    private X509Certificate[] mClientCertificateChain = null;
-    /**
-     * Set the client certificate chain associated with this credential.
-     *
-     * @param certificateChain The client certificate chain to set to
-     */
-    public void setClientCertificateChain(X509Certificate[] certificateChain) {
-        mClientCertificateChain = certificateChain;
-    }
-    /**
-     * Get the client certificate chain associated with this credential.
-     *
-     * @return client certificate chain associated with this credential
-     */
-    public X509Certificate[] getClientCertificateChain() {
-        return mClientCertificateChain;
-    }
-
-    /**
-     * Client side private key.
-     */
-    private PrivateKey mClientPrivateKey = null;
-    /**
-     * Set the client private key associated with this credential.
-     *
-     * @param clientPrivateKey the client private key to set to
-     */
-    public void setClientPrivateKey(PrivateKey clientPrivateKey) {
-        mClientPrivateKey = clientPrivateKey;
-    }
-    /**
-     * Get the client private key associated with this credential.
-     *
-     * @return client private key associated with this credential.
-     */
-    public PrivateKey getClientPrivateKey() {
-        return mClientPrivateKey;
-    }
-
-    /**
-     * Constructor for creating Credential with default values.
-     */
-    public Credential() {}
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     */
-    public Credential(Credential source) {
-        if (source != null) {
-            mCreationTimeInMillis = source.mCreationTimeInMillis;
-            mExpirationTimeInMillis = source.mExpirationTimeInMillis;
-            mRealm = source.mRealm;
-            mCheckAaaServerCertStatus = source.mCheckAaaServerCertStatus;
-            if (source.mUserCredential != null) {
-                mUserCredential = new UserCredential(source.mUserCredential);
-            }
-            if (source.mCertCredential != null) {
-                mCertCredential = new CertificateCredential(source.mCertCredential);
-            }
-            if (source.mSimCredential != null) {
-                mSimCredential = new SimCredential(source.mSimCredential);
-            }
-            if (source.mClientCertificateChain != null) {
-                mClientCertificateChain = Arrays.copyOf(source.mClientCertificateChain,
-                                                        source.mClientCertificateChain.length);
-            }
-            if (source.mCaCertificates != null) {
-                mCaCertificates = Arrays.copyOf(source.mCaCertificates,
-                        source.mCaCertificates.length);
-            }
-
-            mClientPrivateKey = source.mClientPrivateKey;
-        }
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mCreationTimeInMillis);
-        dest.writeLong(mExpirationTimeInMillis);
-        dest.writeString(mRealm);
-        dest.writeInt(mCheckAaaServerCertStatus ? 1 : 0);
-        dest.writeParcelable(mUserCredential, flags);
-        dest.writeParcelable(mCertCredential, flags);
-        dest.writeParcelable(mSimCredential, flags);
-        ParcelUtil.writeCertificates(dest, mCaCertificates);
-        ParcelUtil.writeCertificates(dest, mClientCertificateChain);
-        ParcelUtil.writePrivateKey(dest, mClientPrivateKey);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof Credential)) {
-            return false;
-        }
-
-        Credential that = (Credential) thatObject;
-        return TextUtils.equals(mRealm, that.mRealm)
-                && mCreationTimeInMillis == that.mCreationTimeInMillis
-                && mExpirationTimeInMillis == that.mExpirationTimeInMillis
-                && mCheckAaaServerCertStatus == that.mCheckAaaServerCertStatus
-                && (mUserCredential == null ? that.mUserCredential == null
-                    : mUserCredential.equals(that.mUserCredential))
-                && (mCertCredential == null ? that.mCertCredential == null
-                    : mCertCredential.equals(that.mCertCredential))
-                && (mSimCredential == null ? that.mSimCredential == null
-                    : mSimCredential.equals(that.mSimCredential))
-                && isX509CertificatesEquals(mCaCertificates, that.mCaCertificates)
-                && isX509CertificatesEquals(mClientCertificateChain, that.mClientCertificateChain)
-                && isPrivateKeyEquals(mClientPrivateKey, that.mClientPrivateKey);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mCreationTimeInMillis, mExpirationTimeInMillis, mRealm,
-                mCheckAaaServerCertStatus, mUserCredential, mCertCredential, mSimCredential,
-                mClientPrivateKey, Arrays.hashCode(mCaCertificates),
-                Arrays.hashCode(mClientCertificateChain));
-    }
-
-    /**
-     * Get a unique identifier for Credential. This identifier depends only on items that remain
-     * constant throughout the lifetime of a subscription's credentials.
-     *
-     * @hide
-     * @return a Unique identifier for a Credential object
-     */
-    public int getUniqueId() {
-        return Objects.hash(mUserCredential, mCertCredential, mSimCredential, mRealm);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("Realm: ").append(mRealm).append("\n");
-        builder.append("CreationTime: ").append(mCreationTimeInMillis != Long.MIN_VALUE
-                ? new Date(mCreationTimeInMillis) : "Not specified").append("\n");
-        builder.append("ExpirationTime: ").append(mExpirationTimeInMillis != Long.MIN_VALUE
-                ? new Date(mExpirationTimeInMillis) : "Not specified").append("\n");
-        builder.append("CheckAAAServerStatus: ").append(mCheckAaaServerCertStatus).append("\n");
-        if (mUserCredential != null) {
-            builder.append("UserCredential Begin ---\n");
-            builder.append(mUserCredential);
-            builder.append("UserCredential End ---\n");
-        }
-        if (mCertCredential != null) {
-            builder.append("CertificateCredential Begin ---\n");
-            builder.append(mCertCredential);
-            builder.append("CertificateCredential End ---\n");
-        }
-        if (mSimCredential != null) {
-            builder.append("SIMCredential Begin ---\n");
-            builder.append(mSimCredential);
-            builder.append("SIMCredential End ---\n");
-        }
-        return builder.toString();
-    }
-
-    /**
-     * Validate the configuration data.
-     *
-     * @return true on success or false on failure
-     * @hide
-     */
-    public boolean validate() {
-        if (TextUtils.isEmpty(mRealm)) {
-            Log.d(TAG, "Missing realm");
-            return false;
-        }
-        if (mRealm.getBytes(StandardCharsets.UTF_8).length > MAX_REALM_BYTES) {
-            Log.d(TAG, "realm exceeding maximum length: "
-                    + mRealm.getBytes(StandardCharsets.UTF_8).length);
-            return false;
-        }
-
-        // Verify the credential.
-        if (mUserCredential != null) {
-            if (!verifyUserCredential()) {
-                return false;
-            }
-        } else if (mCertCredential != null) {
-            if (!verifyCertCredential()) {
-                return false;
-            }
-        } else if (mSimCredential != null) {
-            if (!verifySimCredential()) {
-                return false;
-            }
-        } else {
-            Log.d(TAG, "Missing required credential");
-            return false;
-        }
-
-        return true;
-    }
-
-    public static final @android.annotation.NonNull Creator<Credential> CREATOR =
-        new Creator<Credential>() {
-            @Override
-            public Credential createFromParcel(Parcel in) {
-                Credential credential = new Credential();
-                credential.setCreationTimeInMillis(in.readLong());
-                credential.setExpirationTimeInMillis(in.readLong());
-                credential.setRealm(in.readString());
-                credential.setCheckAaaServerCertStatus(in.readInt() != 0);
-                credential.setUserCredential(in.readParcelable(null));
-                credential.setCertCredential(in.readParcelable(null));
-                credential.setSimCredential(in.readParcelable(null));
-                credential.setCaCertificates(ParcelUtil.readCertificates(in));
-                credential.setClientCertificateChain(ParcelUtil.readCertificates(in));
-                credential.setClientPrivateKey(ParcelUtil.readPrivateKey(in));
-                return credential;
-            }
-
-            @Override
-            public Credential[] newArray(int size) {
-                return new Credential[size];
-            }
-        };
-
-    /**
-     * Verify user credential.
-     * If no CA certificate is provided, then the system uses the CAs in the trust store.
-     *
-     * @return true if user credential is valid, false otherwise.
-     */
-    private boolean verifyUserCredential() {
-        if (mUserCredential == null) {
-            Log.d(TAG, "Missing user credential");
-            return false;
-        }
-        if (mCertCredential != null || mSimCredential != null) {
-            Log.d(TAG, "Contained more than one type of credential");
-            return false;
-        }
-        if (!mUserCredential.validate()) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Verify certificate credential, which is used for EAP-TLS.  This will verify
-     * that the necessary client key and certificates are provided.
-     * If no CA certificate is provided, then the system uses the CAs in the trust store.
-     *
-     * @return true if certificate credential is valid, false otherwise.
-     */
-    private boolean verifyCertCredential() {
-        if (mCertCredential == null) {
-            Log.d(TAG, "Missing certificate credential");
-            return false;
-        }
-        if (mUserCredential != null || mSimCredential != null) {
-            Log.d(TAG, "Contained more than one type of credential");
-            return false;
-        }
-
-        if (!mCertCredential.validate()) {
-            return false;
-        }
-
-        if (mClientPrivateKey == null) {
-            Log.d(TAG, "Missing client private key for certificate credential");
-            return false;
-        }
-        try {
-            // Verify SHA-256 fingerprint for client certificate.
-            if (!verifySha256Fingerprint(mClientCertificateChain,
-                    mCertCredential.getCertSha256Fingerprint())) {
-                Log.d(TAG, "SHA-256 fingerprint mismatch");
-                return false;
-            }
-        } catch (NoSuchAlgorithmException | CertificateEncodingException e) {
-            Log.d(TAG, "Failed to verify SHA-256 fingerprint: " + e.getMessage());
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Verify SIM credential.
-     *
-     * @return true if SIM credential is valid, false otherwise.
-     */
-    private boolean verifySimCredential() {
-        if (mSimCredential == null) {
-            Log.d(TAG, "Missing SIM credential");
-            return false;
-        }
-        if (mUserCredential != null || mCertCredential != null) {
-            Log.d(TAG, "Contained more than one type of credential");
-            return false;
-        }
-        return mSimCredential.validate();
-    }
-
-    private static boolean isPrivateKeyEquals(PrivateKey key1, PrivateKey key2) {
-        if (key1 == null && key2 == null) {
-            return true;
-        }
-
-        /* Return false if only one of them is null */
-        if (key1 == null || key2 == null) {
-            return false;
-        }
-
-        return TextUtils.equals(key1.getAlgorithm(), key2.getAlgorithm()) &&
-                Arrays.equals(key1.getEncoded(), key2.getEncoded());
-    }
-
-    /**
-     * Verify two X.509 certificates are identical.
-     *
-     * @param cert1 a certificate to compare
-     * @param cert2 a certificate to compare
-     * @return {@code true} if given certificates are the same each other, {@code false} otherwise.
-     * @hide
-     */
-    public static boolean isX509CertificateEquals(X509Certificate cert1, X509Certificate cert2) {
-        if (cert1 == null && cert2 == null) {
-            return true;
-        }
-
-        /* Return false if only one of them is null */
-        if (cert1 == null || cert2 == null) {
-            return false;
-        }
-
-        boolean result = false;
-        try {
-            result = Arrays.equals(cert1.getEncoded(), cert2.getEncoded());
-        } catch (CertificateEncodingException e) {
-            /* empty, return false. */
-        }
-        return result;
-    }
-
-    private static boolean isX509CertificatesEquals(X509Certificate[] certs1,
-                                                    X509Certificate[] certs2) {
-        if (certs1 == null && certs2 == null) {
-            return true;
-        }
-
-        /* Return false if only one of them is null */
-        if (certs1 == null || certs2 == null) {
-            return false;
-        }
-
-        if (certs1.length != certs2.length) {
-            return false;
-        }
-
-        for (int i = 0; i < certs1.length; i++) {
-            if (!isX509CertificateEquals(certs1[i], certs2[i])) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * Verify that the digest for a certificate in the certificate chain matches expected
-     * fingerprint.  The certificate that matches the fingerprint is the client certificate.
-     *
-     * @param certChain Chain of certificates
-     * @param expectedFingerprint The expected SHA-256 digest of the client certificate
-     * @return true if the certificate chain contains a matching certificate, false otherwise
-     * @throws NoSuchAlgorithmException
-     * @throws CertificateEncodingException
-     */
-    private static boolean verifySha256Fingerprint(X509Certificate[] certChain,
-                                                   byte[] expectedFingerprint)
-            throws NoSuchAlgorithmException, CertificateEncodingException {
-        if (certChain == null) {
-            return false;
-        }
-        MessageDigest digester = MessageDigest.getInstance("SHA-256");
-        for (X509Certificate certificate : certChain) {
-            digester.reset();
-            byte[] fingerprint = digester.digest(certificate.getEncoded());
-            if (Arrays.equals(expectedFingerprint, fingerprint)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java b/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
deleted file mode 100644
index 224c4be..0000000
--- a/wifi/java/android/net/wifi/hotspot2/pps/HomeSp.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/**
- * Copyright (c) 2016, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.pps;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Class representing HomeSP subtree in PerProviderSubscription (PPS)
- * Management Object (MO) tree.
- *
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- */
-public final class HomeSp implements Parcelable {
-    private static final String TAG = "HomeSp";
-
-    /**
-     * Maximum number of bytes allowed for a SSID.
-     */
-    private static final int MAX_SSID_BYTES = 32;
-
-    /**
-     * Integer value used for indicating null value in the Parcel.
-     */
-    private static final int NULL_VALUE = -1;
-
-    /**
-     * FQDN (Fully Qualified Domain Name) of this home service provider.
-     */
-    private String mFqdn = null;
-    /**
-     * Set the FQDN (Fully Qualified Domain Name) associated with this home service provider.
-     *
-     * @param fqdn The FQDN to set to
-     */
-    public void setFqdn(String fqdn) {
-        mFqdn = fqdn;
-    }
-    /**
-     * Get the FQDN (Fully Qualified Domain Name) associated with this home service provider.
-     *
-     * @return the FQDN associated with this home service provider
-     */
-    public String getFqdn() {
-        return mFqdn;
-    }
-
-    /**
-     * Friendly name of this home service provider.
-     */
-    private String mFriendlyName = null;
-    /**
-     * Set the friendly name associated with this home service provider.
-     *
-     * @param friendlyName The friendly name to set to
-     */
-    public void setFriendlyName(String friendlyName) {
-        mFriendlyName = friendlyName;
-    }
-    /**
-     * Get the friendly name associated with this home service provider.
-     *
-     * @return the friendly name associated with this home service provider
-     */
-    public String getFriendlyName() {
-        return mFriendlyName;
-    }
-
-    /**
-     * Icon URL of this home service provider.
-     */
-    private String mIconUrl = null;
-    /**
-     * @hide
-     */
-    public void setIconUrl(String iconUrl) {
-        mIconUrl = iconUrl;
-    }
-    /**
-     * @hide
-     */
-    public String getIconUrl() {
-        return mIconUrl;
-    }
-
-    /**
-     * <SSID, HESSID> duple of the networks that are consider home networks.
-     *
-     * According to the Section 9.1.2 of the Hotspot 2.0 Release 2 Technical Specification,
-     * all nodes in the PSS MO are encoded using UTF-8 unless stated otherwise.  Thus, the SSID
-     * string is assumed to be encoded using UTF-8.
-     */
-    private Map<String, Long> mHomeNetworkIds = null;
-    /**
-     * @hide
-     */
-    public void setHomeNetworkIds(Map<String, Long> homeNetworkIds) {
-        mHomeNetworkIds = homeNetworkIds;
-    }
-    /**
-     * @hide
-     */
-    public Map<String, Long> getHomeNetworkIds() {
-        return mHomeNetworkIds;
-    }
-
-    /**
-     * Used for determining if this provider is a member of a given Hotspot provider.
-     * Every Organization Identifiers (OIs) in this list are required to match an OI in the
-     * the Roaming Consortium advertised by a Hotspot, in order to consider this provider
-     * as a member of that Hotspot provider (e.g. successful authentication with such Hotspot
-     * is possible).
-     *
-     * Refer to HomeSP/HomeOIList subtree in PerProviderSubscription (PPS) Management Object
-     * (MO) tree for more detail.
-     */
-    private long[] mMatchAllOis = null;
-    /**
-     * @hide
-     */
-    public void setMatchAllOis(long[] matchAllOis) {
-        mMatchAllOis = matchAllOis;
-    }
-    /**
-     * @hide
-     */
-    public long[] getMatchAllOis() {
-        return mMatchAllOis;
-    }
-
-    /**
-     * Used for determining if this provider is a member of a given Hotspot provider.
-     * Matching of any Organization Identifiers (OIs) in this list with an OI in the
-     * Roaming Consortium advertised by a Hotspot, will consider this provider as a member
-     * of that Hotspot provider (e.g. successful authentication with such Hotspot
-     * is possible).
-     *
-     * {@link #mMatchAllOIs} will have precedence over this one, meaning this list will
-     * only be used for matching if {@link #mMatchAllOIs} is null or empty.
-     *
-     * Refer to HomeSP/HomeOIList subtree in PerProviderSubscription (PPS) Management Object
-     * (MO) tree for more detail.
-     */
-    private long[] mMatchAnyOis = null;
-    /**
-     * @hide
-     */
-    public void setMatchAnyOis(long[] matchAnyOis) {
-        mMatchAnyOis = matchAnyOis;
-    }
-    /**
-     * @hide
-     */
-    public long[] getMatchAnyOis() {
-        return mMatchAnyOis;
-    }
-
-    /**
-     * List of FQDN (Fully Qualified Domain Name) of partner providers.
-     * These providers should also be regarded as home Hotspot operators.
-     * This relationship is most likely achieved via a commercial agreement or
-     * operator merges between the providers.
-     */
-    private String[] mOtherHomePartners = null;
-    /**
-     * @hide
-     */
-    public void setOtherHomePartners(String[] otherHomePartners) {
-        mOtherHomePartners = otherHomePartners;
-    }
-    /**
-     * @hide
-     */
-    public String[] getOtherHomePartners() {
-        return mOtherHomePartners;
-    }
-
-    /**
-     * List of Organization Identifiers (OIs) identifying a roaming consortium of
-     * which this provider is a member.
-     */
-    private long[] mRoamingConsortiumOis = null;
-    /**
-     * Set the Organization Identifiers (OIs) identifying a roaming consortium of which this
-     * provider is a member.
-     *
-     * @param roamingConsortiumOis Array of roaming consortium OIs
-     */
-    public void setRoamingConsortiumOis(long[] roamingConsortiumOis) {
-        mRoamingConsortiumOis = roamingConsortiumOis;
-    }
-    /**
-     * Get the Organization Identifiers (OIs) identifying a roaming consortium of which this
-     * provider is a member.
-     *
-     * @return array of roaming consortium OIs
-     */
-    public long[] getRoamingConsortiumOis() {
-        return mRoamingConsortiumOis;
-    }
-
-    /**
-     * Constructor for creating HomeSp with default values.
-     */
-    public HomeSp() {}
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     */
-    public HomeSp(HomeSp source) {
-        if (source == null) {
-            return;
-        }
-        mFqdn = source.mFqdn;
-        mFriendlyName = source.mFriendlyName;
-        mIconUrl = source.mIconUrl;
-        if (source.mHomeNetworkIds != null) {
-            mHomeNetworkIds = Collections.unmodifiableMap(source.mHomeNetworkIds);
-        }
-        if (source.mMatchAllOis != null) {
-            mMatchAllOis = Arrays.copyOf(source.mMatchAllOis, source.mMatchAllOis.length);
-        }
-        if (source.mMatchAnyOis != null) {
-            mMatchAnyOis = Arrays.copyOf(source.mMatchAnyOis, source.mMatchAnyOis.length);
-        }
-        if (source.mOtherHomePartners != null) {
-            mOtherHomePartners = Arrays.copyOf(source.mOtherHomePartners,
-                    source.mOtherHomePartners.length);
-        }
-        if (source.mRoamingConsortiumOis != null) {
-            mRoamingConsortiumOis = Arrays.copyOf(source.mRoamingConsortiumOis,
-                    source.mRoamingConsortiumOis.length);
-        }
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(mFqdn);
-        dest.writeString(mFriendlyName);
-        dest.writeString(mIconUrl);
-        writeHomeNetworkIds(dest, mHomeNetworkIds);
-        dest.writeLongArray(mMatchAllOis);
-        dest.writeLongArray(mMatchAnyOis);
-        dest.writeStringArray(mOtherHomePartners);
-        dest.writeLongArray(mRoamingConsortiumOis);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof HomeSp)) {
-            return false;
-        }
-        HomeSp that = (HomeSp) thatObject;
-
-        return TextUtils.equals(mFqdn, that.mFqdn)
-                && TextUtils.equals(mFriendlyName, that.mFriendlyName)
-                && TextUtils.equals(mIconUrl, that.mIconUrl)
-                && (mHomeNetworkIds == null ? that.mHomeNetworkIds == null
-                        : mHomeNetworkIds.equals(that.mHomeNetworkIds))
-                && Arrays.equals(mMatchAllOis, that.mMatchAllOis)
-                && Arrays.equals(mMatchAnyOis, that.mMatchAnyOis)
-                && Arrays.equals(mOtherHomePartners, that.mOtherHomePartners)
-                && Arrays.equals(mRoamingConsortiumOis, that.mRoamingConsortiumOis);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mFqdn, mFriendlyName, mIconUrl,
-                mHomeNetworkIds, Arrays.hashCode(mMatchAllOis),
-                Arrays.hashCode(mMatchAnyOis), Arrays.hashCode(mOtherHomePartners),
-                Arrays.hashCode(mRoamingConsortiumOis));
-    }
-
-    /**
-     * Get a unique identifier for HomeSp. This identifier depends only on items that remain
-     * constant throughout the lifetime of a subscription.
-     *
-     * @hide
-     * @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));
-    }
-
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("FQDN: ").append(mFqdn).append("\n");
-        builder.append("FriendlyName: ").append(mFriendlyName).append("\n");
-        builder.append("IconURL: ").append(mIconUrl).append("\n");
-        builder.append("HomeNetworkIDs: ").append(mHomeNetworkIds).append("\n");
-        builder.append("MatchAllOIs: ").append(mMatchAllOis).append("\n");
-        builder.append("MatchAnyOIs: ").append(mMatchAnyOis).append("\n");
-        builder.append("OtherHomePartners: ").append(mOtherHomePartners).append("\n");
-        builder.append("RoamingConsortiumOIs: ").append(mRoamingConsortiumOis).append("\n");
-        return builder.toString();
-    }
-
-    /**
-     * Validate HomeSp data.
-     *
-     * @return true on success or false on failure
-     * @hide
-     */
-    public boolean validate() {
-        if (TextUtils.isEmpty(mFqdn)) {
-            Log.d(TAG, "Missing FQDN");
-            return false;
-        }
-        if (TextUtils.isEmpty(mFriendlyName)) {
-            Log.d(TAG, "Missing friendly name");
-            return false;
-        }
-        // Verify SSIDs specified in the NetworkID
-        if (mHomeNetworkIds != null) {
-            for (Map.Entry<String, Long> entry : mHomeNetworkIds.entrySet()) {
-                if (entry.getKey() == null ||
-                        entry.getKey().getBytes(StandardCharsets.UTF_8).length > MAX_SSID_BYTES) {
-                    Log.d(TAG, "Invalid SSID in HomeNetworkIDs");
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    public static final @android.annotation.NonNull Creator<HomeSp> CREATOR =
-        new Creator<HomeSp>() {
-            @Override
-            public HomeSp createFromParcel(Parcel in) {
-                HomeSp homeSp = new HomeSp();
-                homeSp.setFqdn(in.readString());
-                homeSp.setFriendlyName(in.readString());
-                homeSp.setIconUrl(in.readString());
-                homeSp.setHomeNetworkIds(readHomeNetworkIds(in));
-                homeSp.setMatchAllOis(in.createLongArray());
-                homeSp.setMatchAnyOis(in.createLongArray());
-                homeSp.setOtherHomePartners(in.createStringArray());
-                homeSp.setRoamingConsortiumOis(in.createLongArray());
-                return homeSp;
-            }
-
-            @Override
-            public HomeSp[] newArray(int size) {
-                return new HomeSp[size];
-            }
-
-            /**
-             * Helper function for reading a Home Network IDs map from a Parcel.
-             *
-             * @param in The Parcel to read from
-             * @return Map of home network IDs
-             */
-            private Map<String, Long> readHomeNetworkIds(Parcel in) {
-                int size = in.readInt();
-                if (size == NULL_VALUE) {
-                    return null;
-                }
-                Map<String, Long> networkIds = new HashMap<>(size);
-                for (int i = 0; i < size; i++) {
-                    String key = in.readString();
-                    Long value = null;
-                    long readValue = in.readLong();
-                    if (readValue != NULL_VALUE) {
-                        value = Long.valueOf(readValue);
-                    }
-                    networkIds.put(key, value);
-                }
-                return networkIds;
-            }
-        };
-
-    /**
-     * Helper function for writing Home Network IDs map to a Parcel.
-     *
-     * @param dest The Parcel to write to
-     * @param networkIds The map of home network IDs
-     */
-    private static void writeHomeNetworkIds(Parcel dest, Map<String, Long> networkIds) {
-        if (networkIds == null) {
-            dest.writeInt(NULL_VALUE);
-            return;
-        }
-        dest.writeInt(networkIds.size());
-        for (Map.Entry<String, Long> entry : networkIds.entrySet()) {
-            dest.writeString(entry.getKey());
-            if (entry.getValue() == null) {
-                dest.writeLong(NULL_VALUE);
-            } else {
-                dest.writeLong(entry.getValue());
-            }
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/Policy.java b/wifi/java/android/net/wifi/hotspot2/pps/Policy.java
deleted file mode 100644
index b0a2cc3..0000000
--- a/wifi/java/android/net/wifi/hotspot2/pps/Policy.java
+++ /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.
- */
-
-package android.net.wifi.hotspot2.pps;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-/**
- * Class representing Policy subtree in PerProviderSubscription (PPS)
- * Management Object (MO) tree.
- *
- * The Policy specifies additional criteria for Passpoint network selections, such as preferred
- * roaming partner, minimum backhaul bandwidth, and etc. It also provides the meta data for
- * updating the policy.
- *
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- *
- * @hide
- */
-public final class Policy implements Parcelable {
-    private static final String TAG = "Policy";
-
-    /**
-     * Maximum number of SSIDs in the exclusion list.
-     */
-    private static final int MAX_EXCLUSION_SSIDS = 128;
-
-    /**
-     * Maximum byte for SSID.
-     */
-    private static final int MAX_SSID_BYTES = 32;
-
-    /**
-     * Maximum bytes for port string in {@link #requiredProtoPortMap}.
-     */
-    private static final int MAX_PORT_STRING_BYTES = 64;
-
-    /**
-     * Integer value used for indicating null value in the Parcel.
-     */
-    private static final int NULL_VALUE = -1;
-
-    /**
-     * Minimum available downlink/uplink bandwidth (in kilobits per second) required when
-     * selecting a network from home providers.
-     *
-     * The bandwidth is calculated as the LinkSpeed * (1 – LinkLoad/255), where LinkSpeed
-     * and LinkLoad parameters are drawn from the WAN Metrics ANQP element at that hotspot.
-     *
-     * Using Long.MIN_VALUE to indicate unset value.
-     */
-    private long mMinHomeDownlinkBandwidth = Long.MIN_VALUE;
-    public void setMinHomeDownlinkBandwidth(long minHomeDownlinkBandwidth) {
-        mMinHomeDownlinkBandwidth = minHomeDownlinkBandwidth;
-    }
-    public long getMinHomeDownlinkBandwidth() {
-        return mMinHomeDownlinkBandwidth;
-    }
-    private long mMinHomeUplinkBandwidth = Long.MIN_VALUE;
-    public void setMinHomeUplinkBandwidth(long minHomeUplinkBandwidth) {
-        mMinHomeUplinkBandwidth = minHomeUplinkBandwidth;
-    }
-    public long getMinHomeUplinkBandwidth() {
-        return mMinHomeUplinkBandwidth;
-    }
-
-    /**
-     * Minimum available downlink/uplink bandwidth (in kilobits per second) required when
-     * selecting a network from roaming providers.
-     *
-     * The bandwidth is calculated as the LinkSpeed * (1 – LinkLoad/255), where LinkSpeed
-     * and LinkLoad parameters are drawn from the WAN Metrics ANQP element at that hotspot.
-     *
-     * Using Long.MIN_VALUE to indicate unset value.
-     */
-    private long mMinRoamingDownlinkBandwidth = Long.MIN_VALUE;
-    public void setMinRoamingDownlinkBandwidth(long minRoamingDownlinkBandwidth) {
-        mMinRoamingDownlinkBandwidth = minRoamingDownlinkBandwidth;
-    }
-    public long getMinRoamingDownlinkBandwidth() {
-        return mMinRoamingDownlinkBandwidth;
-    }
-    private long mMinRoamingUplinkBandwidth = Long.MIN_VALUE;
-    public void setMinRoamingUplinkBandwidth(long minRoamingUplinkBandwidth) {
-        mMinRoamingUplinkBandwidth = minRoamingUplinkBandwidth;
-    }
-    public long getMinRoamingUplinkBandwidth() {
-        return mMinRoamingUplinkBandwidth;
-    }
-
-    /**
-     * List of SSIDs that are not preferred by the Home SP.
-     */
-    private String[] mExcludedSsidList = null;
-    public void setExcludedSsidList(String[] excludedSsidList) {
-        mExcludedSsidList = excludedSsidList;
-    }
-    public String[] getExcludedSsidList() {
-        return mExcludedSsidList;
-    }
-
-    /**
-     * List of IP protocol and port number required by one or more operator supported application.
-     * The port string contained one or more port numbers delimited by ",".
-     */
-    private Map<Integer, String> mRequiredProtoPortMap = null;
-    public void setRequiredProtoPortMap(Map<Integer, String> requiredProtoPortMap) {
-        mRequiredProtoPortMap = requiredProtoPortMap;
-    }
-    public Map<Integer, String> getRequiredProtoPortMap() {
-        return mRequiredProtoPortMap;
-    }
-
-    /**
-     * This specifies the maximum acceptable BSS load policy.  This is used to prevent device
-     * from joining an AP whose channel is overly congested with traffic.
-     * Using Integer.MIN_VALUE to indicate unset value.
-     */
-    private int mMaximumBssLoadValue = Integer.MIN_VALUE;
-    public void setMaximumBssLoadValue(int maximumBssLoadValue) {
-        mMaximumBssLoadValue = maximumBssLoadValue;
-    }
-    public int getMaximumBssLoadValue() {
-        return mMaximumBssLoadValue;
-    }
-
-    /**
-     * Policy associated with a roaming provider.  This specifies a priority associated
-     * with a roaming provider for given list of countries.
-     *
-     * Contains field under PerProviderSubscription/Policy/PreferredRoamingPartnerList.
-     */
-    public static final class RoamingPartner implements Parcelable {
-        /**
-         * FQDN of the roaming partner.
-         */
-        private String mFqdn = null;
-        public void setFqdn(String fqdn) {
-            mFqdn = fqdn;
-        }
-        public String getFqdn() {
-            return mFqdn;
-        }
-
-        /**
-         * Flag indicating the exact match of FQDN is required for FQDN matching.
-         *
-         * When this flag is set to false, sub-domain matching is used.  For example, when
-         * {@link #fqdn} s set to "example.com", "host.example.com" would be a match.
-         */
-        private boolean mFqdnExactMatch = false;
-        public void setFqdnExactMatch(boolean fqdnExactMatch) {
-            mFqdnExactMatch = fqdnExactMatch;
-        }
-        public boolean getFqdnExactMatch() {
-            return mFqdnExactMatch;
-        }
-
-        /**
-         * Priority associated with this roaming partner policy.
-         * Using Integer.MIN_VALUE to indicate unset value.
-         */
-        private int mPriority = Integer.MIN_VALUE;
-        public void setPriority(int priority) {
-            mPriority = priority;
-        }
-        public int getPriority() {
-            return mPriority;
-        }
-
-        /**
-         * A string contained One or more, comma delimited (i.e., ",") ISO/IEC 3166-1 two
-         * character country strings or the country-independent value, "*".
-         */
-        private String mCountries = null;
-        public void setCountries(String countries) {
-            mCountries = countries;
-        }
-        public String getCountries() {
-            return mCountries;
-        }
-
-        public RoamingPartner() {}
-
-        public RoamingPartner(RoamingPartner source) {
-            if (source != null) {
-                mFqdn = source.mFqdn;
-                mFqdnExactMatch = source.mFqdnExactMatch;
-                mPriority = source.mPriority;
-                mCountries = source.mCountries;
-            }
-        }
-
-        @Override
-        public int describeContents() {
-            return 0;
-        }
-
-        @Override
-        public void writeToParcel(Parcel dest, int flags) {
-            dest.writeString(mFqdn);
-            dest.writeInt(mFqdnExactMatch ? 1 : 0);
-            dest.writeInt(mPriority);
-            dest.writeString(mCountries);
-        }
-
-        @Override
-        public boolean equals(Object thatObject) {
-            if (this == thatObject) {
-                return true;
-            }
-            if (!(thatObject instanceof RoamingPartner)) {
-                return false;
-            }
-
-            RoamingPartner that = (RoamingPartner) thatObject;
-            return TextUtils.equals(mFqdn, that.mFqdn)
-                    && mFqdnExactMatch == that.mFqdnExactMatch
-                    && mPriority == that.mPriority
-                    && TextUtils.equals(mCountries, that.mCountries);
-        }
-
-        @Override
-        public int hashCode() {
-            return Objects.hash(mFqdn, mFqdnExactMatch, mPriority, mCountries);
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder builder = new StringBuilder();
-            builder.append("FQDN: ").append(mFqdn).append("\n");
-            builder.append("ExactMatch: ").append("mFqdnExactMatch").append("\n");
-            builder.append("Priority: ").append(mPriority).append("\n");
-            builder.append("Countries: ").append(mCountries).append("\n");
-            return builder.toString();
-        }
-
-        /**
-         * Validate RoamingParnter data.
-         *
-         * @return true on success
-         * @hide
-         */
-        public boolean validate() {
-            if (TextUtils.isEmpty(mFqdn)) {
-                Log.d(TAG, "Missing FQDN");
-                return false;
-            }
-            if (TextUtils.isEmpty(mCountries)) {
-                Log.d(TAG, "Missing countries");
-                return false;
-            }
-            return true;
-        }
-
-        public static final @android.annotation.NonNull Creator<RoamingPartner> CREATOR =
-            new Creator<RoamingPartner>() {
-                @Override
-                public RoamingPartner createFromParcel(Parcel in) {
-                    RoamingPartner roamingPartner = new RoamingPartner();
-                    roamingPartner.setFqdn(in.readString());
-                    roamingPartner.setFqdnExactMatch(in.readInt() != 0);
-                    roamingPartner.setPriority(in.readInt());
-                    roamingPartner.setCountries(in.readString());
-                    return roamingPartner;
-                }
-
-                @Override
-                public RoamingPartner[] newArray(int size) {
-                    return new RoamingPartner[size];
-                }
-            };
-    }
-    private List<RoamingPartner> mPreferredRoamingPartnerList = null;
-    public void setPreferredRoamingPartnerList(List<RoamingPartner> partnerList) {
-        mPreferredRoamingPartnerList = partnerList;
-    }
-    public List<RoamingPartner> getPreferredRoamingPartnerList() {
-        return mPreferredRoamingPartnerList;
-    }
-
-    /**
-     * Meta data used for policy update.
-     */
-    private UpdateParameter mPolicyUpdate = null;
-    public void setPolicyUpdate(UpdateParameter policyUpdate) {
-        mPolicyUpdate = policyUpdate;
-    }
-    public UpdateParameter getPolicyUpdate() {
-        return mPolicyUpdate;
-    }
-
-    /**
-     * Constructor for creating Policy with default values.
-     */
-    public Policy() {}
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     */
-    public Policy(Policy source) {
-        if (source == null) {
-            return;
-        }
-        mMinHomeDownlinkBandwidth = source.mMinHomeDownlinkBandwidth;
-        mMinHomeUplinkBandwidth = source.mMinHomeUplinkBandwidth;
-        mMinRoamingDownlinkBandwidth = source.mMinRoamingDownlinkBandwidth;
-        mMinRoamingUplinkBandwidth = source.mMinRoamingUplinkBandwidth;
-        mMaximumBssLoadValue = source.mMaximumBssLoadValue;
-        if (source.mExcludedSsidList != null) {
-            mExcludedSsidList = Arrays.copyOf(source.mExcludedSsidList,
-                    source.mExcludedSsidList.length);
-        }
-        if (source.mRequiredProtoPortMap != null) {
-            mRequiredProtoPortMap = Collections.unmodifiableMap(source.mRequiredProtoPortMap);
-        }
-        if (source.mPreferredRoamingPartnerList != null) {
-            mPreferredRoamingPartnerList = Collections.unmodifiableList(
-                    source.mPreferredRoamingPartnerList);
-        }
-        if (source.mPolicyUpdate != null) {
-            mPolicyUpdate = new UpdateParameter(source.mPolicyUpdate);
-        }
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mMinHomeDownlinkBandwidth);
-        dest.writeLong(mMinHomeUplinkBandwidth);
-        dest.writeLong(mMinRoamingDownlinkBandwidth);
-        dest.writeLong(mMinRoamingUplinkBandwidth);
-        dest.writeStringArray(mExcludedSsidList);
-        writeProtoPortMap(dest, mRequiredProtoPortMap);
-        dest.writeInt(mMaximumBssLoadValue);
-        writeRoamingPartnerList(dest, flags, mPreferredRoamingPartnerList);
-        dest.writeParcelable(mPolicyUpdate, flags);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof Policy)) {
-            return false;
-        }
-        Policy that = (Policy) thatObject;
-
-        return mMinHomeDownlinkBandwidth == that.mMinHomeDownlinkBandwidth
-                && mMinHomeUplinkBandwidth == that.mMinHomeUplinkBandwidth
-                && mMinRoamingDownlinkBandwidth == that.mMinRoamingDownlinkBandwidth
-                && mMinRoamingUplinkBandwidth == that.mMinRoamingUplinkBandwidth
-                && Arrays.equals(mExcludedSsidList, that.mExcludedSsidList)
-                && (mRequiredProtoPortMap == null ? that.mRequiredProtoPortMap == null
-                        : mRequiredProtoPortMap.equals(that.mRequiredProtoPortMap))
-                && mMaximumBssLoadValue == that.mMaximumBssLoadValue
-                && (mPreferredRoamingPartnerList == null
-                        ? that.mPreferredRoamingPartnerList == null
-                        : mPreferredRoamingPartnerList.equals(that.mPreferredRoamingPartnerList))
-                && (mPolicyUpdate == null ? that.mPolicyUpdate == null
-                        : mPolicyUpdate.equals(that.mPolicyUpdate));
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mMinHomeDownlinkBandwidth, mMinHomeUplinkBandwidth,
-                mMinRoamingDownlinkBandwidth, mMinRoamingUplinkBandwidth, mExcludedSsidList,
-                mRequiredProtoPortMap, mMaximumBssLoadValue, mPreferredRoamingPartnerList,
-                mPolicyUpdate);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("MinHomeDownlinkBandwidth: ").append(mMinHomeDownlinkBandwidth)
-                .append("\n");
-        builder.append("MinHomeUplinkBandwidth: ").append(mMinHomeUplinkBandwidth).append("\n");
-        builder.append("MinRoamingDownlinkBandwidth: ").append(mMinRoamingDownlinkBandwidth)
-                .append("\n");
-        builder.append("MinRoamingUplinkBandwidth: ").append(mMinRoamingUplinkBandwidth)
-                .append("\n");
-        builder.append("ExcludedSSIDList: ").append(mExcludedSsidList).append("\n");
-        builder.append("RequiredProtoPortMap: ").append(mRequiredProtoPortMap).append("\n");
-        builder.append("MaximumBSSLoadValue: ").append(mMaximumBssLoadValue).append("\n");
-        builder.append("PreferredRoamingPartnerList: ").append(mPreferredRoamingPartnerList)
-                .append("\n");
-        if (mPolicyUpdate != null) {
-            builder.append("PolicyUpdate Begin ---\n");
-            builder.append(mPolicyUpdate);
-            builder.append("PolicyUpdate End ---\n");
-        }
-        return builder.toString();
-    }
-
-    /**
-     * Validate Policy data.
-     *
-     * @return true on success
-     * @hide
-     */
-    public boolean validate() {
-        if (mPolicyUpdate == null) {
-            Log.d(TAG, "PolicyUpdate not specified");
-            return false;
-        }
-        if (!mPolicyUpdate.validate()) {
-            return false;
-        }
-
-        // Validate SSID exclusion list.
-        if (mExcludedSsidList != null) {
-            if (mExcludedSsidList.length > MAX_EXCLUSION_SSIDS) {
-                Log.d(TAG, "SSID exclusion list size exceeded the max: "
-                        + mExcludedSsidList.length);
-                return false;
-            }
-            for (String ssid : mExcludedSsidList) {
-                if (ssid.getBytes(StandardCharsets.UTF_8).length > MAX_SSID_BYTES) {
-                    Log.d(TAG, "Invalid SSID: " + ssid);
-                    return false;
-                }
-            }
-        }
-        // Validate required protocol to port map.
-        if (mRequiredProtoPortMap != null) {
-            for (Map.Entry<Integer, String> entry : mRequiredProtoPortMap.entrySet()) {
-                String portNumber = entry.getValue();
-                if (portNumber.getBytes(StandardCharsets.UTF_8).length > MAX_PORT_STRING_BYTES) {
-                    Log.d(TAG, "PortNumber string bytes exceeded the max: " + portNumber);
-                    return false;
-                }
-            }
-        }
-        // Validate preferred roaming partner list.
-        if (mPreferredRoamingPartnerList != null) {
-            for (RoamingPartner partner : mPreferredRoamingPartnerList) {
-                if (!partner.validate()) {
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    public static final @android.annotation.NonNull Creator<Policy> CREATOR =
-        new Creator<Policy>() {
-            @Override
-            public Policy createFromParcel(Parcel in) {
-                Policy policy = new Policy();
-                policy.setMinHomeDownlinkBandwidth(in.readLong());
-                policy.setMinHomeUplinkBandwidth(in.readLong());
-                policy.setMinRoamingDownlinkBandwidth(in.readLong());
-                policy.setMinRoamingUplinkBandwidth(in.readLong());
-                policy.setExcludedSsidList(in.createStringArray());
-                policy.setRequiredProtoPortMap(readProtoPortMap(in));
-                policy.setMaximumBssLoadValue(in.readInt());
-                policy.setPreferredRoamingPartnerList(readRoamingPartnerList(in));
-                policy.setPolicyUpdate(in.readParcelable(null));
-                return policy;
-            }
-
-            @Override
-            public Policy[] newArray(int size) {
-                return new Policy[size];
-            }
-
-            /**
-             * Helper function for reading IP Protocol to Port Number map from a Parcel.
-             *
-             * @param in The Parcel to read from
-             * @return Map of IP protocol to port number
-             */
-            private Map<Integer, String> readProtoPortMap(Parcel in) {
-                int size = in.readInt();
-                if (size == NULL_VALUE) {
-                    return null;
-                }
-                Map<Integer, String> protoPortMap = new HashMap<>(size);
-                for (int i = 0; i < size; i++) {
-                    int key = in.readInt();
-                    String value = in.readString();
-                    protoPortMap.put(key, value);
-                }
-                return protoPortMap;
-            }
-
-            /**
-             * Helper function for reading roaming partner list from a Parcel.
-             *
-             * @param in The Parcel to read from
-             * @return List of roaming partners
-             */
-            private List<RoamingPartner> readRoamingPartnerList(Parcel in) {
-                int size = in.readInt();
-                if (size == NULL_VALUE) {
-                    return null;
-                }
-                List<RoamingPartner> partnerList = new ArrayList<>();
-                for (int i = 0; i < size; i++) {
-                    partnerList.add(in.readParcelable(null));
-                }
-                return partnerList;
-            }
-
-        };
-
-    /**
-     * Helper function for writing IP Protocol to Port Number map to a Parcel.
-     *
-     * @param dest The Parcel to write to
-     * @param protoPortMap The map to write
-     */
-    private static void writeProtoPortMap(Parcel dest, Map<Integer, String> protoPortMap) {
-        if (protoPortMap == null) {
-            dest.writeInt(NULL_VALUE);
-            return;
-        }
-        dest.writeInt(protoPortMap.size());
-        for (Map.Entry<Integer, String> entry : protoPortMap.entrySet()) {
-            dest.writeInt(entry.getKey());
-            dest.writeString(entry.getValue());
-        }
-    }
-
-    /**
-     * Helper function for writing roaming partner list to a Parcel.
-     *
-     * @param dest The Parcel to write to
-     * @param flags The flag about how the object should be written
-     * @param partnerList The partner list to write
-     */
-    private static void writeRoamingPartnerList(Parcel dest, int flags,
-            List<RoamingPartner> partnerList) {
-        if (partnerList == null) {
-            dest.writeInt(NULL_VALUE);
-            return;
-        }
-        dest.writeInt(partnerList.size());
-        for (RoamingPartner partner : partnerList) {
-            dest.writeParcelable(partner, flags);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java b/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java
deleted file mode 100644
index 4a8aa36..0000000
--- a/wifi/java/android/net/wifi/hotspot2/pps/UpdateParameter.java
+++ /dev/null
@@ -1,403 +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.net.wifi.hotspot2.pps;
-
-import android.net.wifi.ParcelUtil;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.Base64;
-import android.util.Log;
-
-import java.nio.charset.StandardCharsets;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.Objects;
-
-/**
- * Class representing configuration parameters for subscription or policy update in
- * PerProviderSubscription (PPS) Management Object (MO) tree.  This is used by both
- * PerProviderSubscription/Policy/PolicyUpdate and PerProviderSubscription/SubscriptionUpdate
- * subtree.
- *
- * For more info, refer to Hotspot 2.0 PPS MO defined in section 9.1 of the Hotspot 2.0
- * Release 2 Technical Specification.
- *
- * @hide
- */
-public final class UpdateParameter implements Parcelable {
-    private static final String TAG = "UpdateParameter";
-
-    /**
-     * Value indicating policy update is not applicable.  Thus, never check with policy server
-     * for updates.
-     */
-    public static final long UPDATE_CHECK_INTERVAL_NEVER = 0xFFFFFFFFL;
-
-    /**
-     * Valid string for UpdateMethod.
-     */
-    public static final String UPDATE_METHOD_OMADM = "OMA-DM-ClientInitiated";
-    public static final String UPDATE_METHOD_SSP = "SSP-ClientInitiated";
-
-    /**
-     * Valid string for Restriction.
-     */
-    public static final String UPDATE_RESTRICTION_HOMESP = "HomeSP";
-    public static final String UPDATE_RESTRICTION_ROAMING_PARTNER = "RoamingPartner";
-    public static final String UPDATE_RESTRICTION_UNRESTRICTED = "Unrestricted";
-
-    /**
-     * Maximum bytes for URI string.
-     */
-    private static final int MAX_URI_BYTES = 1023;
-
-    /**
-     * Maximum bytes for URI string.
-     */
-    private static final int MAX_URL_BYTES = 1023;
-
-    /**
-     * Maximum bytes for username.
-     */
-    private static final int MAX_USERNAME_BYTES = 63;
-
-    /**
-     * Maximum bytes for password.
-     */
-    private static final int MAX_PASSWORD_BYTES = 255;
-
-    /**
-     * Number of bytes for certificate SHA-256 fingerprint byte array.
-     */
-    private static final int CERTIFICATE_SHA256_BYTES = 32;
-
-    /**
-     * This specifies how often the mobile device shall check with policy server for updates.
-     *
-     * Using Long.MIN_VALUE to indicate unset value.
-     */
-    private long mUpdateIntervalInMinutes = Long.MIN_VALUE;
-    public void setUpdateIntervalInMinutes(long updateIntervalInMinutes) {
-        mUpdateIntervalInMinutes = updateIntervalInMinutes;
-    }
-    public long getUpdateIntervalInMinutes() {
-        return mUpdateIntervalInMinutes;
-    }
-
-    /**
-     * The method used to update the policy.  Permitted values are "OMA-DM-ClientInitiated"
-     * and "SPP-ClientInitiated".
-     */
-    private String mUpdateMethod = null;
-    public void setUpdateMethod(String updateMethod) {
-        mUpdateMethod = updateMethod;
-    }
-    public String getUpdateMethod() {
-        return mUpdateMethod;
-    }
-
-    /**
-     * This specifies the hotspots at which the subscription update is permitted.  Permitted
-     * values are "HomeSP", "RoamingPartner", or "Unrestricted";
-     */
-    private String mRestriction = null;
-    public void setRestriction(String restriction) {
-        mRestriction = restriction;
-    }
-    public String getRestriction() {
-        return mRestriction;
-    }
-
-    /**
-     * The URI of the update server.
-     */
-    private String mServerUri = null;
-    public void setServerUri(String serverUri) {
-        mServerUri = serverUri;
-    }
-    public String getServerUri() {
-        return mServerUri;
-    }
-
-    /**
-     * Username used to authenticate with the policy server.
-     */
-    private String mUsername = null;
-    public void setUsername(String username) {
-        mUsername = username;
-    }
-    public String getUsername() {
-        return mUsername;
-    }
-
-    /**
-     * Base64 encoded password used to authenticate with the policy server.
-     */
-    private String mBase64EncodedPassword = null;
-    public void setBase64EncodedPassword(String password) {
-        mBase64EncodedPassword = password;
-    }
-    public String getBase64EncodedPassword() {
-        return mBase64EncodedPassword;
-    }
-
-    /**
-     * HTTPS URL for retrieving certificate for trust root.  The trust root is used to validate
-     * policy server's identity.
-     */
-    private String mTrustRootCertUrl = null;
-    public void setTrustRootCertUrl(String trustRootCertUrl) {
-        mTrustRootCertUrl = trustRootCertUrl;
-    }
-    public String getTrustRootCertUrl() {
-        return mTrustRootCertUrl;
-    }
-
-    /**
-     * SHA-256 fingerprint of the certificate located at {@code mTrustRootCertUrl}
-     */
-    private byte[] mTrustRootCertSha256Fingerprint = null;
-    public void setTrustRootCertSha256Fingerprint(byte[] fingerprint) {
-        mTrustRootCertSha256Fingerprint = fingerprint;
-    }
-    public byte[] getTrustRootCertSha256Fingerprint() {
-        return mTrustRootCertSha256Fingerprint;
-    }
-
-    /**
-     * CA (Certificate Authority) X509 certificates.
-     */
-    private X509Certificate mCaCertificate;
-
-    /**
-     * Set the CA (Certification Authority) certificate associated with Policy/Subscription update.
-     *
-     * @param caCertificate The CA certificate to set
-     * @hide
-     */
-    public void setCaCertificate(X509Certificate caCertificate) {
-        mCaCertificate = caCertificate;
-    }
-
-    /**
-     * Get the CA (Certification Authority) certificate associated with Policy/Subscription update.
-     *
-     * @return CA certificate associated and {@code null} if certificate is not set.
-     * @hide
-     */
-    public X509Certificate getCaCertificate() {
-        return mCaCertificate;
-    }
-
-    /**
-     * Constructor for creating Policy with default values.
-     */
-    public UpdateParameter() {}
-
-    /**
-     * Copy constructor.
-     *
-     * @param source The source to copy from
-     */
-    public UpdateParameter(UpdateParameter source) {
-        if (source == null) {
-            return;
-        }
-        mUpdateIntervalInMinutes = source.mUpdateIntervalInMinutes;
-        mUpdateMethod = source.mUpdateMethod;
-        mRestriction = source.mRestriction;
-        mServerUri = source.mServerUri;
-        mUsername = source.mUsername;
-        mBase64EncodedPassword = source.mBase64EncodedPassword;
-        mTrustRootCertUrl = source.mTrustRootCertUrl;
-        if (source.mTrustRootCertSha256Fingerprint != null) {
-            mTrustRootCertSha256Fingerprint = Arrays.copyOf(source.mTrustRootCertSha256Fingerprint,
-                    source.mTrustRootCertSha256Fingerprint.length);
-        }
-        mCaCertificate = source.mCaCertificate;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mUpdateIntervalInMinutes);
-        dest.writeString(mUpdateMethod);
-        dest.writeString(mRestriction);
-        dest.writeString(mServerUri);
-        dest.writeString(mUsername);
-        dest.writeString(mBase64EncodedPassword);
-        dest.writeString(mTrustRootCertUrl);
-        dest.writeByteArray(mTrustRootCertSha256Fingerprint);
-        ParcelUtil.writeCertificate(dest, mCaCertificate);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (!(thatObject instanceof UpdateParameter)) {
-            return false;
-        }
-        UpdateParameter that = (UpdateParameter) thatObject;
-
-        return mUpdateIntervalInMinutes == that.mUpdateIntervalInMinutes
-                && TextUtils.equals(mUpdateMethod, that.mUpdateMethod)
-                && TextUtils.equals(mRestriction, that.mRestriction)
-                && TextUtils.equals(mServerUri, that.mServerUri)
-                && TextUtils.equals(mUsername, that.mUsername)
-                && TextUtils.equals(mBase64EncodedPassword, that.mBase64EncodedPassword)
-                && TextUtils.equals(mTrustRootCertUrl, that.mTrustRootCertUrl)
-                && Arrays.equals(mTrustRootCertSha256Fingerprint,
-                that.mTrustRootCertSha256Fingerprint)
-                && Credential.isX509CertificateEquals(mCaCertificate, that.mCaCertificate);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mUpdateIntervalInMinutes, mUpdateMethod, mRestriction, mServerUri,
-                mUsername, mBase64EncodedPassword, mTrustRootCertUrl,
-                Arrays.hashCode(mTrustRootCertSha256Fingerprint), mCaCertificate);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder builder = new StringBuilder();
-        builder.append("UpdateInterval: ").append(mUpdateIntervalInMinutes).append("\n");
-        builder.append("UpdateMethod: ").append(mUpdateMethod).append("\n");
-        builder.append("Restriction: ").append(mRestriction).append("\n");
-        builder.append("ServerURI: ").append(mServerUri).append("\n");
-        builder.append("Username: ").append(mUsername).append("\n");
-        builder.append("TrustRootCertURL: ").append(mTrustRootCertUrl).append("\n");
-        return builder.toString();
-    }
-
-    /**
-     * Validate UpdateParameter data.
-     *
-     * @return true on success
-     * @hide
-     */
-    public boolean validate() {
-        if (mUpdateIntervalInMinutes == Long.MIN_VALUE) {
-            Log.d(TAG, "Update interval not specified");
-            return false;
-        }
-        // Update not applicable.
-        if (mUpdateIntervalInMinutes == UPDATE_CHECK_INTERVAL_NEVER) {
-            return true;
-        }
-
-        if (!TextUtils.equals(mUpdateMethod, UPDATE_METHOD_OMADM)
-                && !TextUtils.equals(mUpdateMethod, UPDATE_METHOD_SSP)) {
-            Log.d(TAG, "Unknown update method: " + mUpdateMethod);
-            return false;
-        }
-
-        if (!TextUtils.equals(mRestriction, UPDATE_RESTRICTION_HOMESP)
-                && !TextUtils.equals(mRestriction, UPDATE_RESTRICTION_ROAMING_PARTNER)
-                && !TextUtils.equals(mRestriction, UPDATE_RESTRICTION_UNRESTRICTED)) {
-            Log.d(TAG, "Unknown restriction: " + mRestriction);
-            return false;
-        }
-
-        if (TextUtils.isEmpty(mServerUri)) {
-            Log.d(TAG, "Missing update server URI");
-            return false;
-        }
-        if (mServerUri.getBytes(StandardCharsets.UTF_8).length > MAX_URI_BYTES) {
-            Log.d(TAG, "URI bytes exceeded the max: "
-                    + mServerUri.getBytes(StandardCharsets.UTF_8).length);
-            return false;
-        }
-
-        if (TextUtils.isEmpty(mUsername)) {
-            Log.d(TAG, "Missing username");
-            return false;
-        }
-        if (mUsername.getBytes(StandardCharsets.UTF_8).length > MAX_USERNAME_BYTES) {
-            Log.d(TAG, "Username bytes exceeded the max: "
-                    + mUsername.getBytes(StandardCharsets.UTF_8).length);
-            return false;
-        }
-
-        if (TextUtils.isEmpty(mBase64EncodedPassword)) {
-            Log.d(TAG, "Missing username");
-            return false;
-        }
-        if (mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length > MAX_PASSWORD_BYTES) {
-            Log.d(TAG, "Password bytes exceeded the max: "
-                    + mBase64EncodedPassword.getBytes(StandardCharsets.UTF_8).length);
-            return false;
-        }
-        try {
-            Base64.decode(mBase64EncodedPassword, Base64.DEFAULT);
-        } catch (IllegalArgumentException e) {
-            Log.d(TAG, "Invalid encoding for password: " + mBase64EncodedPassword);
-            return false;
-        }
-
-        if (TextUtils.isEmpty(mTrustRootCertUrl)) {
-            Log.d(TAG, "Missing trust root certificate URL");
-            return false;
-        }
-        if (mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length > MAX_URL_BYTES) {
-            Log.d(TAG, "Trust root cert URL bytes exceeded the max: "
-                    + mTrustRootCertUrl.getBytes(StandardCharsets.UTF_8).length);
-            return false;
-        }
-
-        if (mTrustRootCertSha256Fingerprint == null) {
-            Log.d(TAG, "Missing trust root certificate SHA-256 fingerprint");
-            return false;
-        }
-        if (mTrustRootCertSha256Fingerprint.length != CERTIFICATE_SHA256_BYTES) {
-            Log.d(TAG, "Incorrect size of trust root certificate SHA-256 fingerprint: "
-                    + mTrustRootCertSha256Fingerprint.length);
-            return false;
-        }
-        return true;
-    }
-
-    public static final @android.annotation.NonNull Creator<UpdateParameter> CREATOR =
-        new Creator<UpdateParameter>() {
-            @Override
-            public UpdateParameter createFromParcel(Parcel in) {
-                UpdateParameter updateParam = new UpdateParameter();
-                updateParam.setUpdateIntervalInMinutes(in.readLong());
-                updateParam.setUpdateMethod(in.readString());
-                updateParam.setRestriction(in.readString());
-                updateParam.setServerUri(in.readString());
-                updateParam.setUsername(in.readString());
-                updateParam.setBase64EncodedPassword(in.readString());
-                updateParam.setTrustRootCertUrl(in.readString());
-                updateParam.setTrustRootCertSha256Fingerprint(in.createByteArray());
-                updateParam.setCaCertificate(ParcelUtil.readCertificate(in));
-                return updateParam;
-            }
-
-            @Override
-            public UpdateParameter[] newArray(int size) {
-                return new UpdateParameter[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl b/wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl
deleted file mode 100644
index bfdd45d..0000000
--- a/wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2008, The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.os.Messenger;
-
-/**
- * Interface that WifiP2pService implements
- *
- * {@hide}
- */
-interface IWifiP2pManager
-{
-    Messenger getMessenger(in IBinder binder);
-    Messenger getP2pStateMachineMessenger();
-    oneway void close(in IBinder binder);
-    void setMiracastMode(int mode);
-    void checkConfigureWifiDisplayPermission();
-}
-
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java b/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
deleted file mode 100644
index d3a6bac..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pConfig.java
+++ /dev/null
@@ -1,506 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.annotation.IntDef;
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.net.MacAddress;
-import android.net.wifi.WpsInfo;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.nio.charset.StandardCharsets;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * A class representing a Wi-Fi P2p configuration for setting up a connection
- *
- * {@see WifiP2pManager}
- */
-public class WifiP2pConfig implements Parcelable {
-
-    /**
-     * The device MAC address uniquely identifies a Wi-Fi p2p device
-     */
-    public String deviceAddress = "";
-
-    /**
-     * Wi-Fi Protected Setup information
-     */
-    public WpsInfo wps;
-
-    /** Get the network name of this P2P configuration, or null if unset. */
-    @Nullable
-    public String getNetworkName() {
-        return networkName;
-    }
-
-    /** @hide */
-    public String networkName = "";
-
-    /** Get the passphrase of this P2P configuration, or null if unset. */
-    @Nullable
-    public String getPassphrase() {
-        return passphrase;
-    }
-
-    /** @hide */
-    public String passphrase = "";
-
-    /**
-     * Get the required band for the group owner.
-     * The result will be one of the following:
-     * {@link #GROUP_OWNER_BAND_AUTO},
-     * {@link #GROUP_OWNER_BAND_2GHZ},
-     * {@link #GROUP_OWNER_BAND_5GHZ}
-     */
-    @GroupOperatingBandType
-    public int getGroupOwnerBand() {
-        return groupOwnerBand;
-    }
-
-    /** @hide */
-    @GroupOperatingBandType
-    public int groupOwnerBand = GROUP_OWNER_BAND_AUTO;
-
-    /** @hide */
-    @IntDef(flag = false, prefix = { "GROUP_OWNER_BAND_" }, value = {
-        GROUP_OWNER_BAND_AUTO,
-        GROUP_OWNER_BAND_2GHZ,
-        GROUP_OWNER_BAND_5GHZ
-    })
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface GroupOperatingBandType {}
-
-    /**
-     * Allow the system to pick the operating frequency from all supported bands.
-     */
-    public static final int GROUP_OWNER_BAND_AUTO = 0;
-    /**
-     * Allow the system to pick the operating frequency from the 2.4 GHz band.
-     */
-    public static final int GROUP_OWNER_BAND_2GHZ = 1;
-    /**
-     * Allow the system to pick the operating frequency from the 5 GHz band.
-     */
-    public static final int GROUP_OWNER_BAND_5GHZ = 2;
-
-    /**
-     * The least inclination to be a group owner, to be filled in the field
-     * {@link #groupOwnerIntent}.
-     */
-    public static final int GROUP_OWNER_INTENT_MIN = 0;
-
-    /**
-     * The most inclination to be a group owner, to be filled in the field
-     * {@link #groupOwnerIntent}.
-     */
-    public static final int GROUP_OWNER_INTENT_MAX = 15;
-
-    /**
-     * The system can choose an appropriate owner intent value, to be filled in the field
-     * {@link #groupOwnerIntent}.
-     */
-    public static final int GROUP_OWNER_INTENT_AUTO = -1;
-
-    /**
-     * This is an integer value between {@link #GROUP_OWNER_INTENT_MIN} and
-     * {@link #GROUP_OWNER_INTENT_MAX} where
-     * {@link #GROUP_OWNER_INTENT_MIN} indicates the least inclination to be a group owner and
-     * {@link #GROUP_OWNER_INTENT_MAX} indicates the highest inclination to be a group owner.
-     *
-     * A value of {@link #GROUP_OWNER_INTENT_AUTO} indicates the system can choose an appropriate
-     * value.
-     *
-     * By default this field is set to {@link #GROUP_OWNER_INTENT_AUTO}.
-     */
-    @IntRange(from = 0, to = 15)
-    public int groupOwnerIntent = GROUP_OWNER_INTENT_AUTO;
-
-    /** @hide */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public int netId = WifiP2pGroup.NETWORK_ID_PERSISTENT;
-
-    /**
-     * Get the network ID of this P2P configuration.
-     * @return either a non-negative network ID, or one of
-     * {@link WifiP2pGroup#NETWORK_ID_PERSISTENT} or {@link WifiP2pGroup#NETWORK_ID_TEMPORARY}.
-     */
-    public int getNetworkId() {
-        return netId;
-    }
-
-    public WifiP2pConfig() {
-        //set defaults
-        wps = new WpsInfo();
-        wps.setup = WpsInfo.PBC;
-    }
-
-    /** @hide */
-    public void invalidate() {
-        deviceAddress = "";
-    }
-
-    /** P2P-GO-NEG-REQUEST 42:fc:89:a8:96:09 dev_passwd_id=4 {@hide}*/
-    @UnsupportedAppUsage
-    public WifiP2pConfig(String supplicantEvent) throws IllegalArgumentException {
-        String[] tokens = supplicantEvent.split(" ");
-
-        if (tokens.length < 2 || !tokens[0].equals("P2P-GO-NEG-REQUEST")) {
-            throw new IllegalArgumentException("Malformed supplicant event");
-        }
-
-        deviceAddress = tokens[1];
-        wps = new WpsInfo();
-
-        if (tokens.length > 2) {
-            String[] nameVal = tokens[2].split("=");
-            int devPasswdId;
-            try {
-                devPasswdId = Integer.parseInt(nameVal[1]);
-            } catch (NumberFormatException e) {
-                devPasswdId = 0;
-            }
-            //Based on definitions in wps/wps_defs.h
-            switch (devPasswdId) {
-                //DEV_PW_USER_SPECIFIED = 0x0001,
-                case 0x01:
-                    wps.setup = WpsInfo.DISPLAY;
-                    break;
-                //DEV_PW_PUSHBUTTON = 0x0004,
-                case 0x04:
-                    wps.setup = WpsInfo.PBC;
-                    break;
-                //DEV_PW_REGISTRAR_SPECIFIED = 0x0005
-                case 0x05:
-                    wps.setup = WpsInfo.KEYPAD;
-                    break;
-                default:
-                    wps.setup = WpsInfo.PBC;
-                    break;
-            }
-        }
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("\n address: ").append(deviceAddress);
-        sbuf.append("\n wps: ").append(wps);
-        sbuf.append("\n groupOwnerIntent: ").append(groupOwnerIntent);
-        sbuf.append("\n persist: ").append(netId);
-        sbuf.append("\n networkName: ").append(networkName);
-        sbuf.append("\n passphrase: ").append(
-                TextUtils.isEmpty(passphrase) ? "<empty>" : "<non-empty>");
-        sbuf.append("\n groupOwnerBand: ").append(groupOwnerBand);
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** copy constructor */
-    public WifiP2pConfig(WifiP2pConfig source) {
-        if (source != null) {
-            deviceAddress = source.deviceAddress;
-            wps = new WpsInfo(source.wps);
-            groupOwnerIntent = source.groupOwnerIntent;
-            netId = source.netId;
-            networkName = source.networkName;
-            passphrase = source.passphrase;
-            groupOwnerBand = source.groupOwnerBand;
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(deviceAddress);
-        dest.writeParcelable(wps, flags);
-        dest.writeInt(groupOwnerIntent);
-        dest.writeInt(netId);
-        dest.writeString(networkName);
-        dest.writeString(passphrase);
-        dest.writeInt(groupOwnerBand);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiP2pConfig> CREATOR =
-        new Creator<WifiP2pConfig>() {
-            public WifiP2pConfig createFromParcel(Parcel in) {
-                WifiP2pConfig config = new WifiP2pConfig();
-                config.deviceAddress = in.readString();
-                config.wps = (WpsInfo) in.readParcelable(null);
-                config.groupOwnerIntent = in.readInt();
-                config.netId = in.readInt();
-                config.networkName = in.readString();
-                config.passphrase = in.readString();
-                config.groupOwnerBand = in.readInt();
-                return config;
-            }
-
-            public WifiP2pConfig[] newArray(int size) {
-                return new WifiP2pConfig[size];
-            }
-        };
-
-    /**
-     * Builder used to build {@link WifiP2pConfig} objects for
-     * creating or joining a group.
-     */
-    public static final class Builder {
-
-        private static final MacAddress MAC_ANY_ADDRESS =
-                MacAddress.fromString("02:00:00:00:00:00");
-        /**
-         * Maximum number of bytes allowed for a SSID.
-         */
-        private static final int MAX_SSID_BYTES = 32;
-
-        private MacAddress mDeviceAddress = MAC_ANY_ADDRESS;
-        private String mNetworkName = "";
-        private String mPassphrase = "";
-        private int mGroupOperatingBand = GROUP_OWNER_BAND_AUTO;
-        private int mGroupOperatingFrequency = GROUP_OWNER_BAND_AUTO;
-        private int mNetId = WifiP2pGroup.NETWORK_ID_TEMPORARY;
-
-        /**
-         * Specify the peer's MAC address. If not set, the device will
-         * try to find a peer whose SSID matches the network name as
-         * specified by {@link #setNetworkName(String)}. Specifying null will
-         * reset the peer's MAC address to "02:00:00:00:00:00".
-         * <p>
-         *     Optional. "02:00:00:00:00:00" by default.
-         *
-         * @param deviceAddress the peer's MAC address.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder setDeviceAddress(@Nullable MacAddress deviceAddress) {
-            if (deviceAddress == null) {
-                mDeviceAddress = MAC_ANY_ADDRESS;
-            } else {
-                mDeviceAddress = deviceAddress;
-            }
-            return this;
-        }
-
-        /**
-         * Specify the network name, a.k.a. group name,
-         * for creating or joining a group.
-         * <p>
-         * A network name shall begin with "DIRECT-xy". x and y are selected
-         * from the following character set: upper case letters, lower case
-         * letters and numbers. Any byte values allowed for an SSID according to
-         * IEEE802.11-2012 [1] may be included after the string "DIRECT-xy"
-         * (including none).
-         * <p>
-         *     Must be called - an empty network name or an network name
-         *     not conforming to the P2P Group ID naming rule is not valid.
-         *
-         * @param networkName network name of a group.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder setNetworkName(@NonNull String networkName) {
-            if (TextUtils.isEmpty(networkName)) {
-                throw new IllegalArgumentException(
-                        "network name must be non-empty.");
-            }
-            if (networkName.getBytes(StandardCharsets.UTF_8).length > MAX_SSID_BYTES) {
-                throw new IllegalArgumentException(
-                        "network name exceeds " + MAX_SSID_BYTES + " bytes.");
-            }
-            try {
-                if (!networkName.matches("^DIRECT-[a-zA-Z0-9]{2}.*")) {
-                    throw new IllegalArgumentException(
-                            "network name must starts with the prefix DIRECT-xy.");
-                }
-            } catch (PatternSyntaxException e) {
-                // can never happen (fixed pattern)
-            }
-            mNetworkName = networkName;
-            return this;
-        }
-
-        /**
-         * Specify the passphrase for creating or joining a group.
-         * <p>
-         * The passphrase must be an ASCII string whose length is between 8
-         * and 63.
-         * <p>
-         *     Must be called - an empty passphrase is not valid.
-         *
-         * @param passphrase the passphrase of a group.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder setPassphrase(@NonNull String passphrase) {
-            if (TextUtils.isEmpty(passphrase)) {
-                throw new IllegalArgumentException(
-                        "passphrase must be non-empty.");
-            }
-            if (passphrase.length() < 8 || passphrase.length() > 63) {
-                throw new IllegalArgumentException(
-                        "The length of a passphrase must be between 8 and 63.");
-            }
-            mPassphrase = passphrase;
-            return this;
-        }
-
-        /**
-         * Specify the band to use for creating the group or joining the group. The band should
-         * be {@link #GROUP_OWNER_BAND_2GHZ}, {@link #GROUP_OWNER_BAND_5GHZ} or
-         * {@link #GROUP_OWNER_BAND_AUTO}.
-         * <p>
-         * When creating a group as Group Owner using {@link
-         * WifiP2pManager#createGroup(WifiP2pManager.Channel,
-         * WifiP2pConfig, WifiP2pManager.ActionListener)},
-         * specifying {@link #GROUP_OWNER_BAND_AUTO} allows the system to pick the operating
-         * frequency from all supported bands.
-         * Specifying {@link #GROUP_OWNER_BAND_2GHZ} or {@link #GROUP_OWNER_BAND_5GHZ}
-         * only allows the system to pick the operating frequency in the specified band.
-         * If the Group Owner cannot create a group in the specified band, the operation will fail.
-         * <p>
-         * When joining a group as Group Client using {@link
-         * WifiP2pManager#connect(WifiP2pManager.Channel, WifiP2pConfig,
-         * WifiP2pManager.ActionListener)},
-         * specifying {@link #GROUP_OWNER_BAND_AUTO} allows the system to scan all supported
-         * frequencies to find the desired group. Specifying {@link #GROUP_OWNER_BAND_2GHZ} or
-         * {@link #GROUP_OWNER_BAND_5GHZ} only allows the system to scan the specified band.
-         * <p>
-         *     {@link #setGroupOperatingBand(int)} and {@link #setGroupOperatingFrequency(int)} are
-         *     mutually exclusive. Setting operating band and frequency both is invalid.
-         * <p>
-         *     Optional. {@link #GROUP_OWNER_BAND_AUTO} by default.
-         *
-         * @param band the operating band of the group.
-         *             This should be one of {@link #GROUP_OWNER_BAND_AUTO},
-         *             {@link #GROUP_OWNER_BAND_2GHZ}, {@link #GROUP_OWNER_BAND_5GHZ}.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder setGroupOperatingBand(@GroupOperatingBandType int band) {
-            switch (band) {
-                case GROUP_OWNER_BAND_AUTO:
-                case GROUP_OWNER_BAND_2GHZ:
-                case GROUP_OWNER_BAND_5GHZ:
-                    mGroupOperatingBand = band;
-                    break;
-                default:
-                    throw new IllegalArgumentException(
-                        "Invalid constant for the group operating band!");
-            }
-            return this;
-        }
-
-        /**
-         * Specify the frequency, in MHz, to use for creating the group or joining the group.
-         * <p>
-         * When creating a group as Group Owner using {@link WifiP2pManager#createGroup(
-         * WifiP2pManager.Channel, WifiP2pConfig, WifiP2pManager.ActionListener)},
-         * specifying a frequency only allows the system to pick the specified frequency.
-         * If the Group Owner cannot create a group at the specified frequency,
-         * the operation will fail.
-         * When not specifying a frequency, it allows the system to pick operating frequency
-         * from all supported bands.
-         * <p>
-         * When joining a group as Group Client using {@link WifiP2pManager#connect(
-         * WifiP2pManager.Channel, WifiP2pConfig, WifiP2pManager.ActionListener)},
-         * specifying a frequency only allows the system to scan the specified frequency.
-         * If the frequency is not supported or invalid, the operation will fail.
-         * When not specifying a frequency, it allows the system to scan all supported
-         * frequencies to find the desired group.
-         * <p>
-         *     {@link #setGroupOperatingBand(int)} and {@link #setGroupOperatingFrequency(int)} are
-         *     mutually exclusive. Setting operating band and frequency both is invalid.
-         * <p>
-         *     Optional. 0 by default.
-         *
-         * @param frequency the operating frequency of the group.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder setGroupOperatingFrequency(int frequency) {
-            if (frequency < 0) {
-                throw new IllegalArgumentException(
-                    "Invalid group operating frequency!");
-            }
-            mGroupOperatingFrequency = frequency;
-            return this;
-        }
-
-        /**
-         * Specify that the group configuration be persisted (i.e. saved).
-         * By default the group configuration will not be saved.
-         * <p>
-         *     Optional. false by default.
-         *
-         * @param persistent is this group persistent group.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public @NonNull Builder enablePersistentMode(boolean persistent) {
-            if (persistent) {
-                mNetId = WifiP2pGroup.NETWORK_ID_PERSISTENT;
-            } else {
-                mNetId = WifiP2pGroup.NETWORK_ID_TEMPORARY;
-            }
-            return this;
-        }
-
-        /**
-         * Build {@link WifiP2pConfig} given the current requests made on the builder.
-         * @return {@link WifiP2pConfig} constructed based on builder method calls.
-         */
-        public @NonNull WifiP2pConfig build() {
-            if (TextUtils.isEmpty(mNetworkName)) {
-                throw new IllegalStateException(
-                        "network name must be non-empty.");
-            }
-            if (TextUtils.isEmpty(mPassphrase)) {
-                throw new IllegalStateException(
-                        "passphrase must be non-empty.");
-            }
-
-            if (mGroupOperatingFrequency > 0 && mGroupOperatingBand > 0) {
-                throw new IllegalStateException(
-                        "Preferred frequency and band are mutually exclusive.");
-            }
-
-            WifiP2pConfig config = new WifiP2pConfig();
-            config.deviceAddress = mDeviceAddress.toString();
-            config.networkName = mNetworkName;
-            config.passphrase = mPassphrase;
-            config.groupOwnerBand = GROUP_OWNER_BAND_AUTO;
-            if (mGroupOperatingFrequency > 0) {
-                config.groupOwnerBand = mGroupOperatingFrequency;
-            } else if (mGroupOperatingBand > 0) {
-                config.groupOwnerBand = mGroupOperatingBand;
-            }
-            config.netId = mNetId;
-            return config;
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java b/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java
deleted file mode 100644
index 567637a..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pDevice.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.Log;
-
-import java.util.Objects;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A class representing a Wi-Fi p2p device
- *
- * Note that the operations are not thread safe
- * {@see WifiP2pManager}
- */
-public class WifiP2pDevice implements Parcelable {
-
-    private static final String TAG = "WifiP2pDevice";
-
-    /**
-     * The device name is a user friendly string to identify a Wi-Fi p2p device
-     */
-    public String deviceName = "";
-
-    /**
-     * The device MAC address uniquely identifies a Wi-Fi p2p device
-     */
-    public String deviceAddress = "";
-
-    /**
-     * Primary device type identifies the type of device. For example, an application
-     * could filter the devices discovered to only display printers if the purpose is to
-     * enable a printing action from the user. See the Wi-Fi Direct technical specification
-     * for the full list of standard device types supported.
-     */
-    public String primaryDeviceType;
-
-    /**
-     * Secondary device type is an optional attribute that can be provided by a device in
-     * addition to the primary device type.
-     */
-    public String secondaryDeviceType;
-
-
-    // These definitions match the ones in wpa_supplicant
-    /* WPS config methods supported */
-    private static final int WPS_CONFIG_DISPLAY         = 0x0008;
-    private static final int WPS_CONFIG_PUSHBUTTON      = 0x0080;
-    private static final int WPS_CONFIG_KEYPAD          = 0x0100;
-
-    /* Device Capability bitmap */
-    private static final int DEVICE_CAPAB_SERVICE_DISCOVERY         = 1;
-    @SuppressWarnings("unused")
-    private static final int DEVICE_CAPAB_CLIENT_DISCOVERABILITY    = 1<<1;
-    @SuppressWarnings("unused")
-    private static final int DEVICE_CAPAB_CONCURRENT_OPER           = 1<<2;
-    @SuppressWarnings("unused")
-    private static final int DEVICE_CAPAB_INFRA_MANAGED             = 1<<3;
-    @SuppressWarnings("unused")
-    private static final int DEVICE_CAPAB_DEVICE_LIMIT              = 1<<4;
-    private static final int DEVICE_CAPAB_INVITATION_PROCEDURE      = 1<<5;
-
-    /* Group Capability bitmap */
-    private static final int GROUP_CAPAB_GROUP_OWNER                = 1;
-    @SuppressWarnings("unused")
-    private static final int GROUP_CAPAB_PERSISTENT_GROUP           = 1<<1;
-    private static final int GROUP_CAPAB_GROUP_LIMIT                = 1<<2;
-    @SuppressWarnings("unused")
-    private static final int GROUP_CAPAB_INTRA_BSS_DIST             = 1<<3;
-    @SuppressWarnings("unused")
-    private static final int GROUP_CAPAB_CROSS_CONN                 = 1<<4;
-    @SuppressWarnings("unused")
-    private static final int GROUP_CAPAB_PERSISTENT_RECONN          = 1<<5;
-    @SuppressWarnings("unused")
-    private static final int GROUP_CAPAB_GROUP_FORMATION            = 1<<6;
-
-    /**
-     * WPS config methods supported
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int wpsConfigMethodsSupported;
-
-    /**
-     * Device capability
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int deviceCapability;
-
-    /**
-     * Group capability
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public int groupCapability;
-
-    public static final int CONNECTED   = 0;
-    public static final int INVITED     = 1;
-    public static final int FAILED      = 2;
-    public static final int AVAILABLE   = 3;
-    public static final int UNAVAILABLE = 4;
-
-    /** Device connection status */
-    public int status = UNAVAILABLE;
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public WifiP2pWfdInfo wfdInfo;
-
-    /** Detailed device string pattern with WFD info
-     * Example:
-     *  P2P-DEVICE-FOUND 00:18:6b:de:a3:6e p2p_dev_addr=00:18:6b:de:a3:6e
-     *  pri_dev_type=1-0050F204-1 name='DWD-300-DEA36E' config_methods=0x188
-     *  dev_capab=0x21 group_capab=0x9
-     */
-    private static final Pattern detailedDevicePattern = Pattern.compile(
-        "((?:[0-9a-f]{2}:){5}[0-9a-f]{2}) " +
-        "(\\d+ )?" +
-        "p2p_dev_addr=((?:[0-9a-f]{2}:){5}[0-9a-f]{2}) " +
-        "pri_dev_type=(\\d+-[0-9a-fA-F]+-\\d+) " +
-        "name='(.*)' " +
-        "config_methods=(0x[0-9a-fA-F]+) " +
-        "dev_capab=(0x[0-9a-fA-F]+) " +
-        "group_capab=(0x[0-9a-fA-F]+)" +
-        "( wfd_dev_info=0x([0-9a-fA-F]{12}))?"
-    );
-
-    /** 2 token device address pattern
-     * Example:
-     *  P2P-DEVICE-LOST p2p_dev_addr=fa:7b:7a:42:02:13
-     *  AP-STA-DISCONNECTED 42:fc:89:a8:96:09
-     */
-    private static final Pattern twoTokenPattern = Pattern.compile(
-        "(p2p_dev_addr=)?((?:[0-9a-f]{2}:){5}[0-9a-f]{2})"
-    );
-
-    /** 3 token device address pattern
-     * Example:
-     *  AP-STA-CONNECTED 42:fc:89:a8:96:09 p2p_dev_addr=fa:7b:7a:42:02:13
-     *  AP-STA-DISCONNECTED 42:fc:89:a8:96:09 p2p_dev_addr=fa:7b:7a:42:02:13
-     */
-    private static final Pattern threeTokenPattern = Pattern.compile(
-        "(?:[0-9a-f]{2}:){5}[0-9a-f]{2} p2p_dev_addr=((?:[0-9a-f]{2}:){5}[0-9a-f]{2})"
-    );
-
-
-    public WifiP2pDevice() {
-    }
-
-    /**
-     * @param string formats supported include
-     *  P2P-DEVICE-FOUND fa:7b:7a:42:02:13 p2p_dev_addr=fa:7b:7a:42:02:13
-     *  pri_dev_type=1-0050F204-1 name='p2p-TEST1' config_methods=0x188 dev_capab=0x27
-     *  group_capab=0x0 wfd_dev_info=000006015d022a0032
-     *
-     *  P2P-DEVICE-LOST p2p_dev_addr=fa:7b:7a:42:02:13
-     *
-     *  AP-STA-CONNECTED 42:fc:89:a8:96:09 [p2p_dev_addr=02:90:4c:a0:92:54]
-     *
-     *  AP-STA-DISCONNECTED 42:fc:89:a8:96:09 [p2p_dev_addr=02:90:4c:a0:92:54]
-     *
-     *  fa:7b:7a:42:02:13
-     *
-     *  Note: The events formats can be looked up in the wpa_supplicant code
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public WifiP2pDevice(String string) throws IllegalArgumentException {
-        String[] tokens = string.split("[ \n]");
-        Matcher match;
-
-        if (tokens.length < 1) {
-            throw new IllegalArgumentException("Malformed supplicant event");
-        }
-
-        switch (tokens.length) {
-            case 1:
-                /* Just a device address */
-                deviceAddress = string;
-                return;
-            case 2:
-                match = twoTokenPattern.matcher(string);
-                if (!match.find()) {
-                    throw new IllegalArgumentException("Malformed supplicant event");
-                }
-                deviceAddress = match.group(2);
-                return;
-            case 3:
-                match = threeTokenPattern.matcher(string);
-                if (!match.find()) {
-                    throw new IllegalArgumentException("Malformed supplicant event");
-                }
-                deviceAddress = match.group(1);
-                return;
-            default:
-                match = detailedDevicePattern.matcher(string);
-                if (!match.find()) {
-                    throw new IllegalArgumentException("Malformed supplicant event");
-                }
-
-                deviceAddress = match.group(3);
-                primaryDeviceType = match.group(4);
-                deviceName = match.group(5);
-                wpsConfigMethodsSupported = parseHex(match.group(6));
-                deviceCapability = parseHex(match.group(7));
-                groupCapability = parseHex(match.group(8));
-                if (match.group(9) != null) {
-                    String str = match.group(10);
-                    wfdInfo = new WifiP2pWfdInfo(parseHex(str.substring(0,4)),
-                            parseHex(str.substring(4,8)),
-                            parseHex(str.substring(8,12)));
-                }
-                break;
-        }
-
-        if (tokens[0].startsWith("P2P-DEVICE-FOUND")) {
-            status = AVAILABLE;
-        }
-    }
-
-    /** The Wifi Display information for this device, or null if unavailable. */
-    @Nullable
-    public WifiP2pWfdInfo getWfdInfo() {
-        return wfdInfo;
-    }
-
-    /** Returns true if WPS push button configuration is supported */
-    public boolean wpsPbcSupported() {
-        return (wpsConfigMethodsSupported & WPS_CONFIG_PUSHBUTTON) != 0;
-    }
-
-    /** Returns true if WPS keypad configuration is supported */
-    public boolean wpsKeypadSupported() {
-        return (wpsConfigMethodsSupported & WPS_CONFIG_KEYPAD) != 0;
-    }
-
-    /** Returns true if WPS display configuration is supported */
-    public boolean wpsDisplaySupported() {
-        return (wpsConfigMethodsSupported & WPS_CONFIG_DISPLAY) != 0;
-    }
-
-    /** Returns true if the device is capable of service discovery */
-    public boolean isServiceDiscoveryCapable() {
-        return (deviceCapability & DEVICE_CAPAB_SERVICE_DISCOVERY) != 0;
-    }
-
-    /** Returns true if the device is capable of invitation {@hide}*/
-    public boolean isInvitationCapable() {
-        return (deviceCapability & DEVICE_CAPAB_INVITATION_PROCEDURE) != 0;
-    }
-
-    /** Returns true if the device reaches the limit. {@hide}*/
-    public boolean isDeviceLimit() {
-        return (deviceCapability & DEVICE_CAPAB_DEVICE_LIMIT) != 0;
-    }
-
-    /** Returns true if the device is a group owner */
-    public boolean isGroupOwner() {
-        return (groupCapability & GROUP_CAPAB_GROUP_OWNER) != 0;
-    }
-
-    /** Returns true if the group reaches the limit. {@hide}*/
-    public boolean isGroupLimit() {
-        return (groupCapability & GROUP_CAPAB_GROUP_LIMIT) != 0;
-    }
-
-    /**
-     * Update this device's details using another {@link WifiP2pDevice} instance.
-     * This will throw an exception if the device address does not match.
-     *
-     * @param device another instance of {@link WifiP2pDevice} used to update this instance.
-     * @throws IllegalArgumentException if the device is null or the device address does not match
-     */
-    public void update(@NonNull WifiP2pDevice device) {
-        updateSupplicantDetails(device);
-        status = device.status;
-    }
-
-    /** Updates details obtained from supplicant @hide */
-    public void updateSupplicantDetails(WifiP2pDevice device) {
-        if (device == null) {
-            throw new IllegalArgumentException("device is null");
-        }
-        if (device.deviceAddress == null) {
-            throw new IllegalArgumentException("deviceAddress is null");
-        }
-        if (!deviceAddress.equals(device.deviceAddress)) {
-            throw new IllegalArgumentException("deviceAddress does not match");
-        }
-        deviceName = device.deviceName;
-        primaryDeviceType = device.primaryDeviceType;
-        secondaryDeviceType = device.secondaryDeviceType;
-        wpsConfigMethodsSupported = device.wpsConfigMethodsSupported;
-        deviceCapability = device.deviceCapability;
-        groupCapability = device.groupCapability;
-        wfdInfo = device.wfdInfo;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) return true;
-        if (!(obj instanceof WifiP2pDevice)) return false;
-
-        WifiP2pDevice other = (WifiP2pDevice) obj;
-        if (other == null || other.deviceAddress == null) {
-            return (deviceAddress == null);
-        }
-        return other.deviceAddress.equals(deviceAddress);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(deviceAddress);
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("Device: ").append(deviceName);
-        sbuf.append("\n deviceAddress: ").append(deviceAddress);
-        sbuf.append("\n primary type: ").append(primaryDeviceType);
-        sbuf.append("\n secondary type: ").append(secondaryDeviceType);
-        sbuf.append("\n wps: ").append(wpsConfigMethodsSupported);
-        sbuf.append("\n grpcapab: ").append(groupCapability);
-        sbuf.append("\n devcapab: ").append(deviceCapability);
-        sbuf.append("\n status: ").append(status);
-        sbuf.append("\n wfdInfo: ").append(wfdInfo);
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** copy constructor */
-    public WifiP2pDevice(WifiP2pDevice source) {
-        if (source != null) {
-            deviceName = source.deviceName;
-            deviceAddress = source.deviceAddress;
-            primaryDeviceType = source.primaryDeviceType;
-            secondaryDeviceType = source.secondaryDeviceType;
-            wpsConfigMethodsSupported = source.wpsConfigMethodsSupported;
-            deviceCapability = source.deviceCapability;
-            groupCapability = source.groupCapability;
-            status = source.status;
-            if (source.wfdInfo != null) {
-                wfdInfo = new WifiP2pWfdInfo(source.wfdInfo);
-            }
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(deviceName);
-        dest.writeString(deviceAddress);
-        dest.writeString(primaryDeviceType);
-        dest.writeString(secondaryDeviceType);
-        dest.writeInt(wpsConfigMethodsSupported);
-        dest.writeInt(deviceCapability);
-        dest.writeInt(groupCapability);
-        dest.writeInt(status);
-        if (wfdInfo != null) {
-            dest.writeInt(1);
-            wfdInfo.writeToParcel(dest, flags);
-        } else {
-            dest.writeInt(0);
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiP2pDevice> CREATOR =
-        new Creator<WifiP2pDevice>() {
-            @Override
-            public WifiP2pDevice createFromParcel(Parcel in) {
-                WifiP2pDevice device = new WifiP2pDevice();
-                device.deviceName = in.readString();
-                device.deviceAddress = in.readString();
-                device.primaryDeviceType = in.readString();
-                device.secondaryDeviceType = in.readString();
-                device.wpsConfigMethodsSupported = in.readInt();
-                device.deviceCapability = in.readInt();
-                device.groupCapability = in.readInt();
-                device.status = in.readInt();
-                if (in.readInt() == 1) {
-                    device.wfdInfo = WifiP2pWfdInfo.CREATOR.createFromParcel(in);
-                }
-                return device;
-            }
-
-            @Override
-            public WifiP2pDevice[] newArray(int size) {
-                return new WifiP2pDevice[size];
-            }
-        };
-
-    //supported formats: 0x1abc, 0X1abc, 1abc
-    private int parseHex(String hexString) {
-        int num = 0;
-        if (hexString.startsWith("0x") || hexString.startsWith("0X")) {
-            hexString = hexString.substring(2);
-        }
-
-        try {
-            num = Integer.parseInt(hexString, 16);
-        } catch(NumberFormatException e) {
-            Log.e(TAG, "Failed to parse hex string " + hexString);
-        }
-        return num;
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java b/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
deleted file mode 100644
index e7866e6..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pDeviceList.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-
-/**
- * A class representing a Wi-Fi P2p device list.
- *
- * Note that the operations are not thread safe.
- * {@see WifiP2pManager}
- */
-public class WifiP2pDeviceList implements Parcelable {
-
-    private final HashMap<String, WifiP2pDevice> mDevices = new HashMap<String, WifiP2pDevice>();
-
-    public WifiP2pDeviceList() {
-    }
-
-    /** copy constructor */
-    public WifiP2pDeviceList(WifiP2pDeviceList source) {
-        if (source != null) {
-            for (WifiP2pDevice d : source.getDeviceList()) {
-                mDevices.put(d.deviceAddress, new WifiP2pDevice(d));
-            }
-        }
-    }
-
-    /** @hide */
-    public WifiP2pDeviceList(ArrayList<WifiP2pDevice> devices) {
-        for (WifiP2pDevice device : devices) {
-            if (device.deviceAddress != null) {
-                mDevices.put(device.deviceAddress, new WifiP2pDevice(device));
-            }
-        }
-    }
-
-    private void validateDevice(WifiP2pDevice device) {
-        if (device == null) throw new IllegalArgumentException("Null device");
-        if (TextUtils.isEmpty(device.deviceAddress)) {
-            throw new IllegalArgumentException("Empty deviceAddress");
-        }
-    }
-
-    private void validateDeviceAddress(String deviceAddress) {
-        if (TextUtils.isEmpty(deviceAddress)) {
-            throw new IllegalArgumentException("Empty deviceAddress");
-        }
-    }
-
-    /** Clear the list @hide */
-    public boolean clear() {
-        if (mDevices.isEmpty()) return false;
-        mDevices.clear();
-        return true;
-    }
-
-    /**
-     * Add/update a device to the list. If the device is not found, a new device entry
-     * is created. If the device is already found, the device details are updated
-     * @param device to be updated
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public void update(WifiP2pDevice device) {
-        updateSupplicantDetails(device);
-        mDevices.get(device.deviceAddress).status = device.status;
-    }
-
-    /** Only updates details fetched from the supplicant @hide */
-    public void updateSupplicantDetails(WifiP2pDevice device) {
-        validateDevice(device);
-        WifiP2pDevice d = mDevices.get(device.deviceAddress);
-        if (d != null) {
-            d.deviceName = device.deviceName;
-            d.primaryDeviceType = device.primaryDeviceType;
-            d.secondaryDeviceType = device.secondaryDeviceType;
-            d.wpsConfigMethodsSupported = device.wpsConfigMethodsSupported;
-            d.deviceCapability = device.deviceCapability;
-            d.groupCapability = device.groupCapability;
-            d.wfdInfo = device.wfdInfo;
-            return;
-        }
-        //Not found, add a new one
-        mDevices.put(device.deviceAddress, device);
-    }
-
-    /** @hide */
-    public void updateGroupCapability(String deviceAddress, int groupCapab) {
-        validateDeviceAddress(deviceAddress);
-        WifiP2pDevice d = mDevices.get(deviceAddress);
-        if (d != null) {
-            d.groupCapability = groupCapab;
-        }
-    }
-
-    /** @hide */
-    public void updateStatus(String deviceAddress, int status) {
-        validateDeviceAddress(deviceAddress);
-        WifiP2pDevice d = mDevices.get(deviceAddress);
-        if (d != null) {
-            d.status = status;
-        }
-    }
-
-    /**
-     * Fetch a device from the list
-     * @param deviceAddress is the address of the device
-     * @return WifiP2pDevice device found, or null if none found
-     */
-    public WifiP2pDevice get(String deviceAddress) {
-        validateDeviceAddress(deviceAddress);
-        return mDevices.get(deviceAddress);
-    }
-
-    /** @hide */
-    public boolean remove(WifiP2pDevice device) {
-        validateDevice(device);
-        return mDevices.remove(device.deviceAddress) != null;
-    }
-
-    /**
-     * Remove a device from the list
-     * @param deviceAddress is the address of the device
-     * @return WifiP2pDevice device removed, or null if none removed
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public WifiP2pDevice remove(String deviceAddress) {
-        validateDeviceAddress(deviceAddress);
-        return mDevices.remove(deviceAddress);
-    }
-
-    /** Returns true if any device the list was removed @hide */
-    public boolean remove(WifiP2pDeviceList list) {
-        boolean ret = false;
-        for (WifiP2pDevice d : list.mDevices.values()) {
-            if (remove(d)) ret = true;
-        }
-        return ret;
-    }
-
-    /** Get the list of devices */
-    public Collection<WifiP2pDevice> getDeviceList() {
-        return Collections.unmodifiableCollection(mDevices.values());
-    }
-
-    /** @hide */
-    public boolean isGroupOwner(String deviceAddress) {
-        validateDeviceAddress(deviceAddress);
-        WifiP2pDevice device = mDevices.get(deviceAddress);
-        if (device == null) {
-            throw new IllegalArgumentException("Device not found " + deviceAddress);
-        }
-        return device.isGroupOwner();
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        for (WifiP2pDevice device : mDevices.values()) {
-            sbuf.append("\n").append(device);
-        }
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mDevices.size());
-        for(WifiP2pDevice device : mDevices.values()) {
-            dest.writeParcelable(device, flags);
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiP2pDeviceList> CREATOR =
-        new Creator<WifiP2pDeviceList>() {
-            public WifiP2pDeviceList createFromParcel(Parcel in) {
-                WifiP2pDeviceList deviceList = new WifiP2pDeviceList();
-
-                int deviceCount = in.readInt();
-                for (int i = 0; i < deviceCount; i++) {
-                    deviceList.update((WifiP2pDevice)in.readParcelable(null));
-                }
-                return deviceList;
-            }
-
-            public WifiP2pDeviceList[] newArray(int size) {
-                return new WifiP2pDeviceList[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
deleted file mode 100644
index e497b22..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pGroup.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.annotation.Nullable;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A class representing a Wi-Fi P2p group. A p2p group consists of a single group
- * owner and one or more clients. In the case of a group with only two devices, one
- * will be the group owner and the other will be a group client.
- *
- * {@see WifiP2pManager}
- */
-public class WifiP2pGroup implements Parcelable {
-
-    /**
-     * The temporary network id.
-     * @see #getNetworkId()
-     */
-    public static final int NETWORK_ID_TEMPORARY = -1;
-
-    /**
-     * The temporary network id.
-     *
-     * @hide
-     */
-    @UnsupportedAppUsage
-    public static final int TEMPORARY_NET_ID = NETWORK_ID_TEMPORARY;
-
-    /**
-     * The persistent network id.
-     * If a matching persistent profile is found, use it.
-     * Otherwise, create a new persistent profile.
-     * @see #getNetworkId()
-     */
-    public static final int NETWORK_ID_PERSISTENT = -2;
-
-    /** The network name */
-    private String mNetworkName;
-
-    /** Group owner */
-    private WifiP2pDevice mOwner;
-
-    /** Device is group owner */
-    private boolean mIsGroupOwner;
-
-    /** Group clients */
-    private List<WifiP2pDevice> mClients = new ArrayList<WifiP2pDevice>();
-
-    /** The passphrase used for WPA2-PSK */
-    private String mPassphrase;
-
-    private String mInterface;
-
-    /** The network ID in wpa_supplicant */
-    private int mNetId;
-
-    /** The frequency (in MHz) used by this group */
-    private int mFrequency;
-
-    /** P2P group started string pattern */
-    private static final Pattern groupStartedPattern = Pattern.compile(
-        "ssid=\"(.+)\" " +
-        "freq=(\\d+) " +
-        "(?:psk=)?([0-9a-fA-F]{64})?" +
-        "(?:passphrase=)?(?:\"(.{0,63})\")? " +
-        "go_dev_addr=((?:[0-9a-f]{2}:){5}[0-9a-f]{2})" +
-        " ?(\\[PERSISTENT\\])?"
-    );
-
-    public WifiP2pGroup() {
-    }
-
-    /**
-     * @param supplicantEvent formats supported include
-     *
-     *  P2P-GROUP-STARTED p2p-wlan0-0 [client|GO] ssid="DIRECT-W8" freq=2437
-     *  [psk=2182b2e50e53f260d04f3c7b25ef33c965a3291b9b36b455a82d77fd82ca15bc|
-     *  passphrase="fKG4jMe3"] go_dev_addr=fa:7b:7a:42:02:13 [PERSISTENT]
-     *
-     *  P2P-GROUP-REMOVED p2p-wlan0-0 [client|GO] reason=REQUESTED
-     *
-     *  P2P-INVITATION-RECEIVED sa=fa:7b:7a:42:02:13 go_dev_addr=f8:7b:7a:42:02:13
-     *  bssid=fa:7b:7a:42:82:13 unknown-network
-     *
-     *  P2P-INVITATION-RECEIVED sa=b8:f9:34:2a:c7:9d persistent=0
-     *
-     *  Note: The events formats can be looked up in the wpa_supplicant code
-     *  @hide
-     */
-    @UnsupportedAppUsage
-    public WifiP2pGroup(String supplicantEvent) throws IllegalArgumentException {
-
-        String[] tokens = supplicantEvent.split(" ");
-
-        if (tokens.length < 3) {
-            throw new IllegalArgumentException("Malformed supplicant event");
-        }
-
-        if (tokens[0].startsWith("P2P-GROUP")) {
-            mInterface = tokens[1];
-            mIsGroupOwner = tokens[2].equals("GO");
-
-            Matcher match = groupStartedPattern.matcher(supplicantEvent);
-            if (!match.find()) {
-                return;
-            }
-
-            mNetworkName = match.group(1);
-            // It throws NumberFormatException if the string cannot be parsed as an integer.
-            mFrequency = Integer.parseInt(match.group(2));
-            // psk is unused right now
-            //String psk = match.group(3);
-            mPassphrase = match.group(4);
-            mOwner = new WifiP2pDevice(match.group(5));
-            if (match.group(6) != null) {
-                mNetId = NETWORK_ID_PERSISTENT;
-            } else {
-                mNetId = NETWORK_ID_TEMPORARY;
-            }
-        } else if (tokens[0].equals("P2P-INVITATION-RECEIVED")) {
-            String sa = null;
-            mNetId = NETWORK_ID_PERSISTENT;
-            for (String token : tokens) {
-                String[] nameValue = token.split("=");
-                if (nameValue.length != 2) continue;
-
-                if (nameValue[0].equals("sa")) {
-                    sa = nameValue[1];
-
-                    // set source address into the client list.
-                    WifiP2pDevice dev = new WifiP2pDevice();
-                    dev.deviceAddress = nameValue[1];
-                    mClients.add(dev);
-                    continue;
-                }
-
-                if (nameValue[0].equals("go_dev_addr")) {
-                    mOwner = new WifiP2pDevice(nameValue[1]);
-                    continue;
-                }
-
-                if (nameValue[0].equals("persistent")) {
-                    mNetId = Integer.parseInt(nameValue[1]);
-                    continue;
-                }
-            }
-        } else {
-            throw new IllegalArgumentException("Malformed supplicant event");
-        }
-    }
-
-    /** @hide */
-    public void setNetworkName(String networkName) {
-        mNetworkName = networkName;
-    }
-
-    /**
-     * Get the network name (SSID) of the group. Legacy Wi-Fi clients will discover
-     * the p2p group using the network name.
-     */
-    public String getNetworkName() {
-        return mNetworkName;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setIsGroupOwner(boolean isGo) {
-        mIsGroupOwner = isGo;
-    }
-
-    /** Check whether this device is the group owner of the created p2p group */
-    public boolean isGroupOwner() {
-        return mIsGroupOwner;
-    }
-
-    /** @hide */
-    public void setOwner(WifiP2pDevice device) {
-        mOwner = device;
-    }
-
-    /** Get the details of the group owner as a {@link WifiP2pDevice} object */
-    public WifiP2pDevice getOwner() {
-        return mOwner;
-    }
-
-    /** @hide */
-    public void addClient(String address) {
-        addClient(new WifiP2pDevice(address));
-    }
-
-    /** @hide */
-    public void addClient(WifiP2pDevice device) {
-        for (WifiP2pDevice client : mClients) {
-            if (client.equals(device)) return;
-        }
-        mClients.add(device);
-    }
-
-    /** @hide */
-    public boolean removeClient(String address) {
-        return mClients.remove(new WifiP2pDevice(address));
-    }
-
-    /** @hide */
-    public boolean removeClient(WifiP2pDevice device) {
-        return mClients.remove(device);
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public boolean isClientListEmpty() {
-        return mClients.size() == 0;
-    }
-
-    /**
-     * Returns {@code true} if the device is part of the group, {@code false} otherwise.
-     *
-     * @hide
-     */
-    public boolean contains(@Nullable WifiP2pDevice device) {
-        return mOwner.equals(device) || mClients.contains(device);
-    }
-
-    /** Get the list of clients currently part of the p2p group */
-    public Collection<WifiP2pDevice> getClientList() {
-        return Collections.unmodifiableCollection(mClients);
-    }
-
-    /** @hide */
-    public void setPassphrase(String passphrase) {
-        mPassphrase = passphrase;
-    }
-
-    /**
-     * Get the passphrase of the group. This function will return a valid passphrase only
-     * at the group owner. Legacy Wi-Fi clients will need this passphrase alongside
-     * network name obtained from {@link #getNetworkName()} to join the group
-     */
-    public String getPassphrase() {
-        return mPassphrase;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setInterface(String intf) {
-        mInterface = intf;
-    }
-
-    /** Get the interface name on which the group is created */
-    public String getInterface() {
-        return mInterface;
-    }
-
-    /** The network ID of the P2P group in wpa_supplicant. */
-    public int getNetworkId() {
-        return mNetId;
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public void setNetworkId(int netId) {
-        this.mNetId = netId;
-    }
-
-    /** Get the operating frequency (in MHz) of the p2p group */
-    public int getFrequency() {
-        return mFrequency;
-    }
-
-    /** @hide */
-    public void setFrequency(int freq) {
-        this.mFrequency = freq;
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("network: ").append(mNetworkName);
-        sbuf.append("\n isGO: ").append(mIsGroupOwner);
-        sbuf.append("\n GO: ").append(mOwner);
-        for (WifiP2pDevice client : mClients) {
-            sbuf.append("\n Client: ").append(client);
-        }
-        sbuf.append("\n interface: ").append(mInterface);
-        sbuf.append("\n networkId: ").append(mNetId);
-        sbuf.append("\n frequency: ").append(mFrequency);
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** copy constructor */
-    public WifiP2pGroup(WifiP2pGroup source) {
-        if (source != null) {
-            mNetworkName = source.getNetworkName();
-            mOwner = new WifiP2pDevice(source.getOwner());
-            mIsGroupOwner = source.mIsGroupOwner;
-            for (WifiP2pDevice d : source.getClientList()) mClients.add(d);
-            mPassphrase = source.getPassphrase();
-            mInterface = source.getInterface();
-            mNetId = source.getNetworkId();
-            mFrequency = source.getFrequency();
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(mNetworkName);
-        dest.writeParcelable(mOwner, flags);
-        dest.writeByte(mIsGroupOwner ? (byte) 1: (byte) 0);
-        dest.writeInt(mClients.size());
-        for (WifiP2pDevice client : mClients) {
-            dest.writeParcelable(client, flags);
-        }
-        dest.writeString(mPassphrase);
-        dest.writeString(mInterface);
-        dest.writeInt(mNetId);
-        dest.writeInt(mFrequency);
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiP2pGroup> CREATOR =
-        new Creator<WifiP2pGroup>() {
-            public WifiP2pGroup createFromParcel(Parcel in) {
-                WifiP2pGroup group = new WifiP2pGroup();
-                group.setNetworkName(in.readString());
-                group.setOwner((WifiP2pDevice)in.readParcelable(null));
-                group.setIsGroupOwner(in.readByte() == (byte)1);
-                int clientCount = in.readInt();
-                for (int i=0; i<clientCount; i++) {
-                    group.addClient((WifiP2pDevice) in.readParcelable(null));
-                }
-                group.setPassphrase(in.readString());
-                group.setInterface(in.readString());
-                group.setNetworkId(in.readInt());
-                group.setFrequency(in.readInt());
-                return group;
-            }
-
-            public WifiP2pGroup[] newArray(int size) {
-                return new WifiP2pGroup[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java b/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java
deleted file mode 100644
index 8a86311..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pGroupList.java
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.net.wifi.p2p;
-
-import android.annotation.NonNull;
-import android.annotation.SystemApi;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.LruCache;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-
-/**
- * A class representing a Wi-Fi P2p group list
- *
- * {@see WifiP2pManager}
- * @hide
- */
-@SystemApi
-public final class WifiP2pGroupList implements Parcelable {
-
-    private static final int CREDENTIAL_MAX_NUM             =   32;
-
-    @UnsupportedAppUsage
-    private final LruCache<Integer, WifiP2pGroup> mGroups;
-    private final GroupDeleteListener mListener;
-
-    private boolean isClearCalled = false;
-
-    /** @hide */
-    public interface GroupDeleteListener {
-        public void onDeleteGroup(int netId);
-    }
-
-    /** @hide */
-    public WifiP2pGroupList() {
-        this(null, null);
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public WifiP2pGroupList(WifiP2pGroupList source, GroupDeleteListener listener) {
-        mListener = listener;
-        mGroups = new LruCache<Integer, WifiP2pGroup>(CREDENTIAL_MAX_NUM) {
-            @Override
-            protected void entryRemoved(boolean evicted, Integer netId,
-                    WifiP2pGroup oldValue, WifiP2pGroup newValue) {
-                if (mListener != null && !isClearCalled) {
-                    mListener.onDeleteGroup(oldValue.getNetworkId());
-                }
-            }
-        };
-
-        if (source != null) {
-            for (Map.Entry<Integer, WifiP2pGroup> item : source.mGroups.snapshot().entrySet()) {
-                mGroups.put(item.getKey(), item.getValue());
-            }
-        }
-    }
-
-    /**
-     * Get the list of P2P groups.
-     */
-    @NonNull
-    public List<WifiP2pGroup> getGroupList() {
-        return new ArrayList<>(mGroups.snapshot().values());
-    }
-
-    /**
-     * Add the specified group to this group list.
-     *
-     * @param group
-     * @hide
-     */
-    public void add(WifiP2pGroup group) {
-        mGroups.put(group.getNetworkId(), group);
-    }
-
-    /**
-     * Remove the group with the specified network id from this group list.
-     *
-     * @param netId
-     * @hide
-     */
-    public void remove(int netId) {
-        mGroups.remove(netId);
-    }
-
-    /**
-     * Remove the group with the specified device address from this group list.
-     *
-     * @param deviceAddress
-     */
-    void remove(String deviceAddress) {
-        remove(getNetworkId(deviceAddress));
-    }
-
-    /**
-     * Clear the group.
-     * @hide
-     */
-    public boolean clear() {
-        if (mGroups.size() == 0) return false;
-        isClearCalled = true;
-        mGroups.evictAll();
-        isClearCalled = false;
-        return true;
-    }
-
-    /**
-     * Return the network id of the group owner profile with the specified p2p device
-     * address.
-     * If more than one persistent group of the same address is present in the list,
-     * return the first one.
-     *
-     * @param deviceAddress p2p device address.
-     * @return the network id. if not found, return -1.
-     * @hide
-     */
-    public int getNetworkId(String deviceAddress) {
-        if (deviceAddress == null) return -1;
-
-        final Collection<WifiP2pGroup> groups = mGroups.snapshot().values();
-        for (WifiP2pGroup grp: groups) {
-            if (deviceAddress.equalsIgnoreCase(grp.getOwner().deviceAddress)) {
-                // update cache ordered.
-                mGroups.get(grp.getNetworkId());
-                return grp.getNetworkId();
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * Return the network id of the group with the specified p2p device address
-     * and the ssid.
-     *
-     * @param deviceAddress p2p device address.
-     * @param ssid ssid.
-     * @return the network id. if not found, return -1.
-     * @hide
-     */
-    public int getNetworkId(String deviceAddress, String ssid) {
-        if (deviceAddress == null || ssid == null) {
-            return -1;
-        }
-
-        final Collection<WifiP2pGroup> groups = mGroups.snapshot().values();
-        for (WifiP2pGroup grp: groups) {
-            if (deviceAddress.equalsIgnoreCase(grp.getOwner().deviceAddress) &&
-                    ssid.equals(grp.getNetworkName())) {
-                // update cache ordered.
-                mGroups.get(grp.getNetworkId());
-                return grp.getNetworkId();
-            }
-        }
-
-        return -1;
-    }
-
-    /**
-     * Return the group owner address of the group with the specified network id
-     *
-     * @param netId network id.
-     * @return the address. if not found, return null.
-     * @hide
-     */
-    public String getOwnerAddr(int netId) {
-        WifiP2pGroup grp = mGroups.get(netId);
-        if (grp != null) {
-            return grp.getOwner().deviceAddress;
-        }
-        return null;
-    }
-
-    /**
-     * Return true if this group list contains the specified network id.
-     * This function does NOT update LRU information.
-     * It means the internal queue is NOT reordered.
-     *
-     * @param netId network id.
-     * @return true if the specified network id is present in this group list.
-     * @hide
-     */
-    public boolean contains(int netId) {
-        final Collection<WifiP2pGroup> groups = mGroups.snapshot().values();
-        for (WifiP2pGroup grp: groups) {
-            if (netId == grp.getNetworkId()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-
-        final Collection<WifiP2pGroup> groups = mGroups.snapshot().values();
-        for (WifiP2pGroup grp: groups) {
-            sbuf.append(grp).append("\n");
-        }
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        final Collection<WifiP2pGroup> groups = mGroups.snapshot().values();
-        dest.writeInt(groups.size());
-        for(WifiP2pGroup group : groups) {
-            dest.writeParcelable(group, flags);
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @NonNull Creator<WifiP2pGroupList> CREATOR =
-        new Creator<WifiP2pGroupList>() {
-            public WifiP2pGroupList createFromParcel(Parcel in) {
-                WifiP2pGroupList grpList = new WifiP2pGroupList();
-
-                int deviceCount = in.readInt();
-                for (int i = 0; i < deviceCount; i++) {
-                    grpList.add((WifiP2pGroup)in.readParcelable(null));
-                }
-                return grpList;
-            }
-
-            public WifiP2pGroupList[] newArray(int size) {
-                return new WifiP2pGroupList[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pInfo.java b/wifi/java/android/net/wifi/p2p/WifiP2pInfo.java
deleted file mode 100644
index 33bc37e..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pInfo.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.os.Parcelable;
-import android.os.Parcel;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * A class representing connection information about a Wi-Fi p2p group
- *
- * {@see WifiP2pManager}
- */
-public class WifiP2pInfo implements Parcelable {
-
-    /** Indicates if a p2p group has been successfully formed */
-    public boolean groupFormed;
-
-    /** Indicates if the current device is the group owner */
-    public boolean isGroupOwner;
-
-    /** Group owner address */
-    public InetAddress groupOwnerAddress;
-
-    public WifiP2pInfo() {
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("groupFormed: ").append(groupFormed)
-            .append(" isGroupOwner: ").append(isGroupOwner)
-            .append(" groupOwnerAddress: ").append(groupOwnerAddress);
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** copy constructor */
-    public WifiP2pInfo(WifiP2pInfo source) {
-        if (source != null) {
-            groupFormed = source.groupFormed;
-            isGroupOwner = source.isGroupOwner;
-            groupOwnerAddress = source.groupOwnerAddress;
-       }
-    }
-
-    /** Implement the Parcelable interface */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeByte(groupFormed ? (byte)1 : (byte)0);
-        dest.writeByte(isGroupOwner ? (byte)1 : (byte)0);
-
-        if (groupOwnerAddress != null) {
-            dest.writeByte((byte)1);
-            dest.writeByteArray(groupOwnerAddress.getAddress());
-        } else {
-            dest.writeByte((byte)0);
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @android.annotation.NonNull Creator<WifiP2pInfo> CREATOR =
-        new Creator<WifiP2pInfo>() {
-            public WifiP2pInfo createFromParcel(Parcel in) {
-                WifiP2pInfo info = new WifiP2pInfo();
-                info.groupFormed = (in.readByte() == 1);
-                info.isGroupOwner = (in.readByte() == 1);
-                if (in.readByte() == 1) {
-                    try {
-                        info.groupOwnerAddress = InetAddress.getByAddress(in.createByteArray());
-                    } catch (UnknownHostException e) {}
-                }
-                return info;
-            }
-
-            public WifiP2pInfo[] newArray(int size) {
-                return new WifiP2pInfo[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java b/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
deleted file mode 100644
index 5a27087..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pManager.java
+++ /dev/null
@@ -1,2034 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SdkConstant;
-import android.annotation.SdkConstant.SdkConstantType;
-import android.annotation.SystemApi;
-import android.annotation.SystemService;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.content.Context;
-import android.net.NetworkInfo;
-import android.net.wifi.WpsInfo;
-import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo;
-import android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceResponse;
-import android.net.wifi.p2p.nsd.WifiP2pServiceInfo;
-import android.net.wifi.p2p.nsd.WifiP2pServiceRequest;
-import android.net.wifi.p2p.nsd.WifiP2pServiceResponse;
-import android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo;
-import android.net.wifi.p2p.nsd.WifiP2pUpnpServiceResponse;
-import android.os.Binder;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.RemoteException;
-import android.text.TextUtils;
-import android.util.CloseGuard;
-import android.util.Log;
-
-import com.android.internal.util.AsyncChannel;
-import com.android.internal.util.Protocol;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.ref.Reference;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * This class provides the API for managing Wi-Fi peer-to-peer connectivity. This lets an
- * application discover available peers, setup connection to peers and query for the list of peers.
- * When a p2p connection is formed over wifi, the device continues to maintain the uplink
- * connection over mobile or any other available network for internet connectivity on the device.
- *
- * <p> The API is asynchronous and responses to requests from an application are on listener
- * callbacks provided by the application. The application needs to do an initialization with
- * {@link #initialize} before doing any p2p operation.
- *
- * <p> Most application calls need a {@link ActionListener} instance for receiving callbacks
- * {@link ActionListener#onSuccess} or {@link ActionListener#onFailure}. Action callbacks
- * indicate whether the initiation of the action was a success or a failure.
- * Upon failure, the reason of failure can be one of {@link #ERROR}, {@link #P2P_UNSUPPORTED}
- * or {@link #BUSY}.
- *
- * <p> An application can initiate discovery of peers with {@link #discoverPeers}. An initiated
- * discovery request from an application stays active until the device starts connecting to a peer
- * ,forms a p2p group or there is an explicit {@link #stopPeerDiscovery}.
- * Applications can listen to {@link #WIFI_P2P_DISCOVERY_CHANGED_ACTION} to know if a peer-to-peer
- * discovery is running or stopped. Additionally, {@link #WIFI_P2P_PEERS_CHANGED_ACTION} indicates
- * if the peer list has changed.
- *
- * <p> When an application needs to fetch the current list of peers, it can request the list
- * of peers with {@link #requestPeers}. When the peer list is available
- * {@link PeerListListener#onPeersAvailable} is called with the device list.
- *
- * <p> An application can initiate a connection request to a peer through {@link #connect}. See
- * {@link WifiP2pConfig} for details on setting up the configuration. For communication with legacy
- * Wi-Fi devices that do not support p2p, an app can create a group using {@link #createGroup}
- * which creates an access point whose details can be fetched with {@link #requestGroupInfo}.
- *
- * <p> After a successful group formation through {@link #createGroup} or through {@link #connect},
- * use {@link #requestConnectionInfo} to fetch the connection details. The connection info
- * {@link WifiP2pInfo} contains the address of the group owner
- * {@link WifiP2pInfo#groupOwnerAddress} and a flag {@link WifiP2pInfo#isGroupOwner} to indicate
- * if the current device is a p2p group owner. A p2p client can thus communicate with
- * the p2p group owner through a socket connection. If the current device is the p2p group owner,
- * {@link WifiP2pInfo#groupOwnerAddress} is anonymized unless the caller holds the
- * {@code android.Manifest.permission#LOCAL_MAC_ADDRESS} permission.
- *
- * <p> With peer discovery using {@link  #discoverPeers}, an application discovers the neighboring
- * peers, but has no good way to figure out which peer to establish a connection with. For example,
- * if a game application is interested in finding all the neighboring peers that are also running
- * the same game, it has no way to find out until after the connection is setup. Pre-association
- * service discovery is meant to address this issue of filtering the peers based on the running
- * services.
- *
- * <p>With pre-association service discovery, an application can advertise a service for a
- * application on a peer device prior to a connection setup between the devices.
- * Currently, DNS based service discovery (Bonjour) and Upnp are the higher layer protocols
- * supported. Get Bonjour resources at dns-sd.org and Upnp resources at upnp.org
- * As an example, a video application can discover a Upnp capable media renderer
- * prior to setting up a Wi-fi p2p connection with the device.
- *
- * <p> An application can advertise a Upnp or a Bonjour service with a call to
- * {@link #addLocalService}. After a local service is added,
- * the framework automatically responds to a peer application discovering the service prior
- * to establishing a p2p connection. A call to {@link #removeLocalService} removes a local
- * service and {@link #clearLocalServices} can be used to clear all local services.
- *
- * <p> An application that is looking for peer devices that support certain services
- * can do so with a call to  {@link #discoverServices}. Prior to initiating the discovery,
- * application can add service discovery request with a call to {@link #addServiceRequest},
- * remove a service discovery request with a call to {@link #removeServiceRequest} or clear
- * all requests with a call to {@link #clearServiceRequests}. When no service requests remain,
- * a previously running service discovery will stop.
- *
- * The application is notified of a result of service discovery request through listener callbacks
- * set through {@link #setDnsSdResponseListeners} for Bonjour or
- * {@link #setUpnpServiceResponseListener} for Upnp.
- *
- * <p class="note"><strong>Note:</strong>
- * Registering an application handler with {@link #initialize} requires the permissions
- * {@link android.Manifest.permission#ACCESS_WIFI_STATE} and
- * {@link android.Manifest.permission#CHANGE_WIFI_STATE} to perform any further peer-to-peer
- * operations.
- *
- * {@see WifiP2pConfig}
- * {@see WifiP2pInfo}
- * {@see WifiP2pGroup}
- * {@see WifiP2pDevice}
- * {@see WifiP2pDeviceList}
- * {@see android.net.wifi.WpsInfo}
- */
-@SystemService(Context.WIFI_P2P_SERVICE)
-public class WifiP2pManager {
-    private static final String TAG = "WifiP2pManager";
-    /**
-     * Broadcast intent action to indicate whether Wi-Fi p2p is enabled or disabled. An
-     * extra {@link #EXTRA_WIFI_STATE} provides the state information as int.
-     *
-     * @see #EXTRA_WIFI_STATE
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_P2P_STATE_CHANGED_ACTION =
-        "android.net.wifi.p2p.STATE_CHANGED";
-
-    /**
-     * The lookup key for an int that indicates whether Wi-Fi p2p is enabled or disabled.
-     * Retrieve it with {@link android.content.Intent#getIntExtra(String,int)}.
-     *
-     * @see #WIFI_P2P_STATE_DISABLED
-     * @see #WIFI_P2P_STATE_ENABLED
-     */
-    public static final String EXTRA_WIFI_STATE = "wifi_p2p_state";
-
-    /** @hide */
-    @IntDef({
-            WIFI_P2P_STATE_DISABLED,
-            WIFI_P2P_STATE_ENABLED})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiP2pState {
-    }
-
-    /**
-     * Wi-Fi p2p is disabled.
-     *
-     * @see #WIFI_P2P_STATE_CHANGED_ACTION
-     */
-    public static final int WIFI_P2P_STATE_DISABLED = 1;
-
-    /**
-     * Wi-Fi p2p is enabled.
-     *
-     * @see #WIFI_P2P_STATE_CHANGED_ACTION
-     */
-    public static final int WIFI_P2P_STATE_ENABLED = 2;
-
-    /**
-     * Broadcast intent action indicating that the state of Wi-Fi p2p connectivity
-     * has changed. One extra {@link #EXTRA_WIFI_P2P_INFO} provides the p2p connection info in
-     * the form of a {@link WifiP2pInfo} object. Another extra {@link #EXTRA_NETWORK_INFO} provides
-     * the network info in the form of a {@link android.net.NetworkInfo}. A third extra provides
-     * the details of the group and may contain a {@code null}.
-     *
-     * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
-     *
-     * @see #EXTRA_WIFI_P2P_INFO
-     * @see #EXTRA_NETWORK_INFO
-     * @see #EXTRA_WIFI_P2P_GROUP
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_P2P_CONNECTION_CHANGED_ACTION =
-        "android.net.wifi.p2p.CONNECTION_STATE_CHANGE";
-
-    /**
-     * The lookup key for a {@link android.net.wifi.p2p.WifiP2pInfo} object
-     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
-     */
-    public static final String EXTRA_WIFI_P2P_INFO = "wifiP2pInfo";
-
-    /**
-     * The lookup key for a {@link android.net.NetworkInfo} object associated with the
-     * p2p network. Retrieve with
-     * {@link android.content.Intent#getParcelableExtra(String)}.
-     */
-    public static final String EXTRA_NETWORK_INFO = "networkInfo";
-
-    /**
-     * The lookup key for a {@link android.net.wifi.p2p.WifiP2pGroup} object
-     * associated with the p2p network. Retrieve with
-     * {@link android.content.Intent#getParcelableExtra(String)}.
-     */
-    public static final String EXTRA_WIFI_P2P_GROUP = "p2pGroupInfo";
-
-    /**
-     * Broadcast intent action indicating that the available peer list has changed. This
-     * can be sent as a result of peers being found, lost or updated.
-     *
-     * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
-     *
-     * <p> An extra {@link #EXTRA_P2P_DEVICE_LIST} provides the full list of
-     * current peers. The full list of peers can also be obtained any time with
-     * {@link #requestPeers}.
-     *
-     * @see #EXTRA_P2P_DEVICE_LIST
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_P2P_PEERS_CHANGED_ACTION =
-        "android.net.wifi.p2p.PEERS_CHANGED";
-
-     /**
-      * The lookup key for a {@link android.net.wifi.p2p.WifiP2pDeviceList} object representing
-      * the new peer list when {@link #WIFI_P2P_PEERS_CHANGED_ACTION} broadcast is sent.
-      *
-      * <p>Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
-      */
-    public static final String EXTRA_P2P_DEVICE_LIST = "wifiP2pDeviceList";
-
-    /**
-     * Broadcast intent action indicating that peer discovery has either started or stopped.
-     * One extra {@link #EXTRA_DISCOVERY_STATE} indicates whether discovery has started
-     * or stopped.
-     *
-     * <p>Note that discovery will be stopped during a connection setup. If the application tries
-     * to re-initiate discovery during this time, it can fail.
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_P2P_DISCOVERY_CHANGED_ACTION =
-        "android.net.wifi.p2p.DISCOVERY_STATE_CHANGE";
-
-    /**
-     * The lookup key for an int that indicates whether p2p discovery has started or stopped.
-     * Retrieve it with {@link android.content.Intent#getIntExtra(String,int)}.
-     *
-     * @see #WIFI_P2P_DISCOVERY_STARTED
-     * @see #WIFI_P2P_DISCOVERY_STOPPED
-     */
-    public static final String EXTRA_DISCOVERY_STATE = "discoveryState";
-
-    /** @hide */
-    @IntDef({
-            WIFI_P2P_DISCOVERY_STOPPED,
-            WIFI_P2P_DISCOVERY_STARTED})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface WifiP2pDiscoveryState {
-    }
-
-    /**
-     * p2p discovery has stopped
-     *
-     * @see #WIFI_P2P_DISCOVERY_CHANGED_ACTION
-     */
-    public static final int WIFI_P2P_DISCOVERY_STOPPED = 1;
-
-    /**
-     * p2p discovery has started
-     *
-     * @see #WIFI_P2P_DISCOVERY_CHANGED_ACTION
-     */
-    public static final int WIFI_P2P_DISCOVERY_STARTED = 2;
-
-    /**
-     * Broadcast intent action indicating that this device details have changed.
-     *
-     * <p> An extra {@link #EXTRA_WIFI_P2P_DEVICE} provides this device details.
-     * The valid device details can also be obtained with
-     * {@link #requestDeviceInfo(Channel, DeviceInfoListener)} when p2p is enabled.
-     * To get information notifications on P2P getting enabled refers
-     * {@link #WIFI_P2P_STATE_ENABLED}.
-     *
-     * <p> The {@link #EXTRA_WIFI_P2P_DEVICE} extra contains an anonymized version of the device's
-     * MAC address. Callers holding the {@code android.Manifest.permission#LOCAL_MAC_ADDRESS}
-     * permission can use {@link #requestDeviceInfo} to obtain the actual MAC address of this
-     * device.
-     *
-     * All of these permissions are required to receive this broadcast:
-     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION} and
-     * {@link android.Manifest.permission#ACCESS_WIFI_STATE}
-     *
-     * @see #EXTRA_WIFI_P2P_DEVICE
-     */
-    @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String WIFI_P2P_THIS_DEVICE_CHANGED_ACTION =
-        "android.net.wifi.p2p.THIS_DEVICE_CHANGED";
-
-    /**
-     * The lookup key for a {@link android.net.wifi.p2p.WifiP2pDevice} object
-     * Retrieve with {@link android.content.Intent#getParcelableExtra(String)}.
-     */
-    public static final String EXTRA_WIFI_P2P_DEVICE = "wifiP2pDevice";
-
-    /**
-     * Broadcast intent action indicating that remembered persistent groups have changed.
-     *
-     * You can <em>not</em> receive this through components declared
-     * in manifests, only by explicitly registering for it with
-     * {@link android.content.Context#registerReceiver(android.content.BroadcastReceiver,
-     * android.content.IntentFilter) Context.registerReceiver()}.
-     *
-     * @hide
-     */
-    @SystemApi
-    public static final String ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED =
-            "android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED";
-
-    /**
-     * The lookup key for a handover message returned by the WifiP2pService.
-     * @hide
-     */
-    public static final String EXTRA_HANDOVER_MESSAGE =
-            "android.net.wifi.p2p.EXTRA_HANDOVER_MESSAGE";
-
-    /**
-     * The lookup key for a calling package name from WifiP2pManager
-     * @hide
-     */
-    public static final String CALLING_PACKAGE =
-            "android.net.wifi.p2p.CALLING_PACKAGE";
-
-    /**
-     * The lookup key for a calling feature id from WifiP2pManager
-     * @hide
-     */
-    public static final String CALLING_FEATURE_ID =
-            "android.net.wifi.p2p.CALLING_FEATURE_ID";
-
-    /**
-     * The lookup key for a calling package binder from WifiP2pManager
-     * @hide
-     */
-    public static final String CALLING_BINDER =
-            "android.net.wifi.p2p.CALLING_BINDER";
-
-    IWifiP2pManager mService;
-
-    private static final int BASE = Protocol.BASE_WIFI_P2P_MANAGER;
-
-    /** @hide */
-    public static final int DISCOVER_PEERS                          = BASE + 1;
-    /** @hide */
-    public static final int DISCOVER_PEERS_FAILED                   = BASE + 2;
-    /** @hide */
-    public static final int DISCOVER_PEERS_SUCCEEDED                = BASE + 3;
-
-    /** @hide */
-    public static final int STOP_DISCOVERY                          = BASE + 4;
-    /** @hide */
-    public static final int STOP_DISCOVERY_FAILED                   = BASE + 5;
-    /** @hide */
-    public static final int STOP_DISCOVERY_SUCCEEDED                = BASE + 6;
-
-    /** @hide */
-    public static final int CONNECT                                 = BASE + 7;
-    /** @hide */
-    public static final int CONNECT_FAILED                          = BASE + 8;
-    /** @hide */
-    public static final int CONNECT_SUCCEEDED                       = BASE + 9;
-
-    /** @hide */
-    public static final int CANCEL_CONNECT                          = BASE + 10;
-    /** @hide */
-    public static final int CANCEL_CONNECT_FAILED                   = BASE + 11;
-    /** @hide */
-    public static final int CANCEL_CONNECT_SUCCEEDED                = BASE + 12;
-
-    /** @hide */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public static final int CREATE_GROUP                            = BASE + 13;
-    /** @hide */
-    public static final int CREATE_GROUP_FAILED                     = BASE + 14;
-    /** @hide */
-    public static final int CREATE_GROUP_SUCCEEDED                  = BASE + 15;
-
-    /** @hide */
-    public static final int REMOVE_GROUP                            = BASE + 16;
-    /** @hide */
-    public static final int REMOVE_GROUP_FAILED                     = BASE + 17;
-    /** @hide */
-    public static final int REMOVE_GROUP_SUCCEEDED                  = BASE + 18;
-
-    /** @hide */
-    public static final int REQUEST_PEERS                           = BASE + 19;
-    /** @hide */
-    public static final int RESPONSE_PEERS                          = BASE + 20;
-
-    /** @hide */
-    public static final int REQUEST_CONNECTION_INFO                 = BASE + 21;
-    /** @hide */
-    public static final int RESPONSE_CONNECTION_INFO                = BASE + 22;
-
-    /** @hide */
-    public static final int REQUEST_GROUP_INFO                      = BASE + 23;
-    /** @hide */
-    public static final int RESPONSE_GROUP_INFO                     = BASE + 24;
-
-    /** @hide */
-    public static final int ADD_LOCAL_SERVICE                       = BASE + 28;
-    /** @hide */
-    public static final int ADD_LOCAL_SERVICE_FAILED                = BASE + 29;
-    /** @hide */
-    public static final int ADD_LOCAL_SERVICE_SUCCEEDED             = BASE + 30;
-
-    /** @hide */
-    public static final int REMOVE_LOCAL_SERVICE                    = BASE + 31;
-    /** @hide */
-    public static final int REMOVE_LOCAL_SERVICE_FAILED             = BASE + 32;
-    /** @hide */
-    public static final int REMOVE_LOCAL_SERVICE_SUCCEEDED          = BASE + 33;
-
-    /** @hide */
-    public static final int CLEAR_LOCAL_SERVICES                    = BASE + 34;
-    /** @hide */
-    public static final int CLEAR_LOCAL_SERVICES_FAILED             = BASE + 35;
-    /** @hide */
-    public static final int CLEAR_LOCAL_SERVICES_SUCCEEDED          = BASE + 36;
-
-    /** @hide */
-    public static final int ADD_SERVICE_REQUEST                     = BASE + 37;
-    /** @hide */
-    public static final int ADD_SERVICE_REQUEST_FAILED              = BASE + 38;
-    /** @hide */
-    public static final int ADD_SERVICE_REQUEST_SUCCEEDED           = BASE + 39;
-
-    /** @hide */
-    public static final int REMOVE_SERVICE_REQUEST                  = BASE + 40;
-    /** @hide */
-    public static final int REMOVE_SERVICE_REQUEST_FAILED           = BASE + 41;
-    /** @hide */
-    public static final int REMOVE_SERVICE_REQUEST_SUCCEEDED        = BASE + 42;
-
-    /** @hide */
-    public static final int CLEAR_SERVICE_REQUESTS                  = BASE + 43;
-    /** @hide */
-    public static final int CLEAR_SERVICE_REQUESTS_FAILED           = BASE + 44;
-    /** @hide */
-    public static final int CLEAR_SERVICE_REQUESTS_SUCCEEDED        = BASE + 45;
-
-    /** @hide */
-    public static final int DISCOVER_SERVICES                       = BASE + 46;
-    /** @hide */
-    public static final int DISCOVER_SERVICES_FAILED                = BASE + 47;
-    /** @hide */
-    public static final int DISCOVER_SERVICES_SUCCEEDED             = BASE + 48;
-
-    /** @hide */
-    public static final int PING                                    = BASE + 49;
-
-    /** @hide */
-    public static final int RESPONSE_SERVICE                        = BASE + 50;
-
-    /** @hide */
-    public static final int SET_DEVICE_NAME                         = BASE + 51;
-    /** @hide */
-    public static final int SET_DEVICE_NAME_FAILED                  = BASE + 52;
-    /** @hide */
-    public static final int SET_DEVICE_NAME_SUCCEEDED               = BASE + 53;
-
-    /** @hide */
-    public static final int DELETE_PERSISTENT_GROUP                 = BASE + 54;
-    /** @hide */
-    public static final int DELETE_PERSISTENT_GROUP_FAILED          = BASE + 55;
-    /** @hide */
-    public static final int DELETE_PERSISTENT_GROUP_SUCCEEDED       = BASE + 56;
-
-    /** @hide */
-    public static final int REQUEST_PERSISTENT_GROUP_INFO           = BASE + 57;
-    /** @hide */
-    public static final int RESPONSE_PERSISTENT_GROUP_INFO          = BASE + 58;
-
-    /** @hide */
-    public static final int SET_WFD_INFO                            = BASE + 59;
-    /** @hide */
-    public static final int SET_WFD_INFO_FAILED                     = BASE + 60;
-    /** @hide */
-    public static final int SET_WFD_INFO_SUCCEEDED                  = BASE + 61;
-
-    /** @hide */
-    public static final int START_WPS                               = BASE + 62;
-    /** @hide */
-    public static final int START_WPS_FAILED                        = BASE + 63;
-    /** @hide */
-    public static final int START_WPS_SUCCEEDED                     = BASE + 64;
-
-    /** @hide */
-    public static final int START_LISTEN                            = BASE + 65;
-    /** @hide */
-    public static final int START_LISTEN_FAILED                     = BASE + 66;
-    /** @hide */
-    public static final int START_LISTEN_SUCCEEDED                  = BASE + 67;
-
-    /** @hide */
-    public static final int STOP_LISTEN                             = BASE + 68;
-    /** @hide */
-    public static final int STOP_LISTEN_FAILED                      = BASE + 69;
-    /** @hide */
-    public static final int STOP_LISTEN_SUCCEEDED                   = BASE + 70;
-
-    /** @hide */
-    public static final int SET_CHANNEL                             = BASE + 71;
-    /** @hide */
-    public static final int SET_CHANNEL_FAILED                      = BASE + 72;
-    /** @hide */
-    public static final int SET_CHANNEL_SUCCEEDED                   = BASE + 73;
-
-    /** @hide */
-    public static final int GET_HANDOVER_REQUEST                    = BASE + 75;
-    /** @hide */
-    public static final int GET_HANDOVER_SELECT                     = BASE + 76;
-    /** @hide */
-    public static final int RESPONSE_GET_HANDOVER_MESSAGE           = BASE + 77;
-    /** @hide */
-    public static final int INITIATOR_REPORT_NFC_HANDOVER           = BASE + 78;
-    /** @hide */
-    public static final int RESPONDER_REPORT_NFC_HANDOVER           = BASE + 79;
-    /** @hide */
-    public static final int REPORT_NFC_HANDOVER_SUCCEEDED           = BASE + 80;
-    /** @hide */
-    public static final int REPORT_NFC_HANDOVER_FAILED              = BASE + 81;
-
-    /** @hide */
-    public static final int FACTORY_RESET                           = BASE + 82;
-    /** @hide */
-    public static final int FACTORY_RESET_FAILED                    = BASE + 83;
-    /** @hide */
-    public static final int FACTORY_RESET_SUCCEEDED                 = BASE + 84;
-
-    /** @hide */
-    public static final int REQUEST_ONGOING_PEER_CONFIG             = BASE + 85;
-    /** @hide */
-    public static final int RESPONSE_ONGOING_PEER_CONFIG            = BASE + 86;
-    /** @hide */
-    public static final int SET_ONGOING_PEER_CONFIG                 = BASE + 87;
-    /** @hide */
-    public static final int SET_ONGOING_PEER_CONFIG_FAILED          = BASE + 88;
-    /** @hide */
-    public static final int SET_ONGOING_PEER_CONFIG_SUCCEEDED       = BASE + 89;
-
-    /** @hide */
-    public static final int REQUEST_P2P_STATE                       = BASE + 90;
-    /** @hide */
-    public static final int RESPONSE_P2P_STATE                      = BASE + 91;
-
-    /** @hide */
-    public static final int REQUEST_DISCOVERY_STATE                 = BASE + 92;
-    /** @hide */
-    public static final int RESPONSE_DISCOVERY_STATE                = BASE + 93;
-
-    /** @hide */
-    public static final int REQUEST_NETWORK_INFO                    = BASE + 94;
-    /** @hide */
-    public static final int RESPONSE_NETWORK_INFO                   = BASE + 95;
-
-    /** @hide */
-    public static final int UPDATE_CHANNEL_INFO                     = BASE + 96;
-
-    /** @hide */
-    public static final int REQUEST_DEVICE_INFO                     = BASE + 97;
-    /** @hide */
-    public static final int RESPONSE_DEVICE_INFO                    = BASE + 98;
-
-    /**
-     * Create a new WifiP2pManager instance. Applications use
-     * {@link android.content.Context#getSystemService Context.getSystemService()} to retrieve
-     * the standard {@link android.content.Context#WIFI_P2P_SERVICE Context.WIFI_P2P_SERVICE}.
-     * @param service the Binder interface
-     * @hide - hide this because it takes in a parameter of type IWifiP2pManager, which
-     * is a system private class.
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    public WifiP2pManager(IWifiP2pManager service) {
-        mService = service;
-    }
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed due to an internal error.
-     */
-    public static final int ERROR               = 0;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed because p2p is unsupported on the device.
-     */
-    public static final int P2P_UNSUPPORTED     = 1;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the operation failed because the framework is busy and
-     * unable to service the request
-     */
-    public static final int BUSY                = 2;
-
-    /**
-     * Passed with {@link ActionListener#onFailure}.
-     * Indicates that the {@link #discoverServices} failed because no service
-     * requests are added. Use {@link #addServiceRequest} to add a service
-     * request.
-     */
-    public static final int NO_SERVICE_REQUESTS = 3;
-
-    /** Interface for callback invocation when framework channel is lost */
-    public interface ChannelListener {
-        /**
-         * The channel to the framework has been disconnected.
-         * Application could try re-initializing using {@link #initialize}
-         */
-        public void onChannelDisconnected();
-    }
-
-    /** Interface for callback invocation on an application action */
-    public interface ActionListener {
-        /** The operation succeeded */
-        public void onSuccess();
-        /**
-         * The operation failed
-         * @param reason The reason for failure could be one of {@link #P2P_UNSUPPORTED},
-         * {@link #ERROR} or {@link #BUSY}
-         */
-        public void onFailure(int reason);
-    }
-
-    /** Interface for callback invocation when peer list is available */
-    public interface PeerListListener {
-        /**
-         * The requested peer list is available
-         * @param peers List of available peers
-         */
-        public void onPeersAvailable(WifiP2pDeviceList peers);
-    }
-
-    /** Interface for callback invocation when connection info is available */
-    public interface ConnectionInfoListener {
-        /**
-         * The requested connection info is available
-         * @param info Wi-Fi p2p connection info
-         */
-        public void onConnectionInfoAvailable(WifiP2pInfo info);
-    }
-
-    /** Interface for callback invocation when group info is available */
-    public interface GroupInfoListener {
-        /**
-         * The requested p2p group info is available
-         * @param group Wi-Fi p2p group info
-         */
-        public void onGroupInfoAvailable(WifiP2pGroup group);
-    }
-
-   /**
-    * Interface for callback invocation when service discovery response other than
-    * Upnp or Bonjour is received
-    */
-    public interface ServiceResponseListener {
-
-        /**
-         * The requested service response is available.
-         *
-         * @param protocolType protocol type. currently only
-         * {@link WifiP2pServiceInfo#SERVICE_TYPE_VENDOR_SPECIFIC}.
-         * @param responseData service discovery response data based on the requested
-         *  service protocol type. The format depends on the service type.
-         * @param srcDevice source device.
-         */
-        public void onServiceAvailable(int protocolType,
-                byte[] responseData, WifiP2pDevice srcDevice);
-    }
-
-    /**
-     * Interface for callback invocation when Bonjour service discovery response
-     * is received
-     */
-    public interface DnsSdServiceResponseListener {
-
-        /**
-         * The requested Bonjour service response is available.
-         *
-         * <p>This function is invoked when the device with the specified Bonjour
-         * registration type returned the instance name.
-         * @param instanceName instance name.<br>
-         *  e.g) "MyPrinter".
-         * @param registrationType <br>
-         * e.g) "_ipp._tcp.local."
-         * @param srcDevice source device.
-         */
-        public void onDnsSdServiceAvailable(String instanceName,
-                String registrationType, WifiP2pDevice srcDevice);
-
-   }
-
-    /**
-     * Interface for callback invocation when Bonjour TXT record is available
-     * for a service
-     */
-   public interface DnsSdTxtRecordListener {
-        /**
-         * The requested Bonjour service response is available.
-         *
-         * <p>This function is invoked when the device with the specified full
-         * service domain service returned TXT record.
-         *
-         * @param fullDomainName full domain name. <br>
-         * e.g) "MyPrinter._ipp._tcp.local.".
-         * @param txtRecordMap TXT record data as a map of key/value pairs
-         * @param srcDevice source device.
-         */
-        public void onDnsSdTxtRecordAvailable(String fullDomainName,
-                Map<String, String> txtRecordMap,
-                WifiP2pDevice srcDevice);
-   }
-
-    /**
-     * Interface for callback invocation when upnp service discovery response
-     * is received
-     * */
-    public interface UpnpServiceResponseListener {
-
-        /**
-         * The requested upnp service response is available.
-         *
-         * <p>This function is invoked when the specified device or service is found.
-         *
-         * @param uniqueServiceNames The list of unique service names.<br>
-         * e.g) uuid:6859dede-8574-59ab-9332-123456789012::urn:schemas-upnp-org:device:
-         * MediaServer:1
-         * @param srcDevice source device.
-         */
-        public void onUpnpServiceAvailable(List<String> uniqueServiceNames,
-                WifiP2pDevice srcDevice);
-    }
-
-
-    /**
-     * Interface for callback invocation when stored group info list is available
-     *
-     * @hide
-     */
-    @SystemApi
-    public interface PersistentGroupInfoListener {
-        /**
-         * The requested stored p2p group info list is available
-         * @param groups Wi-Fi p2p group info list
-         */
-        void onPersistentGroupInfoAvailable(@NonNull WifiP2pGroupList groups);
-    }
-
-    /**
-     * Interface for callback invocation when Handover Request or Select Message is available
-     * @hide
-     */
-    public interface HandoverMessageListener {
-        public void onHandoverMessageAvailable(String handoverMessage);
-    }
-
-    /** Interface for callback invocation when p2p state is available
-     *  in response to {@link #requestP2pState}.
-     */
-    public interface P2pStateListener {
-        /**
-         * The requested p2p state is available.
-         * @param state Wi-Fi p2p state
-         *        @see #WIFI_P2P_STATE_DISABLED
-         *        @see #WIFI_P2P_STATE_ENABLED
-         */
-        void onP2pStateAvailable(@WifiP2pState int state);
-    }
-
-    /** Interface for callback invocation when p2p state is available
-     *  in response to {@link #requestDiscoveryState}.
-     */
-    public interface DiscoveryStateListener {
-        /**
-         * The requested p2p discovery state is available.
-         * @param state Wi-Fi p2p discovery state
-         *        @see #WIFI_P2P_DISCOVERY_STARTED
-         *        @see #WIFI_P2P_DISCOVERY_STOPPED
-         */
-        void onDiscoveryStateAvailable(@WifiP2pDiscoveryState int state);
-    }
-
-    /** Interface for callback invocation when {@link android.net.NetworkInfo} is available
-     *  in response to {@link #requestNetworkInfo}.
-     */
-    public interface NetworkInfoListener {
-        /**
-         * The requested {@link android.net.NetworkInfo} is available
-         * @param networkInfo Wi-Fi p2p {@link android.net.NetworkInfo}
-         */
-        void onNetworkInfoAvailable(@NonNull NetworkInfo networkInfo);
-    }
-
-    /**
-     * Interface for callback invocation when ongoing peer info is available
-     * @hide
-     */
-    public interface OngoingPeerInfoListener {
-        /**
-         * The requested ongoing WifiP2pConfig is available
-         * @param peerConfig WifiP2pConfig for current connecting session
-         */
-        void onOngoingPeerAvailable(WifiP2pConfig peerConfig);
-    }
-
-    /** Interface for callback invocation when {@link android.net.wifi.p2p.WifiP2pDevice}
-     *  is available in response to {@link #requestDeviceInfo(Channel, DeviceInfoListener)}.
-     */
-    public interface DeviceInfoListener {
-        /**
-         * The requested {@link android.net.wifi.p2p.WifiP2pDevice} is available.
-         * @param wifiP2pDevice Wi-Fi p2p {@link android.net.wifi.p2p.WifiP2pDevice}
-         */
-        void onDeviceInfoAvailable(@Nullable WifiP2pDevice wifiP2pDevice);
-    }
-
-    /**
-     * A channel that connects the application to the Wifi p2p framework.
-     * Most p2p operations require a Channel as an argument. An instance of Channel is obtained
-     * by doing a call on {@link #initialize}
-     */
-    public static class Channel implements AutoCloseable {
-        /** @hide */
-        public Channel(Context context, Looper looper, ChannelListener l, Binder binder,
-                WifiP2pManager p2pManager) {
-            mAsyncChannel = new AsyncChannel();
-            mHandler = new P2pHandler(looper);
-            mChannelListener = l;
-            mContext = context;
-            mBinder = binder;
-            mP2pManager = p2pManager;
-
-            mCloseGuard.open("close");
-        }
-        private final static int INVALID_LISTENER_KEY = 0;
-        private final WifiP2pManager mP2pManager;
-        private ChannelListener mChannelListener;
-        private ServiceResponseListener mServRspListener;
-        private DnsSdServiceResponseListener mDnsSdServRspListener;
-        private DnsSdTxtRecordListener mDnsSdTxtListener;
-        private UpnpServiceResponseListener mUpnpServRspListener;
-        private HashMap<Integer, Object> mListenerMap = new HashMap<Integer, Object>();
-        private final Object mListenerMapLock = new Object();
-        private int mListenerKey = 0;
-
-        private final CloseGuard mCloseGuard = new CloseGuard();
-
-        /**
-         * Close the current P2P connection and indicate to the P2P service that connections
-         * created by the app can be removed.
-         */
-        public void close() {
-            if (mP2pManager == null) {
-                Log.w(TAG, "Channel.close(): Null mP2pManager!?");
-            } else {
-                try {
-                    mP2pManager.mService.close(mBinder);
-                } catch (RemoteException e) {
-                    throw e.rethrowFromSystemServer();
-                }
-            }
-
-            mAsyncChannel.disconnect();
-            mCloseGuard.close();
-            Reference.reachabilityFence(this);
-        }
-
-        /** @hide */
-        @Override
-        protected void finalize() throws Throwable {
-            try {
-                if (mCloseGuard != null) {
-                    mCloseGuard.warnIfOpen();
-                }
-
-                close();
-            } finally {
-                super.finalize();
-            }
-        }
-
-        /* package */ final Binder mBinder;
-
-        @UnsupportedAppUsage
-        private AsyncChannel mAsyncChannel;
-        private P2pHandler mHandler;
-        Context mContext;
-        class P2pHandler extends Handler {
-            P2pHandler(Looper looper) {
-                super(looper);
-            }
-
-            @Override
-            public void handleMessage(Message message) {
-                Object listener = getListener(message.arg2);
-                switch (message.what) {
-                    case AsyncChannel.CMD_CHANNEL_DISCONNECTED:
-                        if (mChannelListener != null) {
-                            mChannelListener.onChannelDisconnected();
-                            mChannelListener = null;
-                        }
-                        break;
-                    /* ActionListeners grouped together */
-                    case DISCOVER_PEERS_FAILED:
-                    case STOP_DISCOVERY_FAILED:
-                    case DISCOVER_SERVICES_FAILED:
-                    case CONNECT_FAILED:
-                    case CANCEL_CONNECT_FAILED:
-                    case CREATE_GROUP_FAILED:
-                    case REMOVE_GROUP_FAILED:
-                    case ADD_LOCAL_SERVICE_FAILED:
-                    case REMOVE_LOCAL_SERVICE_FAILED:
-                    case CLEAR_LOCAL_SERVICES_FAILED:
-                    case ADD_SERVICE_REQUEST_FAILED:
-                    case REMOVE_SERVICE_REQUEST_FAILED:
-                    case CLEAR_SERVICE_REQUESTS_FAILED:
-                    case SET_DEVICE_NAME_FAILED:
-                    case DELETE_PERSISTENT_GROUP_FAILED:
-                    case SET_WFD_INFO_FAILED:
-                    case START_WPS_FAILED:
-                    case START_LISTEN_FAILED:
-                    case STOP_LISTEN_FAILED:
-                    case SET_CHANNEL_FAILED:
-                    case REPORT_NFC_HANDOVER_FAILED:
-                    case FACTORY_RESET_FAILED:
-                    case SET_ONGOING_PEER_CONFIG_FAILED:
-                        if (listener != null) {
-                            ((ActionListener) listener).onFailure(message.arg1);
-                        }
-                        break;
-                    /* ActionListeners grouped together */
-                    case DISCOVER_PEERS_SUCCEEDED:
-                    case STOP_DISCOVERY_SUCCEEDED:
-                    case DISCOVER_SERVICES_SUCCEEDED:
-                    case CONNECT_SUCCEEDED:
-                    case CANCEL_CONNECT_SUCCEEDED:
-                    case CREATE_GROUP_SUCCEEDED:
-                    case REMOVE_GROUP_SUCCEEDED:
-                    case ADD_LOCAL_SERVICE_SUCCEEDED:
-                    case REMOVE_LOCAL_SERVICE_SUCCEEDED:
-                    case CLEAR_LOCAL_SERVICES_SUCCEEDED:
-                    case ADD_SERVICE_REQUEST_SUCCEEDED:
-                    case REMOVE_SERVICE_REQUEST_SUCCEEDED:
-                    case CLEAR_SERVICE_REQUESTS_SUCCEEDED:
-                    case SET_DEVICE_NAME_SUCCEEDED:
-                    case DELETE_PERSISTENT_GROUP_SUCCEEDED:
-                    case SET_WFD_INFO_SUCCEEDED:
-                    case START_WPS_SUCCEEDED:
-                    case START_LISTEN_SUCCEEDED:
-                    case STOP_LISTEN_SUCCEEDED:
-                    case SET_CHANNEL_SUCCEEDED:
-                    case REPORT_NFC_HANDOVER_SUCCEEDED:
-                    case FACTORY_RESET_SUCCEEDED:
-                    case SET_ONGOING_PEER_CONFIG_SUCCEEDED:
-                        if (listener != null) {
-                            ((ActionListener) listener).onSuccess();
-                        }
-                        break;
-                    case RESPONSE_PEERS:
-                        WifiP2pDeviceList peers = (WifiP2pDeviceList) message.obj;
-                        if (listener != null) {
-                            ((PeerListListener) listener).onPeersAvailable(peers);
-                        }
-                        break;
-                    case RESPONSE_CONNECTION_INFO:
-                        WifiP2pInfo wifiP2pInfo = (WifiP2pInfo) message.obj;
-                        if (listener != null) {
-                            ((ConnectionInfoListener) listener).onConnectionInfoAvailable(wifiP2pInfo);
-                        }
-                        break;
-                    case RESPONSE_GROUP_INFO:
-                        WifiP2pGroup group = (WifiP2pGroup) message.obj;
-                        if (listener != null) {
-                            ((GroupInfoListener) listener).onGroupInfoAvailable(group);
-                        }
-                        break;
-                    case RESPONSE_SERVICE:
-                        WifiP2pServiceResponse resp = (WifiP2pServiceResponse) message.obj;
-                        handleServiceResponse(resp);
-                        break;
-                    case RESPONSE_PERSISTENT_GROUP_INFO:
-                        WifiP2pGroupList groups = (WifiP2pGroupList) message.obj;
-                        if (listener != null) {
-                            ((PersistentGroupInfoListener) listener).
-                                onPersistentGroupInfoAvailable(groups);
-                        }
-                        break;
-                    case RESPONSE_GET_HANDOVER_MESSAGE:
-                        Bundle handoverBundle = (Bundle) message.obj;
-                        if (listener != null) {
-                            String handoverMessage = handoverBundle != null
-                                    ? handoverBundle.getString(EXTRA_HANDOVER_MESSAGE)
-                                    : null;
-                            ((HandoverMessageListener) listener)
-                                    .onHandoverMessageAvailable(handoverMessage);
-                        }
-                        break;
-                    case RESPONSE_ONGOING_PEER_CONFIG:
-                        WifiP2pConfig peerConfig = (WifiP2pConfig) message.obj;
-                        if (listener != null) {
-                            ((OngoingPeerInfoListener) listener)
-                                    .onOngoingPeerAvailable(peerConfig);
-                        }
-                        break;
-                    case RESPONSE_P2P_STATE:
-                        if (listener != null) {
-                            ((P2pStateListener) listener)
-                                    .onP2pStateAvailable(message.arg1);
-                        }
-                        break;
-                    case RESPONSE_DISCOVERY_STATE:
-                        if (listener != null) {
-                            ((DiscoveryStateListener) listener)
-                                    .onDiscoveryStateAvailable(message.arg1);
-                        }
-                        break;
-                    case RESPONSE_NETWORK_INFO:
-                        if (listener != null) {
-                            ((NetworkInfoListener) listener)
-                                    .onNetworkInfoAvailable((NetworkInfo) message.obj);
-                        }
-                        break;
-                    case RESPONSE_DEVICE_INFO:
-                        if (listener != null) {
-                            ((DeviceInfoListener) listener)
-                                    .onDeviceInfoAvailable((WifiP2pDevice) message.obj);
-                        }
-                        break;
-                    default:
-                        Log.d(TAG, "Ignored " + message);
-                        break;
-                }
-            }
-        }
-
-        private void handleServiceResponse(WifiP2pServiceResponse resp) {
-            if (resp instanceof WifiP2pDnsSdServiceResponse) {
-                handleDnsSdServiceResponse((WifiP2pDnsSdServiceResponse)resp);
-            } else if (resp instanceof WifiP2pUpnpServiceResponse) {
-                if (mUpnpServRspListener != null) {
-                    handleUpnpServiceResponse((WifiP2pUpnpServiceResponse)resp);
-                }
-            } else {
-                if (mServRspListener != null) {
-                    mServRspListener.onServiceAvailable(resp.getServiceType(),
-                            resp.getRawData(), resp.getSrcDevice());
-                }
-            }
-        }
-
-        private void handleUpnpServiceResponse(WifiP2pUpnpServiceResponse resp) {
-            mUpnpServRspListener.onUpnpServiceAvailable(resp.getUniqueServiceNames(),
-                    resp.getSrcDevice());
-        }
-
-        private void handleDnsSdServiceResponse(WifiP2pDnsSdServiceResponse resp) {
-            if (resp.getDnsType() == WifiP2pDnsSdServiceInfo.DNS_TYPE_PTR) {
-                if (mDnsSdServRspListener != null) {
-                    mDnsSdServRspListener.onDnsSdServiceAvailable(
-                            resp.getInstanceName(),
-                            resp.getDnsQueryName(),
-                            resp.getSrcDevice());
-                }
-            } else if (resp.getDnsType() == WifiP2pDnsSdServiceInfo.DNS_TYPE_TXT) {
-                if (mDnsSdTxtListener != null) {
-                    mDnsSdTxtListener.onDnsSdTxtRecordAvailable(
-                            resp.getDnsQueryName(),
-                            resp.getTxtRecord(),
-                            resp.getSrcDevice());
-                }
-            } else {
-                Log.e(TAG, "Unhandled resp " + resp);
-            }
-        }
-
-        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-        private int putListener(Object listener) {
-            if (listener == null) return INVALID_LISTENER_KEY;
-            int key;
-            synchronized (mListenerMapLock) {
-                do {
-                    key = mListenerKey++;
-                } while (key == INVALID_LISTENER_KEY);
-                mListenerMap.put(key, listener);
-            }
-            return key;
-        }
-
-        private Object getListener(int key) {
-            if (key == INVALID_LISTENER_KEY) return null;
-            synchronized (mListenerMapLock) {
-                return mListenerMap.remove(key);
-            }
-        }
-    }
-
-    private static void checkChannel(Channel c) {
-        if (c == null) throw new IllegalArgumentException("Channel needs to be initialized");
-    }
-
-    private static void checkServiceInfo(WifiP2pServiceInfo info) {
-        if (info == null) throw new IllegalArgumentException("service info is null");
-    }
-
-    private static void checkServiceRequest(WifiP2pServiceRequest req) {
-        if (req == null) throw new IllegalArgumentException("service request is null");
-    }
-
-    private static void checkP2pConfig(WifiP2pConfig c) {
-        if (c == null) throw new IllegalArgumentException("config cannot be null");
-        if (TextUtils.isEmpty(c.deviceAddress)) {
-            throw new IllegalArgumentException("deviceAddress cannot be empty");
-        }
-    }
-
-    /**
-     * Registers the application with the Wi-Fi framework. This function
-     * must be the first to be called before any p2p operations are performed.
-     *
-     * @param srcContext is the context of the source
-     * @param srcLooper is the Looper on which the callbacks are receivied
-     * @param listener for callback at loss of framework communication. Can be null.
-     * @return Channel instance that is necessary for performing any further p2p operations
-     */
-    public Channel initialize(Context srcContext, Looper srcLooper, ChannelListener listener) {
-        Binder binder = new Binder();
-        Channel channel = initalizeChannel(srcContext, srcLooper, listener, getMessenger(binder),
-                binder);
-        return channel;
-    }
-
-    /**
-     * Registers the application with the Wi-Fi framework. Enables system-only functionality.
-     * @hide
-     */
-    public Channel initializeInternal(Context srcContext, Looper srcLooper,
-                                      ChannelListener listener) {
-        return initalizeChannel(srcContext, srcLooper, listener, getP2pStateMachineMessenger(),
-                null);
-    }
-
-    private Channel initalizeChannel(Context srcContext, Looper srcLooper, ChannelListener listener,
-                                     Messenger messenger, Binder binder) {
-        if (messenger == null) return null;
-
-        Channel c = new Channel(srcContext, srcLooper, listener, binder, this);
-        if (c.mAsyncChannel.connectSync(srcContext, c.mHandler, messenger)
-                == AsyncChannel.STATUS_SUCCESSFUL) {
-            Bundle bundle = new Bundle();
-            bundle.putString(CALLING_PACKAGE, c.mContext.getOpPackageName());
-            bundle.putString(CALLING_FEATURE_ID, c.mContext.getAttributionTag());
-            bundle.putBinder(CALLING_BINDER, binder);
-            c.mAsyncChannel.sendMessage(UPDATE_CHANNEL_INFO, 0,
-                    c.putListener(null), bundle);
-            return c;
-        } else {
-            c.close();
-            return null;
-        }
-    }
-
-    /**
-     * Initiate peer discovery. A discovery process involves scanning for available Wi-Fi peers
-     * for the purpose of establishing a connection.
-     *
-     * <p> The function call immediately returns after sending a discovery request
-     * to the framework. The application is notified of a success or failure to initiate
-     * discovery through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> The discovery remains active until a connection is initiated or
-     * a p2p group is formed. Register for {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent to
-     * determine when the framework notifies of a change as peers are discovered.
-     *
-     * <p> Upon receiving a {@link #WIFI_P2P_PEERS_CHANGED_ACTION} intent, an application
-     * can request for the list of peers using {@link #requestPeers}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void discoverPeers(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(DISCOVER_PEERS, 0, c.putListener(listener));
-    }
-
-    /**
-     * Stop an ongoing peer discovery
-     *
-     * <p> The function call immediately returns after sending a stop request
-     * to the framework. The application is notified of a success or failure to initiate
-     * stop through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void stopPeerDiscovery(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(STOP_DISCOVERY, 0, c.putListener(listener));
-    }
-
-    /**
-     * Start a p2p connection to a device with the specified configuration.
-     *
-     * <p> The function call immediately returns after sending a connection request
-     * to the framework. The application is notified of a success or failure to initiate
-     * connect through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> Register for {@link #WIFI_P2P_CONNECTION_CHANGED_ACTION} intent to
-     * determine when the framework notifies of a change in connectivity.
-     *
-     * <p> If the current device is not part of a p2p group, a connect request initiates
-     * a group negotiation with the peer.
-     *
-     * <p> If the current device is part of an existing p2p group or has created
-     * a p2p group with {@link #createGroup}, an invitation to join the group is sent to
-     * the peer device.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param config options as described in {@link WifiP2pConfig} class
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void connect(Channel c, WifiP2pConfig config, ActionListener listener) {
-        checkChannel(c);
-        checkP2pConfig(config);
-        c.mAsyncChannel.sendMessage(CONNECT, 0, c.putListener(listener), config);
-    }
-
-    /**
-     * Cancel any ongoing p2p group negotiation
-     *
-     * <p> The function call immediately returns after sending a connection cancellation request
-     * to the framework. The application is notified of a success or failure to initiate
-     * cancellation through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void cancelConnect(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(CANCEL_CONNECT, 0, c.putListener(listener));
-    }
-
-    /**
-     * Create a p2p group with the current device as the group owner. This essentially creates
-     * an access point that can accept connections from legacy clients as well as other p2p
-     * devices.
-     *
-     * <p class="note"><strong>Note:</strong>
-     * This function would normally not be used unless the current device needs
-     * to form a p2p connection with a legacy client
-     *
-     * <p> The function call immediately returns after sending a group creation request
-     * to the framework. The application is notified of a success or failure to initiate
-     * group creation through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> Application can request for the group details with {@link #requestGroupInfo}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void createGroup(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(CREATE_GROUP, WifiP2pGroup.NETWORK_ID_PERSISTENT,
-                c.putListener(listener));
-    }
-
-    /**
-     * Create a p2p group with the current device as the group owner. This essentially creates
-     * an access point that can accept connections from legacy clients as well as other p2p
-     * devices.
-     *
-     * <p> An app should use {@link WifiP2pConfig.Builder} to build the configuration
-     * for a group.
-     *
-     * <p class="note"><strong>Note:</strong>
-     * This function would normally not be used unless the current device needs
-     * to form a p2p group as a Group Owner and allow peers to join it as either
-     * Group Clients or legacy Wi-Fi STAs.
-     *
-     * <p> The function call immediately returns after sending a group creation request
-     * to the framework. The application is notified of a success or failure to initiate
-     * group creation through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> Application can request for the group details with {@link #requestGroupInfo}.
-     *
-     * @param c is the channel created at {@link #initialize}.
-     * @param config the configuration of a p2p group.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void createGroup(@NonNull Channel c,
-            @Nullable WifiP2pConfig config,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(CREATE_GROUP, 0,
-                c.putListener(listener), config);
-    }
-
-    /**
-     * Remove the current p2p group.
-     *
-     * <p> The function call immediately returns after sending a group removal request
-     * to the framework. The application is notified of a success or failure to initiate
-     * group removal through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void removeGroup(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REMOVE_GROUP, 0, c.putListener(listener));
-    }
-
-    /**
-     * Force p2p to enter listen state
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}
-     * @param listener for callbacks on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void startListening(@NonNull Channel c, @Nullable ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(START_LISTEN, 0, c.putListener(listener));
-    }
-
-    /**
-     * Force p2p to exit listen state
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}
-     * @param listener for callbacks on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void stopListening(@NonNull Channel c, @Nullable ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(STOP_LISTEN, 0, c.putListener(listener));
-    }
-
-    /**
-     * Set P2P listening and operating channel.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listeningChannel the listening channel's Wifi channel number. e.g. 1, 6, 11.
-     * @param operatingChannel the operating channel's Wifi channel number. e.g. 1, 6, 11.
-     * @param listener for callbacks on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-    })
-    public void setWifiP2pChannels(@NonNull Channel c, int listeningChannel, int operatingChannel,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        Bundle p2pChannels = new Bundle();
-        p2pChannels.putInt("lc", listeningChannel);
-        p2pChannels.putInt("oc", operatingChannel);
-        c.mAsyncChannel.sendMessage(SET_CHANNEL, 0, c.putListener(listener), p2pChannels);
-    }
-
-    /**
-     * Start a Wi-Fi Protected Setup (WPS) session.
-     *
-     * <p> The function call immediately returns after sending a request to start a
-     * WPS session. Currently, this is only valid if the current device is running
-     * as a group owner to allow any new clients to join the group. The application
-     * is notified of a success or failure to initiate WPS through listener callbacks
-     * {@link ActionListener#onSuccess} or {@link ActionListener#onFailure}.
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public void startWps(Channel c, WpsInfo wps, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(START_WPS, 0, c.putListener(listener), wps);
-    }
-
-    /**
-     * Register a local service for service discovery. If a local service is registered,
-     * the framework automatically responds to a service discovery request from a peer.
-     *
-     * <p> The function call immediately returns after sending a request to add a local
-     * service to the framework. The application is notified of a success or failure to
-     * add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p>The service information is set through {@link WifiP2pServiceInfo}.<br>
-     * or its subclass calls  {@link WifiP2pUpnpServiceInfo#newInstance} or
-     *  {@link WifiP2pDnsSdServiceInfo#newInstance} for a Upnp or Bonjour service
-     * respectively
-     *
-     * <p>The service information can be cleared with calls to
-     *  {@link #removeLocalService} or {@link #clearLocalServices}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param servInfo is a local service information.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void addLocalService(Channel c, WifiP2pServiceInfo servInfo, ActionListener listener) {
-        checkChannel(c);
-        checkServiceInfo(servInfo);
-        c.mAsyncChannel.sendMessage(ADD_LOCAL_SERVICE, 0, c.putListener(listener), servInfo);
-    }
-
-    /**
-     * Remove a registered local service added with {@link #addLocalService}
-     *
-     * <p> The function call immediately returns after sending a request to remove a
-     * local service to the framework. The application is notified of a success or failure to
-     * add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param servInfo is the local service information.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void removeLocalService(Channel c, WifiP2pServiceInfo servInfo,
-            ActionListener listener) {
-        checkChannel(c);
-        checkServiceInfo(servInfo);
-        c.mAsyncChannel.sendMessage(REMOVE_LOCAL_SERVICE, 0, c.putListener(listener), servInfo);
-    }
-
-    /**
-     * Clear all registered local services of service discovery.
-     *
-     * <p> The function call immediately returns after sending a request to clear all
-     * local services to the framework. The application is notified of a success or failure to
-     * add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void clearLocalServices(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(CLEAR_LOCAL_SERVICES, 0, c.putListener(listener));
-    }
-
-    /**
-     * Register a callback to be invoked on receiving service discovery response.
-     * Used only for vendor specific protocol right now. For Bonjour or Upnp, use
-     * {@link #setDnsSdResponseListeners} or {@link #setUpnpServiceResponseListener}
-     * respectively.
-     *
-     * <p> see {@link #discoverServices} for the detail.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on receiving service discovery response.
-     */
-    public void setServiceResponseListener(Channel c,
-            ServiceResponseListener listener) {
-        checkChannel(c);
-        c.mServRspListener = listener;
-    }
-
-    /**
-     * Register a callback to be invoked on receiving Bonjour service discovery
-     * response.
-     *
-     * <p> see {@link #discoverServices} for the detail.
-     *
-     * @param c
-     * @param servListener is for listening to a Bonjour service response
-     * @param txtListener is for listening to a Bonjour TXT record response
-     */
-    public void setDnsSdResponseListeners(Channel c,
-            DnsSdServiceResponseListener servListener, DnsSdTxtRecordListener txtListener) {
-        checkChannel(c);
-        c.mDnsSdServRspListener = servListener;
-        c.mDnsSdTxtListener = txtListener;
-    }
-
-    /**
-     * Register a callback to be invoked on receiving upnp service discovery
-     * response.
-     *
-     * <p> see {@link #discoverServices} for the detail.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on receiving service discovery response.
-     */
-    public void setUpnpServiceResponseListener(Channel c,
-            UpnpServiceResponseListener listener) {
-        checkChannel(c);
-        c.mUpnpServRspListener = listener;
-    }
-
-    /**
-     * Initiate service discovery. A discovery process involves scanning for
-     * requested services for the purpose of establishing a connection to a peer
-     * that supports an available service.
-     *
-     * <p> The function call immediately returns after sending a request to start service
-     * discovery to the framework. The application is notified of a success or failure to initiate
-     * discovery through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p> The services to be discovered are specified with calls to {@link #addServiceRequest}.
-     *
-     * <p>The application is notified of the response against the service discovery request
-     * through listener callbacks registered by {@link #setServiceResponseListener} or
-     * {@link #setDnsSdResponseListeners}, or {@link #setUpnpServiceResponseListener}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void discoverServices(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(DISCOVER_SERVICES, 0, c.putListener(listener));
-    }
-
-    /**
-     * Add a service discovery request.
-     *
-     * <p> The function call immediately returns after sending a request to add service
-     * discovery request to the framework. The application is notified of a success or failure to
-     * add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p>After service discovery request is added, you can initiate service discovery by
-     * {@link #discoverServices}.
-     *
-     * <p>The added service requests can be cleared with calls to
-     * {@link #removeServiceRequest(Channel, WifiP2pServiceRequest, ActionListener)} or
-     * {@link #clearServiceRequests(Channel, ActionListener)}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param req is the service discovery request.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void addServiceRequest(Channel c,
-            WifiP2pServiceRequest req, ActionListener listener) {
-        checkChannel(c);
-        checkServiceRequest(req);
-        c.mAsyncChannel.sendMessage(ADD_SERVICE_REQUEST, 0,
-                c.putListener(listener), req);
-    }
-
-    /**
-     * Remove a specified service discovery request added with {@link #addServiceRequest}
-     *
-     * <p> The function call immediately returns after sending a request to remove service
-     * discovery request to the framework. The application is notified of a success or failure to
-     * add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param req is the service discovery request.
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void removeServiceRequest(Channel c, WifiP2pServiceRequest req,
-            ActionListener listener) {
-        checkChannel(c);
-        checkServiceRequest(req);
-        c.mAsyncChannel.sendMessage(REMOVE_SERVICE_REQUEST, 0,
-                c.putListener(listener), req);
-    }
-
-    /**
-     * Clear all registered service discovery requests.
-     *
-     * <p> The function call immediately returns after sending a request to clear all
-     * service discovery requests to the framework. The application is notified of a success
-     * or failure to add service through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callbacks on success or failure. Can be null.
-     */
-    public void clearServiceRequests(Channel c, ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(CLEAR_SERVICE_REQUESTS,
-                0, c.putListener(listener));
-    }
-
-    /**
-     * Request the current list of peers.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when peer list is available. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void requestPeers(Channel c, PeerListListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REQUEST_PEERS, 0, c.putListener(listener));
-    }
-
-    /**
-     * Request device connection info.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when connection info is available. Can be null.
-     */
-    public void requestConnectionInfo(Channel c, ConnectionInfoListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REQUEST_CONNECTION_INFO, 0, c.putListener(listener));
-    }
-
-    /**
-     * Request p2p group info.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when group info is available. Can be null.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void requestGroupInfo(Channel c, GroupInfoListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REQUEST_GROUP_INFO, 0, c.putListener(listener));
-    }
-
-    /**
-     * Set p2p device name.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when group info is available. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-    })
-    public void setDeviceName(@NonNull Channel c, @NonNull String devName,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        WifiP2pDevice d = new WifiP2pDevice();
-        d.deviceName = devName;
-        c.mAsyncChannel.sendMessage(SET_DEVICE_NAME, 0, c.putListener(listener), d);
-    }
-
-    /**
-     * Set Wifi Display information.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param wfdInfo the Wifi Display information to set
-     * @param listener for callbacks on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
-    public void setWfdInfo(@NonNull Channel c, @NonNull WifiP2pWfdInfo wfdInfo,
-            @Nullable ActionListener listener) {
-        setWFDInfo(c, wfdInfo, listener);
-    }
-
-    /** @hide */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
-    public void setWFDInfo(@NonNull Channel c, @NonNull WifiP2pWfdInfo wfdInfo,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        try {
-            mService.checkConfigureWifiDisplayPermission();
-        } catch (RemoteException e) {
-            e.rethrowFromSystemServer();
-        }
-        c.mAsyncChannel.sendMessage(SET_WFD_INFO, 0, c.putListener(listener), wfdInfo);
-    }
-
-
-    /**
-     * Delete a stored persistent group from the system settings.
-     *
-     * <p> The function call immediately returns after sending a persistent group removal request
-     * to the framework. The application is notified of a success or failure to initiate
-     * group removal through listener callbacks {@link ActionListener#onSuccess} or
-     * {@link ActionListener#onFailure}.
-     *
-     * <p>The persistent p2p group list stored in the system can be obtained by
-     * {@link #requestPersistentGroupInfo(Channel, PersistentGroupInfoListener)} and
-     *  a network id can be obtained by {@link WifiP2pGroup#getNetworkId()}.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param netId the network id of the p2p group.
-     * @param listener for callbacks on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            android.Manifest.permission.OVERRIDE_WIFI_CONFIG
-    })
-    public void deletePersistentGroup(@NonNull Channel c, int netId,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(DELETE_PERSISTENT_GROUP, netId, c.putListener(listener));
-    }
-
-    /**
-     * Request a list of all the persistent p2p groups stored in system.
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when persistent group info list is available. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(anyOf = {
-            android.Manifest.permission.NETWORK_SETTINGS,
-            android.Manifest.permission.NETWORK_STACK,
-            android.Manifest.permission.READ_WIFI_CREDENTIAL
-    })
-    public void requestPersistentGroupInfo(@NonNull Channel c,
-            @Nullable PersistentGroupInfoListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REQUEST_PERSISTENT_GROUP_INFO, 0, c.putListener(listener));
-    }
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = {"MIRACAST_"}, value = {
-            MIRACAST_DISABLED,
-            MIRACAST_SOURCE,
-            MIRACAST_SINK})
-    public @interface MiracastMode {}
-
-    /**
-     * Miracast is disabled.
-     * @hide
-     */
-    @SystemApi
-    public static final int MIRACAST_DISABLED = 0;
-    /**
-     * Device acts as a Miracast source.
-     * @hide
-     */
-    @SystemApi
-    public static final int MIRACAST_SOURCE   = 1;
-    /**
-     * Device acts as a Miracast sink.
-     * @hide
-     */
-    @SystemApi
-    public static final int MIRACAST_SINK     = 2;
-
-    /**
-     * This is used to provide information to drivers to optimize performance depending
-     * on the current mode of operation.
-     * {@link #MIRACAST_DISABLED} - disabled
-     * {@link #MIRACAST_SOURCE} - source operation
-     * {@link #MIRACAST_SINK} - sink operation
-     *
-     * As an example, the driver could reduce the channel dwell time during scanning
-     * when acting as a source or sink to minimize impact on Miracast.
-     *
-     * @param mode mode of operation. One of {@link #MIRACAST_DISABLED}, {@link #MIRACAST_SOURCE},
-     * or {@link #MIRACAST_SINK}
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY)
-    public void setMiracastMode(@MiracastMode int mode) {
-        try {
-            mService.setMiracastMode(mode);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get a reference to WifiP2pService handler. This is used to establish
-     * an AsyncChannel communication with WifiService
-     *
-     * @param binder A binder for the service to associate with this client.
-     *
-     * @return Messenger pointing to the WifiP2pService handler
-     * @hide
-     */
-    public Messenger getMessenger(Binder binder) {
-        try {
-            return mService.getMessenger(binder);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get a reference to P2pStateMachine handler. This is used to establish
-     * a priveleged AsyncChannel communication with WifiP2pService.
-     *
-     * @return Messenger pointing to the WifiP2pService handler
-     * @hide
-     */
-    public Messenger getP2pStateMachineMessenger() {
-        try {
-            return mService.getP2pStateMachineMessenger();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Get a handover request message for use in WFA NFC Handover transfer.
-     * @hide
-     */
-    public void getNfcHandoverRequest(Channel c, HandoverMessageListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(GET_HANDOVER_REQUEST, 0, c.putListener(listener));
-    }
-
-
-    /**
-     * Get a handover select message for use in WFA NFC Handover transfer.
-     * @hide
-     */
-    public void getNfcHandoverSelect(Channel c, HandoverMessageListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(GET_HANDOVER_SELECT, 0, c.putListener(listener));
-    }
-
-    /**
-     * @hide
-     */
-    public void initiatorReportNfcHandover(Channel c, String handoverSelect,
-                                              ActionListener listener) {
-        checkChannel(c);
-        Bundle bundle = new Bundle();
-        bundle.putString(EXTRA_HANDOVER_MESSAGE, handoverSelect);
-        c.mAsyncChannel.sendMessage(INITIATOR_REPORT_NFC_HANDOVER, 0,
-                c.putListener(listener), bundle);
-    }
-
-
-    /**
-     * @hide
-     */
-    public void responderReportNfcHandover(Channel c, String handoverRequest,
-                                              ActionListener listener) {
-        checkChannel(c);
-        Bundle bundle = new Bundle();
-        bundle.putString(EXTRA_HANDOVER_MESSAGE, handoverRequest);
-        c.mAsyncChannel.sendMessage(RESPONDER_REPORT_NFC_HANDOVER, 0,
-                c.putListener(listener), bundle);
-    }
-
-    /**
-     * Removes all saved p2p groups.
-     *
-     * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback on success or failure. Can be null.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS)
-    public void factoryReset(@NonNull Channel c, @Nullable ActionListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(FACTORY_RESET, 0, c.putListener(listener));
-    }
-
-    /**
-     * Request saved WifiP2pConfig which used for an ongoing peer connection
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param listener for callback when ongoing peer config updated. Can't be null.
-     *
-     * @hide
-     */
-    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void requestOngoingPeerConfig(@NonNull Channel c,
-            @NonNull OngoingPeerInfoListener listener) {
-        checkChannel(c);
-        c.mAsyncChannel.sendMessage(REQUEST_ONGOING_PEER_CONFIG,
-                Binder.getCallingUid(), c.putListener(listener));
-    }
-
-     /**
-     * Set saved WifiP2pConfig which used for an ongoing peer connection
-     *
-     * @param c is the channel created at {@link #initialize}
-     * @param config used for change an ongoing peer connection
-     * @param listener for callback when ongoing peer config updated. Can be null.
-     *
-     * @hide
-     */
-    @RequiresPermission(android.Manifest.permission.NETWORK_STACK)
-    public void setOngoingPeerConfig(@NonNull Channel c, @NonNull WifiP2pConfig config,
-            @Nullable ActionListener listener) {
-        checkChannel(c);
-        checkP2pConfig(config);
-        c.mAsyncChannel.sendMessage(SET_ONGOING_PEER_CONFIG, 0,
-                c.putListener(listener), config);
-    }
-
-    /**
-     * Request p2p enabled state.
-     *
-     * <p> This state indicates whether Wi-Fi p2p is enabled or disabled.
-     * The valid value is one of {@link #WIFI_P2P_STATE_DISABLED} or
-     * {@link #WIFI_P2P_STATE_ENABLED}. The state is returned using the
-     * {@link P2pStateListener} listener.
-     *
-     * <p> This state is also included in the {@link #WIFI_P2P_STATE_CHANGED_ACTION}
-     * broadcast event with extra {@link #EXTRA_WIFI_STATE}.
-     *
-     * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when p2p state is available..
-     */
-    public void requestP2pState(@NonNull Channel c,
-            @NonNull P2pStateListener listener) {
-        checkChannel(c);
-        if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-        c.mAsyncChannel.sendMessage(REQUEST_P2P_STATE, 0, c.putListener(listener));
-    }
-
-    /**
-     * Request p2p discovery state.
-     *
-     * <p> This state indicates whether p2p discovery has started or stopped.
-     * The valid value is one of {@link #WIFI_P2P_DISCOVERY_STARTED} or
-     * {@link #WIFI_P2P_DISCOVERY_STOPPED}. The state is returned using the
-     * {@link DiscoveryStateListener} listener.
-     *
-     * <p> This state is also included in the {@link #WIFI_P2P_DISCOVERY_CHANGED_ACTION}
-     * broadcast event with extra {@link #EXTRA_DISCOVERY_STATE}.
-     *
-     * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when discovery state is available..
-     */
-    public void requestDiscoveryState(@NonNull Channel c,
-            @NonNull DiscoveryStateListener listener) {
-        checkChannel(c);
-        if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-        c.mAsyncChannel.sendMessage(REQUEST_DISCOVERY_STATE, 0, c.putListener(listener));
-    }
-
-    /**
-     * Request network info.
-     *
-     * <p> This method provides the network info in the form of a {@link android.net.NetworkInfo}.
-     * {@link android.net.NetworkInfo#isAvailable()} indicates the p2p availability and
-     * {@link android.net.NetworkInfo#getDetailedState()} reports the current fine-grained state
-     * of the network. This {@link android.net.NetworkInfo} is returned using the
-     * {@link NetworkInfoListener} listener.
-     *
-     * <p> This information is also included in the {@link #WIFI_P2P_CONNECTION_CHANGED_ACTION}
-     * broadcast event with extra {@link #EXTRA_NETWORK_INFO}.
-     *
-     * @param c is the channel created at {@link #initialize}.
-     * @param listener for callback when network info is available..
-     */
-    public void requestNetworkInfo(@NonNull Channel c,
-            @NonNull NetworkInfoListener listener) {
-        checkChannel(c);
-        if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-        c.mAsyncChannel.sendMessage(REQUEST_NETWORK_INFO, 0, c.putListener(listener));
-    }
-
-     /**
-     * Request Device Info
-     *
-     * <p> This method provides the device info
-     * in the form of a {@link android.net.wifi.p2p.WifiP2pDevice}.
-     * Valid {@link android.net.wifi.p2p.WifiP2pDevice} is returned when p2p is enabled.
-     * To get information notifications on P2P getting enabled refers
-     * {@link #WIFI_P2P_STATE_ENABLED}.
-     *
-     * <p> This {@link android.net.wifi.p2p.WifiP2pDevice} is returned using the
-     * {@link DeviceInfoListener} listener.
-     *
-     * <p> {@link android.net.wifi.p2p.WifiP2pDevice#deviceAddress} is only available if the caller
-     * holds the {@code android.Manifest.permission#LOCAL_MAC_ADDRESS} permission, and holds the
-     * anonymized MAC address (02:00:00:00:00:00) otherwise.
-     *
-     * <p> This information is also included in the {@link #WIFI_P2P_THIS_DEVICE_CHANGED_ACTION}
-     * broadcast event with extra {@link #EXTRA_WIFI_P2P_DEVICE}.
-     *
-     * @param c is the channel created at {@link #initialize(Context, Looper, ChannelListener)}.
-     * @param listener for callback when network info is available.
-     */
-    @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
-    public void requestDeviceInfo(@NonNull Channel c, @NonNull DeviceInfoListener listener) {
-        checkChannel(c);
-        if (listener == null) throw new IllegalArgumentException("This listener cannot be null.");
-        c.mAsyncChannel.sendMessage(REQUEST_DEVICE_INFO, 0, c.putListener(listener));
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java b/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java
deleted file mode 100644
index d0fe92d..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pProvDiscEvent.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES 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.p2p;
-
-import android.compat.annotation.UnsupportedAppUsage;
-
-/**
- * A class representing a Wi-Fi p2p provisional discovery request/response
- * See {@link #WifiP2pProvDiscEvent} for supported types
- *
- * @hide
- */
-public class WifiP2pProvDiscEvent {
-
-    private static final String TAG = "WifiP2pProvDiscEvent";
-
-    public static final int PBC_REQ     = 1;
-    public static final int PBC_RSP     = 2;
-    public static final int ENTER_PIN   = 3;
-    public static final int SHOW_PIN    = 4;
-
-    /* One of PBC_REQ, PBC_RSP, ENTER_PIN or SHOW_PIN */
-    @UnsupportedAppUsage
-    public int event;
-
-    @UnsupportedAppUsage
-    public WifiP2pDevice device;
-
-    /* Valid when event = SHOW_PIN */
-    @UnsupportedAppUsage
-    public String pin;
-
-    @UnsupportedAppUsage
-    public WifiP2pProvDiscEvent() {
-        device = new WifiP2pDevice();
-    }
-
-    /**
-     * @param string formats supported include
-     *
-     *  P2P-PROV-DISC-PBC-REQ 42:fc:89:e1:e2:27
-     *  P2P-PROV-DISC-PBC-RESP 02:12:47:f2:5a:36
-     *  P2P-PROV-DISC-ENTER-PIN 42:fc:89:e1:e2:27
-     *  P2P-PROV-DISC-SHOW-PIN 42:fc:89:e1:e2:27 44490607
-     *
-     *  Note: The events formats can be looked up in the wpa_supplicant code
-     * @hide
-     */
-    public WifiP2pProvDiscEvent(String string) throws IllegalArgumentException {
-        String[] tokens = string.split(" ");
-
-        if (tokens.length < 2) {
-            throw new IllegalArgumentException("Malformed event " + string);
-        }
-
-        if (tokens[0].endsWith("PBC-REQ")) event = PBC_REQ;
-        else if (tokens[0].endsWith("PBC-RESP")) event = PBC_RSP;
-        else if (tokens[0].endsWith("ENTER-PIN")) event = ENTER_PIN;
-        else if (tokens[0].endsWith("SHOW-PIN")) event = SHOW_PIN;
-        else throw new IllegalArgumentException("Malformed event " + string);
-
-
-        device = new WifiP2pDevice();
-        device.deviceAddress = tokens[1];
-
-        if (event == SHOW_PIN) {
-            pin = tokens[2];
-        }
-    }
-
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append(device);
-        sbuf.append("\n event: ").append(event);
-        sbuf.append("\n pin: ").append(pin);
-        return sbuf.toString();
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java b/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java
deleted file mode 100644
index e399b5b..0000000
--- a/wifi/java/android/net/wifi/p2p/WifiP2pWfdInfo.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p;
-
-import android.annotation.IntDef;
-import android.annotation.IntRange;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Locale;
-
-/**
- * A class representing Wifi Display information for a device.
- *
- * See Wifi Display technical specification v1.0.0, section 5.1.2.
- */
-public final class WifiP2pWfdInfo implements Parcelable {
-
-    private boolean mEnabled;
-
-    /** Device information bitmap */
-    private int mDeviceInfo;
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(prefix = { "DEVICE_TYPE_" }, value = {
-            DEVICE_TYPE_WFD_SOURCE,
-            DEVICE_TYPE_PRIMARY_SINK,
-            DEVICE_TYPE_SECONDARY_SINK,
-            DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK})
-    public @interface DeviceType {}
-
-    /** The device is a Wifi Display Source. */
-    public static final int DEVICE_TYPE_WFD_SOURCE = 0;
-    /** The device is a primary sink. */
-    public static final int DEVICE_TYPE_PRIMARY_SINK = 1;
-    /** The device is a secondary sink. */
-    public static final int DEVICE_TYPE_SECONDARY_SINK = 2;
-    /** The device is dual-role capable i.e. either a WFD source or a primary sink. */
-    public static final int DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK = 3;
-
-    /**
-     * {@link #mDeviceInfo} & {@link #DEVICE_TYPE} is one of {@link #DEVICE_TYPE_WFD_SOURCE},
-     * {@link #DEVICE_TYPE_PRIMARY_SINK}, {@link #DEVICE_TYPE_SECONDARY_SINK} or
-     * {@link #DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK}.
-     *
-     * The bit definition is listed in 5.1.2 WFD Device Information Subelement in
-     * Wi-Fi Display Technical Specification.
-     */
-    private static final int DEVICE_TYPE                            = 1 << 1 | 1 << 0;
-    private static final int COUPLED_SINK_SUPPORT_AT_SOURCE         = 1 << 2;
-    private static final int COUPLED_SINK_SUPPORT_AT_SINK           = 1 << 3;
-    private static final int SESSION_AVAILABLE_BIT1                 = 1 << 4;
-    private static final int SESSION_AVAILABLE_BIT2                 = 1 << 5;
-    private static final int SESSION_AVAILABLE                      =
-            SESSION_AVAILABLE_BIT2 | SESSION_AVAILABLE_BIT1;
-    /* The support of Content Protection using the HDCP system 2.0/2.1. */
-    private static final int CONTENT_PROTECTION_SUPPORT             = 1 << 8;
-
-    private int mCtrlPort;
-
-    private int mMaxThroughput;
-
-    /** Default constructor. */
-    public WifiP2pWfdInfo() {}
-
-    /** @hide */
-    @UnsupportedAppUsage
-    public WifiP2pWfdInfo(int devInfo, int ctrlPort, int maxTput) {
-        mEnabled = true;
-        mDeviceInfo = devInfo;
-        mCtrlPort = ctrlPort;
-        mMaxThroughput = maxTput;
-    }
-
-    /** Returns true is Wifi Display is enabled, false otherwise. */
-    public boolean isEnabled() {
-        return mEnabled;
-    }
-
-    /**
-     * Sets whether Wifi Display should be enabled.
-     *
-     * @param enabled true to enable Wifi Display, false to disable
-     */
-    public void setEnabled(boolean enabled) {
-        mEnabled = enabled;
-    }
-
-    /**
-     * Get the type of the device.
-     * One of {@link #DEVICE_TYPE_WFD_SOURCE}, {@link #DEVICE_TYPE_PRIMARY_SINK},
-     * {@link #DEVICE_TYPE_SECONDARY_SINK}, {@link #DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK}
-     */
-    @DeviceType
-    public int getDeviceType() {
-        return mDeviceInfo & DEVICE_TYPE;
-    }
-
-    /**
-     * Sets the type of the device.
-     *
-     * @param deviceType One of {@link #DEVICE_TYPE_WFD_SOURCE}, {@link #DEVICE_TYPE_PRIMARY_SINK},
-     * {@link #DEVICE_TYPE_SECONDARY_SINK}, {@link #DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK}
-     * @return true if the device type was successfully set, false otherwise
-     */
-    public boolean setDeviceType(@DeviceType int deviceType) {
-        if (DEVICE_TYPE_WFD_SOURCE <= deviceType
-                && deviceType <= DEVICE_TYPE_SOURCE_OR_PRIMARY_SINK) {
-            mDeviceInfo &= ~DEVICE_TYPE;
-            mDeviceInfo |= deviceType;
-            return true;
-        }
-        return false;
-    }
-
-    /** Returns true if a session is available, false otherwise. */
-    public boolean isSessionAvailable() {
-        return (mDeviceInfo & SESSION_AVAILABLE) != 0;
-    }
-
-    /**
-     * Sets whether a session is available.
-     *
-     * @param enabled true to indicate that a session is available, false otherwise.
-     */
-    public void setSessionAvailable(boolean enabled) {
-        if (enabled) {
-            mDeviceInfo |= SESSION_AVAILABLE_BIT1;
-            mDeviceInfo &= ~SESSION_AVAILABLE_BIT2;
-        } else {
-            mDeviceInfo &= ~SESSION_AVAILABLE;
-        }
-    }
-
-    /**
-     * @return true if Content Protection using the HDCP system 2.0/2.1 is supported.
-     */
-    public boolean isContentProtectionSupported() {
-        return (mDeviceInfo & CONTENT_PROTECTION_SUPPORT) != 0;
-    }
-
-    /**
-     * Sets whether Content Protection using the HDCP system 2.0/2.1 is supported.
-     *
-     * @param enabled true to indicate that Content Protection is supported, false otherwise.
-     */
-    public void setContentProtectionSupported(boolean enabled) {
-        if (enabled) {
-            mDeviceInfo |= CONTENT_PROTECTION_SUPPORT;
-        } else {
-            mDeviceInfo &= ~CONTENT_PROTECTION_SUPPORT;
-        }
-    }
-
-    /** Returns the TCP port at which the WFD Device listens for RTSP messages. */
-    public int getControlPort() {
-        return mCtrlPort;
-    }
-
-    /** Sets the TCP port at which the WFD Device listens for RTSP messages. */
-    public void setControlPort(@IntRange(from = 0) int port) {
-        mCtrlPort = port;
-    }
-
-    /** Sets the maximum average throughput capability of the WFD Device, in megabits/second. */
-    public void setMaxThroughput(@IntRange(from = 0) int maxThroughput) {
-        mMaxThroughput = maxThroughput;
-    }
-
-    /** Returns the maximum average throughput capability of the WFD Device, in megabits/second. */
-    public int getMaxThroughput() {
-        return mMaxThroughput;
-    }
-
-    /** @hide */
-    public String getDeviceInfoHex() {
-        return String.format(
-                Locale.US, "%04x%04x%04x", mDeviceInfo, mCtrlPort, mMaxThroughput);
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("WFD enabled: ").append(mEnabled);
-        sbuf.append("WFD DeviceInfo: ").append(mDeviceInfo);
-        sbuf.append("\n WFD CtrlPort: ").append(mCtrlPort);
-        sbuf.append("\n WFD MaxThroughput: ").append(mMaxThroughput);
-        return sbuf.toString();
-    }
-
-    /** Implement the Parcelable interface */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Copy constructor. */
-    public WifiP2pWfdInfo(@Nullable WifiP2pWfdInfo source) {
-        if (source != null) {
-            mEnabled = source.mEnabled;
-            mDeviceInfo = source.mDeviceInfo;
-            mCtrlPort = source.mCtrlPort;
-            mMaxThroughput = source.mMaxThroughput;
-        }
-    }
-
-    /** Implement the Parcelable interface */
-    @Override
-    public void writeToParcel(@NonNull Parcel dest, int flags) {
-        dest.writeInt(mEnabled ? 1 : 0);
-        dest.writeInt(mDeviceInfo);
-        dest.writeInt(mCtrlPort);
-        dest.writeInt(mMaxThroughput);
-    }
-
-    private void readFromParcel(Parcel in) {
-        mEnabled = (in.readInt() == 1);
-        mDeviceInfo = in.readInt();
-        mCtrlPort = in.readInt();
-        mMaxThroughput = in.readInt();
-    }
-
-    /** Implement the Parcelable interface */
-    public static final @NonNull Creator<WifiP2pWfdInfo> CREATOR =
-        new Creator<WifiP2pWfdInfo>() {
-            public WifiP2pWfdInfo createFromParcel(Parcel in) {
-                WifiP2pWfdInfo device = new WifiP2pWfdInfo();
-                device.readFromParcel(in);
-                return device;
-            }
-
-            public WifiP2pWfdInfo[] newArray(int size) {
-                return new WifiP2pWfdInfo[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java
deleted file mode 100644
index dad431c1..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfo.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.compat.annotation.UnsupportedAppUsage;
-import android.net.util.nsd.DnsSdTxtRecord;
-import android.os.Build;
-import android.text.TextUtils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * A class for storing Bonjour service information that is advertised
- * over a Wi-Fi peer-to-peer setup.
- *
- * {@see android.net.wifi.p2p.WifiP2pManager#addLocalService}
- * {@see android.net.wifi.p2p.WifiP2pManager#removeLocalService}
- * {@see WifiP2pServiceInfo}
- * {@see WifiP2pUpnpServiceInfo}
- */
-public class WifiP2pDnsSdServiceInfo extends WifiP2pServiceInfo {
-
-    /**
-     * Bonjour version 1.
-     * @hide
-     */
-    public static final int VERSION_1 = 0x01;
-
-    /**
-     * Pointer record.
-     * @hide
-     */
-    public static final int DNS_TYPE_PTR = 12;
-
-    /**
-     * Text record.
-     * @hide
-     */
-    public static final int DNS_TYPE_TXT = 16;
-
-    /**
-     * virtual memory packet.
-     * see E.3 of the Wi-Fi Direct technical specification for the detail.<br>
-     * Key: domain name Value: pointer address.<br>
-     */
-    private final static Map<String, String> sVmPacket;
-
-    static {
-        sVmPacket = new HashMap<String, String>();
-        sVmPacket.put("_tcp.local.", "c00c");
-        sVmPacket.put("local.", "c011");
-        sVmPacket.put("_udp.local.", "c01c");
-    }
-
-    /**
-     * This constructor is only used in newInstance().
-     *
-     * @param queryList
-     */
-    private WifiP2pDnsSdServiceInfo(List<String> queryList) {
-        super(queryList);
-    }
-
-    /**
-     * Create a Bonjour service information object.
-     *
-     * @param instanceName instance name.<br>
-     *  e.g) "MyPrinter"
-     * @param serviceType service type.<br>
-     *  e.g) "_ipp._tcp"
-     * @param txtMap TXT record with key/value pair in a map confirming to format defined at
-     * http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt
-     * @return Bonjour service information object
-     */
-    public static WifiP2pDnsSdServiceInfo newInstance(String instanceName,
-            String serviceType, Map<String, String> txtMap) {
-        if (TextUtils.isEmpty(instanceName) || TextUtils.isEmpty(serviceType)) {
-            throw new IllegalArgumentException(
-                    "instance name or service type cannot be empty");
-        }
-
-        DnsSdTxtRecord txtRecord = new DnsSdTxtRecord();
-        if (txtMap != null) {
-            for (String key : txtMap.keySet()) {
-                txtRecord.set(key, txtMap.get(key));
-            }
-        }
-
-        ArrayList<String> queries = new ArrayList<String>();
-        queries.add(createPtrServiceQuery(instanceName, serviceType));
-        queries.add(createTxtServiceQuery(instanceName, serviceType, txtRecord));
-
-        return new WifiP2pDnsSdServiceInfo(queries);
-    }
-
-    /**
-     * Create wpa_supplicant service query for PTR record.
-     *
-     * @param instanceName instance name.<br>
-     *  e.g) "MyPrinter"
-     * @param serviceType service type.<br>
-     *  e.g) "_ipp._tcp"
-     * @return wpa_supplicant service query.
-     */
-    private static String createPtrServiceQuery(String instanceName,
-            String serviceType) {
-
-        StringBuffer sb = new StringBuffer();
-        sb.append("bonjour ");
-        sb.append(createRequest(serviceType + ".local.", DNS_TYPE_PTR, VERSION_1));
-        sb.append(" ");
-
-        byte[] data = instanceName.getBytes();
-        sb.append(String.format(Locale.US, "%02x", data.length));
-        sb.append(WifiP2pServiceInfo.bin2HexStr(data));
-        // This is the start point of this response.
-        // Therefore, it indicates the request domain name.
-        sb.append("c027");
-        return sb.toString();
-    }
-
-    /**
-     * Create wpa_supplicant service query for TXT record.
-     *
-     * @param instanceName instance name.<br>
-     *  e.g) "MyPrinter"
-     * @param serviceType service type.<br>
-     *  e.g) "_ipp._tcp"
-     * @param txtRecord TXT record.<br>
-     * @return wpa_supplicant service query.
-     */
-    private static String createTxtServiceQuery(String instanceName,
-            String serviceType,
-            DnsSdTxtRecord txtRecord) {
-
-
-        StringBuffer sb = new StringBuffer();
-        sb.append("bonjour ");
-
-        sb.append(createRequest((instanceName + "." + serviceType + ".local."),
-                DNS_TYPE_TXT, VERSION_1));
-        sb.append(" ");
-        byte[] rawData = txtRecord.getRawData();
-        if (rawData.length == 0) {
-            sb.append("00");
-        } else {
-            sb.append(bin2HexStr(rawData));
-        }
-        return sb.toString();
-    }
-
-    /**
-     * Create bonjour service discovery request.
-     *
-     * @param dnsName dns name
-     * @param dnsType dns type
-     * @param version version number
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    static String createRequest(String dnsName, int dnsType, int version) {
-        StringBuffer sb = new StringBuffer();
-
-        /*
-         * The request format is as follows.
-         * ________________________________________________
-         * |  Encoded and Compressed dns name (variable)  |
-         * ________________________________________________
-         * |   Type (2)           | Version (1) |
-         */
-        if (dnsType == WifiP2pDnsSdServiceInfo.DNS_TYPE_TXT) {
-            dnsName = dnsName.toLowerCase(Locale.ROOT); // TODO: is this right?
-        }
-        sb.append(compressDnsName(dnsName));
-        sb.append(String.format(Locale.US, "%04x", dnsType));
-        sb.append(String.format(Locale.US, "%02x", version));
-
-        return sb.toString();
-    }
-
-    /**
-     * Compress DNS data.
-     *
-     * see E.3 of the Wi-Fi Direct technical specification for the detail.
-     *
-     * @param dnsName dns name
-     * @return compressed dns name
-     */
-    private static String compressDnsName(String dnsName) {
-        StringBuffer sb = new StringBuffer();
-
-        // The domain name is replaced with a pointer to a prior
-        // occurrence of the same name in virtual memory packet.
-        while (true) {
-            String data = sVmPacket.get(dnsName);
-            if (data != null) {
-                sb.append(data);
-                break;
-            }
-            int i = dnsName.indexOf('.');
-            if (i == -1) {
-                if (dnsName.length() > 0) {
-                    sb.append(String.format(Locale.US, "%02x", dnsName.length()));
-                    sb.append(WifiP2pServiceInfo.bin2HexStr(dnsName.getBytes()));
-                }
-                // for a sequence of labels ending in a zero octet
-                sb.append("00");
-                break;
-            }
-
-            String name = dnsName.substring(0, i);
-            dnsName = dnsName.substring(i + 1);
-            sb.append(String.format(Locale.US, "%02x", name.length()));
-            sb.append(WifiP2pServiceInfo.bin2HexStr(name.getBytes()));
-        }
-        return sb.toString();
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequest.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequest.java
deleted file mode 100644
index d5415e0..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.net.wifi.p2p.WifiP2pManager;
-
-/**
- * A class for creating a Bonjour service discovery request for use with
- * {@link WifiP2pManager#addServiceRequest} and {@link WifiP2pManager#removeServiceRequest}
- *
- * {@see WifiP2pManager}
- * {@see WifiP2pServiceRequest}
- * {@see WifiP2pUpnpServiceRequest}
- */
-public class WifiP2pDnsSdServiceRequest extends WifiP2pServiceRequest {
-
-    /**
-     * This constructor is only used in newInstance().
-     *
-     * @param query The part of service specific query.
-     * @hide
-     */
-    private WifiP2pDnsSdServiceRequest(String query) {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR, query);
-    }
-
-    /**
-     * This constructor is only used in newInstance().
-     * @hide
-     */
-    private WifiP2pDnsSdServiceRequest() {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR, null);
-    }
-
-    private WifiP2pDnsSdServiceRequest(String dnsQuery, int dnsType, int version) {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR, WifiP2pDnsSdServiceInfo.createRequest(
-                dnsQuery,
-                dnsType,
-                version));
-    }
-
-    /**
-     * Create a service discovery request to search all Bonjour services.
-     *
-     * @return service request for Bonjour.
-     */
-    public static WifiP2pDnsSdServiceRequest newInstance() {
-        return new WifiP2pDnsSdServiceRequest();
-    }
-
-    /**
-     * Create a service discovery to search for Bonjour services with the specified
-     * service type.
-     *
-     * @param serviceType service type. Cannot be null <br>
-     *  "_afpovertcp._tcp."(Apple File Sharing over TCP)<br>
-     *  "_ipp._tcp" (IP Printing over TCP)<br>
-     *  "_http._tcp" (http service)
-     * @return service request for DnsSd.
-     */
-    public static WifiP2pDnsSdServiceRequest newInstance(String serviceType) {
-        if (serviceType == null) {
-            throw new IllegalArgumentException("service type cannot be null");
-        }
-        return new WifiP2pDnsSdServiceRequest(serviceType + ".local.",
-                WifiP2pDnsSdServiceInfo.DNS_TYPE_PTR,
-                WifiP2pDnsSdServiceInfo.VERSION_1);
-    }
-
-    /**
-     * Create a service discovery request to get the TXT data from the specified
-     * Bonjour service.
-     *
-     * @param instanceName instance name. Cannot be null. <br>
-     *  "MyPrinter"
-     * @param serviceType service type. Cannot be null. <br>
-     * e.g) <br>
-     *  "_afpovertcp._tcp"(Apple File Sharing over TCP)<br>
-     *  "_ipp._tcp" (IP Printing over TCP)<br>
-     * @return service request for Bonjour.
-     */
-    public static WifiP2pDnsSdServiceRequest newInstance(String instanceName,
-            String serviceType) {
-        if (instanceName == null || serviceType == null) {
-            throw new IllegalArgumentException(
-                    "instance name or service type cannot be null");
-        }
-        String fullDomainName = instanceName + "." + serviceType + ".local.";
-        return new WifiP2pDnsSdServiceRequest(fullDomainName,
-                WifiP2pDnsSdServiceInfo.DNS_TYPE_TXT,
-                WifiP2pDnsSdServiceInfo.VERSION_1);
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceResponse.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceResponse.java
deleted file mode 100644
index ed84a1a..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceResponse.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.net.wifi.p2p.WifiP2pDevice;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A class for a response of bonjour service discovery.
- *
- * @hide
- */
-public class WifiP2pDnsSdServiceResponse extends WifiP2pServiceResponse {
-
-    /**
-     * DNS query name.
-     * e.g)
-     * for PTR
-     * "_ipp._tcp.local."
-     * for TXT
-     * "MyPrinter._ipp._tcp.local."
-     */
-    private String mDnsQueryName;
-
-    /**
-     * Service instance name.
-     * e.g) "MyPrinter"
-     * This field is only used when the dns type equals to
-     * {@link WifiP2pDnsSdServiceInfo#DNS_TYPE_PTR}.
-     */
-    private String mInstanceName;
-
-    /**
-     * DNS Type.
-     * Should be {@link WifiP2pDnsSdServiceInfo#DNS_TYPE_PTR} or
-     * {@link WifiP2pDnsSdServiceInfo#DNS_TYPE_TXT}.
-     */
-    private int mDnsType;
-
-    /**
-     * DnsSd version number.
-     * Should be {@link WifiP2pDnsSdServiceInfo#VERSION_1}.
-     */
-    private int mVersion;
-
-    /**
-     * Txt record.
-     * This field is only used when the dns type equals to
-     * {@link WifiP2pDnsSdServiceInfo#DNS_TYPE_TXT}.
-     */
-    private final HashMap<String, String> mTxtRecord = new HashMap<String, String>();
-
-    /**
-     * Virtual memory packet.
-     * see E.3 of the Wi-Fi Direct technical specification for the detail.<br>
-     * The spec can be obtained from wi-fi.org
-     * Key: pointer Value: domain name.<br>
-     */
-    private final static Map<Integer, String> sVmpack;
-
-    static {
-        sVmpack = new HashMap<Integer, String>();
-        sVmpack.put(0x0c, "_tcp.local.");
-        sVmpack.put(0x11, "local.");
-        sVmpack.put(0x1c, "_udp.local.");
-    }
-
-    /**
-     * Returns query DNS name.
-     * @return DNS name.
-     */
-    public String getDnsQueryName() {
-        return mDnsQueryName;
-    }
-
-    /**
-     * Return query DNS type.
-     * @return DNS type.
-     */
-    public int getDnsType() {
-        return mDnsType;
-    }
-
-    /**
-     * Return bonjour version number.
-     * @return version number.
-     */
-    public int getVersion() {
-        return mVersion;
-    }
-
-    /**
-     * Return instance name.
-     * @return
-     */
-    public String getInstanceName() {
-        return mInstanceName;
-    }
-
-    /**
-     * Return TXT record data.
-     * @return TXT record data.
-     */
-    public Map<String, String> getTxtRecord() {
-        return mTxtRecord;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("serviceType:DnsSd(").append(mServiceType).append(")");
-        sbuf.append(" status:").append(Status.toString(mStatus));
-        sbuf.append(" srcAddr:").append(mDevice.deviceAddress);
-        sbuf.append(" version:").append(String.format("%02x", mVersion));
-        sbuf.append(" dnsName:").append(mDnsQueryName);
-        sbuf.append(" TxtRecord:");
-        for (String key : mTxtRecord.keySet()) {
-            sbuf.append(" key:").append(key).append(" value:").append(mTxtRecord.get(key));
-        }
-        if (mInstanceName != null) {
-            sbuf.append(" InsName:").append(mInstanceName);
-        }
-        return sbuf.toString();
-    }
-
-    /**
-     * This is only used in framework.
-     * @param status status code.
-     * @param dev source device.
-     * @param data RDATA.
-     * @hide
-     */
-    protected WifiP2pDnsSdServiceResponse(int status,
-            int tranId, WifiP2pDevice dev, byte[] data) {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR,
-                status, tranId, dev, data);
-        if (!parse()) {
-            throw new IllegalArgumentException("Malformed bonjour service response");
-        }
-    }
-
-    /**
-     * Parse DnsSd service discovery response.
-     *
-     * @return {@code true} if the operation succeeded
-     */
-    private boolean parse() {
-        /*
-         * The data format from Wi-Fi Direct spec is as follows.
-         * ________________________________________________
-         * |  encoded and compressed dns name (variable)  |
-         * ________________________________________________
-         * |       dnstype(2byte)      |  version(1byte)  |
-         * ________________________________________________
-         * |              RDATA (variable)                |
-         */
-        if (mData == null) {
-            // the empty is OK.
-            return true;
-        }
-
-        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(mData));
-
-        mDnsQueryName = readDnsName(dis);
-        if (mDnsQueryName == null) {
-            return false;
-        }
-
-        try {
-            mDnsType = dis.readUnsignedShort();
-            mVersion = dis.readUnsignedByte();
-        } catch (IOException e) {
-            e.printStackTrace();
-            return false;
-        }
-
-        if (mDnsType == WifiP2pDnsSdServiceInfo.DNS_TYPE_PTR) {
-            String rData = readDnsName(dis);
-            if (rData == null) {
-                return false;
-            }
-            if (rData.length() <= mDnsQueryName.length()) {
-                return false;
-            }
-
-            mInstanceName = rData.substring(0,
-                    rData.length() - mDnsQueryName.length() -1);
-        } else if (mDnsType == WifiP2pDnsSdServiceInfo.DNS_TYPE_TXT) {
-            return readTxtData(dis);
-        } else {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Read dns name.
-     *
-     * @param dis data input stream.
-     * @return dns name
-     */
-    private String readDnsName(DataInputStream dis) {
-        StringBuffer sb = new StringBuffer();
-
-        // copy virtual memory packet.
-        HashMap<Integer, String> vmpack = new HashMap<Integer, String>(sVmpack);
-        if (mDnsQueryName != null) {
-            vmpack.put(0x27, mDnsQueryName);
-        }
-        try {
-            while (true) {
-                int i = dis.readUnsignedByte();
-                if (i == 0x00) {
-                    return sb.toString();
-                } else if (i == 0xc0) {
-                    // refer to pointer.
-                    String ref = vmpack.get(dis.readUnsignedByte());
-                    if (ref == null) {
-                        //invalid.
-                        return null;
-                    }
-                    sb.append(ref);
-                    return sb.toString();
-                } else {
-                    byte[] data = new byte[i];
-                    dis.readFully(data);
-                    sb.append(new String(data));
-                    sb.append(".");
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    /**
-     * Read TXT record data.
-     *
-     * @param dis
-     * @return true if TXT data is valid
-     */
-    private boolean readTxtData(DataInputStream dis) {
-        try {
-            while (dis.available() > 0) {
-                int len = dis.readUnsignedByte();
-                if (len == 0) {
-                    break;
-                }
-                byte[] data = new byte[len];
-                dis.readFully(data);
-                String[] keyVal = new String(data).split("=");
-                if (keyVal.length != 2) {
-                    return false;
-                }
-                mTxtRecord.put(keyVal[0], keyVal[1]);
-            }
-            return true;
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        return false;
-    }
-
-    /**
-     * Creates DnsSd service response.
-     *  This is only called from WifiP2pServiceResponse
-     *
-     * @param status status code.
-     * @param dev source device.
-     * @param data DnsSd response data.
-     * @return DnsSd service response data.
-     * @hide
-     */
-    static WifiP2pDnsSdServiceResponse newInstance(int status,
-            int transId, WifiP2pDevice dev, byte[] data) {
-        if (status != WifiP2pServiceResponse.Status.SUCCESS) {
-            return new WifiP2pDnsSdServiceResponse(status,
-                    transId, dev, null);
-        }
-        try {
-            return new WifiP2pDnsSdServiceResponse(status,
-                    transId, dev, data);
-        } catch (IllegalArgumentException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
deleted file mode 100644
index 5d018e7..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.compat.annotation.UnsupportedAppUsage;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A class for storing service information that is advertised
- * over a Wi-Fi peer-to-peer setup
- *
- * @see WifiP2pUpnpServiceInfo
- * @see WifiP2pDnsSdServiceInfo
- */
-public class WifiP2pServiceInfo implements Parcelable {
-
-    /**
-     * All service protocol types.
-     */
-    public static final int SERVICE_TYPE_ALL             = 0;
-
-    /**
-     * DNS based service discovery protocol.
-     */
-    public static final int SERVICE_TYPE_BONJOUR         = 1;
-
-    /**
-     * UPnP protocol.
-     */
-    public static final int SERVICE_TYPE_UPNP            = 2;
-
-    /**
-     * WS-Discovery protocol
-     * @hide
-     */
-    public static final int SERVICE_TYPE_WS_DISCOVERY    = 3;
-
-    /**
-     * Vendor Specific protocol
-     */
-    public static final int SERVICE_TYPE_VENDOR_SPECIFIC = 255;
-
-    /**
-     * the list of query string for wpa_supplicant
-     *
-     * e.g)
-     * # IP Printing over TCP (PTR) (RDATA=MyPrinter._ipp._tcp.local.)
-     * {"bonjour", "045f697070c00c000c01", "094d795072696e746572c027"
-     *
-     * # IP Printing over TCP (TXT) (RDATA=txtvers=1,pdl=application/postscript)
-     * {"bonjour", "096d797072696e746572045f697070c00c001001",
-     *  "09747874766572733d311a70646c3d6170706c69636174696f6e2f706f7374736372797074"}
-     *
-     * [UPnP]
-     * # UPnP uuid
-     * {"upnp", "10", "uuid:6859dede-8574-59ab-9332-123456789012"}
-     *
-     * # UPnP rootdevice
-     * {"upnp", "10", "uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice"}
-     *
-     * # UPnP device
-     * {"upnp", "10", "uuid:6859dede-8574-59ab-9332-123456789012::urn:schemas-upnp
-     * -org:device:InternetGatewayDevice:1"}
-     *
-     *  # UPnP service
-     * {"upnp", "10", "uuid:6859dede-8574-59ab-9322-123456789012::urn:schemas-upnp
-     * -org:service:ContentDirectory:2"}
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    private List<String> mQueryList;
-
-    /**
-     * This is only used in subclass.
-     *
-     * @param queryList query string for wpa_supplicant
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    protected WifiP2pServiceInfo(List<String> queryList) {
-        if (queryList == null) {
-            throw new IllegalArgumentException("query list cannot be null");
-        }
-        mQueryList = queryList;
-    }
-
-   /**
-    * Return the list of the query string for wpa_supplicant.
-    *
-    * @return the list of the query string for wpa_supplicant.
-    * @hide
-    */
-   public List<String> getSupplicantQueryList() {
-       return mQueryList;
-   }
-
-   /**
-    * Converts byte array to hex string.
-    *
-    * @param data
-    * @return hex string.
-    * @hide
-    */
-   static String bin2HexStr(byte[] data) {
-       StringBuffer sb = new StringBuffer();
-
-       for (byte b: data) {
-           String s = null;
-           try {
-               s = Integer.toHexString(b & 0xff);
-           } catch (Exception e) {
-               e.printStackTrace();
-               return null;
-           }
-           //add 0 padding
-           if (s.length() == 1) {
-               sb.append('0');
-           }
-           sb.append(s);
-       }
-       return sb.toString();
-   }
-
-   @Override
-   public boolean equals(Object o) {
-       if (o == this) {
-           return true;
-       }
-       if (!(o instanceof WifiP2pServiceInfo)) {
-           return false;
-       }
-
-       WifiP2pServiceInfo servInfo = (WifiP2pServiceInfo)o;
-       return  mQueryList.equals(servInfo.mQueryList);
-   }
-
-   @Override
-   public int hashCode() {
-       int result = 17;
-       result = 31 * result + (mQueryList == null ? 0 : mQueryList.hashCode());
-       return result;
-   }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeStringList(mQueryList);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public static final @android.annotation.NonNull Creator<WifiP2pServiceInfo> CREATOR =
-        new Creator<WifiP2pServiceInfo>() {
-            public WifiP2pServiceInfo createFromParcel(Parcel in) {
-
-                List<String> data = new ArrayList<String>();
-                in.readStringList(data);
-                return new WifiP2pServiceInfo(data);
-            }
-
-            public WifiP2pServiceInfo[] newArray(int size) {
-                return new WifiP2pServiceInfo[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java
deleted file mode 100644
index dea0477..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.compat.annotation.UnsupportedAppUsage;
-import android.net.wifi.p2p.WifiP2pManager;
-import android.os.Build;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.Locale;
-
-/**
- * A class for creating a service discovery request for use with
- * {@link WifiP2pManager#addServiceRequest} and {@link WifiP2pManager#removeServiceRequest}
- *
- * <p>This class is used to create service discovery request for custom
- * vendor specific service discovery protocol {@link WifiP2pServiceInfo#SERVICE_TYPE_VENDOR_SPECIFIC}
- * or to search all service protocols {@link WifiP2pServiceInfo#SERVICE_TYPE_ALL}.
- *
- * <p>For the purpose of creating a UPnP or Bonjour service request, use
- * {@link WifiP2pUpnpServiceRequest} or {@link WifiP2pDnsSdServiceRequest} respectively.
- *
- * {@see WifiP2pManager}
- * {@see WifiP2pUpnpServiceRequest}
- * {@see WifiP2pDnsSdServiceRequest}
- */
-public class WifiP2pServiceRequest implements Parcelable {
-
-    /**
-     * Service discovery protocol. It's defined in table63 in Wi-Fi Direct specification.
-     */
-    private int mProtocolType;
-
-    /**
-     * The length of the service request TLV.
-     * The value is equal to 2 plus the number of octets in the
-     * query data field.
-     */
-    private int mLength;
-
-    /**
-     * Service transaction ID.
-     * This is a nonzero value used to match the service request/response TLVs.
-     */
-    private int mTransId;
-
-    /**
-     * The hex dump string of query data for the requested service information.
-     *
-     * e.g) DnsSd apple file sharing over tcp (dns name=_afpovertcp._tcp.local.)
-     * 0b5f6166706f766572746370c00c000c01
-     */
-    private String mQuery;
-
-    /**
-     * This constructor is only used in newInstance().
-     *
-     * @param protocolType service discovery protocol.
-     * @param query The part of service specific query.
-     * @hide
-     */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
-    protected WifiP2pServiceRequest(int protocolType, String query) {
-        validateQuery(query);
-
-        mProtocolType = protocolType;
-        mQuery = query;
-        if (query != null) {
-            mLength = query.length()/2 + 2;
-        } else {
-            mLength = 2;
-        }
-    }
-
-    /**
-     * This constructor is only used in Parcelable.
-     *
-     * @param serviceType service discovery type.
-     * @param length the length of service discovery packet.
-     * @param transId the transaction id
-     * @param query The part of service specific query.
-     */
-    private WifiP2pServiceRequest(int serviceType, int length,
-            int transId, String query) {
-        mProtocolType = serviceType;
-        mLength = length;
-        mTransId = transId;
-        mQuery = query;
-    }
-
-    /**
-     * Return transaction id.
-     *
-     * @return transaction id
-     * @hide
-     */
-    public int getTransactionId() {
-        return mTransId;
-    }
-
-    /**
-     * Set transaction id.
-     *
-     * @param id
-     * @hide
-     */
-    public void setTransactionId(int id) {
-        mTransId = id;
-    }
-
-    /**
-     * Return wpa_supplicant request string.
-     *
-     * The format is the hex dump of the following frame.
-     * <pre>
-     * _______________________________________________________________
-     * |        Length (2)        |   Type (1)   | Transaction ID (1) |
-     * |                  Query Data (variable)                       |
-     * </pre>
-     *
-     * @return wpa_supplicant request string.
-     * @hide
-     */
-    public String getSupplicantQuery() {
-        StringBuffer sb = new StringBuffer();
-        // length is retained as little endian format.
-        sb.append(String.format(Locale.US, "%02x", (mLength) & 0xff));
-        sb.append(String.format(Locale.US, "%02x", (mLength >> 8) & 0xff));
-        sb.append(String.format(Locale.US, "%02x", mProtocolType));
-        sb.append(String.format(Locale.US, "%02x", mTransId));
-        if (mQuery != null) {
-            sb.append(mQuery);
-        }
-
-        return sb.toString();
-    }
-
-    /**
-     * Validate query.
-     *
-     * <p>If invalid, throw IllegalArgumentException.
-     * @param query The part of service specific query.
-     */
-    private void validateQuery(String query) {
-        if (query == null) {
-            return;
-        }
-
-        int UNSIGNED_SHORT_MAX = 0xffff;
-        if (query.length()%2 == 1) {
-            throw new IllegalArgumentException(
-                    "query size is invalid. query=" + query);
-        }
-        if (query.length()/2 > UNSIGNED_SHORT_MAX) {
-            throw new IllegalArgumentException(
-                    "query size is too large. len=" + query.length());
-        }
-
-        // check whether query is hex string.
-        query = query.toLowerCase(Locale.ROOT);
-        char[] chars = query.toCharArray();
-        for (char c: chars) {
-            if (!((c >= '0' && c <= '9') ||
-                    (c >= 'a' && c <= 'f'))){
-                throw new IllegalArgumentException(
-                        "query should be hex string. query=" + query);
-            }
-        }
-    }
-
-    /**
-     * Create a service discovery request.
-     *
-     * @param protocolType can be {@link WifiP2pServiceInfo#SERVICE_TYPE_ALL}
-     * or {@link WifiP2pServiceInfo#SERVICE_TYPE_VENDOR_SPECIFIC}.
-     * In order to create a UPnP or Bonjour service request, use
-     * {@link WifiP2pUpnpServiceRequest} or {@link WifiP2pDnsSdServiceRequest}
-     * respectively
-     *
-     * @param queryData hex string that is vendor specific.  Can be null.
-     * @return service discovery request.
-     */
-    public static WifiP2pServiceRequest newInstance(int protocolType, String queryData) {
-        return new WifiP2pServiceRequest(protocolType, queryData);
-    }
-
-    /**
-     * Create a service discovery request.
-     *
-     * @param protocolType can be {@link WifiP2pServiceInfo#SERVICE_TYPE_ALL}
-     * or {@link WifiP2pServiceInfo#SERVICE_TYPE_VENDOR_SPECIFIC}.
-     * In order to create a UPnP or Bonjour service request, use
-     * {@link WifiP2pUpnpServiceRequest} or {@link WifiP2pDnsSdServiceRequest}
-     * respectively
-     *
-     * @return service discovery request.
-     */
-    public static WifiP2pServiceRequest newInstance(int protocolType ) {
-        return new WifiP2pServiceRequest(protocolType, null);
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (o == this) {
-            return true;
-        }
-        if (!(o instanceof WifiP2pServiceRequest)) {
-            return false;
-        }
-
-        WifiP2pServiceRequest req = (WifiP2pServiceRequest)o;
-
-        /*
-         * Not compare transaction id.
-         * Transaction id may be changed on each service discovery operation.
-         */
-        if ((req.mProtocolType != mProtocolType) ||
-                (req.mLength != mLength)) {
-            return false;
-        }
-
-        if (req.mQuery == null && mQuery == null) {
-            return true;
-        } else if (req.mQuery != null) {
-            return req.mQuery.equals(mQuery);
-        }
-        return false;
-   }
-
-    @Override
-    public int hashCode() {
-        int result = 17;
-        result = 31 * result + mProtocolType;
-        result = 31 * result + mLength;
-        result = 31 * result + (mQuery == null ? 0 : mQuery.hashCode());
-        return result;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mProtocolType);
-        dest.writeInt(mLength);
-        dest.writeInt(mTransId);
-        dest.writeString(mQuery);
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
-    public static final @android.annotation.NonNull Creator<WifiP2pServiceRequest> CREATOR =
-        new Creator<WifiP2pServiceRequest>() {
-            public WifiP2pServiceRequest createFromParcel(Parcel in) {
-                int servType = in.readInt();
-                int length = in.readInt();
-                int transId = in.readInt();
-                String query = in.readString();
-                return new WifiP2pServiceRequest(servType, length, transId, query);
-            }
-
-            public WifiP2pServiceRequest[] newArray(int size) {
-                return new WifiP2pServiceRequest[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceResponse.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceResponse.java
deleted file mode 100644
index 1b9c080..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceResponse.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.net.wifi.p2p.WifiP2pDevice;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * The class for a response of service discovery.
- *
- * @hide
- */
-public class WifiP2pServiceResponse implements Parcelable {
-
-    private static int MAX_BUF_SIZE = 1024;
-
-    /**
-     * Service type. It's defined in table63 in Wi-Fi Direct specification.
-     */
-    protected int mServiceType;
-
-    /**
-     * Status code of service discovery response.
-     * It's defined in table65 in Wi-Fi Direct specification.
-     * @see Status
-     */
-    protected int mStatus;
-
-    /**
-     * Service transaction ID.
-     * This is a nonzero value used to match the service request/response TLVs.
-     */
-    protected int mTransId;
-
-    /**
-     * Source device.
-     */
-    protected WifiP2pDevice mDevice;
-
-    /**
-     * Service discovery response data based on the requested on
-     * the service protocol type. The protocol format depends on the service type.
-     */
-    protected byte[] mData;
-
-
-    /**
-     * The status code of service discovery response.
-     * Currently 4 status codes are defined and the status codes from  4 to 255
-     * are reserved.
-     *
-     * See Wi-Fi Direct specification for the detail.
-     */
-    public static class Status {
-        /** success */
-        public static final int SUCCESS = 0;
-
-        /** the service protocol type is not available */
-        public static final int SERVICE_PROTOCOL_NOT_AVAILABLE = 1;
-
-        /** the requested information is not available */
-        public static final int REQUESTED_INFORMATION_NOT_AVAILABLE = 2;
-
-        /** bad request */
-        public static final int BAD_REQUEST = 3;
-
-        /** @hide */
-        public static String toString(int status) {
-            switch(status) {
-            case SUCCESS:
-                return "SUCCESS";
-            case SERVICE_PROTOCOL_NOT_AVAILABLE:
-                return "SERVICE_PROTOCOL_NOT_AVAILABLE";
-            case REQUESTED_INFORMATION_NOT_AVAILABLE:
-                return "REQUESTED_INFORMATION_NOT_AVAILABLE";
-            case BAD_REQUEST:
-                return "BAD_REQUEST";
-            default:
-                return "UNKNOWN";
-            }
-        }
-
-        /** not used */
-        private Status() {}
-    }
-
-    /**
-     * Hidden constructor. This is only used in framework.
-     *
-     * @param serviceType service discovery type.
-     * @param status status code.
-     * @param transId transaction id.
-     * @param device source device.
-     * @param data query data.
-     */
-    protected WifiP2pServiceResponse(int serviceType, int status, int transId,
-            WifiP2pDevice device, byte[] data) {
-        mServiceType = serviceType;
-        mStatus = status;
-        mTransId = transId;
-        mDevice = device;
-        mData = data;
-    }
-
-    /**
-     * Return the service type of service discovery response.
-     *
-     * @return service discovery type.<br>
-     * e.g) {@link WifiP2pServiceInfo#SERVICE_TYPE_BONJOUR}
-     */
-    public int getServiceType() {
-        return mServiceType;
-    }
-
-    /**
-     * Return the status code of service discovery response.
-     *
-     * @return status code.
-     * @see Status
-     */
-    public int getStatus() {
-        return mStatus;
-    }
-
-    /**
-     * Return the transaction id of service discovery response.
-     *
-     * @return transaction id.
-     * @hide
-     */
-    public int getTransactionId() {
-        return mTransId;
-    }
-
-    /**
-     * Return response data.
-     *
-     * <pre>Data format depends on service type
-     *
-     * @return a query or response data.
-     */
-    public byte[] getRawData() {
-        return mData;
-    }
-
-    /**
-     * Returns the source device of service discovery response.
-     *
-     * <pre>This is valid only when service discovery response.
-     *
-     * @return the source device of service discovery response.
-     */
-    public WifiP2pDevice getSrcDevice() {
-        return mDevice;
-    }
-
-    /** @hide */
-    public void setSrcDevice(WifiP2pDevice dev) {
-        if (dev == null) return;
-        this.mDevice = dev;
-    }
-
-
-    /**
-     * Create the list of  WifiP2pServiceResponse instance from supplicant event.
-     *
-     * @param srcAddr source address of the service response
-     * @param tlvsBin byte array containing the binary tlvs data
-     * @return if parse failed, return null
-     * @hide
-     */
-    public static List<WifiP2pServiceResponse> newInstance(String srcAddr, byte[] tlvsBin) {
-        //updateIndicator not used, and not passed up from supplicant
-
-        List<WifiP2pServiceResponse> respList = new ArrayList<WifiP2pServiceResponse>();
-        WifiP2pDevice dev = new WifiP2pDevice();
-        dev.deviceAddress = srcAddr;
-        if (tlvsBin == null) {
-            return null;
-        }
-
-
-        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(tlvsBin));
-        try {
-            while (dis.available() > 0) {
-                /*
-                 * Service discovery header is as follows.
-                 * ______________________________________________________________
-                 * |           Length(2byte)     | Type(1byte) | TransId(1byte)}|
-                 * ______________________________________________________________
-                 * | status(1byte)  |            vendor specific(variable)      |
-                 */
-                // The length equals to 3 plus the number of octets in the vendor
-                // specific content field. And this is little endian.
-                int length = (dis.readUnsignedByte() +
-                        (dis.readUnsignedByte() << 8)) - 3;
-                int type = dis.readUnsignedByte();
-                int transId = dis.readUnsignedByte();
-                int status = dis.readUnsignedByte();
-                if (length < 0) {
-                    return null;
-                }
-                if (length == 0) {
-                    if (status == Status.SUCCESS) {
-                        respList.add(new WifiP2pServiceResponse(type, status,
-                            transId, dev, null));
-                    }
-                    continue;
-                }
-                if (length > MAX_BUF_SIZE) {
-                    dis.skip(length);
-                    continue;
-                }
-                byte[] data = new byte[length];
-                dis.readFully(data);
-
-                WifiP2pServiceResponse resp;
-                if (type ==  WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR) {
-                    resp = WifiP2pDnsSdServiceResponse.newInstance(status,
-                            transId, dev, data);
-                } else if (type == WifiP2pServiceInfo.SERVICE_TYPE_UPNP) {
-                    resp = WifiP2pUpnpServiceResponse.newInstance(status,
-                            transId, dev, data);
-                } else {
-                    resp = new WifiP2pServiceResponse(type, status, transId, dev, data);
-                }
-                if (resp != null && resp.getStatus() == Status.SUCCESS) {
-                    respList.add(resp);
-                }
-            }
-            return respList;
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        if (respList.size() > 0) {
-            return respList;
-        }
-        return null;
-    }
-
-    /**
-     * Converts hex string to byte array.
-     *
-     * @param hex hex string. if invalid, return null.
-     * @return binary data.
-     */
-    private static byte[] hexStr2Bin(String hex) {
-        int sz = hex.length()/2;
-        byte[] b = new byte[hex.length()/2];
-
-        for (int i=0;i<sz;i++) {
-            try {
-                b[i] = (byte)Integer.parseInt(hex.substring(i*2, i*2+2), 16);
-            } catch (Exception e) {
-                e.printStackTrace();
-                return null;
-            }
-        }
-        return b;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("serviceType:").append(mServiceType);
-        sbuf.append(" status:").append(Status.toString(mStatus));
-        sbuf.append(" srcAddr:").append(mDevice.deviceAddress);
-        sbuf.append(" data:").append(Arrays.toString(mData));
-        return sbuf.toString();
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (o == this) {
-            return true;
-        }
-        if (!(o instanceof WifiP2pServiceResponse)) {
-            return false;
-        }
-
-        WifiP2pServiceResponse req = (WifiP2pServiceResponse)o;
-
-        return (req.mServiceType == mServiceType) &&
-            (req.mStatus == mStatus) &&
-                equals(req.mDevice.deviceAddress, mDevice.deviceAddress) &&
-                Arrays.equals(req.mData, mData);
-    }
-
-    private boolean equals(Object a, Object b) {
-        if (a == null && b == null) {
-            return true;
-        } else if (a != null) {
-            return a.equals(b);
-        }
-        return false;
-    }
-
-    @Override
-    public int hashCode() {
-        int result = 17;
-        result = 31 * result + mServiceType;
-        result = 31 * result + mStatus;
-        result = 31 * result + mTransId;
-        result = 31 * result + (mDevice.deviceAddress == null ?
-                0 : mDevice.deviceAddress.hashCode());
-        result = 31 * result + (mData == null ? 0 : Arrays.hashCode(mData));
-        return result;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public int describeContents() {
-        return 0;
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mServiceType);
-        dest.writeInt(mStatus);
-        dest.writeInt(mTransId);
-        dest.writeParcelable(mDevice, flags);
-        if (mData == null || mData.length == 0) {
-            dest.writeInt(0);
-        } else {
-            dest.writeInt(mData.length);
-            dest.writeByteArray(mData);
-        }
-    }
-
-    /** Implement the Parcelable interface {@hide} */
-    public static final @android.annotation.NonNull Creator<WifiP2pServiceResponse> CREATOR =
-        new Creator<WifiP2pServiceResponse>() {
-            public WifiP2pServiceResponse createFromParcel(Parcel in) {
-
-                int type = in.readInt();
-                int status = in.readInt();
-                int transId = in.readInt();
-                WifiP2pDevice dev = (WifiP2pDevice)in.readParcelable(null);
-                int len = in.readInt();
-                byte[] data = null;
-                if (len > 0) {
-                    data = new byte[len];
-                    in.readByteArray(data);
-                }
-                if (type ==  WifiP2pServiceInfo.SERVICE_TYPE_BONJOUR) {
-                    return WifiP2pDnsSdServiceResponse.newInstance(status,
-                            transId, dev, data);
-                } else if (type == WifiP2pServiceInfo.SERVICE_TYPE_UPNP) {
-                    return WifiP2pUpnpServiceResponse.newInstance(status,
-                            transId, dev, data);
-                }
-                return new WifiP2pServiceResponse(type, status, transId, dev, data);
-            }
-
-            public WifiP2pServiceResponse[] newArray(int size) {
-                return new WifiP2pServiceResponse[size];
-            }
-        };
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfo.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfo.java
deleted file mode 100644
index a4cdfd9..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfo.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.UUID;
-
-/**
- * A class for storing Upnp service information that is advertised
- * over a Wi-Fi peer-to-peer setup.
- *
- * {@see android.net.wifi.p2p.WifiP2pManager#addLocalService}
- * {@see android.net.wifi.p2p.WifiP2pManager#removeLocalService}
- * {@see WifiP2pServiceInfo}
- * {@see WifiP2pDnsSdServiceInfo}
- */
-public class WifiP2pUpnpServiceInfo extends WifiP2pServiceInfo {
-
-    /**
-     * UPnP version 1.0.
-     *
-     * <pre>Query Version should always be set to 0x10 if the query values are
-     * compatible with UPnP Device Architecture 1.0.
-     * @hide
-     */
-    public static final int VERSION_1_0 = 0x10;
-
-    /**
-     * This constructor is only used in newInstance().
-     *
-     * @param queryList
-     */
-    private WifiP2pUpnpServiceInfo(List<String> queryList) {
-        super(queryList);
-    }
-
-    /**
-     * Create UPnP service information object.
-     *
-     * @param uuid a string representation of this UUID in the following format,
-     *  as per <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>.<br>
-     *  e.g) 6859dede-8574-59ab-9332-123456789012
-     * @param device a string representation of this device in the following format,
-     * as per
-     * <a href="http://www.upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf">
-     *  UPnP Device Architecture1.1</a><br>
-     *  e.g) urn:schemas-upnp-org:device:MediaServer:1
-     * @param services a string representation of this service in the following format,
-     * as per
-     * <a href="http://www.upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf">
-     *  UPnP Device Architecture1.1</a><br>
-     *  e.g) urn:schemas-upnp-org:service:ContentDirectory:1
-     * @return UPnP service information object.
-     */
-    public static WifiP2pUpnpServiceInfo newInstance(String uuid,
-            String device, List<String> services) {
-        if (uuid == null || device == null) {
-            throw new IllegalArgumentException("uuid or device cannnot be null");
-        }
-        UUID.fromString(uuid);
-
-        ArrayList<String> info = new ArrayList<String>();
-
-        info.add(createSupplicantQuery(uuid, null));
-        info.add(createSupplicantQuery(uuid, "upnp:rootdevice"));
-        info.add(createSupplicantQuery(uuid, device));
-        if (services != null) {
-            for (String service:services) {
-                info.add(createSupplicantQuery(uuid, service));
-            }
-        }
-
-        return new WifiP2pUpnpServiceInfo(info);
-    }
-
-    /**
-     * Create wpa_supplicant service query for upnp.
-     *
-     * @param uuid
-     * @param data
-     * @return wpa_supplicant service query for upnp
-     */
-    private static String createSupplicantQuery(String uuid, String data) {
-        StringBuffer sb = new StringBuffer();
-        sb.append("upnp ");
-        sb.append(String.format(Locale.US, "%02x ", VERSION_1_0));
-        sb.append("uuid:");
-        sb.append(uuid);
-        if (data != null) {
-            sb.append("::");
-            sb.append(data);
-        }
-        return sb.toString();
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequest.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequest.java
deleted file mode 100644
index 98e447e..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequest.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.net.wifi.p2p.WifiP2pManager;
-
-import java.util.Locale;
-
-/**
- * A class for creating a Upnp service discovery request for use with
- * {@link WifiP2pManager#addServiceRequest} and {@link WifiP2pManager#removeServiceRequest}
- *
- * {@see WifiP2pManager}
- * {@see WifiP2pServiceRequest}
- * {@see WifiP2pDnsSdServiceRequest}
- */
-public class WifiP2pUpnpServiceRequest extends WifiP2pServiceRequest {
-
-    /**
-     * This constructor is only used in newInstance().
-     *
-     * @param query The part of service specific query.
-     * @hide
-     */
-    protected WifiP2pUpnpServiceRequest(String query) {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_UPNP, query);
-    }
-
-    /**
-     * This constructor is only used in newInstance().
-     * @hide
-     */
-    protected WifiP2pUpnpServiceRequest() {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_UPNP, null);
-    }
-
-    /**
-     * Create a service discovery request to search all UPnP services.
-     *
-     * @return service request for UPnP.
-     */
-    public static WifiP2pUpnpServiceRequest newInstance() {
-        return new WifiP2pUpnpServiceRequest();
-    }
-    /**
-     * Create a service discovery request to search specified UPnP services.
-     *
-     * @param st ssdp search target.  Cannot be null.<br>
-     * e.g ) <br>
-     * <ul>
-     * <li>"ssdp:all"
-     * <li>"upnp:rootdevice"
-     * <li>"urn:schemas-upnp-org:device:MediaServer:2"
-     * <li>"urn:schemas-upnp-org:service:ContentDirectory:2"
-     * <li>"uuid:6859dede-8574-59ab-9332-123456789012"
-     * </ul>
-     * @return service request for UPnP.
-     */
-    public static WifiP2pUpnpServiceRequest newInstance(String st) {
-        if (st == null) {
-            throw new IllegalArgumentException("search target cannot be null");
-        }
-        StringBuffer sb = new StringBuffer();
-        sb.append(String.format(Locale.US, "%02x", WifiP2pUpnpServiceInfo.VERSION_1_0));
-        sb.append(WifiP2pServiceInfo.bin2HexStr(st.getBytes()));
-        return new WifiP2pUpnpServiceRequest(sb.toString());
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceResponse.java b/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceResponse.java
deleted file mode 100644
index ab95af6f6..0000000
--- a/wifi/java/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceResponse.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import android.net.wifi.p2p.WifiP2pDevice;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * A class for a response of upnp service discovery.
- *
- * @hide
- */
-public class WifiP2pUpnpServiceResponse extends WifiP2pServiceResponse {
-
-    /**
-     * UPnP version. should be {@link WifiP2pUpnpServiceInfo#VERSION_1_0}
-     */
-    private int mVersion;
-
-    /**
-     * The list of Unique Service Name.
-     * e.g)
-     *{"uuid:6859dede-8574-59ab-9332-123456789012",
-     *"uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice"}
-     */
-    private List<String> mUniqueServiceNames;
-
-    /**
-     * Return UPnP version number.
-     *
-     * @return version number.
-     * @see WifiP2pUpnpServiceInfo#VERSION_1_0
-     */
-    public int getVersion() {
-        return mVersion;
-    }
-
-    /**
-     * Return Unique Service Name strings.
-     *
-     * @return Unique Service Name.<br>
-     * e.g ) <br>
-     * <ul>
-     * <li>"uuid:6859dede-8574-59ab-9332-123456789012"
-     * <li>"uuid:6859dede-8574-59ab-9332-123456789012::upnp:rootdevice"
-     * <li>"uuid:6859dede-8574-59ab-9332-123456789012::urn:schemas-upnp-org:device:
-     * MediaServer:2"
-     * <li>"uuid:6859dede-8574-59ab-9332-123456789012::urn:schemas-upnp-org:service:
-     * ContentDirectory:2"
-     * </ul>
-     */
-    public List<String> getUniqueServiceNames() {
-        return mUniqueServiceNames;
-    }
-
-    /**
-     * hidden constructor.
-     *
-     * @param status status code
-     * @param transId transaction id
-     * @param dev source device
-     * @param data UPnP response data.
-     */
-    protected WifiP2pUpnpServiceResponse(int status,
-            int transId, WifiP2pDevice dev, byte[] data) {
-        super(WifiP2pServiceInfo.SERVICE_TYPE_UPNP,
-                status, transId, dev, data);
-        if (!parse()) {
-            throw new IllegalArgumentException("Malformed upnp service response");
-        }
-    }
-
-    /**
-     * Parse UPnP service discovery response
-     *
-     * @return {@code true} if the operation succeeded
-     */
-    private boolean parse() {
-        /*
-         * The data format is as follows.
-         *
-         * ______________________________________________________
-         * |  Version (1)  |          USN (Variable)            |
-         */
-        if (mData == null) {
-            // the empty is OK.
-            return true;
-        }
-
-        if (mData.length < 1) {
-            return false;
-        }
-
-        mVersion = mData[0] & 0xff;
-        String[] names = new String(mData, 1, mData.length-1).split(",");
-        mUniqueServiceNames = new ArrayList<String>();
-        for (String name : names) {
-            mUniqueServiceNames.add(name);
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        StringBuffer sbuf = new StringBuffer();
-        sbuf.append("serviceType:UPnP(").append(mServiceType).append(")");
-        sbuf.append(" status:").append(Status.toString(mStatus));
-        sbuf.append(" srcAddr:").append(mDevice.deviceAddress);
-        sbuf.append(" version:").append(String.format("%02x", mVersion));
-        if (mUniqueServiceNames != null) {
-            for (String name : mUniqueServiceNames) {
-                sbuf.append(" usn:").append(name);
-            }
-        }
-        return sbuf.toString();
-    }
-
-    /**
-     * Create upnp service response.
-     *
-     * <pre>This is only used in{@link WifiP2pServiceResponse}
-     *
-     * @param status status code.
-     * @param transId transaction id.
-     * @param device source device.
-     * @param data UPnP response data.
-     * @return UPnP service response data.
-     * @hide
-     */
-    static WifiP2pUpnpServiceResponse newInstance(int status,
-            int transId, WifiP2pDevice device, byte[] data) {
-        if (status != WifiP2pServiceResponse.Status.SUCCESS) {
-            return new WifiP2pUpnpServiceResponse(status, transId, device, null);
-        }
-
-        try {
-            return new WifiP2pUpnpServiceResponse(status, transId, device, data);
-        } catch (IllegalArgumentException e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-}
diff --git a/wifi/java/android/net/wifi/p2p/package.html b/wifi/java/android/net/wifi/p2p/package.html
deleted file mode 100644
index 6a5e8e6..0000000
--- a/wifi/java/android/net/wifi/p2p/package.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<HTML>
-<BODY>
-<p>Provides classes to create peer-to-peer (P2P) connections with Wi-Fi Direct.</p>
-
-<p>Using these APIs, you can discover and connect to other devices when each
-device supports Wi-Fi Direct, then communicate over a speedy connection across distances much longer
-than a Bluetooth connection. The primary class you need to work with is {@link
-android.net.wifi.p2p.WifiP2pManager}, which you can acquire by calling {@link
-android.app.Activity#getSystemService getSystemService(WIFI_P2P_SERVICE)}. The {@link
-android.net.wifi.p2p.WifiP2pManager} includes APIs that allow you to:</p>
-<ul>
-<li>Initialize your application for P2P connections by calling {@link
-android.net.wifi.p2p.WifiP2pManager#initialize initialize()}</li>
-
-<li>Discover nearby devices by calling {@link android.net.wifi.p2p.WifiP2pManager#discoverPeers
-discoverPeers()}</li>
-
-<li>Start a P2P connection by calling {@link android.net.wifi.p2p.WifiP2pManager#connect
-connect()}</li>
-<li>And more</li>
-</ul>
-
-<p>Several other interfaces and classes are necessary as well, such as:</p>
-<ul>
-<li>The {@link android.net.wifi.p2p.WifiP2pManager.ActionListener} interface allows you to receive
-callbacks when an operation such as discovering peers or connecting to them succeeds or fails.</li>
-
-<li>{@link android.net.wifi.p2p.WifiP2pManager.PeerListListener} interface allows you to receive
-information about discovered peers. The callback provides a {@link
-android.net.wifi.p2p.WifiP2pDeviceList}, from which you can retrieve a {@link
-android.net.wifi.p2p.WifiP2pDevice} object for each device within range and get information such as
-the device name, address, device type, the WPS configurations the device supports, and more.</li>
-
-<li>The {@link android.net.wifi.p2p.WifiP2pManager.GroupInfoListener} interface allows you to
-receive information about a P2P group. The callback provides a {@link
-android.net.wifi.p2p.WifiP2pGroup} object, which provides group information such as the owner, the
-network name, and passphrase.</li>
-
-<li>{@link android.net.wifi.p2p.WifiP2pManager.ConnectionInfoListener} interface allows you to
-receive information about the current connection. The callback provides a {@link
-android.net.wifi.p2p.WifiP2pInfo} object, which has information such as whether a group has been
-formed and who is the group owner.</li>
-</ul>
-
-<p>In order to use the Wi-Fi P2P APIs, your app must request the following user permissions:</p>
-<ul>
-<li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li>
-<li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li>
-<li>{@link android.Manifest.permission#INTERNET} (although your app doesn’t technically connect
-to the Internet, communicating to Wi-Fi Direct peers with standard java sockets requires Internet
-permission).</li>
-</ul>
-
-<p>For example code, see the <a href="{@docRoot}resources/samples/WiFiDirectDemo/index.html">Wi-Fi
-Direct Demo</a> sample application.</p>
-
-<p class="note"><strong>Note:</strong> Not all Android-powered devices support Wi-Fi
-Direct. If your application uses Wi-Fi Direct, declare so with a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
-element in the manifest file:</p>
-<pre>
-&lt;manifest ...>
-    &lt;uses-feature android:name="android.hardware.wifi.direct" />
-    ...
-&lt;/manifest>
-</pre>
-</BODY>
-</HTML>
diff --git a/wifi/java/android/net/wifi/package.html b/wifi/java/android/net/wifi/package.html
deleted file mode 100644
index b21d39d..0000000
--- a/wifi/java/android/net/wifi/package.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<HTML>
-<BODY>
-<p>Provides classes to manage Wi-Fi functionality on the device.</p>
-<p>The Wi-Fi APIs provide a means by which applications can communicate 
-with the lower-level wireless stack that provides Wi-Fi network access. Almost all
-information from the device supplicant is available, including the connected network's
-link speed, IP address, negotiation state, and more, plus information about other
-networks that are available. Some other API features include the ability to
-scan, add, save, terminate and initiate Wi-Fi connections.</p>
-
-<p>Some APIs may require the following user permissions:</p>
-<ul>
-  <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li>
-  <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li>
-  <li>{@link android.Manifest.permission#CHANGE_WIFI_MULTICAST_STATE}</li>
-</ul>
-
-<p class="note"><strong>Note:</strong> Not all Android-powered devices provide Wi-Fi functionality.
-If your application uses Wi-Fi, declare so with a <a
-href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a>
-element in the manifest file:</p>
-<pre>
-&lt;manifest ...>
-    &lt;uses-feature android:name="android.hardware.wifi" />
-    ...
-&lt;/manifest>
-</pre>
-</BODY>
-</HTML>
diff --git a/wifi/java/android/net/wifi/rtt/CivicLocation.java b/wifi/java/android/net/wifi/rtt/CivicLocation.java
deleted file mode 100644
index 1d41177..0000000
--- a/wifi/java/android/net/wifi/rtt/CivicLocation.java
+++ /dev/null
@@ -1,333 +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.net.wifi.rtt;
-
-import android.annotation.Nullable;
-import android.location.Address;
-import android.net.wifi.rtt.CivicLocationKeys.CivicLocationKeysType;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.Parcelable.Creator;
-import android.util.SparseArray;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Locale;
-import java.util.Objects;
-
-/**
- * Decodes the Type Length Value (TLV) elements found in a Location Civic Record as defined by IEEE
- * P802.11-REVmc/D8.0 section 9.4.2.22.13 using the format described in IETF RFC 4776.
- *
- * <p>The TLVs each define a key, value pair for a civic address type such as apt, street, city,
- * county, and country. The class provides a general getter method to extract a value for an element
- * key, returning null if not set.
- *
- * @hide
- */
-public final class CivicLocation implements Parcelable {
-    // Address (class) line indexes
-    private static final int ADDRESS_LINE_0_ROOM_DESK_FLOOR = 0;
-    private static final int ADDRESS_LINE_1_NUMBER_ROAD_SUFFIX_APT = 1;
-    private static final int ADDRESS_LINE_2_CITY = 2;
-    private static final int ADDRESS_LINE_3_STATE_POSTAL_CODE = 3;
-    private static final int ADDRESS_LINE_4_COUNTRY = 4;
-
-    // Buffer management
-    private static final int MIN_CIVIC_BUFFER_SIZE = 3;
-    private static final int MAX_CIVIC_BUFFER_SIZE = 256;
-    private static final int COUNTRY_CODE_LENGTH = 2;
-    private static final int BYTE_MASK = 0xFF;
-    private static final int TLV_TYPE_INDEX = 0;
-    private static final int TLV_LENGTH_INDEX = 1;
-    private static final int TLV_VALUE_INDEX = 2;
-
-    private final boolean mIsValid;
-    private final String mCountryCode; // Two character country code (ISO 3166 standard).
-    private SparseArray<String> mCivicAddressElements =
-            new SparseArray<>(MIN_CIVIC_BUFFER_SIZE);
-
-
-    /**
-     * Constructor
-     *
-     * @param civicTLVs    a byte buffer containing parameters in the form type, length, value
-     * @param countryCode the two letter code defined by the ISO 3166 standard
-     *
-     * @hide
-     */
-    public CivicLocation(@Nullable byte[] civicTLVs, @Nullable String countryCode) {
-        this.mCountryCode = countryCode;
-        if (countryCode == null || countryCode.length() != COUNTRY_CODE_LENGTH) {
-            this.mIsValid = false;
-            return;
-        }
-        boolean isValid = false;
-        if (civicTLVs != null
-                && civicTLVs.length >= MIN_CIVIC_BUFFER_SIZE
-                && civicTLVs.length < MAX_CIVIC_BUFFER_SIZE) {
-            isValid = parseCivicTLVs(civicTLVs);
-        }
-
-        mIsValid = isValid;
-    }
-
-    private CivicLocation(Parcel in) {
-        mIsValid = in.readByte() != 0;
-        mCountryCode = in.readString();
-        mCivicAddressElements = in.readSparseArray(this.getClass().getClassLoader());
-    }
-
-    public static final @android.annotation.NonNull Creator<CivicLocation> CREATOR = new Creator<CivicLocation>() {
-        @Override
-        public CivicLocation createFromParcel(Parcel in) {
-            return new CivicLocation(in);
-        }
-
-        @Override
-        public CivicLocation[] newArray(int size) {
-            return new CivicLocation[size];
-        }
-    };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int flags) {
-        parcel.writeByte((byte) (mIsValid ? 1 : 0));
-        parcel.writeString(mCountryCode);
-        parcel.writeSparseArray((android.util.SparseArray) mCivicAddressElements);
-    }
-
-    /**
-     * Check TLV format and store TLV key/value pairs in this object so they can be queried by key.
-     *
-     * @param civicTLVs the buffer of TLV elements
-     * @return a boolean indicating success of the parsing process
-     */
-    private boolean parseCivicTLVs(byte[] civicTLVs) {
-        int bufferPtr = 0;
-        int bufferLength = civicTLVs.length;
-
-        // Iterate through the sub-elements contained in the LCI IE checking the accumulated
-        // element lengths do not overflow the total buffer length
-        while (bufferPtr < bufferLength) {
-            int civicAddressType = civicTLVs[bufferPtr + TLV_TYPE_INDEX] & BYTE_MASK;
-            int civicAddressTypeLength = civicTLVs[bufferPtr + TLV_LENGTH_INDEX];
-            if (civicAddressTypeLength != 0) {
-                if (bufferPtr + TLV_VALUE_INDEX + civicAddressTypeLength > bufferLength) {
-                    return false;
-                }
-                mCivicAddressElements.put(civicAddressType,
-                        new String(civicTLVs, bufferPtr + TLV_VALUE_INDEX,
-                                civicAddressTypeLength, StandardCharsets.UTF_8));
-            }
-            bufferPtr += civicAddressTypeLength + TLV_VALUE_INDEX;
-        }
-        return true;
-    }
-
-    /**
-     * Getter for the value of a civic Address element type.
-     *
-     * @param key an integer code for the element type key
-     * @return the string value associated with that element type
-     */
-    @Nullable
-    public String getCivicElementValue(@CivicLocationKeysType int key) {
-        return mCivicAddressElements.get(key);
-    }
-
-    /**
-     * Converts a CivicLocation object to a SparseArray.
-     *
-     * @return the SparseArray<string> representation of the CivicLocation
-     */
-    @Nullable
-    public SparseArray<String> toSparseArray() {
-        return mCivicAddressElements;
-    }
-
-    /**
-     * Generates a comma separated string of all the defined elements.
-     *
-     * @return a compiled string representing all elements
-     */
-    @Override
-    public String toString() {
-        return mCivicAddressElements.toString();
-    }
-
-    /**
-     * Converts Civic Location to the best effort Address Object.
-     *
-     * @return the {@link Address} object based on the Civic Location data
-     */
-    @Nullable
-    public Address toAddress() {
-        if (!mIsValid) {
-            return null;
-        }
-        Address address = new Address(Locale.US);
-        String room = formatAddressElement("Room: ", getCivicElementValue(CivicLocationKeys.ROOM));
-        String desk =
-                formatAddressElement(" Desk: ", getCivicElementValue(CivicLocationKeys.DESK));
-        String floor =
-                formatAddressElement(", Flr: ", getCivicElementValue(CivicLocationKeys.FLOOR));
-        String houseNumber = formatAddressElement("", getCivicElementValue(CivicLocationKeys.HNO));
-        String houseNumberSuffix =
-                formatAddressElement("", getCivicElementValue(CivicLocationKeys.HNS));
-        String road =
-                formatAddressElement(" ", getCivicElementValue(
-                        CivicLocationKeys.PRIMARY_ROAD_NAME));
-        String roadSuffix = formatAddressElement(" ", getCivicElementValue(CivicLocationKeys.STS));
-        String apt = formatAddressElement(", Apt: ", getCivicElementValue(CivicLocationKeys.APT));
-        String city = formatAddressElement("", getCivicElementValue(CivicLocationKeys.CITY));
-        String state = formatAddressElement("", getCivicElementValue(CivicLocationKeys.STATE));
-        String postalCode =
-                formatAddressElement(" ", getCivicElementValue(CivicLocationKeys.POSTAL_CODE));
-
-        // Aggregation into common address format
-        String addressLine0 =
-                new StringBuilder().append(room).append(desk).append(floor).toString();
-        String addressLine1 =
-                new StringBuilder().append(houseNumber).append(houseNumberSuffix).append(road)
-                        .append(roadSuffix).append(apt).toString();
-        String addressLine2 = city;
-        String addressLine3 = new StringBuilder().append(state).append(postalCode).toString();
-        String addressLine4 = mCountryCode;
-
-        // Setting Address object line fields by common convention.
-        address.setAddressLine(ADDRESS_LINE_0_ROOM_DESK_FLOOR, addressLine0);
-        address.setAddressLine(ADDRESS_LINE_1_NUMBER_ROAD_SUFFIX_APT, addressLine1);
-        address.setAddressLine(ADDRESS_LINE_2_CITY, addressLine2);
-        address.setAddressLine(ADDRESS_LINE_3_STATE_POSTAL_CODE, addressLine3);
-        address.setAddressLine(ADDRESS_LINE_4_COUNTRY, addressLine4);
-
-        // Other compatible fields between the CIVIC_ADDRESS and the Address Class.
-        address.setFeatureName(getCivicElementValue(CivicLocationKeys.NAM)); // Structure name
-        address.setSubThoroughfare(getCivicElementValue(CivicLocationKeys.HNO));
-        address.setThoroughfare(getCivicElementValue(CivicLocationKeys.PRIMARY_ROAD_NAME));
-        address.setSubLocality(getCivicElementValue(CivicLocationKeys.NEIGHBORHOOD));
-        address.setSubAdminArea(getCivicElementValue(CivicLocationKeys.COUNTY));
-        address.setAdminArea(getCivicElementValue(CivicLocationKeys.STATE));
-        address.setPostalCode(getCivicElementValue(CivicLocationKeys.POSTAL_CODE));
-        address.setCountryCode(mCountryCode); // Country
-        return address;
-    }
-
-    /**
-     * Prepares an address element so that it can be integrated into an address line convention.
-     *
-     * <p>If an address element is null, the return string will be empty e.g. "".
-     *
-     * @param label a string defining the type of address element
-     * @param value a string defining the elements value
-     * @return the formatted version of the value, with null values converted to empty strings
-     */
-    private String formatAddressElement(String label, String value) {
-        if (value != null) {
-            return label + value;
-        } else {
-            return "";
-        }
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof CivicLocation)) {
-            return false;
-        }
-        CivicLocation other = (CivicLocation) obj;
-        return mIsValid == other.mIsValid
-                && Objects.equals(mCountryCode, other.mCountryCode)
-                && isSparseArrayStringEqual(mCivicAddressElements, other.mCivicAddressElements);
-    }
-
-    @Override
-    public int hashCode() {
-        int[] civicAddressKeys = getSparseArrayKeys(mCivicAddressElements);
-        String[] civicAddressValues = getSparseArrayValues(mCivicAddressElements);
-        return Objects.hash(mIsValid, mCountryCode, civicAddressKeys, civicAddressValues);
-    }
-
-    /**
-     * Tests if the Civic Location object is valid
-     *
-     * @return a boolean defining mIsValid
-     */
-    public boolean isValid() {
-        return mIsValid;
-    }
-
-    /**
-     * Tests if two sparse arrays are equal on a key for key basis
-     *
-     * @param sa1 the first sparse array
-     * @param sa2 the second sparse array
-     * @return the boolean result after comparing values key by key
-     */
-    private boolean isSparseArrayStringEqual(SparseArray<String> sa1, SparseArray<String> sa2) {
-        int size = sa1.size();
-        if (size != sa2.size()) {
-            return false;
-        }
-        for (int i = 0; i < size; i++) {
-            String sa1Value = sa1.valueAt(i);
-            String sa2Value = sa2.valueAt(i);
-            if (!sa1Value.equals(sa2Value)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Extract an array of all the keys in a SparseArray<String>
-     *
-     * @param sa the sparse array of Strings
-     * @return an integer array of all keys in the SparseArray<String>
-     */
-    private int[] getSparseArrayKeys(SparseArray<String> sa) {
-        int size = sa.size();
-        int[] keys = new int[size];
-        for (int i = 0; i < size; i++) {
-            keys[i] = sa.keyAt(i);
-        }
-        return keys;
-    }
-
-    /**
-     * Extract an array of all the String values in a SparseArray<String>
-     *
-     * @param sa the sparse array of Strings
-     * @return a String array of all values in the SparseArray<String>
-     */
-    private String[] getSparseArrayValues(SparseArray<String> sa) {
-        int size = sa.size();
-        String[] values = new String[size];
-        for (int i = 0; i < size; i++) {
-            values[i] = sa.valueAt(i);
-        }
-        return values;
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/CivicLocationKeys.java b/wifi/java/android/net/wifi/rtt/CivicLocationKeys.java
deleted file mode 100644
index b03f4a9..0000000
--- a/wifi/java/android/net/wifi/rtt/CivicLocationKeys.java
+++ /dev/null
@@ -1,115 +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.net.wifi.rtt;
-
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import android.annotation.IntDef;
-
-import java.lang.annotation.Retention;
-
-/**
- * Civic Address key types used to define address elements.
- *
- * <p>These keys can be used with {@code ResponderLocation.toCivicLocationSparseArray()}
- * to look-up the corresponding string values.</p>
- */
-public class CivicLocationKeys {
-
-    /**
-     * An enumeration of all civic location keys.
-     *
-     * @hide
-     */
-    @Retention(SOURCE)
-    @IntDef({LANGUAGE, STATE, COUNTY, CITY, BOROUGH, NEIGHBORHOOD, GROUP_OF_STREETS, PRD, POD, STS,
-            HNO, HNS, LMK, LOC, NAM, POSTAL_CODE, BUILDING, APT, FLOOR, ROOM, TYPE_OF_PLACE, PCN,
-            PO_BOX, ADDITIONAL_CODE, DESK, PRIMARY_ROAD_NAME, ROAD_SECTION, BRANCH_ROAD_NAME,
-            SUBBRANCH_ROAD_NAME, STREET_NAME_PRE_MODIFIER, STREET_NAME_POST_MODIFIER, SCRIPT})
-    public @interface CivicLocationKeysType {
-    }
-
-    /** Language key e.g. i-default. */
-    public static final int LANGUAGE = 0;
-    /** Category label A1 key e.g. California. */
-    public static final int STATE = 1;
-    /** Category label A2 key e.g. Marin. */
-    public static final int COUNTY = 2;
-    /** Category label A3 key e.g. San Francisco. */
-    public static final int CITY = 3;
-    /** Category label A4 key e.g. Westminster. */
-    public static final int BOROUGH = 4;
-    /** Category label A5 key e.g. Pacific Heights. */
-    public static final int NEIGHBORHOOD = 5;
-    /** Category label A6 key e.g. University District. */
-    public static final int GROUP_OF_STREETS = 6;
-    // 7 - 15 not defined
-    /** Leading Street direction key e.g. N. */
-    public static final int PRD = 16;
-    /** Trailing street suffix key e.g. SW. */
-    public static final int POD = 17;
-    /** Street suffix or Type key e.g Ave, Platz. */
-    public static final int STS = 18;
-    /** House Number key e.g. 123. */
-    public static final int HNO = 19;
-    /** House number suffix key e.g. A, 1/2. */
-    public static final int HNS = 20;
-    /** Landmark or vanity address key e.g. Golden Gate Bridge. */
-    public static final int LMK = 21;
-    /** Additional Location info key e.g. South Wing. */
-    public static final int LOC = 22;
-    /** Name of residence key e.g. Joe's Barbershop. */
-    public static final int NAM = 23;
-    /** Postal or ZIP code key e.g. 10027-1234. */
-    public static final int POSTAL_CODE = 24;
-    /** Building key e.g. Lincoln Library. */
-    public static final int BUILDING = 25;
-    /** Apartment or suite key e.g. Apt 42. */
-    public static final int APT = 26;
-    /** Floor key e.g. 4. */
-    public static final int FLOOR = 27;
-    /** Room key e.g. 450F. */
-    public static final int ROOM = 28;
-    /** Type of place key e.g. office. */
-    public static final int TYPE_OF_PLACE = 29;
-    /** Postal community name key e.g. Leonia. */
-    public static final int PCN = 30;
-    /** Post Office Box key e.g. 12345. */
-    public static final int PO_BOX = 31;
-    /** Additional Code key e.g. 13203000003. */
-    public static final int ADDITIONAL_CODE = 32;
-    /** Seat, desk, pole, or cubical key e.g. WS 181. */
-    public static final int DESK = 33;
-    /** Primary road name key e.g. Shoreline. */
-    public static final int PRIMARY_ROAD_NAME = 34;
-    /** Road Section key e.g. 14. */
-    public static final int ROAD_SECTION = 35;
-    /** Branch Rd Name key e.g. Lane 7. */
-    public static final int BRANCH_ROAD_NAME = 36;
-    /** Subbranch Rd Name key e.g. Alley 8. */
-    public static final int SUBBRANCH_ROAD_NAME = 37;
-    /** Premodifier key e.g. Old. */
-    public static final int STREET_NAME_PRE_MODIFIER = 38;
-    /** Postmodifier key e.g. Service. */
-    public static final int STREET_NAME_POST_MODIFIER = 39;
-    /** Script key e.g. Latn. */
-    public static final int SCRIPT = 128;
-
-    /** private constructor */
-    private CivicLocationKeys() {}
-}
-
diff --git a/wifi/java/android/net/wifi/rtt/IRttCallback.aidl b/wifi/java/android/net/wifi/rtt/IRttCallback.aidl
deleted file mode 100644
index 578dd1e..0000000
--- a/wifi/java/android/net/wifi/rtt/IRttCallback.aidl
+++ /dev/null
@@ -1,37 +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.net.wifi.rtt;
-
-import android.net.wifi.rtt.RangingResult;
-
-/**
- * Interface for RTT result callback.
- *
- * @hide
- */
-oneway interface IRttCallback
-{
-    /**
-     * Service to manager callback indicating failure.
-     */
-    void onRangingFailure(int status);
-
-    /**
-     * Service to manager callback indicating success and providing results.
-     */
-    void onRangingResults(in List<RangingResult> results);
-}
diff --git a/wifi/java/android/net/wifi/rtt/IWifiRttManager.aidl b/wifi/java/android/net/wifi/rtt/IWifiRttManager.aidl
deleted file mode 100644
index 7c92a6b..0000000
--- a/wifi/java/android/net/wifi/rtt/IWifiRttManager.aidl
+++ /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.
- */
-
-package android.net.wifi.rtt;
-
-import android.os.WorkSource;
-
-import android.net.wifi.rtt.IRttCallback;
-import android.net.wifi.rtt.RangingRequest;
-
-/**
- * @hide
- */
-interface IWifiRttManager
-{
-    boolean isAvailable();
-    void startRanging(in IBinder binder, in String callingPackage, in String callingFeatureId,
-            in WorkSource workSource, in RangingRequest request, in IRttCallback callback);
-    void cancelRanging(in WorkSource workSource);
-}
diff --git a/wifi/java/android/net/wifi/rtt/RangingRequest.java b/wifi/java/android/net/wifi/rtt/RangingRequest.java
deleted file mode 100644
index 318efa6..0000000
--- a/wifi/java/android/net/wifi/rtt/RangingRequest.java
+++ /dev/null
@@ -1,267 +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.net.wifi.rtt;
-
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.aware.AttachCallback;
-import android.net.wifi.aware.DiscoverySessionCallback;
-import android.net.wifi.aware.IdentityChangedListener;
-import android.net.wifi.aware.PeerHandle;
-import android.net.wifi.aware.WifiAwareManager;
-import android.os.Handler;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.StringJoiner;
-
-/**
- * Defines the ranging request to other devices. The ranging request is built using
- * {@link RangingRequest.Builder}.
- * A ranging request is executed using
- * {@link WifiRttManager#startRanging(RangingRequest, java.util.concurrent.Executor, RangingResultCallback)}.
- * <p>
- * The ranging request is a batch request - specifying a set of devices (specified using
- * {@link RangingRequest.Builder#addAccessPoint(ScanResult)} and
- * {@link RangingRequest.Builder#addAccessPoints(List)}).
- */
-public final class RangingRequest implements Parcelable {
-    private static final int MAX_PEERS = 10;
-
-    /**
-     * Returns the maximum number of peers to range which can be specified in a single {@code
-     * RangingRequest}. The limit applies no matter how the peers are added to the request, e.g.
-     * through {@link RangingRequest.Builder#addAccessPoint(ScanResult)} or
-     * {@link RangingRequest.Builder#addAccessPoints(List)}.
-     *
-     * @return Maximum number of peers.
-     */
-    public static int getMaxPeers() {
-        return MAX_PEERS;
-    }
-
-    /** @hide */
-    public final List<ResponderConfig> mRttPeers;
-
-    /** @hide */
-    private RangingRequest(List<ResponderConfig> rttPeers) {
-        mRttPeers = rttPeers;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeList(mRttPeers);
-    }
-
-    public static final @android.annotation.NonNull Creator<RangingRequest> CREATOR = new Creator<RangingRequest>() {
-        @Override
-        public RangingRequest[] newArray(int size) {
-            return new RangingRequest[size];
-        }
-
-        @Override
-        public RangingRequest createFromParcel(Parcel in) {
-            return new RangingRequest(in.readArrayList(null));
-        }
-    };
-
-    /** @hide */
-    @Override
-    public String toString() {
-        StringJoiner sj = new StringJoiner(", ", "RangingRequest: mRttPeers=[", "]");
-        for (ResponderConfig rc : mRttPeers) {
-            sj.add(rc.toString());
-        }
-        return sj.toString();
-    }
-
-    /** @hide */
-    public void enforceValidity(boolean awareSupported) {
-        if (mRttPeers.size() > MAX_PEERS) {
-            throw new IllegalArgumentException(
-                    "Ranging to too many peers requested. Use getMaxPeers() API to get limit.");
-        }
-
-        for (ResponderConfig peer: mRttPeers) {
-            if (!peer.isValid(awareSupported)) {
-                throw new IllegalArgumentException("Invalid Responder specification");
-            }
-        }
-    }
-
-    /**
-     * Builder class used to construct {@link RangingRequest} objects.
-     */
-    public static final class Builder {
-        private List<ResponderConfig> mRttPeers = new ArrayList<>();
-
-        /**
-         * Add the device specified by the {@link ScanResult} to the list of devices with
-         * which to measure range. The total number of peers added to a request cannot exceed the
-         * limit specified by {@link #getMaxPeers()}.
-         * <p>
-         * Ranging may not be supported if the Access Point does not support IEEE 802.11mc. Use
-         * {@link ScanResult#is80211mcResponder()} to verify the Access Point's capabilities. If
-         * not supported the result status will be
-         * {@link RangingResult#STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC}.
-         *
-         * @param apInfo Information of an Access Point (AP) obtained in a Scan Result.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder addAccessPoint(@NonNull ScanResult apInfo) {
-            if (apInfo == null) {
-                throw new IllegalArgumentException("Null ScanResult!");
-            }
-            return addResponder(ResponderConfig.fromScanResult(apInfo));
-        }
-
-        /**
-         * Add the devices specified by the {@link ScanResult}s to the list of devices with
-         * which to measure range. The total number of peers added to a request cannot exceed the
-         * limit specified by {@link #getMaxPeers()}.
-         * <p>
-         * Ranging may not be supported if the Access Point does not support IEEE 802.11mc. Use
-         * {@link ScanResult#is80211mcResponder()} to verify the Access Point's capabilities. If
-         * not supported the result status will be
-         * {@link RangingResult#STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC}.
-         *
-         * @param apInfos Information of an Access Points (APs) obtained in a Scan Result.
-         * @return The builder to facilitate chaining
-         *         {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder addAccessPoints(@NonNull List<ScanResult> apInfos) {
-            if (apInfos == null) {
-                throw new IllegalArgumentException("Null list of ScanResults!");
-            }
-            for (ScanResult scanResult : apInfos) {
-                addAccessPoint(scanResult);
-            }
-            return this;
-        }
-
-        /**
-         * Add the device specified by the {@code peerMacAddress} to the list of devices with
-         * which to measure range.
-         * <p>
-         * The MAC address may be obtained out-of-band from a peer Wi-Fi Aware device. A Wi-Fi
-         * Aware device may obtain its MAC address using the {@link IdentityChangedListener}
-         * provided to
-         * {@link WifiAwareManager#attach(AttachCallback, IdentityChangedListener, Handler)}.
-         * <p>
-         * Note: in order to use this API the device must support Wi-Fi Aware
-         * {@link android.net.wifi.aware}. The peer device which is being ranged to must be
-         * configured to publish a service (with any name) with:
-         * <li>Type {@link android.net.wifi.aware.PublishConfig#PUBLISH_TYPE_UNSOLICITED}.
-         * <li>Ranging enabled
-         * {@link android.net.wifi.aware.PublishConfig.Builder#setRangingEnabled(boolean)}.
-         *
-         * @param peerMacAddress The MAC address of the Wi-Fi Aware peer.
-         * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder addWifiAwarePeer(@NonNull MacAddress peerMacAddress) {
-            if (peerMacAddress == null) {
-                throw new IllegalArgumentException("Null peer MAC address");
-            }
-            return addResponder(
-                    ResponderConfig.fromWifiAwarePeerMacAddressWithDefaults(peerMacAddress));
-        }
-
-        /**
-         * Add a device specified by a {@link PeerHandle} to the list of devices with which to
-         * measure range.
-         * <p>
-         * The {@link PeerHandle} may be obtained as part of the Wi-Fi Aware discovery process. E.g.
-         * using {@link DiscoverySessionCallback#onServiceDiscovered(PeerHandle, byte[], List)}.
-         * <p>
-         * Note: in order to use this API the device must support Wi-Fi Aware
-         * {@link android.net.wifi.aware}. The peer device which is being ranged to must be
-         * configured to publish a service (with any name) with:
-         * <li>Type {@link android.net.wifi.aware.PublishConfig#PUBLISH_TYPE_UNSOLICITED}.
-         * <li>Ranging enabled
-         * {@link android.net.wifi.aware.PublishConfig.Builder#setRangingEnabled(boolean)}.
-         *
-         * @param peerHandle The peer handler of the peer Wi-Fi Aware device.
-         * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
-         */
-        public Builder addWifiAwarePeer(@NonNull PeerHandle peerHandle) {
-            if (peerHandle == null) {
-                throw new IllegalArgumentException("Null peer handler (identifier)");
-            }
-
-            return addResponder(ResponderConfig.fromWifiAwarePeerHandleWithDefaults(peerHandle));
-        }
-
-        /**
-         * Add the Responder device specified by the {@link ResponderConfig} to the list of devices
-         * with which to measure range. The total number of peers added to the request cannot exceed
-         * the limit specified by {@link #getMaxPeers()}.
-         *
-         * @param responder Information on the RTT Responder.
-         * @return The builder, to facilitate chaining {@code builder.setXXX(..).setXXX(..)}.
-         *
-         * @hide
-         */
-        @SystemApi
-        public Builder addResponder(@NonNull ResponderConfig responder) {
-            if (responder == null) {
-                throw new IllegalArgumentException("Null Responder!");
-            }
-
-            mRttPeers.add(responder);
-            return this;
-        }
-
-        /**
-         * Build {@link RangingRequest} given the current configurations made on the
-         * builder.
-         */
-        public RangingRequest build() {
-            return new RangingRequest(mRttPeers);
-        }
-    }
-
-    @Override
-    public boolean equals(@Nullable Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof RangingRequest)) {
-            return false;
-        }
-
-        RangingRequest lhs = (RangingRequest) o;
-
-        return mRttPeers.size() == lhs.mRttPeers.size() && mRttPeers.containsAll(lhs.mRttPeers);
-    }
-
-    @Override
-    public int hashCode() {
-        return mRttPeers.hashCode();
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/RangingResult.java b/wifi/java/android/net/wifi/rtt/RangingResult.java
deleted file mode 100644
index a065bbc..0000000
--- a/wifi/java/android/net/wifi/rtt/RangingResult.java
+++ /dev/null
@@ -1,438 +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.net.wifi.rtt;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.net.wifi.aware.PeerHandle;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Ranging result for a request started by
- * {@link WifiRttManager#startRanging(RangingRequest, java.util.concurrent.Executor, RangingResultCallback)}.
- * Results are returned in {@link RangingResultCallback#onRangingResults(List)}.
- * <p>
- * A ranging result is the distance measurement result for a single device specified in the
- * {@link RangingRequest}.
- */
-public final class RangingResult implements Parcelable {
-    private static final String TAG = "RangingResult";
-    private static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
-
-    /** @hide */
-    @IntDef({STATUS_SUCCESS, STATUS_FAIL, STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface RangeResultStatus {
-    }
-
-    /**
-     * Individual range request status, {@link #getStatus()}. Indicates ranging operation was
-     * successful and distance value is valid.
-     */
-    public static final int STATUS_SUCCESS = 0;
-
-    /**
-     * Individual range request status, {@link #getStatus()}. Indicates ranging operation failed
-     * and the distance value is invalid.
-     */
-    public static final int STATUS_FAIL = 1;
-
-    /**
-     * Individual range request status, {@link #getStatus()}. Indicates that the ranging operation
-     * failed because the specified peer does not support IEEE 802.11mc RTT operations. Support by
-     * an Access Point can be confirmed using
-     * {@link android.net.wifi.ScanResult#is80211mcResponder()}.
-     * <p>
-     * On such a failure, the individual result fields of {@link RangingResult} such as
-     * {@link RangingResult#getDistanceMm()} are invalid.
-     */
-    public static final int STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC = 2;
-
-    private final int mStatus;
-    private final MacAddress mMac;
-    private final PeerHandle mPeerHandle;
-    private final int mDistanceMm;
-    private final int mDistanceStdDevMm;
-    private final int mRssi;
-    private final int mNumAttemptedMeasurements;
-    private final int mNumSuccessfulMeasurements;
-    private final byte[] mLci;
-    private final byte[] mLcr;
-    private final ResponderLocation mResponderLocation;
-    private final long mTimestamp;
-
-    /** @hide */
-    public RangingResult(@RangeResultStatus int status, @NonNull MacAddress mac, int distanceMm,
-            int distanceStdDevMm, int rssi, int numAttemptedMeasurements,
-            int numSuccessfulMeasurements, byte[] lci, byte[] lcr,
-            ResponderLocation responderLocation, long timestamp) {
-        mStatus = status;
-        mMac = mac;
-        mPeerHandle = null;
-        mDistanceMm = distanceMm;
-        mDistanceStdDevMm = distanceStdDevMm;
-        mRssi = rssi;
-        mNumAttemptedMeasurements = numAttemptedMeasurements;
-        mNumSuccessfulMeasurements = numSuccessfulMeasurements;
-        mLci = lci == null ? EMPTY_BYTE_ARRAY : lci;
-        mLcr = lcr == null ? EMPTY_BYTE_ARRAY : lcr;
-        mResponderLocation = responderLocation;
-        mTimestamp = timestamp;
-    }
-
-    /** @hide */
-    public RangingResult(@RangeResultStatus int status, PeerHandle peerHandle, int distanceMm,
-            int distanceStdDevMm, int rssi, int numAttemptedMeasurements,
-            int numSuccessfulMeasurements, byte[] lci, byte[] lcr,
-            ResponderLocation responderLocation, long timestamp) {
-        mStatus = status;
-        mMac = null;
-        mPeerHandle = peerHandle;
-        mDistanceMm = distanceMm;
-        mDistanceStdDevMm = distanceStdDevMm;
-        mRssi = rssi;
-        mNumAttemptedMeasurements = numAttemptedMeasurements;
-        mNumSuccessfulMeasurements = numSuccessfulMeasurements;
-        mLci = lci == null ? EMPTY_BYTE_ARRAY : lci;
-        mLcr = lcr == null ? EMPTY_BYTE_ARRAY : lcr;
-        mResponderLocation = responderLocation;
-        mTimestamp = timestamp;
-    }
-
-    /**
-     * @return The status of ranging measurement: {@link #STATUS_SUCCESS} in case of success, and
-     * {@link #STATUS_FAIL} in case of failure.
-     */
-    @RangeResultStatus
-    public int getStatus() {
-        return mStatus;
-    }
-
-    /**
-     * @return The MAC address of the device whose range measurement was requested. Will correspond
-     * to the MAC address of the device in the {@link RangingRequest}.
-     * <p>
-     * Will return a {@code null} for results corresponding to requests issued using a {@code
-     * PeerHandle}, i.e. using the {@link RangingRequest.Builder#addWifiAwarePeer(PeerHandle)} API.
-     */
-    @Nullable
-    public MacAddress getMacAddress() {
-        return mMac;
-    }
-
-    /**
-     * @return The PeerHandle of the device whose reange measurement was requested. Will correspond
-     * to the PeerHandle of the devices requested using
-     * {@link RangingRequest.Builder#addWifiAwarePeer(PeerHandle)}.
-     * <p>
-     * Will return a {@code null} for results corresponding to requests issued using a MAC address.
-     */
-    @Nullable public PeerHandle getPeerHandle() {
-        return mPeerHandle;
-    }
-
-    /**
-     * @return The distance (in mm) to the device specified by {@link #getMacAddress()} or
-     * {@link #getPeerHandle()}.
-     * <p>
-     * Note: the measured distance may be negative for very close devices.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public int getDistanceMm() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getDistanceMm(): invoked on an invalid result: getStatus()=" + mStatus);
-        }
-        return mDistanceMm;
-    }
-
-    /**
-     * @return The standard deviation of the measured distance (in mm) to the device specified by
-     * {@link #getMacAddress()} or {@link #getPeerHandle()}. The standard deviation is calculated
-     * over the measurements executed in a single RTT burst. The number of measurements is returned
-     * by {@link #getNumSuccessfulMeasurements()} - 0 successful measurements indicate that the
-     * standard deviation is not valid (a valid standard deviation requires at least 2 data points).
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public int getDistanceStdDevMm() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getDistanceStdDevMm(): invoked on an invalid result: getStatus()=" + mStatus);
-        }
-        return mDistanceStdDevMm;
-    }
-
-    /**
-     * @return The average RSSI, in units of dBm, observed during the RTT measurement.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public int getRssi() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getRssi(): invoked on an invalid result: getStatus()=" + mStatus);
-        }
-        return mRssi;
-    }
-
-    /**
-     * @return The number of attempted measurements used in the RTT exchange resulting in this set
-     * of results. The number of successful measurements is returned by
-     * {@link #getNumSuccessfulMeasurements()} which at most, if there are no errors, will be 1 less
-     * that the number of attempted measurements.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public int getNumAttemptedMeasurements() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getNumAttemptedMeasurements(): invoked on an invalid result: getStatus()="
-                            + mStatus);
-        }
-        return mNumAttemptedMeasurements;
-    }
-
-    /**
-     * @return The number of successful measurements used to calculate the distance and standard
-     * deviation. If the number of successful measurements if 1 then then standard deviation,
-     * returned by {@link #getDistanceStdDevMm()}, is not valid (a 0 is returned for the standard
-     * deviation).
-     * <p>
-     * The total number of measurement attempts is returned by
-     * {@link #getNumAttemptedMeasurements()}. The number of successful measurements will be at
-     * most 1 less then the number of attempted measurements.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public int getNumSuccessfulMeasurements() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getNumSuccessfulMeasurements(): invoked on an invalid result: getStatus()="
-                            + mStatus);
-        }
-        return mNumSuccessfulMeasurements;
-    }
-
-    /**
-     * @return The unverified responder location represented as {@link ResponderLocation} which
-     * captures location information the responder is programmed to broadcast. The responder
-     * location is referred to as unverified, because we are relying on the device/site
-     * administrator to correctly configure its location data.
-     * <p>
-     * Will return a {@code null} when the location information cannot be parsed.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    @Nullable
-    public ResponderLocation getUnverifiedResponderLocation() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getUnverifiedResponderLocation(): invoked on an invalid result: getStatus()="
-                            + mStatus);
-        }
-        return mResponderLocation;
-    }
-
-    /**
-     * @return The Location Configuration Information (LCI) as self-reported by the peer. The format
-     * is specified in the IEEE 802.11-2016 specifications, section 9.4.2.22.10.
-     * <p>
-     * Note: the information is NOT validated - use with caution. Consider validating it with
-     * other sources of information before using it.
-     *
-     * @hide
-     */
-    @SystemApi
-    @NonNull
-    public byte[] getLci() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getLci(): invoked on an invalid result: getStatus()=" + mStatus);
-        }
-        return mLci;
-    }
-
-    /**
-     * @return The Location Civic report (LCR) as self-reported by the peer. The format
-     * is specified in the IEEE 802.11-2016 specifications, section 9.4.2.22.13.
-     * <p>
-     * Note: the information is NOT validated - use with caution. Consider validating it with
-     * other sources of information before using it.
-     *
-     * @hide
-     */
-    @SystemApi
-    @NonNull
-    public byte[] getLcr() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getReportedLocationCivic(): invoked on an invalid result: getStatus()="
-                            + mStatus);
-        }
-        return mLcr;
-    }
-
-    /**
-     * @return The timestamp at which the ranging operation was performed. The timestamp is in
-     * milliseconds since boot, including time spent in sleep, corresponding to values provided by
-     * {@link android.os.SystemClock#elapsedRealtime()}.
-     * <p>
-     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
-     * exception.
-     */
-    public long getRangingTimestampMillis() {
-        if (mStatus != STATUS_SUCCESS) {
-            throw new IllegalStateException(
-                    "getRangingTimestampMillis(): invoked on an invalid result: getStatus()="
-                            + mStatus);
-        }
-        return mTimestamp;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeInt(mStatus);
-        if (mMac == null) {
-            dest.writeBoolean(false);
-        } else {
-            dest.writeBoolean(true);
-            mMac.writeToParcel(dest, flags);
-        }
-        if (mPeerHandle == null) {
-            dest.writeBoolean(false);
-        } else {
-            dest.writeBoolean(true);
-            dest.writeInt(mPeerHandle.peerId);
-        }
-        dest.writeInt(mDistanceMm);
-        dest.writeInt(mDistanceStdDevMm);
-        dest.writeInt(mRssi);
-        dest.writeInt(mNumAttemptedMeasurements);
-        dest.writeInt(mNumSuccessfulMeasurements);
-        dest.writeByteArray(mLci);
-        dest.writeByteArray(mLcr);
-        dest.writeParcelable(mResponderLocation, flags);
-        dest.writeLong(mTimestamp);
-    }
-
-    public static final @android.annotation.NonNull Creator<RangingResult> CREATOR = new Creator<RangingResult>() {
-        @Override
-        public RangingResult[] newArray(int size) {
-            return new RangingResult[size];
-        }
-
-        @Override
-        public RangingResult createFromParcel(Parcel in) {
-            int status = in.readInt();
-            boolean macAddressPresent = in.readBoolean();
-            MacAddress mac = null;
-            if (macAddressPresent) {
-                mac = MacAddress.CREATOR.createFromParcel(in);
-            }
-            boolean peerHandlePresent = in.readBoolean();
-            PeerHandle peerHandle = null;
-            if (peerHandlePresent) {
-                peerHandle = new PeerHandle(in.readInt());
-            }
-            int distanceMm = in.readInt();
-            int distanceStdDevMm = in.readInt();
-            int rssi = in.readInt();
-            int numAttemptedMeasurements = in.readInt();
-            int numSuccessfulMeasurements = in.readInt();
-            byte[] lci = in.createByteArray();
-            byte[] lcr = in.createByteArray();
-            ResponderLocation responderLocation =
-                    in.readParcelable(this.getClass().getClassLoader());
-            long timestamp = in.readLong();
-            if (peerHandlePresent) {
-                return new RangingResult(status, peerHandle, distanceMm, distanceStdDevMm, rssi,
-                        numAttemptedMeasurements, numSuccessfulMeasurements, lci, lcr,
-                        responderLocation, timestamp);
-            } else {
-                return new RangingResult(status, mac, distanceMm, distanceStdDevMm, rssi,
-                        numAttemptedMeasurements, numSuccessfulMeasurements, lci, lcr,
-                        responderLocation, timestamp);
-            }
-        }
-    };
-
-    /** @hide */
-    @Override
-    public String toString() {
-        return new StringBuilder("RangingResult: [status=").append(mStatus).append(", mac=").append(
-                mMac).append(", peerHandle=").append(
-                mPeerHandle == null ? "<null>" : mPeerHandle.peerId).append(", distanceMm=").append(
-                mDistanceMm).append(", distanceStdDevMm=").append(mDistanceStdDevMm).append(
-                ", rssi=").append(mRssi).append(", numAttemptedMeasurements=").append(
-                mNumAttemptedMeasurements).append(", numSuccessfulMeasurements=").append(
-                mNumSuccessfulMeasurements).append(", lci=").append(mLci).append(", lcr=").append(
-                mLcr).append(", responderLocation=").append(mResponderLocation)
-                .append(", timestamp=").append(mTimestamp).append("]").toString();
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof RangingResult)) {
-            return false;
-        }
-
-        RangingResult lhs = (RangingResult) o;
-
-        return mStatus == lhs.mStatus && Objects.equals(mMac, lhs.mMac) && Objects.equals(
-                mPeerHandle, lhs.mPeerHandle) && mDistanceMm == lhs.mDistanceMm
-                && mDistanceStdDevMm == lhs.mDistanceStdDevMm && mRssi == lhs.mRssi
-                && mNumAttemptedMeasurements == lhs.mNumAttemptedMeasurements
-                && mNumSuccessfulMeasurements == lhs.mNumSuccessfulMeasurements
-                && Arrays.equals(mLci, lhs.mLci) && Arrays.equals(mLcr, lhs.mLcr)
-                && mTimestamp == lhs.mTimestamp
-                && Objects.equals(mResponderLocation, lhs.mResponderLocation);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mStatus, mMac, mPeerHandle, mDistanceMm, mDistanceStdDevMm, mRssi,
-                mNumAttemptedMeasurements, mNumSuccessfulMeasurements, mLci, mLcr,
-                mResponderLocation, mTimestamp);
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/RangingResultCallback.java b/wifi/java/android/net/wifi/rtt/RangingResultCallback.java
deleted file mode 100644
index fa7d79e..0000000
--- a/wifi/java/android/net/wifi/rtt/RangingResultCallback.java
+++ /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.
- */
-
-package android.net.wifi.rtt;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.List;
-
-/**
- * Base class for ranging result callbacks. Should be extended by applications and set when calling
- * {@link WifiRttManager#startRanging(RangingRequest, java.util.concurrent.Executor, RangingResultCallback)}.
- * If the ranging operation fails in whole (not attempted) then {@link #onRangingFailure(int)}
- * will be called with a failure code. If the ranging operation is performed for each of the
- * requested peers then the {@link #onRangingResults(List)} will be called with the set of
- * results (@link {@link RangingResult}, each of which has its own success/failure code
- * {@link RangingResult#getStatus()}.
- */
-public abstract class RangingResultCallback {
-    /** @hide */
-    @IntDef({STATUS_CODE_FAIL, STATUS_CODE_FAIL_RTT_NOT_AVAILABLE})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface RangingOperationStatus {
-    }
-
-    /**
-     * A failure code for the whole ranging request operation. Indicates a failure.
-     */
-    public static final int STATUS_CODE_FAIL = 1;
-
-    /**
-     * A failure code for the whole ranging request operation. Indicates that the request failed due
-     * to RTT not being available - e.g. Wi-Fi was disabled. Use the
-     * {@link WifiRttManager#isAvailable()} and {@link WifiRttManager#ACTION_WIFI_RTT_STATE_CHANGED}
-     * to track RTT availability.
-     */
-    public static final int STATUS_CODE_FAIL_RTT_NOT_AVAILABLE = 2;
-
-    /**
-     * Called when a ranging operation failed in whole - i.e. no ranging operation to any of the
-     * devices specified in the request was attempted.
-     *
-     * @param code A status code indicating the type of failure.
-     */
-    public abstract void onRangingFailure(@RangingOperationStatus int code);
-
-    /**
-     * Called when a ranging operation was executed. The list of results corresponds to devices
-     * specified in the ranging request.
-     *
-     * @param results List of range measurements, one per requested device.
-     */
-    public abstract void onRangingResults(@NonNull List<RangingResult> results);
-}
diff --git a/wifi/java/android/net/wifi/rtt/ResponderConfig.java b/wifi/java/android/net/wifi/rtt/ResponderConfig.java
deleted file mode 100644
index be4eecc..0000000
--- a/wifi/java/android/net/wifi/rtt/ResponderConfig.java
+++ /dev/null
@@ -1,514 +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.net.wifi.rtt;
-
-import static android.net.wifi.ScanResult.InformationElement.EID_EXTENSION_PRESENT;
-import static android.net.wifi.ScanResult.InformationElement.EID_EXT_HE_CAPABILITIES;
-import static android.net.wifi.ScanResult.InformationElement.EID_HT_CAPABILITIES;
-import static android.net.wifi.ScanResult.InformationElement.EID_VHT_CAPABILITIES;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SystemApi;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.aware.PeerHandle;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.Log;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Objects;
-
-/**
- * Defines the configuration of an IEEE 802.11mc Responder. The Responder may be an Access Point
- * (AP), a Wi-Fi Aware device, or a manually configured Responder.
- * <p>
- * A Responder configuration may be constructed from a {@link ScanResult} or manually (with the
- * data obtained out-of-band from a peer).
- *
- * @hide
- */
-@SystemApi
-public final class ResponderConfig implements Parcelable {
-    private static final String TAG = "ResponderConfig";
-    private static final int AWARE_BAND_2_DISCOVERY_CHANNEL = 2437;
-
-    /** @hide */
-    @IntDef({RESPONDER_AP, RESPONDER_STA, RESPONDER_P2P_GO, RESPONDER_P2P_CLIENT, RESPONDER_AWARE})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ResponderType {
-    }
-
-    /**
-     * Responder is an AP.
-     */
-    public static final int RESPONDER_AP = 0;
-    /**
-     * Responder is a STA.
-     */
-    public static final int RESPONDER_STA = 1;
-    /**
-     * Responder is a Wi-Fi Direct Group Owner (GO).
-     */
-    public static final int RESPONDER_P2P_GO = 2;
-    /**
-     * Responder is a Wi-Fi Direct Group Client.
-     */
-    public static final int RESPONDER_P2P_CLIENT = 3;
-    /**
-     * Responder is a Wi-Fi Aware device.
-     */
-    public static final int RESPONDER_AWARE = 4;
-
-
-    /** @hide */
-    @IntDef({
-            CHANNEL_WIDTH_20MHZ, CHANNEL_WIDTH_40MHZ, CHANNEL_WIDTH_80MHZ, CHANNEL_WIDTH_160MHZ,
-            CHANNEL_WIDTH_80MHZ_PLUS_MHZ})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface ChannelWidth {
-    }
-
-    /**
-     * Channel bandwidth is 20 MHZ
-     */
-    public static final int CHANNEL_WIDTH_20MHZ = 0;
-    /**
-     * Channel bandwidth is 40 MHZ
-     */
-    public static final int CHANNEL_WIDTH_40MHZ = 1;
-    /**
-     * Channel bandwidth is 80 MHZ
-     */
-    public static final int CHANNEL_WIDTH_80MHZ = 2;
-    /**
-     * Channel bandwidth is 160 MHZ
-     */
-    public static final int CHANNEL_WIDTH_160MHZ = 3;
-    /**
-     * Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ
-     */
-    public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
-
-    /** @hide */
-    @IntDef({PREAMBLE_LEGACY, PREAMBLE_HT, PREAMBLE_VHT, PREAMBLE_HE})
-    @Retention(RetentionPolicy.SOURCE)
-    public @interface PreambleType {
-    }
-
-    /**
-     * Preamble type: Legacy.
-     */
-    public static final int PREAMBLE_LEGACY = 0;
-
-    /**
-     * Preamble type: HT.
-     */
-    public static final int PREAMBLE_HT = 1;
-
-    /**
-     * Preamble type: VHT.
-     */
-    public static final int PREAMBLE_VHT = 2;
-
-    /**
-     * Preamble type: HE.
-     */
-    public static final int PREAMBLE_HE = 3;
-
-    /**
-     * The MAC address of the Responder. Will be null if a Wi-Fi Aware peer identifier (the
-     * peerHandle field) ise used to identify the Responder.
-     */
-    public final MacAddress macAddress;
-
-    /**
-     * The peer identifier of a Wi-Fi Aware Responder. Will be null if a MAC Address (the macAddress
-     * field) is used to identify the Responder.
-     */
-    public final PeerHandle peerHandle;
-
-    /**
-     * The device type of the Responder.
-     */
-    public final int responderType;
-
-    /**
-     * Indicates whether the Responder device supports IEEE 802.11mc.
-     */
-    public final boolean supports80211mc;
-
-    /**
-     * Responder channel bandwidth, specified using {@link ChannelWidth}.
-     */
-    public final int channelWidth;
-
-    /**
-     * The primary 20 MHz frequency (in MHz) of the channel of the Responder.
-     */
-    public final int frequency;
-
-    /**
-     * Not used if the {@link #channelWidth} is 20 MHz. If the Responder uses 40, 80 or 160 MHz,
-     * this is the center frequency (in MHz), if the Responder uses 80 + 80 MHz, this is the
-     * center frequency of the first segment (in MHz).
-     */
-    public final int centerFreq0;
-
-    /**
-     * Only used if the {@link #channelWidth} is 80 + 80 MHz. If the Responder uses 80 + 80 MHz,
-     * this is the center frequency of the second segment (in MHz).
-     */
-    public final int centerFreq1;
-
-    /**
-     * The preamble used by the Responder, specified using {@link PreambleType}.
-     */
-    public final int preamble;
-
-    /**
-     * Constructs Responder configuration, using a MAC address to identify the Responder.
-     *
-     * @param macAddress      The MAC address of the Responder.
-     * @param responderType   The type of the responder device, specified using
-     *                        {@link ResponderType}.
-     * @param supports80211mc Indicates whether the responder supports IEEE 802.11mc.
-     * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
-     * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
-     * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
-     *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
-     *                        segment (in MHz).
-     * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
-     *                        Responder
-     *                        uses 80 + 80 MHz, this is the center frequency of the second segment
-     *                        (in
-     *                        MHz).
-     * @param preamble        The preamble used by the Responder, specified using
-     *                        {@link PreambleType}.
-     */
-    public ResponderConfig(@NonNull MacAddress macAddress, @ResponderType int responderType,
-            boolean supports80211mc, @ChannelWidth int channelWidth, int frequency, int centerFreq0,
-            int centerFreq1, @PreambleType int preamble) {
-        if (macAddress == null) {
-            throw new IllegalArgumentException(
-                    "Invalid ResponderConfig - must specify a MAC address");
-        }
-        this.macAddress = macAddress;
-        this.peerHandle = null;
-        this.responderType = responderType;
-        this.supports80211mc = supports80211mc;
-        this.channelWidth = channelWidth;
-        this.frequency = frequency;
-        this.centerFreq0 = centerFreq0;
-        this.centerFreq1 = centerFreq1;
-        this.preamble = preamble;
-    }
-
-    /**
-     * Constructs Responder configuration, using a Wi-Fi Aware PeerHandle to identify the Responder.
-     *
-     * @param peerHandle      The Wi-Fi Aware peer identifier of the Responder.
-     * @param responderType   The type of the responder device, specified using
-     *                        {@link ResponderType}.
-     * @param supports80211mc Indicates whether the responder supports IEEE 802.11mc.
-     * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
-     * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
-     * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
-     *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
-     *                        segment (in MHz).
-     * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
-     *                        Responder
-     *                        uses 80 + 80 MHz, this is the center frequency of the second segment
-     *                        (in
-     *                        MHz).
-     * @param preamble        The preamble used by the Responder, specified using
-     *                        {@link PreambleType}.
-     */
-    public ResponderConfig(@NonNull PeerHandle peerHandle, @ResponderType int responderType,
-            boolean supports80211mc, @ChannelWidth int channelWidth, int frequency, int centerFreq0,
-            int centerFreq1, @PreambleType int preamble) {
-        this.macAddress = null;
-        this.peerHandle = peerHandle;
-        this.responderType = responderType;
-        this.supports80211mc = supports80211mc;
-        this.channelWidth = channelWidth;
-        this.frequency = frequency;
-        this.centerFreq0 = centerFreq0;
-        this.centerFreq1 = centerFreq1;
-        this.preamble = preamble;
-    }
-
-    /**
-     * Constructs Responder configuration. This is an internal-only constructor which specifies both
-     * a MAC address and a Wi-Fi PeerHandle to identify the Responder.
-     *
-     * @param macAddress      The MAC address of the Responder.
-     * @param peerHandle      The Wi-Fi Aware peer identifier of the Responder.
-     * @param responderType   The type of the responder device, specified using
-     *                        {@link ResponderType}.
-     * @param supports80211mc Indicates whether the responder supports IEEE 802.11mc.
-     * @param channelWidth    Responder channel bandwidth, specified using {@link ChannelWidth}.
-     * @param frequency       The primary 20 MHz frequency (in MHz) of the channel of the Responder.
-     * @param centerFreq0     Not used if the {@code channelWidth} is 20 MHz. If the Responder uses
-     *                        40, 80 or 160 MHz, this is the center frequency (in MHz), if the
-     *                        Responder uses 80 + 80 MHz, this is the center frequency of the first
-     *                        segment (in MHz).
-     * @param centerFreq1     Only used if the {@code channelWidth} is 80 + 80 MHz. If the
-     *                        Responder
-     *                        uses 80 + 80 MHz, this is the center frequency of the second segment
-     *                        (in
-     *                        MHz).
-     * @param preamble        The preamble used by the Responder, specified using
-     *                        {@link PreambleType}.
-     * @hide
-     */
-    public ResponderConfig(@NonNull MacAddress macAddress, @NonNull PeerHandle peerHandle,
-            @ResponderType int responderType, boolean supports80211mc,
-            @ChannelWidth int channelWidth, int frequency, int centerFreq0, int centerFreq1,
-            @PreambleType int preamble) {
-        this.macAddress = macAddress;
-        this.peerHandle = peerHandle;
-        this.responderType = responderType;
-        this.supports80211mc = supports80211mc;
-        this.channelWidth = channelWidth;
-        this.frequency = frequency;
-        this.centerFreq0 = centerFreq0;
-        this.centerFreq1 = centerFreq1;
-        this.preamble = preamble;
-    }
-
-    /**
-     * Creates a Responder configuration from a {@link ScanResult} corresponding to an Access
-     * Point (AP), which can be obtained from {@link android.net.wifi.WifiManager#getScanResults()}.
-     */
-    public static ResponderConfig fromScanResult(ScanResult scanResult) {
-        MacAddress macAddress = MacAddress.fromString(scanResult.BSSID);
-        int responderType = RESPONDER_AP;
-        boolean supports80211mc = scanResult.is80211mcResponder();
-        int channelWidth = translateScanResultChannelWidth(scanResult.channelWidth);
-        int frequency = scanResult.frequency;
-        int centerFreq0 = scanResult.centerFreq0;
-        int centerFreq1 = scanResult.centerFreq1;
-
-        int preamble;
-        if (scanResult.informationElements != null && scanResult.informationElements.length != 0) {
-            boolean htCapabilitiesPresent = false;
-            boolean vhtCapabilitiesPresent = false;
-            boolean heCapabilitiesPresent = false;
-
-            for (ScanResult.InformationElement ie : scanResult.informationElements) {
-                if (ie.id == EID_HT_CAPABILITIES) {
-                    htCapabilitiesPresent = true;
-                } else if (ie.id == EID_VHT_CAPABILITIES) {
-                    vhtCapabilitiesPresent = true;
-                } else if (ie.id == EID_EXTENSION_PRESENT && ie.idExt == EID_EXT_HE_CAPABILITIES) {
-                    heCapabilitiesPresent = true;
-                }
-            }
-
-            if (heCapabilitiesPresent) {
-                preamble = PREAMBLE_HE;
-            } else if (vhtCapabilitiesPresent) {
-                preamble = PREAMBLE_VHT;
-            } else if (htCapabilitiesPresent) {
-                preamble = PREAMBLE_HT;
-            } else {
-                preamble = PREAMBLE_LEGACY;
-            }
-        } else {
-            Log.e(TAG, "Scan Results do not contain IEs - using backup method to select preamble");
-            if (channelWidth == CHANNEL_WIDTH_80MHZ || channelWidth == CHANNEL_WIDTH_160MHZ) {
-                preamble = PREAMBLE_VHT;
-            } else {
-                preamble = PREAMBLE_HT;
-            }
-        }
-
-        return new ResponderConfig(macAddress, responderType, supports80211mc, channelWidth,
-                frequency, centerFreq0, centerFreq1, preamble);
-    }
-
-    /**
-     * Creates a Responder configuration from a MAC address corresponding to a Wi-Fi Aware
-     * Responder. The Responder parameters are set to defaults.
-     */
-    public static ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(MacAddress macAddress) {
-        /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
-         * is expected to be brought up and available to negotiate a maximum accuracy channel
-         * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
-         * Unsolicited Publisher with Ranging enabled.
-         */
-        return new ResponderConfig(macAddress, RESPONDER_AWARE, true, CHANNEL_WIDTH_20MHZ,
-                AWARE_BAND_2_DISCOVERY_CHANNEL, 0, 0, PREAMBLE_HT);
-    }
-
-    /**
-     * Creates a Responder configuration from a {@link PeerHandle} corresponding to a Wi-Fi Aware
-     * Responder. The Responder parameters are set to defaults.
-     */
-    public static ResponderConfig fromWifiAwarePeerHandleWithDefaults(PeerHandle peerHandle) {
-        /* Note: the parameters are those of the Aware discovery channel (channel 6). A Responder
-         * is expected to be brought up and available to negotiate a maximum accuracy channel
-         * (i.e. Band 5 @ 80MHz). A Responder is brought up on the peer by starting an Aware
-         * Unsolicited Publisher with Ranging enabled.
-         */
-        return new ResponderConfig(peerHandle, RESPONDER_AWARE, true, CHANNEL_WIDTH_20MHZ,
-                AWARE_BAND_2_DISCOVERY_CHANNEL, 0, 0, PREAMBLE_HT);
-    }
-
-    /**
-     * Check whether the Responder configuration is valid.
-     *
-     * @return true if valid, false otherwise.
-     * @hide
-     */
-    public boolean isValid(boolean awareSupported) {
-        if (macAddress == null && peerHandle == null || macAddress != null && peerHandle != null) {
-            return false;
-        }
-        if (!awareSupported && responderType == RESPONDER_AWARE) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        if (macAddress == null) {
-            dest.writeBoolean(false);
-        } else {
-            dest.writeBoolean(true);
-            macAddress.writeToParcel(dest, flags);
-        }
-        if (peerHandle == null) {
-            dest.writeBoolean(false);
-        } else {
-            dest.writeBoolean(true);
-            dest.writeInt(peerHandle.peerId);
-        }
-        dest.writeInt(responderType);
-        dest.writeInt(supports80211mc ? 1 : 0);
-        dest.writeInt(channelWidth);
-        dest.writeInt(frequency);
-        dest.writeInt(centerFreq0);
-        dest.writeInt(centerFreq1);
-        dest.writeInt(preamble);
-    }
-
-    public static final @android.annotation.NonNull Creator<ResponderConfig> CREATOR = new Creator<ResponderConfig>() {
-        @Override
-        public ResponderConfig[] newArray(int size) {
-            return new ResponderConfig[size];
-        }
-
-        @Override
-        public ResponderConfig createFromParcel(Parcel in) {
-            boolean macAddressPresent = in.readBoolean();
-            MacAddress macAddress = null;
-            if (macAddressPresent) {
-                macAddress = MacAddress.CREATOR.createFromParcel(in);
-            }
-            boolean peerHandlePresent = in.readBoolean();
-            PeerHandle peerHandle = null;
-            if (peerHandlePresent) {
-                peerHandle = new PeerHandle(in.readInt());
-            }
-            int responderType = in.readInt();
-            boolean supports80211mc = in.readInt() == 1;
-            int channelWidth = in.readInt();
-            int frequency = in.readInt();
-            int centerFreq0 = in.readInt();
-            int centerFreq1 = in.readInt();
-            int preamble = in.readInt();
-
-            if (peerHandle == null) {
-                return new ResponderConfig(macAddress, responderType, supports80211mc, channelWidth,
-                        frequency, centerFreq0, centerFreq1, preamble);
-            } else {
-                return new ResponderConfig(peerHandle, responderType, supports80211mc, channelWidth,
-                        frequency, centerFreq0, centerFreq1, preamble);
-            }
-        }
-    };
-
-    @Override
-    public boolean equals(@Nullable Object o) {
-        if (this == o) {
-            return true;
-        }
-
-        if (!(o instanceof ResponderConfig)) {
-            return false;
-        }
-
-        ResponderConfig lhs = (ResponderConfig) o;
-
-        return Objects.equals(macAddress, lhs.macAddress) && Objects.equals(peerHandle,
-                lhs.peerHandle) && responderType == lhs.responderType
-                && supports80211mc == lhs.supports80211mc && channelWidth == lhs.channelWidth
-                && frequency == lhs.frequency && centerFreq0 == lhs.centerFreq0
-                && centerFreq1 == lhs.centerFreq1 && preamble == lhs.preamble;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(macAddress, peerHandle, responderType, supports80211mc, channelWidth,
-                frequency, centerFreq0, centerFreq1, preamble);
-    }
-
-    /** @hide */
-    @Override
-    public String toString() {
-        return new StringBuffer("ResponderConfig: macAddress=").append(macAddress).append(
-                ", peerHandle=").append(peerHandle == null ? "<null>" : peerHandle.peerId).append(
-                ", responderType=").append(responderType).append(", supports80211mc=").append(
-                supports80211mc).append(", channelWidth=").append(channelWidth).append(
-                ", frequency=").append(frequency).append(", centerFreq0=").append(
-                centerFreq0).append(", centerFreq1=").append(centerFreq1).append(
-                ", preamble=").append(preamble).toString();
-    }
-
-    /** @hide */
-    static int translateScanResultChannelWidth(int scanResultChannelWidth) {
-        switch (scanResultChannelWidth) {
-            case ScanResult.CHANNEL_WIDTH_20MHZ:
-                return CHANNEL_WIDTH_20MHZ;
-            case ScanResult.CHANNEL_WIDTH_40MHZ:
-                return CHANNEL_WIDTH_40MHZ;
-            case ScanResult.CHANNEL_WIDTH_80MHZ:
-                return CHANNEL_WIDTH_80MHZ;
-            case ScanResult.CHANNEL_WIDTH_160MHZ:
-                return CHANNEL_WIDTH_160MHZ;
-            case ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ:
-                return CHANNEL_WIDTH_80MHZ_PLUS_MHZ;
-            default:
-                throw new IllegalArgumentException(
-                        "translateScanResultChannelWidth: bad " + scanResultChannelWidth);
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/ResponderLocation.java b/wifi/java/android/net/wifi/rtt/ResponderLocation.java
deleted file mode 100644
index 218b2dca..0000000
--- a/wifi/java/android/net/wifi/rtt/ResponderLocation.java
+++ /dev/null
@@ -1,1427 +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.net.wifi.rtt;
-
-import static java.lang.annotation.RetentionPolicy.SOURCE;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.SuppressLint;
-import android.annotation.SystemApi;
-import android.location.Address;
-import android.location.Location;
-import android.net.MacAddress;
-import android.net.Uri;
-import android.net.wifi.rtt.CivicLocationKeys.CivicLocationKeysType;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.text.TextUtils;
-import android.util.SparseArray;
-import android.webkit.MimeTypeMap;
-
-import java.lang.annotation.Retention;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-
-/**
- * ResponderLocation is both a Location Configuration Information (LCI) decoder and a Location Civic
- * Report (LCR) decoder for information received from a Wi-Fi Access Point (AP) during Wi-Fi RTT
- * ranging process.
- *
- * <p>This is based on the IEEE P802.11-REVmc/D8.0 spec section 9.4.2.22, under Measurement Report
- * Element. Subelement location data-fields parsed from separate input LCI and LCR Information
- * Elements are unified in this class.</p>
- *
- * <p>Note: The information provided by this class is broadcast by a responder (usually an Access
- * Point), and passed on as-is. There is no guarantee this information is accurate or correct, and
- * as a result developers should carefully consider how this information should be used and provide
- * corresponding advice to users.</p>
- */
-public final class ResponderLocation implements Parcelable {
-    private static final int BYTE_MASK = 0xFF;
-    private static final int LSB_IN_BYTE = 0x01;
-    private static final int MSB_IN_BYTE = 0x80;
-    private static final int MIN_BUFFER_SIZE = 3; // length of LEAD_LCI_ELEMENT_BYTES
-    private static final int MAX_BUFFER_SIZE = 256;
-
-    // Information Element (IE) fields
-    private static final byte MEASUREMENT_TOKEN_AUTONOMOUS = 0x01;
-    private static final byte MEASUREMENT_REPORT_MODE = 0x00;
-    private static final byte MEASUREMENT_TYPE_LCI = 0x08;
-    private static final byte MEASUREMENT_TYPE_LCR = 0x0b;
-
-    // LCI Subelement IDs
-    private static final byte SUBELEMENT_LCI = 0x00;
-    private static final byte SUBELEMENT_Z = 0x04;
-    private static final byte SUBELEMENT_USAGE = 0x06;
-    private static final byte SUBELEMENT_BSSID_LIST = 0x07;
-
-    // LCI Subelement Lengths
-    private static final int SUBELEMENT_LCI_LENGTH = 16;
-    private static final int SUBELEMENT_Z_LENGTH = 6;
-    private static final int SUBELEMENT_USAGE_LENGTH1 = 1;
-    private static final int SUBELEMENT_USAGE_LENGTH3 = 3;
-    private static final int SUBELEMENT_BSSID_LIST_MIN_BUFFER_LENGTH = 1;
-
-    private static final byte[] LEAD_LCI_ELEMENT_BYTES = {
-            MEASUREMENT_TOKEN_AUTONOMOUS, MEASUREMENT_REPORT_MODE, MEASUREMENT_TYPE_LCI
-    };
-
-    // Subelement LCI constants
-
-    /* The LCI subelement bit-field lengths are described in Figure 9-214 of the REVmc spec and
-    represented here as a an array of integers */
-    private static final int[] SUBELEMENT_LCI_BIT_FIELD_LENGTHS = {
-            6, 34, 6, 34, 4, 6, 30, 3, 1, 1, 1, 2
-    };
-    private static final int LATLNG_FRACTION_BITS = 25;
-    private static final int LATLNG_UNCERTAINTY_BASE = 8;
-    private static final int ALTITUDE_FRACTION_BITS = 8;
-    private static final int ALTITUDE_UNCERTAINTY_BASE = 21;
-    private static final double LAT_ABS_LIMIT = 90.0;
-    private static final double LNG_ABS_LIMIT = 180.0;
-    private static final int UNCERTAINTY_UNDEFINED = 0;
-
-    // Subelement LCI fields indices
-    private static final int SUBELEMENT_LCI_LAT_UNCERTAINTY_INDEX = 0;
-    private static final int SUBELEMENT_LCI_LAT_INDEX = 1;
-    private static final int SUBELEMENT_LCI_LNG_UNCERTAINTY_INDEX = 2;
-    private static final int SUBELEMENT_LCI_LNG_INDEX = 3;
-    private static final int SUBELEMENT_LCI_ALT_TYPE_INDEX = 4;
-    private static final int SUBELEMENT_LCI_ALT_UNCERTAINTY_INDEX = 5;
-    private static final int SUBELEMENT_LCI_ALT_INDEX = 6;
-    private static final int SUBELEMENT_LCI_DATUM_INDEX = 7;
-    private static final int SUBELEMENT_LCI_REGLOC_AGREEMENT_INDEX = 8;
-    private static final int SUBELEMENT_LCI_REGLOC_DSE_INDEX = 9;
-    private static final int SUBELEMENT_LCI_DEPENDENT_STA_INDEX = 10;
-    private static final int SUBELEMENT_LCI_VERSION_INDEX = 11;
-
-    /**
-     * The Altitude value is interpreted based on the Altitude Type, and the selected mDatum.
-     *
-     * @hide
-     */
-    @Retention(SOURCE)
-    @IntDef({ALTITUDE_UNDEFINED, ALTITUDE_METERS, ALTITUDE_FLOORS})
-    public @interface AltitudeType {
-    }
-
-    /**
-     * Altitude is not defined for the Responder.
-     * The altitude and altitude uncertainty should not be used: see section 2.4 of IETF RFC 6225.
-     */
-    public static final int ALTITUDE_UNDEFINED = 0;
-    /** Responder Altitude is measured in meters.  */
-    public static final int ALTITUDE_METERS = 1;
-    /** Responder Altitude is measured in floors. */
-    public static final int ALTITUDE_FLOORS = 2;
-
-    /**
-     * The Datum value determines how coordinates are organized in relation to the real world.
-     *
-     * @hide
-     */
-    @Retention(SOURCE)
-    @IntDef({DATUM_UNDEFINED, DATUM_WGS84, DATUM_NAD83_NAV88, DATUM_NAD83_MLLW})
-    public @interface DatumType {
-    }
-
-    /** Datum is not defined. */
-    public static final int DATUM_UNDEFINED = 0;
-    /** Datum used is WGS84. */
-    public static final int DATUM_WGS84 = 1;
-    /** Datum used is NAD83 NAV88. */
-    public static final int DATUM_NAD83_NAV88 = 2;
-    /** Datum used is NAD83 MLLW. */
-    public static final int DATUM_NAD83_MLLW = 3;
-
-
-    /** Version of the LCI protocol is 1.0, the only defined protocol at this time. */
-    public static final int LCI_VERSION_1 = 1;
-
-    /** Provider/Source of the location */
-    private static final String LOCATION_PROVIDER = "WiFi Access Point";
-
-    // LCI Subelement Z constants
-    private static final int[] SUBELEMENT_Z_BIT_FIELD_LENGTHS = {2, 14, 24, 8};
-    private static final int Z_FLOOR_NUMBER_FRACTION_BITS = 4;
-    private static final int Z_FLOOR_HEIGHT_FRACTION_BITS = 12;
-    private static final int Z_MAX_HEIGHT_UNCERTAINTY_FACTOR = 25;
-
-    // LCI Subelement Z fields indices
-    private static final int SUBELEMENT_Z_LAT_EXPECTED_TO_MOVE_INDEX = 0;
-    private static final int SUBELEMENT_Z_FLOOR_NUMBER_INDEX = 1;
-    private static final int SUBELEMENT_Z_HEIGHT_ABOVE_FLOOR_INDEX = 2;
-    private static final int SUBELEMENT_Z_HEIGHT_ABOVE_FLOOR_UNCERTAINTY_INDEX = 3;
-
-    // LCI Subelement Usage Rules constants
-    private static final int SUBELEMENT_USAGE_MASK_RETRANSMIT = 0x01;
-    private static final int SUBELEMENT_USAGE_MASK_RETENTION_EXPIRES = 0x02;
-    private static final int SUBELEMENT_USAGE_MASK_STA_LOCATION_POLICY = 0x04;
-
-    // LCI Subelement Usage Rules field indices
-    private static final int SUBELEMENT_USAGE_PARAMS_INDEX = 0; // 8 bits
-
-    // LCI Subelement BSSID List
-    private static final int SUBELEMENT_BSSID_MAX_INDICATOR_INDEX = 0;
-    private static final int SUBELEMENT_BSSID_LIST_INDEX = 1;
-    private static final int BYTES_IN_A_BSSID = 6;
-
-    /**
-     * The Expected-To-Move value determines how mobile we expect the STA to be.
-     *
-     * @hide
-     */
-    @Retention(SOURCE)
-    @IntDef({LOCATION_FIXED, LOCATION_VARIABLE, LOCATION_MOVEMENT_UNKNOWN, LOCATION_RESERVED})
-    public @interface ExpectedToMoveType {
-    }
-
-    /** Location of responder is fixed (does not move) */
-    public static final int LOCATION_FIXED = 0;
-    /** Location of the responder is variable, and may move */
-    public static final int LOCATION_VARIABLE = 1;
-    /** Location of the responder is not known to be either fixed or variable. */
-    public static final int LOCATION_MOVEMENT_UNKNOWN = 2;
-    /** Location of the responder status is a reserved value */
-    public static final int LOCATION_RESERVED = 3;
-
-    // LCR Subelement IDs
-    private static final byte SUBELEMENT_LOCATION_CIVIC = 0x00;
-    private static final byte SUBELEMENT_MAP_IMAGE = 0x05;
-
-    // LCR Subelement Lengths
-    private static final int SUBELEMENT_LOCATION_CIVIC_MIN_LENGTH = 2;
-    private static final int SUBELEMENT_LOCATION_CIVIC_MAX_LENGTH = 256;
-    private static final int SUBELEMENT_MAP_IMAGE_URL_MAX_LENGTH = 256;
-
-    private static final byte[] LEAD_LCR_ELEMENT_BYTES = {
-            MEASUREMENT_TOKEN_AUTONOMOUS, MEASUREMENT_REPORT_MODE, MEASUREMENT_TYPE_LCR
-    };
-
-    // LCR Location Civic Subelement
-    private static final int CIVIC_COUNTRY_CODE_INDEX = 0;
-    private static final int CIVIC_TLV_LIST_INDEX = 2;
-
-    // LCR Map Image Subelement field indexes.
-    private static final int SUBELEMENT_IMAGE_MAP_TYPE_INDEX = 0;
-    private static final int MAP_TYPE_URL_DEFINED = 0;
-    private static final String[] SUPPORTED_IMAGE_FILE_EXTENSIONS = {
-            "",
-            "png",
-            "gif",
-            "jpg",
-            "svg",
-            "dxf",
-            "dwg",
-            "dwf",
-            "cad",
-            "tif",
-            "gml",
-            "kml",
-            "bmp",
-            "pgm",
-            "ppm",
-            "xbm",
-            "xpm",
-            "ico"
-    };
-
-    // General LCI and LCR state
-    private final boolean mIsValid;
-
-    /*
-      These members are not final because we are not sure if the corresponding subelement will be
-      present until after the parsing process. However, the default value should be set as listed.
-    */
-    private boolean mIsLciValid = false;
-    private boolean mIsZValid = false;
-    private boolean mIsUsageValid = true; // By default this is assumed true
-    private boolean mIsBssidListValid = false;
-    private boolean mIsLocationCivicValid = false;
-    private boolean mIsMapImageValid = false;
-
-    // LCI Subelement LCI state
-    private double mLatitudeUncertainty;
-    private double mLatitude;
-    private double mLongitudeUncertainty;
-    private double mLongitude;
-    private int mAltitudeType;
-    private double mAltitudeUncertainty;
-    private double mAltitude;
-    private int mDatum;
-    private boolean mLciRegisteredLocationAgreement;
-    private boolean mLciRegisteredLocationDse;
-    private boolean mLciDependentStation;
-    private int mLciVersion;
-
-    // LCI Subelement Z state
-    private int mExpectedToMove;
-    private double mFloorNumber;
-    private double mHeightAboveFloorMeters;
-    private double mHeightAboveFloorUncertaintyMeters;
-
-    // LCI Subelement Usage Rights state
-    private boolean mUsageRetransmit;
-    private boolean mUsageRetentionExpires;
-    private boolean mUsageExtraInfoOnAssociation;
-
-    // LCI Subelement BSSID List state
-    private ArrayList<MacAddress> mBssidList;
-
-    // LCR Subelement Location Civic state
-    private String mCivicLocationCountryCode;
-    private String mCivicLocationString;
-    private CivicLocation mCivicLocation;
-
-    // LCR Subelement Map Image state
-    private int mMapImageType;
-    private Uri mMapImageUri;
-
-    /**
-     * Constructor
-     *
-     * @param lciBuffer the bytes received in the LCI Measurement Report Information Element
-     * @param lcrBuffer the bytes received in the LCR Measurement Report Information Element
-     *
-     * @hide
-     */
-    public ResponderLocation(byte[] lciBuffer, byte[] lcrBuffer) {
-        boolean isLciIeValid = false;
-        boolean isLcrIeValid = false;
-        setLciSubelementDefaults();
-        setZaxisSubelementDefaults();
-        setUsageSubelementDefaults();
-        setBssidListSubelementDefaults();
-        setCivicLocationSubelementDefaults();
-        setMapImageSubelementDefaults();
-        if (lciBuffer != null && lciBuffer.length > LEAD_LCI_ELEMENT_BYTES.length) {
-            isLciIeValid = parseInformationElementBuffer(
-                MEASUREMENT_TYPE_LCI, lciBuffer, LEAD_LCI_ELEMENT_BYTES);
-        }
-        if (lcrBuffer != null && lcrBuffer.length > LEAD_LCR_ELEMENT_BYTES.length) {
-            isLcrIeValid = parseInformationElementBuffer(
-                MEASUREMENT_TYPE_LCR, lcrBuffer, LEAD_LCR_ELEMENT_BYTES);
-        }
-
-        boolean isLciValid = isLciIeValid && mIsUsageValid
-                && (mIsLciValid || mIsZValid || mIsBssidListValid);
-
-        boolean isLcrValid = isLcrIeValid && mIsUsageValid
-                && (mIsLocationCivicValid || mIsMapImageValid);
-
-        mIsValid = isLciValid || isLcrValid;
-
-        if (!mIsValid) {
-            setLciSubelementDefaults();
-            setZaxisSubelementDefaults();
-            setCivicLocationSubelementDefaults();
-            setMapImageSubelementDefaults();
-        }
-    }
-
-    private ResponderLocation(Parcel in) {
-        // Object Validation
-        mIsValid = in.readByte() != 0;
-        mIsLciValid = in.readByte() != 0;
-        mIsZValid = in.readByte() != 0;
-        mIsUsageValid = in.readByte() != 0;
-        mIsBssidListValid = in.readByte() != 0;
-        mIsLocationCivicValid = in.readByte() != 0;
-        mIsMapImageValid = in.readByte() != 0;
-
-        // LCI Subelement LCI state
-        mLatitudeUncertainty = in.readDouble();
-        mLatitude = in.readDouble();
-        mLongitudeUncertainty = in.readDouble();
-        mLongitude = in.readDouble();
-        mAltitudeType = in.readInt();
-        mAltitudeUncertainty = in.readDouble();
-        mAltitude = in.readDouble();
-        mDatum = in.readInt();
-        mLciRegisteredLocationAgreement = in.readByte() != 0;
-        mLciRegisteredLocationDse = in.readByte() != 0;
-        mLciDependentStation = in.readByte() != 0;
-        mLciVersion = in.readInt();
-
-        // LCI Subelement Z state
-        mExpectedToMove = in.readInt();
-        mFloorNumber = in.readDouble();
-        mHeightAboveFloorMeters = in.readDouble();
-        mHeightAboveFloorUncertaintyMeters = in.readDouble();
-
-        // LCI Usage Rights
-        mUsageRetransmit = in.readByte() != 0;
-        mUsageRetentionExpires = in.readByte() != 0;
-        mUsageExtraInfoOnAssociation = in.readByte() != 0;
-
-        // LCI Subelement BSSID List
-        mBssidList = in.readArrayList(MacAddress.class.getClassLoader());
-
-        // LCR Subelement Location Civic
-        mCivicLocationCountryCode = in.readString();
-        mCivicLocationString = in.readString();
-        mCivicLocation = in.readParcelable(this.getClass().getClassLoader());
-
-        // LCR Subelement Map Image
-        mMapImageType = in.readInt();
-        String urlString = in.readString();
-        if (TextUtils.isEmpty(urlString)) {
-            mMapImageUri = null;
-        } else {
-            mMapImageUri = Uri.parse(urlString);
-        }
-    }
-
-    public static final @android.annotation.NonNull Creator<ResponderLocation> CREATOR = new Creator<ResponderLocation>() {
-        @Override
-        public ResponderLocation createFromParcel(Parcel in) {
-            return new ResponderLocation(in);
-        }
-
-        @Override
-        public ResponderLocation[] newArray(int size) {
-            return new ResponderLocation[size];
-        }
-    };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int flags) {
-        // Object
-        parcel.writeByte((byte) (mIsValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsLciValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsZValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsUsageValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsBssidListValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsLocationCivicValid ? 1 : 0));
-        parcel.writeByte((byte) (mIsMapImageValid ? 1 : 0));
-
-        // LCI Subelement LCI state
-        parcel.writeDouble(mLatitudeUncertainty);
-        parcel.writeDouble(mLatitude);
-        parcel.writeDouble(mLongitudeUncertainty);
-        parcel.writeDouble(mLongitude);
-        parcel.writeInt(mAltitudeType);
-        parcel.writeDouble(mAltitudeUncertainty);
-        parcel.writeDouble(mAltitude);
-        parcel.writeInt(mDatum);
-        parcel.writeByte((byte) (mLciRegisteredLocationAgreement ? 1 : 0));
-        parcel.writeByte((byte) (mLciRegisteredLocationDse ? 1 : 0));
-        parcel.writeByte((byte) (mLciDependentStation ? 1 : 0));
-        parcel.writeInt(mLciVersion);
-
-        // LCI Subelement Z state
-        parcel.writeInt(mExpectedToMove);
-        parcel.writeDouble(mFloorNumber);
-        parcel.writeDouble(mHeightAboveFloorMeters);
-        parcel.writeDouble(mHeightAboveFloorUncertaintyMeters);
-
-        // LCI Usage Rights
-        parcel.writeByte((byte) (mUsageRetransmit ? 1 : 0));
-        parcel.writeByte((byte) (mUsageRetentionExpires ? 1 : 0));
-        parcel.writeByte((byte) (mUsageExtraInfoOnAssociation ? 1 : 0));
-
-        // LCI Subelement BSSID List
-        parcel.writeList(mBssidList);
-
-        // LCR Subelement Location Civic
-        parcel.writeString(mCivicLocationCountryCode);
-        parcel.writeString(mCivicLocationString);
-        parcel.writeParcelable(mCivicLocation, flags);
-
-        // LCR Subelement Map Image
-        parcel.writeInt(mMapImageType);
-        if (mMapImageUri != null) {
-            parcel.writeString(mMapImageUri.toString());
-        } else {
-            parcel.writeString("");
-        }
-    }
-
-    /**
-     * Test if the Information Element (IE) is in the correct format, and then parse its Subelements
-     * based on their type, and setting state in this object when present.
-     *
-     * @return a boolean indicating the success of the parsing function
-     */
-    private boolean parseInformationElementBuffer(
-            int ieType, byte[] buffer, byte[] expectedLeadBytes) {
-        int bufferPtr = 0;
-        int bufferLength = buffer.length;
-
-        // Ensure the buffer size is within expected limits
-        if (bufferLength < MIN_BUFFER_SIZE || bufferLength > MAX_BUFFER_SIZE) {
-            return false;
-        }
-
-        // Ensure the IE contains the correct leading bytes
-        byte[] leadBufferBytes = Arrays.copyOfRange(buffer, bufferPtr, expectedLeadBytes.length);
-        if (!Arrays.equals(leadBufferBytes, expectedLeadBytes)) {
-            return false;
-        }
-
-        // Iterate through the sub-elements contained in the Information Element (IE)
-        bufferPtr += expectedLeadBytes.length;
-        // Loop over the buffer ensuring there are 2-bytes available for each new subelement tested.
-        while (bufferPtr + 1 < bufferLength) {
-            byte subelement = buffer[bufferPtr++];
-            int subelementLength = buffer[bufferPtr++];
-            // Check there is enough data for the next subelement
-            if ((bufferPtr + subelementLength) > bufferLength || subelementLength <= 0) {
-                return false;
-            }
-
-            byte[] subelementData =
-                    Arrays.copyOfRange(buffer, bufferPtr, bufferPtr + subelementLength);
-
-            if (ieType == MEASUREMENT_TYPE_LCI) {
-                switch (subelement) {
-                    case SUBELEMENT_LCI:
-                        mIsLciValid = parseSubelementLci(subelementData);
-                        if (!mIsLciValid || mLciVersion != LCI_VERSION_1) {
-                            setLciSubelementDefaults();
-                        }
-                        break;
-                    case SUBELEMENT_Z:
-                        mIsZValid = parseSubelementZ(subelementData);
-                        if (!mIsZValid) {
-                            setZaxisSubelementDefaults();
-                        }
-                        break;
-                    case SUBELEMENT_USAGE:
-                        mIsUsageValid = parseSubelementUsage(subelementData);
-                        // Note: if the Usage Subelement is not valid, don't reset the state, as
-                        // it is now indicating the whole ResponderLocation is invalid.
-                        break;
-                    case SUBELEMENT_BSSID_LIST:
-                        mIsBssidListValid = parseSubelementBssidList(subelementData);
-                        if (!mIsBssidListValid) {
-                            setBssidListSubelementDefaults();
-                        }
-                        break;
-                    default:
-                        break; // skip over unused or vendor specific subelements
-                }
-            } else if (ieType == MEASUREMENT_TYPE_LCR) {
-                switch (subelement) {
-                    case SUBELEMENT_LOCATION_CIVIC:
-                        mIsLocationCivicValid = parseSubelementLocationCivic(subelementData);
-                        if (!mIsLocationCivicValid) {
-                            setCivicLocationSubelementDefaults();
-                        }
-                        break;
-                    case SUBELEMENT_MAP_IMAGE:
-                        mIsMapImageValid = parseSubelementMapImage(subelementData);
-                        if (!mIsMapImageValid) {
-                            setMapImageSubelementDefaults();
-                        }
-                        break;
-                    default:
-                        break; // skip over unused or other vendor specific subelements
-                }
-            }
-
-            bufferPtr += subelementLength;
-        }
-        return true;
-    }
-
-    /**
-     * Parse the LCI Sub-Element in the LCI Information Element (IE).
-     *
-     * @param buffer a buffer containing the subelement
-     * @return boolean true indicates success
-     */
-    private boolean parseSubelementLci(byte[] buffer) {
-        if (buffer.length > SUBELEMENT_LCI_LENGTH) {
-            return false;
-        }
-        swapEndianByteByByte(buffer);
-        long[] subelementLciFields = getFieldData(buffer, SUBELEMENT_LCI_BIT_FIELD_LENGTHS);
-        if (subelementLciFields == null) {
-            return false;
-        }
-        // Set member state based on parsed buffer data
-        mLatitudeUncertainty = decodeLciLatLngUncertainty(
-                subelementLciFields[SUBELEMENT_LCI_LAT_UNCERTAINTY_INDEX]);
-        mLatitude = decodeLciLatLng(subelementLciFields, SUBELEMENT_LCI_BIT_FIELD_LENGTHS,
-                SUBELEMENT_LCI_LAT_INDEX, LAT_ABS_LIMIT);
-        mLongitudeUncertainty = decodeLciLatLngUncertainty(
-                subelementLciFields[SUBELEMENT_LCI_LNG_UNCERTAINTY_INDEX]);
-        mLongitude =
-                decodeLciLatLng(subelementLciFields, SUBELEMENT_LCI_BIT_FIELD_LENGTHS,
-                        SUBELEMENT_LCI_LNG_INDEX, LNG_ABS_LIMIT);
-        mAltitudeType = (int) subelementLciFields[SUBELEMENT_LCI_ALT_TYPE_INDEX] & BYTE_MASK;
-        mAltitudeUncertainty =
-                decodeLciAltUncertainty(subelementLciFields[SUBELEMENT_LCI_ALT_UNCERTAINTY_INDEX]);
-        mAltitude =
-                Math.scalb(subelementLciFields[SUBELEMENT_LCI_ALT_INDEX], -ALTITUDE_FRACTION_BITS);
-        mDatum = (int) subelementLciFields[SUBELEMENT_LCI_DATUM_INDEX] & BYTE_MASK;
-        mLciRegisteredLocationAgreement =
-                (subelementLciFields[SUBELEMENT_LCI_REGLOC_AGREEMENT_INDEX] == 1);
-        mLciRegisteredLocationDse =
-                (subelementLciFields[SUBELEMENT_LCI_REGLOC_DSE_INDEX] == 1);
-        mLciDependentStation =
-                (subelementLciFields[SUBELEMENT_LCI_DEPENDENT_STA_INDEX] == 1);
-        mLciVersion = (int) subelementLciFields[SUBELEMENT_LCI_VERSION_INDEX];
-        return true;
-    }
-
-    /**
-     * Decode the floating point value of an encoded lat or lng in the LCI subelement field.
-     *
-     * @param fields        the array of field data represented as longs
-     * @param bitFieldSizes the lengths of each field
-     * @param offset        the offset of the field being decoded
-     * @param limit the maximum absolute value (note: different for lat vs lng)
-     * @return the floating point value of the lat or lng
-     */
-    private double decodeLciLatLng(long[] fields, int[] bitFieldSizes, int offset, double limit) {
-        double angle;
-        if ((fields[offset] & (long) Math.pow(2, bitFieldSizes[offset] - 1)) != 0) {
-            // Negative 2's complement value
-            // Note: The Math.pow(...) method cannot return a NaN value because the bitFieldSize
-            // for Lat or Lng is limited to exactly 34 bits.
-            angle = Math.scalb((double) fields[offset] - Math.pow(2, bitFieldSizes[offset]),
-                    -LATLNG_FRACTION_BITS);
-        } else {
-            // Positive 2's complement value
-            angle = Math.scalb((double) fields[offset], -LATLNG_FRACTION_BITS);
-        }
-        if (angle > limit) {
-            angle = limit;
-        } else if (angle < -limit) {
-            angle = -limit;
-        }
-        return angle;
-    }
-
-    /**
-     * Coverts an encoded Lat/Lng uncertainty into a number of degrees.
-     *
-     * @param encodedValue the encoded uncertainty
-     * @return the value in degrees
-     */
-    private double decodeLciLatLngUncertainty(long encodedValue) {
-        return Math.pow(2, LATLNG_UNCERTAINTY_BASE - encodedValue);
-    }
-
-    /**
-     * Converts an encoded Alt uncertainty into a number of degrees.
-     *
-     * @param encodedValue the encoded uncertainty
-     * @return the value in degrees
-     */
-    private double decodeLciAltUncertainty(long encodedValue) {
-        return Math.pow(2, ALTITUDE_UNCERTAINTY_BASE - encodedValue);
-    }
-
-    /**
-     * Parse the Z subelement of the LCI IE.
-     *
-     * @param buffer a buffer containing the subelement
-     * @return boolean true indicates success
-     */
-    private boolean parseSubelementZ(byte[] buffer) {
-        if (buffer.length != SUBELEMENT_Z_LENGTH) {
-            return false;
-        }
-        swapEndianByteByByte(buffer);
-        long[] subelementZFields = getFieldData(buffer, SUBELEMENT_Z_BIT_FIELD_LENGTHS);
-        if (subelementZFields == null) {
-            return false;
-        }
-
-        mExpectedToMove =
-                (int) subelementZFields[SUBELEMENT_Z_LAT_EXPECTED_TO_MOVE_INDEX] & BYTE_MASK;
-        mFloorNumber = decodeZUnsignedToSignedValue(subelementZFields,
-                SUBELEMENT_Z_BIT_FIELD_LENGTHS, SUBELEMENT_Z_FLOOR_NUMBER_INDEX,
-                Z_FLOOR_NUMBER_FRACTION_BITS);
-
-        mHeightAboveFloorMeters = decodeZUnsignedToSignedValue(subelementZFields,
-                SUBELEMENT_Z_BIT_FIELD_LENGTHS, SUBELEMENT_Z_HEIGHT_ABOVE_FLOOR_INDEX,
-                Z_FLOOR_HEIGHT_FRACTION_BITS);
-
-        long zHeightUncertainty =
-                subelementZFields[SUBELEMENT_Z_HEIGHT_ABOVE_FLOOR_UNCERTAINTY_INDEX];
-        if (zHeightUncertainty > 0 && zHeightUncertainty < Z_MAX_HEIGHT_UNCERTAINTY_FACTOR) {
-            mHeightAboveFloorUncertaintyMeters =
-                    Math.pow(2, Z_FLOOR_HEIGHT_FRACTION_BITS - zHeightUncertainty - 1);
-        } else {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Decode a two's complement encoded value, to a signed double based on the field length.
-     *
-     * @param fieldValues the array of field values reprented as longs
-     * @param fieldLengths the array of field lengths
-     * @param index the index of the field being decoded
-     * @param fraction the number of fractional bits in the value
-     * @return the signed value represented as a double
-     */
-    private double decodeZUnsignedToSignedValue(long[] fieldValues, int[] fieldLengths, int index,
-            int fraction) {
-        int value = (int) fieldValues[index];
-        int maxPositiveValue = (int) Math.pow(2, fieldLengths[index] - 1) - 1;
-        if (value > maxPositiveValue) {
-            value -= Math.pow(2, fieldLengths[index]);
-        }
-        return Math.scalb(value, -fraction);
-    }
-
-    /**
-     * Parse Subelement Usage Rights
-     */
-    private boolean parseSubelementUsage(byte[] buffer) {
-        if (buffer.length != SUBELEMENT_USAGE_LENGTH1
-                && buffer.length != SUBELEMENT_USAGE_LENGTH3) {
-            return false;
-        }
-        mUsageRetransmit =
-                (buffer[SUBELEMENT_USAGE_PARAMS_INDEX] & SUBELEMENT_USAGE_MASK_RETRANSMIT) != 0;
-        mUsageRetentionExpires =
-                (buffer[SUBELEMENT_USAGE_PARAMS_INDEX] & SUBELEMENT_USAGE_MASK_RETENTION_EXPIRES)
-                        != 0;
-        mUsageExtraInfoOnAssociation =
-                (buffer[SUBELEMENT_USAGE_PARAMS_INDEX] & SUBELEMENT_USAGE_MASK_STA_LOCATION_POLICY)
-                        != 0;
-        // Note: the Retransmit flag must be true, and RetentionExpires, false for the
-        // ResponderLocation object to be usable by public applications.
-        return (mUsageRetransmit && !mUsageRetentionExpires);
-    }
-
-    /**
-     * Parse the BSSID List Subelement of the LCI IE.
-     *
-     * @param buffer a buffer containing the subelement
-     * @return boolean true indicates success
-     */
-    private boolean parseSubelementBssidList(byte[] buffer) {
-        if (buffer.length < SUBELEMENT_BSSID_LIST_MIN_BUFFER_LENGTH) {
-            return false;
-        }
-        if ((buffer.length - 1) % BYTES_IN_A_BSSID != 0) {
-            return false;
-        }
-
-        int maxBssidIndicator = (int) buffer[SUBELEMENT_BSSID_MAX_INDICATOR_INDEX] & BYTE_MASK;
-        int bssidListLength = (buffer.length - 1) / BYTES_IN_A_BSSID;
-        // The maxBSSIDIndicator is ignored. Its use is still being clarified in 802.11REVmd,
-        // which is not published at this time. This field will be used in a future
-        // release of Android after 802.11REVmd is public. Here, we interpret the following
-        // params as an explicit list of BSSIDs.
-
-
-        int bssidOffset = SUBELEMENT_BSSID_LIST_INDEX;
-        for (int i = 0; i < bssidListLength; i++) {
-            byte[] bssid = Arrays.copyOfRange(buffer, bssidOffset, bssidOffset + BYTES_IN_A_BSSID);
-            MacAddress macAddress = MacAddress.fromBytes(bssid);
-            mBssidList.add(macAddress);
-            bssidOffset += BYTES_IN_A_BSSID;
-        }
-        return true;
-    }
-
-    /**
-     * Parse the Location Civic subelement in the LCR IE.
-     *
-     * @param buffer a buffer containing the subelement
-     * @return boolean true indicates success
-     */
-    private boolean parseSubelementLocationCivic(byte[] buffer) {
-        if (buffer.length <  SUBELEMENT_LOCATION_CIVIC_MIN_LENGTH
-                || buffer.length > SUBELEMENT_LOCATION_CIVIC_MAX_LENGTH) {
-            return false;
-        }
-        mCivicLocationCountryCode =
-                new String(Arrays.copyOfRange(buffer, CIVIC_COUNTRY_CODE_INDEX,
-                        CIVIC_TLV_LIST_INDEX)).toUpperCase();
-        CivicLocation civicLocation =
-                new CivicLocation(
-                        Arrays.copyOfRange(buffer, CIVIC_TLV_LIST_INDEX, buffer.length),
-                        mCivicLocationCountryCode);
-        if (!civicLocation.isValid()) {
-            return false;
-        }
-        this.mCivicLocation = civicLocation;
-        mCivicLocationString = civicLocation.toString();
-        return true;
-    }
-
-    /**
-     * Parse the Map Image subelement in the LCR IE.
-     *
-     * @param buffer a buffer containing the subelement
-     * @return boolean true indicates success
-     */
-    private boolean parseSubelementMapImage(byte[] buffer) {
-        if (buffer.length > SUBELEMENT_MAP_IMAGE_URL_MAX_LENGTH) {
-            return false;
-        }
-        int mapImageType = buffer[SUBELEMENT_IMAGE_MAP_TYPE_INDEX];
-        int supportedTypesMax = SUPPORTED_IMAGE_FILE_EXTENSIONS.length - 1;
-        if (mapImageType < MAP_TYPE_URL_DEFINED || mapImageType > supportedTypesMax) {
-            return false;
-        }
-        this.mMapImageType = mapImageType;
-        byte[] urlBytes = Arrays.copyOfRange(buffer, 1, buffer.length);
-        mMapImageUri = Uri.parse(new String(urlBytes, StandardCharsets.UTF_8));
-        return true;
-    }
-
-    /**
-     * Convert an image type code to a Mime type
-     *
-     * @param imageTypeCode encoded as an integer
-     * @return the mime type of the image file
-     */
-    private String imageTypeToMime(int imageTypeCode, String imageUrl) {
-        int supportedExtensionsMax = SUPPORTED_IMAGE_FILE_EXTENSIONS.length - 1;
-        if ((imageTypeCode == 0 && imageUrl == null) || imageTypeCode > supportedExtensionsMax) {
-            return null;
-        }
-        MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
-        if (imageTypeCode == 0) {
-            return mimeTypeMap.getMimeTypeFromExtension(
-                    MimeTypeMap.getFileExtensionFromUrl(imageUrl));
-        } else {
-            return mimeTypeMap.getMimeTypeFromExtension(
-                    SUPPORTED_IMAGE_FILE_EXTENSIONS[imageTypeCode]);
-        }
-    }
-
-    /**
-     * Converts a byte array containing fields of variable size, into an array of longs where the
-     * field boundaries are defined in a constant int array passed as an argument.
-     *
-     * @param buffer        the byte array containing all the fields
-     * @param bitFieldSizes the int array defining the size of each field
-     */
-    private long[] getFieldData(byte[] buffer, int[] bitFieldSizes) {
-        int bufferLengthBits = buffer.length * Byte.SIZE;
-        int sumBitFieldSizes = 0;
-        for (int i : bitFieldSizes) {
-            if (i > Long.SIZE) {
-                return null;
-            }
-            sumBitFieldSizes += i;
-        }
-        if (bufferLengthBits != sumBitFieldSizes) {
-            return null;
-        }
-        long[] fieldData = new long[bitFieldSizes.length];
-        int bufferBitPos = 0;
-        for (int fieldIndex = 0; fieldIndex < bitFieldSizes.length; fieldIndex++) {
-            int bitFieldSize = bitFieldSizes[fieldIndex];
-            long field = 0;
-            for (int n = 0; n < bitFieldSize; n++) {
-                field |= ((long) getBitAtBitOffsetInByteArray(buffer, bufferBitPos + n) << n);
-            }
-            fieldData[fieldIndex] = field;
-            bufferBitPos += bitFieldSize;
-        }
-        return fieldData;
-    }
-
-    /**
-     * Retrieves state of a bit at the bit-offset in a byte array, where the offset represents the
-     * bytes in contiguous data with each value in big endian order.
-     *
-     * @param buffer          the data buffer of bytes containing all the fields
-     * @param bufferBitOffset the bit offset into the entire buffer
-     * @return a zero or one value, representing the state of that bit.
-     */
-    private int getBitAtBitOffsetInByteArray(byte[] buffer, int bufferBitOffset) {
-        int bufferIndex = bufferBitOffset / Byte.SIZE; // The byte index that contains the bit
-        int bitOffsetInByte = bufferBitOffset % Byte.SIZE; // The bit offset within that byte
-        int result = (buffer[bufferIndex] & (MSB_IN_BYTE >> bitOffsetInByte)) == 0 ? 0 : 1;
-        return result;
-    }
-
-    /**
-     * Reverses the order of the bits in each byte of a byte array.
-     *
-     * @param buffer the array containing each byte that will be reversed
-     */
-    private void swapEndianByteByByte(byte[] buffer) {
-        for (int n = 0; n < buffer.length; n++) {
-            byte currentByte = buffer[n];
-            byte reversedByte = 0; // Cleared value
-            byte bitSelectorMask = LSB_IN_BYTE;
-            for (int i = 0; i < Byte.SIZE; i++) {
-                reversedByte = (byte) (reversedByte << 1);
-                if ((currentByte & bitSelectorMask) != 0) {
-                    reversedByte = (byte) (reversedByte | LSB_IN_BYTE);
-                }
-                bitSelectorMask = (byte) (bitSelectorMask << 1);
-            }
-            buffer[n] = reversedByte;
-        }
-    }
-
-    /**
-     * Sets the LCI subelement fields to the default undefined values.
-     */
-    private void setLciSubelementDefaults() {
-        mIsLciValid = false;
-        mLatitudeUncertainty = UNCERTAINTY_UNDEFINED;
-        mLatitude = 0;
-        mLongitudeUncertainty = UNCERTAINTY_UNDEFINED;
-        mLongitude = 0;
-        mAltitudeType = ALTITUDE_UNDEFINED;
-        mAltitudeUncertainty = UNCERTAINTY_UNDEFINED;
-        mAltitude = 0;
-        mDatum = DATUM_UNDEFINED;
-        mLciRegisteredLocationAgreement = false;
-        mLciRegisteredLocationDse = false;
-        mLciDependentStation = false;
-        mLciVersion = 0;
-    }
-
-    /**
-     * Sets the Z subelement fields to the default values when undefined.
-     */
-    private void setZaxisSubelementDefaults() {
-        mIsZValid = false;
-        mExpectedToMove = 0;
-        mFloorNumber = 0;
-        mHeightAboveFloorMeters = 0;
-        mHeightAboveFloorUncertaintyMeters = 0;
-    }
-
-    /**
-     * Sets the Usage Policy subelement fields to the default undefined values.
-     */
-    private void setUsageSubelementDefaults() {
-        mUsageRetransmit = true;
-        mUsageRetentionExpires = false;
-        mUsageExtraInfoOnAssociation = false;
-    }
-
-    /**
-     * Sets the BSSID List subelement fields to the default values when undefined.
-     */
-    private void setBssidListSubelementDefaults() {
-        mIsBssidListValid = false;
-        mBssidList = new ArrayList<>();
-    }
-
-    /**
-     * Sets the LCR Civic Location subelement field to the default undefined value.
-     *
-     * @hide
-     */
-    public void setCivicLocationSubelementDefaults() {
-        mIsLocationCivicValid = false;
-        mCivicLocationCountryCode = "";
-        mCivicLocationString = "";
-        mCivicLocation = null;
-    }
-
-    /**
-     * Sets the LCR Map Image subelement field to the default values when undefined.
-     */
-    private void setMapImageSubelementDefaults() {
-        mIsMapImageValid = false;
-        mMapImageType = MAP_TYPE_URL_DEFINED;
-        mMapImageUri = null;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-        ResponderLocation other = (ResponderLocation) obj;
-        return mIsValid == other.mIsValid
-                && mIsLciValid == other.mIsLciValid
-                && mIsZValid == other.mIsZValid
-                && mIsUsageValid == other.mIsUsageValid
-                && mIsBssidListValid == other.mIsBssidListValid
-                && mIsLocationCivicValid == other.mIsLocationCivicValid
-                && mIsMapImageValid == other.mIsMapImageValid
-                && mLatitudeUncertainty == other.mLatitudeUncertainty
-                && mLatitude == other.mLatitude
-                && mLongitudeUncertainty == other.mLongitudeUncertainty
-                && mLongitude == other.mLongitude
-                && mAltitudeType == other.mAltitudeType
-                && mAltitudeUncertainty == other.mAltitudeUncertainty
-                && mAltitude == other.mAltitude
-                && mDatum == other.mDatum
-                && mLciRegisteredLocationAgreement == other.mLciRegisteredLocationAgreement
-                && mLciRegisteredLocationDse == other.mLciRegisteredLocationDse
-                && mLciDependentStation == other.mLciDependentStation
-                && mLciVersion == other.mLciVersion
-                && mExpectedToMove == other.mExpectedToMove
-                && mFloorNumber == other.mFloorNumber
-                && mHeightAboveFloorMeters == other.mHeightAboveFloorMeters
-                && mHeightAboveFloorUncertaintyMeters
-                        == other.mHeightAboveFloorUncertaintyMeters
-                && mUsageRetransmit == other.mUsageRetransmit
-                && mUsageRetentionExpires == other.mUsageRetentionExpires
-                && mUsageExtraInfoOnAssociation == other.mUsageExtraInfoOnAssociation
-                && mBssidList.equals(other.mBssidList)
-                && mCivicLocationCountryCode.equals(other.mCivicLocationCountryCode)
-                && mCivicLocationString.equals(other.mCivicLocationString)
-                && Objects.equals(mCivicLocation, other.mCivicLocation)
-                && mMapImageType == other.mMapImageType
-                && Objects.equals(mMapImageUri, other.mMapImageUri);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mIsValid, mIsLciValid, mIsZValid, mIsUsageValid, mIsBssidListValid,
-                mIsLocationCivicValid, mIsMapImageValid, mLatitudeUncertainty, mLatitude,
-                mLongitudeUncertainty, mLongitude, mAltitudeType, mAltitudeUncertainty, mAltitude,
-                mDatum, mLciRegisteredLocationAgreement,
-                mLciRegisteredLocationDse, mLciDependentStation, mLciVersion,
-                mExpectedToMove, mFloorNumber, mHeightAboveFloorMeters,
-                mHeightAboveFloorUncertaintyMeters, mUsageRetransmit, mUsageRetentionExpires,
-                mUsageExtraInfoOnAssociation, mBssidList, mCivicLocationCountryCode,
-                mCivicLocationString, mCivicLocation, mMapImageType, mMapImageUri);
-    }
-
-    /**
-     * @return true if the ResponderLocation object is valid and contains useful information
-     * relevant to the location of the Responder. If this is ever false, this object will not be
-     * available to developers, and have a null value.
-     *
-     * @hide
-     */
-    public boolean isValid() {
-        return mIsValid;
-    }
-
-    /**
-     * @return true if the LCI subelement (containing Latitude, Longitude and Altitude) is valid.
-     *
-     * <p> This method tells us if the responder has provided its Location Configuration
-     * Information (LCI) directly, and is useful when an external database of responder locations
-     * is not available</p>
-     *
-     * <p>If isLciSubelementValid() returns true, all the LCI values provided by the corresponding
-     * getter methods will have been set as described by the responder, or else if false, they
-     * should not be used and will throw an IllegalStateException.</p>
-     */
-    public boolean isLciSubelementValid() {
-        return mIsLciValid;
-    }
-
-    /**
-     * @return the latitude uncertainty in degrees.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p> An unknown uncertainty is indicated by 0.</p>
-     */
-    public double getLatitudeUncertainty() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLatitudeUncertainty(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLatitudeUncertainty;
-    }
-
-    /**
-     * @return the latitude in degrees
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    public double getLatitude() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLatitude(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLatitude;
-    }
-
-    /**
-     * @return the Longitude uncertainty in degrees.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p> An unknown uncertainty is indicated by 0.</p>
-     */
-    public double getLongitudeUncertainty() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLongitudeUncertainty(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLongitudeUncertainty;
-    }
-
-    /**
-     * @return the Longitude in degrees..
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    public double getLongitude() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLatitudeUncertainty(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLongitude;
-    }
-
-    /**
-     * @return the Altitude type.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    @AltitudeType
-    public int getAltitudeType() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLatitudeUncertainty(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mAltitudeType;
-    }
-
-    /**
-     * @return the Altitude uncertainty in meters.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p>An unknown uncertainty is indicated by 0.</p>
-     */
-    public double getAltitudeUncertainty() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLatitudeUncertainty(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mAltitudeUncertainty;
-    }
-
-    /**
-     * @return the Altitude in units defined by the altitude type.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    public double getAltitude() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getAltitude(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mAltitude;
-    }
-
-    /**
-     * @return the Datum used for the LCI positioning information.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    @DatumType
-    public int getDatum() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getDatum(): invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mDatum;
-    }
-
-    /**
-     * @return true if the station is operating within a national policy area or an international
-     * agreement area near a national border, otherwise false
-     * (see 802.11REVmc Section 11.12.3 - Registered STA Operation).
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    public boolean getRegisteredLocationAgreementIndication() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getRegisteredLocationAgreementIndication(): "
-                        + "invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLciRegisteredLocationAgreement;
-    }
-
-    /**
-     * @return true indicating this is an enabling station, enabling the operation of nearby STAs
-     * with Dynamic Station Enablement (DSE), otherwise false.
-     * (see 802.11REVmc Section 11.12.3 - Registered STA Operation).
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     *
-     * @hide
-     */
-    public boolean getRegisteredLocationDseIndication() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getRegisteredLocationDseIndication(): "
-                    + "invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLciRegisteredLocationDse;
-    }
-
-    /**
-     * @return true indicating this is a dependent station that is operating with the enablement of
-     * an enabling station whose LCI is being reported, otherwise false.
-     * (see 802.11REVmc Section 11.12.3 - Registered STA Operation).
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     *
-     * @hide
-     */
-    public boolean getDependentStationIndication() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getDependentStationIndication(): "
-                    + "invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLciDependentStation;
-    }
-
-    /**
-     * @return a value greater or equal to 1, indicating the current version number
-     * of the LCI protocol.
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    public int getLciVersion() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "getLciVersion(): "
-                    + "invoked on an invalid result: mIsLciValid = false.");
-        }
-        return mLciVersion;
-    }
-
-    /**
-     * @return the LCI location represented as a {@link Location} object (best effort).
-     * <p>
-     * Only valid if {@link #isLciSubelementValid()} returns true, or will throw an exception.
-     */
-    @NonNull
-    public Location toLocation() {
-        if (!mIsLciValid) {
-            throw new IllegalStateException(
-                "toLocation(): "
-                    + "invoked on an invalid result: mIsLciValid = false.");
-        }
-        Location location = new Location(LOCATION_PROVIDER);
-        location.setLatitude(mLatitude);
-        location.setLongitude(mLongitude);
-        location.setAccuracy((float) (mLatitudeUncertainty + mLongitudeUncertainty) / 2);
-        location.setAltitude(mAltitude);
-        location.setVerticalAccuracyMeters((float) mAltitudeUncertainty);
-        location.setTime(System.currentTimeMillis());
-        return location;
-    }
-
-    /**
-     * @return if the Z subelement (containing mobility, Floor, Height above floor) is valid.
-     */
-    public boolean isZaxisSubelementValid() {
-        return mIsZValid;
-    }
-
-    /**
-     * @return an integer representing the mobility of the responder.
-     * <p>
-     * Only valid if {@link #isZaxisSubelementValid()} returns true, or will throw an exception.
-     */
-    @ExpectedToMoveType
-    public int getExpectedToMove() {
-        if (!mIsZValid) {
-            throw new IllegalStateException(
-                "getExpectedToMove(): invoked on an invalid result: mIsZValid = false.");
-        }
-        return mExpectedToMove;
-    }
-
-    /**
-     * @return the Z sub element Floor Number.
-     * <p>
-     * Only valid if {@link #isZaxisSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p>Note: this number can be positive or negative, with value increments of +/- 1/16 of a
-     * floor.</p>.
-     */
-    public double getFloorNumber() {
-        if (!mIsZValid) {
-            throw new IllegalStateException(
-                "getFloorNumber(): invoked on an invalid result: mIsZValid = false)");
-        }
-        return mFloorNumber;
-    }
-
-    /**
-     * @return the Z subelement Height above the floor in meters.
-     * <p>
-     * Only valid if {@link #isZaxisSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p>This value can be positive or negative. </p>
-     */
-    public double getHeightAboveFloorMeters() {
-        if (!mIsZValid) {
-            throw new IllegalStateException(
-                "getHeightAboveFloorMeters(): invoked on an invalid result: mIsZValid = false)");
-        }
-        return mHeightAboveFloorMeters;
-    }
-
-    /**
-     * @return the Z subelement Height above the floor uncertainty in meters.
-     * <p>
-     * Only valid if {@link #isZaxisSubelementValid()} returns true, or will throw an exception.
-     * </p>
-     * <p>An unknown uncertainty is indicated by 0.</p>
-     */
-    public double getHeightAboveFloorUncertaintyMeters() {
-        if (!mIsZValid) {
-            throw new IllegalStateException(
-                "getHeightAboveFloorUncertaintyMeters():"
-                    + "invoked on an invalid result: mIsZValid = false)");
-        }
-        return mHeightAboveFloorUncertaintyMeters;
-    }
-
-    /**
-     * @return true if the location information received from the responder can be
-     * retransmitted to another device, physically separate from the one that received it.
-     *
-     * @hide
-     */
-    public boolean getRetransmitPolicyIndication() {
-        return mUsageRetransmit;
-    }
-
-    /**
-     * @return true if location-data received should expire (and be deleted)
-     * by the time provided in the getRelativeExpirationTimeHours() method.
-     *
-     * @hide
-     */
-    public boolean getRetentionExpiresIndication() {
-        return mUsageRetentionExpires;
-    }
-
-    /**
-     * @return true if there is extra location info available on association.
-     *
-     * @hide
-     */
-    @SystemApi
-    public boolean getExtraInfoOnAssociationIndication() {
-        return mUsageExtraInfoOnAssociation;
-    }
-
-    /**
-     * @return the Immutable list of colocated BSSIDs at the responder.
-     *
-     * <p> Will return an empty list when there are no bssids listed.
-     */
-    public List<MacAddress> getColocatedBssids() {
-        return Collections.unmodifiableList(mBssidList);
-    }
-
-    /**
-     * @return the civic location represented as an {@link Address} object (best effort).
-     *
-     * <p> Will return a {@code null} when there is no Civic Location defined.
-     */
-    @Nullable
-    public Address toCivicLocationAddress() {
-        if (mCivicLocation != null && mCivicLocation.isValid()) {
-            return mCivicLocation.toAddress();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return the civic location represented as a {@link SparseArray}
-     * <p>
-     * Valid keys to access the SparseArray can be found in {@code CivicLocationKeys}.
-     * </p>
-     * <p> Will return a {@code null} when there is no Civic Location defined.
-     *
-     */
-    @Nullable
-    @SuppressLint("ChangedType")
-    public SparseArray<String> toCivicLocationSparseArray() {
-        if (mCivicLocation != null && mCivicLocation.isValid()) {
-            return mCivicLocation.toSparseArray();
-        } else {
-            return null;
-        }
-    }
-
-    /**
-     * @return the civic location two upper-case ASCII character country code defined in ISO 3166.
-     *
-     * <p> Will return a {@code null} when there is no country code defined.
-     *
-     * @hide
-     */
-    @Nullable
-    public String getCivicLocationCountryCode() {
-        return mCivicLocationCountryCode;
-    }
-
-    /**
-     * @return the value of the Civic Location String associated with a key.
-     *
-     * <p> Will return a {@code null} when there is no value associated with the key provided.
-     *
-     * @param key used to find a corresponding value in the Civic Location Tuple list
-     *
-     * @hide
-     */
-    @Nullable
-    public String getCivicLocationElementValue(@CivicLocationKeysType int key) {
-        return mCivicLocation.getCivicElementValue(key);
-    }
-
-    /**
-     * @return the Map Image file Mime type, referred to by getMapImageUrl().
-     */
-    @Nullable
-    public String getMapImageMimeType() {
-        if (mMapImageUri == null) {
-            return null;
-        } else {
-            return imageTypeToMime(mMapImageType, mMapImageUri.toString());
-        }
-    }
-
-    /**
-     * @return a URI referencing a map-file showing the local floor plan.
-     *
-     * <p> Will return a {@code null} when there is no URI defined.
-     */
-    @Nullable
-    public Uri getMapImageUri() {
-        return mMapImageUri;
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/WifiRttManager.java b/wifi/java/android/net/wifi/rtt/WifiRttManager.java
deleted file mode 100644
index 865702a..0000000
--- a/wifi/java/android/net/wifi/rtt/WifiRttManager.java
+++ /dev/null
@@ -1,190 +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.net.wifi.rtt;
-
-import static android.Manifest.permission.ACCESS_FINE_LOCATION;
-import static android.Manifest.permission.ACCESS_WIFI_STATE;
-import static android.Manifest.permission.CHANGE_WIFI_STATE;
-import static android.Manifest.permission.LOCATION_HARDWARE;
-
-import android.annotation.CallbackExecutor;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.annotation.RequiresPermission;
-import android.annotation.SdkConstant;
-import android.annotation.SystemApi;
-import android.annotation.SystemService;
-import android.content.Context;
-import android.os.Binder;
-import android.os.RemoteException;
-import android.os.WorkSource;
-import android.util.Log;
-
-import java.util.List;
-import java.util.concurrent.Executor;
-
-/**
- * This class provides the primary API for measuring distance (range) to other devices using the
- * IEEE 802.11mc Wi-Fi Round Trip Time (RTT) technology.
- * <p>
- * The devices which can be ranged include:
- * <li>Access Points (APs)
- * <li>Wi-Fi Aware peers
- * <p>
- * Ranging requests are triggered using
- * {@link #startRanging(RangingRequest, Executor, RangingResultCallback)}. Results (in case of
- * successful operation) are returned in the {@link RangingResultCallback#onRangingResults(List)}
- * callback.
- * <p>
- *     Wi-Fi RTT may not be usable at some points, e.g. when Wi-Fi is disabled. To validate that
- *     the functionality is available use the {@link #isAvailable()} function. To track
- *     changes in RTT usability register for the {@link #ACTION_WIFI_RTT_STATE_CHANGED}
- *     broadcast. Note that this broadcast is not sticky - you should register for it and then
- *     check the above API to avoid a race condition.
- */
-@SystemService(Context.WIFI_RTT_RANGING_SERVICE)
-public class WifiRttManager {
-    private static final String TAG = "WifiRttManager";
-    private static final boolean VDBG = false;
-
-    private final Context mContext;
-    private final IWifiRttManager mService;
-
-    /**
-     * Broadcast intent action to indicate that the state of Wi-Fi RTT availability has changed.
-     * Use the {@link #isAvailable()} to query the current status.
-     * This broadcast is <b>not</b> sticky, use the {@link #isAvailable()} API after registering
-     * the broadcast to check the current state of Wi-Fi RTT.
-     * <p>Note: The broadcast is only delivered to registered receivers - no manifest registered
-     * components will be launched.
-     */
-    @SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
-    public static final String ACTION_WIFI_RTT_STATE_CHANGED =
-            "android.net.wifi.rtt.action.WIFI_RTT_STATE_CHANGED";
-
-    /** @hide */
-    public WifiRttManager(@NonNull Context context, @NonNull IWifiRttManager service) {
-        mContext = context;
-        mService = service;
-    }
-
-    /**
-     * Returns the current status of RTT API: whether or not RTT is available. To track
-     * changes in the state of RTT API register for the
-     * {@link #ACTION_WIFI_RTT_STATE_CHANGED} broadcast.
-     * <p>Note: availability of RTT does not mean that the app can use the API. The app's
-     * permissions and platform Location Mode are validated at run-time.
-     *
-     * @return A boolean indicating whether the app can use the RTT API at this time (true) or
-     * not (false).
-     */
-    public boolean isAvailable() {
-        try {
-            return mService.isAvailable();
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Initiate a request to range to a set of devices specified in the {@link RangingRequest}.
-     * Results will be returned in the {@link RangingResultCallback} set of callbacks.
-     *
-     * @param request  A request specifying a set of devices whose distance measurements are
-     *                 requested.
-     * @param executor The Executor on which to run the callback.
-     * @param callback A callback for the result of the ranging request.
-     */
-    @RequiresPermission(allOf = {ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE, ACCESS_WIFI_STATE})
-    public void startRanging(@NonNull RangingRequest request,
-            @NonNull @CallbackExecutor Executor executor, @NonNull RangingResultCallback callback) {
-        startRanging(null, request, executor, callback);
-    }
-
-    /**
-     * Initiate a request to range to a set of devices specified in the {@link RangingRequest}.
-     * Results will be returned in the {@link RangingResultCallback} set of callbacks.
-     *
-     * @param workSource A mechanism to specify an alternative work-source for the request.
-     * @param request  A request specifying a set of devices whose distance measurements are
-     *                 requested.
-     * @param executor The Executor on which to run the callback.
-     * @param callback A callback for the result of the ranging request.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(allOf = {LOCATION_HARDWARE, ACCESS_FINE_LOCATION, CHANGE_WIFI_STATE,
-            ACCESS_WIFI_STATE})
-    public void startRanging(@Nullable WorkSource workSource, @NonNull RangingRequest request,
-            @NonNull @CallbackExecutor Executor executor, @NonNull RangingResultCallback callback) {
-        if (VDBG) {
-            Log.v(TAG, "startRanging: workSource=" + workSource + ", request=" + request
-                    + ", callback=" + callback + ", executor=" + executor);
-        }
-
-        if (executor == null) {
-            throw new IllegalArgumentException("Null executor provided");
-        }
-        if (callback == null) {
-            throw new IllegalArgumentException("Null callback provided");
-        }
-
-        Binder binder = new Binder();
-        try {
-            mService.startRanging(binder, mContext.getOpPackageName(),
-                    mContext.getAttributionTag(), workSource, request, new IRttCallback.Stub() {
-                        @Override
-                        public void onRangingFailure(int status) throws RemoteException {
-                            clearCallingIdentity();
-                            executor.execute(() -> callback.onRangingFailure(status));
-                        }
-
-                        @Override
-                        public void onRangingResults(List<RangingResult> results)
-                                throws RemoteException {
-                            clearCallingIdentity();
-                            executor.execute(() -> callback.onRangingResults(results));
-                        }
-                    });
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-
-    /**
-     * Cancel all ranging requests for the specified work sources. The requests have been requested
-     * using {@link #startRanging(WorkSource, RangingRequest, Executor, RangingResultCallback)}.
-     *
-     * @param workSource The work-sources of the requesters.
-     *
-     * @hide
-     */
-    @SystemApi
-    @RequiresPermission(allOf = {LOCATION_HARDWARE})
-    public void cancelRanging(@Nullable WorkSource workSource) {
-        if (VDBG) {
-            Log.v(TAG, "cancelRanging: workSource=" + workSource);
-        }
-
-        try {
-            mService.cancelRanging(workSource);
-        } catch (RemoteException e) {
-            throw e.rethrowFromSystemServer();
-        }
-    }
-}
diff --git a/wifi/java/android/net/wifi/rtt/package.html b/wifi/java/android/net/wifi/rtt/package.html
deleted file mode 100644
index 4a32f52..0000000
--- a/wifi/java/android/net/wifi/rtt/package.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<HTML>
-<BODY>
-<p>Provides classes which allow applications to use Wi-Fi RTT (IEEE 802.11mc) to measure distance
-    to supporting Access Points and peer devices.</p>
-<p>The primary entry point to Wi-Fi RTT capabilities is the
-    {@link android.net.wifi.rtt.WifiRttManager} class, which is acquired by calling
-    {@link android.content.Context#getSystemService(String)
-    Context.getSystemService(Context.WIFI_RTT_RANGING_SERVICE)}</p>
-
-<p>Some APIs may require the following user permissions:</p>
-<ul>
-    <li>{@link android.Manifest.permission#ACCESS_WIFI_STATE}</li>
-    <li>{@link android.Manifest.permission#CHANGE_WIFI_STATE}</li>
-    <li>{@link android.Manifest.permission#ACCESS_FINE_LOCATION}</li>
-</ul>
-<p>Usage of the API is also gated by the device's Location Mode: whether it permits Wi-Fi based
-location to be queried.</p>
-
-<p class="note"><strong>Note:</strong> Not all Android-powered devices support Wi-Fi RTT
-    functionality.
-    If your application only works with Wi-Fi RTT (i.e. it should only be installed on devices which
-    support Wi-Fi RTT), declare so with a <a
-            href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
-        {@code <uses-feature>}</a>
-    element in the manifest file:</p>
-<pre>
-&lt;manifest ...>
-    &lt;uses-feature android:name="android.hardware.wifi.rtt" />
-    ...
-&lt;/manifest>
-</pre>
-<p>Alternatively, if your application does not require Wi-Fi RTT but can take advantage of it if
-    available, you can perform
-    the check at run-time in your code using {@link
-    android.content.pm.PackageManager#hasSystemFeature(String)} with {@link
-    android.content.pm.PackageManager#FEATURE_WIFI_RTT}:</p>
-<pre>
-    getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_RTT)
-</pre>
-
-<p>For an example of this functionality, see
-<a href="{@docRoot}guide/topics/connectivity/wifi-rtt" class="external">Wi-Fi location: ranging
-with RTT</a>.</p>
-</BODY>
-</HTML>
diff --git a/wifi/java/android/net/wifi/util/HexEncoding.java b/wifi/java/android/net/wifi/util/HexEncoding.java
deleted file mode 100644
index 9ebf947..0000000
--- a/wifi/java/android/net/wifi/util/HexEncoding.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.util;
-
-/**
- * Hexadecimal encoding where each byte is represented by two hexadecimal digits.
- *
- * Note: this is copied from {@link libcore.util.HexEncoding}.
- *
- * @hide
- */
-public class HexEncoding {
-
-    private static final char[] LOWER_CASE_DIGITS = {
-            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
-    };
-
-    private static final char[] UPPER_CASE_DIGITS = {
-            '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
-    };
-
-    /** Hidden constructor to prevent instantiation. */
-    private HexEncoding() {}
-
-    /**
-     * Encodes the provided byte as a two-digit hexadecimal String value.
-     */
-    public static String encodeToString(byte b, boolean upperCase) {
-        char[] digits = upperCase ? UPPER_CASE_DIGITS : LOWER_CASE_DIGITS;
-        char[] buf = new char[2]; // We always want two digits.
-        buf[0] = digits[(b >> 4) & 0xf];
-        buf[1] = digits[b & 0xf];
-        return new String(buf, 0, 2);
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    public static char[] encode(byte[] data) {
-        return encode(data, 0, data.length, true /* upperCase */);
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    public static char[] encode(byte[] data, boolean upperCase) {
-        return encode(data, 0, data.length, upperCase);
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    public static char[] encode(byte[] data, int offset, int len) {
-        return encode(data, offset, len, true /* upperCase */);
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    private static char[] encode(byte[] data, int offset, int len, boolean upperCase) {
-        char[] digits = upperCase ? UPPER_CASE_DIGITS : LOWER_CASE_DIGITS;
-        char[] result = new char[len * 2];
-        for (int i = 0; i < len; i++) {
-            byte b = data[offset + i];
-            int resultIndex = 2 * i;
-            result[resultIndex] = (digits[(b >> 4) & 0x0f]);
-            result[resultIndex + 1] = (digits[b & 0x0f]);
-        }
-
-        return result;
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    public static String encodeToString(byte[] data) {
-        return encodeToString(data, true /* upperCase */);
-    }
-
-    /**
-     * Encodes the provided data as a sequence of hexadecimal characters.
-     */
-    public static String encodeToString(byte[] data, boolean upperCase) {
-        return new String(encode(data, upperCase));
-    }
-
-    /**
-     * Decodes the provided hexadecimal string into a byte array.  Odd-length inputs
-     * are not allowed.
-     *
-     * Throws an {@code IllegalArgumentException} if the input is malformed.
-     */
-    public static byte[] decode(String encoded) throws IllegalArgumentException {
-        return decode(encoded.toCharArray());
-    }
-
-    /**
-     * Decodes the provided hexadecimal string into a byte array. If {@code allowSingleChar}
-     * is {@code true} odd-length inputs are allowed and the first character is interpreted
-     * as the lower bits of the first result byte.
-     *
-     * Throws an {@code IllegalArgumentException} if the input is malformed.
-     */
-    public static byte[] decode(String encoded, boolean allowSingleChar)
-            throws IllegalArgumentException {
-        return decode(encoded.toCharArray(), allowSingleChar);
-    }
-
-    /**
-     * Decodes the provided hexadecimal string into a byte array.  Odd-length inputs
-     * are not allowed.
-     *
-     * Throws an {@code IllegalArgumentException} if the input is malformed.
-     */
-    public static byte[] decode(char[] encoded) throws IllegalArgumentException {
-        return decode(encoded, false);
-    }
-
-    /**
-     * Decodes the provided hexadecimal string into a byte array. If {@code allowSingleChar}
-     * is {@code true} odd-length inputs are allowed and the first character is interpreted
-     * as the lower bits of the first result byte.
-     *
-     * Throws an {@code IllegalArgumentException} if the input is malformed.
-     */
-    public static byte[] decode(char[] encoded, boolean allowSingleChar)
-            throws IllegalArgumentException {
-        int encodedLength = encoded.length;
-        int resultLengthBytes = (encodedLength + 1) / 2;
-        byte[] result = new byte[resultLengthBytes];
-
-        int resultOffset = 0;
-        int i = 0;
-        if (allowSingleChar) {
-            if ((encodedLength % 2) != 0) {
-                // Odd number of digits -- the first digit is the lower 4 bits of the first result
-                // byte.
-                result[resultOffset++] = (byte) toDigit(encoded, i);
-                i++;
-            }
-        } else {
-            if ((encodedLength % 2) != 0) {
-                throw new IllegalArgumentException("Invalid input length: " + encodedLength);
-            }
-        }
-
-        for (; i < encodedLength; i += 2) {
-            result[resultOffset++] = (byte) ((toDigit(encoded, i) << 4) | toDigit(encoded, i + 1));
-        }
-
-        return result;
-    }
-
-    private static int toDigit(char[] str, int offset) throws IllegalArgumentException {
-        // NOTE: that this isn't really a code point in the traditional sense, since we're
-        // just rejecting surrogate pairs outright.
-        int pseudoCodePoint = str[offset];
-
-        if ('0' <= pseudoCodePoint && pseudoCodePoint <= '9') {
-            return pseudoCodePoint - '0';
-        } else if ('a' <= pseudoCodePoint && pseudoCodePoint <= 'f') {
-            return 10 + (pseudoCodePoint - 'a');
-        } else if ('A' <= pseudoCodePoint && pseudoCodePoint <= 'F') {
-            return 10 + (pseudoCodePoint - 'A');
-        }
-
-        throw new IllegalArgumentException("Illegal char: " + str[offset] + " at offset " + offset);
-    }
-}
diff --git a/wifi/java/android/net/wifi/SoftApConfToXmlMigrationUtil.java b/wifi/java/src/android/net/wifi/SoftApConfToXmlMigrationUtil.java
similarity index 100%
rename from wifi/java/android/net/wifi/SoftApConfToXmlMigrationUtil.java
rename to wifi/java/src/android/net/wifi/SoftApConfToXmlMigrationUtil.java
diff --git a/wifi/java/src/android/net/wifi/WifiMigration.java b/wifi/java/src/android/net/wifi/WifiMigration.java
new file mode 100755
index 0000000..4fabc0b
--- /dev/null
+++ b/wifi/java/src/android/net/wifi/WifiMigration.java
@@ -0,0 +1,558 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.wifi;
+
+import static android.os.Environment.getDataMiscCeDirectory;
+import static android.os.Environment.getDataMiscDirectory;
+
+import android.annotation.IntDef;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.content.Context;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.util.AtomicFile;
+import android.util.SparseArray;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.Objects;
+
+/**
+ * Class used to provide one time hooks for existing OEM devices to migrate their config store
+ * data and other settings to the wifi apex.
+ * @hide
+ */
+@SystemApi
+public final class WifiMigration {
+    /**
+     * Directory to read the wifi config store files from under.
+     */
+    private static final String LEGACY_WIFI_STORE_DIRECTORY_NAME = "wifi";
+    /**
+     * Config store file for general shared store file.
+     * AOSP Path on Android 10: /data/misc/wifi/WifiConfigStore.xml
+     */
+    public static final int STORE_FILE_SHARED_GENERAL = 0;
+    /**
+     * Config store file for softap shared store file.
+     * AOSP Path on Android 10: /data/misc/wifi/softap.conf
+     */
+    public static final int STORE_FILE_SHARED_SOFTAP = 1;
+    /**
+     * Config store file for general user store file.
+     * AOSP Path on Android 10: /data/misc_ce/<userId>/wifi/WifiConfigStore.xml
+     */
+    public static final int STORE_FILE_USER_GENERAL = 2;
+    /**
+     * Config store file for network suggestions user store file.
+     * AOSP Path on Android 10: /data/misc_ce/<userId>/wifi/WifiConfigStoreNetworkSuggestions.xml
+     */
+    public static final int STORE_FILE_USER_NETWORK_SUGGESTIONS = 3;
+
+    /** @hide */
+    @IntDef(prefix = { "STORE_FILE_SHARED_" }, value = {
+            STORE_FILE_SHARED_GENERAL,
+            STORE_FILE_SHARED_SOFTAP,
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface SharedStoreFileId { }
+
+    /** @hide */
+    @IntDef(prefix = { "STORE_FILE_USER_" }, value = {
+            STORE_FILE_USER_GENERAL,
+            STORE_FILE_USER_NETWORK_SUGGESTIONS
+    })
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface UserStoreFileId { }
+
+    /**
+     * Mapping of Store file Id to Store file names.
+     *
+     * NOTE: This is the default path for the files on AOSP devices. If the OEM has modified
+     * the path or renamed the files, please edit this appropriately.
+     */
+    private static final SparseArray<String> STORE_ID_TO_FILE_NAME =
+            new SparseArray<String>() {{
+                put(STORE_FILE_SHARED_GENERAL, "WifiConfigStore.xml");
+                put(STORE_FILE_SHARED_SOFTAP, "WifiConfigStoreSoftAp.xml");
+                put(STORE_FILE_USER_GENERAL, "WifiConfigStore.xml");
+                put(STORE_FILE_USER_NETWORK_SUGGESTIONS, "WifiConfigStoreNetworkSuggestions.xml");
+            }};
+
+    /**
+     * Pre-apex wifi shared folder.
+     */
+    private static File getLegacyWifiSharedDirectory() {
+        return new File(getDataMiscDirectory(), LEGACY_WIFI_STORE_DIRECTORY_NAME);
+    }
+
+    /**
+     * Pre-apex wifi user folder.
+     */
+    private static File getLegacyWifiUserDirectory(int userId) {
+        return new File(getDataMiscCeDirectory(userId), LEGACY_WIFI_STORE_DIRECTORY_NAME);
+    }
+
+    /**
+     * Legacy files were stored as AtomicFile. So, always use AtomicFile to operate on it to ensure
+     * data integrity.
+     */
+    private static AtomicFile getSharedAtomicFile(@SharedStoreFileId int storeFileId) {
+        return new AtomicFile(new File(
+                getLegacyWifiSharedDirectory(),
+                STORE_ID_TO_FILE_NAME.get(storeFileId)));
+    }
+
+    /**
+     * Legacy files were stored as AtomicFile. So, always use AtomicFile to operate on it to ensure
+     * data integrity.
+     */
+    private static AtomicFile getUserAtomicFile(@UserStoreFileId  int storeFileId, int userId) {
+        return new AtomicFile(new File(
+                getLegacyWifiUserDirectory(userId),
+                STORE_ID_TO_FILE_NAME.get(storeFileId)));
+    }
+
+    private WifiMigration() { }
+
+    /**
+     * Load data from legacy shared wifi config store file.
+     * <p>
+     * Expected AOSP format is available in the sample files under {@code
+     * frameworks/base/wifi/non-updatable/migration_samples/}.
+     * </p>
+     * <p>
+     * Note:
+     * <li>OEMs need to change the implementation of
+     * {@link #convertAndRetrieveSharedConfigStoreFile(int)} only if their existing config store
+     * format or file locations differs from the vanilla AOSP implementation.</li>
+     * <li>The wifi apex will invoke
+     * {@link #convertAndRetrieveSharedConfigStoreFile(int)}
+     * method on every bootup, it is the responsibility of the OEM implementation to ensure that
+     * they perform the necessary in place conversion of their config store file to conform to the
+     * AOSP format. The OEM should ensure that the method should only return the
+     * {@link InputStream} stream for the data to be migrated only on the first bootup.</li>
+     * <li>Once the migration is done, the apex will invoke
+     * {@link #removeSharedConfigStoreFile(int)} to delete the store file.</li>
+     * <li>The only relevant invocation of {@link #convertAndRetrieveSharedConfigStoreFile(int)}
+     * occurs when a previously released device upgrades to the wifi apex from an OEM
+     * implementation of the wifi stack.
+     * <li>Ensure that the legacy file paths are accessible to the wifi module (sepolicy rules, file
+     * permissions, etc). Since the wifi service continues to run inside system_server process, this
+     * method will be called from the same context (so ideally the file should still be accessible).
+     * </li>
+     *
+     * @param storeFileId Identifier for the config store file. One of
+     * {@link #STORE_FILE_SHARED_GENERAL} or {@link #STORE_FILE_SHARED_GENERAL}
+     * @return Instance of {@link InputStream} for migrating data, null if no migration is
+     * necessary.
+     * @throws IllegalArgumentException on invalid storeFileId.
+     */
+    @Nullable
+    public static InputStream convertAndRetrieveSharedConfigStoreFile(
+            @SharedStoreFileId int storeFileId) {
+        if (storeFileId != STORE_FILE_SHARED_GENERAL && storeFileId !=  STORE_FILE_SHARED_SOFTAP) {
+            throw new IllegalArgumentException("Invalid shared store file id");
+        }
+        try {
+            // OEMs should do conversions necessary here before returning the stream.
+            return getSharedAtomicFile(storeFileId).openRead();
+        } catch (FileNotFoundException e) {
+            // Special handling for softap.conf.
+            // Note: OEM devices upgrading from Q -> R will only have the softap.conf file.
+            // Test devices running previous R builds however may have already migrated to the
+            // XML format. So, check for that above before falling back to check for legacy file.
+            if (storeFileId == STORE_FILE_SHARED_SOFTAP) {
+                return SoftApConfToXmlMigrationUtil.convert();
+            }
+            return null;
+        }
+    }
+
+    /**
+     * Remove the legacy shared wifi config store file.
+     *
+     * @param storeFileId Identifier for the config store file. One of
+     * {@link #STORE_FILE_SHARED_GENERAL} or {@link #STORE_FILE_SHARED_GENERAL}
+     * @throws IllegalArgumentException on invalid storeFileId.
+     */
+    public static void removeSharedConfigStoreFile(@SharedStoreFileId int storeFileId) {
+        if (storeFileId != STORE_FILE_SHARED_GENERAL && storeFileId !=  STORE_FILE_SHARED_SOFTAP) {
+            throw new IllegalArgumentException("Invalid shared store file id");
+        }
+        AtomicFile file = getSharedAtomicFile(storeFileId);
+        if (file.exists()) {
+            file.delete();
+            return;
+        }
+        // Special handling for softap.conf.
+        // Note: OEM devices upgrading from Q -> R will only have the softap.conf file.
+        // Test devices running previous R builds however may have already migrated to the
+        // XML format. So, check for that above before falling back to check for legacy file.
+        if (storeFileId == STORE_FILE_SHARED_SOFTAP) {
+            SoftApConfToXmlMigrationUtil.remove();
+        }
+    }
+
+    /**
+     * Load data from legacy user wifi config store file.
+     * <p>
+     * Expected AOSP format is available in the sample files under {@code
+     * frameworks/base/wifi/non-updatable/migration_samples/}.
+     * </p>
+     * <p>
+     * Note:
+     * <li>OEMs need to change the implementation of
+     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)} only if their existing config
+     * store format or file locations differs from the vanilla AOSP implementation.</li>
+     * <li>The wifi apex will invoke
+     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)}
+     * method on every bootup, it is the responsibility of the OEM implementation to ensure that
+     * they perform the necessary in place conversion of their config store file to conform to the
+     * AOSP format. The OEM should ensure that the method should only return the
+     * {@link InputStream} stream for the data to be migrated only on the first bootup.</li>
+     * <li>Once the migration is done, the apex will invoke
+     * {@link #removeUserConfigStoreFile(int, UserHandle)} to delete the store file.</li>
+     * <li>The only relevant invocation of
+     * {@link #convertAndRetrieveUserConfigStoreFile(int, UserHandle)} occurs when a previously
+     * released device upgrades to the wifi apex from an OEM implementation of the wifi
+     * stack.
+     * </li>
+     * <li>Ensure that the legacy file paths are accessible to the wifi module (sepolicy rules, file
+     * permissions, etc). Since the wifi service continues to run inside system_server process, this
+     * method will be called from the same context (so ideally the file should still be accessible).
+     * </li>
+     *
+     * @param storeFileId Identifier for the config store file. One of
+     * {@link #STORE_FILE_USER_GENERAL} or {@link #STORE_FILE_USER_NETWORK_SUGGESTIONS}
+     * @param userHandle User handle.
+     * @return Instance of {@link InputStream} for migrating data, null if no migration is
+     * necessary.
+     * @throws IllegalArgumentException on invalid storeFileId or userHandle.
+     */
+    @Nullable
+    public static InputStream convertAndRetrieveUserConfigStoreFile(
+            @UserStoreFileId int storeFileId, @NonNull UserHandle userHandle) {
+        if (storeFileId != STORE_FILE_USER_GENERAL
+                && storeFileId !=  STORE_FILE_USER_NETWORK_SUGGESTIONS) {
+            throw new IllegalArgumentException("Invalid user store file id");
+        }
+        Objects.requireNonNull(userHandle);
+        try {
+            // OEMs should do conversions necessary here before returning the stream.
+            return getUserAtomicFile(storeFileId, userHandle.getIdentifier()).openRead();
+        } catch (FileNotFoundException e) {
+            return null;
+        }
+    }
+
+    /**
+     * Remove the legacy user wifi config store file.
+     *
+     * @param storeFileId Identifier for the config store file. One of
+     * {@link #STORE_FILE_USER_GENERAL} or {@link #STORE_FILE_USER_NETWORK_SUGGESTIONS}
+     * @param userHandle User handle.
+     * @throws IllegalArgumentException on invalid storeFileId or userHandle.
+    */
+    public static void removeUserConfigStoreFile(
+            @UserStoreFileId int storeFileId, @NonNull UserHandle userHandle) {
+        if (storeFileId != STORE_FILE_USER_GENERAL
+                && storeFileId !=  STORE_FILE_USER_NETWORK_SUGGESTIONS) {
+            throw new IllegalArgumentException("Invalid user store file id");
+        }
+        Objects.requireNonNull(userHandle);
+        AtomicFile file = getUserAtomicFile(storeFileId, userHandle.getIdentifier());
+        if (file.exists()) {
+            file.delete();
+        }
+    }
+
+    /**
+     * Container for all the wifi settings data to migrate.
+     */
+    public static final class SettingsMigrationData implements Parcelable {
+        private final boolean mScanAlwaysAvailable;
+        private final boolean mP2pFactoryResetPending;
+        private final String mP2pDeviceName;
+        private final boolean mSoftApTimeoutEnabled;
+        private final boolean mWakeupEnabled;
+        private final boolean mScanThrottleEnabled;
+        private final boolean mVerboseLoggingEnabled;
+
+        private SettingsMigrationData(boolean scanAlwaysAvailable, boolean p2pFactoryResetPending,
+                @Nullable String p2pDeviceName, boolean softApTimeoutEnabled, boolean wakeupEnabled,
+                boolean scanThrottleEnabled, boolean verboseLoggingEnabled) {
+            mScanAlwaysAvailable = scanAlwaysAvailable;
+            mP2pFactoryResetPending = p2pFactoryResetPending;
+            mP2pDeviceName = p2pDeviceName;
+            mSoftApTimeoutEnabled = softApTimeoutEnabled;
+            mWakeupEnabled = wakeupEnabled;
+            mScanThrottleEnabled = scanThrottleEnabled;
+            mVerboseLoggingEnabled = verboseLoggingEnabled;
+        }
+
+        public static final @NonNull Parcelable.Creator<SettingsMigrationData> CREATOR =
+                new Parcelable.Creator<SettingsMigrationData>() {
+                    @Override
+                    public SettingsMigrationData createFromParcel(Parcel in) {
+                        boolean scanAlwaysAvailable = in.readBoolean();
+                        boolean p2pFactoryResetPending = in.readBoolean();
+                        String p2pDeviceName = in.readString();
+                        boolean softApTimeoutEnabled = in.readBoolean();
+                        boolean wakeupEnabled = in.readBoolean();
+                        boolean scanThrottleEnabled = in.readBoolean();
+                        boolean verboseLoggingEnabled = in.readBoolean();
+                        return new SettingsMigrationData(
+                                scanAlwaysAvailable, p2pFactoryResetPending,
+                                p2pDeviceName, softApTimeoutEnabled, wakeupEnabled,
+                                scanThrottleEnabled, verboseLoggingEnabled);
+                    }
+
+                    @Override
+                    public SettingsMigrationData[] newArray(int size) {
+                        return new SettingsMigrationData[size];
+                    }
+                };
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(@NonNull Parcel dest, int flags) {
+            dest.writeBoolean(mScanAlwaysAvailable);
+            dest.writeBoolean(mP2pFactoryResetPending);
+            dest.writeString(mP2pDeviceName);
+            dest.writeBoolean(mSoftApTimeoutEnabled);
+            dest.writeBoolean(mWakeupEnabled);
+            dest.writeBoolean(mScanThrottleEnabled);
+            dest.writeBoolean(mVerboseLoggingEnabled);
+        }
+
+        /**
+         * @return True if scans are allowed even when wifi is toggled off, false otherwise.
+         */
+        public boolean isScanAlwaysAvailable() {
+            return mScanAlwaysAvailable;
+        }
+
+        /**
+         * @return indicate whether factory reset request is pending.
+         */
+        public boolean isP2pFactoryResetPending() {
+            return mP2pFactoryResetPending;
+        }
+
+        /**
+         * @return the Wi-Fi peer-to-peer device name
+         */
+        public @Nullable String getP2pDeviceName() {
+            return mP2pDeviceName;
+        }
+
+        /**
+         * @return Whether soft AP will shut down after a timeout period when no devices are
+         * connected.
+         */
+        public boolean isSoftApTimeoutEnabled() {
+            return mSoftApTimeoutEnabled;
+        }
+
+        /**
+         * @return whether Wi-Fi Wakeup feature is enabled.
+         */
+        public boolean isWakeUpEnabled() {
+            return mWakeupEnabled;
+        }
+
+        /**
+         * @return Whether wifi scan throttle is enabled or not.
+         */
+        public boolean isScanThrottleEnabled() {
+            return mScanThrottleEnabled;
+        }
+
+        /**
+         * @return Whether to enable verbose logging in Wi-Fi.
+         */
+        public boolean isVerboseLoggingEnabled() {
+            return mVerboseLoggingEnabled;
+        }
+
+        /**
+         * Builder to create instance of {@link SettingsMigrationData}.
+         */
+        public static final class Builder {
+            private boolean mScanAlwaysAvailable;
+            private boolean mP2pFactoryResetPending;
+            private String mP2pDeviceName;
+            private boolean mSoftApTimeoutEnabled;
+            private boolean mWakeupEnabled;
+            private boolean mScanThrottleEnabled;
+            private boolean mVerboseLoggingEnabled;
+
+            public Builder() {
+            }
+
+            /**
+             * Setting to allow scans even when wifi is toggled off.
+             *
+             * @param available true if available, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setScanAlwaysAvailable(boolean available) {
+                mScanAlwaysAvailable = available;
+                return this;
+            }
+
+            /**
+             * Indicate whether factory reset request is pending.
+             *
+             * @param pending true if pending, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setP2pFactoryResetPending(boolean pending) {
+                mP2pFactoryResetPending = pending;
+                return this;
+            }
+
+            /**
+             * The Wi-Fi peer-to-peer device name
+             *
+             * @param name Name if set, null otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setP2pDeviceName(@Nullable String name) {
+                mP2pDeviceName = name;
+                return this;
+            }
+
+            /**
+             * Whether soft AP will shut down after a timeout period when no devices are connected.
+             *
+             * @param enabled true if enabled, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setSoftApTimeoutEnabled(boolean enabled) {
+                mSoftApTimeoutEnabled = enabled;
+                return this;
+            }
+
+            /**
+             * Value to specify if Wi-Fi Wakeup feature is enabled.
+             *
+             * @param enabled true if enabled, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setWakeUpEnabled(boolean enabled) {
+                mWakeupEnabled = enabled;
+                return this;
+            }
+
+            /**
+             * Whether wifi scan throttle is enabled or not.
+             *
+             * @param enabled true if enabled, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setScanThrottleEnabled(boolean enabled) {
+                mScanThrottleEnabled = enabled;
+                return this;
+            }
+
+            /**
+             * Setting to enable verbose logging in Wi-Fi.
+             *
+             * @param enabled true if enabled, false otherwise.
+             * @return Instance of {@link Builder} to enable chaining of the builder method.
+             */
+            public @NonNull Builder setVerboseLoggingEnabled(boolean enabled) {
+                mVerboseLoggingEnabled = enabled;
+                return this;
+            }
+
+            /**
+             * Build an instance of {@link SettingsMigrationData}.
+             *
+             * @return Instance of {@link SettingsMigrationData}.
+             */
+            public @NonNull SettingsMigrationData build() {
+                return new SettingsMigrationData(mScanAlwaysAvailable, mP2pFactoryResetPending,
+                        mP2pDeviceName, mSoftApTimeoutEnabled, mWakeupEnabled, mScanThrottleEnabled,
+                        mVerboseLoggingEnabled);
+            }
+        }
+    }
+
+    /**
+     * Load data from Settings.Global values.
+     *
+     * <p>
+     * Note:
+     * <li> This is method is invoked once on the first bootup. OEM can safely delete these settings
+     * once the migration is complete. The first & only relevant invocation of
+     * {@link #loadFromSettings(Context)} ()} occurs when a previously released
+     * device upgrades to the wifi apex from an OEM implementation of the wifi stack.
+     * </li>
+     *
+     * @param context Context to use for loading the settings provider.
+     * @return Instance of {@link SettingsMigrationData} for migrating data.
+     */
+    @NonNull
+    public static SettingsMigrationData loadFromSettings(@NonNull Context context) {
+        if (Settings.Global.getInt(
+                context.getContentResolver(), Settings.Global.WIFI_MIGRATION_COMPLETED, 0) == 1) {
+            // migration already complete, ignore.
+            return null;
+        }
+        SettingsMigrationData data = new SettingsMigrationData.Builder()
+                .setScanAlwaysAvailable(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, 0) == 1)
+                .setP2pFactoryResetPending(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.WIFI_P2P_PENDING_FACTORY_RESET, 0) == 1)
+                .setP2pDeviceName(
+                        Settings.Global.getString(context.getContentResolver(),
+                                Settings.Global.WIFI_P2P_DEVICE_NAME))
+                .setSoftApTimeoutEnabled(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.SOFT_AP_TIMEOUT_ENABLED, 1) == 1)
+                .setWakeUpEnabled(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.WIFI_WAKEUP_ENABLED, 0) == 1)
+                .setScanThrottleEnabled(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.WIFI_SCAN_THROTTLE_ENABLED, 1) == 1)
+                .setVerboseLoggingEnabled(
+                        Settings.Global.getInt(context.getContentResolver(),
+                                Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED, 0) == 1)
+                .build();
+        Settings.Global.putInt(
+                context.getContentResolver(), Settings.Global.WIFI_MIGRATION_COMPLETED, 1);
+        return data;
+
+    }
+}
diff --git a/wifi/java/src/android/net/wifi/WifiNetworkScoreCache.java b/wifi/java/src/android/net/wifi/WifiNetworkScoreCache.java
new file mode 100755
index 0000000..3903658
--- /dev/null
+++ b/wifi/java/src/android/net/wifi/WifiNetworkScoreCache.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.net.wifi;
+
+import android.Manifest.permission;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.Context;
+import android.net.INetworkScoreCache;
+import android.net.NetworkKey;
+import android.net.ScoredNetwork;
+import android.os.Handler;
+import android.os.Process;
+import android.util.Log;
+import android.util.LruCache;
+
+import com.android.internal.annotations.GuardedBy;
+
+import java.io.FileDescriptor;
+import java.io.PrintWriter;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * {@link INetworkScoreCache} implementation for Wifi Networks.
+ *
+ * TODO: This should not be part of wifi mainline module.
+ * @hide
+ */
+public class WifiNetworkScoreCache extends INetworkScoreCache.Stub {
+    private static final String TAG = "WifiNetworkScoreCache";
+    private static final boolean DBG = Log.isLoggable(TAG, Log.DEBUG);
+
+    // A Network scorer returns a score in the range [-128, +127]
+    // We treat the lowest possible score as though there were no score, effectively allowing the
+    // scorer to provide an RSSI threshold below which a network should not be used.
+    public static final int INVALID_NETWORK_SCORE = Byte.MIN_VALUE;
+
+    /** Default number entries to be stored in the {@link LruCache}. */
+    private static final int DEFAULT_MAX_CACHE_SIZE = 100;
+
+    // See {@link #CacheListener}.
+    @Nullable
+    @GuardedBy("mLock")
+    private CacheListener mListener;
+
+    private final Context mContext;
+    private final Object mLock = new Object();
+
+    // The key is of the form "<ssid>"<bssid>
+    // TODO: What about SSIDs that can't be encoded as UTF-8?
+    @GuardedBy("mLock")
+    private final LruCache<String, ScoredNetwork> mCache;
+
+    public WifiNetworkScoreCache(Context context) {
+        this(context, null /* listener */);
+    }
+
+    /**
+     * Instantiates a WifiNetworkScoreCache.
+     *
+     * @param context Application context
+     * @param listener CacheListener for cache updates
+     */
+    public WifiNetworkScoreCache(Context context, @Nullable CacheListener listener) {
+        this(context, listener, DEFAULT_MAX_CACHE_SIZE);
+    }
+
+    public WifiNetworkScoreCache(
+            Context context, @Nullable CacheListener listener, int maxCacheSize) {
+        mContext = context.getApplicationContext();
+        mListener = listener;
+        mCache = new LruCache<>(maxCacheSize);
+    }
+
+    @Override public final void updateScores(List<ScoredNetwork> networks) {
+        if (networks == null || networks.isEmpty()) {
+            return;
+        }
+        if (DBG) {
+            Log.d(TAG, "updateScores list size=" + networks.size());
+        }
+
+        boolean changed = false;
+
+        synchronized (mLock) {
+            for (ScoredNetwork network : networks) {
+                String networkKey = buildNetworkKey(network);
+                if (networkKey == null) {
+                    if (DBG) {
+                        Log.d(TAG, "Failed to build network key for ScoredNetwork" + network);
+                    }
+                    continue;
+                }
+                mCache.put(networkKey, network);
+                changed = true;
+            }
+
+            if (mListener != null && changed) {
+                mListener.post(networks);
+            }
+        }
+    }
+
+    @Override public final void clearScores() {
+        synchronized (mLock) {
+            mCache.evictAll();
+        }
+    }
+
+    /**
+     * Returns whether there is any score info for the given ScanResult.
+     *
+     * This includes null-score info, so it should only be used when determining whether to request
+     * scores from the network scorer.
+     */
+    public boolean isScoredNetwork(ScanResult result) {
+        return getScoredNetwork(result) != null;
+    }
+
+    /**
+     * Returns whether there is a non-null score curve for the given ScanResult.
+     *
+     * A null score curve has special meaning - we should never connect to an ephemeral network if
+     * the score curve is null.
+     */
+    public boolean hasScoreCurve(ScanResult result) {
+        ScoredNetwork network = getScoredNetwork(result);
+        return network != null && network.rssiCurve != null;
+    }
+
+    public int getNetworkScore(ScanResult result) {
+        int score = INVALID_NETWORK_SCORE;
+
+        ScoredNetwork network = getScoredNetwork(result);
+        if (network != null && network.rssiCurve != null) {
+            score = network.rssiCurve.lookupScore(result.level);
+            if (DBG) {
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
+                        + " score " + Integer.toString(score)
+                        + " RSSI " + result.level);
+            }
+        }
+        return score;
+    }
+
+    /**
+     * Returns the ScoredNetwork metered hint for a given ScanResult.
+     *
+     * If there is no ScoredNetwork associated with the ScanResult then false will be returned.
+     */
+    public boolean getMeteredHint(ScanResult result) {
+        ScoredNetwork network = getScoredNetwork(result);
+        return network != null && network.meteredHint;
+    }
+
+    public int getNetworkScore(ScanResult result, boolean isActiveNetwork) {
+        int score = INVALID_NETWORK_SCORE;
+
+        ScoredNetwork network = getScoredNetwork(result);
+        if (network != null && network.rssiCurve != null) {
+            score = network.rssiCurve.lookupScore(result.level, isActiveNetwork);
+            if (DBG) {
+                Log.d(TAG, "getNetworkScore found scored network " + network.networkKey
+                        + " score " + Integer.toString(score)
+                        + " RSSI " + result.level
+                        + " isActiveNetwork " + isActiveNetwork);
+            }
+        }
+        return score;
+    }
+
+    @Nullable
+    public ScoredNetwork getScoredNetwork(ScanResult result) {
+        String key = buildNetworkKey(result);
+        if (key == null) return null;
+
+        synchronized (mLock) {
+            ScoredNetwork network = mCache.get(key);
+            return network;
+        }
+    }
+
+    /** Returns the ScoredNetwork for the given key. */
+    @Nullable
+    public ScoredNetwork getScoredNetwork(NetworkKey networkKey) {
+        String key = buildNetworkKey(networkKey);
+        if (key == null) {
+            if (DBG) {
+                Log.d(TAG, "Could not build key string for Network Key: " + networkKey);
+            }
+            return null;
+        }
+        synchronized (mLock) {
+            return mCache.get(key);
+        }
+    }
+
+    private String buildNetworkKey(ScoredNetwork network) {
+        if (network == null) {
+            return null;
+        }
+        return buildNetworkKey(network.networkKey);
+    }
+
+    private String buildNetworkKey(NetworkKey networkKey) {
+        if (networkKey == null) {
+            return null;
+        }
+        if (networkKey.wifiKey == null) return null;
+        if (networkKey.type == NetworkKey.TYPE_WIFI) {
+            String key = networkKey.wifiKey.ssid;
+            if (key == null) return null;
+            if (networkKey.wifiKey.bssid != null) {
+                key = key + networkKey.wifiKey.bssid;
+            }
+            return key;
+        }
+        return null;
+    }
+
+    private String buildNetworkKey(ScanResult result) {
+        if (result == null || result.SSID == null) {
+            return null;
+        }
+        StringBuilder key = new StringBuilder("\"");
+        key.append(result.SSID);
+        key.append("\"");
+        if (result.BSSID != null) {
+            key.append(result.BSSID);
+        }
+        return key.toString();
+    }
+
+    @Override protected final void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+        mContext.enforceCallingOrSelfPermission(permission.DUMP, TAG);
+        String header = String.format("WifiNetworkScoreCache (%s/%d)",
+                mContext.getPackageName(), Process.myUid());
+        writer.println(header);
+        writer.println("  All score curves:");
+        synchronized (mLock) {
+            for (ScoredNetwork score : mCache.snapshot().values()) {
+                writer.println("    " + score);
+            }
+            writer.println("  Network scores for latest ScanResults:");
+            WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
+            for (ScanResult scanResult : wifiManager.getScanResults()) {
+                writer.println(
+                        "    " + buildNetworkKey(scanResult) + ": " + getNetworkScore(scanResult));
+            }
+        }
+    }
+
+    /** Registers a CacheListener instance, replacing the previous listener if it existed. */
+    public void registerListener(CacheListener listener) {
+        synchronized (mLock) {
+            mListener = listener;
+        }
+    }
+
+    /** Removes the registered CacheListener. */
+    public void unregisterListener() {
+        synchronized (mLock) {
+            mListener = null;
+        }
+    }
+
+    /** Listener for updates to the cache inside WifiNetworkScoreCache. */
+    public abstract static class CacheListener {
+        private Handler mHandler;
+
+        /**
+         * Constructor for CacheListener.
+         *
+         * @param handler the Handler on which to invoke the {@link #networkCacheUpdated} method.
+         *          This cannot be null.
+         */
+        public CacheListener(@NonNull Handler handler) {
+            Objects.requireNonNull(handler);
+            mHandler = handler;
+        }
+
+        /** Invokes the {@link #networkCacheUpdated(List<ScoredNetwork>)} method on the handler. */
+        void post(List<ScoredNetwork> updatedNetworks) {
+            mHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                    networkCacheUpdated(updatedNetworks);
+                }
+            });
+        }
+
+        /**
+         * Invoked whenever the cache is updated.
+         *
+         * <p>Clearing the cache does not invoke this method.
+         *
+         * @param updatedNetworks the networks that were updated
+         */
+        public abstract void networkCacheUpdated(List<ScoredNetwork> updatedNetworks);
+    }
+}
diff --git a/wifi/java/android/net/wifi/nl80211/ChannelSettings.java b/wifi/java/src/android/net/wifi/nl80211/ChannelSettings.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/ChannelSettings.java
rename to wifi/java/src/android/net/wifi/nl80211/ChannelSettings.java
diff --git a/wifi/java/android/net/wifi/nl80211/DeviceWiphyCapabilities.java b/wifi/java/src/android/net/wifi/nl80211/DeviceWiphyCapabilities.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/DeviceWiphyCapabilities.java
rename to wifi/java/src/android/net/wifi/nl80211/DeviceWiphyCapabilities.java
diff --git a/wifi/java/android/net/wifi/nl80211/HiddenNetwork.java b/wifi/java/src/android/net/wifi/nl80211/HiddenNetwork.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/HiddenNetwork.java
rename to wifi/java/src/android/net/wifi/nl80211/HiddenNetwork.java
diff --git a/wifi/java/android/net/wifi/nl80211/NativeScanResult.java b/wifi/java/src/android/net/wifi/nl80211/NativeScanResult.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/NativeScanResult.java
rename to wifi/java/src/android/net/wifi/nl80211/NativeScanResult.java
diff --git a/wifi/java/android/net/wifi/nl80211/NativeWifiClient.java b/wifi/java/src/android/net/wifi/nl80211/NativeWifiClient.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/NativeWifiClient.java
rename to wifi/java/src/android/net/wifi/nl80211/NativeWifiClient.java
diff --git a/wifi/java/android/net/wifi/nl80211/PnoNetwork.java b/wifi/java/src/android/net/wifi/nl80211/PnoNetwork.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/PnoNetwork.java
rename to wifi/java/src/android/net/wifi/nl80211/PnoNetwork.java
diff --git a/wifi/java/android/net/wifi/nl80211/PnoSettings.java b/wifi/java/src/android/net/wifi/nl80211/PnoSettings.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/PnoSettings.java
rename to wifi/java/src/android/net/wifi/nl80211/PnoSettings.java
diff --git a/wifi/java/android/net/wifi/nl80211/RadioChainInfo.java b/wifi/java/src/android/net/wifi/nl80211/RadioChainInfo.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/RadioChainInfo.java
rename to wifi/java/src/android/net/wifi/nl80211/RadioChainInfo.java
diff --git a/wifi/java/android/net/wifi/nl80211/SingleScanSettings.java b/wifi/java/src/android/net/wifi/nl80211/SingleScanSettings.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/SingleScanSettings.java
rename to wifi/java/src/android/net/wifi/nl80211/SingleScanSettings.java
diff --git a/wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java b/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java
similarity index 100%
rename from wifi/java/android/net/wifi/nl80211/WifiNl80211Manager.java
rename to wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java
diff --git a/wifi/java/android/net/wifi/migration_samples/README.txt b/wifi/migration_samples/README.txt
similarity index 100%
rename from wifi/java/android/net/wifi/migration_samples/README.txt
rename to wifi/migration_samples/README.txt
diff --git a/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStore.xml b/wifi/migration_samples/Shared_WifiConfigStore.xml
similarity index 100%
rename from wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStore.xml
rename to wifi/migration_samples/Shared_WifiConfigStore.xml
diff --git a/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml b/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml
similarity index 100%
rename from wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml
rename to wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml
diff --git a/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStore.xml b/wifi/migration_samples/User_WifiConfigStore.xml
similarity index 100%
rename from wifi/java/android/net/wifi/migration_samples/User_WifiConfigStore.xml
rename to wifi/migration_samples/User_WifiConfigStore.xml
diff --git a/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml b/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml
similarity index 100%
rename from wifi/java/android/net/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml
rename to wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml
diff --git a/wifi/tests/Android.bp b/wifi/tests/Android.bp
index b710a14..3f5cacf 100644
--- a/wifi/tests/Android.bp
+++ b/wifi/tests/Android.bp
@@ -12,15 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Make test APK
-// ============================================================
-
 android_test {
-    name: "FrameworksWifiApiTests",
+    name: "FrameworksWifiNonUpdatableApiTests",
 
     defaults: ["framework-wifi-test-defaults"],
 
-    srcs: ["**/*.java"],
+    srcs: ["src/**/*.java"],
 
     jacoco: {
         include_filter: ["android.net.wifi.*"],
@@ -30,12 +27,9 @@
 
     static_libs: [
         "androidx.test.rules",
-        "core-test-rules",
         "frameworks-base-testutils",
         "guava",
         "mockito-target-minus-junit4",
-        "modules-utils-build",
-        "net-tests-utils",
         "truth-prebuilt",
     ],
 
@@ -45,11 +39,6 @@
     ],
 
     test_suites: [
-        "device-tests",
-        "mts",
+        "general-tests",
     ],
-
-    // static libs used by both framework-wifi & FrameworksWifiApiTests. Need to rename test usage
-    // to a different package name to prevent conflict with the copy in production code.
-    jarjar_rules: "test-jarjar-rules.txt",
 }
diff --git a/wifi/tests/AndroidManifest.xml b/wifi/tests/AndroidManifest.xml
index b6c38bc..b4b6b2d 100644
--- a/wifi/tests/AndroidManifest.xml
+++ b/wifi/tests/AndroidManifest.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
-
 <!--
-  ~ Copyright (C) 2016 The Android Open Source Project
+  ~ Copyright (C) 2020 The Android Open Source Project
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
   ~ you may not use this file except in compliance with the License.
@@ -17,22 +16,23 @@
   -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="android.net.wifi.test">
+     package="android.net.wifi.test">
 
     <application>
-        <uses-library android:name="android.test.runner" />
+        <uses-library android:name="android.test.runner"/>
         <activity android:label="WifiTestDummyLabel"
-                  android:name="WifiTestDummyName">
+             android:name="WifiTestDummyName"
+             android:exported="true">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
+                <action android:name="android.intent.action.MAIN"/>
                 <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
     </application>
 
     <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
-        android:targetPackage="android.net.wifi.test"
-        android:label="Frameworks Wifi API Tests">
+         android:targetPackage="android.net.wifi.test"
+         android:label="Frameworks Wifi Non-updatable API Tests">
     </instrumentation>
 
 </manifest>
diff --git a/wifi/tests/AndroidTest.xml b/wifi/tests/AndroidTest.xml
index 34e2e3a..5f3fdd4 100644
--- a/wifi/tests/AndroidTest.xml
+++ b/wifi/tests/AndroidTest.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2017 The Android Open Source Project
+<!-- Copyright (C) 2020 The Android Open Source Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -13,22 +13,16 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<configuration description="Runs Frameworks Wifi API Tests.">
+<configuration description="Runs Frameworks Wifi Non-updatable API Tests.">
     <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
-        <option name="test-file-name" value="FrameworksWifiApiTests.apk" />
+        <option name="test-file-name" value="FrameworksWifiNonUpdatableApiTests.apk" />
     </target_preparer>
 
     <option name="test-suite-tag" value="apct" />
-    <option name="test-tag" value="FrameworksWifiApiTests" />
+    <option name="test-tag" value="FrameworksWifiNonUpdatableApiTests" />
     <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
         <option name="package" value="android.net.wifi.test" />
         <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
         <option name="hidden-api-checks" value="false"/>
     </test>
-
-    <!-- Only run FrameworksWifiApiTests in MTS if the Wifi Mainline module is installed. -->
-    <object type="module_controller"
-            class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
-        <option name="mainline-module-package-name" value="com.google.android.wifi" />
-    </object>
 </configuration>
diff --git a/wifi/tests/README.md b/wifi/tests/README.md
index f909404..ad535f4 100644
--- a/wifi/tests/README.md
+++ b/wifi/tests/README.md
@@ -1,5 +1,6 @@
-# Wifi Unit Tests
-This package contains unit tests for the android wifi framework APIs based on the
+# Wifi Non-Updatable Framework Unit Tests
+This package contains unit tests for the non-updatable part (i.e. outside the Wifi module) of the
+Android Wifi framework APIs based on the
 [Android Testing Support Library](http://developer.android.com/tools/testing-support-library/index.html).
 The test cases are built using the [JUnit](http://junit.org/) and [Mockito](http://mockito.org/)
 libraries.
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.base64
deleted file mode 100644
index 760c839..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.base64
+++ /dev/null
@@ -1,86 +0,0 @@
-TUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5
-PXtib3VuZGFyeX07IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFz
-ZTY0CgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXBhc3Nwb2ludC1w
-cm9maWxlOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NAoK
-UEUxbmJYUlVjbVZsSUhodGJHNXpQU0p6ZVc1amJXdzZaRzFrWkdZeExqSWlQZ29nSUR4V1pYSkVW
-RVErTVM0eVBDOVdaWEpFVkVRKwpDaUFnUEU1dlpHVStDaUFnSUNBOFRtOWtaVTVoYldVK1VHVnlV
-SEp2ZG1sa1pYSlRkV0p6WTNKcGNIUnBiMjQ4TDA1dlpHVk9ZVzFsClBnb2dJQ0FnUEZKVVVISnZj
-R1Z5ZEdsbGN6NEtJQ0FnSUNBZ1BGUjVjR1UrQ2lBZ0lDQWdJQ0FnUEVSRVJrNWhiV1UrZFhKdU9u
-ZG0KWVRwdGJ6cG9iM1J6Y0c5ME1tUnZkREF0Y0dWeWNISnZkbWxrWlhKemRXSnpZM0pwY0hScGIy
-NDZNUzR3UEM5RVJFWk9ZVzFsUGdvZwpJQ0FnSUNBOEwxUjVjR1UrQ2lBZ0lDQThMMUpVVUhKdmNH
-VnlkR2xsY3o0S0lDQWdJRHhPYjJSbFBnb2dJQ0FnSUNBOFRtOWtaVTVoCmJXVSthVEF3TVR3dlRt
-OWtaVTVoYldVK0NpQWdJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQWdJRHhPYjJSbFRtRnRaVDVJYjIx
-bFUxQTgKTDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1
-dlpHVk9ZVzFsUGtaeWFXVnVaR3g1VG1GdApaVHd2VG05a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNB
-OFZtRnNkV1UrUlhoaGJYQnNaU0JPWlhSM2IzSnJQQzlXWVd4MVpUNEtJQ0FnCklDQWdJQ0E4TDA1
-dlpHVStDaUFnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrWlU1aGJXVStSbEZF
-VGp3dlRtOWsKWlU1aGJXVStDaUFnSUNBZ0lDQWdJQ0E4Vm1Gc2RXVSthRzkwYzNCdmRDNWxlR0Z0
-Y0d4bExtNWxkRHd2Vm1Gc2RXVStDaUFnSUNBZwpJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJRHhP
-YjJSbFBnb2dJQ0FnSUNBZ0lDQWdQRTV2WkdWT1lXMWxQbEp2WVcxcGJtZERiMjV6CmIzSjBhWFZ0
-VDBrOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWdQRlpoYkhWbFBqRXhNakl6TXl3ME5EVTFO
-alk4TDFaaGJIVmwKUGdvZ0lDQWdJQ0FnSUR3dlRtOWtaVDRLSUNBZ0lDQWdQQzlPYjJSbFBnb2dJ
-Q0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0E4VG05awpaVTVoYldVK1EzSmxaR1Z1ZEdsaGJEd3ZU
-bTlrWlU1aGJXVStDaUFnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrClpVNWhi
-V1UrVW1WaGJHMDhMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQbVY0WVcxd2JH
-VXVZMjl0UEM5V1lXeDEKWlQ0S0lDQWdJQ0FnSUNBOEwwNXZaR1UrQ2lBZ0lDQWdJQ0FnUEU1dlpH
-VStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrVlhObApjbTVoYldWUVlYTnpkMjl5WkR3dlRt
-OWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQRTV2ClpH
-Vk9ZVzFsUGxWelpYSnVZVzFsUEM5T2IyUmxUbUZ0WlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQRlpoYkhW
-bFBuVnpaWEk4TDFaaGJIVmwKUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNB
-Z1BFNXZaR1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE9iMlJsVG1GdApaVDVRWVhOemQyOXlaRHd2VG05
-a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1alIwWjZZek5rZG1OdFVUMDhMMVpo
-CmJIVmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVStDaUFn
-SUNBZ0lDQWdJQ0FnSUR4T2IyUmwKVG1GdFpUNUZRVkJOWlhSb2IyUThMMDV2WkdWT1lXMWxQZ29n
-SUNBZ0lDQWdJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0FnSUNBZwpJQ0E4VG05a1pVNWhiV1Ur
-UlVGUVZIbHdaVHd2VG05a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lDQWdQRlpoYkhWbFBqSXhQ
-QzlXCllXeDFaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ0lDQThU
-bTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWcKSUNBOFRtOWtaVTVoYldVK1NXNXVaWEpOWlhSb2IyUThM
-MDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1TgpVeTFEU0VGUUxWWXlQ
-QzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2Iy
-UmxQZ29nCklDQWdJQ0FnSUR3dlRtOWtaVDRLSUNBZ0lDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lD
-QWdJRHhPYjJSbFRtRnRaVDVFYVdkcGRHRnMKUTJWeWRHbG1hV05oZEdVOEwwNXZaR1ZPWVcxbFBn
-b2dJQ0FnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbApUbUZ0WlQ1RFpY
-SjBhV1pwWTJGMFpWUjVjR1U4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ0lDQThWbUZzZFdV
-K2VEVXdPWFl6ClBDOVdZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNB
-Z0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ0lDQTgKVG05a1pVNWhiV1UrUTJWeWRGTklRVEkxTmta
-cGJtZGxjbkJ5YVc1MFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaApiSFZsUGpG
-bU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZt
-TVdZeFpqRm1NV1l4ClpqRm1NV1l4WmpGbU1XWThMMVpoYkhWbFBnb2dJQ0FnSUNBZ0lDQWdQQzlP
-YjJSbFBnb2dJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWcKSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0Fn
-SUNBZ0lEeE9iMlJsVG1GdFpUNVRTVTA4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZwpQRTV2
-WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbFRtRnRaVDVKVFZOSlBDOU9iMlJsVG1GdFpUNEtJ
-Q0FnSUNBZ0lDQWdJQ0FnClBGWmhiSFZsUGpFeU16UTFOaW84TDFaaGJIVmxQZ29nSUNBZ0lDQWdJ
-Q0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVSsKQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE9i
-MlJsVG1GdFpUNUZRVkJVZVhCbFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaApi
-SFZsUGpJelBDOVdZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNBOEww
-NXZaR1UrQ2lBZ0lDQWdJRHd2ClRtOWtaVDRLSUNBZ0lEd3ZUbTlrWlQ0S0lDQThMMDV2WkdVK0Nq
-d3ZUV2R0ZEZSeVpXVSsKCi0te2JvdW5kYXJ5fQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3gt
-eDUwOS1jYS1jZXJ0CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NAoKTFMwdExTMUNS
-VWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVUkxSRU5EUVdoRFowRjNTVUpCWjBsS1FV
-bE1iRVprZDNwTQpWblZ5VFVFd1IwTlRjVWRUU1dJelJGRkZRa04zVlVGTlFrbDRSVVJCVDBKblRs
-WUtRa0ZOVkVJd1ZrSlZRMEpFVVZSRmQwaG9ZMDVOClZGbDNUVlJGZVUxVVJURk5SRVV4VjJoalRr
-MXFXWGROVkVFMVRWUkZNVTFFUlRGWGFrRlRUVkpCZHdwRVoxbEVWbEZSUkVWM1pFWlIKVmtGblVU
-QkZlRTFKU1VKSmFrRk9RbWRyY1docmFVYzVkekJDUVZGRlJrRkJUME5CVVRoQlRVbEpRa05uUzBO
-QlVVVkJDbnB1UVZCVgplakkyVFhOaFpUUjNjelF6WTNwU05ERXZTakpSZEhKVFNWcFZTMjFXVlhO
-V2RXMUVZbGxJY2xCT2RsUllTMU5OV0VGalpYZFBVa1JSCldWZ0tVbkYyU0had2JqaERjMk5DTVN0
-dlIxaGFka2gzZUdvMGVsWXdWMHR2U3pKNlpWaHJZWFV6ZG1ONWJETklTVXQxY0VwbWNUSlUKUlVG
-RFpXWldhbW93ZEFwS1Z5dFlNelZRUjFkd09TOUlOWHBKVlU1V1RsWnFVemRWYlhNNE5FbDJTMmhT
-UWpnMU1USlFRamxWZVVoaApaMWhaVmxnMVIxZHdRV05XY0hsbWNteFNDa1pKT1ZGa2FHZ3JVR0py
-TUhWNWEzUmtZbVl2UTJSbVowaFBiMlZpY2xSMGQxSnNhazB3CmIwUjBXQ3N5UTNZMmFqQjNRa3Mz
-YUVRNGNGQjJaakVyZFhrS1IzcGplbWxuUVZVdk5FdDNOMlZhY1hsa1pqbENLelZTZFhCU0swbGEK
-YVhCWU5ERjRSV2xKY2t0U2QzRnBOVEUzVjFkNldHTnFZVWN5WTA1aVpqUTFNUXA0Y0VnMVVHNVdN
-Mmt4ZEhFd05HcE5SMUZWZWtaMwpTVVJCVVVGQ2J6UkhRVTFJTkhkSVVWbEVWbEl3VDBKQ1dVVkdT
-WGRZTkhaek9FSnBRbU5UWTI5a0NqVnViMXBJVWswNFJUUXJhVTFGClNVZEJNVlZrU1hkUk4wMUVi
-VUZHU1hkWU5IWnpPRUpwUW1OVFkyOWtOVzV2V2toU1RUaEZOQ3RwYjFKaGEwWkVRVk1LVFZKQmQw
-Um4KV1VSV1VWRkVSWGRrUmxGV1FXZFJNRVY0WjJkclFXZDFWVll6UkUxMFZ6WnpkMFJCV1VSV1Vq
-QlVRa0ZWZDBGM1JVSXZla0ZNUW1kTwpWZ3BJVVRoRlFrRk5RMEZSV1hkRVVWbEtTMjlhU1doMlkw
-NUJVVVZNUWxGQlJHZG5SVUpCUm1aUmNVOVVRVGRTZGpkTEsyeDFVVGR3CmJtRnpORUpaZDBoRkNq
-bEhSVkF2ZFc5b2RqWkxUM2t3VkVkUlJtSnlVbFJxUm05TVZrNUNPVUphTVhsdFRVUmFNQzlVU1hk
-SlZXTTMKZDJrM1lUaDBOVzFGY1ZsSU1UVXpkMWNLWVZkdmIybFRhbmxNVEdoMVNUUnpUbkpPUTA5
-MGFYTmtRbkV5Y2pKTlJsaDBObWd3YlVGUgpXVTlRZGpoU09FczNMMlpuVTNoSFJuRjZhSGxPYlcx
-V1RBb3hjVUpLYkdSNE16UlRjSGR6VkVGTVVWWlFZalJvUjNkS2VscG1jakZRClkzQkZVWGcyZUUx
-dVZHdzRlRVZYV2tVelRYTTVPWFZoVlhoaVVYRkpkMUoxQ2t4blFVOXJUa050V1RKdE9EbFdhSHBo
-U0VveGRWWTQKTlVGa1RTOTBSQ3RaYzIxc2JtNXFkRGxNVWtObGFtSkNhWEJxU1VkcVQxaHlaekZL
-VUN0c2VGWUtiWFZOTkhaSUsxQXZiV3h0ZUhOUQpVSG93WkRZMVlpdEZSMjFLV25CdlRHdFBMM1Jr
-VGs1MlExbDZha3B3VkVWWGNFVnpUelpPVFdoTFdXODlDaTB0TFMwdFJVNUVJRU5GClVsUkpSa2xE
-UVZSRkxTMHRMUzBLCi0te2JvdW5kYXJ5fS0tCg==
\ No newline at end of file
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.conf b/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.conf
deleted file mode 100644
index 5b4e4cb..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithCACert.conf
+++ /dev/null
@@ -1,74 +0,0 @@
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary={boundary}; charset=UTF-8
-Content-Transfer-Encoding: base64
-
---{boundary}
-Content-Type: application/x-passpoint-profile; charset=UTF-8
-Content-Transfer-Encoding: base64
-
-PE1nbXRUcmVlIHhtbG5zPSJzeW5jbWw6ZG1kZGYxLjIiPgogIDxWZXJEVEQ+MS4yPC9WZXJEVEQ+
-CiAgPE5vZGU+CiAgICA8Tm9kZU5hbWU+UGVyUHJvdmlkZXJTdWJzY3JpcHRpb248L05vZGVOYW1l
-PgogICAgPFJUUHJvcGVydGllcz4KICAgICAgPFR5cGU+CiAgICAgICAgPERERk5hbWU+dXJuOndm
-YTptbzpob3RzcG90MmRvdDAtcGVycHJvdmlkZXJzdWJzY3JpcHRpb246MS4wPC9EREZOYW1lPgog
-ICAgICA8L1R5cGU+CiAgICA8L1JUUHJvcGVydGllcz4KICAgIDxOb2RlPgogICAgICA8Tm9kZU5h
-bWU+aTAwMTwvTm9kZU5hbWU+CiAgICAgIDxOb2RlPgogICAgICAgIDxOb2RlTmFtZT5Ib21lU1A8
-L05vZGVOYW1lPgogICAgICAgIDxOb2RlPgogICAgICAgICAgPE5vZGVOYW1lPkZyaWVuZGx5TmFt
-ZTwvTm9kZU5hbWU+CiAgICAgICAgICA8VmFsdWU+RXhhbXBsZSBOZXR3b3JrPC9WYWx1ZT4KICAg
-ICAgICA8L05vZGU+CiAgICAgICAgPE5vZGU+CiAgICAgICAgICA8Tm9kZU5hbWU+RlFETjwvTm9k
-ZU5hbWU+CiAgICAgICAgICA8VmFsdWU+aG90c3BvdC5leGFtcGxlLm5ldDwvVmFsdWU+CiAgICAg
-ICAgPC9Ob2RlPgogICAgICAgIDxOb2RlPgogICAgICAgICAgPE5vZGVOYW1lPlJvYW1pbmdDb25z
-b3J0aXVtT0k8L05vZGVOYW1lPgogICAgICAgICAgPFZhbHVlPjExMjIzMyw0NDU1NjY8L1ZhbHVl
-PgogICAgICAgIDwvTm9kZT4KICAgICAgPC9Ob2RlPgogICAgICA8Tm9kZT4KICAgICAgICA8Tm9k
-ZU5hbWU+Q3JlZGVudGlhbDwvTm9kZU5hbWU+CiAgICAgICAgPE5vZGU+CiAgICAgICAgICA8Tm9k
-ZU5hbWU+UmVhbG08L05vZGVOYW1lPgogICAgICAgICAgPFZhbHVlPmV4YW1wbGUuY29tPC9WYWx1
-ZT4KICAgICAgICA8L05vZGU+CiAgICAgICAgPE5vZGU+CiAgICAgICAgICA8Tm9kZU5hbWU+VXNl
-cm5hbWVQYXNzd29yZDwvTm9kZU5hbWU+CiAgICAgICAgICA8Tm9kZT4KICAgICAgICAgICAgPE5v
-ZGVOYW1lPlVzZXJuYW1lPC9Ob2RlTmFtZT4KICAgICAgICAgICAgPFZhbHVlPnVzZXI8L1ZhbHVl
-PgogICAgICAgICAgPC9Ob2RlPgogICAgICAgICAgPE5vZGU+CiAgICAgICAgICAgIDxOb2RlTmFt
-ZT5QYXNzd29yZDwvTm9kZU5hbWU+CiAgICAgICAgICAgIDxWYWx1ZT5jR0Z6YzNkdmNtUT08L1Zh
-bHVlPgogICAgICAgICAgPC9Ob2RlPgogICAgICAgICAgPE5vZGU+CiAgICAgICAgICAgIDxOb2Rl
-TmFtZT5FQVBNZXRob2Q8L05vZGVOYW1lPgogICAgICAgICAgICA8Tm9kZT4KICAgICAgICAgICAg
-ICA8Tm9kZU5hbWU+RUFQVHlwZTwvTm9kZU5hbWU+CiAgICAgICAgICAgICAgPFZhbHVlPjIxPC9W
-YWx1ZT4KICAgICAgICAgICAgPC9Ob2RlPgogICAgICAgICAgICA8Tm9kZT4KICAgICAgICAgICAg
-ICA8Tm9kZU5hbWU+SW5uZXJNZXRob2Q8L05vZGVOYW1lPgogICAgICAgICAgICAgIDxWYWx1ZT5N
-Uy1DSEFQLVYyPC9WYWx1ZT4KICAgICAgICAgICAgPC9Ob2RlPgogICAgICAgICAgPC9Ob2RlPgog
-ICAgICAgIDwvTm9kZT4KICAgICAgICA8Tm9kZT4KICAgICAgICAgIDxOb2RlTmFtZT5EaWdpdGFs
-Q2VydGlmaWNhdGU8L05vZGVOYW1lPgogICAgICAgICAgPE5vZGU+CiAgICAgICAgICAgIDxOb2Rl
-TmFtZT5DZXJ0aWZpY2F0ZVR5cGU8L05vZGVOYW1lPgogICAgICAgICAgICA8VmFsdWU+eDUwOXYz
-PC9WYWx1ZT4KICAgICAgICAgIDwvTm9kZT4KICAgICAgICAgIDxOb2RlPgogICAgICAgICAgICA8
-Tm9kZU5hbWU+Q2VydFNIQTI1NkZpbmdlcnByaW50PC9Ob2RlTmFtZT4KICAgICAgICAgICAgPFZh
-bHVlPjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYxZjFmMWYx
-ZjFmMWYxZjFmMWY8L1ZhbHVlPgogICAgICAgICAgPC9Ob2RlPgogICAgICAgIDwvTm9kZT4KICAg
-ICAgICA8Tm9kZT4KICAgICAgICAgIDxOb2RlTmFtZT5TSU08L05vZGVOYW1lPgogICAgICAgICAg
-PE5vZGU+CiAgICAgICAgICAgIDxOb2RlTmFtZT5JTVNJPC9Ob2RlTmFtZT4KICAgICAgICAgICAg
-PFZhbHVlPjEyMzQ1Nio8L1ZhbHVlPgogICAgICAgICAgPC9Ob2RlPgogICAgICAgICAgPE5vZGU+
-CiAgICAgICAgICAgIDxOb2RlTmFtZT5FQVBUeXBlPC9Ob2RlTmFtZT4KICAgICAgICAgICAgPFZh
-bHVlPjIzPC9WYWx1ZT4KICAgICAgICAgIDwvTm9kZT4KICAgICAgICA8L05vZGU+CiAgICAgIDwv
-Tm9kZT4KICAgIDwvTm9kZT4KICA8L05vZGU+CjwvTWdtdFRyZWU+
-
---{boundary}
-Content-Type: application/x-x509-ca-cert
-Content-Transfer-Encoding: base64
-
-LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURLRENDQWhDZ0F3SUJBZ0lKQUlMbEZkd3pM
-VnVyTUEwR0NTcUdTSWIzRFFFQkN3VUFNQkl4RURBT0JnTlYKQkFNVEIwVkJVQ0JEUVRFd0hoY05N
-VFl3TVRFeU1URTFNREUxV2hjTk1qWXdNVEE1TVRFMU1ERTFXakFTTVJBdwpEZ1lEVlFRREV3ZEZR
-VkFnUTBFeE1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBCnpuQVBV
-ejI2TXNhZTR3czQzY3pSNDEvSjJRdHJTSVpVS21WVXNWdW1EYllIclBOdlRYS1NNWEFjZXdPUkRR
-WVgKUnF2SHZwbjhDc2NCMStvR1hadkh3eGo0elYwV0tvSzJ6ZVhrYXUzdmN5bDNISUt1cEpmcTJU
-RUFDZWZWamowdApKVytYMzVQR1dwOS9INXpJVU5WTlZqUzdVbXM4NEl2S2hSQjg1MTJQQjlVeUhh
-Z1hZVlg1R1dwQWNWcHlmcmxSCkZJOVFkaGgrUGJrMHV5a3RkYmYvQ2RmZ0hPb2ViclR0d1Jsak0w
-b0R0WCsyQ3Y2ajB3Qks3aEQ4cFB2ZjErdXkKR3pjemlnQVUvNEt3N2VacXlkZjlCKzVSdXBSK0la
-aXBYNDF4RWlJcktSd3FpNTE3V1d6WGNqYUcyY05iZjQ1MQp4cEg1UG5WM2kxdHEwNGpNR1FVekZ3
-SURBUUFCbzRHQU1INHdIUVlEVlIwT0JCWUVGSXdYNHZzOEJpQmNTY29kCjVub1pIUk04RTQraU1F
-SUdBMVVkSXdRN01EbUFGSXdYNHZzOEJpQmNTY29kNW5vWkhSTThFNCtpb1Jha0ZEQVMKTVJBd0Rn
-WURWUVFERXdkRlFWQWdRMEV4Z2drQWd1VVYzRE10VzZzd0RBWURWUjBUQkFVd0F3RUIvekFMQmdO
-VgpIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBRmZRcU9UQTdSdjdLK2x1UTdw
-bmFzNEJZd0hFCjlHRVAvdW9odjZLT3kwVEdRRmJyUlRqRm9MVk5COUJaMXltTURaMC9USXdJVWM3
-d2k3YTh0NW1FcVlIMTUzd1cKYVdvb2lTanlMTGh1STRzTnJOQ090aXNkQnEycjJNRlh0NmgwbUFR
-WU9QdjhSOEs3L2ZnU3hHRnF6aHlObW1WTAoxcUJKbGR4MzRTcHdzVEFMUVZQYjRoR3dKelpmcjFQ
-Y3BFUXg2eE1uVGw4eEVXWkUzTXM5OXVhVXhiUXFJd1J1CkxnQU9rTkNtWTJtODlWaHphSEoxdVY4
-NUFkTS90RCtZc21sbm5qdDlMUkNlamJCaXBqSUdqT1hyZzFKUCtseFYKbXVNNHZIK1AvbWxteHNQ
-UHowZDY1YitFR21KWnBvTGtPL3RkTk52Q1l6akpwVEVXcEVzTzZOTWhLWW89Ci0tLS0tRU5EIENF
-UlRJRklDQVRFLS0tLS0K
---{boundary}--
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithInvalidContentType.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithInvalidContentType.base64
deleted file mode 100644
index 2775a9f..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithInvalidContentType.base64
+++ /dev/null
@@ -1,86 +0,0 @@
-TUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5
-PXtib3VuZGFyeX07IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFz
-ZTY0CgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi9wYXNzcG9pbnQtcHJv
-ZmlsZTsgY2hhcnNldD1VVEYtOApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNlNjQKClBF
-MW5iWFJVY21WbElIaHRiRzV6UFNKemVXNWpiV3c2Wkcxa1pHWXhMaklpUGdvZ0lEeFdaWEpFVkVR
-K01TNHlQQzlXWlhKRVZFUSsKQ2lBZ1BFNXZaR1UrQ2lBZ0lDQThUbTlrWlU1aGJXVStVR1Z5VUhK
-dmRtbGtaWEpUZFdKelkzSnBjSFJwYjI0OEwwNXZaR1ZPWVcxbApQZ29nSUNBZ1BGSlVVSEp2Y0dW
-eWRHbGxjejRLSUNBZ0lDQWdQRlI1Y0dVK0NpQWdJQ0FnSUNBZ1BFUkVSazVoYldVK2RYSnVPbmRt
-CllUcHRienBvYjNSemNHOTBNbVJ2ZERBdGNHVnljSEp2ZG1sa1pYSnpkV0p6WTNKcGNIUnBiMjQ2
-TVM0d1BDOUVSRVpPWVcxbFBnb2cKSUNBZ0lDQThMMVI1Y0dVK0NpQWdJQ0E4TDFKVVVISnZjR1Z5
-ZEdsbGN6NEtJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQThUbTlrWlU1aApiV1UrYVRBd01Ud3ZUbTlr
-WlU1aGJXVStDaUFnSUNBZ0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUR4T2IyUmxUbUZ0WlQ1SWIyMWxV
-MUE4CkwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZa
-R1ZPWVcxbFBrWnlhV1Z1Wkd4NVRtRnQKWlR3dlRtOWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQThW
-bUZzZFdVK1JYaGhiWEJzWlNCT1pYUjNiM0pyUEM5V1lXeDFaVDRLSUNBZwpJQ0FnSUNBOEwwNXZa
-R1UrQ2lBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrUmxGRVRq
-d3ZUbTlrClpVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBOFZtRnNkV1UrYUc5MGMzQnZkQzVsZUdGdGNH
-eGxMbTVsZER3dlZtRnNkV1UrQ2lBZ0lDQWcKSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUR4T2Iy
-UmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVk9ZVzFsUGxKdllXMXBibWREYjI1egpiM0owYVhWdFQw
-azhMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQakV4TWpJek15dzBORFUxTmpZ
-OEwxWmhiSFZsClBnb2dJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNB
-Z0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBOFRtOWsKWlU1aGJXVStRM0psWkdWdWRHbGhiRHd2VG05
-a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0E4VG05awpaVTVoYldV
-K1VtVmhiRzA4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ1BGWmhiSFZsUG1WNFlXMXdiR1V1
-WTI5dFBDOVdZV3gxClpUNEtJQ0FnSUNBZ0lDQThMMDV2WkdVK0NpQWdJQ0FnSUNBZ1BFNXZaR1Ur
-Q2lBZ0lDQWdJQ0FnSUNBOFRtOWtaVTVoYldVK1ZYTmwKY201aGJXVlFZWE56ZDI5eVpEd3ZUbTlr
-WlU1aGJXVStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEU1dgpaR1ZP
-WVcxbFBsVnpaWEp1WVcxbFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQ
-blZ6WlhJOEwxWmhiSFZsClBnb2dJQ0FnSUNBZ0lDQWdQQzlPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdQ
-RTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbFRtRnQKWlQ1UVlYTnpkMjl5WkR3dlRtOWta
-VTVoYldVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhXWVd4MVpUNWpSMFo2WXpOa2RtTnRVVDA4TDFaaApi
-SFZsUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZaR1UrQ2lBZ0lD
-QWdJQ0FnSUNBZ0lEeE9iMlJsClRtRnRaVDVGUVZCTlpYUm9iMlE4TDA1dlpHVk9ZVzFsUGdvZ0lD
-QWdJQ0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWcKSUNBOFRtOWtaVTVoYldVK1JV
-RlFWSGx3WlR3dlRtOWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQakl4UEM5
-VwpZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQQzlPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4VG05
-a1pUNEtJQ0FnSUNBZ0lDQWdJQ0FnCklDQThUbTlrWlU1aGJXVStTVzV1WlhKTlpYUm9iMlE4TDA1
-dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ0lDQWdJRHhXWVd4MVpUNU4KVXkxRFNFRlFMVll5UEM5
-V1lXeDFaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJs
-UGdvZwpJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0Fn
-SUR4T2IyUmxUbUZ0WlQ1RWFXZHBkR0ZzClEyVnlkR2xtYVdOaGRHVThMMDV2WkdWT1lXMWxQZ29n
-SUNBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0FnSUR4T2IyUmwKVG1GdFpUNURaWEow
-YVdacFkyRjBaVlI1Y0dVOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4Vm1Gc2RXVStl
-RFV3T1hZegpQQzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUNBZ0lDQWdJ
-RHhPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4ClRtOWtaVTVoYldVK1EyVnlkRk5JUVRJMU5rWnBi
-bWRsY25CeWFXNTBQQzlPYjJSbFRtRnRaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BGWmgKYkhWbFBqRm1N
-V1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1X
-WXhaakZtTVdZeApaakZtTVdZeFpqRm1NV1k4TDFaaGJIVmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2Iy
-UmxQZ29nSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnCklDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lD
-QWdJRHhPYjJSbFRtRnRaVDVUU1UwOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWcKUEU1dlpH
-VStDaUFnSUNBZ0lDQWdJQ0FnSUR4T2IyUmxUbUZ0WlQ1SlRWTkpQQzlPYjJSbFRtRnRaVDRLSUNB
-Z0lDQWdJQ0FnSUNBZwpQRlpoYkhWbFBqRXlNelExTmlvOEwxWmhiSFZsUGdvZ0lDQWdJQ0FnSUNB
-Z1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZaR1UrCkNpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJS
-bFRtRnRaVDVGUVZCVWVYQmxQQzlPYjJSbFRtRnRaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BGWmgKYkhW
-bFBqSXpQQzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUNBZ0lDQThMMDV2
-WkdVK0NpQWdJQ0FnSUR3dgpUbTlrWlQ0S0lDQWdJRHd2VG05a1pUNEtJQ0E4TDA1dlpHVStDand2
-VFdkdGRGUnlaV1UrCgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXg1
-MDktY2EtY2VydApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNlNjQKCkxTMHRMUzFDUlVk
-SlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVVJMUkVORFFXaERaMEYzU1VKQlowbEtRVWxN
-YkVaa2QzcE0KVm5WeVRVRXdSME5UY1VkVFNXSXpSRkZGUWtOM1ZVRk5Ra2w0UlVSQlQwSm5UbFlL
-UWtGTlZFSXdWa0pWUTBKRVVWUkZkMGhvWTA1TgpWRmwzVFZSRmVVMVVSVEZOUkVVeFYyaGpUazFx
-V1hkTlZFRTFUVlJGTVUxRVJURlhha0ZUVFZKQmR3cEVaMWxFVmxGUlJFVjNaRVpSClZrRm5VVEJG
-ZUUxSlNVSkpha0ZPUW1kcmNXaHJhVWM1ZHpCQ1FWRkZSa0ZCVDBOQlVUaEJUVWxKUWtOblMwTkJV
-VVZCQ25wdVFWQlYKZWpJMlRYTmhaVFIzY3pRelkzcFNOREV2U2pKUmRISlRTVnBWUzIxV1ZYTldk
-VzFFWWxsSWNsQk9kbFJZUzFOTldFRmpaWGRQVWtSUgpXVmdLVW5GMlNIWndiamhEYzJOQ01TdHZS
-MWhhZGtoM2VHbzBlbFl3VjB0dlN6SjZaVmhyWVhVemRtTjViRE5JU1V0MWNFcG1jVEpVClJVRkRa
-V1pXYW1vd2RBcEtWeXRZTXpWUVIxZHdPUzlJTlhwSlZVNVdUbFpxVXpkVmJYTTRORWwyUzJoU1Fq
-ZzFNVEpRUWpsVmVVaGgKWjFoWlZsZzFSMWR3UVdOV2NIbG1jbXhTQ2taSk9WRmthR2dyVUdKck1I
-VjVhM1JrWW1ZdlEyUm1aMGhQYjJWaWNsUjBkMUpzYWswdwpiMFIwV0NzeVEzWTJhakIzUWtzM2FF
-UTRjRkIyWmpFcmRYa0tSM3BqZW1sblFWVXZORXQzTjJWYWNYbGtaamxDS3pWU2RYQlNLMGxhCmFY
-QllOREY0UldsSmNrdFNkM0ZwTlRFM1YxZDZXR05xWVVjeVkwNWlaalExTVFwNGNFZzFVRzVXTTJr
-eGRIRXdOR3BOUjFGVmVrWjMKU1VSQlVVRkNielJIUVUxSU5IZElVVmxFVmxJd1QwSkNXVVZHU1hk
-WU5IWnpPRUpwUW1OVFkyOWtDalZ1YjFwSVVrMDRSVFFyYVUxRgpTVWRCTVZWa1NYZFJOMDFFYlVG
-R1NYZFlOSFp6T0VKcFFtTlRZMjlrTlc1dldraFNUVGhGTkN0cGIxSmhhMFpFUVZNS1RWSkJkMFJu
-CldVUldVVkZFUlhka1JsRldRV2RSTUVWNFoyZHJRV2QxVlZZelJFMTBWelp6ZDBSQldVUldVakJV
-UWtGVmQwRjNSVUl2ZWtGTVFtZE8KVmdwSVVUaEZRa0ZOUTBGUldYZEVVVmxLUzI5YVNXaDJZMDVC
-VVVWTVFsRkJSR2RuUlVKQlJtWlJjVTlVUVRkU2RqZExLMngxVVRkdwpibUZ6TkVKWmQwaEZDamxI
-UlZBdmRXOW9kalpMVDNrd1ZFZFJSbUp5VWxScVJtOU1WazVDT1VKYU1YbHRUVVJhTUM5VVNYZEpW
-V00zCmQyazNZVGgwTlcxRmNWbElNVFV6ZDFjS1lWZHZiMmxUYW5sTVRHaDFTVFJ6VG5KT1EwOTBh
-WE5rUW5FeWNqSk5SbGgwTm1nd2JVRlIKV1U5UWRqaFNPRXMzTDJablUzaEhSbkY2YUhsT2JXMVdU
-QW94Y1VKS2JHUjRNelJUY0hkelZFRk1VVlpRWWpSb1IzZEtlbHBtY2pGUQpZM0JGVVhnMmVFMXVW
-R3c0ZUVWWFdrVXpUWE01T1hWaFZYaGlVWEZKZDFKMUNreG5RVTlyVGtOdFdUSnRPRGxXYUhwaFNF
-b3hkVlk0Ck5VRmtUUzkwUkN0WmMyMXNibTVxZERsTVVrTmxhbUpDYVhCcVNVZHFUMWh5WnpGS1VD
-dHNlRllLYlhWTk5IWklLMUF2Yld4dGVITlEKVUhvd1pEWTFZaXRGUjIxS1duQnZUR3RQTDNSa1Rr
-NTJRMWw2YWtwd1ZFVlhjRVZ6VHpaT1RXaExXVzg5Q2kwdExTMHRSVTVFSUVORgpVbFJKUmtsRFFW
-UkZMUzB0TFMwSwotLXtib3VuZGFyeX0tLQo=
\ No newline at end of file
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithMissingBoundary.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithMissingBoundary.base64
deleted file mode 100644
index 7023453..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithMissingBoundary.base64
+++ /dev/null
@@ -1,86 +0,0 @@
-TUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5
-PXtib3VuZGFyeX07IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFz
-ZTY0CgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXBhc3Nwb2ludC1w
-cm9maWxlOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NAoK
-UEUxbmJYUlVjbVZsSUhodGJHNXpQU0p6ZVc1amJXdzZaRzFrWkdZeExqSWlQZ29nSUR4V1pYSkVW
-RVErTVM0eVBDOVdaWEpFVkVRKwpDaUFnUEU1dlpHVStDaUFnSUNBOFRtOWtaVTVoYldVK1VHVnlV
-SEp2ZG1sa1pYSlRkV0p6WTNKcGNIUnBiMjQ4TDA1dlpHVk9ZVzFsClBnb2dJQ0FnUEZKVVVISnZj
-R1Z5ZEdsbGN6NEtJQ0FnSUNBZ1BGUjVjR1UrQ2lBZ0lDQWdJQ0FnUEVSRVJrNWhiV1UrZFhKdU9u
-ZG0KWVRwdGJ6cG9iM1J6Y0c5ME1tUnZkREF0Y0dWeWNISnZkbWxrWlhKemRXSnpZM0pwY0hScGIy
-NDZNUzR3UEM5RVJFWk9ZVzFsUGdvZwpJQ0FnSUNBOEwxUjVjR1UrQ2lBZ0lDQThMMUpVVUhKdmNH
-VnlkR2xsY3o0S0lDQWdJRHhPYjJSbFBnb2dJQ0FnSUNBOFRtOWtaVTVoCmJXVSthVEF3TVR3dlRt
-OWtaVTVoYldVK0NpQWdJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQWdJRHhPYjJSbFRtRnRaVDVJYjIx
-bFUxQTgKTDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1
-dlpHVk9ZVzFsUGtaeWFXVnVaR3g1VG1GdApaVHd2VG05a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNB
-OFZtRnNkV1UrUlhoaGJYQnNaU0JPWlhSM2IzSnJQQzlXWVd4MVpUNEtJQ0FnCklDQWdJQ0E4TDA1
-dlpHVStDaUFnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrWlU1aGJXVStSbEZF
-VGp3dlRtOWsKWlU1aGJXVStDaUFnSUNBZ0lDQWdJQ0E4Vm1Gc2RXVSthRzkwYzNCdmRDNWxlR0Z0
-Y0d4bExtNWxkRHd2Vm1Gc2RXVStDaUFnSUNBZwpJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJRHhP
-YjJSbFBnb2dJQ0FnSUNBZ0lDQWdQRTV2WkdWT1lXMWxQbEp2WVcxcGJtZERiMjV6CmIzSjBhWFZ0
-VDBrOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWdQRlpoYkhWbFBqRXhNakl6TXl3ME5EVTFO
-alk4TDFaaGJIVmwKUGdvZ0lDQWdJQ0FnSUR3dlRtOWtaVDRLSUNBZ0lDQWdQQzlPYjJSbFBnb2dJ
-Q0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0E4VG05awpaVTVoYldVK1EzSmxaR1Z1ZEdsaGJEd3ZU
-bTlrWlU1aGJXVStDaUFnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrClpVNWhi
-V1UrVW1WaGJHMDhMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQbVY0WVcxd2JH
-VXVZMjl0UEM5V1lXeDEKWlQ0S0lDQWdJQ0FnSUNBOEwwNXZaR1UrQ2lBZ0lDQWdJQ0FnUEU1dlpH
-VStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrVlhObApjbTVoYldWUVlYTnpkMjl5WkR3dlRt
-OWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQRTV2ClpH
-Vk9ZVzFsUGxWelpYSnVZVzFsUEM5T2IyUmxUbUZ0WlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQRlpoYkhW
-bFBuVnpaWEk4TDFaaGJIVmwKUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNB
-Z1BFNXZaR1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE9iMlJsVG1GdApaVDVRWVhOemQyOXlaRHd2VG05
-a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1alIwWjZZek5rZG1OdFVUMDhMMVpo
-CmJIVmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVStDaUFn
-SUNBZ0lDQWdJQ0FnSUR4T2IyUmwKVG1GdFpUNUZRVkJOWlhSb2IyUThMMDV2WkdWT1lXMWxQZ29n
-SUNBZ0lDQWdJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0FnSUNBZwpJQ0E4VG05a1pVNWhiV1Ur
-UlVGUVZIbHdaVHd2VG05a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lDQWdQRlpoYkhWbFBqSXhQ
-QzlXCllXeDFaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ0lDQThU
-bTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWcKSUNBOFRtOWtaVTVoYldVK1NXNXVaWEpOWlhSb2IyUThM
-MDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1TgpVeTFEU0VGUUxWWXlQ
-QzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2Iy
-UmxQZ29nCklDQWdJQ0FnSUR3dlRtOWtaVDRLSUNBZ0lDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lD
-QWdJRHhPYjJSbFRtRnRaVDVFYVdkcGRHRnMKUTJWeWRHbG1hV05oZEdVOEwwNXZaR1ZPWVcxbFBn
-b2dJQ0FnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbApUbUZ0WlQ1RFpY
-SjBhV1pwWTJGMFpWUjVjR1U4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ0lDQThWbUZzZFdV
-K2VEVXdPWFl6ClBDOVdZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNB
-Z0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ0lDQTgKVG05a1pVNWhiV1UrUTJWeWRGTklRVEkxTmta
-cGJtZGxjbkJ5YVc1MFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaApiSFZsUGpG
-bU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZt
-TVdZeFpqRm1NV1l4ClpqRm1NV1l4WmpGbU1XWThMMVpoYkhWbFBnb2dJQ0FnSUNBZ0lDQWdQQzlP
-YjJSbFBnb2dJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWcKSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0Fn
-SUNBZ0lEeE9iMlJsVG1GdFpUNVRTVTA4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZwpQRTV2
-WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbFRtRnRaVDVKVFZOSlBDOU9iMlJsVG1GdFpUNEtJ
-Q0FnSUNBZ0lDQWdJQ0FnClBGWmhiSFZsUGpFeU16UTFOaW84TDFaaGJIVmxQZ29nSUNBZ0lDQWdJ
-Q0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVSsKQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE9i
-MlJsVG1GdFpUNUZRVkJVZVhCbFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaApi
-SFZsUGpJelBDOVdZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNBOEww
-NXZaR1UrQ2lBZ0lDQWdJRHd2ClRtOWtaVDRLSUNBZ0lEd3ZUbTlrWlQ0S0lDQThMMDV2WkdVK0Nq
-d3ZUV2R0ZEZSeVpXVSsKCi0te2JvdW5kYXJ5fQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3gt
-eDUwOS1jYS1jZXJ0CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NAoKTFMwdExTMUNS
-VWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVUkxSRU5EUVdoRFowRjNTVUpCWjBsS1FV
-bE1iRVprZDNwTQpWblZ5VFVFd1IwTlRjVWRUU1dJelJGRkZRa04zVlVGTlFrbDRSVVJCVDBKblRs
-WUtRa0ZOVkVJd1ZrSlZRMEpFVVZSRmQwaG9ZMDVOClZGbDNUVlJGZVUxVVJURk5SRVV4VjJoalRr
-MXFXWGROVkVFMVRWUkZNVTFFUlRGWGFrRlRUVkpCZHdwRVoxbEVWbEZSUkVWM1pFWlIKVmtGblVU
-QkZlRTFKU1VKSmFrRk9RbWRyY1docmFVYzVkekJDUVZGRlJrRkJUME5CVVRoQlRVbEpRa05uUzBO
-QlVVVkJDbnB1UVZCVgplakkyVFhOaFpUUjNjelF6WTNwU05ERXZTakpSZEhKVFNWcFZTMjFXVlhO
-V2RXMUVZbGxJY2xCT2RsUllTMU5OV0VGalpYZFBVa1JSCldWZ0tVbkYyU0had2JqaERjMk5DTVN0
-dlIxaGFka2gzZUdvMGVsWXdWMHR2U3pKNlpWaHJZWFV6ZG1ONWJETklTVXQxY0VwbWNUSlUKUlVG
-RFpXWldhbW93ZEFwS1Z5dFlNelZRUjFkd09TOUlOWHBKVlU1V1RsWnFVemRWYlhNNE5FbDJTMmhT
-UWpnMU1USlFRamxWZVVoaApaMWhaVmxnMVIxZHdRV05XY0hsbWNteFNDa1pKT1ZGa2FHZ3JVR0py
-TUhWNWEzUmtZbVl2UTJSbVowaFBiMlZpY2xSMGQxSnNhazB3CmIwUjBXQ3N5UTNZMmFqQjNRa3Mz
-YUVRNGNGQjJaakVyZFhrS1IzcGplbWxuUVZVdk5FdDNOMlZhY1hsa1pqbENLelZTZFhCU0swbGEK
-YVhCWU5ERjRSV2xKY2t0U2QzRnBOVEUzVjFkNldHTnFZVWN5WTA1aVpqUTFNUXA0Y0VnMVVHNVdN
-Mmt4ZEhFd05HcE5SMUZWZWtaMwpTVVJCVVVGQ2J6UkhRVTFJTkhkSVVWbEVWbEl3VDBKQ1dVVkdT
-WGRZTkhaek9FSnBRbU5UWTI5a0NqVnViMXBJVWswNFJUUXJhVTFGClNVZEJNVlZrU1hkUk4wMUVi
-VUZHU1hkWU5IWnpPRUpwUW1OVFkyOWtOVzV2V2toU1RUaEZOQ3RwYjFKaGEwWkVRVk1LVFZKQmQw
-Um4KV1VSV1VWRkVSWGRrUmxGV1FXZFJNRVY0WjJkclFXZDFWVll6UkUxMFZ6WnpkMFJCV1VSV1Vq
-QlVRa0ZWZDBGM1JVSXZla0ZNUW1kTwpWZ3BJVVRoRlFrRk5RMEZSV1hkRVVWbEtTMjlhU1doMlkw
-NUJVVVZNUWxGQlJHZG5SVUpCUm1aUmNVOVVRVGRTZGpkTEsyeDFVVGR3CmJtRnpORUpaZDBoRkNq
-bEhSVkF2ZFc5b2RqWkxUM2t3VkVkUlJtSnlVbFJxUm05TVZrNUNPVUphTVhsdFRVUmFNQzlVU1hk
-SlZXTTMKZDJrM1lUaDBOVzFGY1ZsSU1UVXpkMWNLWVZkdmIybFRhbmxNVEdoMVNUUnpUbkpPUTA5
-MGFYTmtRbkV5Y2pKTlJsaDBObWd3YlVGUgpXVTlRZGpoU09FczNMMlpuVTNoSFJuRjZhSGxPYlcx
-V1RBb3hjVUpLYkdSNE16UlRjSGR6VkVGTVVWWlFZalJvUjNkS2VscG1jakZRClkzQkZVWGcyZUUx
-dVZHdzRlRVZYV2tVelRYTTVPWFZoVlhoaVVYRkpkMUoxQ2t4blFVOXJUa050V1RKdE9EbFdhSHBo
-U0VveGRWWTQKTlVGa1RTOTBSQ3RaYzIxc2JtNXFkRGxNVWtObGFtSkNhWEJxU1VkcVQxaHlaekZL
-VUN0c2VGWUtiWFZOTkhaSUsxQXZiV3h0ZUhOUQpVSG93WkRZMVlpdEZSMjFLV25CdlRHdFBMM1Jr
-VGs1MlExbDZha3B3VkVWWGNFVnpUelpPVFdoTFdXODlDaTB0TFMwdFJVNUVJRU5GClVsUkpSa2xE
-UVZSRkxTMHRMUzBLCg==
\ No newline at end of file
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithNonBase64Part.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithNonBase64Part.base64
deleted file mode 100644
index 5c23f61..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithNonBase64Part.base64
+++ /dev/null
@@ -1,86 +0,0 @@
-TUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5
-PXtib3VuZGFyeX07IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogOGJp
-dAoKLS17Ym91bmRhcnl9CkNvbnRlbnQtVHlwZTogYXBwbGljYXRpb24veC1wYXNzcG9pbnQtcHJv
-ZmlsZTsgY2hhcnNldD1VVEYtOApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNlNjQKClBF
-MW5iWFJVY21WbElIaHRiRzV6UFNKemVXNWpiV3c2Wkcxa1pHWXhMaklpUGdvZ0lEeFdaWEpFVkVR
-K01TNHlQQzlXWlhKRVZFUSsKQ2lBZ1BFNXZaR1UrQ2lBZ0lDQThUbTlrWlU1aGJXVStVR1Z5VUhK
-dmRtbGtaWEpUZFdKelkzSnBjSFJwYjI0OEwwNXZaR1ZPWVcxbApQZ29nSUNBZ1BGSlVVSEp2Y0dW
-eWRHbGxjejRLSUNBZ0lDQWdQRlI1Y0dVK0NpQWdJQ0FnSUNBZ1BFUkVSazVoYldVK2RYSnVPbmRt
-CllUcHRienBvYjNSemNHOTBNbVJ2ZERBdGNHVnljSEp2ZG1sa1pYSnpkV0p6WTNKcGNIUnBiMjQ2
-TVM0d1BDOUVSRVpPWVcxbFBnb2cKSUNBZ0lDQThMMVI1Y0dVK0NpQWdJQ0E4TDFKVVVISnZjR1Z5
-ZEdsbGN6NEtJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQThUbTlrWlU1aApiV1UrYVRBd01Ud3ZUbTlr
-WlU1aGJXVStDaUFnSUNBZ0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUR4T2IyUmxUbUZ0WlQ1SWIyMWxV
-MUE4CkwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZa
-R1ZPWVcxbFBrWnlhV1Z1Wkd4NVRtRnQKWlR3dlRtOWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQThW
-bUZzZFdVK1JYaGhiWEJzWlNCT1pYUjNiM0pyUEM5V1lXeDFaVDRLSUNBZwpJQ0FnSUNBOEwwNXZa
-R1UrQ2lBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrUmxGRVRq
-d3ZUbTlrClpVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBOFZtRnNkV1UrYUc5MGMzQnZkQzVsZUdGdGNH
-eGxMbTVsZER3dlZtRnNkV1UrQ2lBZ0lDQWcKSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUR4T2Iy
-UmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVk9ZVzFsUGxKdllXMXBibWREYjI1egpiM0owYVhWdFQw
-azhMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQakV4TWpJek15dzBORFUxTmpZ
-OEwxWmhiSFZsClBnb2dJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNB
-Z0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBOFRtOWsKWlU1aGJXVStRM0psWkdWdWRHbGhiRHd2VG05
-a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0E4VG05awpaVTVoYldV
-K1VtVmhiRzA4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ1BGWmhiSFZsUG1WNFlXMXdiR1V1
-WTI5dFBDOVdZV3gxClpUNEtJQ0FnSUNBZ0lDQThMMDV2WkdVK0NpQWdJQ0FnSUNBZ1BFNXZaR1Ur
-Q2lBZ0lDQWdJQ0FnSUNBOFRtOWtaVTVoYldVK1ZYTmwKY201aGJXVlFZWE56ZDI5eVpEd3ZUbTlr
-WlU1aGJXVStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEU1dgpaR1ZP
-WVcxbFBsVnpaWEp1WVcxbFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQ
-blZ6WlhJOEwxWmhiSFZsClBnb2dJQ0FnSUNBZ0lDQWdQQzlPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdQ
-RTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJSbFRtRnQKWlQ1UVlYTnpkMjl5WkR3dlRtOWta
-VTVoYldVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhXWVd4MVpUNWpSMFo2WXpOa2RtTnRVVDA4TDFaaApi
-SFZsUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZaR1UrQ2lBZ0lD
-QWdJQ0FnSUNBZ0lEeE9iMlJsClRtRnRaVDVGUVZCTlpYUm9iMlE4TDA1dlpHVk9ZVzFsUGdvZ0lD
-QWdJQ0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWcKSUNBOFRtOWtaVTVoYldVK1JV
-RlFWSGx3WlR3dlRtOWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQakl4UEM5
-VwpZV3gxWlQ0S0lDQWdJQ0FnSUNBZ0lDQWdQQzlPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4VG05
-a1pUNEtJQ0FnSUNBZ0lDQWdJQ0FnCklDQThUbTlrWlU1aGJXVStTVzV1WlhKTlpYUm9iMlE4TDA1
-dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNBZ0lDQWdJRHhXWVd4MVpUNU4KVXkxRFNFRlFMVll5UEM5
-V1lXeDFaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BDOU9iMlJs
-UGdvZwpJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0Fn
-SUR4T2IyUmxUbUZ0WlQ1RWFXZHBkR0ZzClEyVnlkR2xtYVdOaGRHVThMMDV2WkdWT1lXMWxQZ29n
-SUNBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0FnSUR4T2IyUmwKVG1GdFpUNURaWEow
-YVdacFkyRjBaVlI1Y0dVOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4Vm1Gc2RXVStl
-RFV3T1hZegpQQzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUNBZ0lDQWdJ
-RHhPYjJSbFBnb2dJQ0FnSUNBZ0lDQWdJQ0E4ClRtOWtaVTVoYldVK1EyVnlkRk5JUVRJMU5rWnBi
-bWRsY25CeWFXNTBQQzlPYjJSbFRtRnRaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BGWmgKYkhWbFBqRm1N
-V1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1X
-WXhaakZtTVdZeApaakZtTVdZeFpqRm1NV1k4TDFaaGJIVmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2Iy
-UmxQZ29nSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnCklDQWdJQ0E4VG05a1pUNEtJQ0FnSUNBZ0lD
-QWdJRHhPYjJSbFRtRnRaVDVUU1UwOEwwNXZaR1ZPWVcxbFBnb2dJQ0FnSUNBZ0lDQWcKUEU1dlpH
-VStDaUFnSUNBZ0lDQWdJQ0FnSUR4T2IyUmxUbUZ0WlQ1SlRWTkpQQzlPYjJSbFRtRnRaVDRLSUNB
-Z0lDQWdJQ0FnSUNBZwpQRlpoYkhWbFBqRXlNelExTmlvOEwxWmhiSFZsUGdvZ0lDQWdJQ0FnSUNB
-Z1BDOU9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ1BFNXZaR1UrCkNpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJS
-bFRtRnRaVDVGUVZCVWVYQmxQQzlPYjJSbFRtRnRaVDRLSUNBZ0lDQWdJQ0FnSUNBZ1BGWmgKYkhW
-bFBqSXpQQzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUNBZ0lDQThMMDV2
-WkdVK0NpQWdJQ0FnSUR3dgpUbTlrWlQ0S0lDQWdJRHd2VG05a1pUNEtJQ0E4TDA1dlpHVStDand2
-VFdkdGRGUnlaV1UrCgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXg1
-MDktY2EtY2VydApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNlNjQKCkxTMHRMUzFDUlVk
-SlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVVJMUkVORFFXaERaMEYzU1VKQlowbEtRVWxN
-YkVaa2QzcE0KVm5WeVRVRXdSME5UY1VkVFNXSXpSRkZGUWtOM1ZVRk5Ra2w0UlVSQlQwSm5UbFlL
-UWtGTlZFSXdWa0pWUTBKRVVWUkZkMGhvWTA1TgpWRmwzVFZSRmVVMVVSVEZOUkVVeFYyaGpUazFx
-V1hkTlZFRTFUVlJGTVUxRVJURlhha0ZUVFZKQmR3cEVaMWxFVmxGUlJFVjNaRVpSClZrRm5VVEJG
-ZUUxSlNVSkpha0ZPUW1kcmNXaHJhVWM1ZHpCQ1FWRkZSa0ZCVDBOQlVUaEJUVWxKUWtOblMwTkJV
-VVZCQ25wdVFWQlYKZWpJMlRYTmhaVFIzY3pRelkzcFNOREV2U2pKUmRISlRTVnBWUzIxV1ZYTldk
-VzFFWWxsSWNsQk9kbFJZUzFOTldFRmpaWGRQVWtSUgpXVmdLVW5GMlNIWndiamhEYzJOQ01TdHZS
-MWhhZGtoM2VHbzBlbFl3VjB0dlN6SjZaVmhyWVhVemRtTjViRE5JU1V0MWNFcG1jVEpVClJVRkRa
-V1pXYW1vd2RBcEtWeXRZTXpWUVIxZHdPUzlJTlhwSlZVNVdUbFpxVXpkVmJYTTRORWwyUzJoU1Fq
-ZzFNVEpRUWpsVmVVaGgKWjFoWlZsZzFSMWR3UVdOV2NIbG1jbXhTQ2taSk9WRmthR2dyVUdKck1I
-VjVhM1JrWW1ZdlEyUm1aMGhQYjJWaWNsUjBkMUpzYWswdwpiMFIwV0NzeVEzWTJhakIzUWtzM2FF
-UTRjRkIyWmpFcmRYa0tSM3BqZW1sblFWVXZORXQzTjJWYWNYbGtaamxDS3pWU2RYQlNLMGxhCmFY
-QllOREY0UldsSmNrdFNkM0ZwTlRFM1YxZDZXR05xWVVjeVkwNWlaalExTVFwNGNFZzFVRzVXTTJr
-eGRIRXdOR3BOUjFGVmVrWjMKU1VSQlVVRkNielJIUVUxSU5IZElVVmxFVmxJd1QwSkNXVVZHU1hk
-WU5IWnpPRUpwUW1OVFkyOWtDalZ1YjFwSVVrMDRSVFFyYVUxRgpTVWRCTVZWa1NYZFJOMDFFYlVG
-R1NYZFlOSFp6T0VKcFFtTlRZMjlrTlc1dldraFNUVGhGTkN0cGIxSmhhMFpFUVZNS1RWSkJkMFJu
-CldVUldVVkZFUlhka1JsRldRV2RSTUVWNFoyZHJRV2QxVlZZelJFMTBWelp6ZDBSQldVUldVakJV
-UWtGVmQwRjNSVUl2ZWtGTVFtZE8KVmdwSVVUaEZRa0ZOUTBGUldYZEVVVmxLUzI5YVNXaDJZMDVC
-VVVWTVFsRkJSR2RuUlVKQlJtWlJjVTlVUVRkU2RqZExLMngxVVRkdwpibUZ6TkVKWmQwaEZDamxI
-UlZBdmRXOW9kalpMVDNrd1ZFZFJSbUp5VWxScVJtOU1WazVDT1VKYU1YbHRUVVJhTUM5VVNYZEpW
-V00zCmQyazNZVGgwTlcxRmNWbElNVFV6ZDFjS1lWZHZiMmxUYW5sTVRHaDFTVFJ6VG5KT1EwOTBh
-WE5rUW5FeWNqSk5SbGgwTm1nd2JVRlIKV1U5UWRqaFNPRXMzTDJablUzaEhSbkY2YUhsT2JXMVdU
-QW94Y1VKS2JHUjRNelJUY0hkelZFRk1VVlpRWWpSb1IzZEtlbHBtY2pGUQpZM0JGVVhnMmVFMXVW
-R3c0ZUVWWFdrVXpUWE01T1hWaFZYaGlVWEZKZDFKMUNreG5RVTlyVGtOdFdUSnRPRGxXYUhwaFNF
-b3hkVlk0Ck5VRmtUUzkwUkN0WmMyMXNibTVxZERsTVVrTmxhbUpDYVhCcVNVZHFUMWh5WnpGS1VD
-dHNlRllLYlhWTk5IWklLMUF2Yld4dGVITlEKVUhvd1pEWTFZaXRGUjIxS1duQnZUR3RQTDNSa1Rr
-NTJRMWw2YWtwd1ZFVlhjRVZ6VHpaT1RXaExXVzg5Q2kwdExTMHRSVTVFSUVORgpVbFJKUmtsRFFW
-UkZMUzB0TFMwSwotLXtib3VuZGFyeX0tLQo=
\ No newline at end of file
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithUpdateIdentifier.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithUpdateIdentifier.base64
deleted file mode 100644
index bab7607..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithUpdateIdentifier.base64
+++ /dev/null
@@ -1,88 +0,0 @@
-TUlNRS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5
-PXtib3VuZGFyeX07IGNoYXJzZXQ9VVRGLTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFz
-ZTY0CgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBhcHBsaWNhdGlvbi94LXBhc3Nwb2ludC1w
-cm9maWxlOyBjaGFyc2V0PVVURi04CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NAoK
-UEUxbmJYUlVjbVZsSUhodGJHNXpQU0p6ZVc1amJXdzZaRzFrWkdZeExqSWlQZ29nSUR4V1pYSkVW
-RVErTVM0eVBDOVdaWEpFVkVRKwpDaUFnUEU1dlpHVStDaUFnSUNBOFRtOWtaVTVoYldVK1VHVnlV
-SEp2ZG1sa1pYSlRkV0p6WTNKcGNIUnBiMjQ4TDA1dlpHVk9ZVzFsClBnb2dJQ0FnUEZKVVVISnZj
-R1Z5ZEdsbGN6NEtJQ0FnSUNBZ1BGUjVjR1UrQ2lBZ0lDQWdJQ0FnUEVSRVJrNWhiV1UrZFhKdU9u
-ZG0KWVRwdGJ6cG9iM1J6Y0c5ME1tUnZkREF0Y0dWeWNISnZkbWxrWlhKemRXSnpZM0pwY0hScGIy
-NDZNUzR3UEM5RVJFWk9ZVzFsUGdvZwpJQ0FnSUNBOEwxUjVjR1UrQ2lBZ0lDQThMMUpVVUhKdmNH
-VnlkR2xsY3o0S0lDQWdJRHhPYjJSbFBnb2dJQ0FnSUNBOFRtOWtaVTVoCmJXVStWWEJrWVhSbFNX
-UmxiblJwWm1sbGNqd3ZUbTlrWlU1aGJXVStDaUFnSUNBZ0lEeFdZV3gxWlQ0eE1qTTBQQzlXWVd4
-MVpUNEsKSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJRHhPYjJSbFBnb2dJQ0FnSUNBOFRtOWtaVTVoYldV
-K2FUQXdNVHd2VG05a1pVNWhiV1UrQ2lBZwpJQ0FnSUR4T2IyUmxQZ29nSUNBZ0lDQWdJRHhPYjJS
-bFRtRnRaVDVJYjIxbFUxQThMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJRHhPCmIyUmxQZ29nSUNB
-Z0lDQWdJQ0FnUEU1dlpHVk9ZVzFsUGtaeWFXVnVaR3g1VG1GdFpUd3ZUbTlrWlU1aGJXVStDaUFn
-SUNBZ0lDQWcKSUNBOFZtRnNkV1UrUlhoaGJYQnNaU0JPWlhSM2IzSnJQQzlXWVd4MVpUNEtJQ0Fn
-SUNBZ0lDQThMMDV2WkdVK0NpQWdJQ0FnSUNBZwpQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQThUbTlr
-WlU1aGJXVStSbEZFVGp3dlRtOWtaVTVoYldVK0NpQWdJQ0FnSUNBZ0lDQThWbUZzCmRXVSthRzkw
-YzNCdmRDNWxlR0Z0Y0d4bExtNWxkRHd2Vm1Gc2RXVStDaUFnSUNBZ0lDQWdQQzlPYjJSbFBnb2dJ
-Q0FnSUNBZ0lEeE8KYjJSbFBnb2dJQ0FnSUNBZ0lDQWdQRTV2WkdWT1lXMWxQbEp2WVcxcGJtZERi
-MjV6YjNKMGFYVnRUMGs4TDA1dlpHVk9ZVzFsUGdvZwpJQ0FnSUNBZ0lDQWdQRlpoYkhWbFBqRXhN
-akl6TXl3ME5EVTFOalk4TDFaaGJIVmxQZ29nSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnCklDQWdQ
-QzlPYjJSbFBnb2dJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrUTNKbFpH
-VnVkR2xoYkR3dlRtOWsKWlU1aGJXVStDaUFnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lD
-QThUbTlrWlU1aGJXVStVbVZoYkcwOEwwNXZaR1ZPWVcxbApQZ29nSUNBZ0lDQWdJQ0FnUEZaaGJI
-VmxQbVY0WVcxd2JHVXVZMjl0UEM5V1lXeDFaVDRLSUNBZ0lDQWdJQ0E4TDA1dlpHVStDaUFnCklD
-QWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrVlhObGNtNWhiV1ZRWVhO
-emQyOXlaRHd2VG05a1pVNWgKYldVK0NpQWdJQ0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNB
-Z0lDQWdQRTV2WkdWT1lXMWxQbFZ6WlhKdVlXMWxQQzlPYjJSbApUbUZ0WlQ0S0lDQWdJQ0FnSUNB
-Z0lDQWdQRlpoYkhWbFBuVnpaWEk4TDFaaGJIVmxQZ29nSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29n
-CklDQWdJQ0FnSUNBZ1BFNXZaR1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE9iMlJsVG1GdFpUNVFZWE56
-ZDI5eVpEd3ZUbTlrWlU1aGJXVSsKQ2lBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1alIwWjZZek5r
-ZG1OdFVUMDhMMVpoYkhWbFBnb2dJQ0FnSUNBZ0lDQWdQQzlPYjJSbApQZ29nSUNBZ0lDQWdJQ0Fn
-UEU1dlpHVStDaUFnSUNBZ0lDQWdJQ0FnSUR4T2IyUmxUbUZ0WlQ1RlFWQk5aWFJvYjJROEwwNXZa
-R1ZPCllXMWxQZ29nSUNBZ0lDQWdJQ0FnSUNBOFRtOWtaVDRLSUNBZ0lDQWdJQ0FnSUNBZ0lDQThU
-bTlrWlU1aGJXVStSVUZRVkhsd1pUd3YKVG05a1pVNWhiV1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lDQWdQ
-RlpoYkhWbFBqSXhQQzlXWVd4MVpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEM5TwpiMlJsUGdvZ0lDQWdJ
-Q0FnSUNBZ0lDQThUbTlrWlQ0S0lDQWdJQ0FnSUNBZ0lDQWdJQ0E4VG05a1pVNWhiV1UrU1c1dVpY
-Sk5aWFJvCmIyUThMMDV2WkdWT1lXMWxQZ29nSUNBZ0lDQWdJQ0FnSUNBZ0lEeFdZV3gxWlQ1TlV5
-MURTRUZRTFZZeVBDOVdZV3gxWlQ0S0lDQWcKSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lD
-QWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUNBZwpJQ0E4VG05a1pU
-NEtJQ0FnSUNBZ0lDQWdJRHhPYjJSbFRtRnRaVDVFYVdkcGRHRnNRMlZ5ZEdsbWFXTmhkR1U4TDA1
-dlpHVk9ZVzFsClBnb2dJQ0FnSUNBZ0lDQWdQRTV2WkdVK0NpQWdJQ0FnSUNBZ0lDQWdJRHhPYjJS
-bFRtRnRaVDVEWlhKMGFXWnBZMkYwWlZSNWNHVTgKTDA1dlpHVk9ZVzFsUGdvZ0lDQWdJQ0FnSUNB
-Z0lDQThWbUZzZFdVK2VEVXdPWFl6UEM5V1lXeDFaVDRLSUNBZ0lDQWdJQ0FnSUR3dgpUbTlrWlQ0
-S0lDQWdJQ0FnSUNBZ0lEeE9iMlJsUGdvZ0lDQWdJQ0FnSUNBZ0lDQThUbTlrWlU1aGJXVStRMlZ5
-ZEZOSVFUSTFOa1pwCmJtZGxjbkJ5YVc1MFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0Fn
-UEZaaGJIVmxQakZtTVdZeFpqRm1NV1l4WmpGbU1XWXgKWmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4
-WmpGbU1XWXhaakZtTVdZeFpqRm1NV1l4WmpGbU1XWXhaakZtTVdZOEwxWmhiSFZsUGdvZwpJQ0Fn
-SUNBZ0lDQWdQQzlPYjJSbFBnb2dJQ0FnSUNBZ0lEd3ZUbTlrWlQ0S0lDQWdJQ0FnSUNBOFRtOWta
-VDRLSUNBZ0lDQWdJQ0FnCklEeE9iMlJsVG1GdFpUNVRTVTA4TDA1dlpHVk9ZVzFsUGdvZ0lDQWdJ
-Q0FnSUNBZ1BFNXZaR1UrQ2lBZ0lDQWdJQ0FnSUNBZ0lEeE8KYjJSbFRtRnRaVDVKVFZOSlBDOU9i
-MlJsVG1GdFpUNEtJQ0FnSUNBZ0lDQWdJQ0FnUEZaaGJIVmxQakV5TXpRMU5pbzhMMVpoYkhWbApQ
-Z29nSUNBZ0lDQWdJQ0FnUEM5T2IyUmxQZ29nSUNBZ0lDQWdJQ0FnUEU1dlpHVStDaUFnSUNBZ0lD
-QWdJQ0FnSUR4T2IyUmxUbUZ0ClpUNUZRVkJVZVhCbFBDOU9iMlJsVG1GdFpUNEtJQ0FnSUNBZ0lD
-QWdJQ0FnUEZaaGJIVmxQakl6UEM5V1lXeDFaVDRLSUNBZ0lDQWcKSUNBZ0lEd3ZUbTlrWlQ0S0lD
-QWdJQ0FnSUNBOEwwNXZaR1UrQ2lBZ0lDQWdJRHd2VG05a1pUNEtJQ0FnSUR3dlRtOWtaVDRLSUNB
-OApMMDV2WkdVK0Nqd3ZUV2R0ZEZSeVpXVSsKCi0te2JvdW5kYXJ5fQpDb250ZW50LVR5cGU6IGFw
-cGxpY2F0aW9uL3gteDUwOS1jYS1jZXJ0CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2
-NAoKTFMwdExTMUNSVWRKVGlCRFJWSlVTVVpKUTBGVVJTMHRMUzB0Q2sxSlNVUkxSRU5EUVdoRFow
-RjNTVUpCWjBsS1FVbE1iRVprZDNwTQpWblZ5VFVFd1IwTlRjVWRUU1dJelJGRkZRa04zVlVGTlFr
-bDRSVVJCVDBKblRsWUtRa0ZOVkVJd1ZrSlZRMEpFVVZSRmQwaG9ZMDVOClZGbDNUVlJGZVUxVVJU
-Rk5SRVV4VjJoalRrMXFXWGROVkVFMVRWUkZNVTFFUlRGWGFrRlRUVkpCZHdwRVoxbEVWbEZSUkVW
-M1pFWlIKVmtGblVUQkZlRTFKU1VKSmFrRk9RbWRyY1docmFVYzVkekJDUVZGRlJrRkJUME5CVVRo
-QlRVbEpRa05uUzBOQlVVVkJDbnB1UVZCVgplakkyVFhOaFpUUjNjelF6WTNwU05ERXZTakpSZEhK
-VFNWcFZTMjFXVlhOV2RXMUVZbGxJY2xCT2RsUllTMU5OV0VGalpYZFBVa1JSCldWZ0tVbkYyU0ha
-d2JqaERjMk5DTVN0dlIxaGFka2gzZUdvMGVsWXdWMHR2U3pKNlpWaHJZWFV6ZG1ONWJETklTVXQx
-Y0VwbWNUSlUKUlVGRFpXWldhbW93ZEFwS1Z5dFlNelZRUjFkd09TOUlOWHBKVlU1V1RsWnFVemRW
-YlhNNE5FbDJTMmhTUWpnMU1USlFRamxWZVVoaApaMWhaVmxnMVIxZHdRV05XY0hsbWNteFNDa1pK
-T1ZGa2FHZ3JVR0pyTUhWNWEzUmtZbVl2UTJSbVowaFBiMlZpY2xSMGQxSnNhazB3CmIwUjBXQ3N5
-UTNZMmFqQjNRa3MzYUVRNGNGQjJaakVyZFhrS1IzcGplbWxuUVZVdk5FdDNOMlZhY1hsa1pqbENL
-elZTZFhCU0swbGEKYVhCWU5ERjRSV2xKY2t0U2QzRnBOVEUzVjFkNldHTnFZVWN5WTA1aVpqUTFN
-UXA0Y0VnMVVHNVdNMmt4ZEhFd05HcE5SMUZWZWtaMwpTVVJCVVVGQ2J6UkhRVTFJTkhkSVVWbEVW
-bEl3VDBKQ1dVVkdTWGRZTkhaek9FSnBRbU5UWTI5a0NqVnViMXBJVWswNFJUUXJhVTFGClNVZEJN
-VlZrU1hkUk4wMUViVUZHU1hkWU5IWnpPRUpwUW1OVFkyOWtOVzV2V2toU1RUaEZOQ3RwYjFKaGEw
-WkVRVk1LVFZKQmQwUm4KV1VSV1VWRkVSWGRrUmxGV1FXZFJNRVY0WjJkclFXZDFWVll6UkUxMFZ6
-WnpkMFJCV1VSV1VqQlVRa0ZWZDBGM1JVSXZla0ZNUW1kTwpWZ3BJVVRoRlFrRk5RMEZSV1hkRVVW
-bEtTMjlhU1doMlkwNUJVVVZNUWxGQlJHZG5SVUpCUm1aUmNVOVVRVGRTZGpkTEsyeDFVVGR3CmJt
-RnpORUpaZDBoRkNqbEhSVkF2ZFc5b2RqWkxUM2t3VkVkUlJtSnlVbFJxUm05TVZrNUNPVUphTVhs
-dFRVUmFNQzlVU1hkSlZXTTMKZDJrM1lUaDBOVzFGY1ZsSU1UVXpkMWNLWVZkdmIybFRhbmxNVEdo
-MVNUUnpUbkpPUTA5MGFYTmtRbkV5Y2pKTlJsaDBObWd3YlVGUgpXVTlRZGpoU09FczNMMlpuVTNo
-SFJuRjZhSGxPYlcxV1RBb3hjVUpLYkdSNE16UlRjSGR6VkVGTVVWWlFZalJvUjNkS2VscG1jakZR
-ClkzQkZVWGcyZUUxdVZHdzRlRVZYV2tVelRYTTVPWFZoVlhoaVVYRkpkMUoxQ2t4blFVOXJUa050
-V1RKdE9EbFdhSHBoU0VveGRWWTQKTlVGa1RTOTBSQ3RaYzIxc2JtNXFkRGxNVWtObGFtSkNhWEJx
-U1VkcVQxaHlaekZLVUN0c2VGWUtiWFZOTkhaSUsxQXZiV3h0ZUhOUQpVSG93WkRZMVlpdEZSMjFL
-V25CdlRHdFBMM1JrVGs1MlExbDZha3B3VkVWWGNFVnpUelpPVFdoTFdXODlDaTB0TFMwdFJVNUVJ
-RU5GClVsUkpSa2xEUVZSRkxTMHRMUzBLCi0te2JvdW5kYXJ5fS0tCg==
\ No newline at end of file
diff --git a/wifi/tests/assets/hsr1/HSR1ProfileWithoutProfile.base64 b/wifi/tests/assets/hsr1/HSR1ProfileWithoutProfile.base64
deleted file mode 100644
index 833c527..0000000
--- a/wifi/tests/assets/hsr1/HSR1ProfileWithoutProfile.base64
+++ /dev/null
@@ -1,31 +0,0 @@
-Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PXtib3VuZGFyeX0KQ29udGVu
-dC1UcmFuc2Zlci1FbmNvZGluZzogYmFzZTY0CgotLXtib3VuZGFyeX0KQ29udGVudC1UeXBlOiBh
-cHBsaWNhdGlvbi94LXg1MDktY2EtY2VydApDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNl
-NjQKCkxTMHRMUzFDUlVkSlRpQkRSVkpVU1VaSlEwRlVSUzB0TFMwdENrMUpTVVJMUkVORFFXaERa
-MEYzU1VKQlowbEtRVWxNYkVaa2QzcE0KVm5WeVRVRXdSME5UY1VkVFNXSXpSRkZGUWtOM1ZVRk5R
-a2w0UlVSQlQwSm5UbFlLUWtGTlZFSXdWa0pWUTBKRVVWUkZkMGhvWTA1TgpWRmwzVFZSRmVVMVVS
-VEZOUkVVeFYyaGpUazFxV1hkTlZFRTFUVlJGTVUxRVJURlhha0ZUVFZKQmR3cEVaMWxFVmxGUlJF
-VjNaRVpSClZrRm5VVEJGZUUxSlNVSkpha0ZPUW1kcmNXaHJhVWM1ZHpCQ1FWRkZSa0ZCVDBOQlVU
-aEJUVWxKUWtOblMwTkJVVVZCQ25wdVFWQlYKZWpJMlRYTmhaVFIzY3pRelkzcFNOREV2U2pKUmRI
-SlRTVnBWUzIxV1ZYTldkVzFFWWxsSWNsQk9kbFJZUzFOTldFRmpaWGRQVWtSUgpXVmdLVW5GMlNI
-WndiamhEYzJOQ01TdHZSMWhhZGtoM2VHbzBlbFl3VjB0dlN6SjZaVmhyWVhVemRtTjViRE5JU1V0
-MWNFcG1jVEpVClJVRkRaV1pXYW1vd2RBcEtWeXRZTXpWUVIxZHdPUzlJTlhwSlZVNVdUbFpxVXpk
-VmJYTTRORWwyUzJoU1FqZzFNVEpRUWpsVmVVaGgKWjFoWlZsZzFSMWR3UVdOV2NIbG1jbXhTQ2ta
-Sk9WRmthR2dyVUdKck1IVjVhM1JrWW1ZdlEyUm1aMGhQYjJWaWNsUjBkMUpzYWswdwpiMFIwV0Nz
-eVEzWTJhakIzUWtzM2FFUTRjRkIyWmpFcmRYa0tSM3BqZW1sblFWVXZORXQzTjJWYWNYbGtaamxD
-S3pWU2RYQlNLMGxhCmFYQllOREY0UldsSmNrdFNkM0ZwTlRFM1YxZDZXR05xWVVjeVkwNWlaalEx
-TVFwNGNFZzFVRzVXTTJreGRIRXdOR3BOUjFGVmVrWjMKU1VSQlVVRkNielJIUVUxSU5IZElVVmxF
-VmxJd1QwSkNXVVZHU1hkWU5IWnpPRUpwUW1OVFkyOWtDalZ1YjFwSVVrMDRSVFFyYVUxRgpTVWRC
-TVZWa1NYZFJOMDFFYlVGR1NYZFlOSFp6T0VKcFFtTlRZMjlrTlc1dldraFNUVGhGTkN0cGIxSmhh
-MFpFUVZNS1RWSkJkMFJuCldVUldVVkZFUlhka1JsRldRV2RSTUVWNFoyZHJRV2QxVlZZelJFMTBW
-elp6ZDBSQldVUldVakJVUWtGVmQwRjNSVUl2ZWtGTVFtZE8KVmdwSVVUaEZRa0ZOUTBGUldYZEVV
-VmxLUzI5YVNXaDJZMDVCVVVWTVFsRkJSR2RuUlVKQlJtWlJjVTlVUVRkU2RqZExLMngxVVRkdwpi
-bUZ6TkVKWmQwaEZDamxIUlZBdmRXOW9kalpMVDNrd1ZFZFJSbUp5VWxScVJtOU1WazVDT1VKYU1Y
-bHRUVVJhTUM5VVNYZEpWV00zCmQyazNZVGgwTlcxRmNWbElNVFV6ZDFjS1lWZHZiMmxUYW5sTVRH
-aDFTVFJ6VG5KT1EwOTBhWE5rUW5FeWNqSk5SbGgwTm1nd2JVRlIKV1U5UWRqaFNPRXMzTDJablUz
-aEhSbkY2YUhsT2JXMVdUQW94Y1VKS2JHUjRNelJUY0hkelZFRk1VVlpRWWpSb1IzZEtlbHBtY2pG
-UQpZM0JGVVhnMmVFMXVWR3c0ZUVWWFdrVXpUWE01T1hWaFZYaGlVWEZKZDFKMUNreG5RVTlyVGtO
-dFdUSnRPRGxXYUhwaFNFb3hkVlk0Ck5VRmtUUzkwUkN0WmMyMXNibTVxZERsTVVrTmxhbUpDYVhC
-cVNVZHFUMWh5WnpGS1VDdHNlRllLYlhWTk5IWklLMUF2Yld4dGVITlEKVUhvd1pEWTFZaXRGUjIx
-S1duQnZUR3RQTDNSa1RrNTJRMWw2YWtwd1ZFVlhjRVZ6VHpaT1RXaExXVzg5Q2kwdExTMHRSVTVF
-SUVORgpVbFJKUmtsRFFWUkZMUzB0TFMwSwotLXtib3VuZGFyeX0tLQo=
diff --git a/wifi/tests/assets/hsr1/README.txt b/wifi/tests/assets/hsr1/README.txt
deleted file mode 100644
index 9f3cdc2..0000000
--- a/wifi/tests/assets/hsr1/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-HSR1ProfileWithCACert.conf - unencoded installation file that contains a Passpoint profile and a CA Certificate
-HSR1ProfileWithCACert.base64 - base64 encoded of the data contained in HSR1ProfileWithCAWith.conf
-HSR1ProfileWithNonBase64Part.base64 - base64 encoded installation file that contains a part of non-base64 encoding type
-HSR1ProfileWithMissingBoundary.base64 - base64 encoded installation file with missing end-boundary in the MIME data
-HSR1ProfileWithInvalidContentType.base64 - base64 encoded installation file with that contains a MIME part with an invalid content type
-HSR1ProfileWithUpdateIdentifier.base64 - base64 encoded installation file with that contains an R2 update identifier
diff --git a/wifi/tests/assets/pps/PerProviderSubscription.xml b/wifi/tests/assets/pps/PerProviderSubscription.xml
deleted file mode 100644
index e9afb35..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription.xml
+++ /dev/null
@@ -1,430 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>UpdateIdentifier</NodeName>
-      <Value>12</Value>
-    </Node>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>Extension</NodeName>
-        <Node>
-          <NodeName>VendorSpecific</NodeName>
-          <Value>Test</Value>
-        </Node>
-        <Node>
-          <NodeName>VendorExtension</NodeName>
-          <Node>
-            <NodeName>VendorAttribute</NodeName>
-            <Value>VendorValue</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>Android</NodeName>
-          <Node>
-            <NodeName>AAAServerTrustedNames</NodeName>
-            <Node>
-              <NodeName>FQDN</NodeName>
-              <Value>trusted.fqdn.com;another-trusted.fqdn.com</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>NewSubTree</NodeName>
-            <Node>
-              <NodeName>NewAttribute</NodeName>
-              <Value>NewValue</Value>
-            </Node>
-          </Node>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-        <Node>
-          <NodeName>IconURL</NodeName>
-          <Value>icon.test.com</Value>
-        </Node>
-        <Node>
-          <NodeName>NetworkID</NodeName>
-          <Node>
-            <NodeName>n001</NodeName>
-            <Node>
-              <NodeName>SSID</NodeName>
-              <Value>TestSSID</Value>
-            </Node>
-            <Node>
-              <NodeName>HESSID</NodeName>
-              <Value>12345678</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>n002</NodeName>
-            <Node>
-              <NodeName>SSID</NodeName>
-              <Value>NullHESSID</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>HomeOIList</NodeName>
-          <Node>
-            <NodeName>h001</NodeName>
-            <Node>
-              <NodeName>HomeOI</NodeName>
-              <Value>11223344</Value>
-            </Node>
-            <Node>
-              <NodeName>HomeOIRequired</NodeName>
-              <Value>true</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>h002</NodeName>
-            <Node>
-              <NodeName>HomeOI</NodeName>
-              <Value>55667788</Value>
-            </Node>
-            <Node>
-              <NodeName>HomeOIRequired</NodeName>
-              <Value>false</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>OtherHomePartners</NodeName>
-          <Node>
-            <NodeName>o001</NodeName>
-            <Node>
-              <NodeName>FQDN</NodeName>
-              <Value>other.fqdn.com</Value>
-            </Node>
-          </Node>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>CreationDate</NodeName>
-          <Value>2016-01-01T10:00:00Z</Value>
-        </Node>
-        <Node>
-          <NodeName>ExpirationDate</NodeName>
-          <Value>2016-02-01T10:00:00Z</Value>
-        </Node>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>CheckAAAServerCertStatus</NodeName>
-          <Value>true</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>MachineManaged</NodeName>
-            <Value>true</Value>
-          </Node>
-          <Node>
-            <NodeName>SoftTokenApp</NodeName>
-            <Value>TestApp</Value>
-          </Node>
-          <Node>
-            <NodeName>AbleToShare</NodeName>
-            <Value>true</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256Fingerprint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Policy</NodeName>
-        <Node>
-          <NodeName>PreferredRoamingPartnerList</NodeName>
-          <Node>
-            <NodeName>p001</NodeName>
-            <Node>
-              <NodeName>FQDN_Match</NodeName>
-              <Value>test1.fqdn.com,exactMatch</Value>
-            </Node>
-            <Node>
-              <NodeName>Priority</NodeName>
-              <Value>127</Value>
-            </Node>
-            <Node>
-              <NodeName>Country</NodeName>
-              <Value>us,fr</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>p002</NodeName>
-            <Node>
-              <NodeName>FQDN_Match</NodeName>
-              <Value>test2.fqdn.com,includeSubdomains</Value>
-            </Node>
-            <Node>
-              <NodeName>Priority</NodeName>
-              <Value>200</Value>
-            </Node>
-            <Node>
-              <NodeName>Country</NodeName>
-              <Value>*</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>MinBackhaulThreshold</NodeName>
-          <Node>
-            <NodeName>m001</NodeName>
-            <Node>
-              <NodeName>NetworkType</NodeName>
-              <Value>home</Value>
-            </Node>
-            <Node>
-              <NodeName>DLBandwidth</NodeName>
-              <Value>23412</Value>
-            </Node>
-            <Node>
-              <NodeName>ULBandwidth</NodeName>
-              <Value>9823</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>m002</NodeName>
-            <Node>
-              <NodeName>NetworkType</NodeName>
-              <Value>roaming</Value>
-            </Node>
-            <Node>
-              <NodeName>DLBandwidth</NodeName>
-              <Value>9271</Value>
-            </Node>
-            <Node>
-              <NodeName>ULBandwidth</NodeName>
-              <Value>2315</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>PolicyUpdate</NodeName>
-          <Node>
-            <NodeName>UpdateInterval</NodeName>
-            <Value>120</Value>
-          </Node>
-          <Node>
-            <NodeName>UpdateMethod</NodeName>
-            <Value>OMA-DM-ClientInitiated</Value>
-          </Node>
-          <Node>
-            <NodeName>Restriction</NodeName>
-            <Value>HomeSP</Value>
-          </Node>
-          <Node>
-            <NodeName>URI</NodeName>
-            <Value>policy.update.com</Value>
-          </Node>
-          <Node>
-            <NodeName>UsernamePassword</NodeName>
-            <Node>
-              <NodeName>Username</NodeName>
-              <Value>updateUser</Value>
-            </Node>
-            <Node>
-              <NodeName>Password</NodeName>
-              <Value>updatePass</Value>
-            </Node>
-          </Node>
-          <Node>
-            <NodeName>TrustRoot</NodeName>
-            <Node>
-              <NodeName>CertURL</NodeName>
-              <Value>update.cert.com</Value>
-            </Node>
-            <Node>
-              <NodeName>CertSHA256Fingerprint</NodeName>
-              <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SPExclusionList</NodeName>
-          <Node>
-            <NodeName>s001</NodeName>
-            <Node>
-              <NodeName>SSID</NodeName>
-              <Value>excludeSSID</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>RequiredProtoPortTuple</NodeName>
-          <Node>
-            <NodeName>r001</NodeName>
-            <Node>
-              <NodeName>IPProtocol</NodeName>
-              <Value>12</Value>
-            </Node>
-            <Node>
-              <NodeName>PortNumber</NodeName>
-              <Value>34,92,234</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>MaximumBSSLoadValue</NodeName>
-          <Value>23</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>CredentialPriority</NodeName>
-        <Value>99</Value>
-      </Node>
-      <Node>
-        <NodeName>AAAServerTrustRoot</NodeName>
-        <Node>
-          <NodeName>a001</NodeName>
-          <Node>
-            <NodeName>CertURL</NodeName>
-            <Value>server1.trust.root.com</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256Fingerprint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>SubscriptionUpdate</NodeName>
-        <Node>
-          <NodeName>UpdateInterval</NodeName>
-          <Value>120</Value>
-        </Node>
-        <Node>
-          <NodeName>UpdateMethod</NodeName>
-          <Value>SSP-ClientInitiated</Value>
-        </Node>
-        <Node>
-          <NodeName>Restriction</NodeName>
-          <Value>RoamingPartner</Value>
-        </Node>
-        <Node>
-          <NodeName>URI</NodeName>
-          <Value>subscription.update.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>subscriptionUser</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>subscriptionPass</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>TrustRoot</NodeName>
-          <Node>
-            <NodeName>CertURL</NodeName>
-            <Value>subscription.update.cert.com</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256Fingerprint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>SubscriptionParameters</NodeName>
-        <Node>
-          <NodeName>CreationDate</NodeName>
-          <Value>2016-02-01T10:00:00Z</Value>
-        </Node>
-        <Node>
-          <NodeName>ExpirationDate</NodeName>
-          <Value>2016-03-01T10:00:00Z</Value>
-        </Node>
-        <Node>
-          <NodeName>TypeOfSubscription</NodeName>
-          <Value>Gold</Value>
-        </Node>
-        <Node>
-          <NodeName>UsageLimits</NodeName>
-          <Node>
-            <NodeName>DataLimit</NodeName>
-            <Value>921890</Value>
-          </Node>
-          <Node>
-            <NodeName>StartDate</NodeName>
-            <Value>2016-12-01T10:00:00Z</Value>
-          </Node>
-          <Node>
-            <NodeName>TimeLimit</NodeName>
-            <Value>120</Value>
-          </Node>
-          <Node>
-            <NodeName>UsageTimePeriod</NodeName>
-            <Value>99910</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_DuplicateHomeSP.xml b/wifi/tests/assets/pps/PerProviderSubscription_DuplicateHomeSP.xml
deleted file mode 100644
index e13eb2a..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_DuplicateHomeSP.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_DuplicateValue.xml b/wifi/tests/assets/pps/PerProviderSubscription_DuplicateValue.xml
deleted file mode 100644
index 8719ffa..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_DuplicateValue.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_InvalidName.xml b/wifi/tests/assets/pps/PerProviderSubscription_InvalidName.xml
deleted file mode 100644
index c761237..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_InvalidName.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_InvalidNode.xml b/wifi/tests/assets/pps/PerProviderSubscription_InvalidNode.xml
deleted file mode 100644
index 6b807af..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_InvalidNode.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-          <Node>
-            <NodeName>InvalidNode</NodeName>
-            <Value>Test</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_MissingName.xml b/wifi/tests/assets/pps/PerProviderSubscription_MissingName.xml
deleted file mode 100644
index ed06b47..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_MissingName.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-          <Value>Century House</Value>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/PerProviderSubscription_MissingValue.xml b/wifi/tests/assets/pps/PerProviderSubscription_MissingValue.xml
deleted file mode 100644
index f7e35dd..0000000
--- a/wifi/tests/assets/pps/PerProviderSubscription_MissingValue.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<MgmtTree xmlns="syncml:dmddf1.2">
-  <VerDTD>1.2</VerDTD>
-  <Node>
-    <NodeName>PerProviderSubscription</NodeName>
-    <RTProperties>
-      <Type>
-        <DDFName>urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0</DDFName>
-      </Type>
-    </RTProperties>
-    <Node>
-      <NodeName>i001</NodeName>
-      <Node>
-        <NodeName>HomeSP</NodeName>
-        <Node>
-          <NodeName>FriendlyName</NodeName>
-        </Node>
-        <Node>
-          <NodeName>FQDN</NodeName>
-          <Value>mi6.co.uk</Value>
-        </Node>
-        <Node>
-          <NodeName>RoamingConsortiumOI</NodeName>
-          <Value>112233,445566</Value>
-        </Node>
-      </Node>
-      <Node>
-        <NodeName>Credential</NodeName>
-        <Node>
-          <NodeName>Realm</NodeName>
-          <Value>shaken.stirred.com</Value>
-        </Node>
-        <Node>
-          <NodeName>UsernamePassword</NodeName>
-          <Node>
-            <NodeName>Username</NodeName>
-            <Value>james</Value>
-          </Node>
-          <Node>
-            <NodeName>Password</NodeName>
-            <Value>Ym9uZDAwNw==</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPMethod</NodeName>
-            <Node>
-              <NodeName>EAPType</NodeName>
-              <Value>21</Value>
-            </Node>
-            <Node>
-              <NodeName>InnerMethod</NodeName>
-              <Value>MS-CHAP-V2</Value>
-            </Node>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>DigitalCertificate</NodeName>
-          <Node>
-            <NodeName>CertificateType</NodeName>
-            <Value>x509v3</Value>
-          </Node>
-          <Node>
-            <NodeName>CertSHA256FingerPrint</NodeName>
-            <Value>1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f1f</Value>
-          </Node>
-        </Node>
-        <Node>
-          <NodeName>SIM</NodeName>
-          <Node>
-            <NodeName>IMSI</NodeName>
-            <Value>imsi</Value>
-          </Node>
-          <Node>
-            <NodeName>EAPType</NodeName>
-            <Value>24</Value>
-          </Node>
-        </Node>
-      </Node>
-    </Node>
-  </Node>
-</MgmtTree>
diff --git a/wifi/tests/assets/pps/README.txt b/wifi/tests/assets/pps/README.txt
deleted file mode 100644
index 369c0a9..0000000
--- a/wifi/tests/assets/pps/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-PerProviderSubscription.xml - valid PPS XML file
-PerProviderSubscription_DuplicateHomeSP.xml - containing multiple HomeSP node
-PerProviderSubscription_DuplicateValue.xml - FriendlyName node contains multiple Value
-PerProviderSubscription_MissingValue.xml - FriendlyName node is missing Value
-PerProviderSubscription_MissingName.xml - HomeSP node is missing NodeName
-PerProviderSubscription_InvalidNode.xml - FQDN node contains both Value and a child node
-PerProviderSubscription_InvalidName.xml - FriendlyName node have a typo in its name
diff --git a/wifi/tests/src/android/net/wifi/EasyConnectStatusCallbackTest.java b/wifi/tests/src/android/net/wifi/EasyConnectStatusCallbackTest.java
deleted file mode 100644
index b101414..0000000
--- a/wifi/tests/src/android/net/wifi/EasyConnectStatusCallbackTest.java
+++ /dev/null
@@ -1,84 +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;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.util.SparseArray;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.EasyConnectStatusCallbackTest}.
- */
-@SmallTest
-public class EasyConnectStatusCallbackTest {
-    private EasyConnectStatusCallback mEasyConnectStatusCallback = new EasyConnectStatusCallback() {
-        @Override
-        public void onEnrolleeSuccess(int newNetworkId) {
-
-        }
-
-        @Override
-        public void onConfiguratorSuccess(int code) {
-
-        }
-
-        @Override
-        public void onProgress(int code) {
-
-        }
-
-        @Override
-        public void onFailure(int code) {
-            mOnFailureR1EventReceived = true;
-            mLastCode = code;
-        }
-    };
-    private boolean mOnFailureR1EventReceived;
-    private int mLastCode;
-
-    @Before
-    public void setUp() {
-        mOnFailureR1EventReceived = false;
-        mLastCode = 0;
-    }
-
-    /**
-     * Test that the legacy R1 onFailure is called by default if the R2 onFailure is not overridden
-     * by the app.
-     */
-    @Test
-    public void testR1OnFailureCalled() {
-
-        SparseArray<int[]> channelList = new SparseArray<>();
-        int[] channelArray = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
-
-        channelList.append(81, channelArray);
-        mEasyConnectStatusCallback.onFailure(
-                EasyConnectStatusCallback.EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK,
-                "SomeSSID", channelList, new int[] {81});
-
-        assertTrue(mOnFailureR1EventReceived);
-        assertEquals(mLastCode,
-                EasyConnectStatusCallback.EASY_CONNECT_EVENT_FAILURE_CANNOT_FIND_NETWORK);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/FakeKeys.java b/wifi/tests/src/android/net/wifi/FakeKeys.java
deleted file mode 100644
index c0d60c3..0000000
--- a/wifi/tests/src/android/net/wifi/FakeKeys.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.nio.charset.StandardCharsets;
-import java.security.KeyFactory;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.PKCS8EncodedKeySpec;
-
-/**
- * A class containing test certificates and private keys.
- */
-public class FakeKeys {
-    private static final String CA_CERT0_STRING = "-----BEGIN CERTIFICATE-----\n" +
-            "MIIDKDCCAhCgAwIBAgIJAILlFdwzLVurMA0GCSqGSIb3DQEBCwUAMBIxEDAOBgNV\n" +
-            "BAMTB0VBUCBDQTEwHhcNMTYwMTEyMTE1MDE1WhcNMjYwMTA5MTE1MDE1WjASMRAw\n" +
-            "DgYDVQQDEwdFQVAgQ0ExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\n" +
-            "znAPUz26Msae4ws43czR41/J2QtrSIZUKmVUsVumDbYHrPNvTXKSMXAcewORDQYX\n" +
-            "RqvHvpn8CscB1+oGXZvHwxj4zV0WKoK2zeXkau3vcyl3HIKupJfq2TEACefVjj0t\n" +
-            "JW+X35PGWp9/H5zIUNVNVjS7Ums84IvKhRB8512PB9UyHagXYVX5GWpAcVpyfrlR\n" +
-            "FI9Qdhh+Pbk0uyktdbf/CdfgHOoebrTtwRljM0oDtX+2Cv6j0wBK7hD8pPvf1+uy\n" +
-            "GzczigAU/4Kw7eZqydf9B+5RupR+IZipX41xEiIrKRwqi517WWzXcjaG2cNbf451\n" +
-            "xpH5PnV3i1tq04jMGQUzFwIDAQABo4GAMH4wHQYDVR0OBBYEFIwX4vs8BiBcScod\n" +
-            "5noZHRM8E4+iMEIGA1UdIwQ7MDmAFIwX4vs8BiBcScod5noZHRM8E4+ioRakFDAS\n" +
-            "MRAwDgYDVQQDEwdFQVAgQ0ExggkAguUV3DMtW6swDAYDVR0TBAUwAwEB/zALBgNV\n" +
-            "HQ8EBAMCAQYwDQYJKoZIhvcNAQELBQADggEBAFfQqOTA7Rv7K+luQ7pnas4BYwHE\n" +
-            "9GEP/uohv6KOy0TGQFbrRTjFoLVNB9BZ1ymMDZ0/TIwIUc7wi7a8t5mEqYH153wW\n" +
-            "aWooiSjyLLhuI4sNrNCOtisdBq2r2MFXt6h0mAQYOPv8R8K7/fgSxGFqzhyNmmVL\n" +
-            "1qBJldx34SpwsTALQVPb4hGwJzZfr1PcpEQx6xMnTl8xEWZE3Ms99uaUxbQqIwRu\n" +
-            "LgAOkNCmY2m89VhzaHJ1uV85AdM/tD+Ysmlnnjt9LRCejbBipjIGjOXrg1JP+lxV\n" +
-            "muM4vH+P/mlmxsPPz0d65b+EGmJZpoLkO/tdNNvCYzjJpTEWpEsO6NMhKYo=\n" +
-            "-----END CERTIFICATE-----\n";
-    public static final X509Certificate CA_CERT0 = loadCertificate(CA_CERT0_STRING);
-
-    private static final String CA_CERT1_STRING = "-----BEGIN CERTIFICATE-----\n" +
-            "MIIDKDCCAhCgAwIBAgIJAOM5SzKO2pzCMA0GCSqGSIb3DQEBCwUAMBIxEDAOBgNV\n" +
-            "BAMTB0VBUCBDQTAwHhcNMTYwMTEyMDAxMDQ3WhcNMjYwMTA5MDAxMDQ3WjASMRAw\n" +
-            "DgYDVQQDEwdFQVAgQ0EwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\n" +
-            "89ug+IEKVQXnJGKg5g4uVHg6J/8iRUxR5k2eH5o03hrJNMfN2D+cBe/wCiZcnWbI\n" +
-            "GbGZACWm2nQth2wy9Zgm2LOd3b4ocrHYls3XLq6Qb5Dd7a0JKU7pdGufiNVEkrmF\n" +
-            "EB+N64wgwH4COTvCiN4erp5kyJwkfqAl2xLkZo0C464c9XoyQOXbmYD9A8v10wZu\n" +
-            "jyNsEo7Nr2USyw+qhjWSbFbEirP77Tvx+7pJQJwdtk1V9Tn73T2dGF2WHYejei9S\n" +
-            "mcWpdIUqsu9etYH+zDmtu7I1xlkwiaVsNr2+D+qaCJyOYqrDTKVNK5nmbBPXDWZc\n" +
-            "NoDbTOoqquX7xONpq9M6jQIDAQABo4GAMH4wHQYDVR0OBBYEFAZ3A2S4qJZZwuNY\n" +
-            "wkJ6mAdc0gVdMEIGA1UdIwQ7MDmAFAZ3A2S4qJZZwuNYwkJ6mAdc0gVdoRakFDAS\n" +
-            "MRAwDgYDVQQDEwdFQVAgQ0EwggkA4zlLMo7anMIwDAYDVR0TBAUwAwEB/zALBgNV\n" +
-            "HQ8EBAMCAQYwDQYJKoZIhvcNAQELBQADggEBAHmdMwEhtys4d0E+t7owBmoVR+lU\n" +
-            "hMCcRtWs8YKX5WIM2kTweT0h/O1xwE1mWmRv/IbDAEb8od4BjAQLhIcolStr2JaO\n" +
-            "9ZzyxjOnNzqeErh/1DHDbb/moPpqfeJ8YiEz7nH/YU56Q8iCPO7TsgS0sNNE7PfN\n" +
-            "IUsBW0yHRgpQ4OxWmiZG2YZWiECRzAC0ecPzo59N5iH4vLQIMTMYquiDeMPQnn1e\n" +
-            "NDGxG8gCtDKIaS6tMg3a28MvWB094pr2ETou8O1C8Ji0Y4hE8QJmSdT7I4+GZjgW\n" +
-            "g94DZ5RiL7sdp3vC48CXOmeT61YBIvhGUsE1rPhXqkpqQ3Z3C4TFF0jXZZc=\n" +
-            "-----END CERTIFICATE-----\n";
-    public static final X509Certificate CA_CERT1 = loadCertificate(CA_CERT1_STRING);
-
-    private static final String CLIENT_CERT_STR = "-----BEGIN CERTIFICATE-----\n" +
-            "MIIE/DCCAuQCAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxCzAJBgNV\n" +
-            "BAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdUZXN0aW5n\n" +
-            "MB4XDTE2MDkzMDIwNTQyOFoXDTE3MDkzMDIwNTQyOFowRDELMAkGA1UEBhMCVVMx\n" +
-            "CzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRAwDgYDVQQKDAdU\n" +
-            "ZXN0aW5nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnpmcbuaeHfnJ\n" +
-            "k+2QNvxmdVFTawyFMNk0USCq5sexscwmxbewG/Rb8YnixwJWS44v2XkSujB67z5C\n" +
-            "s2qudFEhRXKdEuC6idbAuA97KjipHh0AAniWMsyv61fvbgsUC0b0canx3LiDq81p\n" +
-            "y28NNGmAvoazLZUZ4AhBRiwYZY6FKk723gmZoGbEIeG7J1dlXPusc1662rIjz4eU\n" +
-            "zlmmlvqyHfNqnNk8L14Vug6Xh+lOEGN85xhu1YHAEKGrS89kZxs5rum/cZU8KH2V\n" +
-            "v6eKnY03kxjiVLQtnLpm/7VUEoCMGHyruRj+p3my4+DgqMsmsH52RZCBsjyGlpbU\n" +
-            "NOwOTIX6xh+Rqloduz4AnrMYYIiIw2s8g+2zJM7VbcVKx0fGS26BKdrxgrXWfmNE\n" +
-            "nR0/REQ5AxDGw0jfTUvtdTkXAf+K4MDjcNLEZ+MA4rHfAfQWZtUR5BkHCQYxNpJk\n" +
-            "pA0gyk+BpKdC4WdzI14NSWsu5sRCmBCFqH6BTOSEq/V1cNorBxNwLSSTwFFqUDqx\n" +
-            "Y5nQLXygkJf9WHZWtSKeSjtOYgilz7UKzC2s3CsjmIyGFe+SwpuHJnuE4Uc8Z5Cb\n" +
-            "bjNGHPzqL6XnmzZHJp7RF8kBdKdjGC7dCUltzOfICZeKlzOOq+Kw42T/nXjuXvpb\n" +
-            "nkXNxg741Nwd6RecykXJbseFwm3EYxkCAwEAATANBgkqhkiG9w0BAQsFAAOCAgEA\n" +
-            "Ga1mGwI9aXkL2fTPXO9YkAPzoGeX8aeuVYSQaSkNq+5vnogYCyAt3YDHjRG+ewTT\n" +
-            "WbnPA991xRAPac+biJeXWmwvgGj0YuT7e79phAiGkTTnbAjFHGfYnBy/tI/v7btO\n" +
-            "hRNElA5yTJ1m2fVbBEKXzMR83jrT9iyI+YLRN86zUZIaC86xxSbqnrdWN2jOK6MX\n" +
-            "dS8Arp9tPQjC/4gW+2Ilxv68jiYh+5auWHQZVjppWVY//iu4mAbkq1pTwQEhZ8F8\n" +
-            "Zrmh9DHh60hLFcfSuhIAwf/NMzppwdkjy1ruKVrpijhGKGp4OWu8nvOUgHSzxc7F\n" +
-            "PwpVZ5N2Ku4L8MLO6BG2VasRJK7l17TzDXlfLZHJjkuryOFxVaQKt8ZNFgTOaCXS\n" +
-            "E+gpTLksKU7riYckoiP4+H1sn9qcis0e8s4o/uf1UVc8GSdDw61ReGM5oZEDm1u8\n" +
-            "H9x20QU6igLqzyBpqvCKv7JNgU1uB2PAODHH78zJiUfnKd1y+o+J1iWzaGj3EFji\n" +
-            "T8AXksbTP733FeFXfggXju2dyBH+Z1S5BBTEOd1brWgXlHSAZGm97MKZ94r6/tkX\n" +
-            "qfv3fCos0DKz0oV7qBxYS8wiYhzrRVxG6ITAoH8uuUVVQaZF+G4nJ2jEqNbfuKyX\n" +
-            "ATQsVNjNNlDA0J33GobPMjT326wa4YAWMx8PI5PJZ3g=\n" +
-            "-----END CERTIFICATE-----\n";
-    public static final X509Certificate CLIENT_CERT = loadCertificate(CLIENT_CERT_STR);
-
-    private static final byte[] FAKE_RSA_KEY_1 = new byte[] {
-            (byte) 0x30, (byte) 0x82, (byte) 0x02, (byte) 0x78, (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) 0x02, (byte) 0x62, (byte) 0x30, (byte) 0x82, (byte) 0x02, (byte) 0x5e,
-            (byte) 0x02, (byte) 0x01, (byte) 0x00, (byte) 0x02, (byte) 0x81, (byte) 0x81,
-            (byte) 0x00, (byte) 0xce, (byte) 0x29, (byte) 0xeb, (byte) 0xf6, (byte) 0x5b,
-            (byte) 0x25, (byte) 0xdc, (byte) 0xa1, (byte) 0xa6, (byte) 0x2c, (byte) 0x66,
-            (byte) 0xcb, (byte) 0x20, (byte) 0x90, (byte) 0x27, (byte) 0x86, (byte) 0x8a,
-            (byte) 0x44, (byte) 0x71, (byte) 0x50, (byte) 0xda, (byte) 0xd3, (byte) 0x02,
-            (byte) 0x77, (byte) 0x55, (byte) 0xe9, (byte) 0xe8, (byte) 0x08, (byte) 0xf3,
-            (byte) 0x36, (byte) 0x9a, (byte) 0xae, (byte) 0xab, (byte) 0x04, (byte) 0x6d,
-            (byte) 0x00, (byte) 0x99, (byte) 0xbf, (byte) 0x7d, (byte) 0x0f, (byte) 0x67,
-            (byte) 0x8b, (byte) 0x1d, (byte) 0xd4, (byte) 0x2b, (byte) 0x7c, (byte) 0xcb,
-            (byte) 0xcd, (byte) 0x33, (byte) 0xc7, (byte) 0x84, (byte) 0x30, (byte) 0xe2,
-            (byte) 0x45, (byte) 0x21, (byte) 0xb3, (byte) 0x75, (byte) 0xf5, (byte) 0x79,
-            (byte) 0x02, (byte) 0xda, (byte) 0x50, (byte) 0xa3, (byte) 0x8b, (byte) 0xce,
-            (byte) 0xc3, (byte) 0x8e, (byte) 0x0f, (byte) 0x25, (byte) 0xeb, (byte) 0x08,
-            (byte) 0x2c, (byte) 0xdd, (byte) 0x1c, (byte) 0xcf, (byte) 0xff, (byte) 0x3b,
-            (byte) 0xde, (byte) 0xb6, (byte) 0xaa, (byte) 0x2a, (byte) 0xa9, (byte) 0xc4,
-            (byte) 0x8a, (byte) 0x24, (byte) 0x24, (byte) 0xe6, (byte) 0x29, (byte) 0x0d,
-            (byte) 0x98, (byte) 0x4c, (byte) 0x32, (byte) 0xa1, (byte) 0x7b, (byte) 0x23,
-            (byte) 0x2b, (byte) 0x42, (byte) 0x30, (byte) 0xee, (byte) 0x78, (byte) 0x08,
-            (byte) 0x47, (byte) 0xad, (byte) 0xf2, (byte) 0x96, (byte) 0xd5, (byte) 0xf1,
-            (byte) 0x62, (byte) 0x42, (byte) 0x2d, (byte) 0x35, (byte) 0x19, (byte) 0xb4,
-            (byte) 0x3c, (byte) 0xc9, (byte) 0xc3, (byte) 0x5f, (byte) 0x03, (byte) 0x16,
-            (byte) 0x3a, (byte) 0x23, (byte) 0xac, (byte) 0xcb, (byte) 0xce, (byte) 0x9e,
-            (byte) 0x51, (byte) 0x2e, (byte) 0x6d, (byte) 0x02, (byte) 0x03, (byte) 0x01,
-            (byte) 0x00, (byte) 0x01, (byte) 0x02, (byte) 0x81, (byte) 0x80, (byte) 0x16,
-            (byte) 0x59, (byte) 0xc3, (byte) 0x24, (byte) 0x1d, (byte) 0x33, (byte) 0x98,
-            (byte) 0x9c, (byte) 0xc9, (byte) 0xc8, (byte) 0x2c, (byte) 0x88, (byte) 0xbf,
-            (byte) 0x0a, (byte) 0x01, (byte) 0xce, (byte) 0xfb, (byte) 0x34, (byte) 0x7a,
-            (byte) 0x58, (byte) 0x7a, (byte) 0xb0, (byte) 0xbf, (byte) 0xa6, (byte) 0xb2,
-            (byte) 0x60, (byte) 0xbe, (byte) 0x70, (byte) 0x21, (byte) 0xf5, (byte) 0xfc,
-            (byte) 0x85, (byte) 0x0d, (byte) 0x33, (byte) 0x58, (byte) 0xa1, (byte) 0xe5,
-            (byte) 0x09, (byte) 0x36, (byte) 0x84, (byte) 0xb2, (byte) 0x04, (byte) 0x0a,
-            (byte) 0x02, (byte) 0xd3, (byte) 0x88, (byte) 0x1f, (byte) 0x0c, (byte) 0x2b,
-            (byte) 0x1d, (byte) 0xe9, (byte) 0x3d, (byte) 0xe7, (byte) 0x79, (byte) 0xf9,
-            (byte) 0x32, (byte) 0x5c, (byte) 0x8a, (byte) 0x75, (byte) 0x49, (byte) 0x12,
-            (byte) 0xe4, (byte) 0x05, (byte) 0x26, (byte) 0xd4, (byte) 0x2e, (byte) 0x9e,
-            (byte) 0x1f, (byte) 0xcc, (byte) 0x54, (byte) 0xad, (byte) 0x33, (byte) 0x8d,
-            (byte) 0x99, (byte) 0x00, (byte) 0xdc, (byte) 0xf5, (byte) 0xb4, (byte) 0xa2,
-            (byte) 0x2f, (byte) 0xba, (byte) 0xe5, (byte) 0x62, (byte) 0x30, (byte) 0x6d,
-            (byte) 0xe6, (byte) 0x3d, (byte) 0xeb, (byte) 0x24, (byte) 0xc2, (byte) 0xdc,
-            (byte) 0x5f, (byte) 0xb7, (byte) 0x16, (byte) 0x35, (byte) 0xa3, (byte) 0x98,
-            (byte) 0x98, (byte) 0xa8, (byte) 0xef, (byte) 0xe8, (byte) 0xc4, (byte) 0x96,
-            (byte) 0x6d, (byte) 0x38, (byte) 0xab, (byte) 0x26, (byte) 0x6d, (byte) 0x30,
-            (byte) 0xc2, (byte) 0xa0, (byte) 0x44, (byte) 0xe4, (byte) 0xff, (byte) 0x7e,
-            (byte) 0xbe, (byte) 0x7c, (byte) 0x33, (byte) 0xa5, (byte) 0x10, (byte) 0xad,
-            (byte) 0xd7, (byte) 0x1e, (byte) 0x13, (byte) 0x20, (byte) 0xb3, (byte) 0x1f,
-            (byte) 0x41, (byte) 0x02, (byte) 0x41, (byte) 0x00, (byte) 0xf1, (byte) 0x89,
-            (byte) 0x07, (byte) 0x0f, (byte) 0xe8, (byte) 0xcf, (byte) 0xab, (byte) 0x13,
-            (byte) 0x2a, (byte) 0x8f, (byte) 0x88, (byte) 0x80, (byte) 0x11, (byte) 0x9a,
-            (byte) 0x79, (byte) 0xb6, (byte) 0x59, (byte) 0x3a, (byte) 0x50, (byte) 0x6e,
-            (byte) 0x57, (byte) 0x37, (byte) 0xab, (byte) 0x2a, (byte) 0xd2, (byte) 0xaa,
-            (byte) 0xd9, (byte) 0x72, (byte) 0x73, (byte) 0xff, (byte) 0x8b, (byte) 0x47,
-            (byte) 0x76, (byte) 0xdd, (byte) 0xdc, (byte) 0xf5, (byte) 0x97, (byte) 0x44,
-            (byte) 0x3a, (byte) 0x78, (byte) 0xbe, (byte) 0x17, (byte) 0xb4, (byte) 0x22,
-            (byte) 0x6f, (byte) 0xe5, (byte) 0x23, (byte) 0x70, (byte) 0x1d, (byte) 0x10,
-            (byte) 0x5d, (byte) 0xba, (byte) 0x16, (byte) 0x81, (byte) 0xf1, (byte) 0x45,
-            (byte) 0xce, (byte) 0x30, (byte) 0xb4, (byte) 0xab, (byte) 0x80, (byte) 0xe4,
-            (byte) 0x98, (byte) 0x31, (byte) 0x02, (byte) 0x41, (byte) 0x00, (byte) 0xda,
-            (byte) 0x82, (byte) 0x9d, (byte) 0x3f, (byte) 0xca, (byte) 0x2f, (byte) 0xe1,
-            (byte) 0xd4, (byte) 0x86, (byte) 0x77, (byte) 0x48, (byte) 0xa6, (byte) 0xab,
-            (byte) 0xab, (byte) 0x1c, (byte) 0x42, (byte) 0x5c, (byte) 0xd5, (byte) 0xc7,
-            (byte) 0x46, (byte) 0x59, (byte) 0x91, (byte) 0x3f, (byte) 0xfc, (byte) 0xcc,
-            (byte) 0xec, (byte) 0xc2, (byte) 0x40, (byte) 0x12, (byte) 0x2c, (byte) 0x8d,
-            (byte) 0x1f, (byte) 0xa2, (byte) 0x18, (byte) 0x88, (byte) 0xee, (byte) 0x82,
-            (byte) 0x4a, (byte) 0x5a, (byte) 0x5e, (byte) 0x88, (byte) 0x20, (byte) 0xe3,
-            (byte) 0x7b, (byte) 0xe0, (byte) 0xd8, (byte) 0x3a, (byte) 0x52, (byte) 0x9a,
-            (byte) 0x26, (byte) 0x6a, (byte) 0x04, (byte) 0xec, (byte) 0xe8, (byte) 0xb9,
-            (byte) 0x48, (byte) 0x40, (byte) 0xe1, (byte) 0xe1, (byte) 0x83, (byte) 0xa6,
-            (byte) 0x67, (byte) 0xa6, (byte) 0xfd, (byte) 0x02, (byte) 0x41, (byte) 0x00,
-            (byte) 0x89, (byte) 0x72, (byte) 0x3e, (byte) 0xb0, (byte) 0x90, (byte) 0xfd,
-            (byte) 0x4c, (byte) 0x0e, (byte) 0xd6, (byte) 0x13, (byte) 0x63, (byte) 0xcb,
-            (byte) 0xed, (byte) 0x38, (byte) 0x88, (byte) 0xb6, (byte) 0x79, (byte) 0xc4,
-            (byte) 0x33, (byte) 0x6c, (byte) 0xf6, (byte) 0xf8, (byte) 0xd8, (byte) 0xd0,
-            (byte) 0xbf, (byte) 0x9d, (byte) 0x35, (byte) 0xac, (byte) 0x69, (byte) 0xd2,
-            (byte) 0x2b, (byte) 0xc1, (byte) 0xf9, (byte) 0x24, (byte) 0x7b, (byte) 0xce,
-            (byte) 0xcd, (byte) 0xcb, (byte) 0xa7, (byte) 0xb2, (byte) 0x7a, (byte) 0x0a,
-            (byte) 0x27, (byte) 0x19, (byte) 0xc9, (byte) 0xaf, (byte) 0x0d, (byte) 0x21,
-            (byte) 0x89, (byte) 0x88, (byte) 0x7c, (byte) 0xad, (byte) 0x9e, (byte) 0x8d,
-            (byte) 0x47, (byte) 0x6d, (byte) 0x3f, (byte) 0xce, (byte) 0x7b, (byte) 0xa1,
-            (byte) 0x74, (byte) 0xf1, (byte) 0xa0, (byte) 0xa1, (byte) 0x02, (byte) 0x41,
-            (byte) 0x00, (byte) 0xd9, (byte) 0xa8, (byte) 0xf5, (byte) 0xfe, (byte) 0xce,
-            (byte) 0xe6, (byte) 0x77, (byte) 0x6b, (byte) 0xfe, (byte) 0x2d, (byte) 0xe0,
-            (byte) 0x1e, (byte) 0xb6, (byte) 0x2e, (byte) 0x12, (byte) 0x4e, (byte) 0x40,
-            (byte) 0xaf, (byte) 0x6a, (byte) 0x7b, (byte) 0x37, (byte) 0x49, (byte) 0x2a,
-            (byte) 0x96, (byte) 0x25, (byte) 0x83, (byte) 0x49, (byte) 0xd4, (byte) 0x0c,
-            (byte) 0xc6, (byte) 0x78, (byte) 0x25, (byte) 0x24, (byte) 0x90, (byte) 0x90,
-            (byte) 0x06, (byte) 0x15, (byte) 0x9e, (byte) 0xfe, (byte) 0xf9, (byte) 0xdf,
-            (byte) 0x5b, (byte) 0xf3, (byte) 0x7e, (byte) 0x38, (byte) 0x70, (byte) 0xeb,
-            (byte) 0x57, (byte) 0xd0, (byte) 0xd9, (byte) 0xa7, (byte) 0x0e, (byte) 0x14,
-            (byte) 0xf7, (byte) 0x95, (byte) 0x68, (byte) 0xd5, (byte) 0xc8, (byte) 0xab,
-            (byte) 0x9d, (byte) 0x3a, (byte) 0x2b, (byte) 0x51, (byte) 0xf9, (byte) 0x02,
-            (byte) 0x41, (byte) 0x00, (byte) 0x96, (byte) 0xdf, (byte) 0xe9, (byte) 0x67,
-            (byte) 0x6c, (byte) 0xdc, (byte) 0x90, (byte) 0x14, (byte) 0xb4, (byte) 0x1d,
-            (byte) 0x22, (byte) 0x33, (byte) 0x4a, (byte) 0x31, (byte) 0xc1, (byte) 0x9d,
-            (byte) 0x2e, (byte) 0xff, (byte) 0x9a, (byte) 0x2a, (byte) 0x95, (byte) 0x4b,
-            (byte) 0x27, (byte) 0x74, (byte) 0xcb, (byte) 0x21, (byte) 0xc3, (byte) 0xd2,
-            (byte) 0x0b, (byte) 0xb2, (byte) 0x46, (byte) 0x87, (byte) 0xf8, (byte) 0x28,
-            (byte) 0x01, (byte) 0x8b, (byte) 0xd8, (byte) 0xb9, (byte) 0x4b, (byte) 0xcd,
-            (byte) 0x9a, (byte) 0x96, (byte) 0x41, (byte) 0x0e, (byte) 0x36, (byte) 0x6d,
-            (byte) 0x40, (byte) 0x42, (byte) 0xbc, (byte) 0xd9, (byte) 0xd3, (byte) 0x7b,
-            (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);
-
-    private static X509Certificate loadCertificate(String blob) {
-        try {
-            final CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-            InputStream stream = new ByteArrayInputStream(blob.getBytes(StandardCharsets.UTF_8));
-
-            return (X509Certificate) certFactory.generateCertificate(stream);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    private static PrivateKey loadPrivateRSAKey(byte[] fakeKey) {
-        try {
-            KeyFactory kf = KeyFactory.getInstance("RSA");
-            return kf.generatePrivate(new PKCS8EncodedKeySpec(fakeKey));
-        } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
-            return null;
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/ParcelUtilTest.java b/wifi/tests/src/android/net/wifi/ParcelUtilTest.java
deleted file mode 100644
index 917b1df..0000000
--- a/wifi/tests/src/android/net/wifi/ParcelUtilTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
-/**
- * Unit tests for {@link android.net.wifi.ParcelUtil}.
- */
-@SmallTest
-public class ParcelUtilTest {
-    private Parcel mParcel;
-
-    @Before
-    public void setUp() throws Exception {
-        mParcel = Parcel.obtain();
-    }
-
-    @Test
-    public void readWriteNullPrivateKey() throws Exception {
-        ParcelUtil.writePrivateKey(mParcel, null);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        PrivateKey readKey = ParcelUtil.readPrivateKey(mParcel);
-        assertNull(readKey);
-    }
-
-    @Test
-    public void readWriteValidPrivateKey() throws Exception {
-        PrivateKey writeKey = FakeKeys.RSA_KEY1;
-        ParcelUtil.writePrivateKey(mParcel, writeKey);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        PrivateKey readKey = ParcelUtil.readPrivateKey(mParcel);
-        assertNotNull(readKey);
-        assertEquals(writeKey.getAlgorithm(), readKey.getAlgorithm());
-        assertArrayEquals(writeKey.getEncoded(), readKey.getEncoded());
-    }
-
-    @Test
-    public void readWriteNullCertificate() throws Exception {
-        ParcelUtil.writeCertificate(mParcel, null);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        X509Certificate readCert = ParcelUtil.readCertificate(mParcel);
-        assertNull(readCert);
-    }
-
-    @Test
-    public void readWriteValidCertificate() throws Exception {
-        X509Certificate writeCert = FakeKeys.CA_CERT1;
-        ParcelUtil.writeCertificate(mParcel, writeCert);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        X509Certificate readCert = ParcelUtil.readCertificate(mParcel);
-        assertNotNull(readCert);
-        assertArrayEquals(writeCert.getEncoded(), readCert.getEncoded());
-    }
-
-    @Test
-    public void readWriteNullCertificates() throws Exception {
-        ParcelUtil.writeCertificates(mParcel, null);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        X509Certificate[] readCerts = ParcelUtil.readCertificates(mParcel);
-        assertNull(readCerts);
-    }
-
-    @Test
-    public void readWriteValidCertificates() throws Exception {
-        X509Certificate[] writeCerts = new X509Certificate[2];
-        writeCerts[0] = FakeKeys.CA_CERT0;
-        writeCerts[1] = FakeKeys.CA_CERT1;
-        ParcelUtil.writeCertificates(mParcel, writeCerts);
-
-        mParcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        X509Certificate[] readCerts = ParcelUtil.readCertificates(mParcel);
-        assertNotNull(readCerts);
-        assertEquals(writeCerts.length, readCerts.length);
-        for (int i = 0; i < writeCerts.length; i++) {
-            assertNotNull(readCerts[i]);
-            assertArrayEquals(writeCerts[i].getEncoded(), readCerts[i].getEncoded());
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/ScanResultTest.java b/wifi/tests/src/android/net/wifi/ScanResultTest.java
deleted file mode 100644
index 5516f43..0000000
--- a/wifi/tests/src/android/net/wifi/ScanResultTest.java
+++ /dev/null
@@ -1,300 +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.net.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.mockito.Mockito.validateMockitoUsage;
-
-import android.net.wifi.ScanResult.InformationElement;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.MockitoAnnotations;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiScanner}.
- */
-@SmallTest
-public class ScanResultTest {
-    public static final String TEST_SSID = "\"test_ssid\"";
-    public static final String TEST_BSSID = "04:ac:fe:45:34:10";
-    public static final String TEST_CAPS = "CCMP";
-    public static final int TEST_LEVEL = -56;
-    public static final int TEST_FREQUENCY = 2412;
-    public static final long TEST_TSF = 04660l;
-    public static final @WifiAnnotations.WifiStandard int TEST_WIFI_STANDARD =
-            ScanResult.WIFI_STANDARD_11AC;
-
-    /**
-     * Frequency to channel map. This include some frequencies used outside the US.
-     * Representing it using a vector (instead of map) for simplification.
-     */
-    private static final int[] FREQUENCY_TO_CHANNEL_MAP = {
-            2412, WifiScanner.WIFI_BAND_24_GHZ, 1,
-            2417, WifiScanner.WIFI_BAND_24_GHZ, 2,
-            2422, WifiScanner.WIFI_BAND_24_GHZ, 3,
-            2427, WifiScanner.WIFI_BAND_24_GHZ, 4,
-            2432, WifiScanner.WIFI_BAND_24_GHZ, 5,
-            2437, WifiScanner.WIFI_BAND_24_GHZ, 6,
-            2442, WifiScanner.WIFI_BAND_24_GHZ, 7,
-            2447, WifiScanner.WIFI_BAND_24_GHZ, 8,
-            2452, WifiScanner.WIFI_BAND_24_GHZ, 9,
-            2457, WifiScanner.WIFI_BAND_24_GHZ, 10,
-            2462, WifiScanner.WIFI_BAND_24_GHZ, 11,
-            /* 12, 13 are only legitimate outside the US. */
-            2467, WifiScanner.WIFI_BAND_24_GHZ, 12,
-            2472, WifiScanner.WIFI_BAND_24_GHZ, 13,
-            /* 14 is for Japan, DSSS and CCK only. */
-            2484, WifiScanner.WIFI_BAND_24_GHZ, 14,
-            /* 34 valid in Japan. */
-            5170, WifiScanner.WIFI_BAND_5_GHZ, 34,
-            5180, WifiScanner.WIFI_BAND_5_GHZ, 36,
-            5190, WifiScanner.WIFI_BAND_5_GHZ, 38,
-            5200, WifiScanner.WIFI_BAND_5_GHZ, 40,
-            5210, WifiScanner.WIFI_BAND_5_GHZ, 42,
-            5220, WifiScanner.WIFI_BAND_5_GHZ, 44,
-            5230, WifiScanner.WIFI_BAND_5_GHZ, 46,
-            5240, WifiScanner.WIFI_BAND_5_GHZ, 48,
-            5260, WifiScanner.WIFI_BAND_5_GHZ, 52,
-            5280, WifiScanner.WIFI_BAND_5_GHZ, 56,
-            5300, WifiScanner.WIFI_BAND_5_GHZ, 60,
-            5320, WifiScanner.WIFI_BAND_5_GHZ, 64,
-            5500, WifiScanner.WIFI_BAND_5_GHZ, 100,
-            5520, WifiScanner.WIFI_BAND_5_GHZ, 104,
-            5540, WifiScanner.WIFI_BAND_5_GHZ, 108,
-            5560, WifiScanner.WIFI_BAND_5_GHZ, 112,
-            5580, WifiScanner.WIFI_BAND_5_GHZ, 116,
-            /* 120, 124, 128 valid in Europe/Japan. */
-            5600, WifiScanner.WIFI_BAND_5_GHZ, 120,
-            5620, WifiScanner.WIFI_BAND_5_GHZ, 124,
-            5640, WifiScanner.WIFI_BAND_5_GHZ, 128,
-            /* 132+ valid in US. */
-            5660, WifiScanner.WIFI_BAND_5_GHZ, 132,
-            5680, WifiScanner.WIFI_BAND_5_GHZ, 136,
-            5700, WifiScanner.WIFI_BAND_5_GHZ, 140,
-            /* 144 is supported by a subset of WiFi chips. */
-            5720, WifiScanner.WIFI_BAND_5_GHZ, 144,
-            5745, WifiScanner.WIFI_BAND_5_GHZ, 149,
-            5765, WifiScanner.WIFI_BAND_5_GHZ, 153,
-            5785, WifiScanner.WIFI_BAND_5_GHZ, 157,
-            5805, WifiScanner.WIFI_BAND_5_GHZ, 161,
-            5825, WifiScanner.WIFI_BAND_5_GHZ, 165,
-            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
-    };
-
-    /**
-     * Setup before tests.
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-    }
-
-    /**
-     * Clean up after tests.
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-    }
-
-    /**
-     * Verify parcel read/write for ScanResult.
-     */
-    @Test
-    public void verifyScanResultParcelWithoutRadioChainInfo() throws Exception {
-        ScanResult writeScanResult = createScanResult();
-        ScanResult readScanResult = parcelReadWrite(writeScanResult);
-        assertScanResultEquals(writeScanResult, readScanResult);
-    }
-
-    /**
-     * Verify parcel read/write for ScanResult.
-     */
-    @Test
-    public void verifyScanResultParcelWithZeroRadioChainInfo() throws Exception {
-        ScanResult writeScanResult = createScanResult();
-        writeScanResult.radioChainInfos = new ScanResult.RadioChainInfo[0];
-        ScanResult readScanResult = parcelReadWrite(writeScanResult);
-        assertNull(readScanResult.radioChainInfos);
-    }
-
-    /**
-     * Verify parcel read/write for ScanResult.
-     */
-    @Test
-    public void verifyScanResultParcelWithRadioChainInfo() throws Exception {
-        ScanResult writeScanResult = createScanResult();
-        writeScanResult.radioChainInfos = new ScanResult.RadioChainInfo[2];
-        writeScanResult.radioChainInfos[0] = new ScanResult.RadioChainInfo();
-        writeScanResult.radioChainInfos[0].id = 0;
-        writeScanResult.radioChainInfos[0].level = -45;
-        writeScanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo();
-        writeScanResult.radioChainInfos[1].id = 1;
-        writeScanResult.radioChainInfos[1].level = -54;
-        ScanResult readScanResult = parcelReadWrite(writeScanResult);
-        assertScanResultEquals(writeScanResult, readScanResult);
-    }
-
-    /**
-     * Verify copy constructor for ScanResult.
-     */
-    @Test
-    public void verifyScanResultCopyWithoutRadioChainInfo() throws Exception {
-        ScanResult scanResult = createScanResult();
-        ScanResult copyScanResult = new ScanResult(scanResult);
-        assertScanResultEquals(scanResult, copyScanResult);
-    }
-
-    /**
-     * Verify copy constructor for ScanResult.
-     */
-    @Test
-    public void verifyScanResultCopyWithRadioChainInfo() throws Exception {
-        ScanResult scanResult = createScanResult();
-        scanResult.radioChainInfos = new ScanResult.RadioChainInfo[2];
-        scanResult.radioChainInfos[0] = new ScanResult.RadioChainInfo();
-        scanResult.radioChainInfos[0].id = 0;
-        scanResult.radioChainInfos[0].level = -45;
-        scanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo();
-        scanResult.radioChainInfos[1].id = 1;
-        scanResult.radioChainInfos[1].level = -54;
-        ScanResult copyScanResult = new ScanResult(scanResult);
-        assertScanResultEquals(scanResult, copyScanResult);
-    }
-
-    /**
-     * Verify parcel read/write for ScanResult with Information Element
-     */
-    @Test
-    public void verifyScanResultParcelWithInformationElement() throws Exception {
-        ScanResult writeScanResult = createScanResult();
-        writeScanResult.informationElements = new ScanResult.InformationElement[2];
-        writeScanResult.informationElements[0] = new ScanResult.InformationElement();
-        writeScanResult.informationElements[0].id = InformationElement.EID_HT_OPERATION;
-        writeScanResult.informationElements[0].idExt = 0;
-        writeScanResult.informationElements[0].bytes = new byte[]{0x11, 0x22, 0x33};
-        writeScanResult.informationElements[1] = new ScanResult.InformationElement();
-        writeScanResult.informationElements[1].id = InformationElement.EID_EXTENSION_PRESENT;
-        writeScanResult.informationElements[1].idExt = InformationElement.EID_EXT_HE_OPERATION;
-        writeScanResult.informationElements[1].bytes = new byte[]{0x44, 0x55, 0x66};
-        ScanResult readScanResult = new ScanResult(writeScanResult);
-        assertScanResultEquals(writeScanResult, readScanResult);
-    }
-
-    /**
-     * Verify toString for ScanResult.
-     */
-    @Test
-    public void verifyScanResultToStringWithoutRadioChainInfo() throws Exception {
-        ScanResult scanResult = createScanResult();
-        assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, "
-                + "level: -56, frequency: 2412, timestamp: 2480, "
-                + "distance: 0(cm), distanceSd: 0(cm), "
-                + "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, "
-                + "standard: 11ac, "
-                + "80211mcResponder: is not supported, "
-                + "Radio Chain Infos: null", scanResult.toString());
-    }
-
-    /**
-     * Verify toString for ScanResult.
-     */
-    @Test
-    public void verifyScanResultToStringWithRadioChainInfo() throws Exception {
-        ScanResult scanResult = createScanResult();
-        scanResult.radioChainInfos = new ScanResult.RadioChainInfo[2];
-        scanResult.radioChainInfos[0] = new ScanResult.RadioChainInfo();
-        scanResult.radioChainInfos[0].id = 0;
-        scanResult.radioChainInfos[0].level = -45;
-        scanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo();
-        scanResult.radioChainInfos[1].id = 1;
-        scanResult.radioChainInfos[1].level = -54;
-        assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, "
-                + "level: -56, frequency: 2412, timestamp: 2480, distance: 0(cm), "
-                + "distanceSd: 0(cm), "
-                + "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, "
-                + "standard: 11ac, "
-                + "80211mcResponder: is not supported, "
-                + "Radio Chain Infos: [RadioChainInfo: id=0, level=-45, "
-                + "RadioChainInfo: id=1, level=-54]", scanResult.toString());
-    }
-
-    /**
-     * verify frequency to channel conversion for all possible frequencies.
-     */
-    @Test
-    public void convertFrequencyToChannel() throws Exception {
-        for (int i = 0; i < FREQUENCY_TO_CHANNEL_MAP.length; i += 3) {
-            assertEquals(FREQUENCY_TO_CHANNEL_MAP[i + 2],
-                    ScanResult.convertFrequencyMhzToChannel(FREQUENCY_TO_CHANNEL_MAP[i]));
-        }
-    }
-
-    /**
-     * Verify frequency to channel conversion failed for an invalid frequency.
-     */
-    @Test
-    public void convertFrequencyToChannelWithInvalidFreq() throws Exception {
-        assertEquals(-1, ScanResult.convertFrequencyMhzToChannel(8000));
-    }
-
-    /**
-     * Write the provided {@link ScanResult} to a parcel and deserialize it.
-     */
-    private static ScanResult parcelReadWrite(ScanResult writeResult) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeResult.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        return ScanResult.CREATOR.createFromParcel(parcel);
-    }
-
-    private static ScanResult createScanResult() {
-        ScanResult result = new ScanResult();
-        result.wifiSsid = WifiSsid.createFromAsciiEncoded(TEST_SSID);
-        result.BSSID = TEST_BSSID;
-        result.capabilities = TEST_CAPS;
-        result.level = TEST_LEVEL;
-        result.frequency = TEST_FREQUENCY;
-        result.timestamp = TEST_TSF;
-        result.setWifiStandard(TEST_WIFI_STANDARD);
-        return result;
-    }
-
-    private static void assertScanResultEquals(ScanResult expected, ScanResult actual) {
-        assertEquals(expected.SSID, actual.SSID);
-        assertEquals(expected.BSSID, actual.BSSID);
-        assertEquals(expected.capabilities, actual.capabilities);
-        assertEquals(expected.level, actual.level);
-        assertEquals(expected.frequency, actual.frequency);
-        assertEquals(expected.timestamp, actual.timestamp);
-        assertEquals(expected.getWifiStandard(), actual.getWifiStandard());
-        assertArrayEquals(expected.radioChainInfos, actual.radioChainInfos);
-        assertArrayEquals(expected.informationElements, actual.informationElements);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/SoftApCapabilityTest.java b/wifi/tests/src/android/net/wifi/SoftApCapabilityTest.java
deleted file mode 100644
index 73b501a..0000000
--- a/wifi/tests/src/android/net/wifi/SoftApCapabilityTest.java
+++ /dev/null
@@ -1,73 +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;
-
-import android.os.Parcel;
-
-import static org.junit.Assert.assertEquals;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.SoftApCapability}.
- */
-@SmallTest
-public class SoftApCapabilityTest {
-
-    /**
-     * Verifies copy constructor.
-     */
-    @Test
-    public void testCopyOperator() throws Exception {
-        long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
-                | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD;
-        SoftApCapability capability = new SoftApCapability(testSoftApFeature);
-        capability.setMaxSupportedClients(10);
-
-        SoftApCapability copiedCapability = new SoftApCapability(capability);
-
-        assertEquals(capability, copiedCapability);
-        assertEquals(capability.hashCode(), copiedCapability.hashCode());
-    }
-
-    /**
-     * Verifies parcel serialization/deserialization.
-     */
-    @Test
-    public void testParcelOperation() throws Exception {
-        long testSoftApFeature = SoftApCapability.SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT
-                | SoftApCapability.SOFTAP_FEATURE_ACS_OFFLOAD;
-        SoftApCapability capability = new SoftApCapability(testSoftApFeature);
-        capability.setMaxSupportedClients(10);
-
-        Parcel parcelW = Parcel.obtain();
-        capability.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        SoftApCapability fromParcel = SoftApCapability.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(capability, fromParcel);
-        assertEquals(capability.hashCode(), fromParcel.hashCode());
-    }
-
-}
diff --git a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java b/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java
deleted file mode 100644
index 31e508c..0000000
--- a/wifi/tests/src/android/net/wifi/SoftApConfigurationTest.java
+++ /dev/null
@@ -1,334 +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;
-
-import static com.google.common.truth.Truth.assertThat;
-
-import static org.junit.Assert.assertNull;
-
-import android.net.MacAddress;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-@SmallTest
-public class SoftApConfigurationTest {
-    private static final String TEST_CHAR_SET_AS_STRING = "abcdefghijklmnopqrstuvwxyz0123456789";
-
-    private SoftApConfiguration parcelUnparcel(SoftApConfiguration configIn) {
-        Parcel parcel = Parcel.obtain();
-        parcel.writeParcelable(configIn, 0);
-        parcel.setDataPosition(0);
-        SoftApConfiguration configOut =
-                parcel.readParcelable(SoftApConfiguration.class.getClassLoader());
-        parcel.recycle();
-        return configOut;
-    }
-
-    /**
-     * Helper method to generate random string.
-     *
-     * Note: this method has limited use as a random string generator.
-     * The characters used in this method do no not cover all valid inputs.
-     * @param length number of characters to generate for the string
-     * @return String generated string of random characters
-     */
-    private String generateRandomString(int length) {
-        Random random = new Random();
-        StringBuilder stringBuilder = new StringBuilder(length);
-        int index = -1;
-        while (stringBuilder.length() < length) {
-            index = random.nextInt(TEST_CHAR_SET_AS_STRING.length());
-            stringBuilder.append(TEST_CHAR_SET_AS_STRING.charAt(index));
-        }
-        return stringBuilder.toString();
-    }
-
-    @Test
-    public void testBasicSettings() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setSsid("ssid")
-                .setBssid(MacAddress.fromString("11:22:33:44:55:66"))
-                .build();
-        assertThat(original.getSsid()).isEqualTo("ssid");
-        assertThat(original.getBssid()).isEqualTo(MacAddress.fromString("11:22:33:44:55:66"));
-        assertThat(original.getPassphrase()).isNull();
-        assertThat(original.getSecurityType()).isEqualTo(SoftApConfiguration.SECURITY_TYPE_OPEN);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_2GHZ);
-        assertThat(original.getChannel()).isEqualTo(0);
-        assertThat(original.isHiddenSsid()).isEqualTo(false);
-        assertThat(original.getMaxNumberOfClients()).isEqualTo(0);
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-    }
-
-    @Test
-    public void testWpa2() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .build();
-        assertThat(original.getPassphrase()).isEqualTo("secretsecret");
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_2GHZ);
-        assertThat(original.getChannel()).isEqualTo(0);
-        assertThat(original.isHiddenSsid()).isEqualTo(false);
-        assertThat(original.getMaxNumberOfClients()).isEqualTo(0);
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-    }
-
-    @Test
-    public void testWpa2WithAllFieldCustomized() {
-        List<MacAddress> testBlockedClientList = new ArrayList<>();
-        List<MacAddress> testAllowedClientList = new ArrayList<>();
-        testBlockedClientList.add(MacAddress.fromString("11:22:33:44:55:66"));
-        testAllowedClientList.add(MacAddress.fromString("aa:bb:cc:dd:ee:ff"));
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .setMaxNumberOfClients(10)
-                .setAutoShutdownEnabled(true)
-                .setShutdownTimeoutMillis(500000)
-                .setClientControlByUserEnabled(true)
-                .setBlockedClientList(testBlockedClientList)
-                .setAllowedClientList(testAllowedClientList)
-                .build();
-        assertThat(original.getPassphrase()).isEqualTo("secretsecret");
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA2_PSK);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-        assertThat(original.getChannel()).isEqualTo(149);
-        assertThat(original.isHiddenSsid()).isEqualTo(true);
-        assertThat(original.getMaxNumberOfClients()).isEqualTo(10);
-        assertThat(original.isAutoShutdownEnabled()).isEqualTo(true);
-        assertThat(original.getShutdownTimeoutMillis()).isEqualTo(500000);
-        assertThat(original.isClientControlByUserEnabled()).isEqualTo(true);
-        assertThat(original.getBlockedClientList()).isEqualTo(testBlockedClientList);
-        assertThat(original.getAllowedClientList()).isEqualTo(testAllowedClientList);
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-    }
-
-    @Test
-    public void testWpa3Sae() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-        assertThat(original.getPassphrase()).isEqualTo("secretsecret");
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE);
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-        assertThat(original.getChannel()).isEqualTo(149);
-        assertThat(original.isHiddenSsid()).isEqualTo(true);
-
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-    }
-
-    @Test
-    public void testWpa3SaeTransition() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret",
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-        assertThat(original.getSecurityType()).isEqualTo(
-                SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION);
-        assertThat(original.getPassphrase()).isEqualTo("secretsecret");
-        assertThat(original.getBand()).isEqualTo(SoftApConfiguration.BAND_5GHZ);
-        assertThat(original.getChannel()).isEqualTo(149);
-        assertThat(original.isHiddenSsid()).isEqualTo(true);
-
-
-        SoftApConfiguration unparceled = parcelUnparcel(original);
-        assertThat(unparceled).isNotSameInstanceAs(original);
-        assertThat(unparceled).isEqualTo(original);
-        assertThat(unparceled.hashCode()).isEqualTo(original.hashCode());
-
-        SoftApConfiguration copy = new SoftApConfiguration.Builder(original).build();
-        assertThat(copy).isNotSameInstanceAs(original);
-        assertThat(copy).isEqualTo(original);
-        assertThat(copy.hashCode()).isEqualTo(original.hashCode());
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidShortPasswordLengthForWpa2() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MIN_LEN - 1),
-                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidLongPasswordLengthForWpa2() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MAX_LEN + 1),
-                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidShortPasswordLengthForWpa3SaeTransition() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MIN_LEN - 1),
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalidLongPasswordLengthForWpa3SaeTransition() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setPassphrase(generateRandomString(SoftApConfiguration.PSK_MAX_LEN + 1),
-                        SoftApConfiguration.SECURITY_TYPE_WPA3_SAE_TRANSITION)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testInvalieShutdownTimeoutMillis() {
-        SoftApConfiguration original = new SoftApConfiguration.Builder()
-                .setShutdownTimeoutMillis(-1)
-                .build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSetClientListExceptionWhenExistMacAddressInBothList() {
-        final MacAddress testMacAddress_1 = MacAddress.fromString("22:33:44:55:66:77");
-        final MacAddress testMacAddress_2 = MacAddress.fromString("aa:bb:cc:dd:ee:ff");
-        ArrayList<MacAddress> testAllowedClientList = new ArrayList<>();
-        testAllowedClientList.add(testMacAddress_1);
-        testAllowedClientList.add(testMacAddress_2);
-        ArrayList<MacAddress> testBlockedClientList = new ArrayList<>();
-        testBlockedClientList.add(testMacAddress_1);
-        SoftApConfiguration.Builder configBuilder = new SoftApConfiguration.Builder();
-        configBuilder.setBlockedClientList(testBlockedClientList)
-                .setAllowedClientList(testAllowedClientList)
-                .build();
-    }
-
-    @Test
-    public void testToWifiConfigurationWithUnsupportedParameter() {
-        SoftApConfiguration sae_config = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .build();
-
-        assertNull(sae_config.toWifiConfiguration());
-        SoftApConfiguration band_6g_config = new SoftApConfiguration.Builder()
-                .setBand(SoftApConfiguration.BAND_6GHZ)
-                .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
-    public void testToWifiConfigurationWithSupportedParameter() {
-        SoftApConfiguration softApConfig_2g = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret",
-                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setChannel(11, SoftApConfiguration.BAND_2GHZ)
-                .setHiddenSsid(true)
-                .build();
-        WifiConfiguration wifiConfig_2g = softApConfig_2g.toWifiConfiguration();
-        assertThat(wifiConfig_2g.getAuthType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
-        assertThat(wifiConfig_2g.preSharedKey).isEqualTo("secretsecret");
-        assertThat(wifiConfig_2g.apBand).isEqualTo(WifiConfiguration.AP_BAND_2GHZ);
-        assertThat(wifiConfig_2g.apChannel).isEqualTo(11);
-        assertThat(wifiConfig_2g.hiddenSSID).isEqualTo(true);
-
-        SoftApConfiguration softApConfig_5g = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret",
-                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setChannel(149, SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-        WifiConfiguration wifiConfig_5g = softApConfig_5g.toWifiConfiguration();
-        assertThat(wifiConfig_5g.getAuthType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
-        assertThat(wifiConfig_5g.preSharedKey).isEqualTo("secretsecret");
-        assertThat(wifiConfig_5g.apBand).isEqualTo(WifiConfiguration.AP_BAND_5GHZ);
-        assertThat(wifiConfig_5g.apChannel).isEqualTo(149);
-        assertThat(wifiConfig_5g.hiddenSSID).isEqualTo(true);
-
-        SoftApConfiguration softApConfig_2g5g = new SoftApConfiguration.Builder()
-                .setPassphrase("secretsecret",
-                        SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .setBand(SoftApConfiguration.BAND_2GHZ | SoftApConfiguration.BAND_5GHZ)
-                .setHiddenSsid(true)
-                .build();
-        WifiConfiguration wifiConfig_2g5g = softApConfig_2g5g.toWifiConfiguration();
-        assertThat(wifiConfig_2g5g.getAuthType()).isEqualTo(WifiConfiguration.KeyMgmt.WPA2_PSK);
-        assertThat(wifiConfig_2g5g.preSharedKey).isEqualTo("secretsecret");
-        assertThat(wifiConfig_2g5g.apBand).isEqualTo(WifiConfiguration.AP_BAND_ANY);
-        assertThat(wifiConfig_2g5g.apChannel).isEqualTo(0);
-        assertThat(wifiConfig_2g5g.hiddenSSID).isEqualTo(true);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/SoftApInfoTest.java b/wifi/tests/src/android/net/wifi/SoftApInfoTest.java
deleted file mode 100644
index 929f3ab..0000000
--- a/wifi/tests/src/android/net/wifi/SoftApInfoTest.java
+++ /dev/null
@@ -1,71 +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;
-
-import android.os.Parcel;
-
-import static org.junit.Assert.assertEquals;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.SoftApInfo}.
- */
-@SmallTest
-public class SoftApInfoTest {
-
-    /**
-     * Verifies copy constructor.
-     */
-    @Test
-    public void testCopyOperator() throws Exception {
-        SoftApInfo info = new SoftApInfo();
-        info.setFrequency(2412);
-        info.setBandwidth(SoftApInfo.CHANNEL_WIDTH_20MHZ);
-
-        SoftApInfo copiedInfo = new SoftApInfo(info);
-
-        assertEquals(info, copiedInfo);
-        assertEquals(info.hashCode(), copiedInfo.hashCode());
-    }
-
-    /**
-     * Verifies parcel serialization/deserialization.
-     */
-    @Test
-    public void testParcelOperation() throws Exception {
-        SoftApInfo info = new SoftApInfo();
-        info.setFrequency(2412);
-        info.setBandwidth(SoftApInfo.CHANNEL_WIDTH_20MHZ);
-
-        Parcel parcelW = Parcel.obtain();
-        info.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        SoftApInfo fromParcel = SoftApInfo.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(info, fromParcel);
-        assertEquals(info.hashCode(), fromParcel.hashCode());
-    }
-
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiClientTest.java b/wifi/tests/src/android/net/wifi/WifiClientTest.java
deleted file mode 100644
index 7a3baf9..0000000
--- a/wifi/tests/src/android/net/wifi/WifiClientTest.java
+++ /dev/null
@@ -1,75 +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;
-
-import static com.android.testutils.MiscAsserts.assertFieldCountEquals;
-import static com.android.testutils.ParcelUtils.assertParcelSane;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
-
-import android.net.MacAddress;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiClient}.
- */
-@SmallTest
-public class WifiClientTest {
-    private static final String INTERFACE_NAME = "wlan0";
-    private static final String MAC_ADDRESS_STRING = "00:0a:95:9d:68:16";
-    private static final MacAddress MAC_ADDRESS = MacAddress.fromString(MAC_ADDRESS_STRING);
-
-    /**
-     *  Verify parcel write/read with WifiClient.
-     */
-    @Test
-    public void testWifiClientParcelWriteRead() throws Exception {
-        WifiClient writeWifiClient = new WifiClient(MAC_ADDRESS);
-
-        assertParcelSane(writeWifiClient, 1);
-    }
-
-    /**
-     *  Verify equals with WifiClient.
-     */
-    @Test
-    public void testWifiClientEquals() throws Exception {
-        WifiClient writeWifiClient = new WifiClient(MAC_ADDRESS);
-        WifiClient writeWifiClientEquals = new WifiClient(MAC_ADDRESS);
-
-        assertEquals(writeWifiClient, writeWifiClientEquals);
-        assertEquals(writeWifiClient.hashCode(), writeWifiClientEquals.hashCode());
-        assertFieldCountEquals(1, WifiClient.class);
-    }
-
-    /**
-     *  Verify not-equals with WifiClient.
-     */
-    @Test
-    public void testWifiClientNotEquals() throws Exception {
-        final MacAddress macAddressNotEquals = MacAddress.fromString("00:00:00:00:00:00");
-        WifiClient writeWifiClient = new WifiClient(MAC_ADDRESS);
-        WifiClient writeWifiClientNotEquals = new WifiClient(macAddressNotEquals);
-
-        assertNotEquals(writeWifiClient, writeWifiClientNotEquals);
-        assertNotEquals(writeWifiClient.hashCode(), writeWifiClientNotEquals.hashCode());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java b/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java
deleted file mode 100644
index a7b6765..0000000
--- a/wifi/tests/src/android/net/wifi/WifiConfigurationTest.java
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_EAP_SUITE_B;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_OPEN;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_OWE;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_PSK;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_SAE;
-import static android.net.wifi.WifiConfiguration.SECURITY_TYPE_WAPI_PSK;
-
-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.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import android.net.MacAddress;
-import android.net.util.MacAddressUtils;
-import android.net.wifi.WifiConfiguration.KeyMgmt;
-import android.net.wifi.WifiConfiguration.NetworkSelectionStatus;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiConfiguration}.
- */
-@SmallTest
-public class WifiConfigurationTest {
-
-    @Before
-    public void setUp() {
-    }
-
-    /**
-     * Check that parcel marshalling/unmarshalling works
-     *
-     * Create and populate a WifiConfiguration.
-     * Marshall and unmashall it, and expect to recover a copy of the original.
-     * Marshall the resulting object, and expect the bytes to match the
-     * first marshall result.
-     */
-    @Test
-    public void testWifiConfigurationParcel() {
-        String cookie = "C O.o |<IE";
-        WifiConfiguration config = new WifiConfiguration();
-        config.setPasspointManagementObjectTree(cookie);
-        config.trusted = false;
-        config.updateIdentifier = "1234";
-        config.fromWifiNetworkSpecifier = true;
-        config.fromWifiNetworkSuggestion = true;
-        config.setRandomizedMacAddress(MacAddressUtils.createRandomUnicastAddress());
-        MacAddress macBeforeParcel = config.getRandomizedMacAddress();
-        Parcel parcelW = Parcel.obtain();
-        config.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiConfiguration reconfig = WifiConfiguration.CREATOR.createFromParcel(parcelR);
-
-        // lacking a useful config.equals, check two fields near the end.
-        assertEquals(cookie, reconfig.getMoTree());
-        assertEquals(macBeforeParcel, reconfig.getRandomizedMacAddress());
-        assertEquals(config.updateIdentifier, reconfig.updateIdentifier);
-        assertFalse(reconfig.trusted);
-        assertTrue(config.fromWifiNetworkSpecifier);
-        assertTrue(config.fromWifiNetworkSuggestion);
-
-        Parcel parcelWW = Parcel.obtain();
-        reconfig.writeToParcel(parcelWW, 0);
-        byte[] rebytes = parcelWW.marshall();
-        parcelWW.recycle();
-
-        assertArrayEquals(bytes, rebytes);
-    }
-
-    @Test
-    public void testIsOpenNetwork_IsOpen_NullWepKeys() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.clear();
-        config.wepKeys = null;
-
-        assertTrue(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testIsOpenNetwork_IsOpen_ZeroLengthWepKeysArray() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.clear();
-        config.wepKeys = new String[0];
-
-        assertTrue(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testIsOpenNetwork_IsOpen_NullWepKeysArray() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.clear();
-        config.wepKeys = new String[1];
-
-        assertTrue(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testIsOpenNetwork_NotOpen_HasWepKeys() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.clear();
-        config.wepKeys = new String[] {"test"};
-
-        assertFalse(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testIsOpenNetwork_NotOpen_HasNullWepKeyFollowedByNonNullKey() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.clear();
-        config.wepKeys = new String[] {null, null, "test"};
-
-        assertFalse(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testIsOpenNetwork_NotOpen_HasAuthType() {
-        for (int keyMgmt = 0; keyMgmt < WifiConfiguration.KeyMgmt.strings.length; keyMgmt++) {
-            if (keyMgmt == WifiConfiguration.KeyMgmt.NONE
-                    || keyMgmt == WifiConfiguration.KeyMgmt.OWE) {
-                continue;
-            }
-            WifiConfiguration config = new WifiConfiguration();
-            config.allowedKeyManagement.clear();
-            config.allowedKeyManagement.set(keyMgmt);
-            config.wepKeys = null;
-
-            assertFalse("Open network reported when key mgmt was set to "
-                            + WifiConfiguration.KeyMgmt.strings[keyMgmt], config.isOpenNetwork());
-        }
-    }
-
-    @Test
-    public void testIsOpenNetwork_NotOpen_HasAuthTypeNoneAndMore() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
-        config.wepKeys = null;
-
-        assertFalse(config.isOpenNetwork());
-    }
-
-    @Test
-    public void testSetRandomizedMacAddress_ChangesSavedAddress() {
-        WifiConfiguration config = new WifiConfiguration();
-        MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
-        assertEquals(defaultMac, config.getRandomizedMacAddress());
-
-        MacAddress macToChangeInto = MacAddressUtils.createRandomUnicastAddress();
-        config.setRandomizedMacAddress(macToChangeInto);
-        MacAddress macAfterChange = config.getRandomizedMacAddress();
-
-        assertEquals(macToChangeInto, macAfterChange);
-    }
-
-    @Test
-    public void testSetRandomizedMacAddress_DoesNothingWhenNull() {
-        WifiConfiguration config = new WifiConfiguration();
-        MacAddress defaultMac = MacAddress.fromString(WifiInfo.DEFAULT_MAC_ADDRESS);
-        config.setRandomizedMacAddress(null);
-        assertEquals(defaultMac, config.getRandomizedMacAddress());
-    }
-
-    /**
-     * Verifies that updateIdentifier should be copied for copy constructor.
-     */
-    @Test
-    public void testUpdateIdentifierForCopyConstructor() {
-        WifiConfiguration config = new WifiConfiguration();
-        config.updateIdentifier = "1234";
-        WifiConfiguration copyConfig = new WifiConfiguration(config);
-
-        assertEquals(config.updateIdentifier, copyConfig.updateIdentifier);
-    }
-
-    /**
-     * Verifies that getKeyIdForCredentials returns the expected string for Enterprise networks
-     * @throws Exception
-     */
-    @Test
-    public void testGetKeyIdForCredentials() throws Exception {
-        WifiConfiguration config = new WifiConfiguration();
-        final String mSsid = "TestAP";
-        config.SSID = mSsid;
-
-        // Test various combinations
-        // EAP with TLS
-        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE);
-        String keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_WPA_EAP_TLS_NULL");
-
-        // EAP with TTLS & MSCHAPv2
-        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TTLS);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAPV2);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_WPA_EAP_TTLS_MSCHAPV2");
-
-        // Suite-B 192 with PWD & GTC
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.SUITE_B_192);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.PWD);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_SUITE_B_192_PWD_GTC");
-
-        // IEEE8021X with SIM
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_IEEE8021X_SIM_NULL");
-
-        // Try calling this method with non-Enterprise network, expect an exception
-        boolean exceptionThrown = false;
-        try {
-            config.allowedKeyManagement.clear();
-            config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK);
-            config.preSharedKey = "TestPsk";
-            keyId = config.getKeyIdForCredentials(config);
-        } catch (IllegalStateException e) {
-            exceptionThrown = true;
-        }
-        assertTrue(exceptionThrown);
-    }
-
-    /**
-     * Verifies that getKeyIdForCredentials returns the expected string for Suggestion Enterprise
-     * networks
-     * @throws Exception
-     */
-    @Test
-    public void testGetKeyIdForCredentialsForSuggestion() throws Exception {
-        WifiConfiguration config = new WifiConfiguration();
-        final String mSsid = "TestAP";
-        final String packageName = "TestApp";
-        final String bSsid = MacAddressUtils.createRandomUnicastAddress().toString();
-        String suggestionSuffix = "_" + bSsid + "_" + packageName;
-        config.SSID = mSsid;
-        config.fromWifiNetworkSuggestion = true;
-        config.creatorName = packageName;
-        config.BSSID = bSsid;
-
-        // Test various combinations
-        // EAP with TLS
-        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE);
-        String keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_WPA_EAP_TLS_NULL" + suggestionSuffix);
-
-        // EAP with TTLS & MSCHAPv2
-        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TTLS);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.MSCHAPV2);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_WPA_EAP_TTLS_MSCHAPV2" + suggestionSuffix);
-
-        // Suite-B 192 with PWD & GTC
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.SUITE_B_192);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.PWD);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_SUITE_B_192_PWD_GTC" + suggestionSuffix);
-
-        // IEEE8021X with SIM
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.IEEE8021X);
-        config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.SIM);
-        config.enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.NONE);
-        keyId = config.getKeyIdForCredentials(config);
-        assertEquals(keyId, mSsid + "_IEEE8021X_SIM_NULL" + suggestionSuffix);
-
-        // Try calling this method with non-Enterprise network, expect an exception
-        boolean exceptionThrown = false;
-        try {
-            config.allowedKeyManagement.clear();
-            config.allowedKeyManagement.set(KeyMgmt.WPA2_PSK);
-            config.preSharedKey = "TestPsk";
-            keyId = config.getKeyIdForCredentials(config);
-        } catch (IllegalStateException e) {
-            exceptionThrown = true;
-        }
-        assertTrue(exceptionThrown);
-    }
-
-    /**
-     * Verifies that getSsidAndSecurityTypeString returns the correct String for networks of
-     * various different security types
-     */
-    @Test
-    public void testGetSsidAndSecurityTypeString() {
-        WifiConfiguration config = new WifiConfiguration();
-        final String mSsid = "TestAP";
-        config.SSID = mSsid;
-
-        // Test various combinations
-        config.allowedKeyManagement.set(KeyMgmt.WPA_PSK);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.WPA_PSK],
-                config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.WPA_EAP);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.WPA_EAP],
-                config.getSsidAndSecurityTypeString());
-
-        config.wepKeys[0] = "TestWep";
-        config.allowedKeyManagement.clear();
-        assertEquals(mSsid + "WEP", config.getSsidAndSecurityTypeString());
-
-        // set WEP key and give a valid index.
-        config.wepKeys[0] = null;
-        config.wepKeys[2] = "TestWep";
-        config.wepTxKeyIndex = 2;
-        config.allowedKeyManagement.clear();
-        assertEquals(mSsid + "WEP", config.getSsidAndSecurityTypeString());
-
-        // set WEP key but does not give a valid index.
-        config.wepKeys[0] = null;
-        config.wepKeys[2] = "TestWep";
-        config.wepTxKeyIndex = 0;
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.OWE);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.OWE], config.getSsidAndSecurityTypeString());
-
-        config.wepKeys[0] = null;
-        config.wepTxKeyIndex = 0;
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.OWE);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.OWE], config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.SAE);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.SAE], config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.SUITE_B_192);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.SUITE_B_192],
-                config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.NONE);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.NONE], config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.WAPI_PSK);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.WAPI_PSK],
-                config.getSsidAndSecurityTypeString());
-
-        config.allowedKeyManagement.clear();
-        config.allowedKeyManagement.set(KeyMgmt.WAPI_CERT);
-        assertEquals(mSsid + KeyMgmt.strings[KeyMgmt.WAPI_CERT],
-                config.getSsidAndSecurityTypeString());
-    }
-
-    /**
-     * Ensure that the {@link NetworkSelectionStatus.DisableReasonInfo}s are populated in
-     * {@link NetworkSelectionStatus#DISABLE_REASON_INFOS} for reason codes from 0 to
-     * {@link NetworkSelectionStatus#NETWORK_SELECTION_DISABLED_MAX} - 1.
-     */
-    @Test
-    public void testNetworkSelectionDisableReasonInfosPopulated() {
-        assertEquals(NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX,
-                NetworkSelectionStatus.DISABLE_REASON_INFOS.size());
-        for (int i = 0; i < NetworkSelectionStatus.NETWORK_SELECTION_DISABLED_MAX; i++) {
-            assertNotNull(NetworkSelectionStatus.DISABLE_REASON_INFOS.get(i));
-        }
-    }
-
-    /**
-     * Ensure that {@link NetworkSelectionStatus#getMaxNetworkSelectionDisableReason()} returns
-     * the maximum disable reason.
-     */
-    @Test
-    public void testNetworkSelectionGetMaxNetworkSelectionDisableReason() {
-        int maxReason = Integer.MIN_VALUE;
-        for (int i = 0; i < NetworkSelectionStatus.DISABLE_REASON_INFOS.size(); i++) {
-            int reason = NetworkSelectionStatus.DISABLE_REASON_INFOS.keyAt(i);
-            maxReason = Math.max(maxReason, reason);
-        }
-        assertEquals(maxReason, NetworkSelectionStatus.getMaxNetworkSelectionDisableReason());
-    }
-
-    /**
-     * Ensure that {@link WifiConfiguration#setSecurityParams(int)} sets up the
-     * {@link WifiConfiguration} object correctly for SAE security type.
-     * @throws Exception
-     */
-    @Test
-    public void testSetSecurityParamsForSae() throws Exception {
-        WifiConfiguration config = new WifiConfiguration();
-
-        config.setSecurityParams(SECURITY_TYPE_SAE);
-
-        assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SAE));
-        assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.CCMP));
-        assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256));
-        assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.CCMP));
-        assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256));
-        assertTrue(config.requirePmf);
-    }
-
-    /**
-     * Ensure that {@link WifiConfiguration#setSecurityParams(int)} sets up the
-     * {@link WifiConfiguration} object correctly for OWE security type.
-     * @throws Exception
-     */
-    @Test
-    public void testSetSecurityParamsForOwe() throws Exception {
-        WifiConfiguration config = new WifiConfiguration();
-
-        config.setSecurityParams(SECURITY_TYPE_OWE);
-
-        assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.OWE));
-        assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.CCMP));
-        assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256));
-        assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.CCMP));
-        assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256));
-        assertTrue(config.requirePmf);
-    }
-
-    /**
-     * Ensure that {@link WifiConfiguration#setSecurityParams(int)} sets up the
-     * {@link WifiConfiguration} object correctly for Suite-B security type.
-     * @throws Exception
-     */
-    @Test
-    public void testSetSecurityParamsForSuiteB() throws Exception {
-        WifiConfiguration config = new WifiConfiguration();
-
-        config.setSecurityParams(SECURITY_TYPE_EAP_SUITE_B);
-
-        assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.SUITE_B_192));
-        assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_EAP));
-        assertTrue(config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.IEEE8021X));
-        assertTrue(config.allowedPairwiseCiphers.get(WifiConfiguration.PairwiseCipher.GCMP_256));
-        assertTrue(config.allowedGroupCiphers.get(WifiConfiguration.GroupCipher.GCMP_256));
-        assertTrue(config.allowedGroupManagementCiphers
-                .get(WifiConfiguration.GroupMgmtCipher.BIP_GMAC_256));
-        assertTrue(config.requirePmf);
-    }
-
-    /**
-     * Test that the NetworkSelectionStatus Builder returns the same values that was set, and that
-     * calling build multiple times returns different instances.
-     */
-    @Test
-    public void testNetworkSelectionStatusBuilder() throws Exception {
-        NetworkSelectionStatus.Builder builder = new NetworkSelectionStatus.Builder()
-                .setNetworkSelectionDisableReason(
-                        NetworkSelectionStatus.DISABLED_ASSOCIATION_REJECTION)
-                .setNetworkSelectionStatus(
-                        NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED);
-
-        NetworkSelectionStatus status1 = builder.build();
-
-        assertEquals(NetworkSelectionStatus.DISABLED_ASSOCIATION_REJECTION,
-                status1.getNetworkSelectionDisableReason());
-        assertEquals(NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED,
-                status1.getNetworkSelectionStatus());
-
-        NetworkSelectionStatus status2 = builder
-                .setNetworkSelectionDisableReason(NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD)
-                .build();
-
-        // different instances
-        assertNotSame(status1, status2);
-
-        // assert that status1 didn't change
-        assertEquals(NetworkSelectionStatus.DISABLED_ASSOCIATION_REJECTION,
-                status1.getNetworkSelectionDisableReason());
-        assertEquals(NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED,
-                status1.getNetworkSelectionStatus());
-
-        // assert that status2 changed
-        assertEquals(NetworkSelectionStatus.DISABLED_BY_WRONG_PASSWORD,
-                status2.getNetworkSelectionDisableReason());
-        assertEquals(NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED,
-                status2.getNetworkSelectionStatus());
-    }
-
-    @Test
-    public void testNeedsPreSharedKey() throws Exception {
-        WifiConfiguration configuration = new WifiConfiguration();
-
-        configuration.setSecurityParams(SECURITY_TYPE_PSK);
-        assertTrue(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_SAE);
-        assertTrue(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_WAPI_PSK);
-        assertTrue(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_OPEN);
-        assertFalse(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_OWE);
-        assertFalse(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_EAP);
-        assertFalse(configuration.needsPreSharedKey());
-
-        configuration.setSecurityParams(SECURITY_TYPE_EAP_SUITE_B);
-        assertFalse(configuration.needsPreSharedKey());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java b/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
deleted file mode 100644
index 62485ec..0000000
--- a/wifi/tests/src/android/net/wifi/WifiEnterpriseConfigTest.java
+++ /dev/null
@@ -1,577 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi;
-
-import static org.junit.Assert.assertArrayEquals;
-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;
-import static org.junit.Assert.fail;
-
-import android.net.wifi.WifiEnterpriseConfig.Eap;
-import android.net.wifi.WifiEnterpriseConfig.Phase2;
-import android.os.Parcel;
-import android.security.Credentials;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiEnterpriseConfig}.
- */
-@SmallTest
-public class WifiEnterpriseConfigTest {
-    // Maintain a ground truth of the keystore uri prefix which is expected by wpa_supplicant.
-    public static final String KEYSTORE_URI = "keystore://";
-    public static final String CA_CERT_PREFIX = KEYSTORE_URI + Credentials.CA_CERTIFICATE;
-    public static final String KEYSTORES_URI = "keystores://";
-    private static final String TEST_DOMAIN_SUFFIX_MATCH = "domainSuffixMatch";
-
-    private WifiEnterpriseConfig mEnterpriseConfig;
-
-    @Before
-    public void setUp() throws Exception {
-        mEnterpriseConfig = new WifiEnterpriseConfig();
-    }
-
-    @Test
-    public void testGetEmptyCaCertificate() {
-        // A newly-constructed WifiEnterpriseConfig object should have no CA certificate.
-        assertNull(mEnterpriseConfig.getCaCertificate());
-        assertNull(mEnterpriseConfig.getCaCertificates());
-        // Setting CA certificate to null explicitly.
-        mEnterpriseConfig.setCaCertificate(null);
-        assertNull(mEnterpriseConfig.getCaCertificate());
-        // Setting CA certificate to null using setCaCertificates().
-        mEnterpriseConfig.setCaCertificates(null);
-        assertNull(mEnterpriseConfig.getCaCertificates());
-        // Setting CA certificate to zero-length array.
-        mEnterpriseConfig.setCaCertificates(new X509Certificate[0]);
-        assertNull(mEnterpriseConfig.getCaCertificates());
-    }
-
-    @Test
-    public void testSetGetSingleCaCertificate() {
-        X509Certificate cert0 = FakeKeys.CA_CERT0;
-        mEnterpriseConfig.setCaCertificate(cert0);
-        assertEquals(mEnterpriseConfig.getCaCertificate(), cert0);
-    }
-
-    @Test
-    public void testSetGetMultipleCaCertificates() {
-        X509Certificate cert0 = FakeKeys.CA_CERT0;
-        X509Certificate cert1 = FakeKeys.CA_CERT1;
-        mEnterpriseConfig.setCaCertificates(new X509Certificate[] {cert0, cert1});
-        X509Certificate[] result = mEnterpriseConfig.getCaCertificates();
-        assertEquals(result.length, 2);
-        assertTrue(result[0] == cert0 && result[1] == cert1);
-    }
-
-    @Test
-    public void testSetClientKeyEntryWithNull() {
-        mEnterpriseConfig.setClientKeyEntry(null, null);
-        assertNull(mEnterpriseConfig.getClientCertificateChain());
-        assertNull(mEnterpriseConfig.getClientCertificate());
-        mEnterpriseConfig.setClientKeyEntryWithCertificateChain(null, null);
-        assertNull(mEnterpriseConfig.getClientCertificateChain());
-        assertNull(mEnterpriseConfig.getClientCertificate());
-
-        // Setting the client certificate to null should clear the existing chain.
-        PrivateKey clientKey = FakeKeys.RSA_KEY1;
-        X509Certificate clientCert0 = FakeKeys.CLIENT_CERT;
-        X509Certificate clientCert1 = FakeKeys.CA_CERT1;
-        mEnterpriseConfig.setClientKeyEntry(clientKey, clientCert0);
-        assertNotNull(mEnterpriseConfig.getClientCertificate());
-        mEnterpriseConfig.setClientKeyEntry(null, null);
-        assertNull(mEnterpriseConfig.getClientCertificate());
-        assertNull(mEnterpriseConfig.getClientCertificateChain());
-
-        // Setting the chain to null should clear the existing chain.
-        X509Certificate[] clientChain = new X509Certificate[] {clientCert0, clientCert1};
-        mEnterpriseConfig.setClientKeyEntryWithCertificateChain(clientKey, clientChain);
-        assertNotNull(mEnterpriseConfig.getClientCertificateChain());
-        mEnterpriseConfig.setClientKeyEntryWithCertificateChain(null, null);
-        assertNull(mEnterpriseConfig.getClientCertificate());
-        assertNull(mEnterpriseConfig.getClientCertificateChain());
-    }
-
-    @Test
-    public void testSetClientCertificateChain() {
-        PrivateKey clientKey = FakeKeys.RSA_KEY1;
-        X509Certificate cert0 = FakeKeys.CLIENT_CERT;
-        X509Certificate cert1 = FakeKeys.CA_CERT1;
-        X509Certificate[] clientChain = new X509Certificate[] {cert0, cert1};
-        mEnterpriseConfig.setClientKeyEntryWithCertificateChain(clientKey, clientChain);
-        X509Certificate[] result = mEnterpriseConfig.getClientCertificateChain();
-        assertEquals(result.length, 2);
-        assertTrue(result[0] == cert0 && result[1] == cert1);
-        assertTrue(mEnterpriseConfig.getClientCertificate() == cert0);
-    }
-
-    private boolean isClientCertificateChainInvalid(X509Certificate[] clientChain) {
-        boolean exceptionThrown = false;
-        try {
-            PrivateKey clientKey = FakeKeys.RSA_KEY1;
-            mEnterpriseConfig.setClientKeyEntryWithCertificateChain(clientKey, clientChain);
-        } catch (IllegalArgumentException e) {
-            exceptionThrown = true;
-        }
-        return exceptionThrown;
-    }
-
-    @Test
-    public void testSetInvalidClientCertificateChain() {
-        X509Certificate clientCert = FakeKeys.CLIENT_CERT;
-        X509Certificate caCert = FakeKeys.CA_CERT1;
-        assertTrue("Invalid client certificate",
-                isClientCertificateChainInvalid(new X509Certificate[] {caCert, caCert}));
-        assertTrue("Invalid CA certificate",
-                isClientCertificateChainInvalid(new X509Certificate[] {clientCert, clientCert}));
-        assertTrue("Both certificates invalid",
-                isClientCertificateChainInvalid(new X509Certificate[] {caCert, clientCert}));
-    }
-
-    @Test
-    public void testSaveSingleCaCertificateAlias() {
-        final String alias = "single_alias 0";
-        mEnterpriseConfig.setCaCertificateAliases(new String[] {alias});
-        assertEquals(getCaCertField(), CA_CERT_PREFIX + alias);
-    }
-
-    @Test
-    public void testLoadSingleCaCertificateAlias() {
-        final String alias = "single_alias 1";
-        setCaCertField(CA_CERT_PREFIX + alias);
-        String[] aliases = mEnterpriseConfig.getCaCertificateAliases();
-        assertEquals(aliases.length, 1);
-        assertEquals(aliases[0], alias);
-    }
-
-    @Test
-    public void testSaveMultipleCaCertificates() {
-        final String alias0 = "single_alias 0";
-        final String alias1 = "single_alias 1";
-        mEnterpriseConfig.setCaCertificateAliases(new String[] {alias0, alias1});
-        assertEquals(getCaCertField(), String.format("%s%s %s",
-                KEYSTORES_URI,
-                WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias0),
-                WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias1)));
-    }
-
-    @Test
-    public void testLoadMultipleCaCertificates() {
-        final String alias0 = "single_alias 0";
-        final String alias1 = "single_alias 1";
-        setCaCertField(String.format("%s%s %s",
-                KEYSTORES_URI,
-                WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias0),
-                WifiEnterpriseConfig.encodeCaCertificateAlias(Credentials.CA_CERTIFICATE + alias1)));
-        String[] aliases = mEnterpriseConfig.getCaCertificateAliases();
-        assertEquals(aliases.length, 2);
-        assertEquals(aliases[0], alias0);
-        assertEquals(aliases[1], alias1);
-    }
-
-    private String getCaCertField() {
-        return mEnterpriseConfig.getFieldValue(WifiEnterpriseConfig.CA_CERT_KEY);
-    }
-
-    private void setCaCertField(String value) {
-        mEnterpriseConfig.setFieldValue(WifiEnterpriseConfig.CA_CERT_KEY, value);
-    }
-
-    // Retrieves the value for a specific key supplied to wpa_supplicant.
-    private class SupplicantConfigExtractor implements WifiEnterpriseConfig.SupplicantSaver {
-        private String mValue = null;
-        private String mKey;
-
-        SupplicantConfigExtractor(String key) {
-            mKey = key;
-        }
-
-        @Override
-        public boolean saveValue(String key, String value) {
-            if (key.equals(mKey)) {
-                mValue = value;
-            }
-            return true;
-        }
-
-        public String getValue() {
-            return mValue;
-        }
-    }
-
-    private String getSupplicantEapMethod() {
-        SupplicantConfigExtractor entryExtractor = new SupplicantConfigExtractor(
-                WifiEnterpriseConfig.EAP_KEY);
-        mEnterpriseConfig.saveToSupplicant(entryExtractor);
-        return entryExtractor.getValue();
-    }
-
-    private String getSupplicantPhase2Method() {
-        SupplicantConfigExtractor entryExtractor = new SupplicantConfigExtractor(
-                WifiEnterpriseConfig.PHASE2_KEY);
-        mEnterpriseConfig.saveToSupplicant(entryExtractor);
-        return entryExtractor.getValue();
-    }
-
-    /** Verifies the default value for EAP outer and inner methods */
-    @Test
-    public void eapInnerDefault() {
-        assertEquals(null, getSupplicantEapMethod());
-        assertEquals(null, getSupplicantPhase2Method());
-    }
-
-    /** Verifies that the EAP inner method is reset when we switch to TLS */
-    @Test
-    public void eapPhase2MethodForTls() {
-        // Initially select an EAP method that supports an phase2.
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.MSCHAPV2);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method());
-
-        // Change the EAP method to another type which supports a phase2.
-        mEnterpriseConfig.setEapMethod(Eap.TTLS);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method());
-
-        // Change the EAP method to TLS which does not support a phase2.
-        mEnterpriseConfig.setEapMethod(Eap.TLS);
-        assertEquals(null, getSupplicantPhase2Method());
-    }
-
-    /** Verfies that the EAP inner method is reset when we switch phase2 to NONE */
-    @Test
-    public void eapPhase2None() {
-        // Initially select an EAP method that supports an phase2.
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.MSCHAPV2);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method());
-
-        // Change the phase2 method to NONE and ensure the value is cleared.
-        mEnterpriseConfig.setPhase2Method(Phase2.NONE);
-        assertEquals(null, getSupplicantPhase2Method());
-    }
-
-    /** Verfies that the correct "autheap" parameter is supplied for TTLS/GTC. */
-    @Test
-    public void peapGtcToTtls() {
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.GTC);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=GTC\"", getSupplicantPhase2Method());
-
-        mEnterpriseConfig.setEapMethod(Eap.TTLS);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"autheap=GTC\"", getSupplicantPhase2Method());
-    }
-
-    /** Verfies that the correct "auth" parameter is supplied for PEAP/GTC. */
-    @Test
-    public void ttlsGtcToPeap() {
-        mEnterpriseConfig.setEapMethod(Eap.TTLS);
-        mEnterpriseConfig.setPhase2Method(Phase2.GTC);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"autheap=GTC\"", getSupplicantPhase2Method());
-
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=GTC\"", getSupplicantPhase2Method());
-    }
-
-    /** Verfies PEAP/SIM, PEAP/AKA, PEAP/AKA'. */
-    @Test
-    public void peapSimAkaAkaPrime() {
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.SIM);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=SIM\"", getSupplicantPhase2Method());
-
-        mEnterpriseConfig.setPhase2Method(Phase2.AKA);
-        assertEquals("\"auth=AKA\"", getSupplicantPhase2Method());
-
-        mEnterpriseConfig.setPhase2Method(Phase2.AKA_PRIME);
-        assertEquals("\"auth=AKA'\"", getSupplicantPhase2Method());
-    }
-
-    /**
-     * Verifies that the copy constructor preseves both the masked password and inner method
-     * information.
-     */
-    @Test
-    public void copyConstructor() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setPassword("*");
-        enterpriseConfig.setEapMethod(Eap.TTLS);
-        enterpriseConfig.setPhase2Method(Phase2.GTC);
-        mEnterpriseConfig = new WifiEnterpriseConfig(enterpriseConfig);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"autheap=GTC\"", getSupplicantPhase2Method());
-        assertEquals("*", mEnterpriseConfig.getPassword());
-    }
-
-    /**
-     * Verifies that the copy from external ignores masked passwords and preserves the
-     * inner method information.
-     */
-    @Test
-    public void copyFromExternal() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setPassword("*");
-        enterpriseConfig.setEapMethod(Eap.TTLS);
-        enterpriseConfig.setPhase2Method(Phase2.GTC);
-        enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS);
-        mEnterpriseConfig = new WifiEnterpriseConfig();
-        mEnterpriseConfig.copyFromExternal(enterpriseConfig, "*");
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"autheap=GTC\"", getSupplicantPhase2Method());
-        assertNotEquals("*", mEnterpriseConfig.getPassword());
-        assertEquals(enterpriseConfig.getOcsp(), mEnterpriseConfig.getOcsp());
-    }
-
-    /** Verfies that parceling a WifiEnterpriseConfig preseves method information. */
-    @Test
-    public void parcelConstructor() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(Eap.TTLS);
-        enterpriseConfig.setPhase2Method(Phase2.GTC);
-        Parcel parcel = Parcel.obtain();
-        enterpriseConfig.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);  // Allow parcel to be read from the beginning.
-        mEnterpriseConfig = WifiEnterpriseConfig.CREATOR.createFromParcel(parcel);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"autheap=GTC\"", getSupplicantPhase2Method());
-    }
-
-    /**
-     * Verifies that parceling a WifiEnterpriseConfig preserves the key
-     * and certificates information.
-     */
-    @Test
-    public void parcelConfigWithKeyAndCerts() throws Exception {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        PrivateKey clientKey = FakeKeys.RSA_KEY1;
-        X509Certificate clientCert = FakeKeys.CLIENT_CERT;
-        X509Certificate[] caCerts = new X509Certificate[] {FakeKeys.CA_CERT0, FakeKeys.CA_CERT1};
-        enterpriseConfig.setClientKeyEntry(clientKey, clientCert);
-        enterpriseConfig.setCaCertificates(caCerts);
-        Parcel parcel = Parcel.obtain();
-        enterpriseConfig.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);  // Allow parcel to be read from the beginning.
-        mEnterpriseConfig = WifiEnterpriseConfig.CREATOR.createFromParcel(parcel);
-        PrivateKey actualClientKey = mEnterpriseConfig.getClientPrivateKey();
-        X509Certificate actualClientCert = mEnterpriseConfig.getClientCertificate();
-        X509Certificate[] actualCaCerts = mEnterpriseConfig.getCaCertificates();
-
-        /* Verify client private key. */
-        assertNotNull(actualClientKey);
-        assertEquals(clientKey.getAlgorithm(), actualClientKey.getAlgorithm());
-        assertArrayEquals(clientKey.getEncoded(), actualClientKey.getEncoded());
-
-        /* Verify client certificate. */
-        assertNotNull(actualClientCert);
-        assertArrayEquals(clientCert.getEncoded(), actualClientCert.getEncoded());
-
-        /* Verify CA certificates. */
-        assertNotNull(actualCaCerts);
-        assertEquals(caCerts.length, actualCaCerts.length);
-        for (int i = 0; i < caCerts.length; i++) {
-            assertNotNull(actualCaCerts[i]);
-            assertArrayEquals(caCerts[i].getEncoded(), actualCaCerts[i].getEncoded());
-        }
-    }
-
-    /** Verifies proper operation of the getKeyId() method. */
-    @Test
-    public void getKeyId() {
-        assertEquals("NULL", mEnterpriseConfig.getKeyId(null));
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(Eap.TTLS);
-        enterpriseConfig.setPhase2Method(Phase2.GTC);
-        assertEquals("TTLS_GTC", mEnterpriseConfig.getKeyId(enterpriseConfig));
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.MSCHAPV2);
-        assertEquals("PEAP_MSCHAPV2", mEnterpriseConfig.getKeyId(enterpriseConfig));
-    }
-
-    /** Verifies that passwords are not displayed in toString. */
-    @Test
-    public void passwordNotInToString() {
-        String password = "supersecret";
-        mEnterpriseConfig.setPassword(password);
-        assertFalse(mEnterpriseConfig.toString().contains(password));
-    }
-
-    /** Verifies that certificate ownership flag is set correctly */
-    @Test
-    public void testIsAppInstalledDeviceKeyAndCert() {
-        // First make sure that app didn't install anything
-        assertFalse(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertFalse(mEnterpriseConfig.isAppInstalledCaCert());
-
-        // Then app loads keys via the enterprise config API
-        PrivateKey clientKey = FakeKeys.RSA_KEY1;
-        X509Certificate cert0 = FakeKeys.CLIENT_CERT;
-        X509Certificate cert1 = FakeKeys.CA_CERT1;
-        X509Certificate[] clientChain = new X509Certificate[] {cert0, cert1};
-        mEnterpriseConfig.setClientKeyEntryWithCertificateChain(clientKey, clientChain);
-        X509Certificate[] result = mEnterpriseConfig.getClientCertificateChain();
-        assertEquals(result.length, 2);
-        assertTrue(result[0] == cert0 && result[1] == cert1);
-        assertTrue(mEnterpriseConfig.getClientCertificate() == cert0);
-
-        // Make sure it is the owner now
-        assertTrue(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertFalse(mEnterpriseConfig.isAppInstalledCaCert());
-    }
-
-    /** Verifies that certificate ownership flag is set correctly */
-    @Test
-    public void testIsAppInstalledCaCert() {
-        // First make sure that app didn't install anything
-        assertFalse(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertFalse(mEnterpriseConfig.isAppInstalledCaCert());
-
-        // Then app loads CA cert via the enterprise config API
-        X509Certificate cert = FakeKeys.CA_CERT1;
-        mEnterpriseConfig.setCaCertificate(cert);
-        X509Certificate result = mEnterpriseConfig.getCaCertificate();
-        assertTrue(result == cert);
-
-        // Make sure it is the owner now
-        assertFalse(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertTrue(mEnterpriseConfig.isAppInstalledCaCert());
-    }
-
-    /** Verifies that certificate ownership flag is set correctly */
-    @Test
-    public void testIsAppInstalledCaCerts() {
-        // First make sure that app didn't install anything
-        assertFalse(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertFalse(mEnterpriseConfig.isAppInstalledCaCert());
-
-        // Then app loads CA cert via the enterprise config API
-        X509Certificate cert0 = FakeKeys.CA_CERT0;
-        X509Certificate cert1 = FakeKeys.CA_CERT1;
-        X509Certificate[] cert = new X509Certificate[] {cert0, cert1};
-
-        mEnterpriseConfig.setCaCertificates(cert);
-        X509Certificate[] result = mEnterpriseConfig.getCaCertificates();
-        assertEquals(result.length, 2);
-        assertTrue(result[0] == cert0 && result[1] == cert1);
-//        assertTrue(mEnterpriseConfig.getClientCertificate() == cert0);
-
-        // Make sure it is the owner now
-        assertFalse(mEnterpriseConfig.isAppInstalledDeviceKeyAndCert());
-        assertTrue(mEnterpriseConfig.isAppInstalledCaCert());
-    }
-
-    /** Verifies that OCSP value is set correctly. */
-    @Test
-    public void testOcspSetGet() throws Exception {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-
-        enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_NONE);
-        assertEquals(WifiEnterpriseConfig.OCSP_NONE, enterpriseConfig.getOcsp());
-
-        enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS);
-        assertEquals(WifiEnterpriseConfig.OCSP_REQUIRE_CERT_STATUS, enterpriseConfig.getOcsp());
-
-        enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_REQUEST_CERT_STATUS);
-        assertEquals(WifiEnterpriseConfig.OCSP_REQUEST_CERT_STATUS, enterpriseConfig.getOcsp());
-
-        enterpriseConfig.setOcsp(WifiEnterpriseConfig.OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS);
-        assertEquals(WifiEnterpriseConfig.OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS,
-                enterpriseConfig.getOcsp());
-    }
-
-    /** Verifies that an exception is thrown when invalid OCSP is set. */
-    @Test
-    public void testInvalidOcspValue() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        try {
-            enterpriseConfig.setOcsp(-1);
-            fail("Should raise an IllegalArgumentException here.");
-        } catch (IllegalArgumentException e) {
-            // expected exception.
-        }
-    }
-
-    /** Verifies that the EAP inner method is reset when we switch to Unauth-TLS */
-    @Test
-    public void eapPhase2MethodForUnauthTls() {
-        // Initially select an EAP method that supports an phase2.
-        mEnterpriseConfig.setEapMethod(Eap.PEAP);
-        mEnterpriseConfig.setPhase2Method(Phase2.MSCHAPV2);
-        assertEquals("PEAP", getSupplicantEapMethod());
-        assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method());
-
-        // Change the EAP method to another type which supports a phase2.
-        mEnterpriseConfig.setEapMethod(Eap.TTLS);
-        assertEquals("TTLS", getSupplicantEapMethod());
-        assertEquals("\"auth=MSCHAPV2\"", getSupplicantPhase2Method());
-
-        // Change the EAP method to Unauth-TLS which does not support a phase2.
-        mEnterpriseConfig.setEapMethod(Eap.UNAUTH_TLS);
-        assertEquals(null, getSupplicantPhase2Method());
-    }
-
-    @Test
-    public void testIsEnterpriseConfigSecure() {
-        WifiEnterpriseConfig baseConfig = new WifiEnterpriseConfig();
-        baseConfig.setEapMethod(Eap.PEAP);
-        baseConfig.setPhase2Method(Phase2.MSCHAPV2);
-        assertTrue(baseConfig.isInsecure());
-
-        WifiEnterpriseConfig noMatchConfig = new WifiEnterpriseConfig(baseConfig);
-        noMatchConfig.setCaCertificate(FakeKeys.CA_CERT0);
-        // Missing match is insecure.
-        assertTrue(noMatchConfig.isInsecure());
-
-        WifiEnterpriseConfig noCaConfig = new WifiEnterpriseConfig(baseConfig);
-        noCaConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
-        // Missing CA certificate is insecure.
-        assertTrue(noCaConfig.isInsecure());
-
-        WifiEnterpriseConfig secureConfig = new WifiEnterpriseConfig();
-        secureConfig.setEapMethod(Eap.PEAP);
-        secureConfig.setPhase2Method(Phase2.MSCHAPV2);
-        secureConfig.setCaCertificate(FakeKeys.CA_CERT0);
-        secureConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
-        assertFalse(secureConfig.isInsecure());
-
-        WifiEnterpriseConfig secureConfigWithCaAlias = new WifiEnterpriseConfig();
-        secureConfigWithCaAlias.setEapMethod(Eap.PEAP);
-        secureConfigWithCaAlias.setPhase2Method(Phase2.MSCHAPV2);
-        secureConfigWithCaAlias.setCaCertificateAliases(new String[]{"alias1", "alisa2"});
-        secureConfigWithCaAlias.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
-        assertFalse(secureConfigWithCaAlias.isInsecure());
-    }
-
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiInfoTest.java b/wifi/tests/src/android/net/wifi/WifiInfoTest.java
deleted file mode 100644
index 311bbc4..0000000
--- a/wifi/tests/src/android/net/wifi/WifiInfoTest.java
+++ /dev/null
@@ -1,151 +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.net.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiInfo}.
- */
-@SmallTest
-public class WifiInfoTest {
-    private static final long TEST_TX_SUCCESS = 1;
-    private static final long TEST_TX_RETRIES = 2;
-    private static final long TEST_TX_BAD = 3;
-    private static final long TEST_RX_SUCCESS = 4;
-    private static final String TEST_PACKAGE_NAME = "com.test.example";
-    private static final String TEST_FQDN = "test.com";
-    private static final String TEST_PROVIDER_NAME = "test";
-    private static final int TEST_WIFI_STANDARD = ScanResult.WIFI_STANDARD_11AC;
-    private static final int TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS = 866;
-    private static final int TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS = 1200;
-    private static final String TEST_SSID = "Test123";
-    private static final String TEST_BSSID = "12:12:12:12:12:12";
-    private static final int TEST_RSSI = -60;
-    private static final int TEST_NETWORK_ID = 5;
-    private static final int TEST_NETWORK_ID2 = 6;
-
-    /**
-     *  Verify parcel write/read with WifiInfo.
-     */
-    @Test
-    public void testWifiInfoParcelWriteRead() throws Exception {
-        WifiInfo writeWifiInfo = new WifiInfo();
-        writeWifiInfo.txSuccess = TEST_TX_SUCCESS;
-        writeWifiInfo.txRetries = TEST_TX_RETRIES;
-        writeWifiInfo.txBad = TEST_TX_BAD;
-        writeWifiInfo.rxSuccess = TEST_RX_SUCCESS;
-        writeWifiInfo.setTrusted(true);
-        writeWifiInfo.setOsuAp(true);
-        writeWifiInfo.setFQDN(TEST_FQDN);
-        writeWifiInfo.setProviderFriendlyName(TEST_PROVIDER_NAME);
-        writeWifiInfo.setRequestingPackageName(TEST_PACKAGE_NAME);
-        writeWifiInfo.setWifiStandard(TEST_WIFI_STANDARD);
-        writeWifiInfo.setMaxSupportedTxLinkSpeedMbps(TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS);
-        writeWifiInfo.setMaxSupportedRxLinkSpeedMbps(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS);
-
-        Parcel parcel = Parcel.obtain();
-        writeWifiInfo.writeToParcel(parcel, 0);
-        // Rewind the pointer to the head of the parcel.
-        parcel.setDataPosition(0);
-        WifiInfo readWifiInfo = WifiInfo.CREATOR.createFromParcel(parcel);
-
-        assertNotNull(readWifiInfo);
-        assertEquals(TEST_TX_SUCCESS, readWifiInfo.txSuccess);
-        assertEquals(TEST_TX_RETRIES, readWifiInfo.txRetries);
-        assertEquals(TEST_TX_BAD, readWifiInfo.txBad);
-        assertEquals(TEST_RX_SUCCESS, readWifiInfo.rxSuccess);
-        assertTrue(readWifiInfo.isTrusted());
-        assertTrue(readWifiInfo.isOsuAp());
-        assertTrue(readWifiInfo.isPasspointAp());
-        assertEquals(TEST_PACKAGE_NAME, readWifiInfo.getRequestingPackageName());
-        assertEquals(TEST_FQDN, readWifiInfo.getPasspointFqdn());
-        assertEquals(TEST_PROVIDER_NAME, readWifiInfo.getPasspointProviderFriendlyName());
-        assertEquals(TEST_WIFI_STANDARD, readWifiInfo.getWifiStandard());
-        assertEquals(TEST_MAX_SUPPORTED_TX_LINK_SPEED_MBPS,
-                readWifiInfo.getMaxSupportedTxLinkSpeedMbps());
-        assertEquals(TEST_MAX_SUPPORTED_RX_LINK_SPEED_MBPS,
-                readWifiInfo.getMaxSupportedRxLinkSpeedMbps());
-    }
-
-    /**
-     *  Verify values after reset()
-     */
-    @Test
-    public void testWifiInfoResetValue() throws Exception {
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.reset();
-        assertEquals(WifiInfo.LINK_SPEED_UNKNOWN, wifiInfo.getMaxSupportedTxLinkSpeedMbps());
-        assertEquals(WifiInfo.LINK_SPEED_UNKNOWN, wifiInfo.getMaxSupportedRxLinkSpeedMbps());
-        assertEquals(WifiInfo.LINK_SPEED_UNKNOWN, wifiInfo.getTxLinkSpeedMbps());
-        assertEquals(WifiInfo.LINK_SPEED_UNKNOWN, wifiInfo.getRxLinkSpeedMbps());
-        assertEquals(WifiInfo.INVALID_RSSI, wifiInfo.getRssi());
-        assertEquals(WifiManager.UNKNOWN_SSID, wifiInfo.getSSID());
-        assertEquals(null, wifiInfo.getBSSID());
-        assertEquals(-1, wifiInfo.getNetworkId());
-    }
-
-    /**
-     * Test that the WifiInfo Builder returns the same values that was set, and that
-     * calling build multiple times returns different instances.
-     */
-    @Test
-    public void testWifiInfoBuilder() throws Exception {
-        WifiInfo.Builder builder = new WifiInfo.Builder()
-                .setSsid(TEST_SSID.getBytes(StandardCharsets.UTF_8))
-                .setBssid(TEST_BSSID)
-                .setRssi(TEST_RSSI)
-                .setNetworkId(TEST_NETWORK_ID);
-
-        WifiInfo info1 = builder.build();
-
-        assertEquals("\"" + TEST_SSID + "\"", info1.getSSID());
-        assertEquals(TEST_BSSID, info1.getBSSID());
-        assertEquals(TEST_RSSI, info1.getRssi());
-        assertEquals(TEST_NETWORK_ID, info1.getNetworkId());
-
-        WifiInfo info2 = builder
-                .setNetworkId(TEST_NETWORK_ID2)
-                .build();
-
-        // different instances
-        assertNotSame(info1, info2);
-
-        // assert that info1 didn't change
-        assertEquals("\"" + TEST_SSID + "\"", info1.getSSID());
-        assertEquals(TEST_BSSID, info1.getBSSID());
-        assertEquals(TEST_RSSI, info1.getRssi());
-        assertEquals(TEST_NETWORK_ID, info1.getNetworkId());
-
-        // assert that info2 changed
-        assertEquals("\"" + TEST_SSID + "\"", info2.getSSID());
-        assertEquals(TEST_BSSID, info2.getBSSID());
-        assertEquals(TEST_RSSI, info2.getRssi());
-        assertEquals(TEST_NETWORK_ID2, info2.getNetworkId());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiManagerTest.java b/wifi/tests/src/android/net/wifi/WifiManagerTest.java
deleted file mode 100644
index 1398bfe..0000000
--- a/wifi/tests/src/android/net/wifi/WifiManagerTest.java
+++ /dev/null
@@ -1,2389 +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.net.wifi;
-
-import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_METERED;
-import static android.net.wifi.WifiManager.ActionListener;
-import static android.net.wifi.WifiManager.BUSY;
-import static android.net.wifi.WifiManager.ERROR;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_GENERIC;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_NO_CHANNEL;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.ERROR_TETHERING_DISALLOWED;
-import static android.net.wifi.WifiManager.LocalOnlyHotspotCallback.REQUEST_REGISTERED;
-import static android.net.wifi.WifiManager.NOT_AUTHORIZED;
-import static android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener;
-import static android.net.wifi.WifiManager.SAP_START_FAILURE_GENERAL;
-import static android.net.wifi.WifiManager.STATUS_NETWORK_SUGGESTIONS_SUCCESS;
-import static android.net.wifi.WifiManager.STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION;
-import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
-import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLING;
-import static android.net.wifi.WifiManager.WIFI_AP_STATE_FAILED;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_DPP;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_OWE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_P2P;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_PASSPOINT;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_SCANNER;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SAE;
-import static android.net.wifi.WifiManager.WIFI_FEATURE_WPA3_SUITE_B;
-import static android.net.wifi.WifiManager.WpsCallback;
-
-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.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.ArgumentMatchers.anyBoolean;
-import static org.mockito.ArgumentMatchers.nullable;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyList;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.doThrow;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
-import static org.mockito.Mockito.when;
-
-import android.app.ActivityManager;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.net.DhcpInfo;
-import android.net.MacAddress;
-import android.net.wifi.WifiManager.LocalOnlyHotspotCallback;
-import android.net.wifi.WifiManager.LocalOnlyHotspotObserver;
-import android.net.wifi.WifiManager.LocalOnlyHotspotReservation;
-import android.net.wifi.WifiManager.LocalOnlyHotspotSubscription;
-import android.net.wifi.WifiManager.NetworkRequestMatchCallback;
-import android.net.wifi.WifiManager.NetworkRequestUserSelectionCallback;
-import android.net.wifi.WifiManager.OnWifiUsabilityStatsListener;
-import android.net.wifi.WifiManager.ScanResultsCallback;
-import android.net.wifi.WifiManager.SoftApCallback;
-import android.net.wifi.WifiManager.SuggestionConnectionStatusListener;
-import android.net.wifi.WifiManager.TrafficStateCallback;
-import android.net.wifi.WifiManager.WifiConnectedNetworkScorer;
-import android.os.Binder;
-import android.os.Build;
-import android.os.Handler;
-import android.os.HandlerExecutor;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.os.connectivity.WifiActivityEnergyInfo;
-import android.os.test.TestLooper;
-import android.util.SparseArray;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.concurrent.Executor;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiManager}.
- */
-@SmallTest
-public class WifiManagerTest {
-
-    private static final int ERROR_NOT_SET = -1;
-    private static final int ERROR_TEST_REASON = 5;
-    private static final int TEST_UID = 14553;
-    private static final int TEST_NETWORK_ID = 143;
-    private static final String TEST_PACKAGE_NAME = "TestPackage";
-    private static final String TEST_FEATURE_ID = "TestFeature";
-    private static final String TEST_COUNTRY_CODE = "US";
-    private static final String[] TEST_MAC_ADDRESSES = {"da:a1:19:0:0:0"};
-    private static final int TEST_AP_FREQUENCY = 2412;
-    private static final int TEST_AP_BANDWIDTH = SoftApInfo.CHANNEL_WIDTH_20MHZ;
-
-    @Mock Context mContext;
-    @Mock android.net.wifi.IWifiManager mWifiService;
-    @Mock ApplicationInfo mApplicationInfo;
-    @Mock WifiConfiguration mApConfig;
-    @Mock SoftApCallback mSoftApCallback;
-    @Mock TrafficStateCallback mTrafficStateCallback;
-    @Mock NetworkRequestMatchCallback mNetworkRequestMatchCallback;
-    @Mock OnWifiUsabilityStatsListener mOnWifiUsabilityStatsListener;
-    @Mock OnWifiActivityEnergyInfoListener mOnWifiActivityEnergyInfoListener;
-    @Mock SuggestionConnectionStatusListener mListener;
-    @Mock Runnable mRunnable;
-    @Mock Executor mExecutor;
-    @Mock Executor mAnotherExecutor;
-    @Mock ActivityManager mActivityManager;
-    @Mock WifiConnectedNetworkScorer mWifiConnectedNetworkScorer;
-
-    private Handler mHandler;
-    private TestLooper mLooper;
-    private WifiManager mWifiManager;
-    private WifiNetworkSuggestion mWifiNetworkSuggestion;
-    private ScanResultsCallback mScanResultsCallback;
-    private WifiActivityEnergyInfo mWifiActivityEnergyInfo;
-
-    /**
-     * Util function to check public field which used for softap  in WifiConfiguration
-     * same as the value in SoftApConfiguration.
-     *
-     */
-    private boolean compareWifiAndSoftApConfiguration(
-            SoftApConfiguration softApConfig, WifiConfiguration wifiConfig) {
-        if (!Objects.equals(wifiConfig.SSID, softApConfig.getSsid())) {
-            return false;
-        }
-        if (!Objects.equals(wifiConfig.BSSID, softApConfig.getBssid())) {
-            return false;
-        }
-        if (!Objects.equals(wifiConfig.preSharedKey, softApConfig.getPassphrase())) {
-            return false;
-        }
-
-        if (wifiConfig.hiddenSSID != softApConfig.isHiddenSsid()) {
-            return false;
-        }
-        switch (softApConfig.getSecurityType()) {
-            case SoftApConfiguration.SECURITY_TYPE_OPEN:
-                if (wifiConfig.getAuthType() != WifiConfiguration.KeyMgmt.NONE) {
-                    return false;
-                }
-                break;
-            case SoftApConfiguration.SECURITY_TYPE_WPA2_PSK:
-                if (wifiConfig.getAuthType() != WifiConfiguration.KeyMgmt.WPA2_PSK) {
-                    return false;
-                }
-                break;
-            default:
-                return false;
-        }
-        return true;
-    }
-
-    private SoftApConfiguration generatorTestSoftApConfig() {
-        return new SoftApConfiguration.Builder()
-                .setSsid("TestSSID")
-                .setPassphrase("TestPassphrase", SoftApConfiguration.SECURITY_TYPE_WPA2_PSK)
-                .build();
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
-        mHandler = spy(new Handler(mLooper.getLooper()));
-        mApplicationInfo.targetSdkVersion = Build.VERSION_CODES.Q;
-        when(mContext.getApplicationInfo()).thenReturn(mApplicationInfo);
-        when(mContext.getOpPackageName()).thenReturn(TEST_PACKAGE_NAME);
-        mWifiManager = new WifiManager(mContext, mWifiService, mLooper.getLooper());
-        verify(mWifiService).getVerboseLoggingLevel();
-        mWifiNetworkSuggestion = new WifiNetworkSuggestion();
-        mScanResultsCallback = new ScanResultsCallback() {
-            @Override
-            public void onScanResultsAvailable() {
-                mRunnable.run();
-            }
-        };
-        mWifiActivityEnergyInfo = new WifiActivityEnergyInfo(0, 0, 0, 0, 0, 0);
-    }
-
-    /**
-     * Check the call to startSoftAp calls WifiService to startSoftAp with the provided
-     * WifiConfiguration.  Verify that the return value is propagated to the caller.
-     */
-    @Test
-    public void testStartSoftApCallsServiceWithWifiConfig() throws Exception {
-        when(mWifiService.startSoftAp(eq(mApConfig))).thenReturn(true);
-        assertTrue(mWifiManager.startSoftAp(mApConfig));
-
-        when(mWifiService.startSoftAp(eq(mApConfig))).thenReturn(false);
-        assertFalse(mWifiManager.startSoftAp(mApConfig));
-    }
-
-    /**
-     * Check the call to startSoftAp calls WifiService to startSoftAp with a null config.  Verify
-     * that the return value is propagated to the caller.
-     */
-    @Test
-    public void testStartSoftApCallsServiceWithNullConfig() throws Exception {
-        when(mWifiService.startSoftAp(eq(null))).thenReturn(true);
-        assertTrue(mWifiManager.startSoftAp(null));
-
-        when(mWifiService.startSoftAp(eq(null))).thenReturn(false);
-        assertFalse(mWifiManager.startSoftAp(null));
-    }
-
-    /**
-     * Check the call to stopSoftAp calls WifiService to stopSoftAp.
-     */
-    @Test
-    public void testStopSoftApCallsService() throws Exception {
-        when(mWifiService.stopSoftAp()).thenReturn(true);
-        assertTrue(mWifiManager.stopSoftAp());
-
-        when(mWifiService.stopSoftAp()).thenReturn(false);
-        assertFalse(mWifiManager.stopSoftAp());
-    }
-
-    /**
-     * Check the call to startSoftAp calls WifiService to startSoftAp with the provided
-     * WifiConfiguration.  Verify that the return value is propagated to the caller.
-     */
-    @Test
-    public void testStartTetheredHotspotCallsServiceWithSoftApConfig() throws Exception {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        when(mWifiService.startTetheredHotspot(eq(softApConfig))).thenReturn(true);
-        assertTrue(mWifiManager.startTetheredHotspot(softApConfig));
-
-        when(mWifiService.startTetheredHotspot(eq(softApConfig))).thenReturn(false);
-        assertFalse(mWifiManager.startTetheredHotspot(softApConfig));
-    }
-
-    /**
-     * Check the call to startSoftAp calls WifiService to startSoftAp with a null config.  Verify
-     * that the return value is propagated to the caller.
-     */
-    @Test
-    public void testStartTetheredHotspotCallsServiceWithNullConfig() throws Exception {
-        when(mWifiService.startTetheredHotspot(eq(null))).thenReturn(true);
-        assertTrue(mWifiManager.startTetheredHotspot(null));
-
-        when(mWifiService.startTetheredHotspot(eq(null))).thenReturn(false);
-        assertFalse(mWifiManager.startTetheredHotspot(null));
-    }
-
-    /**
-     * Test creation of a LocalOnlyHotspotReservation and verify that close properly calls
-     * WifiService.stopLocalOnlyHotspot.
-     */
-    @Test
-    public void testCreationAndCloseOfLocalOnlyHotspotReservation() throws Exception {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-
-        callback.onStarted(mWifiManager.new LocalOnlyHotspotReservation(softApConfig));
-
-        assertEquals(softApConfig, callback.mRes.getSoftApConfiguration());
-        WifiConfiguration wifiConfig = callback.mRes.getWifiConfiguration();
-        assertTrue(compareWifiAndSoftApConfiguration(softApConfig, wifiConfig));
-
-        callback.mRes.close();
-        verify(mWifiService).stopLocalOnlyHotspot();
-    }
-
-    /**
-     * Verify stopLOHS is called when try-with-resources is used properly.
-     */
-    @Test
-    public void testLocalOnlyHotspotReservationCallsStopProperlyInTryWithResources()
-            throws Exception {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-
-        callback.onStarted(mWifiManager.new LocalOnlyHotspotReservation(softApConfig));
-
-        try (WifiManager.LocalOnlyHotspotReservation res = callback.mRes) {
-            assertEquals(softApConfig, res.getSoftApConfiguration());
-            WifiConfiguration wifiConfig = callback.mRes.getWifiConfiguration();
-            assertTrue(compareWifiAndSoftApConfiguration(softApConfig, wifiConfig));
-        }
-
-        verify(mWifiService).stopLocalOnlyHotspot();
-    }
-
-    /**
-     * Test creation of a LocalOnlyHotspotSubscription.
-     * TODO: when registrations are tracked, verify removal on close.
-     */
-    @Test
-    public void testCreationOfLocalOnlyHotspotSubscription() throws Exception {
-        try (WifiManager.LocalOnlyHotspotSubscription sub =
-                     mWifiManager.new LocalOnlyHotspotSubscription()) {
-            sub.close();
-        }
-    }
-
-    public class TestLocalOnlyHotspotCallback extends LocalOnlyHotspotCallback {
-        public boolean mOnStartedCalled = false;
-        public boolean mOnStoppedCalled = false;
-        public int mFailureReason = -1;
-        public LocalOnlyHotspotReservation mRes = null;
-        public long mCallingThreadId = -1;
-
-        @Override
-        public void onStarted(LocalOnlyHotspotReservation r) {
-            mRes = r;
-            mOnStartedCalled = true;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-
-        @Override
-        public void onStopped() {
-            mOnStoppedCalled = true;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-
-        @Override
-        public void onFailed(int reason) {
-            mFailureReason = reason;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-    }
-
-    /**
-     * Verify callback is properly plumbed when called.
-     */
-    @Test
-    public void testLocalOnlyHotspotCallback() {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-        assertEquals(null, callback.mRes);
-
-        // test onStarted
-        WifiManager.LocalOnlyHotspotReservation res =
-                mWifiManager.new LocalOnlyHotspotReservation(softApConfig);
-        callback.onStarted(res);
-        assertEquals(res, callback.mRes);
-        assertTrue(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-
-        // test onStopped
-        callback.onStopped();
-        assertEquals(res, callback.mRes);
-        assertTrue(callback.mOnStartedCalled);
-        assertTrue(callback.mOnStoppedCalled);
-        assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-
-        // test onFailed
-        callback.onFailed(ERROR_TEST_REASON);
-        assertEquals(res, callback.mRes);
-        assertTrue(callback.mOnStartedCalled);
-        assertTrue(callback.mOnStoppedCalled);
-        assertEquals(ERROR_TEST_REASON, callback.mFailureReason);
-    }
-
-    public class TestLocalOnlyHotspotObserver extends LocalOnlyHotspotObserver {
-        public boolean mOnRegistered = false;
-        public boolean mOnStartedCalled = false;
-        public boolean mOnStoppedCalled = false;
-        public SoftApConfiguration mConfig = null;
-        public LocalOnlyHotspotSubscription mSub = null;
-        public long mCallingThreadId = -1;
-
-        @Override
-        public void onRegistered(LocalOnlyHotspotSubscription sub) {
-            mOnRegistered = true;
-            mSub = sub;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-
-        @Override
-        public void onStarted(SoftApConfiguration config) {
-            mOnStartedCalled = true;
-            mConfig = config;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-
-        @Override
-        public void onStopped() {
-            mOnStoppedCalled = true;
-            mCallingThreadId = Thread.currentThread().getId();
-        }
-    }
-
-    /**
-     * Verify observer is properly plumbed when called.
-     */
-    @Test
-    public void testLocalOnlyHotspotObserver() {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        assertFalse(observer.mOnRegistered);
-        assertFalse(observer.mOnStartedCalled);
-        assertFalse(observer.mOnStoppedCalled);
-        assertEquals(null, observer.mConfig);
-        assertEquals(null, observer.mSub);
-
-        WifiManager.LocalOnlyHotspotSubscription sub =
-                mWifiManager.new LocalOnlyHotspotSubscription();
-        observer.onRegistered(sub);
-        assertTrue(observer.mOnRegistered);
-        assertFalse(observer.mOnStartedCalled);
-        assertFalse(observer.mOnStoppedCalled);
-        assertEquals(null, observer.mConfig);
-        assertEquals(sub, observer.mSub);
-
-        observer.onStarted(softApConfig);
-        assertTrue(observer.mOnRegistered);
-        assertTrue(observer.mOnStartedCalled);
-        assertFalse(observer.mOnStoppedCalled);
-        assertEquals(softApConfig, observer.mConfig);
-        assertEquals(sub, observer.mSub);
-
-        observer.onStopped();
-        assertTrue(observer.mOnRegistered);
-        assertTrue(observer.mOnStartedCalled);
-        assertTrue(observer.mOnStoppedCalled);
-        assertEquals(softApConfig, observer.mConfig);
-        assertEquals(sub, observer.mSub);
-    }
-
-    /**
-     * Verify call to startLocalOnlyHotspot goes to WifiServiceImpl.
-     */
-    @Test
-    public void testStartLocalOnlyHotspot() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-
-        verify(mWifiService).startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class),
-                anyString(), nullable(String.class), eq(null));
-    }
-
-    /**
-     * Verify a SecurityException is thrown for callers without proper permissions for
-     * startLocalOnlyHotspot.
-     */
-    @Test(expected = SecurityException.class)
-    public void testStartLocalOnlyHotspotThrowsSecurityException() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        doThrow(new SecurityException()).when(mWifiService).startLocalOnlyHotspot(
-                any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null));
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-    }
-
-    /**
-     * Verify an IllegalStateException is thrown for callers that already have a pending request for
-     * startLocalOnlyHotspot.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testStartLocalOnlyHotspotThrowsIllegalStateException() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        doThrow(new IllegalStateException()).when(mWifiService).startLocalOnlyHotspot(
-                any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null));
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-    }
-
-    /**
-     * Verify that the handler provided by the caller is used for the callbacks.
-     */
-    @Test
-    public void testCorrectLooperIsUsedForHandler() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mLooper.dispatchAll();
-        assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
-        verify(mContext, never()).getMainLooper();
-        verify(mContext, never()).getMainExecutor();
-    }
-
-    /**
-     * Verify that the main looper's thread is used if a handler is not provided by the reqiestomg
-     * application.
-     */
-    @Test
-    public void testMainLooperIsUsedWhenHandlerNotProvided() throws Exception {
-        // record thread from looper.getThread and check ids.
-        TestLooper altLooper = new TestLooper();
-        when(mContext.getMainExecutor()).thenReturn(altLooper.getNewExecutor());
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
-        mWifiManager.startLocalOnlyHotspot(callback, null);
-        altLooper.dispatchAll();
-        assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
-        assertEquals(altLooper.getLooper().getThread().getId(), callback.mCallingThreadId);
-        verify(mContext).getMainExecutor();
-    }
-
-    /**
-     * Verify the LOHS onStarted callback is triggered when WifiManager receives a HOTSPOT_STARTED
-     * message from WifiServiceImpl.
-     */
-    @Test
-    public void testOnStartedIsCalledWithReservation() throws Exception {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        TestLooper callbackLooper = new TestLooper();
-        Handler callbackHandler = new Handler(callbackLooper.getLooper());
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
-        callbackLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(callback.mOnStartedCalled);
-        assertEquals(null, callback.mRes);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStarted(softApConfig);
-        mLooper.dispatchAll();
-        callbackLooper.dispatchAll();
-        assertTrue(callback.mOnStartedCalled);
-        assertEquals(softApConfig, callback.mRes.getSoftApConfiguration());
-        WifiConfiguration wifiConfig = callback.mRes.getWifiConfiguration();
-        assertTrue(compareWifiAndSoftApConfiguration(softApConfig, wifiConfig));
-    }
-
-    /**
-     * Verify the LOHS onStarted callback is triggered when WifiManager receives a HOTSPOT_STARTED
-     * message from WifiServiceImpl when softap enabled with SAE security type.
-     */
-    @Test
-    public void testOnStartedIsCalledWithReservationAndSaeSoftApConfig() throws Exception {
-        SoftApConfiguration softApConfig = new SoftApConfiguration.Builder()
-                .setSsid("TestSSID")
-                .setPassphrase("TestPassphrase", SoftApConfiguration.SECURITY_TYPE_WPA3_SAE)
-                .build();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        TestLooper callbackLooper = new TestLooper();
-        Handler callbackHandler = new Handler(callbackLooper.getLooper());
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
-        callbackLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(callback.mOnStartedCalled);
-        assertEquals(null, callback.mRes);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStarted(softApConfig);
-        mLooper.dispatchAll();
-        callbackLooper.dispatchAll();
-        assertTrue(callback.mOnStartedCalled);
-        assertEquals(softApConfig, callback.mRes.getSoftApConfiguration());
-        assertEquals(null, callback.mRes.getWifiConfiguration());
-    }
-
-    /**
-     * Verify onFailed is called if WifiServiceImpl sends a HOTSPOT_STARTED message with a null
-     * config.
-     */
-    @Test
-    public void testOnStartedIsCalledWithNullConfig() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        TestLooper callbackLooper = new TestLooper();
-        Handler callbackHandler = new Handler(callbackLooper.getLooper());
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
-        callbackLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(callback.mOnStartedCalled);
-        assertEquals(null, callback.mRes);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStarted(null);
-        mLooper.dispatchAll();
-        callbackLooper.dispatchAll();
-        assertFalse(callback.mOnStartedCalled);
-        assertEquals(ERROR_GENERIC, callback.mFailureReason);
-    }
-
-    /**
-     * Verify onStopped is called if WifiServiceImpl sends a HOTSPOT_STOPPED message.
-     */
-    @Test
-    public void testOnStoppedIsCalled() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        TestLooper callbackLooper = new TestLooper();
-        Handler callbackHandler = new Handler(callbackLooper.getLooper());
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
-        callbackLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(callback.mOnStoppedCalled);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStopped();
-        mLooper.dispatchAll();
-        callbackLooper.dispatchAll();
-        assertTrue(callback.mOnStoppedCalled);
-    }
-
-    /**
-     * Verify onFailed is called if WifiServiceImpl sends a HOTSPOT_FAILED message.
-     */
-    @Test
-    public void testOnFailedIsCalled() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        TestLooper callbackLooper = new TestLooper();
-        Handler callbackHandler = new Handler(callbackLooper.getLooper());
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        when(mWifiService.startLocalOnlyHotspot(internalCallback.capture(), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, callbackHandler);
-        callbackLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotFailed(ERROR_NO_CHANNEL);
-        mLooper.dispatchAll();
-        callbackLooper.dispatchAll();
-        assertEquals(ERROR_NO_CHANNEL, callback.mFailureReason);
-    }
-
-    /**
-     * Verify callback triggered from startLocalOnlyHotspot with an incompatible mode failure.
-     */
-    @Test
-    public void testLocalOnlyHotspotCallbackFullOnIncompatibleMode() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mLooper.dispatchAll();
-        assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(null, callback.mRes);
-    }
-
-    /**
-     * Verify callback triggered from startLocalOnlyHotspot with a tethering disallowed failure.
-     */
-    @Test
-    public void testLocalOnlyHotspotCallbackFullOnTetheringDisallowed() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(ERROR_TETHERING_DISALLOWED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mLooper.dispatchAll();
-        assertEquals(ERROR_TETHERING_DISALLOWED, callback.mFailureReason);
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(null, callback.mRes);
-    }
-
-    /**
-     * Verify a SecurityException resulting from an application without necessary permissions will
-     * bubble up through the call to start LocalOnlyHotspot and will not trigger other callbacks.
-     */
-    @Test(expected = SecurityException.class)
-    public void testLocalOnlyHotspotCallbackFullOnSecurityException() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        doThrow(new SecurityException()).when(mWifiService).startLocalOnlyHotspot(
-                any(ILocalOnlyHotspotCallback.class), anyString(), nullable(String.class),
-                eq(null));
-        try {
-            mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        } catch (SecurityException e) {
-            assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-            assertFalse(callback.mOnStartedCalled);
-            assertFalse(callback.mOnStoppedCalled);
-            assertEquals(null, callback.mRes);
-            throw e;
-        }
-
-    }
-
-    /**
-     * Verify the handler passed to startLocalOnlyHotspot is correctly used for callbacks when
-     * SoftApMode fails due to a underlying error.
-     */
-    @Test
-    public void testLocalOnlyHotspotCallbackFullOnNoChannelError() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mLooper.dispatchAll();
-        //assertEquals(ERROR_NO_CHANNEL, callback.mFailureReason);
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(null, callback.mRes);
-    }
-
-    /**
-     * Verify that the call to cancel a LOHS request does call stopLOHS.
-     */
-    @Test
-    public void testCancelLocalOnlyHotspotRequestCallsStopOnWifiService() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mWifiManager.cancelLocalOnlyHotspotRequest();
-        verify(mWifiService).stopLocalOnlyHotspot();
-    }
-
-    /**
-     * Verify that we do not crash if cancelLocalOnlyHotspotRequest is called without an existing
-     * callback stored.
-     */
-    @Test
-    public void testCancelLocalOnlyHotspotReturnsWithoutExistingRequest() {
-        mWifiManager.cancelLocalOnlyHotspotRequest();
-    }
-
-    /**
-     * Verify that the callback is not triggered if the LOHS request was already cancelled.
-     */
-    @Test
-    public void testCallbackAfterLocalOnlyHotspotWasCancelled() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(REQUEST_REGISTERED);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mWifiManager.cancelLocalOnlyHotspotRequest();
-        verify(mWifiService).stopLocalOnlyHotspot();
-        mLooper.dispatchAll();
-        assertEquals(ERROR_NOT_SET, callback.mFailureReason);
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(null, callback.mRes);
-    }
-
-    /**
-     * Verify that calling cancel LOHS request does not crash if an error callback was already
-     * handled.
-     */
-    @Test
-    public void testCancelAfterLocalOnlyHotspotCallbackTriggered() throws Exception {
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        when(mWifiService.startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class), anyString(),
-                nullable(String.class), eq(null))).thenReturn(ERROR_INCOMPATIBLE_MODE);
-        mWifiManager.startLocalOnlyHotspot(callback, mHandler);
-        mLooper.dispatchAll();
-        assertEquals(ERROR_INCOMPATIBLE_MODE, callback.mFailureReason);
-        assertFalse(callback.mOnStartedCalled);
-        assertFalse(callback.mOnStoppedCalled);
-        assertEquals(null, callback.mRes);
-        mWifiManager.cancelLocalOnlyHotspotRequest();
-        verify(mWifiService, never()).stopLocalOnlyHotspot();
-    }
-
-    @Test
-    public void testStartLocalOnlyHotspotForwardsCustomConfig() throws Exception {
-        SoftApConfiguration customConfig = new SoftApConfiguration.Builder()
-                .setSsid("customSsid")
-                .build();
-        TestLocalOnlyHotspotCallback callback = new TestLocalOnlyHotspotCallback();
-        mWifiManager.startLocalOnlyHotspot(customConfig, mExecutor, callback);
-        verify(mWifiService).startLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class),
-                anyString(), nullable(String.class), eq(customConfig));
-    }
-
-    /**
-     * Verify the watchLocalOnlyHotspot call goes to WifiServiceImpl.
-     */
-    @Test
-    public void testWatchLocalOnlyHotspot() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-
-        mWifiManager.watchLocalOnlyHotspot(observer, mHandler);
-        verify(mWifiService).startWatchLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class));
-    }
-
-    /**
-     * Verify a SecurityException is thrown for callers without proper permissions for
-     * startWatchLocalOnlyHotspot.
-     */
-    @Test(expected = SecurityException.class)
-    public void testStartWatchLocalOnlyHotspotThrowsSecurityException() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        doThrow(new SecurityException()).when(mWifiService)
-                .startWatchLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class));
-        mWifiManager.watchLocalOnlyHotspot(observer, mHandler);
-    }
-
-    /**
-     * Verify an IllegalStateException is thrown for callers that already have a pending request for
-     * watchLocalOnlyHotspot.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testStartWatchLocalOnlyHotspotThrowsIllegalStateException() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        doThrow(new IllegalStateException()).when(mWifiService)
-                .startWatchLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class));
-        mWifiManager.watchLocalOnlyHotspot(observer, mHandler);
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void registerSoftApCallbackThrowsIllegalArgumentExceptionOnNullArgumentForCallback() {
-        try {
-            mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if executor is null.
-     */
-    @Test
-    public void registerSoftApCallbackThrowsIllegalArgumentExceptionOnNullArgumentForExecutor() {
-        try {
-            mWifiManager.registerSoftApCallback(null, mSoftApCallback);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test
-    public void unregisterSoftApCallbackThrowsIllegalArgumentExceptionOnNullArgumentForCallback() {
-        try {
-            mWifiManager.unregisterSoftApCallback(null);
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    /**
-     * Verify the call to registerSoftApCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void registerSoftApCallbackCallGoesToWifiServiceImpl() throws Exception {
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class),
-                any(ISoftApCallback.Stub.class), anyInt());
-    }
-
-    /**
-     * Verify the call to unregisterSoftApCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void unregisterSoftApCallbackCallGoesToWifiServiceImpl() throws Exception {
-        ArgumentCaptor<Integer> callbackIdentifier = ArgumentCaptor.forClass(Integer.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class),
-                any(ISoftApCallback.Stub.class), callbackIdentifier.capture());
-
-        mWifiManager.unregisterSoftApCallback(mSoftApCallback);
-        verify(mWifiService).unregisterSoftApCallback(eq((int) callbackIdentifier.getValue()));
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void softApCallbackProxyCallsOnStateChanged() throws Exception {
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        callbackCaptor.getValue().onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void softApCallbackProxyCallsOnConnectedClientsChanged() throws Exception {
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        final List<WifiClient> testClients = new ArrayList();
-        callbackCaptor.getValue().onConnectedClientsChanged(testClients);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onConnectedClientsChanged(testClients);
-    }
-
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void softApCallbackProxyCallsOnSoftApInfoChanged() throws Exception {
-        SoftApInfo testSoftApInfo = new SoftApInfo();
-        testSoftApInfo.setFrequency(TEST_AP_FREQUENCY);
-        testSoftApInfo.setBandwidth(TEST_AP_BANDWIDTH);
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        callbackCaptor.getValue().onInfoChanged(testSoftApInfo);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onInfoChanged(testSoftApInfo);
-    }
-
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void softApCallbackProxyCallsOnCapabilityChanged() throws Exception {
-        SoftApCapability testSoftApCapability = new SoftApCapability(0);
-        testSoftApCapability.setMaxSupportedClients(10);
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        callbackCaptor.getValue().onCapabilityChanged(testSoftApCapability);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onCapabilityChanged(testSoftApCapability);
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy
-     */
-    @Test
-    public void softApCallbackProxyCallsOnBlockedClientConnecting() throws Exception {
-        WifiClient testWifiClient = new WifiClient(MacAddress.fromString("22:33:44:55:66:77"));
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        callbackCaptor.getValue().onBlockedClientConnecting(testWifiClient,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS);
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onBlockedClientConnecting(testWifiClient,
-                WifiManager.SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS);
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy on multiple events
-     */
-    @Test
-    public void softApCallbackProxyCallsOnMultipleUpdates() throws Exception {
-        SoftApInfo testSoftApInfo = new SoftApInfo();
-        testSoftApInfo.setFrequency(TEST_AP_FREQUENCY);
-        testSoftApInfo.setBandwidth(TEST_AP_BANDWIDTH);
-        SoftApCapability testSoftApCapability = new SoftApCapability(0);
-        testSoftApCapability.setMaxSupportedClients(10);
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        final List<WifiClient> testClients = new ArrayList();
-        callbackCaptor.getValue().onStateChanged(WIFI_AP_STATE_ENABLING, 0);
-        callbackCaptor.getValue().onConnectedClientsChanged(testClients);
-        callbackCaptor.getValue().onInfoChanged(testSoftApInfo);
-        callbackCaptor.getValue().onStateChanged(WIFI_AP_STATE_FAILED, SAP_START_FAILURE_GENERAL);
-        callbackCaptor.getValue().onCapabilityChanged(testSoftApCapability);
-
-
-        mLooper.dispatchAll();
-        verify(mSoftApCallback).onStateChanged(WIFI_AP_STATE_ENABLING, 0);
-        verify(mSoftApCallback).onConnectedClientsChanged(testClients);
-        verify(mSoftApCallback).onInfoChanged(testSoftApInfo);
-        verify(mSoftApCallback).onStateChanged(WIFI_AP_STATE_FAILED, SAP_START_FAILURE_GENERAL);
-        verify(mSoftApCallback).onCapabilityChanged(testSoftApCapability);
-    }
-
-    /*
-     * Verify client-provided callback is being called on the correct thread
-     */
-    @Test
-    public void softApCallbackIsCalledOnCorrectThread() throws Exception {
-        ArgumentCaptor<ISoftApCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISoftApCallback.Stub.class);
-        TestLooper altLooper = new TestLooper();
-        Handler altHandler = new Handler(altLooper.getLooper());
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(altHandler), mSoftApCallback);
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class), callbackCaptor.capture(),
-                anyInt());
-
-        callbackCaptor.getValue().onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-        altLooper.dispatchAll();
-        verify(mSoftApCallback).onStateChanged(WIFI_AP_STATE_ENABLED, 0);
-    }
-
-    /**
-     * Verify that the handler provided by the caller is used for registering soft AP callback.
-     */
-    @Test
-    public void testCorrectLooperIsUsedForSoftApCallbackHandler() throws Exception {
-        mWifiManager.registerSoftApCallback(new HandlerExecutor(mHandler), mSoftApCallback);
-        mLooper.dispatchAll();
-        verify(mWifiService).registerSoftApCallback(any(IBinder.class),
-                any(ISoftApCallback.Stub.class), anyInt());
-        verify(mContext, never()).getMainLooper();
-        verify(mContext, never()).getMainExecutor();
-    }
-
-    /**
-     * Verify that the handler provided by the caller is used for the observer.
-     */
-    @Test
-    public void testCorrectLooperIsUsedForObserverHandler() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        mWifiManager.watchLocalOnlyHotspot(observer, mHandler);
-        mLooper.dispatchAll();
-        assertTrue(observer.mOnRegistered);
-        verify(mContext, never()).getMainLooper();
-        verify(mContext, never()).getMainExecutor();
-    }
-
-    /**
-     * Verify that the main looper's thread is used if a handler is not provided by the requesting
-     * application.
-     */
-    @Test
-    public void testMainLooperIsUsedWhenHandlerNotProvidedForObserver() throws Exception {
-        // record thread from looper.getThread and check ids.
-        TestLooper altLooper = new TestLooper();
-        when(mContext.getMainExecutor()).thenReturn(altLooper.getNewExecutor());
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        mWifiManager.watchLocalOnlyHotspot(observer, null);
-        altLooper.dispatchAll();
-        assertTrue(observer.mOnRegistered);
-        assertEquals(altLooper.getLooper().getThread().getId(), observer.mCallingThreadId);
-        verify(mContext).getMainExecutor();
-    }
-
-    /**
-     * Verify the LOHS onRegistered observer callback is triggered when WifiManager receives a
-     * HOTSPOT_OBSERVER_REGISTERED message from WifiServiceImpl.
-     */
-    @Test
-    public void testOnRegisteredIsCalledWithSubscription() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        TestLooper observerLooper = new TestLooper();
-        Handler observerHandler = new Handler(observerLooper.getLooper());
-        assertFalse(observer.mOnRegistered);
-        assertEquals(null, observer.mSub);
-        mWifiManager.watchLocalOnlyHotspot(observer, observerHandler);
-        verify(mWifiService).startWatchLocalOnlyHotspot(any(ILocalOnlyHotspotCallback.class));
-        // now trigger the callback
-        observerLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertTrue(observer.mOnRegistered);
-        assertNotNull(observer.mSub);
-    }
-
-    /**
-     * Verify the LOHS onStarted observer callback is triggered when WifiManager receives a
-     * HOTSPOT_STARTED message from WifiServiceImpl.
-     */
-    @Test
-    public void testObserverOnStartedIsCalledWithWifiConfig() throws Exception {
-        SoftApConfiguration softApConfig = generatorTestSoftApConfig();
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        TestLooper observerLooper = new TestLooper();
-        Handler observerHandler = new Handler(observerLooper.getLooper());
-        mWifiManager.watchLocalOnlyHotspot(observer, observerHandler);
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        verify(mWifiService).startWatchLocalOnlyHotspot(internalCallback.capture());
-        observerLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(observer.mOnStartedCalled);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStarted(softApConfig);
-        mLooper.dispatchAll();
-        observerLooper.dispatchAll();
-        assertTrue(observer.mOnStartedCalled);
-        assertEquals(softApConfig, observer.mConfig);
-    }
-
-    /**
-     * Verify the LOHS onStarted observer callback is triggered not when WifiManager receives a
-     * HOTSPOT_STARTED message from WifiServiceImpl with a null config.
-     */
-    @Test
-    public void testObserverOnStartedNotCalledWithNullConfig() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        TestLooper observerLooper = new TestLooper();
-        Handler observerHandler = new Handler(observerLooper.getLooper());
-        mWifiManager.watchLocalOnlyHotspot(observer, observerHandler);
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        verify(mWifiService).startWatchLocalOnlyHotspot(internalCallback.capture());
-        observerLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(observer.mOnStartedCalled);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStarted(null);
-        mLooper.dispatchAll();
-        observerLooper.dispatchAll();
-        assertFalse(observer.mOnStartedCalled);
-        assertEquals(null, observer.mConfig);
-    }
-
-
-    /**
-     * Verify the LOHS onStopped observer callback is triggered when WifiManager receives a
-     * HOTSPOT_STOPPED message from WifiServiceImpl.
-     */
-    @Test
-    public void testObserverOnStoppedIsCalled() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        TestLooper observerLooper = new TestLooper();
-        Handler observerHandler = new Handler(observerLooper.getLooper());
-        mWifiManager.watchLocalOnlyHotspot(observer, observerHandler);
-        ArgumentCaptor<ILocalOnlyHotspotCallback> internalCallback =
-                ArgumentCaptor.forClass(ILocalOnlyHotspotCallback.class);
-        verify(mWifiService).startWatchLocalOnlyHotspot(internalCallback.capture());
-        observerLooper.dispatchAll();
-        mLooper.dispatchAll();
-        assertFalse(observer.mOnStoppedCalled);
-        // now trigger the callback
-        internalCallback.getValue().onHotspotStopped();
-        mLooper.dispatchAll();
-        observerLooper.dispatchAll();
-        assertTrue(observer.mOnStoppedCalled);
-    }
-
-    /**
-     * Verify WifiServiceImpl is not called if there is not a registered LOHS observer callback.
-     */
-    @Test
-    public void testUnregisterWifiServiceImplNotCalledWithoutRegisteredObserver() throws Exception {
-        mWifiManager.unregisterLocalOnlyHotspotObserver();
-        verifyZeroInteractions(mWifiService);
-    }
-
-    /**
-     * Verify WifiServiceImpl is called when there is a registered LOHS observer callback.
-     */
-    @Test
-    public void testUnregisterWifiServiceImplCalledWithRegisteredObserver() throws Exception {
-        TestLocalOnlyHotspotObserver observer = new TestLocalOnlyHotspotObserver();
-        TestLooper observerLooper = new TestLooper();
-        Handler observerHandler = new Handler(observerLooper.getLooper());
-        mWifiManager.watchLocalOnlyHotspot(observer, observerHandler);
-        mWifiManager.unregisterLocalOnlyHotspotObserver();
-        verify(mWifiService).stopWatchLocalOnlyHotspot();
-    }
-
-    /**
-     * Test that calls to get the current WPS config token return null and do not have any
-     * interactions with WifiServiceImpl.
-     */
-    @Test
-    public void testGetCurrentNetworkWpsNfcConfigurationTokenReturnsNull() {
-        assertNull(mWifiManager.getCurrentNetworkWpsNfcConfigurationToken());
-        verifyNoMoreInteractions(mWifiService);
-    }
-
-
-    class WpsCallbackTester extends WpsCallback {
-        public boolean mStarted = false;
-        public boolean mSucceeded = false;
-        public boolean mFailed = false;
-        public int mFailureCode = -1;
-
-        @Override
-        public void onStarted(String pin) {
-            mStarted = true;
-        }
-
-        @Override
-        public void onSucceeded() {
-            mSucceeded = true;
-        }
-
-        @Override
-        public void onFailed(int reason) {
-            mFailed = true;
-            mFailureCode = reason;
-        }
-
-    }
-
-    /**
-     * Verify that a call to start WPS immediately returns a failure.
-     */
-    @Test
-    public void testStartWpsImmediatelyFailsWithCallback() {
-        WpsCallbackTester wpsCallback = new WpsCallbackTester();
-        mWifiManager.startWps(null, wpsCallback);
-        assertTrue(wpsCallback.mFailed);
-        assertEquals(ERROR, wpsCallback.mFailureCode);
-        assertFalse(wpsCallback.mStarted);
-        assertFalse(wpsCallback.mSucceeded);
-        verifyNoMoreInteractions(mWifiService);
-    }
-
-    /**
-     * Verify that a call to start WPS does not go to WifiServiceImpl if we do not have a callback.
-     */
-    @Test
-    public void testStartWpsDoesNotCallWifiServiceImpl() {
-        mWifiManager.startWps(null, null);
-        verifyNoMoreInteractions(mWifiService);
-    }
-
-    /**
-     * Verify that a call to cancel WPS immediately returns a failure.
-     */
-    @Test
-    public void testCancelWpsImmediatelyFailsWithCallback() {
-        WpsCallbackTester wpsCallback = new WpsCallbackTester();
-        mWifiManager.cancelWps(wpsCallback);
-        assertTrue(wpsCallback.mFailed);
-        assertEquals(ERROR, wpsCallback.mFailureCode);
-        assertFalse(wpsCallback.mStarted);
-        assertFalse(wpsCallback.mSucceeded);
-        verifyNoMoreInteractions(mWifiService);
-    }
-
-    /**
-     * Verify that a call to cancel WPS does not go to WifiServiceImpl if we do not have a callback.
-     */
-    @Test
-    public void testCancelWpsDoesNotCallWifiServiceImpl() {
-        mWifiManager.cancelWps(null);
-        verifyNoMoreInteractions(mWifiService);
-    }
-
-    /**
-     * Verify that a successful call properly returns true.
-     */
-    @Test
-    public void testSetWifiApConfigurationSuccessReturnsTrue() throws Exception {
-        WifiConfiguration apConfig = new WifiConfiguration();
-
-        when(mWifiService.setWifiApConfiguration(eq(apConfig), eq(TEST_PACKAGE_NAME)))
-                .thenReturn(true);
-        assertTrue(mWifiManager.setWifiApConfiguration(apConfig));
-    }
-
-    /**
-     * Verify that a failed call properly returns false.
-     */
-    @Test
-    public void testSetWifiApConfigurationFailureReturnsFalse() throws Exception {
-        WifiConfiguration apConfig = new WifiConfiguration();
-
-        when(mWifiService.setWifiApConfiguration(eq(apConfig), eq(TEST_PACKAGE_NAME)))
-                .thenReturn(false);
-        assertFalse(mWifiManager.setWifiApConfiguration(apConfig));
-    }
-
-    /**
-     * Verify Exceptions are rethrown when underlying calls to WifiService throw exceptions.
-     */
-    @Test
-    public void testSetWifiApConfigurationRethrowsException() throws Exception {
-        doThrow(new SecurityException()).when(mWifiService).setWifiApConfiguration(any(), any());
-
-        try {
-            mWifiManager.setWifiApConfiguration(new WifiConfiguration());
-            fail("setWifiApConfiguration should rethrow Exceptions from WifiService");
-        } catch (SecurityException e) { }
-    }
-
-    /**
-     * Verify that a successful call properly returns true.
-     */
-    @Test
-    public void testSetSoftApConfigurationSuccessReturnsTrue() throws Exception {
-        SoftApConfiguration apConfig = generatorTestSoftApConfig();
-
-        when(mWifiService.setSoftApConfiguration(eq(apConfig), eq(TEST_PACKAGE_NAME)))
-                .thenReturn(true);
-        assertTrue(mWifiManager.setSoftApConfiguration(apConfig));
-    }
-
-    /**
-     * Verify that a failed call properly returns false.
-     */
-    @Test
-    public void testSetSoftApConfigurationFailureReturnsFalse() throws Exception {
-        SoftApConfiguration apConfig = generatorTestSoftApConfig();
-
-        when(mWifiService.setSoftApConfiguration(eq(apConfig), eq(TEST_PACKAGE_NAME)))
-                .thenReturn(false);
-        assertFalse(mWifiManager.setSoftApConfiguration(apConfig));
-    }
-
-    /**
-     * Verify Exceptions are rethrown when underlying calls to WifiService throw exceptions.
-     */
-    @Test
-    public void testSetSoftApConfigurationRethrowsException() throws Exception {
-        doThrow(new SecurityException()).when(mWifiService).setSoftApConfiguration(any(), any());
-
-        try {
-            mWifiManager.setSoftApConfiguration(generatorTestSoftApConfig());
-            fail("setWifiApConfiguration should rethrow Exceptions from WifiService");
-        } catch (SecurityException e) { }
-    }
-
-    /**
-     * Check the call to startScan calls WifiService.
-     */
-    @Test
-    public void testStartScan() throws Exception {
-        when(mWifiService.startScan(eq(TEST_PACKAGE_NAME), nullable(String.class))).thenReturn(
-                true);
-        assertTrue(mWifiManager.startScan());
-
-        when(mWifiService.startScan(eq(TEST_PACKAGE_NAME), nullable(String.class))).thenReturn(
-                false);
-        assertFalse(mWifiManager.startScan());
-    }
-
-    /**
-     * Verify main looper is used when handler is not provided.
-     */
-    @Test
-    public void registerTrafficStateCallbackUsesMainLooperOnNullArgumentForHandler()
-            throws Exception {
-        ArgumentCaptor<ITrafficStateCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ITrafficStateCallback.Stub.class);
-        mWifiManager.registerTrafficStateCallback(
-                new HandlerExecutor(new Handler(mLooper.getLooper())), mTrafficStateCallback);
-        verify(mWifiService).registerTrafficStateCallback(
-                any(IBinder.class), callbackCaptor.capture(), anyInt());
-
-        assertEquals(0, mLooper.dispatchAll());
-        callbackCaptor.getValue().onStateChanged(TrafficStateCallback.DATA_ACTIVITY_INOUT);
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mTrafficStateCallback).onStateChanged(TrafficStateCallback.DATA_ACTIVITY_INOUT);
-    }
-
-    /**
-     * Verify the call to unregisterTrafficStateCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void unregisterTrafficStateCallbackCallGoesToWifiServiceImpl() throws Exception {
-        ArgumentCaptor<Integer> callbackIdentifier = ArgumentCaptor.forClass(Integer.class);
-        mWifiManager.registerTrafficStateCallback(new HandlerExecutor(mHandler),
-                mTrafficStateCallback);
-        verify(mWifiService).registerTrafficStateCallback(any(IBinder.class),
-                any(ITrafficStateCallback.Stub.class), callbackIdentifier.capture());
-
-        mWifiManager.unregisterTrafficStateCallback(mTrafficStateCallback);
-        verify(mWifiService).unregisterTrafficStateCallback(
-                eq((int) callbackIdentifier.getValue()));
-    }
-
-    /*
-     * Verify client-provided callback is being called through callback proxy on multiple events
-     */
-    @Test
-    public void trafficStateCallbackProxyCallsOnMultipleUpdates() throws Exception {
-        ArgumentCaptor<ITrafficStateCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ITrafficStateCallback.Stub.class);
-        mWifiManager.registerTrafficStateCallback(new HandlerExecutor(mHandler),
-                mTrafficStateCallback);
-        verify(mWifiService).registerTrafficStateCallback(
-                any(IBinder.class), callbackCaptor.capture(), anyInt());
-
-        InOrder inOrder = inOrder(mTrafficStateCallback);
-
-        callbackCaptor.getValue().onStateChanged(TrafficStateCallback.DATA_ACTIVITY_IN);
-        callbackCaptor.getValue().onStateChanged(TrafficStateCallback.DATA_ACTIVITY_INOUT);
-        callbackCaptor.getValue().onStateChanged(TrafficStateCallback.DATA_ACTIVITY_OUT);
-
-        mLooper.dispatchAll();
-        inOrder.verify(mTrafficStateCallback).onStateChanged(
-                TrafficStateCallback.DATA_ACTIVITY_IN);
-        inOrder.verify(mTrafficStateCallback).onStateChanged(
-                TrafficStateCallback.DATA_ACTIVITY_INOUT);
-        inOrder.verify(mTrafficStateCallback).onStateChanged(
-                TrafficStateCallback.DATA_ACTIVITY_OUT);
-    }
-
-    /**
-     * Verify client-provided callback is being called on the correct thread
-     */
-    @Test
-    public void trafficStateCallbackIsCalledOnCorrectThread() throws Exception {
-        ArgumentCaptor<ITrafficStateCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ITrafficStateCallback.Stub.class);
-        TestLooper altLooper = new TestLooper();
-        Handler altHandler = new Handler(altLooper.getLooper());
-        mWifiManager.registerTrafficStateCallback(new HandlerExecutor(altHandler),
-                mTrafficStateCallback);
-        verify(mContext, never()).getMainLooper();
-        verify(mContext, never()).getMainExecutor();
-        verify(mWifiService).registerTrafficStateCallback(
-                any(IBinder.class), callbackCaptor.capture(), anyInt());
-
-        assertEquals(0, altLooper.dispatchAll());
-        callbackCaptor.getValue().onStateChanged(TrafficStateCallback.DATA_ACTIVITY_INOUT);
-        assertEquals(1, altLooper.dispatchAll());
-        verify(mTrafficStateCallback).onStateChanged(TrafficStateCallback.DATA_ACTIVITY_INOUT);
-    }
-
-    /**
-     * Verify the call to registerNetworkRequestMatchCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void registerNetworkRequestMatchCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        ArgumentCaptor<INetworkRequestMatchCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(INetworkRequestMatchCallback.Stub.class);
-        mWifiManager.registerNetworkRequestMatchCallback(
-                new HandlerExecutor(new Handler(mLooper.getLooper())),
-                mNetworkRequestMatchCallback);
-        verify(mWifiService).registerNetworkRequestMatchCallback(
-                any(IBinder.class), callbackCaptor.capture(), anyInt());
-
-        INetworkRequestUserSelectionCallback iUserSelectionCallback =
-                mock(INetworkRequestUserSelectionCallback.class);
-
-        assertEquals(0, mLooper.dispatchAll());
-
-        callbackCaptor.getValue().onAbort();
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mNetworkRequestMatchCallback).onAbort();
-
-        callbackCaptor.getValue().onMatch(new ArrayList<ScanResult>());
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mNetworkRequestMatchCallback).onMatch(anyList());
-
-        callbackCaptor.getValue().onUserSelectionConnectSuccess(new WifiConfiguration());
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mNetworkRequestMatchCallback).onUserSelectionConnectSuccess(
-                any(WifiConfiguration.class));
-
-        callbackCaptor.getValue().onUserSelectionConnectFailure(new WifiConfiguration());
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mNetworkRequestMatchCallback).onUserSelectionConnectFailure(
-                any(WifiConfiguration.class));
-    }
-
-    /**
-     * Verify the call to unregisterNetworkRequestMatchCallback goes to WifiServiceImpl.
-     */
-    @Test
-    public void unregisterNetworkRequestMatchCallbackCallGoesToWifiServiceImpl() throws Exception {
-        ArgumentCaptor<Integer> callbackIdentifier = ArgumentCaptor.forClass(Integer.class);
-        mWifiManager.registerNetworkRequestMatchCallback(new HandlerExecutor(mHandler),
-                mNetworkRequestMatchCallback);
-        verify(mWifiService).registerNetworkRequestMatchCallback(
-                any(IBinder.class), any(INetworkRequestMatchCallback.class),
-                callbackIdentifier.capture());
-
-        mWifiManager.unregisterNetworkRequestMatchCallback(mNetworkRequestMatchCallback);
-        verify(mWifiService).unregisterNetworkRequestMatchCallback(
-                eq((int) callbackIdentifier.getValue()));
-    }
-
-    /**
-     * Verify the call to NetworkRequestUserSelectionCallback goes to
-     * WifiServiceImpl.
-     */
-    @Test
-    public void networkRequestUserSelectionCallbackCallGoesToWifiServiceImpl()
-            throws Exception {
-        ArgumentCaptor<INetworkRequestMatchCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(INetworkRequestMatchCallback.Stub.class);
-        mWifiManager.registerNetworkRequestMatchCallback(
-                new HandlerExecutor(new Handler(mLooper.getLooper())),
-                mNetworkRequestMatchCallback);
-        verify(mWifiService).registerNetworkRequestMatchCallback(
-                any(IBinder.class), callbackCaptor.capture(), anyInt());
-
-        INetworkRequestUserSelectionCallback iUserSelectionCallback =
-                mock(INetworkRequestUserSelectionCallback.class);
-        ArgumentCaptor<NetworkRequestUserSelectionCallback> userSelectionCallbackCaptor =
-                ArgumentCaptor.forClass(NetworkRequestUserSelectionCallback.class);
-        callbackCaptor.getValue().onUserSelectionCallbackRegistration(
-                iUserSelectionCallback);
-        assertEquals(1, mLooper.dispatchAll());
-        verify(mNetworkRequestMatchCallback).onUserSelectionCallbackRegistration(
-                userSelectionCallbackCaptor.capture());
-
-        WifiConfiguration selected = new WifiConfiguration();
-        userSelectionCallbackCaptor.getValue().select(selected);
-        verify(iUserSelectionCallback).select(selected);
-
-        userSelectionCallbackCaptor.getValue().reject();
-        verify(iUserSelectionCallback).reject();
-    }
-
-    /**
-     * Check the call to getAllMatchingWifiConfigs calls getAllMatchingFqdnsForScanResults and
-     * getWifiConfigsForPasspointProfiles of WifiService in order.
-     */
-    @Test
-    public void testGetAllMatchingWifiConfigs() throws Exception {
-        Map<String, List<ScanResult>> passpointProfiles = new HashMap<>();
-        passpointProfiles.put("www.test.com_987a69bca26", new ArrayList<>());
-        when(mWifiService.getAllMatchingPasspointProfilesForScanResults(
-                any(List.class))).thenReturn(passpointProfiles);
-        InOrder inOrder = inOrder(mWifiService);
-
-        mWifiManager.getAllMatchingWifiConfigs(new ArrayList<>());
-
-        inOrder.verify(mWifiService).getAllMatchingPasspointProfilesForScanResults(any(List.class));
-        inOrder.verify(mWifiService).getWifiConfigsForPasspointProfiles(any(List.class));
-    }
-
-    /**
-     * Check the call to getMatchingOsuProviders calls getMatchingOsuProviders of WifiService
-     * with the provided a list of ScanResult.
-     */
-    @Test
-    public void testGetMatchingOsuProviders() throws Exception {
-        mWifiManager.getMatchingOsuProviders(new ArrayList<>());
-
-        verify(mWifiService).getMatchingOsuProviders(any(List.class));
-    }
-
-    /**
-     * Verify calls to {@link WifiManager#addNetworkSuggestions(List)},
-     * {@link WifiManager#getNetworkSuggestions()} and
-     * {@link WifiManager#removeNetworkSuggestions(List)}.
-     */
-    @Test
-    public void addGetRemoveNetworkSuggestions() throws Exception {
-        List<WifiNetworkSuggestion> testList = new ArrayList<>();
-        when(mWifiService.addNetworkSuggestions(any(List.class), anyString(),
-                nullable(String.class))).thenReturn(STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mWifiService.removeNetworkSuggestions(any(List.class), anyString())).thenReturn(
-                STATUS_NETWORK_SUGGESTIONS_SUCCESS);
-        when(mWifiService.getNetworkSuggestions(anyString()))
-                .thenReturn(testList);
-
-        assertEquals(STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiManager.addNetworkSuggestions(testList));
-        verify(mWifiService).addNetworkSuggestions(anyList(), eq(TEST_PACKAGE_NAME),
-                nullable(String.class));
-
-        assertEquals(testList, mWifiManager.getNetworkSuggestions());
-        verify(mWifiService).getNetworkSuggestions(eq(TEST_PACKAGE_NAME));
-
-        assertEquals(STATUS_NETWORK_SUGGESTIONS_SUCCESS,
-                mWifiManager.removeNetworkSuggestions(new ArrayList<>()));
-        verify(mWifiService).removeNetworkSuggestions(anyList(), eq(TEST_PACKAGE_NAME));
-    }
-
-    /**
-     * Verify call to {@link WifiManager#getMaxNumberOfNetworkSuggestionsPerApp()}.
-     */
-    @Test
-    public void getMaxNumberOfNetworkSuggestionsPerApp() {
-        when(mContext.getSystemServiceName(ActivityManager.class))
-                .thenReturn(Context.ACTIVITY_SERVICE);
-        when(mContext.getSystemService(Context.ACTIVITY_SERVICE))
-                .thenReturn(mActivityManager);
-        when(mActivityManager.isLowRamDevice()).thenReturn(true);
-        assertEquals(256, mWifiManager.getMaxNumberOfNetworkSuggestionsPerApp());
-
-        when(mActivityManager.isLowRamDevice()).thenReturn(false);
-        assertEquals(1024, mWifiManager.getMaxNumberOfNetworkSuggestionsPerApp());
-    }
-
-    /**
-     * Verify getting the factory MAC address.
-     */
-    @Test
-    public void testGetFactoryMacAddress() throws Exception {
-        when(mWifiService.getFactoryMacAddresses()).thenReturn(TEST_MAC_ADDRESSES);
-        assertArrayEquals(TEST_MAC_ADDRESSES, mWifiManager.getFactoryMacAddresses());
-        verify(mWifiService).getFactoryMacAddresses();
-    }
-
-    /**
-     * Verify the call to addOnWifiUsabilityStatsListener goes to WifiServiceImpl.
-     */
-    @Test
-    public void addOnWifiUsabilityStatsListeneroesToWifiServiceImpl() throws Exception {
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.addOnWifiUsabilityStatsListener(mExecutor, mOnWifiUsabilityStatsListener);
-        verify(mWifiService).addOnWifiUsabilityStatsListener(any(IBinder.class),
-                any(IOnWifiUsabilityStatsListener.Stub.class), anyInt());
-    }
-
-    /**
-     * Verify the call to removeOnWifiUsabilityStatsListener goes to WifiServiceImpl.
-     */
-    @Test
-    public void removeOnWifiUsabilityListenerGoesToWifiServiceImpl() throws Exception {
-        ArgumentCaptor<Integer> listenerIdentifier = ArgumentCaptor.forClass(Integer.class);
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.addOnWifiUsabilityStatsListener(mExecutor, mOnWifiUsabilityStatsListener);
-        verify(mWifiService).addOnWifiUsabilityStatsListener(any(IBinder.class),
-                any(IOnWifiUsabilityStatsListener.Stub.class), listenerIdentifier.capture());
-
-        mWifiManager.removeOnWifiUsabilityStatsListener(mOnWifiUsabilityStatsListener);
-        verify(mWifiService).removeOnWifiUsabilityStatsListener(
-                eq((int) listenerIdentifier.getValue()));
-    }
-
-    /**
-     * Test behavior of isEnhancedOpenSupported
-     */
-    @Test
-    public void testIsEnhancedOpenSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_OWE));
-        assertTrue(mWifiManager.isEnhancedOpenSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_OWE));
-        assertFalse(mWifiManager.isEnhancedOpenSupported());
-    }
-
-    /**
-     * Test behavior of isWpa3SaeSupported
-     */
-    @Test
-    public void testIsWpa3SaeSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_WPA3_SAE));
-        assertTrue(mWifiManager.isWpa3SaeSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_WPA3_SAE));
-        assertFalse(mWifiManager.isWpa3SaeSupported());
-    }
-
-    /**
-     * Test behavior of isWpa3SuiteBSupported
-     */
-    @Test
-    public void testIsWpa3SuiteBSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_WPA3_SUITE_B));
-        assertTrue(mWifiManager.isWpa3SuiteBSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_WPA3_SUITE_B));
-        assertFalse(mWifiManager.isWpa3SuiteBSupported());
-    }
-
-    /**
-     * Test behavior of isEasyConnectSupported
-     */
-    @Test
-    public void testIsEasyConnectSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WIFI_FEATURE_DPP));
-        assertTrue(mWifiManager.isEasyConnectSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WIFI_FEATURE_DPP));
-        assertFalse(mWifiManager.isEasyConnectSupported());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#addNetwork(WifiConfiguration)}
-     */
-    @Test
-    public void testAddNetwork() throws Exception {
-        WifiConfiguration configuration = new WifiConfiguration();
-        when(mWifiService.addOrUpdateNetwork(any(), anyString()))
-                .thenReturn(TEST_NETWORK_ID);
-
-        assertEquals(mWifiManager.addNetwork(configuration), TEST_NETWORK_ID);
-        verify(mWifiService).addOrUpdateNetwork(configuration, mContext.getOpPackageName());
-
-        // send a null config
-        assertEquals(mWifiManager.addNetwork(null), -1);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#addNetwork(WifiConfiguration)}
-     */
-    @Test
-    public void testUpdateNetwork() throws Exception {
-        WifiConfiguration configuration = new WifiConfiguration();
-        when(mWifiService.addOrUpdateNetwork(any(), anyString()))
-                .thenReturn(TEST_NETWORK_ID);
-
-        configuration.networkId = TEST_NETWORK_ID;
-        assertEquals(mWifiManager.updateNetwork(configuration), TEST_NETWORK_ID);
-        verify(mWifiService).addOrUpdateNetwork(configuration, mContext.getOpPackageName());
-
-        // config with invalid network ID
-        configuration.networkId = -1;
-        assertEquals(mWifiManager.updateNetwork(configuration), -1);
-
-        // send a null config
-        assertEquals(mWifiManager.updateNetwork(null), -1);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#enableNetwork(int, boolean)}
-     */
-    @Test
-    public void testEnableNetwork() throws Exception {
-        when(mWifiService.enableNetwork(anyInt(), anyBoolean(), anyString()))
-                .thenReturn(true);
-        assertTrue(mWifiManager.enableNetwork(TEST_NETWORK_ID, true));
-        verify(mWifiService).enableNetwork(TEST_NETWORK_ID, true, mContext.getOpPackageName());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#disableNetwork(int)}
-     */
-    @Test
-    public void testDisableNetwork() throws Exception {
-        when(mWifiService.disableNetwork(anyInt(), anyString()))
-                .thenReturn(true);
-        assertTrue(mWifiManager.disableNetwork(TEST_NETWORK_ID));
-        verify(mWifiService).disableNetwork(TEST_NETWORK_ID, mContext.getOpPackageName());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#allowAutojoin(int, boolean)}
-     * @throws Exception
-     */
-    @Test
-    public void testAllowAutojoin() throws Exception {
-        mWifiManager.allowAutojoin(1, true);
-        verify(mWifiService).allowAutojoin(1, true);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#allowAutojoinPasspoint(String, boolean)}
-     * @throws Exception
-     */
-    @Test
-    public void testAllowAutojoinPasspoint() throws Exception {
-        final String fqdn = "FullyQualifiedDomainName";
-        mWifiManager.allowAutojoinPasspoint(fqdn, true);
-        verify(mWifiService).allowAutojoinPasspoint(fqdn, true);
-    }
-
-    /**
-     * Test behavior of
-     * {@link WifiManager#setMacRandomizationSettingPasspointEnabled(String, boolean)}
-     */
-    @Test
-    public void testSetMacRandomizationSettingPasspointEnabled() throws Exception {
-        final String fqdn = "FullyQualifiedDomainName";
-        mWifiManager.setMacRandomizationSettingPasspointEnabled(fqdn, true);
-        verify(mWifiService).setMacRandomizationSettingPasspointEnabled(fqdn, true);
-    }
-
-    /**
-     * Test behavior of
-     * {@link WifiManager#setMacRandomizationSettingPasspointEnabled(String, boolean)}
-     */
-    @Test
-    public void testSetPasspointMeteredOverride() throws Exception {
-        final String fqdn = "FullyQualifiedDomainName";
-        mWifiManager.setPasspointMeteredOverride(fqdn, METERED_OVERRIDE_METERED);
-        verify(mWifiService).setPasspointMeteredOverride(fqdn, METERED_OVERRIDE_METERED);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#disconnect()}
-     */
-    @Test
-    public void testDisconnect() throws Exception {
-        when(mWifiService.disconnect(anyString())).thenReturn(true);
-        assertTrue(mWifiManager.disconnect());
-        verify(mWifiService).disconnect(mContext.getOpPackageName());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#reconnect()}
-     */
-    @Test
-    public void testReconnect() throws Exception {
-        when(mWifiService.reconnect(anyString())).thenReturn(true);
-        assertTrue(mWifiManager.reconnect());
-        verify(mWifiService).reconnect(mContext.getOpPackageName());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#reassociate()}
-     */
-    @Test
-    public void testReassociate() throws Exception {
-        when(mWifiService.reassociate(anyString())).thenReturn(true);
-        assertTrue(mWifiManager.reassociate());
-        verify(mWifiService).reassociate(mContext.getOpPackageName());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#getSupportedFeatures()}
-     */
-    @Test
-    public void testGetSupportedFeatures() throws Exception {
-        long supportedFeatures =
-                WIFI_FEATURE_SCANNER
-                        | WIFI_FEATURE_PASSPOINT
-                        | WIFI_FEATURE_P2P;
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(Long.valueOf(supportedFeatures));
-
-        assertTrue(mWifiManager.isWifiScannerSupported());
-        assertTrue(mWifiManager.isPasspointSupported());
-        assertTrue(mWifiManager.isP2pSupported());
-        assertFalse(mWifiManager.isPortableHotspotSupported());
-        assertFalse(mWifiManager.isDeviceToDeviceRttSupported());
-        assertFalse(mWifiManager.isDeviceToApRttSupported());
-        assertFalse(mWifiManager.isPreferredNetworkOffloadSupported());
-        assertFalse(mWifiManager.isAdditionalStaSupported());
-        assertFalse(mWifiManager.isTdlsSupported());
-        assertFalse(mWifiManager.isOffChannelTdlsSupported());
-        assertFalse(mWifiManager.isEnhancedPowerReportingSupported());
-    }
-
-    /**
-     * Tests that passing a null Executor to {@link WifiManager#getWifiActivityEnergyInfoAsync}
-     * throws an exception.
-     */
-    @Test(expected = NullPointerException.class)
-    public void testGetWifiActivityInfoNullExecutor() throws Exception {
-        mWifiManager.getWifiActivityEnergyInfoAsync(null, mOnWifiActivityEnergyInfoListener);
-    }
-
-    /**
-     * Tests that passing a null listener to {@link WifiManager#getWifiActivityEnergyInfoAsync}
-     * throws an exception.
-     */
-    @Test(expected = NullPointerException.class)
-    public void testGetWifiActivityInfoNullListener() throws Exception {
-        mWifiManager.getWifiActivityEnergyInfoAsync(mExecutor, null);
-    }
-
-    /** Tests that the listener runs on the correct Executor. */
-    @Test
-    public void testGetWifiActivityInfoRunsOnCorrectExecutor() throws Exception {
-        mWifiManager.getWifiActivityEnergyInfoAsync(mExecutor, mOnWifiActivityEnergyInfoListener);
-        ArgumentCaptor<IOnWifiActivityEnergyInfoListener> listenerCaptor =
-                ArgumentCaptor.forClass(IOnWifiActivityEnergyInfoListener.class);
-        verify(mWifiService).getWifiActivityEnergyInfoAsync(listenerCaptor.capture());
-        IOnWifiActivityEnergyInfoListener listener = listenerCaptor.getValue();
-        listener.onWifiActivityEnergyInfo(mWifiActivityEnergyInfo);
-        verify(mExecutor).execute(any());
-
-        // ensure that the executor is only triggered once
-        listener.onWifiActivityEnergyInfo(mWifiActivityEnergyInfo);
-        verify(mExecutor).execute(any());
-    }
-
-    /** Tests that the correct listener runs. */
-    @Test
-    public void testGetWifiActivityInfoRunsCorrectListener() throws Exception {
-        int[] flag = {0};
-        mWifiManager.getWifiActivityEnergyInfoAsync(
-                new SynchronousExecutor(), info -> flag[0]++);
-        ArgumentCaptor<IOnWifiActivityEnergyInfoListener> listenerCaptor =
-                ArgumentCaptor.forClass(IOnWifiActivityEnergyInfoListener.class);
-        verify(mWifiService).getWifiActivityEnergyInfoAsync(listenerCaptor.capture());
-        IOnWifiActivityEnergyInfoListener listener = listenerCaptor.getValue();
-        listener.onWifiActivityEnergyInfo(mWifiActivityEnergyInfo);
-        assertEquals(1, flag[0]);
-
-        // ensure that the listener is only triggered once
-        listener.onWifiActivityEnergyInfo(mWifiActivityEnergyInfo);
-        assertEquals(1, flag[0]);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#getConnectionInfo()}
-     */
-    @Test
-    public void testGetConnectionInfo() throws Exception {
-        WifiInfo wifiInfo = new WifiInfo();
-        when(mWifiService.getConnectionInfo(anyString(), nullable(String.class))).thenReturn(
-                wifiInfo);
-
-        assertEquals(wifiInfo, mWifiManager.getConnectionInfo());
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#is5GHzBandSupported()}
-     */
-    @Test
-    public void testIs5GHzBandSupported() throws Exception {
-        when(mWifiService.is5GHzBandSupported()).thenReturn(true);
-        assertTrue(mWifiManager.is5GHzBandSupported());
-        verify(mWifiService).is5GHzBandSupported();
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#is6GHzBandSupported()}
-     */
-    @Test
-    public void testIs6GHzBandSupported() throws Exception {
-        when(mWifiService.is6GHzBandSupported()).thenReturn(true);
-        assertTrue(mWifiManager.is6GHzBandSupported());
-        verify(mWifiService).is6GHzBandSupported();
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#isWifiStandardSupported()}
-     */
-    @Test
-    public void testIsWifiStandardSupported() throws Exception {
-        int standard = ScanResult.WIFI_STANDARD_11AX;
-        when(mWifiService.isWifiStandardSupported(standard)).thenReturn(true);
-        assertTrue(mWifiManager.isWifiStandardSupported(standard));
-        verify(mWifiService).isWifiStandardSupported(standard);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#getDhcpInfo()}
-     */
-    @Test
-    public void testGetDhcpInfo() throws Exception {
-        DhcpInfo dhcpInfo = new DhcpInfo();
-
-        when(mWifiService.getDhcpInfo()).thenReturn(dhcpInfo);
-        assertEquals(dhcpInfo, mWifiManager.getDhcpInfo());
-        verify(mWifiService).getDhcpInfo();
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#setWifiEnabled(boolean)}
-     */
-    @Test
-    public void testSetWifiEnabled() throws Exception {
-        when(mWifiService.setWifiEnabled(anyString(), anyBoolean())).thenReturn(true);
-        assertTrue(mWifiManager.setWifiEnabled(true));
-        verify(mWifiService).setWifiEnabled(mContext.getOpPackageName(), true);
-        assertTrue(mWifiManager.setWifiEnabled(false));
-        verify(mWifiService).setWifiEnabled(mContext.getOpPackageName(), false);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#connect(int, ActionListener)}
-     */
-    @Test
-    public void testConnectWithListener() throws Exception {
-        ActionListener externalListener = mock(ActionListener.class);
-        mWifiManager.connect(TEST_NETWORK_ID, externalListener);
-
-        ArgumentCaptor<IActionListener> binderListenerCaptor =
-                ArgumentCaptor.forClass(IActionListener.class);
-        verify(mWifiService).connect(eq(null), eq(TEST_NETWORK_ID), any(Binder.class),
-                binderListenerCaptor.capture(), anyInt());
-        assertNotNull(binderListenerCaptor.getValue());
-
-        // Trigger on success.
-        binderListenerCaptor.getValue().onSuccess();
-        mLooper.dispatchAll();
-        verify(externalListener).onSuccess();
-
-        // Trigger on failure.
-        binderListenerCaptor.getValue().onFailure(BUSY);
-        mLooper.dispatchAll();
-        verify(externalListener).onFailure(BUSY);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#connect(int, ActionListener)}
-     */
-    @Test
-    public void testConnectWithListenerHandleSecurityException() throws Exception {
-        doThrow(new SecurityException()).when(mWifiService)
-                .connect(eq(null), anyInt(), any(IBinder.class),
-                        any(IActionListener.class), anyInt());
-        ActionListener externalListener = mock(ActionListener.class);
-        mWifiManager.connect(TEST_NETWORK_ID, externalListener);
-
-        mLooper.dispatchAll();
-        verify(externalListener).onFailure(NOT_AUTHORIZED);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#connect(int, ActionListener)}
-     */
-    @Test
-    public void testConnectWithListenerHandleRemoteException() throws Exception {
-        doThrow(new RemoteException()).when(mWifiService)
-                .connect(eq(null), anyInt(), any(IBinder.class),
-                        any(IActionListener.class), anyInt());
-        ActionListener externalListener = mock(ActionListener.class);
-        mWifiManager.connect(TEST_NETWORK_ID, externalListener);
-
-        mLooper.dispatchAll();
-        verify(externalListener).onFailure(ERROR);
-    }
-
-    /**
-     * Test behavior of {@link WifiManager#connect(int, ActionListener)}
-     */
-    @Test
-    public void testConnectWithoutListener() throws Exception {
-        WifiConfiguration configuration = new WifiConfiguration();
-        mWifiManager.connect(configuration, null);
-
-        verify(mWifiService).connect(configuration, WifiConfiguration.INVALID_NETWORK_ID, null,
-                null, 0);
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if callback is not provided.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testRegisterScanResultsCallbackWithNullCallback() throws Exception {
-        mWifiManager.registerScanResultsCallback(mExecutor, null);
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if executor is not provided.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testRegisterCallbackWithNullExecutor() throws Exception {
-        mWifiManager.registerScanResultsCallback(null, mScanResultsCallback);
-    }
-
-    /**
-     * Verify client provided callback is being called to the right callback.
-     */
-    @Test
-    public void testAddScanResultsCallbackAndReceiveEvent() throws Exception {
-        ArgumentCaptor<IScanResultsCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(IScanResultsCallback.Stub.class);
-        mWifiManager.registerScanResultsCallback(new SynchronousExecutor(), mScanResultsCallback);
-        verify(mWifiService).registerScanResultsCallback(callbackCaptor.capture());
-        callbackCaptor.getValue().onScanResultsAvailable();
-        verify(mRunnable).run();
-    }
-
-    /**
-     * Verify client provided callback is being called to the right executor.
-     */
-    @Test
-    public void testRegisterScanResultsCallbackWithTheTargetExecutor() throws Exception {
-        ArgumentCaptor<IScanResultsCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(IScanResultsCallback.Stub.class);
-        mWifiManager.registerScanResultsCallback(mExecutor, mScanResultsCallback);
-        verify(mWifiService).registerScanResultsCallback(callbackCaptor.capture());
-        mWifiManager.registerScanResultsCallback(mAnotherExecutor, mScanResultsCallback);
-        callbackCaptor.getValue().onScanResultsAvailable();
-        verify(mExecutor, never()).execute(any(Runnable.class));
-        verify(mAnotherExecutor).execute(any(Runnable.class));
-    }
-
-    /**
-     * Verify client register unregister then register again, to ensure callback still works.
-     */
-    @Test
-    public void testRegisterUnregisterThenRegisterAgainWithScanResultCallback() throws Exception {
-        ArgumentCaptor<IScanResultsCallback.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(IScanResultsCallback.Stub.class);
-        mWifiManager.registerScanResultsCallback(new SynchronousExecutor(), mScanResultsCallback);
-        verify(mWifiService).registerScanResultsCallback(callbackCaptor.capture());
-        mWifiManager.unregisterScanResultsCallback(mScanResultsCallback);
-        callbackCaptor.getValue().onScanResultsAvailable();
-        verify(mRunnable, never()).run();
-        mWifiManager.registerScanResultsCallback(new SynchronousExecutor(), mScanResultsCallback);
-        callbackCaptor.getValue().onScanResultsAvailable();
-        verify(mRunnable).run();
-    }
-
-    /**
-     * Verify client unregisterScanResultsCallback.
-     */
-    @Test
-    public void testUnregisterScanResultsCallback() throws Exception {
-        mWifiManager.unregisterScanResultsCallback(mScanResultsCallback);
-        verify(mWifiService).unregisterScanResultsCallback(any());
-    }
-
-    /**
-     * Verify client unregisterScanResultsCallback with null callback will cause an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testUnregisterScanResultsCallbackWithNullCallback() throws Exception {
-        mWifiManager.unregisterScanResultsCallback(null);
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if executor not provided.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testAddSuggestionConnectionStatusListenerWithNullExecutor() {
-        mWifiManager.addSuggestionConnectionStatusListener(null, mListener);
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if listener is not provided.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testAddSuggestionConnectionStatusListenerWithNullListener() {
-        mWifiManager.addSuggestionConnectionStatusListener(mExecutor, null);
-    }
-
-    /**
-     * Verify client provided listener is being called to the right listener.
-     */
-    @Test
-    public void testAddSuggestionConnectionStatusListenerAndReceiveEvent() throws Exception {
-        int errorCode = STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION;
-        ArgumentCaptor<ISuggestionConnectionStatusListener.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISuggestionConnectionStatusListener.Stub.class);
-        Executor executor = new SynchronousExecutor();
-        mWifiManager.addSuggestionConnectionStatusListener(executor, mListener);
-        verify(mWifiService).registerSuggestionConnectionStatusListener(any(IBinder.class),
-                callbackCaptor.capture(), anyInt(), anyString(), nullable(String.class));
-        callbackCaptor.getValue().onConnectionStatus(mWifiNetworkSuggestion, errorCode);
-        verify(mListener).onConnectionStatus(any(WifiNetworkSuggestion.class), eq(errorCode));
-    }
-
-    /**
-     * Verify client provided listener is being called to the right executor.
-     */
-    @Test
-    public void testAddSuggestionConnectionStatusListenerWithTheTargetExecutor() throws Exception {
-        int errorCode = STATUS_SUGGESTION_CONNECTION_FAILURE_AUTHENTICATION;
-        ArgumentCaptor<ISuggestionConnectionStatusListener.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(ISuggestionConnectionStatusListener.Stub.class);
-        mWifiManager.addSuggestionConnectionStatusListener(mExecutor, mListener);
-        verify(mWifiService).registerSuggestionConnectionStatusListener(any(IBinder.class),
-                callbackCaptor.capture(), anyInt(), anyString(), nullable(String.class));
-        callbackCaptor.getValue().onConnectionStatus(any(WifiNetworkSuggestion.class), errorCode);
-        verify(mExecutor).execute(any(Runnable.class));
-    }
-
-    /**
-     * Verify an IllegalArgumentException is thrown if listener is not provided.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testRemoveSuggestionConnectionListenerWithNullListener() {
-        mWifiManager.removeSuggestionConnectionStatusListener(null);
-    }
-
-    /**
-     * Verify removeSuggestionConnectionListener.
-     */
-    @Test
-    public void testRemoveSuggestionConnectionListener() throws Exception {
-        mWifiManager.removeSuggestionConnectionStatusListener(mListener);
-        verify(mWifiService).unregisterSuggestionConnectionStatusListener(anyInt(), anyString());
-    }
-
-    /** Test {@link WifiManager#calculateSignalLevel(int)} */
-    @Test
-    public void testCalculateSignalLevel() throws Exception {
-        when(mWifiService.calculateSignalLevel(anyInt())).thenReturn(3);
-        int actual = mWifiManager.calculateSignalLevel(-60);
-        verify(mWifiService).calculateSignalLevel(-60);
-        assertEquals(3, actual);
-    }
-
-    /** Test {@link WifiManager#getMaxSignalLevel()} */
-    @Test
-    public void testGetMaxSignalLevel() throws Exception {
-        when(mWifiService.calculateSignalLevel(anyInt())).thenReturn(4);
-        int actual = mWifiManager.getMaxSignalLevel();
-        verify(mWifiService).calculateSignalLevel(Integer.MAX_VALUE);
-        assertEquals(4, actual);
-    }
-
-    /*
-     * Test behavior of isWapiSupported
-     * @throws Exception
-     */
-    @Test
-    public void testIsWapiSupported() throws Exception {
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(WifiManager.WIFI_FEATURE_WAPI));
-        assertTrue(mWifiManager.isWapiSupported());
-        when(mWifiService.getSupportedFeatures())
-                .thenReturn(new Long(~WifiManager.WIFI_FEATURE_WAPI));
-        assertFalse(mWifiManager.isWapiSupported());
-    }
-
-    /*
-     * Test that DPP channel list is parsed correctly
-     */
-    @Test
-    public void testparseDppChannelList() throws Exception {
-        String channelList = "81/1,2,3,4,5,6,7,8,9,10,11,115/36,40,44,48";
-        SparseArray<int[]> expectedResult = new SparseArray<>();
-        expectedResult.append(81, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11});
-        expectedResult.append(115, new int[]{36, 40, 44, 48});
-
-        SparseArray<int[]> result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(expectedResult.size(), result.size());
-
-        int index = 0;
-        int key;
-
-        // Compare the two primitive int arrays
-        do {
-            try {
-                key = result.keyAt(index);
-            } catch (java.lang.ArrayIndexOutOfBoundsException e) {
-                break;
-            }
-            int[] expected = expectedResult.get(key);
-            int[] output = result.get(key);
-            assertEquals(expected.length, output.length);
-            for (int i = 0; i < output.length; i++) {
-                assertEquals(expected[i], output[i]);
-            }
-            index++;
-        } while (true);
-    }
-
-    /*
-     * Test that DPP channel list parser gracefully fails for invalid input
-     */
-    @Test
-    public void testparseDppChannelListWithInvalidFormats() throws Exception {
-        String channelList = "1,2,3,4,5,6,7,8,9,10,11,36,40,44,48";
-        SparseArray<int[]> result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(result.size(), 0);
-
-        channelList = "ajgalskgjalskjg3-09683dh";
-        result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(result.size(), 0);
-
-        channelList = "13/abc,46////";
-        result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(result.size(), 0);
-
-        channelList = "11/4,5,13/";
-        result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(result.size(), 0);
-
-        channelList = "/24,6";
-        result = WifiManager.parseDppChannelList(channelList);
-        assertEquals(result.size(), 0);
-    }
-
-    /**
-     * Test getWifiConfigsForMatchedNetworkSuggestions for given scanResults.
-     */
-    @Test
-    public void testGetWifiConfigsForMatchedNetworkSuggestions() throws Exception {
-        List<WifiConfiguration> testResults = new ArrayList<>();
-        testResults.add(new WifiConfiguration());
-
-        when(mWifiService.getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(any(List.class)))
-                .thenReturn(testResults);
-        assertEquals(testResults, mWifiManager
-                .getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(new ArrayList<>()));
-    }
-
-    /**
-     * Verify the call to setWifiConnectedNetworkScorer goes to WifiServiceImpl.
-     */
-    @Test
-    public void setWifiConnectedNetworkScorerGoesToWifiServiceImpl() throws Exception {
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.setWifiConnectedNetworkScorer(mExecutor, mWifiConnectedNetworkScorer);
-        verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
-                any(IWifiConnectedNetworkScorer.Stub.class));
-    }
-
-    /**
-     * Verify the call to clearWifiConnectedNetworkScorer goes to WifiServiceImpl.
-     */
-    @Test
-    public void clearWifiConnectedNetworkScorerGoesToWifiServiceImpl() throws Exception {
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.setWifiConnectedNetworkScorer(mExecutor, mWifiConnectedNetworkScorer);
-        verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
-                any(IWifiConnectedNetworkScorer.Stub.class));
-
-        mWifiManager.clearWifiConnectedNetworkScorer();
-        verify(mWifiService).clearWifiConnectedNetworkScorer();
-    }
-
-    /**
-     * Verify that Wi-Fi connected scorer receives score update observer after registeration.
-     */
-    @Test
-    public void verifyScorerReceiveScoreUpdateObserverAfterRegistration() throws Exception {
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.setWifiConnectedNetworkScorer(mExecutor, mWifiConnectedNetworkScorer);
-        ArgumentCaptor<IWifiConnectedNetworkScorer.Stub> scorerCaptor =
-                ArgumentCaptor.forClass(IWifiConnectedNetworkScorer.Stub.class);
-        verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
-                scorerCaptor.capture());
-        scorerCaptor.getValue().onSetScoreUpdateObserver(any());
-        mLooper.dispatchAll();
-        verify(mWifiConnectedNetworkScorer).onSetScoreUpdateObserver(any());
-    }
-
-    /**
-     * Verify that Wi-Fi connected scorer receives session ID when onStart/onStop methods
-     * are called.
-     */
-    @Test
-    public void verifyScorerReceiveSessionIdWhenStartStopIsCalled() throws Exception {
-        mExecutor = new SynchronousExecutor();
-        mWifiManager.setWifiConnectedNetworkScorer(mExecutor, mWifiConnectedNetworkScorer);
-        ArgumentCaptor<IWifiConnectedNetworkScorer.Stub> callbackCaptor =
-                ArgumentCaptor.forClass(IWifiConnectedNetworkScorer.Stub.class);
-        verify(mWifiService).setWifiConnectedNetworkScorer(any(IBinder.class),
-                callbackCaptor.capture());
-        callbackCaptor.getValue().onStart(0);
-        callbackCaptor.getValue().onStop(10);
-        mLooper.dispatchAll();
-        verify(mWifiConnectedNetworkScorer).onStart(0);
-        verify(mWifiConnectedNetworkScorer).onStop(10);
-    }
-
-    @Test
-    public void testScanThrottle() throws Exception {
-        mWifiManager.setScanThrottleEnabled(true);
-        verify(mWifiService).setScanThrottleEnabled(true);
-
-        when(mWifiService.isScanThrottleEnabled()).thenReturn(false);
-        assertFalse(mWifiManager.isScanThrottleEnabled());
-        verify(mWifiService).isScanThrottleEnabled();
-    }
-
-    @Test
-    public void testAutoWakeup() throws Exception {
-        mWifiManager.setAutoWakeupEnabled(true);
-        verify(mWifiService).setAutoWakeupEnabled(true);
-
-        when(mWifiService.isAutoWakeupEnabled()).thenReturn(false);
-        assertFalse(mWifiManager.isAutoWakeupEnabled());
-        verify(mWifiService).isAutoWakeupEnabled();
-    }
-
-
-    @Test
-    public void testScanAvailable() throws Exception {
-        mWifiManager.setScanAlwaysAvailable(true);
-        verify(mWifiService).setScanAlwaysAvailable(true);
-
-        when(mWifiService.isScanAlwaysAvailable()).thenReturn(false);
-        assertFalse(mWifiManager.isScanAlwaysAvailable());
-        verify(mWifiService).isScanAlwaysAvailable();
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkAgentSpecifierTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkAgentSpecifierTest.java
deleted file mode 100644
index d479aac..0000000
--- a/wifi/tests/src/android/net/wifi/WifiNetworkAgentSpecifierTest.java
+++ /dev/null
@@ -1,395 +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.net.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.net.MacAddress;
-import android.net.MatchAllNetworkSpecifier;
-import android.os.Parcel;
-import android.os.PatternMatcher;
-import android.util.Pair;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiNetworkAgentSpecifier}.
- */
-@SmallTest
-public class WifiNetworkAgentSpecifierTest {
-    private static final String TEST_SSID = "Test123";
-    private static final String TEST_SSID_PATTERN = "Test";
-    private static final String TEST_SSID_1 = "456test";
-    private static final String TEST_BSSID = "12:12:12:aa:0b:c0";
-    private static final String TEST_BSSID_OUI_BASE_ADDRESS = "12:12:12:00:00:00";
-    private static final String TEST_BSSID_OUI_MASK = "ff:ff:ff:00:00:00";
-    private static final String TEST_BSSID_1 = "aa:cc:12:aa:0b:c0";
-    private static final String TEST_PRESHARED_KEY = "\"Test123\"";
-
-    /**
-     * Validate that parcel marshalling/unmarshalling works
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierParcel() {
-        WifiNetworkAgentSpecifier specifier = createDefaultNetworkAgentSpecifier();
-
-        Parcel parcelW = Parcel.obtain();
-        specifier.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiNetworkAgentSpecifier parcelSpecifier =
-                WifiNetworkAgentSpecifier.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(specifier, parcelSpecifier);
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier equals with itself.
-     * a) Create network agent specifier 1 for WPA_PSK network
-     * b) Create network agent specifier 2 with the same params as specifier 1.
-     * c) Ensure that the specifier 2 equals specifier 1.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierEqualsSame() {
-        WifiNetworkAgentSpecifier specifier1 = createDefaultNetworkAgentSpecifier();
-        WifiNetworkAgentSpecifier specifier2 = createDefaultNetworkAgentSpecifier();
-
-        assertTrue(specifier2.equals(specifier1));
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier equals between instances of {@link WifiNetworkAgentSpecifier}.
-     * a) Create network agent specifier 1 for WPA_PSK network
-     * b) Create network agent specifier 2 with different key mgmt params.
-     * c) Ensure that the specifier 2 does not equal specifier 1.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierDoesNotEqualsWhenKeyMgmtDifferent() {
-        WifiConfiguration wifiConfiguration1 = createDefaultWifiConfiguration();
-        WifiNetworkAgentSpecifier specifier1 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration1);
-
-        WifiConfiguration wifiConfiguration2 = new WifiConfiguration(wifiConfiguration1);
-        wifiConfiguration2.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkAgentSpecifier specifier2 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration2);
-
-        assertFalse(specifier2.equals(specifier1));
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier equals between instances of {@link WifiNetworkAgentSpecifier}.
-     * a) Create network agent specifier 1 for WPA_PSK network
-     * b) Create network agent specifier 2 with different SSID.
-     * c) Ensure that the specifier 2 does not equal specifier 1.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierDoesNotSatisifyWhenSsidDifferent() {
-        WifiConfiguration wifiConfiguration1 = createDefaultWifiConfiguration();
-        WifiNetworkAgentSpecifier specifier1 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration1);
-
-        WifiConfiguration wifiConfiguration2 = new WifiConfiguration(wifiConfiguration1);
-        wifiConfiguration2.SSID = TEST_SSID_1;
-        WifiNetworkAgentSpecifier specifier2 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration2);
-
-        assertFalse(specifier2.equals(specifier1));
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier equals between instances of {@link WifiNetworkAgentSpecifier}.
-     * a) Create network agent specifier 1 for WPA_PSK network
-     * b) Create network agent specifier 2 with different BSSID.
-     * c) Ensure that the specifier 2 does not equal specifier 1.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierDoesNotSatisifyWhenBssidDifferent() {
-        WifiConfiguration wifiConfiguration1 = createDefaultWifiConfiguration();
-        WifiNetworkAgentSpecifier specifier1 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration1);
-
-        WifiConfiguration wifiConfiguration2 = new WifiConfiguration(wifiConfiguration1);
-        wifiConfiguration2.BSSID = TEST_BSSID_1;
-        WifiNetworkAgentSpecifier specifier2 =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfiguration2);
-
-        assertFalse(specifier2.equals(specifier1));
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier matching.
-     * a) Create a network agent specifier for WPA_PSK network
-     * b) Ensure that the specifier matches {@code null} and {@link MatchAllNetworkSpecifier}
-     * specifiers.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierSatisifiesNullAndAllMatch() {
-        WifiNetworkAgentSpecifier specifier = createDefaultNetworkAgentSpecifier();
-
-        assertTrue(specifier.canBeSatisfiedBy(null));
-        assertTrue(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier()));
-    }
-
-    /**
-     * Validate NetworkAgentSpecifier matching with itself.
-     * a) Create network agent specifier 1 for WPA_PSK network
-     * b) Create network agent specifier 2 with the same params as specifier 1.
-     * c) Ensure that the agent specifier is satisfied by itself.
-     */
-    @Test
-    public void testWifiNetworkAgentSpecifierDoesSatisifySame() {
-        WifiNetworkAgentSpecifier specifier1 = createDefaultNetworkAgentSpecifier();
-        WifiNetworkAgentSpecifier specifier2 = createDefaultNetworkAgentSpecifier();
-
-        assertTrue(specifier2.canBeSatisfiedBy(specifier1));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with matching SSID pattern.
-     * c) Ensure that the agent specifier is satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidPattern() {
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier = createDefaultNetworkAgentSpecifier();
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(TEST_SSID_PATTERN, PatternMatcher.PATTERN_PREFIX);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertTrue(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertTrue(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with matching BSSID pattern.
-     * c) Ensure that the agent specifier is satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithBssidPattern() {
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier = createDefaultNetworkAgentSpecifier();
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(".*", PatternMatcher.PATTERN_SIMPLE_GLOB);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK));
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertTrue(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertTrue(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with matching SSID & BSSID pattern.
-     * c) Ensure that the agent specifier is satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierSatisfiesNetworkSpecifierWithSsidAndBssidPattern() {
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier = createDefaultNetworkAgentSpecifier();
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(TEST_SSID_PATTERN, PatternMatcher.PATTERN_PREFIX);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK));
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertTrue(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertTrue(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with non-matching SSID pattern.
-     * c) Ensure that the agent specifier is not satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithSsidPattern() {
-        WifiConfiguration wifiConfigurationNetworkAgent = createDefaultWifiConfiguration();
-        wifiConfigurationNetworkAgent.SSID = "\"" + TEST_SSID_1 + "\"";
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfigurationNetworkAgent);
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(TEST_SSID_PATTERN, PatternMatcher.PATTERN_PREFIX);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS, WifiManager.ALL_ZEROS_MAC_ADDRESS);
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertFalse(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertFalse(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with non-matching BSSID pattern.
-     * c) Ensure that the agent specifier is not satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithBssidPattern() {
-        WifiConfiguration wifiConfigurationNetworkAgent = createDefaultWifiConfiguration();
-        wifiConfigurationNetworkAgent.BSSID = TEST_BSSID_1;
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfigurationNetworkAgent);
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(".*", PatternMatcher.PATTERN_SIMPLE_GLOB);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK));
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertFalse(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertFalse(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with non-matching SSID and BSSID pattern.
-     * c) Ensure that the agent specifier is not satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithSsidAndBssidPattern() {
-        WifiConfiguration wifiConfigurationNetworkAgent = createDefaultWifiConfiguration();
-        wifiConfigurationNetworkAgent.BSSID = TEST_BSSID_1;
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier =
-                new WifiNetworkAgentSpecifier(
-                        wifiConfigurationNetworkAgent);
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(TEST_SSID_PATTERN, PatternMatcher.PATTERN_PREFIX);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK));
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement
-                .set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertFalse(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertFalse(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-    /**
-     * Validate {@link WifiNetworkAgentSpecifier} with {@link WifiNetworkSpecifier} matching.
-     * a) Create network agent specifier for WPA_PSK network
-     * b) Create network specifier with matching SSID and BSSID pattern, but different key mgmt.
-     * c) Ensure that the agent specifier is not satisfied by specifier.
-     */
-    @Test
-    public void
-            testWifiNetworkAgentSpecifierDoesNotSatisfyNetworkSpecifierWithDifferentKeyMgmt() {
-        WifiNetworkAgentSpecifier wifiNetworkAgentSpecifier = createDefaultNetworkAgentSpecifier();
-
-        PatternMatcher ssidPattern =
-                new PatternMatcher(TEST_SSID_PATTERN, PatternMatcher.PATTERN_PREFIX);
-        Pair<MacAddress, MacAddress> bssidPattern =
-                Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK));
-        WifiConfiguration wificonfigurationNetworkSpecifier = new WifiConfiguration();
-        wificonfigurationNetworkSpecifier.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSpecifier wifiNetworkSpecifier = new WifiNetworkSpecifier(
-                ssidPattern,
-                bssidPattern,
-                wificonfigurationNetworkSpecifier);
-
-        assertFalse(wifiNetworkSpecifier.canBeSatisfiedBy(wifiNetworkAgentSpecifier));
-        assertFalse(wifiNetworkAgentSpecifier.canBeSatisfiedBy(wifiNetworkSpecifier));
-    }
-
-
-    private WifiConfiguration createDefaultWifiConfiguration() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.SSID = "\"" + TEST_SSID + "\"";
-        wifiConfiguration.BSSID = TEST_BSSID;
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-        return wifiConfiguration;
-    }
-
-    private WifiNetworkAgentSpecifier createDefaultNetworkAgentSpecifier() {
-        return new WifiNetworkAgentSpecifier(createDefaultWifiConfiguration());
-    }
-
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkScoreCacheTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkScoreCacheTest.java
index fdd11a3..c4967eb 100644
--- a/wifi/tests/src/android/net/wifi/WifiNetworkScoreCacheTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiNetworkScoreCacheTest.java
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License
+ * limitations under the License.
  */
 
 package android.net.wifi;
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java
deleted file mode 100644
index fc0ef46..0000000
--- a/wifi/tests/src/android/net/wifi/WifiNetworkSpecifierTest.java
+++ /dev/null
@@ -1,512 +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.net.wifi;
-
-import static android.os.PatternMatcher.PATTERN_LITERAL;
-import static android.os.PatternMatcher.PATTERN_PREFIX;
-import static android.os.PatternMatcher.PATTERN_SIMPLE_GLOB;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.net.MacAddress;
-import android.net.MatchAllNetworkSpecifier;
-import android.net.NetworkSpecifier;
-import android.os.Parcel;
-import android.os.PatternMatcher;
-import android.util.Pair;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiNetworkSpecifier}.
- */
-@SmallTest
-public class WifiNetworkSpecifierTest {
-    private static final String TEST_SSID = "Test123";
-    private static final String TEST_BSSID_OUI_BASE_ADDRESS = "12:12:12:00:00:00";
-    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\"";
-
-    /**
-     * Validate correctness of WifiNetworkSpecifier object created by
-     * {@link WifiNetworkSpecifier.Builder#build()} for open network with SSID pattern.
-     */
-    @Test
-    public void testWifiNetworkSpecifierBuilderForOpenNetworkWithSsidPattern() {
-        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_PREFIX))
-                .build();
-
-        assertTrue(specifier instanceof WifiNetworkSpecifier);
-        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
-
-        assertEquals(TEST_SSID, wifiNetworkSpecifier.ssidPatternMatcher.getPath());
-        assertEquals(PATTERN_PREFIX, wifiNetworkSpecifier.ssidPatternMatcher.getType());
-        assertEquals(WifiManager.ALL_ZEROS_MAC_ADDRESS,
-                wifiNetworkSpecifier.bssidPatternMatcher.first);
-        assertEquals(WifiManager.ALL_ZEROS_MAC_ADDRESS,
-                wifiNetworkSpecifier.bssidPatternMatcher.second);
-        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.NONE));
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSpecifier object created by
-     * {@link WifiNetworkSpecifier.Builder#build()} for WPA_PSK network with BSSID
-     * pattern.
-     */
-    @Test
-    public void testWifiNetworkSpecifierBuilderForWpa2PskNetworkWithBssidPattern() {
-        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
-                .setBssidPattern(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK))
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .build();
-
-        assertTrue(specifier instanceof WifiNetworkSpecifier);
-        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
-
-        assertEquals(".*", wifiNetworkSpecifier.ssidPatternMatcher.getPath());
-        assertEquals(PATTERN_SIMPLE_GLOB, wifiNetworkSpecifier.ssidPatternMatcher.getType());
-        assertEquals(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                wifiNetworkSpecifier.bssidPatternMatcher.first);
-        assertEquals(MacAddress.fromString(TEST_BSSID_OUI_MASK),
-                wifiNetworkSpecifier.bssidPatternMatcher.second);
-        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WPA_PSK));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                wifiNetworkSpecifier.wifiConfiguration.preSharedKey);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSpecifier object created by
-     * {@link WifiNetworkSpecifier.Builder#build()} for WPA_EAP network with
-     * SSID and BSSID pattern.
-     */
-    @Test
-    public void testWifiNetworkSpecifierBuilderForWpa2EapHiddenNetworkWithSsidAndBssid() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-
-        NetworkSpecifier specifier = new WifiNetworkSpecifier.Builder()
-                .setSsid(TEST_SSID)
-                .setBssid(MacAddress.fromString(TEST_BSSID))
-                .setWpa2EnterpriseConfig(enterpriseConfig)
-                .setIsHiddenSsid(true)
-                .build();
-
-        assertTrue(specifier instanceof WifiNetworkSpecifier);
-        WifiNetworkSpecifier wifiNetworkSpecifier = (WifiNetworkSpecifier) specifier;
-
-        assertEquals(TEST_SSID, wifiNetworkSpecifier.ssidPatternMatcher.getPath());
-        assertEquals(PATTERN_LITERAL, wifiNetworkSpecifier.ssidPatternMatcher.getType());
-        assertEquals(MacAddress.fromString(TEST_BSSID),
-                wifiNetworkSpecifier.bssidPatternMatcher.first);
-        assertEquals(MacAddress.BROADCAST_ADDRESS,
-                wifiNetworkSpecifier.bssidPatternMatcher.second);
-        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WPA_EAP));
-        assertTrue(wifiNetworkSpecifier.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.IEEE8021X));
-        assertTrue(wifiNetworkSpecifier.wifiConfiguration.hiddenSSID);
-        assertEquals(enterpriseConfig.getEapMethod(),
-                wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig.getEapMethod());
-        assertEquals(enterpriseConfig.getPhase2Method(),
-                wifiNetworkSpecifier.wifiConfiguration.enterpriseConfig.getPhase2Method());
-    }
-
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#setSsid(String)} throws an exception
-     * when the string is not Unicode.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSpecifierBuilderSetSsidWithNonUnicodeString() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsid("\ud800")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#setWpa2Passphrase(String)} throws an exception
-     * when the string is not ASCII encodable.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSpecifierSetWpa2PasphraseWithNonAsciiString() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase("salvē")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when neither SSID nor BSSID patterns were set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithNoSsidAndBssidPattern() {
-        new WifiNetworkSpecifier.Builder().build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-all SSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchAllSsidPattern1() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(".*", PATTERN_SIMPLE_GLOB))
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-all SSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchAllSsidPattern2() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(".*", PatternMatcher.PATTERN_ADVANCED_GLOB))
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-all SSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchAllSsidPattern3() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher("", PATTERN_PREFIX))
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-all BSSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchAllBssidPattern() {
-        new WifiNetworkSpecifier.Builder()
-                .setBssidPattern(WifiManager.ALL_ZEROS_MAC_ADDRESS,
-                        WifiManager.ALL_ZEROS_MAC_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-none SSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchNoneSsidPattern1() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher("", PatternMatcher.PATTERN_LITERAL))
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-none SSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchNoneSsidPattern2() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsid("")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-none BSSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchNoneBssidPattern1() {
-        new WifiNetworkSpecifier.Builder()
-                .setBssidPattern(MacAddress.BROADCAST_ADDRESS, MacAddress.BROADCAST_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-none BSSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchNoneBssidPattern2() {
-        new WifiNetworkSpecifier.Builder()
-                .setBssid(MacAddress.BROADCAST_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when match-none BSSID pattern is set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithMatchNoneBssidPattern3() {
-        new WifiNetworkSpecifier.Builder()
-                .setBssid(WifiManager.ALL_ZEROS_MAC_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when SSID pattern is set for hidden network.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithBssidMatchPatternForHiddenNetwork() {
-        new WifiNetworkSpecifier.Builder()
-                .setBssidPattern(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                        MacAddress.fromString(TEST_BSSID_OUI_MASK))
-                .setIsHiddenSsid(true)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSpecifier.Builder#setWpa2Passphrase(String)} and
-     * {@link WifiNetworkSpecifier.Builder#setWpa2EnterpriseConfig(WifiEnterpriseConfig)} are
-     * invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithBothWpa2PasphraseAndEnterpriseConfig() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_LITERAL))
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setWpa2EnterpriseConfig(new WifiEnterpriseConfig())
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when SSID pattern is set for hidden network.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithSsidMatchPatternForHiddenNetwork() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_PREFIX))
-                .setIsHiddenSsid(true)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSpecifier.Builder#setWpa2Passphrase(String)} and
-     * {@link WifiNetworkSpecifier.Builder#setWpa3Passphrase(String)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithBothWpa2PasphraseAndWpa3Passphrase() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_LITERAL))
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSpecifier.Builder#setWpa3Passphrase(String)} and
-     * {@link WifiNetworkSpecifier.Builder#setWpa3EnterpriseConfig(WifiEnterpriseConfig)} are
-     * invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithBothWpa3PasphraseAndEnterprise() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_LITERAL))
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setWpa3EnterpriseConfig(new WifiEnterpriseConfig())
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSpecifier.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSpecifier.Builder#setWpa3Passphrase(String)} and
-     * {@link WifiNetworkSpecifier.Builder#setIsEnhancedOpen(boolean)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSpecifierBuilderWithBothWpa3PasphraseAndEnhancedOpen() {
-        new WifiNetworkSpecifier.Builder()
-                .setSsidPattern(new PatternMatcher(TEST_SSID, PATTERN_LITERAL))
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setIsEnhancedOpen(true)
-                .build();
-    }
-
-    /**
-     * Validate that parcel marshalling/unmarshalling works
-     */
-    @Test
-    public void testWifiNetworkSpecifierParcel() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-        WifiNetworkSpecifier specifier =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        Parcel parcelW = Parcel.obtain();
-        specifier.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiNetworkSpecifier parcelSpecifier =
-                WifiNetworkSpecifier.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(specifier, parcelSpecifier);
-    }
-
-    /**
-     * Validate NetworkSpecifier matching.
-     * a) Create a network specifier for WPA_PSK network
-     * b) Ensure that the specifier does not match {@code null} and {@link MatchAllNetworkSpecifier}
-     * specifiers.
-     */
-    @Test
-    public void testWifiNetworkSpecifierDoesNotSatisfyNullAndAllMatch() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-        WifiNetworkSpecifier specifier =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        assertFalse(specifier.canBeSatisfiedBy(null));
-        assertFalse(specifier.canBeSatisfiedBy(new MatchAllNetworkSpecifier()));
-    }
-
-    /**
-     * Validate NetworkSpecifier matching.
-     * a) Create network specifier 1 for WPA_PSK network
-     * b) Create network specifier 2 with the same params as specifier 1.
-     * c) Ensure that the specifier 2 is satisfied by specifier 1.
-     */
-    @Test
-    public void testWifiNetworkSpecifierSatisfiesSame() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-
-        WifiNetworkSpecifier specifier1 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        WifiNetworkSpecifier specifier2 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        assertTrue(specifier2.canBeSatisfiedBy(specifier1));
-    }
-
-    /**
-     * Validate NetworkSpecifier matching.
-     * a) Create network specifier 1 for WPA_PSK network
-     * b) Create network specifier 2 with different key mgmt params.
-     * c) Ensure that the specifier 2 is not satisfied by specifier 1.
-     */
-    @Test
-    public void testWifiNetworkSpecifierDoesNotSatisfyWhenKeyMgmtDifferent() {
-        WifiConfiguration wifiConfiguration1 = new WifiConfiguration();
-        wifiConfiguration1.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration1.preSharedKey = TEST_PRESHARED_KEY;
-
-        WifiNetworkSpecifier specifier1 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration1);
-
-        WifiConfiguration wifiConfiguration2 = new WifiConfiguration();
-        wifiConfiguration2.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSpecifier specifier2 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration2);
-
-        assertFalse(specifier2.canBeSatisfiedBy(specifier1));
-    }
-
-    /**
-     * Validate NetworkSpecifier matching.
-     * a) Create network specifier 1 for WPA_PSK network
-     * b) Create network specifier 2 with different SSID pattern.
-     * c) Ensure that the specifier 2 is not satisfied by specifier 1.
-     */
-    @Test
-    public void testWifiNetworkSpecifierDoesNotSatisfyWhenSsidDifferent() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-
-        WifiNetworkSpecifier specifier1 =
-                new WifiNetworkSpecifier(new PatternMatcher("", PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        WifiNetworkSpecifier specifier2 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        assertFalse(specifier2.canBeSatisfiedBy(specifier1));
-    }
-
-    /**
-     * Validate NetworkSpecifier matching.
-     * a) Create network specifier 1 for WPA_PSK network
-     * b) Create network specifier 2 with different BSSID pattern.
-     * c) Ensure that the specifier 2 is not satisfied by specifier 1.
-     */
-    @Test
-    public void testWifiNetworkSpecifierDoesNotSatisfyWhenBssidDifferent() {
-        WifiConfiguration wifiConfiguration = new WifiConfiguration();
-        wifiConfiguration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        wifiConfiguration.preSharedKey = TEST_PRESHARED_KEY;
-
-        WifiNetworkSpecifier specifier1 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(MacAddress.fromString(TEST_BSSID_OUI_BASE_ADDRESS),
-                                MacAddress.fromString(TEST_BSSID_OUI_MASK)),
-                        wifiConfiguration);
-
-        WifiNetworkSpecifier specifier2 =
-                new WifiNetworkSpecifier(new PatternMatcher(TEST_SSID, PATTERN_LITERAL),
-                        Pair.create(WifiManager.ALL_ZEROS_MAC_ADDRESS,
-                                WifiManager.ALL_ZEROS_MAC_ADDRESS),
-                        wifiConfiguration);
-
-        assertFalse(specifier2.canBeSatisfiedBy(specifier1));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java b/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
deleted file mode 100644
index 16b4ad0..0000000
--- a/wifi/tests/src/android/net/wifi/WifiNetworkSuggestionTest.java
+++ /dev/null
@@ -1,893 +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.net.wifi;
-
-import static org.junit.Assert.*;
-
-import android.net.MacAddress;
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.hotspot2.PasspointTestUtils;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiNetworkSuggestion}.
- */
-@SmallTest
-public class WifiNetworkSuggestionTest {
-    private static final String TEST_SSID = "\"Test123\"";
-    private static final String TEST_BSSID = "12:12:12:12:12:12";
-    private static final String TEST_SSID_1 = "\"Test1234\"";
-    private static final String TEST_PRESHARED_KEY = "Test123";
-    private static final String TEST_FQDN = "fqdn";
-    private static final String TEST_WAPI_CERT_SUITE = "suite";
-    private static final String TEST_DOMAIN_SUFFIX_MATCH = "domainSuffixMatch";
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for Open network which requires
-     * app interaction.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForOpenNetworkWithReqAppInteraction() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setIsAppInteractionRequired(true)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.NONE));
-        assertTrue(suggestion.isAppInteractionRequired);
-        assertFalse(suggestion.isUserInteractionRequired);
-        assertEquals(WifiConfiguration.METERED_OVERRIDE_NONE,
-                suggestion.wifiConfiguration.meteredOverride);
-        assertEquals(-1, suggestion.wifiConfiguration.priority);
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-        assertTrue(suggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WPA_EAP network which requires
-     * app interaction, not share credential and has a priority of zero set.
-     */
-    @Test
-    public void
-            testWifiNetworkSuggestionBuilderForWpa2EapNetworkWithPriorityAndReqAppInteraction() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setIsAppInteractionRequired(true)
-                .setCredentialSharedWithUser(false)
-                .setPriority(0)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WPA_PSK));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                suggestion.wifiConfiguration.preSharedKey);
-        assertTrue(suggestion.isAppInteractionRequired);
-        assertFalse(suggestion.isUserInteractionRequired);
-        assertEquals(WifiConfiguration.METERED_OVERRIDE_NONE,
-                suggestion.wifiConfiguration.meteredOverride);
-        assertEquals(0, suggestion.wifiConfiguration.priority);
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-        assertTrue(suggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WPA_PSK network which requires
-     * user interaction and is metered.
-     */
-    @Test
-    public void
-            testWifiNetworkSuggestionBuilderForWpa2PskNetworkWithMeteredAndReqUserInteraction() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setIsUserInteractionRequired(true)
-                .setIsInitialAutojoinEnabled(false)
-                .setIsMetered(true)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WPA_PSK));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                suggestion.wifiConfiguration.preSharedKey);
-        assertFalse(suggestion.isAppInteractionRequired);
-        assertTrue(suggestion.isUserInteractionRequired);
-        assertEquals(WifiConfiguration.METERED_OVERRIDE_METERED,
-                suggestion.wifiConfiguration.meteredOverride);
-        assertEquals(-1, suggestion.wifiConfiguration.priority);
-        assertTrue(suggestion.isUserAllowedToManuallyConnect);
-        assertFalse(suggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WPA_PSK network which requires
-     * user interaction and is not metered.
-     */
-    @Test
-    public void
-            testWifiNetworkSuggestionBuilderForWpa2PskNetworkWithNotMeteredAndReqUserInteraction() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setIsUserInteractionRequired(true)
-                .setIsInitialAutojoinEnabled(false)
-                .setIsMetered(false)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WPA_PSK));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                suggestion.wifiConfiguration.preSharedKey);
-        assertFalse(suggestion.isAppInteractionRequired);
-        assertTrue(suggestion.isUserInteractionRequired);
-        assertEquals(WifiConfiguration.METERED_OVERRIDE_NOT_METERED,
-                suggestion.wifiConfiguration.meteredOverride);
-        assertEquals(-1, suggestion.wifiConfiguration.priority);
-        assertTrue(suggestion.isUserAllowedToManuallyConnect);
-        assertFalse(suggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for OWE network.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForEnhancedOpenNetworkWithBssid() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setBssid(MacAddress.fromString(TEST_BSSID))
-                .setIsEnhancedOpen(true)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertEquals(TEST_BSSID, suggestion.wifiConfiguration.BSSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.OWE));
-        assertNull(suggestion.wifiConfiguration.preSharedKey);
-        assertTrue(suggestion.wifiConfiguration.requirePmf);
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-        assertTrue(suggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for SAE network.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForWpa3PskNetwork() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setCredentialSharedWithUser(true)
-                .setIsInitialAutojoinEnabled(false)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.SAE));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                suggestion.wifiConfiguration.preSharedKey);
-        assertTrue(suggestion.wifiConfiguration.requirePmf);
-        assertTrue(suggestion.isUserAllowedToManuallyConnect);
-        assertFalse(suggestion.isInitialAutoJoinEnabled);
-    }
-
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for SuiteB 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);
-
-        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);
-    }
-
-    /**
-     * Ensure create enterprise suggestion requires CA, when CA certificate is missing, will throw
-     * an exception.
-     */
-    @Test (expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderForEapNetworkWithoutCa() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-        enterpriseConfig.setDomainSuffixMatch(TEST_DOMAIN_SUFFIX_MATCH);
-
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2EnterpriseConfig(enterpriseConfig)
-                .build();
-    }
-
-    /**
-     * Ensure create enterprise suggestion requires CA, when both domain suffix and alt subject
-     * match are missing, will throw an exception.
-     */
-    @Test (expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderForEapNetworkWithoutMatch() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.TLS);
-        enterpriseConfig.setPhase2Method(WifiEnterpriseConfig.Phase2.GTC);
-        enterpriseConfig.setCaCertificate(FakeKeys.CA_CERT0);
-
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa3EnterpriseConfig(enterpriseConfig)
-                .build();
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WAPI-PSK network.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForWapiPskNetwork() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWapiPassphrase(TEST_PRESHARED_KEY)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WAPI_PSK));
-        assertTrue(suggestion.wifiConfiguration.allowedPairwiseCiphers
-                .get(WifiConfiguration.PairwiseCipher.SMS4));
-        assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
-                .get(WifiConfiguration.GroupCipher.SMS4));
-        assertEquals("\"" + TEST_PRESHARED_KEY + "\"",
-                suggestion.wifiConfiguration.preSharedKey);
-    }
-
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WAPI-CERT network.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForWapiCertNetwork() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.WAPI_CERT);
-        enterpriseConfig.setWapiCertSuite(TEST_WAPI_CERT_SUITE);
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWapiEnterpriseConfig(enterpriseConfig)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WAPI_CERT));
-        assertTrue(suggestion.wifiConfiguration.allowedPairwiseCiphers
-                .get(WifiConfiguration.PairwiseCipher.SMS4));
-        assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
-                .get(WifiConfiguration.GroupCipher.SMS4));
-        assertNull(suggestion.wifiConfiguration.preSharedKey);
-        assertNotNull(suggestion.wifiConfiguration.enterpriseConfig);
-        assertEquals(WifiEnterpriseConfig.Eap.WAPI_CERT,
-                suggestion.wifiConfiguration.enterpriseConfig.getEapMethod());
-        assertEquals(TEST_WAPI_CERT_SUITE,
-                suggestion.wifiConfiguration.enterpriseConfig.getWapiCertSuite());
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for WAPI-CERT network
-     * which selects the certificate suite automatically.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForWapiCertAutoNetwork() {
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.WAPI_CERT);
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWapiEnterpriseConfig(enterpriseConfig)
-                .build();
-
-        assertEquals("\"" + TEST_SSID + "\"", suggestion.wifiConfiguration.SSID);
-        assertTrue(suggestion.wifiConfiguration.allowedKeyManagement
-                .get(WifiConfiguration.KeyMgmt.WAPI_CERT));
-        assertTrue(suggestion.wifiConfiguration.allowedPairwiseCiphers
-                .get(WifiConfiguration.PairwiseCipher.SMS4));
-        assertTrue(suggestion.wifiConfiguration.allowedGroupCiphers
-                .get(WifiConfiguration.GroupCipher.SMS4));
-        assertNull(suggestion.wifiConfiguration.preSharedKey);
-        assertNotNull(suggestion.wifiConfiguration.enterpriseConfig);
-        assertEquals(WifiEnterpriseConfig.Eap.WAPI_CERT,
-                suggestion.wifiConfiguration.enterpriseConfig.getEapMethod());
-        assertEquals("",
-                suggestion.wifiConfiguration.enterpriseConfig.getWapiCertSuite());
-    }
-
-    /**
-     * Validate correctness of WifiNetworkSuggestion object created by
-     * {@link WifiNetworkSuggestion.Builder#build()} for Passpoint network which requires
-     *  app interaction and metered.
-     */
-    @Test
-    public void testWifiNetworkSuggestionBuilderForPasspointNetworkWithReqAppInteractionMetered() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .setIsAppInteractionRequired(true)
-                .setIsMetered(true)
-                .build();
-        assertEquals(TEST_FQDN, suggestion.wifiConfiguration.FQDN);
-        assertTrue(suggestion.isAppInteractionRequired);
-        assertEquals(suggestion.wifiConfiguration.meteredOverride,
-                WifiConfiguration.METERED_OVERRIDE_METERED);
-        assertEquals(suggestion.getPasspointConfig().getMeteredOverride(),
-                WifiConfiguration.METERED_OVERRIDE_METERED);
-        assertTrue(suggestion.isUserAllowedToManuallyConnect);
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#setSsid(String)} throws an exception
-     * when the string is not Unicode.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderSetSsidWithNonUnicodeString() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid("\ud800")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#setWpa2Passphrase(String)} throws an exception
-     * when the string is not ASCII encodable.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderSetWpa2PasphraseWithNonAsciiString() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase("salvē")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)}}
-     * throws an exception when the PasspointConfiguration is not valid.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderSetPasspointConfigWithNonValid() {
-        PasspointConfiguration passpointConfiguration = new PasspointConfiguration();
-        new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setSsid(String)} is not set.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithNoSsid() {
-        new WifiNetworkSuggestion.Builder()
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setSsid(String)} is invoked with an invalid value.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithInvalidSsid() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid("")
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setBssid(MacAddress)} is invoked with an invalid
-     * value.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithInvalidBroadcastBssid() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setBssid(MacAddress.BROADCAST_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setBssid(MacAddress)} is invoked with an invalid
-     * value.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithInvalidAllZeroBssid() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setBssid(WifiManager.ALL_ZEROS_MAC_ADDRESS)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#setPriority(int)} throws an exception
-     * when the value is negative.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testWifiNetworkSuggestionBuilderWithInvalidPriority() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setPriority(-2)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa2Passphrase(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setWpa3Passphrase(String)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothWpa2PasphraseAndWpa3Passphrase() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa3Passphrase(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setWpa3EnterpriseConfig(WifiEnterpriseConfig)} are
-     * invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothWpa3PasphraseAndEnterprise() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setWpa3EnterpriseConfig(new WifiEnterpriseConfig())
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa3Passphrase(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setIsEnhancedOpen(boolean)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothWpa3PasphraseAndEnhancedOpen() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setIsEnhancedOpen(true)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setSsid(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothSsidAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa2Passphrase(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothWpa2PassphraseAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa3Passphrase(String)} and
-     * {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothWpa3PassphraseAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setWpa3Passphrase(TEST_PRESHARED_KEY)
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setWpa3EnterpriseConfig(WifiEnterpriseConfig)}
-     * and {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are
-     * invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothEnterpriseAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setWpa3EnterpriseConfig(new WifiEnterpriseConfig())
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setIsEnhancedOpen(boolean)} and
-     * {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothEnhancedOpenAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setIsEnhancedOpen(true)
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when both {@link WifiNetworkSuggestion.Builder#setIsHiddenSsid(boolean)} and
-     * {@link WifiNetworkSuggestion.Builder#setPasspointConfig(PasspointConfiguration)} are invoked.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testWifiNetworkSuggestionBuilderWithBothHiddenSsidAndPasspointConfig() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setIsHiddenSsid(true)
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-    }
-
-    /**
-     * Check that parcel marshalling/unmarshalling works
-     */
-    @Test
-    public void testWifiNetworkSuggestionParcel() {
-        WifiConfiguration configuration = new WifiConfiguration();
-        configuration.SSID = TEST_SSID;
-        configuration.BSSID = TEST_BSSID;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion(
-                configuration, null, false, true, true, true);
-
-        Parcel parcelW = Parcel.obtain();
-        suggestion.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiNetworkSuggestion parcelSuggestion =
-                WifiNetworkSuggestion.CREATOR.createFromParcel(parcelR);
-
-        // Two suggestion objects are considered equal if they point to the same network (i.e same
-        // SSID + keyMgmt + same UID). |isAppInteractionRequired| & |isUserInteractionRequired| are
-        // not considered for equality and hence needs to be checked for explicitly below.
-        assertEquals(suggestion, parcelSuggestion);
-        assertEquals(suggestion.hashCode(), parcelSuggestion.hashCode());
-        assertEquals(suggestion.isAppInteractionRequired,
-                parcelSuggestion.isAppInteractionRequired);
-        assertEquals(suggestion.isUserInteractionRequired,
-                parcelSuggestion.isUserInteractionRequired);
-        assertEquals(suggestion.isInitialAutoJoinEnabled,
-                parcelSuggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Check that parcel marshalling/unmarshalling works
-     */
-    @Test
-    public void testPasspointNetworkSuggestionParcel() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-
-        Parcel parcelW = Parcel.obtain();
-        suggestion.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiNetworkSuggestion parcelSuggestion =
-                WifiNetworkSuggestion.CREATOR.createFromParcel(parcelR);
-
-        // Two suggestion objects are considered equal if they point to the same network (i.e same
-        // SSID + keyMgmt + same UID). |isAppInteractionRequired| & |isUserInteractionRequired| are
-        // not considered for equality and hence needs to be checked for explicitly below.
-        assertEquals(suggestion, parcelSuggestion);
-        assertEquals(suggestion.hashCode(), parcelSuggestion.hashCode());
-        assertEquals(suggestion.isAppInteractionRequired,
-                parcelSuggestion.isAppInteractionRequired);
-        assertEquals(suggestion.isUserInteractionRequired,
-                parcelSuggestion.isUserInteractionRequired);
-        assertEquals(suggestion.isInitialAutoJoinEnabled,
-                parcelSuggestion.isInitialAutoJoinEnabled);
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code true} for 2 network suggestions with the same
-     * SSID, BSSID, key mgmt and UID.
-     */
-    @Test
-    public void testWifiNetworkSuggestionEqualsSame() {
-        WifiConfiguration configuration = new WifiConfiguration();
-        configuration.SSID = TEST_SSID;
-        configuration.BSSID = TEST_BSSID;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSuggestion suggestion =
-                new WifiNetworkSuggestion(configuration, null, true, false, true, true);
-
-        WifiConfiguration configuration1 = new WifiConfiguration();
-        configuration1.SSID = TEST_SSID;
-        configuration1.BSSID = TEST_BSSID;
-        configuration1.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSuggestion suggestion1 =
-                new WifiNetworkSuggestion(configuration1, null, false, true, true, true);
-
-        assertEquals(suggestion, suggestion1);
-        assertEquals(suggestion.hashCode(), suggestion1.hashCode());
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code false} for 2 network suggestions with the same
-     * BSSID, key mgmt and UID, but different SSID.
-     */
-    @Test
-    public void testWifiNetworkSuggestionEqualsFailsWhenSsidIsDifferent() {
-        WifiConfiguration configuration = new WifiConfiguration();
-        configuration.SSID = TEST_SSID;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion =
-                new WifiNetworkSuggestion(configuration, null, false, false, true, true);
-
-        WifiConfiguration configuration1 = new WifiConfiguration();
-        configuration1.SSID = TEST_SSID_1;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion1 =
-                new WifiNetworkSuggestion(configuration1, null, false, false, true, true);
-
-        assertNotEquals(suggestion, suggestion1);
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code false} for 2 network suggestions with the same
-     * SSID, key mgmt and UID, but different BSSID.
-     */
-    @Test
-    public void testWifiNetworkSuggestionEqualsFailsWhenBssidIsDifferent() {
-        WifiConfiguration configuration = new WifiConfiguration();
-        configuration.SSID = TEST_SSID;
-        configuration.BSSID = TEST_BSSID;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion =
-                new WifiNetworkSuggestion(configuration, null,  false, false, true, true);
-
-        WifiConfiguration configuration1 = new WifiConfiguration();
-        configuration1.SSID = TEST_SSID;
-        configuration1.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion1 =
-                new WifiNetworkSuggestion(configuration1, null, false, false, true, true);
-
-        assertNotEquals(suggestion, suggestion1);
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code false} for 2 network suggestions with the same
-     * SSID, BSSID and UID, but different key mgmt.
-     */
-    @Test
-    public void testWifiNetworkSuggestionEqualsFailsWhenKeyMgmtIsDifferent() {
-        WifiConfiguration configuration = new WifiConfiguration();
-        configuration.SSID = TEST_SSID;
-        configuration.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        WifiNetworkSuggestion suggestion =
-                new WifiNetworkSuggestion(configuration, null, false, false, true, true);
-
-        WifiConfiguration configuration1 = new WifiConfiguration();
-        configuration1.SSID = TEST_SSID;
-        configuration1.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
-        WifiNetworkSuggestion suggestion1 =
-                new WifiNetworkSuggestion(configuration1, null, false, false, true, true);
-
-        assertNotEquals(suggestion, suggestion1);
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code true} for 2 Passpoint network suggestions with
-     * same FQDN.
-     */
-    @Test
-    public void testPasspointNetworkSuggestionEqualsSameWithSameFQDN() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        PasspointConfiguration passpointConfiguration1 = PasspointTestUtils.createConfig();
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-        WifiNetworkSuggestion suggestion1 = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration1)
-                .build();
-        assertEquals(suggestion, suggestion1);
-        assertEquals(suggestion.hashCode(), suggestion1.hashCode());
-    }
-
-    /**
-     * Check NetworkSuggestion equals returns {@code false} for 2 Passpoint network suggestions with
-     * different FQDN.
-     */
-    @Test
-    public void testPasspointNetworkSuggestionNotEqualsSameWithDifferentFQDN() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        PasspointConfiguration passpointConfiguration1 = PasspointTestUtils.createConfig();
-        passpointConfiguration1.getHomeSp().setFqdn(TEST_FQDN + 1);
-
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .build();
-        WifiNetworkSuggestion suggestion1 = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration1)
-                .build();
-        assertNotEquals(suggestion, suggestion1);
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} to
-     * true on a open network suggestion.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetCredentialSharedWithUserWithOpenNetwork() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setCredentialSharedWithUser(true)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when {@link WifiNetworkSuggestion.Builder#setIsInitialAutojoinEnabled(boolean)} to
-     * false on a open network suggestion.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetIsAutoJoinDisabledWithOpenNetwork() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setIsInitialAutojoinEnabled(false)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set both {@link WifiNetworkSuggestion.Builder#setIsInitialAutojoinEnabled(boolean)}
-     * and {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} (boolean)}
-     * to false on a network suggestion.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetIsAutoJoinDisabledWithSecureNetworkNotSharedWithUser() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setCredentialSharedWithUser(false)
-                .setIsInitialAutojoinEnabled(false)
-                .build();
-    }
-
-    /**
-     * Validate {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} set the
-     * correct value to the WifiConfiguration.
-     */
-    @Test
-    public void testSetIsNetworkAsUntrusted() {
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setUntrusted(true)
-                .build();
-        assertTrue(suggestion.isUntrusted());
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-    }
-
-    /**
-     * Validate {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} set the
-     * correct value to the WifiConfiguration.
-     * Also the {@link WifiNetworkSuggestion#isUserAllowedToManuallyConnect} should be false;
-     */
-    @Test
-    public void testSetIsNetworkAsUntrustedOnPasspointNetwork() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        WifiNetworkSuggestion suggestion = new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .setUntrusted(true)
-                .build();
-        assertTrue(suggestion.isUntrusted());
-        assertFalse(suggestion.isUserAllowedToManuallyConnect);
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set {@link WifiNetworkSuggestion.Builder#setUntrusted(boolean)} to true and
-     * set {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} to true
-     * together.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetCredentialSharedWithUserWithSetIsNetworkAsUntrusted() {
-        new WifiNetworkSuggestion.Builder()
-                .setSsid(TEST_SSID)
-                .setWpa2Passphrase(TEST_PRESHARED_KEY)
-                .setCredentialSharedWithUser(true)
-                .setUntrusted(true)
-                .build();
-    }
-
-    /**
-     * Ensure {@link WifiNetworkSuggestion.Builder#build()} throws an exception
-     * when set both {@link WifiNetworkSuggestion.Builder#setIsInitialAutojoinEnabled(boolean)}
-     * and {@link WifiNetworkSuggestion.Builder#setCredentialSharedWithUser(boolean)} (boolean)}
-     * to false on a passpoint suggestion.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testSetIsAutoJoinDisabledWithSecureNetworkNotSharedWithUserForPasspoint() {
-        PasspointConfiguration passpointConfiguration = PasspointTestUtils.createConfig();
-        new WifiNetworkSuggestion.Builder()
-                .setPasspointConfig(passpointConfiguration)
-                .setCredentialSharedWithUser(false)
-                .setIsInitialAutojoinEnabled(false)
-                .build();
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiScannerTest.java b/wifi/tests/src/android/net/wifi/WifiScannerTest.java
deleted file mode 100644
index b68616f..0000000
--- a/wifi/tests/src/android/net/wifi/WifiScannerTest.java
+++ /dev/null
@@ -1,634 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi;
-
-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.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-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.validateMockitoUsage;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.net.wifi.WifiScanner.PnoSettings;
-import android.net.wifi.WifiScanner.PnoSettings.PnoNetwork;
-import android.net.wifi.WifiScanner.ScanData;
-import android.net.wifi.WifiScanner.ScanListener;
-import android.net.wifi.WifiScanner.ScanSettings;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.os.Messenger;
-import android.os.Parcel;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import com.android.internal.util.test.BidirectionalAsyncChannelServer;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.Spy;
-
-import java.util.Arrays;
-import java.util.concurrent.Executor;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiScanner}.
- */
-@SmallTest
-public class WifiScannerTest {
-    @Mock
-    private Context mContext;
-    @Mock
-    private IWifiScanner mService;
-    @Spy
-    private Executor mExecutor = new SynchronousExecutor();
-    @Mock
-    private ScanListener mScanListener;
-    @Mock
-    private WifiScanner.ParcelableScanData mParcelableScanData;
-    private ScanData[] mScanData = {};
-
-    private static final boolean TEST_PNOSETTINGS_IS_CONNECTED = false;
-    private static final int TEST_PNOSETTINGS_MIN_5GHZ_RSSI = -60;
-    private static final int TEST_PNOSETTINGS_MIN_2GHZ_RSSI = -70;
-    private static final int TEST_PNOSETTINGS_MIN_6GHZ_RSSI = -55;
-    private static final String TEST_SSID_1 = "TEST1";
-    private static final String TEST_SSID_2 = "TEST2";
-    private static final int[] TEST_FREQUENCIES_1 = {};
-    private static final int[] TEST_FREQUENCIES_2 = {2500, 5124, 6245};
-    private static final String DESCRIPTION_NOT_AUTHORIZED = "Not authorized";
-
-    private WifiScanner mWifiScanner;
-    private TestLooper mLooper;
-    private Handler mHandler;
-    private BidirectionalAsyncChannelServer mBidirectionalAsyncChannelServer;
-
-    /**
-     * Setup before tests.
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-        mLooper = new TestLooper();
-        mHandler = spy(new Handler(mLooper.getLooper()));
-        mBidirectionalAsyncChannelServer = new BidirectionalAsyncChannelServer(
-                mContext, mLooper.getLooper(), mHandler);
-        when(mService.getMessenger()).thenReturn(mBidirectionalAsyncChannelServer.getMessenger());
-        mWifiScanner = new WifiScanner(mContext, mService, mLooper.getLooper());
-        mLooper.dispatchAll();
-        when(mParcelableScanData.getResults()).thenReturn(mScanData);
-    }
-
-    /**
-     * Clean up after tests.
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-    }
-
-    /**
-     * Verify parcel read/write for ScanSettings.
-     */
-    @Test
-    public void verifyScanSettingsParcelWithBand() throws Exception {
-        ScanSettings writeSettings = new ScanSettings();
-        writeSettings.type = WifiScanner.SCAN_TYPE_LOW_POWER;
-        writeSettings.band = WifiScanner.WIFI_BAND_BOTH_WITH_DFS;
-
-        ScanSettings readSettings = parcelWriteRead(writeSettings);
-        assertEquals(readSettings.type, writeSettings.type);
-        assertEquals(readSettings.band, writeSettings.band);
-        assertEquals(0, readSettings.channels.length);
-    }
-
-    /**
-     * Verify parcel read/write for ScanSettings.
-     */
-    @Test
-    public void verifyScanSettingsParcelWithChannels() throws Exception {
-        ScanSettings writeSettings = new ScanSettings();
-        writeSettings.type = WifiScanner.SCAN_TYPE_HIGH_ACCURACY;
-        writeSettings.band = WifiScanner.WIFI_BAND_UNSPECIFIED;
-        writeSettings.channels = new WifiScanner.ChannelSpec[] {
-                new WifiScanner.ChannelSpec(5),
-                new WifiScanner.ChannelSpec(7)
-        };
-
-        ScanSettings readSettings = parcelWriteRead(writeSettings);
-        assertEquals(writeSettings.type, readSettings.type);
-        assertEquals(writeSettings.band, readSettings.band);
-        assertEquals(2, readSettings.channels.length);
-        assertEquals(5, readSettings.channels[0].frequency);
-        assertEquals(7, readSettings.channels[1].frequency);
-    }
-
-    /**
-     * Write the provided {@link ScanSettings} to a parcel and deserialize it.
-     */
-    private static ScanSettings parcelWriteRead(ScanSettings writeSettings) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeSettings.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        return ScanSettings.CREATOR.createFromParcel(parcel);
-    }
-
-    /**
-     *  PnoSettings object can be serialized and deserialized, while keeping the
-     *  values unchanged.
-     */
-    @Test
-    public void canSerializeAndDeserializePnoSettings() throws Exception {
-
-        PnoSettings pnoSettings = new PnoSettings();
-
-        PnoNetwork pnoNetwork1 = new PnoNetwork(TEST_SSID_1);
-        PnoNetwork pnoNetwork2 = new PnoNetwork(TEST_SSID_2);
-        pnoNetwork1.frequencies = TEST_FREQUENCIES_1;
-        pnoNetwork2.frequencies = TEST_FREQUENCIES_2;
-
-        pnoSettings.networkList = new PnoNetwork[]{pnoNetwork1, pnoNetwork2};
-        pnoSettings.isConnected = TEST_PNOSETTINGS_IS_CONNECTED;
-        pnoSettings.min5GHzRssi = TEST_PNOSETTINGS_MIN_5GHZ_RSSI;
-        pnoSettings.min24GHzRssi = TEST_PNOSETTINGS_MIN_2GHZ_RSSI;
-        pnoSettings.min6GHzRssi = TEST_PNOSETTINGS_MIN_6GHZ_RSSI;
-
-        Parcel parcel = Parcel.obtain();
-        pnoSettings.writeToParcel(parcel, 0);
-        // Rewind the pointer to the head of the parcel.
-        parcel.setDataPosition(0);
-        PnoSettings pnoSettingsDeserialized =
-                pnoSettings.CREATOR.createFromParcel(parcel);
-
-        assertNotNull(pnoSettingsDeserialized);
-        assertEquals(TEST_PNOSETTINGS_IS_CONNECTED, pnoSettingsDeserialized.isConnected);
-        assertEquals(TEST_PNOSETTINGS_MIN_5GHZ_RSSI, pnoSettingsDeserialized.min5GHzRssi);
-        assertEquals(TEST_PNOSETTINGS_MIN_2GHZ_RSSI, pnoSettingsDeserialized.min24GHzRssi);
-        assertEquals(TEST_PNOSETTINGS_MIN_6GHZ_RSSI, pnoSettingsDeserialized.min6GHzRssi);
-
-        // Test parsing of PnoNetwork
-        assertEquals(pnoSettings.networkList.length, pnoSettingsDeserialized.networkList.length);
-        for (int i = 0; i < pnoSettings.networkList.length; i++) {
-            PnoNetwork expected = pnoSettings.networkList[i];
-            PnoNetwork actual = pnoSettingsDeserialized.networkList[i];
-            assertEquals(expected.ssid, actual.ssid);
-            assertEquals(expected.flags, actual.flags);
-            assertEquals(expected.authBitField, actual.authBitField);
-            assertTrue(Arrays.equals(expected.frequencies, actual.frequencies));
-        }
-    }
-
-    /**
-     *  Make sure that frequencies is not null by default.
-     */
-    @Test
-    public void pnoNetworkFrequencyIsNotNull() throws Exception {
-        PnoNetwork pnoNetwork = new PnoNetwork(TEST_SSID_1);
-        assertNotNull(pnoNetwork.frequencies);
-    }
-
-    /**
-     * Verify parcel read/write for ScanData.
-     */
-    @Test
-    public void verifyScanDataParcel() throws Exception {
-        ScanData writeScanData = new ScanData(2, 0, 3,
-                WifiScanner.WIFI_BAND_BOTH_WITH_DFS, new ScanResult[0]);
-
-        ScanData readScanData = parcelWriteRead(writeScanData);
-        assertEquals(writeScanData.getId(), readScanData.getId());
-        assertEquals(writeScanData.getFlags(), readScanData.getFlags());
-        assertEquals(writeScanData.getBucketsScanned(), readScanData.getBucketsScanned());
-        assertEquals(writeScanData.getBandScanned(), readScanData.getBandScanned());
-        assertArrayEquals(writeScanData.getResults(), readScanData.getResults());
-    }
-
-    /**
-     * Write the provided {@link ScanData} to a parcel and deserialize it.
-     */
-    private static ScanData parcelWriteRead(ScanData writeScanData) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeScanData.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        return ScanData.CREATOR.createFromParcel(parcel);
-    }
-
-
-    /**
-     * Test behavior of {@link WifiScanner#startScan(ScanSettings, ScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStartScan() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        ScanListener scanListener = mock(ScanListener.class);
-
-        mWifiScanner.startScan(scanSettings, scanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message message = messageArgumentCaptor.getValue();
-        assertNotNull(message);
-
-        assertEquals(WifiScanner.CMD_START_SINGLE_SCAN, message.what);
-        assertTrue(message.obj instanceof Bundle);
-        Bundle messageBundle = (Bundle) message.obj;
-        assertEquals(scanSettings,
-                messageBundle.getParcelable(WifiScanner.SCAN_PARAMS_SCAN_SETTINGS_KEY));
-        assertNull(messageBundle.getParcelable(WifiScanner.SCAN_PARAMS_WORK_SOURCE_KEY));
-        assertEquals(mContext.getOpPackageName(),
-                messageBundle.getParcelable(WifiScanner.REQUEST_PACKAGE_NAME_KEY));
-        assertEquals(mContext.getAttributionTag(),
-                messageBundle.getParcelable(WifiScanner.REQUEST_FEATURE_ID_KEY));
-
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#stopScan(ScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStopScan() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        ScanListener scanListener = mock(ScanListener.class);
-
-        mWifiScanner.startScan(scanSettings, scanListener);
-        mLooper.dispatchAll();
-
-        mWifiScanner.stopScan(scanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler, times(2)).handleMessage(messageArgumentCaptor.capture());
-        Message message = messageArgumentCaptor.getValue();
-        assertNotNull(message);
-
-        assertEquals(WifiScanner.CMD_STOP_SINGLE_SCAN, message.what);
-        assertTrue(message.obj instanceof Bundle);
-        Bundle messageBundle = (Bundle) message.obj;
-        assertEquals(mContext.getOpPackageName(),
-                messageBundle.getParcelable(WifiScanner.REQUEST_PACKAGE_NAME_KEY));
-        assertEquals(mContext.getAttributionTag(),
-                messageBundle.getParcelable(WifiScanner.REQUEST_FEATURE_ID_KEY));
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#startScan(ScanSettings, ScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStartScanListenerOnSuccess() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        ScanListener scanListener = mock(ScanListener.class);
-
-        mWifiScanner.startScan(scanSettings, scanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        Message responseMessage = Message.obtain();
-        responseMessage.what = WifiScanner.CMD_OP_SUCCEEDED;
-        responseMessage.arg2 = sentMessage.arg2;
-        scannerMessenger.send(responseMessage);
-        mLooper.dispatchAll();
-
-        verify(scanListener).onSuccess();
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#startScan(ScanSettings, ScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStartScanListenerOnResults() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        ScanListener scanListener = mock(ScanListener.class);
-
-        mWifiScanner.startScan(scanSettings, scanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        ScanResult scanResult = new ScanResult();
-        ScanData scanDatas[] = new ScanData[]{new ScanData(0, 0 , new ScanResult[] {scanResult})};
-        Message responseMessage = Message.obtain();
-        responseMessage.what = WifiScanner.CMD_SCAN_RESULT;
-        responseMessage.arg2 = sentMessage.arg2;
-        responseMessage.obj = new WifiScanner.ParcelableScanData(scanDatas);
-        scannerMessenger.send(responseMessage);
-        mLooper.dispatchAll();
-
-        verify(scanListener).onResults(scanDatas);
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#startDisconnectedPnoScan(ScanSettings, PnoSettings,
-     * Executor, WifiScanner.PnoScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStartDisconnectedPnoScan() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        PnoSettings pnoSettings = new PnoSettings();
-        WifiScanner.PnoScanListener pnoScanListener = mock(WifiScanner.PnoScanListener.class);
-
-        mWifiScanner.startDisconnectedPnoScan(
-                scanSettings, pnoSettings, mock(Executor.class), pnoScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message message = messageArgumentCaptor.getValue();
-        assertNotNull(message);
-
-        assertEquals(WifiScanner.CMD_START_PNO_SCAN, message.what);
-        assertTrue(message.obj instanceof Bundle);
-        Bundle messageBundle = (Bundle) message.obj;
-        assertEquals(scanSettings,
-                messageBundle.getParcelable(WifiScanner.PNO_PARAMS_SCAN_SETTINGS_KEY));
-        assertTrue(scanSettings.isPnoScan);
-        assertFalse(pnoSettings.isConnected);
-        assertEquals(pnoSettings,
-                messageBundle.getParcelable(WifiScanner.PNO_PARAMS_PNO_SETTINGS_KEY));
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#startConnectedPnoScan(ScanSettings, PnoSettings,
-     * Executor, WifiScanner.PnoScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStartConnectedPnoScan() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        PnoSettings pnoSettings = new PnoSettings();
-        WifiScanner.PnoScanListener pnoScanListener = mock(WifiScanner.PnoScanListener.class);
-
-        mWifiScanner.startConnectedPnoScan(
-                scanSettings, pnoSettings, mock(Executor.class), pnoScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message message = messageArgumentCaptor.getValue();
-        assertNotNull(message);
-
-        assertEquals(WifiScanner.CMD_START_PNO_SCAN, message.what);
-        assertTrue(message.obj instanceof Bundle);
-        Bundle messageBundle = (Bundle) message.obj;
-        assertEquals(scanSettings,
-                messageBundle.getParcelable(WifiScanner.PNO_PARAMS_SCAN_SETTINGS_KEY));
-        assertTrue(scanSettings.isPnoScan);
-        assertTrue(pnoSettings.isConnected);
-        assertEquals(pnoSettings,
-                messageBundle.getParcelable(WifiScanner.PNO_PARAMS_PNO_SETTINGS_KEY));
-    }
-
-    /**
-     * Test behavior of {@link WifiScanner#stopPnoScan(ScanListener)}
-     * Executor, WifiScanner.PnoScanListener)}
-     * @throws Exception
-     */
-    @Test
-    public void testStopPnoScan() throws Exception {
-        ScanSettings scanSettings = new ScanSettings();
-        PnoSettings pnoSettings = new PnoSettings();
-        WifiScanner.PnoScanListener pnoScanListener = mock(WifiScanner.PnoScanListener.class);
-
-        mWifiScanner.startDisconnectedPnoScan(
-                scanSettings, pnoSettings, mock(Executor.class), pnoScanListener);
-        mLooper.dispatchAll();
-        mWifiScanner.stopPnoScan(pnoScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler, times(2)).handleMessage(messageArgumentCaptor.capture());
-        Message message = messageArgumentCaptor.getValue();
-        assertNotNull(message);
-
-        assertEquals(WifiScanner.CMD_STOP_PNO_SCAN, message.what);
-    }
-
-    @Test
-    public void testScanDataAddResults() throws Exception {
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.SSID = TEST_SSID_1;
-        ScanData scanData = new ScanData(0, 0, new ScanResult[]{scanResult1});
-
-        ScanResult scanResult2 = new ScanResult();
-        scanResult2.SSID = TEST_SSID_2;
-        scanData.addResults(new ScanResult[]{scanResult2});
-
-        ScanResult[] consolidatedScanResults = scanData.getResults();
-        assertEquals(2, consolidatedScanResults.length);
-        assertEquals(TEST_SSID_1, consolidatedScanResults[0].SSID);
-        assertEquals(TEST_SSID_2, consolidatedScanResults[1].SSID);
-    }
-
-    @Test
-    public void testScanDataParcel() throws Exception {
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.SSID = TEST_SSID_1;
-        ScanData scanData = new ScanData(5, 4, new ScanResult[]{scanResult1});
-
-        Parcel parcel = Parcel.obtain();
-        scanData.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        ScanData readScanData = ScanData.CREATOR.createFromParcel(parcel);
-
-        assertEquals(scanData.getId(), readScanData.getId());
-        assertEquals(scanData.getFlags(), readScanData.getFlags());
-        assertEquals(scanData.getResults().length, readScanData.getResults().length);
-        assertEquals(scanData.getResults()[0].SSID, readScanData.getResults()[0].SSID);
-    }
-
-    /** Tests that upon registration success, {@link ScanListener#onSuccess()} is called. */
-    @Test
-    public void testRegisterScanListenerSuccess() throws Exception {
-        mWifiScanner.registerScanListener(mExecutor, mScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        Message responseMessage = Message.obtain();
-        responseMessage.what = WifiScanner.CMD_OP_SUCCEEDED;
-        responseMessage.arg2 = sentMessage.arg2;
-        scannerMessenger.send(responseMessage);
-        mLooper.dispatchAll();
-
-        verify(mExecutor).execute(any());
-        verify(mScanListener).onSuccess();
-    }
-
-    /**
-     * Tests that upon registration failed, {@link ScanListener#onFailure(int, String)} is called.
-     */
-    @Test
-    public void testRegisterScanListenerFailed() throws Exception {
-        mWifiScanner.registerScanListener(mExecutor, mScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        {
-            Message responseMessage = Message.obtain();
-            responseMessage.what = WifiScanner.CMD_OP_FAILED;
-            responseMessage.arg2 = sentMessage.arg2;
-            responseMessage.obj = new WifiScanner.OperationResult(
-                    WifiScanner.REASON_NOT_AUTHORIZED, DESCRIPTION_NOT_AUTHORIZED);
-            scannerMessenger.send(responseMessage);
-            mLooper.dispatchAll();
-        }
-
-        verify(mExecutor).execute(any());
-        verify(mScanListener).onFailure(
-                WifiScanner.REASON_NOT_AUTHORIZED, DESCRIPTION_NOT_AUTHORIZED);
-
-        // CMD_OP_FAILED should have caused the removal of the listener, verify this
-        {
-            Message responseMessage = Message.obtain();
-            responseMessage.what = WifiScanner.CMD_SCAN_RESULT;
-            responseMessage.arg2 = sentMessage.arg2;
-            responseMessage.obj = mParcelableScanData;
-            scannerMessenger.send(responseMessage);
-            mLooper.dispatchAll();
-        }
-        // execute() called once before, not called again
-        verify(mExecutor, times(1)).execute(any());
-        // onResults() never triggered
-        verify(mScanListener, never()).onResults(any());
-    }
-
-    /**
-     * Tests that when the ScanListener is triggered, {@link ScanListener#onResults(ScanData[])}
-     * is called.
-     */
-    @Test
-    public void testRegisterScanListenerReceiveScanResults() throws Exception {
-        mWifiScanner.registerScanListener(mExecutor, mScanListener);
-        mLooper.dispatchAll();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        Message responseMessage = Message.obtain();
-        responseMessage.what = WifiScanner.CMD_SCAN_RESULT;
-        responseMessage.arg2 = sentMessage.arg2;
-        responseMessage.obj = mParcelableScanData;
-        scannerMessenger.send(responseMessage);
-        mLooper.dispatchAll();
-
-        verify(mExecutor).execute(any());
-        verify(mScanListener).onResults(mScanData);
-    }
-
-    /**
-     * Tests that after unregistering a scan listener, {@link ScanListener#onResults(ScanData[])}
-     * is not called.
-     */
-    @Test
-    public void testUnregisterScanListener() throws Exception {
-        mWifiScanner.registerScanListener(mExecutor, mScanListener);
-        mWifiScanner.unregisterScanListener(mScanListener);
-        mLooper.dispatchAll();
-
-        assertEquals(1, mBidirectionalAsyncChannelServer.getClientMessengers().size());
-        Messenger scannerMessenger =
-                mBidirectionalAsyncChannelServer.getClientMessengers().iterator().next();
-
-        ArgumentCaptor<Message> messageArgumentCaptor = ArgumentCaptor.forClass(Message.class);
-        verify(mHandler, times(2)).handleMessage(messageArgumentCaptor.capture());
-        Message sentMessage = messageArgumentCaptor.getValue();
-        assertNotNull(sentMessage);
-
-        Message responseMessage = Message.obtain();
-        responseMessage.what = WifiScanner.CMD_SCAN_RESULT;
-        responseMessage.obj = mParcelableScanData;
-        responseMessage.arg2 = sentMessage.arg2;
-        scannerMessenger.send(responseMessage);
-        mLooper.dispatchAll();
-
-        verify(mExecutor, never()).execute(any());
-        verify(mScanListener, never()).onResults(mScanData);
-    }
-
-    /**
-     * Tests isFullBandScan() method with and without DFS check
-     */
-    @Test
-    public void testIsFullBandScan() throws Exception {
-        assertFalse(WifiScanner.isFullBandScan(WifiScanner.WIFI_BAND_24_GHZ, true));
-        assertFalse(WifiScanner.isFullBandScan(WifiScanner.WIFI_BAND_5_GHZ, true));
-        assertFalse(WifiScanner.isFullBandScan(WifiScanner.WIFI_BAND_6_GHZ, true));
-        assertFalse(WifiScanner.isFullBandScan(
-                WifiScanner.WIFI_BAND_6_GHZ | WifiScanner.WIFI_BAND_5_GHZ, true));
-        assertTrue(WifiScanner.isFullBandScan(
-                WifiScanner.WIFI_BAND_24_GHZ | WifiScanner.WIFI_BAND_5_GHZ, true));
-        assertFalse(WifiScanner.isFullBandScan(
-                WifiScanner.WIFI_BAND_24_GHZ | WifiScanner.WIFI_BAND_5_GHZ, false));
-        assertTrue(WifiScanner.isFullBandScan(WifiScanner.WIFI_BAND_BOTH_WITH_DFS, true));
-        assertTrue(WifiScanner.isFullBandScan(WifiScanner.WIFI_BAND_BOTH_WITH_DFS, false));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiSsidTest.java b/wifi/tests/src/android/net/wifi/WifiSsidTest.java
deleted file mode 100644
index 10a37c0..0000000
--- a/wifi/tests/src/android/net/wifi/WifiSsidTest.java
+++ /dev/null
@@ -1,60 +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.net.wifi;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-
-/**
- * Unit tests for {@link android.net.wifi.WifiSsid}.
- */
-@SmallTest
-public class WifiSsidTest {
-
-    private static final String TEST_SSID = "Test SSID";
-    private static final byte[] TEST_SSID_BYTES = TEST_SSID.getBytes(StandardCharsets.US_ASCII);
-
-    /**
-     * Check that createFromByteArray() works.
-     */
-    @Test
-    public void testCreateFromByteArray() {
-        WifiSsid wifiSsid = WifiSsid.createFromByteArray(TEST_SSID_BYTES);
-        assertTrue(wifiSsid != null);
-        assertEquals(TEST_SSID, wifiSsid.toString());
-    }
-
-    /**
-     * Verify that SSID created from byte array and string with the same content are equal.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void testEquals() throws Exception {
-        WifiSsid fromBytes = WifiSsid.createFromByteArray(TEST_SSID_BYTES);
-        WifiSsid fromString = WifiSsid.createFromAsciiEncoded(TEST_SSID);
-        assertTrue(fromBytes != null);
-        assertTrue(fromString != null);
-        assertEquals(fromBytes, fromString);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/WifiUsabilityStatsEntryTest.java b/wifi/tests/src/android/net/wifi/WifiUsabilityStatsEntryTest.java
deleted file mode 100644
index 5184152..0000000
--- a/wifi/tests/src/android/net/wifi/WifiUsabilityStatsEntryTest.java
+++ /dev/null
@@ -1,121 +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;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.validateMockitoUsage;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.MockitoAnnotations;
-
-
-/**
- * Unit tests for {@link android.net.wifi.WifiUsabilityStatsEntry}.
- */
-@SmallTest
-public class WifiUsabilityStatsEntryTest {
-
-    /**
-     * Setup before tests.
-     */
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-    }
-
-    /**
-     * Clean up after tests.
-     */
-    @After
-    public void cleanup() {
-        validateMockitoUsage();
-    }
-
-    /**
-     * Verify parcel read/write for Wifi usability stats result.
-     */
-    @Test
-    public void verifyStatsResultWriteAndThenRead() throws Exception {
-        WifiUsabilityStatsEntry writeResult = createResult();
-        WifiUsabilityStatsEntry readResult = parcelWriteRead(writeResult);
-        assertWifiUsabilityStatsEntryEquals(writeResult, readResult);
-    }
-
-    /**
-     * Write the provided {@link WifiUsabilityStatsEntry} to a parcel and deserialize it.
-     */
-    private static WifiUsabilityStatsEntry parcelWriteRead(
-            WifiUsabilityStatsEntry writeResult) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeResult.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        return WifiUsabilityStatsEntry.CREATOR.createFromParcel(parcel);
-    }
-
-    private static WifiUsabilityStatsEntry createResult() {
-        return new WifiUsabilityStatsEntry(
-                0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
-                14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, true
-        );
-    }
-
-    private static void assertWifiUsabilityStatsEntryEquals(
-            WifiUsabilityStatsEntry expected,
-            WifiUsabilityStatsEntry actual) {
-        assertEquals(expected.getTimeStampMillis(), actual.getTimeStampMillis());
-        assertEquals(expected.getRssi(), actual.getRssi());
-        assertEquals(expected.getLinkSpeedMbps(), actual.getLinkSpeedMbps());
-        assertEquals(expected.getTotalTxSuccess(), actual.getTotalTxSuccess());
-        assertEquals(expected.getTotalTxRetries(), actual.getTotalTxRetries());
-        assertEquals(expected.getTotalTxBad(), actual.getTotalTxBad());
-        assertEquals(expected.getTotalRxSuccess(), actual.getTotalRxSuccess());
-        assertEquals(expected.getTotalRadioOnTimeMillis(), actual.getTotalRadioOnTimeMillis());
-        assertEquals(expected.getTotalRadioTxTimeMillis(), actual.getTotalRadioTxTimeMillis());
-        assertEquals(expected.getTotalRadioRxTimeMillis(), actual.getTotalRadioRxTimeMillis());
-        assertEquals(expected.getTotalScanTimeMillis(), actual.getTotalScanTimeMillis());
-        assertEquals(expected.getTotalNanScanTimeMillis(), actual.getTotalNanScanTimeMillis());
-        assertEquals(expected.getTotalBackgroundScanTimeMillis(),
-                actual.getTotalBackgroundScanTimeMillis());
-        assertEquals(expected.getTotalRoamScanTimeMillis(), actual.getTotalRoamScanTimeMillis());
-        assertEquals(expected.getTotalPnoScanTimeMillis(), actual.getTotalPnoScanTimeMillis());
-        assertEquals(expected.getTotalHotspot2ScanTimeMillis(),
-                actual.getTotalHotspot2ScanTimeMillis());
-        assertEquals(expected.getTotalCcaBusyFreqTimeMillis(),
-                actual.getTotalCcaBusyFreqTimeMillis());
-        assertEquals(expected.getTotalRadioOnFreqTimeMillis(),
-                actual.getTotalRadioOnFreqTimeMillis());
-        assertEquals(expected.getTotalBeaconRx(), actual.getTotalBeaconRx());
-        assertEquals(expected.getProbeStatusSinceLastUpdate(),
-                actual.getProbeStatusSinceLastUpdate());
-        assertEquals(expected.getProbeElapsedTimeSinceLastUpdateMillis(),
-                actual.getProbeElapsedTimeSinceLastUpdateMillis());
-        assertEquals(expected.getProbeMcsRateSinceLastUpdate(),
-                actual.getProbeMcsRateSinceLastUpdate());
-        assertEquals(expected.getRxLinkSpeedMbps(), actual.getRxLinkSpeedMbps());
-        assertEquals(expected.getCellularDataNetworkType(), actual.getCellularDataNetworkType());
-        assertEquals(expected.getCellularSignalStrengthDbm(),
-                actual.getCellularSignalStrengthDbm());
-        assertEquals(expected.getCellularSignalStrengthDb(), actual.getCellularSignalStrengthDb());
-        assertEquals(expected.isSameRegisteredCell(), actual.isSameRegisteredCell());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java b/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java
deleted file mode 100644
index 79e95e8..0000000
--- a/wifi/tests/src/android/net/wifi/aware/TlvBufferUtilsTest.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-
-import java.nio.BufferOverflowException;
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * Unit test harness for TlvBufferUtils class.
- */
-@SmallTest
-public class TlvBufferUtilsTest {
-    @Rule
-    public ErrorCollector collector = new ErrorCollector();
-
-    /*
-     * TlvBufferUtils Tests
-     */
-
-    @Test
-    public void testTlvBuild() {
-        TlvBufferUtils.TlvConstructor tlv11 = new TlvBufferUtils.TlvConstructor(1, 1);
-        tlv11.allocate(15);
-        tlv11.putByte(0, (byte) 2);
-        tlv11.putByteArray(2, new byte[] {
-                0, 1, 2 });
-
-        collector.checkThat("tlv11-correct-construction",
-                tlv11.getArray(), equalTo(new byte[]{0, 1, 2, 2, 3, 0, 1, 2}));
-
-        TlvBufferUtils.TlvConstructor tlv01 = new TlvBufferUtils.TlvConstructor(0, 1);
-        tlv01.allocate(15);
-        tlv01.putByte(0, (byte) 2);
-        tlv01.putByteArray(2, new byte[] {
-                0, 1, 2 });
-
-        collector.checkThat("tlv01-correct-construction",
-                tlv01.getArray(), equalTo(new byte[] {1, 2, 3, 0, 1, 2 }));
-
-        collector.checkThat("tlv11-valid",
-                TlvBufferUtils.isValid(tlv11.getArray(), 1, 1),
-                equalTo(true));
-        collector.checkThat("tlv01-valid",
-                TlvBufferUtils.isValid(tlv01.getArray(), 0, 1),
-                equalTo(true));
-    }
-
-    /**
-     * Validate that re-using a TLV by any of the reallocation method resets it completely.
-     */
-    @Test
-    public void testTlvReuse() {
-        TlvBufferUtils.TlvConstructor tlv = new TlvBufferUtils.TlvConstructor(1, 1);
-
-        tlv.allocate(10);
-        tlv.putByte(0, (byte) 2);
-        tlv.putByte(1, (byte) 104);
-
-        collector.checkThat("initial", tlv.getArray(), equalTo(new byte[]{0, 1, 2, 1, 1, 104}));
-
-        tlv.allocate(8);
-        tlv.putByte(5, (byte) 7);
-        collector.checkThat("re-alloc", tlv.getArray(), equalTo(new byte[]{5, 1, 7}));
-    }
-
-    /**
-     * Verify that can build a valid TLV from a List of byte[].
-     */
-    @Test
-    public void testTlvListOperations() {
-        byte[] entry1 = { 1, 2, 3 };
-        byte[] entry2 = { 4, 5 };
-        byte[] entry3 = new byte[0];
-        List<byte[]> data = new ArrayList<>();
-        data.add(entry1);
-        data.add(entry2);
-        data.add(entry3);
-        data.add(null); // zero-length should work
-
-        TlvBufferUtils.TlvConstructor tlv01 = new TlvBufferUtils.TlvConstructor(0, 1);
-        tlv01.allocateAndPut(data);
-        byte[] tlvData = tlv01.getArray();
-        List<byte[]> parsedList = new TlvBufferUtils.TlvIterable(0, 1, tlvData).toList();
-
-        collector.checkThat("tlvData-correct-length", tlvData.length,
-                equalTo(entry1.length + 1 + entry2.length + 1 + entry3.length + 1 + 1));
-        collector.checkThat("parsedList-correct-length", parsedList.size(), equalTo(4));
-        collector.checkThat("parsedList-entry1", parsedList.get(0), equalTo(entry1));
-        collector.checkThat("parsedList-entry2", parsedList.get(1), equalTo(entry2));
-        collector.checkThat("parsedList-entry3", parsedList.get(2), equalTo(entry3));
-        collector.checkThat("parsedList-entry4", parsedList.get(3), equalTo(new byte[0]));
-    }
-
-    /**
-     * Verify that can parse a (correctly formatted) byte array to a list.
-     */
-    @Test
-    public void testTlvParseToList() {
-        byte[] validTlv01 = { 0, 1, 55, 2, 33, 66, 0 };
-
-        List<byte[]> parsedList = new TlvBufferUtils.TlvIterable(0, 1, validTlv01).toList();
-
-        collector.checkThat("parsedList-entry1", parsedList.get(0), equalTo(new byte[0]));
-        collector.checkThat("parsedList-entry2", parsedList.get(1), equalTo(new byte[] { 55 }));
-        collector.checkThat("parsedList-entry3", parsedList.get(2), equalTo(new byte[] { 33, 66 }));
-        collector.checkThat("parsedList-entry4", parsedList.get(3), equalTo(new byte[0]));
-    }
-
-    /**
-     * Verify that an exception is thrown when trying to parse an invalid array.
-     */
-    @Test(expected = BufferOverflowException.class)
-    public void testTlvParseToListError() {
-        byte[] invalidTlv01 = { 0, 1, 55, 2, 55, 66, 3 }; // bad data
-
-        List<byte[]> data = new TlvBufferUtils.TlvIterable(0, 1, invalidTlv01).toList();
-    }
-
-    /**
-     * Validate the API which places raw bytes into the TLV (without a TL structure).
-     */
-    @Test
-    public void testRawPuts() {
-        TlvBufferUtils.TlvConstructor tlv = new TlvBufferUtils.TlvConstructor(1, 1);
-
-        tlv.allocate(10);
-        tlv.putByte(0, (byte) 2);
-        tlv.putRawByte((byte) 55);
-        tlv.putByte(1, (byte) 104);
-        tlv.putRawByteArray(new byte[]{66, 77});
-
-        collector.checkThat("data", tlv.getArray(),
-                equalTo(new byte[]{0, 1, 2, 55, 1, 1, 104, 66, 77}));
-    }
-
-    @Test
-    public void testTlvIterate() {
-        final String ascii = "ABC";
-        final String nonAscii = "何かもっと複雑な";
-
-        TlvBufferUtils.TlvConstructor tlv22 = new TlvBufferUtils.TlvConstructor(2, 2);
-        tlv22.allocate(18);
-        tlv22.putInt(0, 2);
-        tlv22.putShort(2, (short) 3);
-        tlv22.putZeroLengthElement(55);
-
-        TlvBufferUtils.TlvIterable tlv22It = new TlvBufferUtils.TlvIterable(2, 2, tlv22.getArray());
-        int count = 0;
-        for (TlvBufferUtils.TlvElement tlv : tlv22It) {
-            if (count == 0) {
-                collector.checkThat("tlv22-correct-iteration-mType", tlv.type, equalTo(0));
-                collector.checkThat("tlv22-correct-iteration-mLength", tlv.length, equalTo(4));
-                collector.checkThat("tlv22-correct-iteration-DATA", tlv.getInt(), equalTo(2));
-            } else if (count == 1) {
-                collector.checkThat("tlv22-correct-iteration-mType", tlv.type, equalTo(2));
-                collector.checkThat("tlv22-correct-iteration-mLength", tlv.length, equalTo(2));
-                collector.checkThat("tlv22-correct-iteration-DATA", (int) tlv.getShort(),
-                        equalTo(3));
-            } else if (count == 2) {
-                collector.checkThat("tlv22-correct-iteration-mType", tlv.type, equalTo(55));
-                collector.checkThat("tlv22-correct-iteration-mLength", tlv.length, equalTo(0));
-            } else {
-                collector.checkThat("Invalid number of iterations in loop - tlv22", true,
-                        equalTo(false));
-            }
-            ++count;
-        }
-        if (count != 3) {
-            collector.checkThat("Invalid number of iterations outside loop - tlv22", true,
-                    equalTo(false));
-        }
-
-        TlvBufferUtils.TlvConstructor tlv02 = new TlvBufferUtils.TlvConstructor(0, 2);
-        tlv02.allocate(100);
-        tlv02.putByte(0, (byte) 2);
-        tlv02.putString(0, ascii);
-        tlv02.putString(0, nonAscii);
-        tlv02.putByteArray(0, new byte[]{5, 4, 3, 2, 1});
-
-        TlvBufferUtils.TlvIterable tlv02It = new TlvBufferUtils.TlvIterable(0, 2, tlv02.getArray());
-        count = 0;
-        for (TlvBufferUtils.TlvElement tlv : tlv02It) {
-            if (count == 0) {
-                collector.checkThat("tlv02-correct-iteration-mLength", tlv.length, equalTo(1));
-                collector.checkThat("tlv02-correct-iteration-DATA", (int) tlv.getByte(),
-                        equalTo(2));
-            } else if (count == 1) {
-                collector.checkThat("tlv02-correct-iteration-mLength", tlv.length,
-                        equalTo(ascii.length()));
-                collector.checkThat("tlv02-correct-iteration-DATA", tlv.getString().equals(ascii),
-                        equalTo(true));
-            } else if (count == 2) {
-                collector.checkThat("tlv02-correct-iteration-mLength", tlv.length,
-                        equalTo(nonAscii.getBytes().length));
-                collector.checkThat("tlv02-correct-iteration-DATA",
-                        tlv.getString().equals(nonAscii), equalTo(true));
-            } else if (count == 3) {
-                collector.checkThat("tlv02-correct-iteration-mLength", tlv.length,
-                        equalTo(5));
-                collector.checkThat("tlv02-correct-iteration-DATA", tlv.getRawData(),
-                        equalTo(new byte[]{5, 4, 3, 2, 1}));
-            } else {
-                collector.checkThat("Invalid number of iterations in loop - tlv02", true,
-                        equalTo(false));
-            }
-            ++count;
-        }
-        collector.checkThat("Invalid number of iterations outside loop - tlv02", count,
-                equalTo(4));
-
-        collector.checkThat("tlv22-valid",
-                TlvBufferUtils.isValid(tlv22.getArray(), 2, 2),
-                equalTo(true));
-        collector.checkThat("tlv02-valid",
-                TlvBufferUtils.isValid(tlv02.getArray(), 0, 2),
-                equalTo(true));
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvInvalidSizeT1L0() {
-        TlvBufferUtils.TlvConstructor tlv10 = new TlvBufferUtils.TlvConstructor(1, 0);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvInvalidSizeTm3L2() {
-        TlvBufferUtils.TlvConstructor tlv10 = new TlvBufferUtils.TlvConstructor(-3, 2);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvInvalidSizeT1Lm2() {
-        TlvBufferUtils.TlvConstructor tlv10 = new TlvBufferUtils.TlvConstructor(1, -2);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvInvalidSizeT1L3() {
-        TlvBufferUtils.TlvConstructor tlv10 = new TlvBufferUtils.TlvConstructor(1, 3);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvInvalidSizeT3L1() {
-        TlvBufferUtils.TlvConstructor tlv10 = new TlvBufferUtils.TlvConstructor(3, 1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvItInvalidSizeT1L0() {
-        final byte[] testTlv = {
-                0, 1, 2 };
-        final int testLength = 3;
-        TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 0, testTlv);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvItInvalidSizeTm3L2() {
-        final byte[] testTlv = {
-                0, 1, 2 };
-        final int testLength = 3;
-        TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(-3, 2, testTlv);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvItInvalidSizeT1Lm2() {
-        final byte[] testTlv = {
-                0, 1, 2 };
-        final int testLength = 3;
-        TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, -2, testTlv);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvItInvalidSizeT1L3() {
-        final byte[] testTlv = {
-                0, 1, 2 };
-        final int testLength = 3;
-        TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(1, 3, testTlv);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testTlvItInvalidSizeT3L1() {
-        final byte[] testTlv = {
-                0, 1, 2 };
-        final int testLength = 3;
-        TlvBufferUtils.TlvIterable tlvIt10 = new TlvBufferUtils.TlvIterable(3, 1, testTlv);
-    }
-
-    /**
-     * Validate that a malformed byte array fails the TLV validity test.
-     */
-    @Test
-    public void testTlvInvalidByteArray() {
-        TlvBufferUtils.TlvConstructor tlv01 = new TlvBufferUtils.TlvConstructor(0, 1);
-        tlv01.allocate(15);
-        tlv01.putByte(0, (byte) 2);
-        tlv01.putByteArray(2, new byte[]{0, 1, 2});
-
-        byte[] array = tlv01.getArray();
-        array[0] = 10;
-
-        collector.checkThat("tlv01-invalid",
-                TlvBufferUtils.isValid(array, 0, 1), equalTo(false));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java
deleted file mode 100644
index b65de6b..0000000
--- a/wifi/tests/src/android/net/wifi/aware/WifiAwareAgentNetworkSpecifierTest.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * Unit test harness for WifiAwareAgentNetworkSpecifier class.
- */
-@SmallTest
-public class WifiAwareAgentNetworkSpecifierTest {
-    @Rule
-    public ErrorCollector collector = new ErrorCollector();
-
-    @Test
-    public void testParcel() {
-        final int numNs = 10;
-
-        Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
-        for (int i = 0; i < numNs; ++i) {
-            nsSet.add(getMockNetworkSpecifier(10 + i));
-        }
-        WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[numNs]));
-
-        Parcel parcelW = Parcel.obtain();
-        dut.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiAwareAgentNetworkSpecifier rereadDut =
-                WifiAwareAgentNetworkSpecifier.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(dut, rereadDut);
-        assertEquals(dut.hashCode(), rereadDut.hashCode());
-
-        // Ensure that individual network specifiers are satisfied by both the original & marshaled
-        // |WifiAwareNetworkAgentSpecifier instances.
-        for (WifiAwareNetworkSpecifier ns : nsSet) {
-            assertTrue(dut.satisfiesAwareNetworkSpecifier(ns));
-            assertTrue(rereadDut.satisfiesAwareNetworkSpecifier(ns));
-        }
-    }
-
-    /**
-     * Validate that an empty agent network specifier doesn't match any base network specifier.
-     */
-    @Test
-    public void testEmptyDoesntMatchAnything() {
-        WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier();
-        WifiAwareNetworkSpecifier ns = getMockNetworkSpecifier(6);
-        collector.checkThat("No match expected", ns.canBeSatisfiedBy(dut), equalTo(false));
-    }
-
-    /**
-     * Validate that an agent network specifier constructed with a single entry matches that entry,
-     * and only that entry.
-     */
-    @Test
-    public void testSingleMatch() {
-        WifiAwareNetworkSpecifier nsThis = getMockNetworkSpecifier(6);
-        WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(nsThis);
-        WifiAwareNetworkSpecifier nsOther = getMockNetworkSpecifier(8);
-        collector.checkThat("Match expected", nsThis.canBeSatisfiedBy(dut), equalTo(true));
-        collector.checkThat("No match expected", nsOther.canBeSatisfiedBy(dut), equalTo(false));
-    }
-
-    /**
-     * Validate that an agent network specifier constructed with multiple entries matches all those
-     * entries - but none other.
-     */
-    @Test
-    public void testMultipleMatchesAllMembers() {
-        final int numNs = 10;
-
-        Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
-        for (int i = 0; i < numNs; ++i) {
-            nsSet.add(getMockNetworkSpecifier(10 + i));
-        }
-
-        WifiAwareAgentNetworkSpecifier dut = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[numNs]));
-        WifiAwareNetworkSpecifier nsOther = getMockNetworkSpecifier(10000);
-
-        for (WifiAwareNetworkSpecifier nsThis: nsSet) {
-            collector.checkThat("Match expected", nsThis.canBeSatisfiedBy(dut), equalTo(true));
-        }
-        collector.checkThat("No match expected", nsOther.canBeSatisfiedBy(dut), equalTo(false));
-    }
-
-    /**
-     * Validate that agent network specifier matches against a super-set.
-     */
-    @Test
-    public void testMatchSuperset() {
-        final int numNs = 10;
-
-        Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
-        for (int i = 0; i < numNs; ++i) {
-            nsSet.add(getMockNetworkSpecifier(10 + i));
-        }
-
-        WifiAwareAgentNetworkSpecifier oldNs = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
-
-        nsSet.add(getMockNetworkSpecifier(100 + numNs));
-        WifiAwareAgentNetworkSpecifier newNs = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
-
-        collector.checkThat("Match expected", oldNs.canBeSatisfiedBy(newNs), equalTo(true));
-    }
-
-    /**
-     * Validate that agent network specifier does not match against a sub-set.
-     */
-    @Test
-    public void testNoMatchSubset() {
-        final int numNs = 10;
-
-        Set<WifiAwareNetworkSpecifier> nsSet = new HashSet<>();
-        for (int i = 0; i < numNs; ++i) {
-            nsSet.add(getMockNetworkSpecifier(10 + i));
-        }
-
-        WifiAwareAgentNetworkSpecifier newNs = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
-
-        nsSet.add(getMockNetworkSpecifier(100 + numNs));
-        WifiAwareAgentNetworkSpecifier oldNs = new WifiAwareAgentNetworkSpecifier(
-                nsSet.toArray(new WifiAwareNetworkSpecifier[nsSet.size()]));
-
-        collector.checkThat("Match unexpected", oldNs.canBeSatisfiedBy(newNs), equalTo(false));
-    }
-
-    // utilities
-
-    /**
-     * Returns a WifiAwareNetworkSpecifier with mock (but valid) entries. Each can be
-     * differentiated (made unique) by specifying a different client ID.
-     */
-    WifiAwareNetworkSpecifier getMockNetworkSpecifier(int clientId) {
-        return new WifiAwareNetworkSpecifier(WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_OOB,
-                WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR, clientId, 0, 0, new byte[6],
-                null, null, 10, 5);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
deleted file mode 100644
index 43d728b..0000000
--- a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java
+++ /dev/null
@@ -1,1639 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.aware;
-
-import static android.net.wifi.aware.WifiAwareNetworkSpecifier.NETWORK_SPECIFIER_TYPE_IB;
-
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.ArgumentMatchers.isNull;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
-import android.content.pm.PackageManager;
-import android.net.MacAddress;
-import android.net.wifi.RttManager;
-import android.net.wifi.util.HexEncoding;
-import android.os.Build;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Parcel;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.mockito.ArgumentCaptor;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.net.Inet6Address;
-import java.net.UnknownHostException;
-import java.util.List;
-
-/**
- * Unit test harness for WifiAwareManager class.
- */
-@SmallTest
-public class WifiAwareManagerTest {
-    private WifiAwareManager mDut;
-    private TestLooper mMockLooper;
-    private Handler mMockLooperHandler;
-
-    @Rule
-    public ErrorCollector collector = new ErrorCollector();
-
-    @Mock
-    public Context mockContext;
-
-    @Mock
-    public AttachCallback mockCallback;
-
-    @Mock
-    public DiscoverySessionCallback mockSessionCallback;
-
-    @Mock
-    public IWifiAwareManager mockAwareService;
-
-    @Mock
-    public PublishDiscoverySession mockPublishSession;
-
-    @Mock
-    public SubscribeDiscoverySession mockSubscribeSession;
-
-    @Mock
-    public RttManager.RttListener mockRttListener;
-
-    @Mock
-    public PackageManager mockPackageManager;
-
-    @Mock
-    public ApplicationInfo mockApplicationInfo;
-
-    private static final int AWARE_STATUS_ERROR = -1;
-
-    private static final byte[] PMK_VALID = "01234567890123456789012345678901".getBytes();
-    private static final byte[] PMK_INVALID = "012".getBytes();
-
-    private static final String PASSPHRASE_VALID = "SomeLongEnoughPassphrase";
-    private static final String PASSPHRASE_TOO_SHORT = "012";
-    private static final String PASSPHRASE_TOO_LONG =
-            "0123456789012345678901234567890123456789012345678901234567890123456789";
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.Q;
-        when(mockPackageManager.getApplicationInfo(anyString(), anyInt())).thenReturn(
-                mockApplicationInfo);
-        when(mockContext.getOpPackageName()).thenReturn("XXX");
-        when(mockContext.getPackageManager()).thenReturn(mockPackageManager);
-
-        mDut = new WifiAwareManager(mockContext, mockAwareService);
-        mMockLooper = new TestLooper();
-        mMockLooperHandler = new Handler(mMockLooper.getLooper());
-    }
-
-    /*
-     * Straight pass-through tests
-     */
-
-    /**
-     * Validate pass-through of isUsageEnabled() API.
-     */
-    @Test
-    public void testIsUsageEnable() throws Exception {
-        mDut.isAvailable();
-
-        verify(mockAwareService).isUsageEnabled();
-    }
-
-    /**
-     * Validate pass-through of getCharacteristics() API.
-     */
-    @Test
-    public void testGetCharacteristics() throws Exception {
-        mDut.getCharacteristics();
-
-        verify(mockAwareService).getCharacteristics();
-    }
-
-    /*
-     * WifiAwareEventCallbackProxy Tests
-     */
-
-    /**
-     * Validate the successful connect flow: (1) connect + success (2) publish, (3) disconnect
-     * (4) try publishing on old session (5) connect again
-     */
-    @Test
-    public void testConnectFlow() throws Exception {
-        final int clientId = 4565;
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IBinder> binder = ArgumentCaptor.forClass(IBinder.class);
-
-        // (1) connect + success
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(binder.capture(), any(), any(),
-                clientProxyCallback.capture(), isNull(), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) publish - should succeed
-        PublishConfig publishConfig = new PublishConfig.Builder().build();
-        session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                any());
-
-        // (3) disconnect
-        session.close();
-        inOrder.verify(mockAwareService).disconnect(eq(clientId), eq(binder.getValue()));
-
-        // (4) try publishing again - fails silently
-        session.publish(new PublishConfig.Builder().build(), mockSessionCallback,
-                mMockLooperHandler);
-
-        // (5) connect
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(binder.capture(), any(), any(), any(), isNull(),
-                eq(false));
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService);
-    }
-
-    /**
-     * Validate the failed connect flow: (1) connect + failure, (2) connect + success (3) subscribe
-     */
-    @Test
-    public void testConnectFailure() throws Exception {
-        final int clientId = 4565;
-        final int reason = AWARE_STATUS_ERROR;
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-
-        // (1) connect + failure
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false));
-        clientProxyCallback.getValue().onConnectFail(reason);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttachFailed();
-
-        // (2) connect + success
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (4) subscribe: should succeed
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
-        session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                any());
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService);
-    }
-
-    /**
-     * Validate that can call connect to create multiple sessions: (1) connect
-     * + success, (2) try connect again
-     */
-    @Test
-    public void testInvalidConnectSequence() throws Exception {
-        final int clientId = 4565;
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-
-        // (1) connect + success
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(any());
-
-        // (2) connect + success
-        mDut.attach(mockCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                isNull(), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId + 1);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(any());
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService);
-    }
-
-    /*
-     * WifiAwareDiscoverySessionCallbackProxy Tests
-     */
-
-    /**
-     * Validate the publish flow: (0) connect + success, (1) publish, (2)
-     * success creates session, (3) pass through everything, (4) update publish
-     * through session, (5) terminate locally, (6) try another command -
-     * ignored.
-     */
-    @Test
-    public void testPublishFlow() throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final PublishConfig publishConfig = new PublishConfig.Builder().build();
-        final PeerHandle peerHandle = new PeerHandle(873);
-        final String string1 = "hey from here...";
-        final byte[] matchFilter = { 1, 12, 2, 31, 32 };
-        final int messageId = 2123;
-        final int reason = AWARE_STATUS_ERROR;
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<PublishDiscoverySession> publishSession = ArgumentCaptor
-                .forClass(PublishDiscoverySession.class);
-        ArgumentCaptor<PeerHandle> peerIdCaptor = ArgumentCaptor.forClass(PeerHandle.class);
-        ArgumentCaptor<List<byte[]>> matchFilterCaptor = ArgumentCaptor.forClass(
-                (Class) List.class);
-
-        // (0) connect + success
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (1) publish
-        session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture());
-
-        // (2) publish session created
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
-
-        // (3) ...
-        publishSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes());
-        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter);
-        sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes());
-        sessionProxyCallback.getValue().onMessageSendFail(messageId, reason);
-        sessionProxyCallback.getValue().onMessageSendSuccess(messageId);
-        mMockLooper.dispatchAll();
-
-        inOrder.verify(mockAwareService).sendMessage(eq(clientId), eq(sessionId),
-                eq(peerHandle.peerId), eq(string1.getBytes()), eq(messageId), eq(0));
-        inOrder.verify(mockSessionCallback).onServiceDiscovered(peerIdCaptor.capture(),
-                eq(string1.getBytes()),
-                matchFilterCaptor.capture());
-
-        // note: need to capture/compare elements since the Mockito eq() is a shallow comparator
-        List<byte[]> parsedMatchFilter = new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList();
-        collector.checkThat("match-filter-size", parsedMatchFilter.size(),
-                equalTo(matchFilterCaptor.getValue().size()));
-        collector.checkThat("match-filter-entry0", parsedMatchFilter.get(0),
-                equalTo(matchFilterCaptor.getValue().get(0)));
-        collector.checkThat("match-filter-entry1", parsedMatchFilter.get(1),
-                equalTo(matchFilterCaptor.getValue().get(1)));
-
-        assertEquals(peerIdCaptor.getValue().peerId, peerHandle.peerId);
-        inOrder.verify(mockSessionCallback).onMessageReceived(peerIdCaptor.capture(),
-                eq(string1.getBytes()));
-        assertEquals(peerIdCaptor.getValue().peerId, peerHandle.peerId);
-        inOrder.verify(mockSessionCallback).onMessageSendFailed(eq(messageId));
-        inOrder.verify(mockSessionCallback).onMessageSendSucceeded(eq(messageId));
-
-        // (4) update publish
-        publishSession.getValue().updatePublish(publishConfig);
-        sessionProxyCallback.getValue().onSessionConfigFail(reason);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockAwareService).updatePublish(eq(clientId), eq(sessionId),
-                eq(publishConfig));
-        inOrder.verify(mockSessionCallback).onSessionConfigFailed();
-
-        // (5) terminate
-        publishSession.getValue().close();
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockAwareService).terminateSession(clientId, sessionId);
-
-        // (6) try an update (nothing)
-        publishSession.getValue().updatePublish(publishConfig);
-        mMockLooper.dispatchAll();
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession);
-    }
-
-    /**
-     * Validate race condition of session terminate and session action: (1)
-     * connect, (2) publish success + terminate, (3) update.
-     */
-    @Test
-    public void testPublishRemoteTerminate() throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final PublishConfig publishConfig = new PublishConfig.Builder().build();
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<PublishDiscoverySession> publishSession = ArgumentCaptor
-                .forClass(PublishDiscoverySession.class);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) publish: successfully - then terminated
-        session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture());
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        sessionProxyCallback.getValue().onSessionTerminated(0);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
-        inOrder.verify(mockSessionCallback).onSessionTerminated();
-
-        // (3) failure when trying to update: NOP
-        publishSession.getValue().updatePublish(publishConfig);
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession);
-    }
-
-    /**
-     * Validate the subscribe flow: (0) connect + success, (1) subscribe, (2)
-     * success creates session, (3) pass through everything, (4) update
-     * subscribe through session, (5) terminate locally, (6) try another command
-     * - ignored.
-     */
-    @Test
-    public void testSubscribeFlow() throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
-        final PeerHandle peerHandle = new PeerHandle(873);
-        final String string1 = "hey from here...";
-        final byte[] matchFilter = { 1, 12, 3, 31, 32 }; // bad data!
-        final int messageId = 2123;
-        final int reason = AWARE_STATUS_ERROR;
-        final int distanceMm = 100;
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockSubscribeSession);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<SubscribeDiscoverySession> subscribeSession = ArgumentCaptor
-                .forClass(SubscribeDiscoverySession.class);
-        ArgumentCaptor<PeerHandle> peerIdCaptor = ArgumentCaptor.forClass(PeerHandle.class);
-
-        // (0) connect + success
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (1) subscribe
-        session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                sessionProxyCallback.capture());
-
-        // (2) subscribe session created
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onSubscribeStarted(subscribeSession.capture());
-
-        // (3) ...
-        subscribeSession.getValue().sendMessage(peerHandle, messageId, string1.getBytes());
-        sessionProxyCallback.getValue().onMatch(peerHandle.peerId, string1.getBytes(), matchFilter);
-        sessionProxyCallback.getValue().onMatchWithDistance(peerHandle.peerId, string1.getBytes(),
-                matchFilter, distanceMm);
-        sessionProxyCallback.getValue().onMessageReceived(peerHandle.peerId, string1.getBytes());
-        sessionProxyCallback.getValue().onMessageSendFail(messageId, reason);
-        sessionProxyCallback.getValue().onMessageSendSuccess(messageId);
-        mMockLooper.dispatchAll();
-
-        inOrder.verify(mockAwareService).sendMessage(eq(clientId), eq(sessionId),
-                eq(peerHandle.peerId), eq(string1.getBytes()), eq(messageId), eq(0));
-        inOrder.verify(mockSessionCallback).onServiceDiscovered(peerIdCaptor.capture(),
-                eq(string1.getBytes()), isNull());
-        inOrder.verify(mockSessionCallback).onServiceDiscoveredWithinRange(peerIdCaptor.capture(),
-                eq(string1.getBytes()), isNull(), eq(distanceMm));
-        assertEquals((peerIdCaptor.getValue()).peerId, peerHandle.peerId);
-        inOrder.verify(mockSessionCallback).onMessageReceived(peerIdCaptor.capture(),
-                eq(string1.getBytes()));
-        assertEquals((peerIdCaptor.getValue()).peerId, peerHandle.peerId);
-        inOrder.verify(mockSessionCallback).onMessageSendFailed(eq(messageId));
-        inOrder.verify(mockSessionCallback).onMessageSendSucceeded(eq(messageId));
-
-        // (4) update subscribe
-        subscribeSession.getValue().updateSubscribe(subscribeConfig);
-        sessionProxyCallback.getValue().onSessionConfigFail(reason);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockAwareService).updateSubscribe(eq(clientId), eq(sessionId),
-                eq(subscribeConfig));
-        inOrder.verify(mockSessionCallback).onSessionConfigFailed();
-
-        // (5) terminate
-        subscribeSession.getValue().close();
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockAwareService).terminateSession(clientId, sessionId);
-
-        // (6) try an update (nothing)
-        subscribeSession.getValue().updateSubscribe(subscribeConfig);
-        mMockLooper.dispatchAll();
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockSubscribeSession);
-    }
-
-    /**
-     * Validate race condition of session terminate and session action: (1)
-     * connect, (2) subscribe success + terminate, (3) update.
-     */
-    @Test
-    public void testSubscribeRemoteTerminate() throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockSubscribeSession);
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<SubscribeDiscoverySession> subscribeSession = ArgumentCaptor
-                .forClass(SubscribeDiscoverySession.class);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) subscribe: successfully - then terminated
-        session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId), eq(subscribeConfig),
-                sessionProxyCallback.capture());
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        sessionProxyCallback.getValue().onSessionTerminated(0);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onSubscribeStarted(subscribeSession.capture());
-        inOrder.verify(mockSessionCallback).onSessionTerminated();
-
-        // (3) failure when trying to update: NOP
-        subscribeSession.getValue().updateSubscribe(subscribeConfig);
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockSubscribeSession);
-    }
-
-    /*
-     * ConfigRequest Tests
-     */
-
-    @Test
-    public void testConfigRequestBuilderDefaults() {
-        ConfigRequest configRequest = new ConfigRequest.Builder().build();
-
-        collector.checkThat("mClusterHigh", ConfigRequest.CLUSTER_ID_MAX,
-                equalTo(configRequest.mClusterHigh));
-        collector.checkThat("mClusterLow", ConfigRequest.CLUSTER_ID_MIN,
-                equalTo(configRequest.mClusterLow));
-        collector.checkThat("mMasterPreference", 0,
-                equalTo(configRequest.mMasterPreference));
-        collector.checkThat("mSupport5gBand", true, equalTo(configRequest.mSupport5gBand));
-        collector.checkThat("mSupport6gBand", false, equalTo(configRequest.mSupport6gBand));
-        collector.checkThat("mDiscoveryWindowInterval.length", 3,
-                equalTo(configRequest.mDiscoveryWindowInterval.length));
-        collector.checkThat("mDiscoveryWindowInterval[2.4GHz]", ConfigRequest.DW_INTERVAL_NOT_INIT,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_24GHZ]));
-        collector.checkThat("mDiscoveryWindowInterval[5Hz]", ConfigRequest.DW_INTERVAL_NOT_INIT,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_5GHZ]));
-        collector.checkThat("mDiscoveryWindowInterval[6Hz]", ConfigRequest.DW_INTERVAL_NOT_INIT,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_6GHZ]));
-    }
-
-    @Test
-    public void testConfigRequestBuilder() {
-        final int clusterHigh = 100;
-        final int clusterLow = 5;
-        final int masterPreference = 55;
-        final boolean supportBand5g = true;
-        final boolean supportBand6g = true;
-        final int dwWindow5GHz = 3;
-        final int dwWindow6GHz = 4;
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().setClusterHigh(clusterHigh)
-                .setClusterLow(clusterLow).setMasterPreference(masterPreference)
-                .setSupport5gBand(supportBand5g)
-                .setSupport6gBand(supportBand6g)
-                .setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_5GHZ, dwWindow5GHz)
-                .setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_6GHZ, dwWindow6GHz)
-                .build();
-
-        collector.checkThat("mClusterHigh", clusterHigh, equalTo(configRequest.mClusterHigh));
-        collector.checkThat("mClusterLow", clusterLow, equalTo(configRequest.mClusterLow));
-        collector.checkThat("mMasterPreference", masterPreference,
-                equalTo(configRequest.mMasterPreference));
-        collector.checkThat("mSupport5gBand", supportBand5g, equalTo(configRequest.mSupport5gBand));
-        collector.checkThat("mSupport6gBand", supportBand6g, equalTo(configRequest.mSupport6gBand));
-        collector.checkThat("mDiscoveryWindowInterval.length", 3,
-                equalTo(configRequest.mDiscoveryWindowInterval.length));
-        collector.checkThat("mDiscoveryWindowInterval[2.4GHz]", ConfigRequest.DW_INTERVAL_NOT_INIT,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_24GHZ]));
-        collector.checkThat("mDiscoveryWindowInterval[5GHz]", dwWindow5GHz,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_5GHZ]));
-        collector.checkThat("mDiscoveryWindowInterval[6GHz]", dwWindow6GHz,
-                equalTo(configRequest.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_6GHZ]));
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderMasterPrefNegative() {
-        ConfigRequest.Builder builder = new ConfigRequest.Builder();
-        builder.setMasterPreference(-1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderMasterPrefReserved1() {
-        new ConfigRequest.Builder().setMasterPreference(1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderMasterPrefReserved255() {
-        new ConfigRequest.Builder().setMasterPreference(255);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderMasterPrefTooLarge() {
-        new ConfigRequest.Builder().setMasterPreference(256);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderClusterLowNegative() {
-        new ConfigRequest.Builder().setClusterLow(-1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderClusterHighNegative() {
-        new ConfigRequest.Builder().setClusterHigh(-1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderClusterLowAboveMax() {
-        new ConfigRequest.Builder().setClusterLow(ConfigRequest.CLUSTER_ID_MAX + 1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderClusterHighAboveMax() {
-        new ConfigRequest.Builder().setClusterHigh(ConfigRequest.CLUSTER_ID_MAX + 1);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderClusterLowLargerThanHigh() {
-        new ConfigRequest.Builder().setClusterLow(100).setClusterHigh(5).build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderDwIntervalInvalidBand() {
-        new ConfigRequest.Builder().setDiscoveryWindowInterval(5, 1).build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderDwIntervalInvalidValueZero() {
-        new ConfigRequest.Builder().setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_24GHZ,
-                0).build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderDwIntervalInvalidValueLarge() {
-        new ConfigRequest.Builder().setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_5GHZ,
-                6).build();
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testConfigRequestBuilderDwIntervalInvalidValueLargeValidate() {
-        ConfigRequest cr = new ConfigRequest.Builder().build();
-        cr.mDiscoveryWindowInterval[ConfigRequest.NAN_BAND_5GHZ] = 6;
-        cr.validate();
-    }
-
-    @Test
-    public void testConfigRequestParcel() {
-        final int clusterHigh = 189;
-        final int clusterLow = 25;
-        final int masterPreference = 177;
-        final boolean supportBand5g = true;
-        final boolean supportBand6g = false;
-        final int dwWindow24GHz = 1;
-        final int dwWindow5GHz = 5;
-        final int dwWindow6GHz = 4;
-
-        ConfigRequest configRequest = new ConfigRequest.Builder().setClusterHigh(clusterHigh)
-                .setClusterLow(clusterLow).setMasterPreference(masterPreference)
-                .setSupport5gBand(supportBand5g)
-                .setSupport6gBand(supportBand6g)
-                .setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_24GHZ, dwWindow24GHz)
-                .setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_5GHZ, dwWindow5GHz)
-                .setDiscoveryWindowInterval(ConfigRequest.NAN_BAND_6GHZ, dwWindow6GHz)
-                .build();
-
-        Parcel parcelW = Parcel.obtain();
-        configRequest.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        ConfigRequest rereadConfigRequest = ConfigRequest.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(configRequest, rereadConfigRequest);
-        assertEquals(configRequest.hashCode(), rereadConfigRequest.hashCode());
-    }
-
-    /*
-     * SubscribeConfig Tests
-     */
-
-    @Test
-    public void testSubscribeConfigBuilderDefaults() {
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
-
-        collector.checkThat("mServiceName", subscribeConfig.mServiceName, equalTo(null));
-        collector.checkThat("mServiceSpecificInfo", subscribeConfig.mServiceSpecificInfo,
-                equalTo(null));
-        collector.checkThat("mMatchFilter", subscribeConfig.mMatchFilter, equalTo(null));
-        collector.checkThat("mSubscribeType", subscribeConfig.mSubscribeType,
-                equalTo(SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE));
-        collector.checkThat("mTtlSec", subscribeConfig.mTtlSec, equalTo(0));
-        collector.checkThat("mEnableTerminateNotification",
-                subscribeConfig.mEnableTerminateNotification, equalTo(true));
-        collector.checkThat("mMinDistanceCmSet", subscribeConfig.mMinDistanceMmSet, equalTo(false));
-        collector.checkThat("mMinDistanceMm", subscribeConfig.mMinDistanceMm, equalTo(0));
-        collector.checkThat("mMaxDistanceMmSet", subscribeConfig.mMaxDistanceMmSet, equalTo(false));
-        collector.checkThat("mMaxDistanceMm", subscribeConfig.mMaxDistanceMm, equalTo(0));
-    }
-
-    @Test
-    public void testSubscribeConfigBuilder() {
-        final String serviceName = "some_service_or_other";
-        final String serviceSpecificInfo = "long arbitrary string with some info";
-        final byte[] matchFilter = { 1, 16, 1, 22 };
-        final int subscribeType = SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE;
-        final int subscribeTtl = 15;
-        final boolean enableTerminateNotification = false;
-        final int minDistance = 10;
-        final int maxDistance = 50;
-
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().setServiceName(serviceName)
-                .setServiceSpecificInfo(serviceSpecificInfo.getBytes()).setMatchFilter(
-                    new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList())
-                .setSubscribeType(subscribeType)
-                .setTtlSec(subscribeTtl)
-                .setTerminateNotificationEnabled(enableTerminateNotification)
-                .setMinDistanceMm(minDistance)
-                .setMaxDistanceMm(maxDistance).build();
-
-        collector.checkThat("mServiceName", serviceName.getBytes(),
-                equalTo(subscribeConfig.mServiceName));
-        collector.checkThat("mServiceSpecificInfo",
-                serviceSpecificInfo.getBytes(), equalTo(subscribeConfig.mServiceSpecificInfo));
-        collector.checkThat("mMatchFilter", matchFilter, equalTo(subscribeConfig.mMatchFilter));
-        collector.checkThat("mSubscribeType", subscribeType,
-                equalTo(subscribeConfig.mSubscribeType));
-        collector.checkThat("mTtlSec", subscribeTtl, equalTo(subscribeConfig.mTtlSec));
-        collector.checkThat("mEnableTerminateNotification", enableTerminateNotification,
-                equalTo(subscribeConfig.mEnableTerminateNotification));
-        collector.checkThat("mMinDistanceMmSet", true, equalTo(subscribeConfig.mMinDistanceMmSet));
-        collector.checkThat("mMinDistanceMm", minDistance, equalTo(subscribeConfig.mMinDistanceMm));
-        collector.checkThat("mMaxDistanceMmSet", true, equalTo(subscribeConfig.mMaxDistanceMmSet));
-        collector.checkThat("mMaxDistanceMm", maxDistance, equalTo(subscribeConfig.mMaxDistanceMm));
-    }
-
-    @Test
-    public void testSubscribeConfigParcel() {
-        final String serviceName = "some_service_or_other";
-        final String serviceSpecificInfo = "long arbitrary string with some info";
-        final byte[] matchFilter = { 1, 16, 1, 22 };
-        final int subscribeType = SubscribeConfig.SUBSCRIBE_TYPE_PASSIVE;
-        final int subscribeTtl = 15;
-        final boolean enableTerminateNotification = true;
-        final int minDistance = 10;
-        final int maxDistance = 50;
-
-        SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().setServiceName(serviceName)
-                .setServiceSpecificInfo(serviceSpecificInfo.getBytes()).setMatchFilter(
-                        new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList())
-                .setSubscribeType(subscribeType)
-                .setTtlSec(subscribeTtl)
-                .setTerminateNotificationEnabled(enableTerminateNotification)
-                .setMinDistanceMm(minDistance)
-                .setMaxDistanceMm(maxDistance).build();
-
-        Parcel parcelW = Parcel.obtain();
-        subscribeConfig.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        SubscribeConfig rereadSubscribeConfig = SubscribeConfig.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(subscribeConfig, rereadSubscribeConfig);
-        assertEquals(subscribeConfig.hashCode(), rereadSubscribeConfig.hashCode());
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSubscribeConfigBuilderBadSubscribeType() {
-        new SubscribeConfig.Builder().setSubscribeType(10);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testSubscribeConfigBuilderNegativeTtl() {
-        new SubscribeConfig.Builder().setTtlSec(-100);
-    }
-
-    /*
-     * PublishConfig Tests
-     */
-
-    @Test
-    public void testPublishConfigBuilderDefaults() {
-        PublishConfig publishConfig = new PublishConfig.Builder().build();
-
-        collector.checkThat("mServiceName", publishConfig.mServiceName, equalTo(null));
-        collector.checkThat("mServiceSpecificInfo", publishConfig.mServiceSpecificInfo,
-                equalTo(null));
-        collector.checkThat("mMatchFilter", publishConfig.mMatchFilter, equalTo(null));
-        collector.checkThat("mPublishType", publishConfig.mPublishType,
-                equalTo(PublishConfig.PUBLISH_TYPE_UNSOLICITED));
-        collector.checkThat("mTtlSec", publishConfig.mTtlSec, equalTo(0));
-        collector.checkThat("mEnableTerminateNotification",
-                publishConfig.mEnableTerminateNotification, equalTo(true));
-        collector.checkThat("mEnableRanging", publishConfig.mEnableRanging, equalTo(false));
-    }
-
-    @Test
-    public void testPublishConfigBuilder() {
-        final String serviceName = "some_service_or_other";
-        final String serviceSpecificInfo = "long arbitrary string with some info";
-        final byte[] matchFilter = { 1, 16, 1, 22 };
-        final int publishType = PublishConfig.PUBLISH_TYPE_SOLICITED;
-        final int publishTtl = 15;
-        final boolean enableTerminateNotification = false;
-        final boolean enableRanging = true;
-
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName(serviceName)
-                .setServiceSpecificInfo(serviceSpecificInfo.getBytes()).setMatchFilter(
-                        new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList())
-                .setPublishType(publishType)
-                .setTtlSec(publishTtl)
-                .setTerminateNotificationEnabled(enableTerminateNotification)
-                .setRangingEnabled(enableRanging).build();
-
-        collector.checkThat("mServiceName", serviceName.getBytes(),
-                equalTo(publishConfig.mServiceName));
-        collector.checkThat("mServiceSpecificInfo",
-                serviceSpecificInfo.getBytes(), equalTo(publishConfig.mServiceSpecificInfo));
-        collector.checkThat("mMatchFilter", matchFilter, equalTo(publishConfig.mMatchFilter));
-        collector.checkThat("mPublishType", publishType, equalTo(publishConfig.mPublishType));
-        collector.checkThat("mTtlSec", publishTtl, equalTo(publishConfig.mTtlSec));
-        collector.checkThat("mEnableTerminateNotification", enableTerminateNotification,
-                equalTo(publishConfig.mEnableTerminateNotification));
-        collector.checkThat("mEnableRanging", enableRanging, equalTo(publishConfig.mEnableRanging));
-    }
-
-    @Test
-    public void testPublishConfigParcel() {
-        final String serviceName = "some_service_or_other";
-        final String serviceSpecificInfo = "long arbitrary string with some info";
-        final byte[] matchFilter = { 1, 16, 1, 22 };
-        final int publishType = PublishConfig.PUBLISH_TYPE_SOLICITED;
-        final int publishTtl = 15;
-        final boolean enableTerminateNotification = false;
-        final boolean enableRanging = true;
-
-        PublishConfig publishConfig = new PublishConfig.Builder().setServiceName(serviceName)
-                .setServiceSpecificInfo(serviceSpecificInfo.getBytes()).setMatchFilter(
-                        new TlvBufferUtils.TlvIterable(0, 1, matchFilter).toList())
-                .setPublishType(publishType)
-                .setTtlSec(publishTtl)
-                .setTerminateNotificationEnabled(enableTerminateNotification)
-                .setRangingEnabled(enableRanging).build();
-
-        Parcel parcelW = Parcel.obtain();
-        publishConfig.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        PublishConfig rereadPublishConfig = PublishConfig.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(publishConfig, rereadPublishConfig);
-        assertEquals(publishConfig.hashCode(), rereadPublishConfig.hashCode());
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testPublishConfigBuilderBadPublishType() {
-        new PublishConfig.Builder().setPublishType(5);
-    }
-
-    @Test(expected = IllegalArgumentException.class)
-    public void testPublishConfigBuilderNegativeTtl() {
-        new PublishConfig.Builder().setTtlSec(-10);
-    }
-
-    /*
-     * Data-path tests
-     */
-
-    /**
-     * Validate that correct network specifier is generated for client-based data-path.
-     */
-    @Test
-    public void testNetworkSpecifierWithClient() throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final byte[] pmk = PMK_VALID;
-        final String passphrase = PASSPHRASE_VALID;
-        final int port = 5;
-        final int transportProtocol = 10;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final PublishConfig publishConfig = new PublishConfig.Builder().build();
-
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.P;
-
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<PublishDiscoverySession> publishSession = ArgumentCaptor
-                .forClass(PublishDiscoverySession.class);
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) publish successfully
-        session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture());
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
-
-        // (3) request an open (unencrypted) network specifier from the session
-        WifiAwareNetworkSpecifier ns =
-                (WifiAwareNetworkSpecifier) publishSession.getValue().createNetworkSpecifierOpen(
-                        peerHandle);
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(
-                publishSession.getValue(), peerHandle).build();
-
-        // validate format
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(ns.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId));
-
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(nsb.role));
-        collector.checkThat("client_id", clientId, equalTo(nsb.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(nsb.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(nsb.peerId));
-        collector.checkThat("port", 0, equalTo(nsb.port));
-        collector.checkThat("transportProtocol", -1, equalTo(nsb.transportProtocol));
-
-        // (4) request an encrypted (PMK) network specifier from the session
-        ns = (WifiAwareNetworkSpecifier) publishSession.getValue().createNetworkSpecifierPmk(
-                peerHandle, pmk);
-        nsb = new WifiAwareNetworkSpecifier.Builder(publishSession.getValue(), peerHandle).setPmk(
-                pmk).setPort(port).setTransportProtocol(transportProtocol).build();
-
-        // validate format
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(ns.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId));
-        collector.checkThat("pmk", pmk , equalTo(ns.pmk));
-
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(nsb.role));
-        collector.checkThat("client_id", clientId, equalTo(nsb.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(nsb.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(nsb.peerId));
-        collector.checkThat("pmk", pmk , equalTo(nsb.pmk));
-        collector.checkThat("port", port, equalTo(nsb.port));
-        collector.checkThat("transportProtocol", transportProtocol, equalTo(nsb.transportProtocol));
-
-        // (5) request an encrypted (Passphrase) network specifier from the session
-        ns =
-                (WifiAwareNetworkSpecifier) publishSession.getValue()
-                        .createNetworkSpecifierPassphrase(
-                        peerHandle, passphrase);
-        nsb = new WifiAwareNetworkSpecifier.Builder(publishSession.getValue(),
-                peerHandle).setPskPassphrase(passphrase).setPort(port).setTransportProtocol(
-                transportProtocol).build();
-
-        // validate format
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(ns.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(ns.peerId));
-        collector.checkThat("passphrase", passphrase, equalTo(ns.passphrase));
-
-        collector.checkThat("role", WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER,
-                equalTo(nsb.role));
-        collector.checkThat("client_id", clientId, equalTo(nsb.clientId));
-        collector.checkThat("session_id", sessionId, equalTo(nsb.sessionId));
-        collector.checkThat("peer_id", peerHandle.peerId, equalTo(nsb.peerId));
-        collector.checkThat("passphrase", passphrase, equalTo(nsb.passphrase));
-        collector.checkThat("port", port, equalTo(nsb.port));
-        collector.checkThat("transportProtocol", transportProtocol, equalTo(nsb.transportProtocol));
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-    }
-
-    /**
-     * Validate that correct network specifier is generated for a direct data-path (i.e.
-     * specifying MAC address as opposed to a client-based oqaque specification).
-     */
-    @Test
-    public void testNetworkSpecifierDirect() throws Exception {
-        final int clientId = 134;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final byte[] someMac = HexEncoding.decode("000102030405".toCharArray(), false);
-        final int role = WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR;
-        final byte[] pmk = PMK_VALID;
-        final String passphrase = PASSPHRASE_VALID;
-
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) request an open (unencrypted) direct network specifier
-        WifiAwareNetworkSpecifier ns =
-                (WifiAwareNetworkSpecifier) session.createNetworkSpecifierOpen(role, someMac);
-
-        // validate format
-        collector.checkThat("role", role, equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("peer_mac", someMac, equalTo(ns.peerMac));
-
-        // (3) request an encrypted (PMK) direct network specifier
-        ns = (WifiAwareNetworkSpecifier) session.createNetworkSpecifierPmk(role, someMac, pmk);
-
-        // validate format
-        collector.checkThat("role", role, equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("peer_mac", someMac, equalTo(ns.peerMac));
-        collector.checkThat("pmk", pmk, equalTo(ns.pmk));
-
-        // (4) request an encrypted (Passphrase) direct network specifier
-        ns = (WifiAwareNetworkSpecifier) session.createNetworkSpecifierPassphrase(role, someMac,
-                passphrase);
-
-        // validate format
-        collector.checkThat("role", role, equalTo(ns.role));
-        collector.checkThat("client_id", clientId, equalTo(ns.clientId));
-        collector.checkThat("peer_mac", someMac, equalTo(ns.peerMac));
-        collector.checkThat("passphrase", passphrase, equalTo(ns.passphrase));
-
-        verifyNoMoreInteractions(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-    }
-
-    /**
-     * Validate that a null PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPmk() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), true, null, null, false);
-    }
-
-    /**
-     * Validate that a non-32-bytes PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientIncorrectLengthPmk() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), true, PMK_INVALID, null, false);
-    }
-
-    /**
-     * Validate that a null Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPassphrase() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null, null, false);
-    }
-
-    /**
-     * Validate that a too short Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientTooShortPassphrase() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null,
-                PASSPHRASE_TOO_SHORT, false);
-    }
-
-    /**
-     * Validate that a too long Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientTooLongPassphrase() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null, PASSPHRASE_TOO_LONG,
-                false);
-    }
-
-    /**
-     * Validate that a null PeerHandle triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPeer() throws Exception {
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.P;
-        executeNetworkSpecifierWithClient(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    /**
-     * Validate that a null PeerHandle does not trigger an exception for legacy API.
-     */
-    @Test
-    public void testNetworkSpecifierWithClientNullPeerLegacyApi() throws Exception {
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
-        executeNetworkSpecifierWithClient(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    /**
-     * Validate that a null PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPmkBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), true, null, null, true);
-    }
-
-    /**
-     * Validate that a non-32-bytes PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientIncorrectLengthPmkBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), true, PMK_INVALID, null, true);
-    }
-
-    /**
-     * Validate that a null Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPassphraseBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null, null, true);
-    }
-
-    /**
-     * Validate that a too short Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientTooShortPassphraseBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null,
-                PASSPHRASE_TOO_SHORT, true);
-    }
-
-    /**
-     * Validate that a too long Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientTooLongPassphraseBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(new PeerHandle(123412), false, null, PASSPHRASE_TOO_LONG,
-                true);
-    }
-
-    /**
-     * Validate that a null PeerHandle triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierWithClientNullPeerBuilder() throws Exception {
-        executeNetworkSpecifierWithClient(null, false, null, PASSPHRASE_VALID, true);
-    }
-
-    /**
-     * Validate that a null PeerHandle does not trigger an exception for legacy API.
-     */
-    @Test
-    public void testNetworkSpecifierWithClientNullPeerLegacyApiBuilder() throws Exception {
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
-        executeNetworkSpecifierWithClient(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void testNetworkSpecifierDeprecatedOnNewApi() throws Exception {
-        executeNetworkSpecifierWithClient(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    private void executeNetworkSpecifierWithClient(PeerHandle peerHandle, boolean doPmk, byte[] pmk,
-            String passphrase, boolean useBuilder) throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final PublishConfig publishConfig = new PublishConfig.Builder().build();
-
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<PublishDiscoverySession> publishSession = ArgumentCaptor
-                .forClass(PublishDiscoverySession.class);
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        // (2) publish successfully
-        session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-        inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                sessionProxyCallback.capture());
-        sessionProxyCallback.getValue().onSessionStarted(sessionId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
-
-        // (3) create network specifier
-        if (doPmk) {
-            if (useBuilder) {
-                new WifiAwareNetworkSpecifier.Builder(publishSession.getValue(), peerHandle).setPmk(
-                        pmk).build();
-            } else {
-                publishSession.getValue().createNetworkSpecifierPmk(peerHandle, pmk);
-            }
-        } else {
-            if (useBuilder) {
-                new WifiAwareNetworkSpecifier.Builder(publishSession.getValue(),
-                        peerHandle).setPskPassphrase(passphrase).build();
-            } else {
-                publishSession.getValue().createNetworkSpecifierPassphrase(peerHandle, passphrase);
-            }
-        }
-    }
-
-    /**
-     * Validate that a null PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectNullPmk() throws Exception {
-        executeNetworkSpecifierDirect(HexEncoding.decode("000102030405".toCharArray(), false), true,
-                null, null, true);
-    }
-
-    /**
-     * Validate that a non-32-bytes PMK triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectIncorrectLengthPmk() throws Exception {
-        executeNetworkSpecifierDirect(HexEncoding.decode("000102030405".toCharArray(), false), true,
-                PMK_INVALID, null, true);
-    }
-
-    /**
-     * Validate that a null Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectNullPassphrase() throws Exception {
-        executeNetworkSpecifierDirect(HexEncoding.decode("000102030405".toCharArray(), false),
-                false, null, null, true);
-    }
-
-    /**
-     * Validate that a too short Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectTooShortPassphrase() throws Exception {
-        executeNetworkSpecifierDirect(HexEncoding.decode("000102030405".toCharArray(), false),
-                false, null, PASSPHRASE_TOO_SHORT, true);
-    }
-
-    /**
-     * Validate that a too long Passphrase triggers an exception.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectTooLongPassphrase() throws Exception {
-        executeNetworkSpecifierDirect(HexEncoding.decode("000102030405".toCharArray(), false),
-                false, null, PASSPHRASE_TOO_LONG, true);
-    }
-
-    /**
-     * Validate that a null peer MAC triggers an exception for an Initiator.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectNullPeerInitiator() throws Exception {
-        executeNetworkSpecifierDirect(null, false, null, PASSPHRASE_VALID, true);
-    }
-
-    /**
-     * Validate that a null peer MAC triggers an exception for a Resonder.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierDirectNullPeerResponder() throws Exception {
-        executeNetworkSpecifierDirect(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    /**
-     * Validate that a null peer MAC does not trigger an exception for a Resonder on legacy API.
-     */
-    @Test
-    public void testNetworkSpecifierDirectNullPeerResponderLegacyApi() throws Exception {
-        mockApplicationInfo.targetSdkVersion = Build.VERSION_CODES.O;
-        executeNetworkSpecifierDirect(null, false, null, PASSPHRASE_VALID, false);
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with an invalid port number
-     * (<=0).
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testNetworkSpecifierBuilderInvalidPortNumber() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final byte[] pmk = PMK_VALID;
-        final int port = 0;
-
-        DiscoverySession publishSession = executeSessionStartup(true);
-
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                peerHandle).setPmk(pmk).setPort(port).build();
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with port information
-     * without also requesting a secure link.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testNetworkSpecifierBuilderInvalidPortOnInsecure() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final int port = 5;
-
-        DiscoverySession publishSession = executeSessionStartup(true);
-
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                peerHandle).setPort(port).build();
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with port information on
-     * a responder.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testNetworkSpecifierBuilderInvalidPortOnResponder() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final int port = 5;
-
-        DiscoverySession subscribeSession = executeSessionStartup(false);
-
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(subscribeSession,
-                peerHandle).setPort(port).build();
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with an invalid transport
-     * protocol number (not in [0, 255]).
-     */
-    @Test
-    public void testNetworkSpecifierBuilderInvalidTransportProtocolNumber() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final byte[] pmk = PMK_VALID;
-        final int tpNegative = -1;
-        final int tpTooLarge = 256;
-        final int tpSmallest = 0;
-        final int tpLargest = 255;
-
-        DiscoverySession publishSession = executeSessionStartup(true);
-
-        try {
-            WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                    peerHandle).setPmk(pmk).setTransportProtocol(tpNegative).build();
-            assertTrue("No exception on negative transport protocol!", false);
-        } catch (IllegalArgumentException e) {
-            // nop - exception is correct!
-        }
-        try {
-            WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                    peerHandle).setPmk(pmk).setTransportProtocol(tpTooLarge).build();
-            assertTrue("No exception on >255 transport protocol!", false);
-        } catch (IllegalArgumentException e) {
-            // nop - exception is correct!
-        }
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                peerHandle).setPmk(pmk).setTransportProtocol(tpSmallest).build();
-        nsb = new WifiAwareNetworkSpecifier.Builder(publishSession, peerHandle).setPmk(
-                pmk).setTransportProtocol(tpLargest).build();
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with transport protocol
-     * information without also requesting a secure link.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testNetworkSpecifierBuilderInvalidTransportProtocolOnInsecure() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final int transportProtocol = 5;
-
-        DiscoverySession publishSession = executeSessionStartup(true);
-
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(publishSession,
-                peerHandle).setTransportProtocol(transportProtocol).build();
-    }
-
-    /**
-     * Validate that get an exception when creating a network specifier with transport protocol
-     * information on a responder.
-     */
-    @Test(expected = IllegalStateException.class)
-    public void testNetworkSpecifierBuilderInvalidTransportProtocolOnResponder() throws Exception {
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final int transportProtocol = 5;
-
-        DiscoverySession subscribeSession = executeSessionStartup(false);
-
-        WifiAwareNetworkSpecifier nsb = new WifiAwareNetworkSpecifier.Builder(subscribeSession,
-                peerHandle).setTransportProtocol(transportProtocol).build();
-    }
-
-    /*
-     * Utilities
-     */
-
-    private void executeNetworkSpecifierDirect(byte[] someMac, boolean doPmk, byte[] pmk,
-            String passphrase, boolean doInitiator) throws Exception {
-        final int clientId = 134;
-        final int role = doInitiator ? WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_INITIATOR
-                : WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-
-        // (2) create network specifier
-        if (doPmk) {
-            sessionCaptor.getValue().createNetworkSpecifierPmk(role, someMac, pmk);
-        } else {
-            sessionCaptor.getValue().createNetworkSpecifierPassphrase(role, someMac, passphrase);
-        }
-    }
-
-    private DiscoverySession executeSessionStartup(boolean isPublish) throws Exception {
-        final int clientId = 4565;
-        final int sessionId = 123;
-        final PeerHandle peerHandle = new PeerHandle(123412);
-        final int port = 5;
-        final ConfigRequest configRequest = new ConfigRequest.Builder().build();
-        final SubscribeConfig subscribeConfig = new SubscribeConfig.Builder().build();
-        final PublishConfig publishConfig = new PublishConfig.Builder().build();
-
-        ArgumentCaptor<WifiAwareSession> sessionCaptor = ArgumentCaptor.forClass(
-                WifiAwareSession.class);
-        ArgumentCaptor<IWifiAwareEventCallback> clientProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareEventCallback.class);
-        ArgumentCaptor<IWifiAwareDiscoverySessionCallback> sessionProxyCallback = ArgumentCaptor
-                .forClass(IWifiAwareDiscoverySessionCallback.class);
-        ArgumentCaptor<PublishDiscoverySession> publishSession = ArgumentCaptor
-                .forClass(PublishDiscoverySession.class);
-        ArgumentCaptor<SubscribeDiscoverySession> subscribeSession = ArgumentCaptor
-                .forClass(SubscribeDiscoverySession.class);
-
-
-        InOrder inOrder = inOrder(mockCallback, mockSessionCallback, mockAwareService,
-                mockPublishSession, mockRttListener);
-
-        // (1) connect successfully
-        mDut.attach(mMockLooperHandler, configRequest, mockCallback, null);
-        inOrder.verify(mockAwareService).connect(any(), any(), any(), clientProxyCallback.capture(),
-                eq(configRequest), eq(false));
-        clientProxyCallback.getValue().onConnectSuccess(clientId);
-        mMockLooper.dispatchAll();
-        inOrder.verify(mockCallback).onAttached(sessionCaptor.capture());
-        WifiAwareSession session = sessionCaptor.getValue();
-
-        if (isPublish) {
-            // (2) publish successfully
-            session.publish(publishConfig, mockSessionCallback, mMockLooperHandler);
-            inOrder.verify(mockAwareService).publish(any(), any(), eq(clientId), eq(publishConfig),
-                    sessionProxyCallback.capture());
-            sessionProxyCallback.getValue().onSessionStarted(sessionId);
-            mMockLooper.dispatchAll();
-            inOrder.verify(mockSessionCallback).onPublishStarted(publishSession.capture());
-            return publishSession.getValue();
-        } else {
-            // (2) subscribe successfully
-            session.subscribe(subscribeConfig, mockSessionCallback, mMockLooperHandler);
-            inOrder.verify(mockAwareService).subscribe(any(), any(), eq(clientId),
-                    eq(subscribeConfig), sessionProxyCallback.capture());
-            sessionProxyCallback.getValue().onSessionStarted(sessionId);
-            mMockLooper.dispatchAll();
-            inOrder.verify(mockSessionCallback).onSubscribeStarted(subscribeSession.capture());
-            return subscribeSession.getValue();
-        }
-    }
-
-    // WifiAwareNetworkSpecifier && WifiAwareNetworkInfo tests
-
-    @Test
-    public void testWifiAwareNetworkSpecifierParcel() {
-        WifiAwareNetworkSpecifier ns = new WifiAwareNetworkSpecifier(NETWORK_SPECIFIER_TYPE_IB,
-                WifiAwareManager.WIFI_AWARE_DATA_PATH_ROLE_RESPONDER, 5, 568, 334,
-                HexEncoding.decode("000102030405".toCharArray(), false),
-                "01234567890123456789012345678901".getBytes(), "blah blah", 666, 4);
-
-        Parcel parcelW = Parcel.obtain();
-        ns.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiAwareNetworkSpecifier rereadNs =
-                WifiAwareNetworkSpecifier.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(ns, rereadNs);
-        assertEquals(ns.hashCode(), rereadNs.hashCode());
-    }
-
-    @Test
-    public void testWifiAwareNetworkCapabilitiesParcel() throws UnknownHostException {
-        final Inet6Address inet6 = MacAddress.fromString(
-                "11:22:33:44:55:66").getLinkLocalIpv6FromEui48Mac();
-        // note: placeholder scope = 5
-        final Inet6Address inet6Scoped = Inet6Address.getByAddress(null, inet6.getAddress(), 5);
-        final int port = 5;
-        final int transportProtocol = 6;
-
-        assertEquals(inet6Scoped.toString(), "/fe80::1322:33ff:fe44:5566%5");
-        WifiAwareNetworkInfo cap = new WifiAwareNetworkInfo(inet6Scoped, port, transportProtocol);
-
-        Parcel parcelW = Parcel.obtain();
-        cap.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiAwareNetworkInfo rereadCap =
-                WifiAwareNetworkInfo.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(cap.getPeerIpv6Addr().toString(), "/fe80::1322:33ff:fe44:5566%5");
-        assertEquals(cap, rereadCap);
-        assertEquals(cap.hashCode(), rereadCap.hashCode());
-    }
-
-    // ParcelablePeerHandle tests
-
-    /**
-     * Verify parceling of ParcelablePeerHandle and interoperability with PeerHandle.
-     */
-    @Test
-    public void testParcelablePeerHandleParcel() {
-        final PeerHandle peerHandle = new PeerHandle(5);
-        final ParcelablePeerHandle parcelablePeerHandle = new ParcelablePeerHandle(peerHandle);
-
-        Parcel parcelW = Parcel.obtain();
-        parcelablePeerHandle.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        ParcelablePeerHandle rereadParcelablePeerHandle =
-                ParcelablePeerHandle.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(peerHandle, rereadParcelablePeerHandle);
-        assertEquals(peerHandle.hashCode(), rereadParcelablePeerHandle.hashCode());
-        assertEquals(parcelablePeerHandle, rereadParcelablePeerHandle);
-        assertEquals(parcelablePeerHandle.hashCode(), rereadParcelablePeerHandle.hashCode());
-
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
deleted file mode 100644
index 439e672..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/ConfigParserTest.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi.hotspot2;
-
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.FakeKeys;
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.Arrays;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.ConfigParser}.
- */
-@SmallTest
-public class ConfigParserTest {
-    /**
-     * Hotspot 2.0 Release 1 installation file that contains a Passpoint profile and a
-     * CA (Certificate Authority) X.509 certificate {@link FakeKeys#CA_CERT0}.
-     */
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT =
-            "assets/hsr1/HSR1ProfileWithCACert.base64";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_UNENCODED_DATA =
-            "assets/hsr1/HSR1ProfileWithCACert.conf";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_INVALID_PART =
-            "assets/hsr1/HSR1ProfileWithNonBase64Part.base64";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_MISSING_BOUNDARY =
-            "assets/hsr1/HSR1ProfileWithMissingBoundary.base64";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_INVALID_CONTENT_TYPE =
-            "assets/hsr1/HSR1ProfileWithInvalidContentType.base64";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITHOUT_PROFILE =
-            "assets/hsr1/HSR1ProfileWithoutProfile.base64";
-    private static final String PASSPOINT_INSTALLATION_FILE_WITH_UPDATE_ID =
-            "assets/hsr1/HSR1ProfileWithUpdateIdentifier.base64";
-
-    /**
-     * Read the content of the given resource file into a String.
-     *
-     * @param filename String name of the file
-     * @return String
-     * @throws IOException
-     */
-    private String loadResourceFile(String filename) throws IOException {
-        InputStream in = getClass().getClassLoader().getResourceAsStream(filename);
-        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-        StringBuilder builder = new StringBuilder();
-        String line;
-        while ((line = reader.readLine()) != null) {
-            builder.append(line).append("\n");
-        }
-
-        return builder.toString();
-    }
-
-    /**
-     * Generate a {@link PasspointConfiguration} that matches the configuration specified in the
-     * XML file {@link #PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT}.
-     *
-     * @return {@link PasspointConfiguration}
-     */
-    private PasspointConfiguration generateConfigurationFromProfile() {
-        PasspointConfiguration config = new PasspointConfiguration();
-
-        // HomeSP configuration.
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFriendlyName("Example Network");
-        homeSp.setFqdn("hotspot.example.net");
-        homeSp.setRoamingConsortiumOis(new long[] {0x112233L, 0x445566L});
-        config.setHomeSp(homeSp);
-
-        // Credential configuration.
-        Credential credential = new Credential();
-        credential.setRealm("example.com");
-        Credential.UserCredential userCredential = new Credential.UserCredential();
-        userCredential.setUsername("user");
-        userCredential.setPassword("cGFzc3dvcmQ=");
-        userCredential.setEapType(21);
-        userCredential.setNonEapInnerMethod("MS-CHAP-V2");
-        credential.setUserCredential(userCredential);
-        Credential.CertificateCredential certCredential = new Credential.CertificateCredential();
-        certCredential.setCertType("x509v3");
-        byte[] certSha256Fingerprint = new byte[32];
-        Arrays.fill(certSha256Fingerprint, (byte)0x1f);
-        certCredential.setCertSha256Fingerprint(certSha256Fingerprint);
-        credential.setCertCredential(certCredential);
-        Credential.SimCredential simCredential = new Credential.SimCredential();
-        simCredential.setImsi("123456*");
-        simCredential.setEapType(23);
-        credential.setSimCredential(simCredential);
-        credential.setCaCertificate(FakeKeys.CA_CERT0);
-        config.setCredential(credential);
-        return config;
-    }
-
-    /**
-     * Verify a valid installation file is parsed successfully with the matching contents.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFile() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT);
-        PasspointConfiguration expectedConfig = generateConfigurationFromProfile();
-        PasspointConfiguration actualConfig =
-                ConfigParser.parsePasspointConfig(
-                        "application/x-wifi-config", configStr.getBytes());
-        assertTrue(actualConfig.equals(expectedConfig));
-    }
-
-    /**
-     * Verify that parsing an installation file with invalid MIME type will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithInvalidMimeType() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_CA_CERT);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify that parsing an un-encoded installation file will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithUnencodedData() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_UNENCODED_DATA);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/x-wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify that parsing an installation file that contains a non-base64 part will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithInvalidPart() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_INVALID_PART);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/x-wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify that parsing an installation file that contains a missing boundary string will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithMissingBoundary() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_MISSING_BOUNDARY);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/x-wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify that parsing an installation file that contains a MIME part with an invalid content
-     * type will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithInvalidContentType() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_INVALID_CONTENT_TYPE);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/x-wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify that parsing an installation file that doesn't contain a Passpoint profile will fail.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithoutPasspointProfile() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITHOUT_PROFILE);
-        assertNull(ConfigParser.parsePasspointConfig(
-                "application/x-wifi-config", configStr.getBytes()));
-    }
-
-    /**
-     * Verify a valid installation file is parsed successfully with the matching contents, and that
-     * Update identifier is cleared.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseConfigFileWithUpdateIdentifier() throws Exception {
-        String configStr = loadResourceFile(PASSPOINT_INSTALLATION_FILE_WITH_UPDATE_ID);
-        PasspointConfiguration expectedConfig = generateConfigurationFromProfile();
-        PasspointConfiguration actualConfig =
-                ConfigParser.parsePasspointConfig(
-                        "application/x-wifi-config", configStr.getBytes());
-        // Expected configuration does not contain an update identifier
-        assertTrue(actualConfig.equals(expectedConfig));
-    }
-}
\ No newline at end of file
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java b/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
deleted file mode 100644
index 2ded849..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/OsuProviderTest.java
+++ /dev/null
@@ -1,137 +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.net.wifi.hotspot2;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.net.Uri;
-import android.net.wifi.WifiSsid;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.OsuProvider}.
- */
-@SmallTest
-public class OsuProviderTest {
-    private static final WifiSsid TEST_SSID =
-            WifiSsid.createFromByteArray("TEST SSID".getBytes(StandardCharsets.UTF_8));
-    private static final String TEST_FRIENDLY_NAME = "Friendly Name";
-    private static final Map<String, String> TEST_FRIENDLY_NAMES =
-            new HashMap<String, String>() {
-                {
-                    put("en", TEST_FRIENDLY_NAME);
-                    put("kr", TEST_FRIENDLY_NAME + 2);
-                    put("jp", TEST_FRIENDLY_NAME + 3);
-                }
-            };
-
-    private static final String TEST_SERVICE_DESCRIPTION = "Dummy Service";
-    private static final Uri TEST_SERVER_URI = Uri.parse("https://test.com");
-    private static final String TEST_NAI = "test.access.com";
-    private static final List<Integer> TEST_METHOD_LIST =
-            Arrays.asList(OsuProvider.METHOD_SOAP_XML_SPP);
-
-    /**
-     * Verify parcel write and read consistency for the given {@link OsuProvider}.
-     *
-     * @param writeInfo The {@link OsuProvider} to verify
-     * @throws Exception
-     */
-    private static void verifyParcel(OsuProvider writeInfo) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeInfo.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        OsuProvider readInfo = OsuProvider.CREATOR.createFromParcel(parcel);
-
-        assertEquals(writeInfo, readInfo);
-        assertEquals(writeInfo.hashCode(), readInfo.hashCode());
-    }
-
-    /**
-     * Verify parcel read/write for an OSU provider containing no information.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithEmptyProviderInfo() throws Exception {
-        verifyParcel(new OsuProvider((WifiSsid) null, null, null, null, null, null));
-    }
-
-    /**
-     * Verify parcel read/write for an OSU provider containing full information.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithFullProviderInfo() throws Exception {
-        verifyParcel(new OsuProvider(TEST_SSID, TEST_FRIENDLY_NAMES,
-                TEST_SERVICE_DESCRIPTION, TEST_SERVER_URI, TEST_NAI, TEST_METHOD_LIST));
-    }
-
-    /**
-     * Verify copy constructor with a null source.
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructorWithNullSource() throws Exception {
-        OsuProvider expected = new OsuProvider((WifiSsid) null, null, null, null, null, null);
-        assertEquals(expected, new OsuProvider(null));
-    }
-
-    /**
-     * Verify copy constructor with a valid source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructorWithValidSource() throws Exception {
-        OsuProvider source = new OsuProvider(TEST_SSID, TEST_FRIENDLY_NAMES,
-                TEST_SERVICE_DESCRIPTION, TEST_SERVER_URI, TEST_NAI, TEST_METHOD_LIST);
-        assertEquals(source, new OsuProvider(source));
-    }
-
-    /**
-     * Verify getter methods.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyGetters() throws Exception {
-        OsuProvider provider = new OsuProvider(TEST_SSID, TEST_FRIENDLY_NAMES,
-                TEST_SERVICE_DESCRIPTION, TEST_SERVER_URI, TEST_NAI, TEST_METHOD_LIST);
-
-        assertTrue(TEST_SSID.equals(provider.getOsuSsid()));
-        assertTrue(TEST_FRIENDLY_NAME.equals(provider.getFriendlyName()));
-        assertTrue(TEST_FRIENDLY_NAMES.equals(provider.getFriendlyNameList()));
-        assertTrue(TEST_SERVICE_DESCRIPTION.equals(provider.getServiceDescription()));
-        assertTrue(TEST_SERVER_URI.equals(provider.getServerUri()));
-        assertTrue(TEST_NAI.equals(provider.getNetworkAccessIdentifier()));
-        assertTrue(TEST_METHOD_LIST.equals(provider.getMethodList()));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java b/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
deleted file mode 100644
index 638efb9..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/PasspointConfigurationTest.java
+++ /dev/null
@@ -1,448 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi.hotspot2;
-
-import static android.net.wifi.WifiConfiguration.METERED_OVERRIDE_NONE;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.PasspointConfiguration}.
- */
-@SmallTest
-public class PasspointConfigurationTest {
-    private static final int MAX_URL_BYTES = 1023;
-    private static final int CERTIFICATE_FINGERPRINT_BYTES = 32;
-
-    /**
-     * Verify parcel write and read consistency for the given configuration.
-     *
-     * @param writeConfig The configuration to verify
-     * @throws Exception
-     */
-    private static void verifyParcel(PasspointConfiguration writeConfig) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeConfig.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        PasspointConfiguration readConfig =
-                PasspointConfiguration.CREATOR.createFromParcel(parcel);
-        assertTrue(readConfig.equals(writeConfig));
-    }
-
-    /**
-     * Verify parcel read/write for a default configuration.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithDefault() throws Exception {
-        verifyParcel(new PasspointConfiguration());
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that contained the full configuration.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithFullConfiguration() throws Exception {
-        verifyParcel(PasspointTestUtils.createConfig());
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain a list of service names.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutServiceNames() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setServiceFriendlyNames(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain HomeSP.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutHomeSP() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setHomeSp(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain Credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutCredential() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setCredential(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain Policy.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutPolicy() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setPolicy(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain subscription update.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutSubscriptionUpdate() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setSubscriptionUpdate(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain trust root certificate
-     * list.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutTrustRootCertList() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setTrustRootCertList(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify parcel read/write for a configuration that doesn't contain AAA server trusted names
-     * list.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutAaaServerTrustedNames() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setAaaServerTrustedNames(null);
-        verifyParcel(config);
-    }
-
-    /**
-     * Verify that a default/empty configuration is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateDefaultConfig() throws Exception {
-        PasspointConfiguration config = new PasspointConfiguration();
-
-        assertFalse(config.validate());
-        assertFalse(config.validateForR2());
-        assertTrue(config.isAutojoinEnabled());
-        assertTrue(config.isMacRandomizationEnabled());
-        assertTrue(config.getMeteredOverride() == METERED_OVERRIDE_NONE);
-    }
-
-    /**
-     * Verify that a configuration containing all fields is valid for R1/R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateFullConfig() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-
-        assertTrue(config.validate());
-        assertFalse(config.isOsuProvisioned());
-    }
-
-    /**
-     * Verify that a configuration containing all fields except for UpdateIdentifier is valid for
-     * R1, but invalid for R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateFullConfigWithoutUpdateIdentifier() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setUpdateIdentifier(Integer.MIN_VALUE);
-
-        assertTrue(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that a configuration without Credential is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithoutCredential() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setCredential(null);
-
-        assertFalse(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that a configuration without HomeSP is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithoutHomeSp() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setHomeSp(null);
-
-        assertFalse(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that a configuration without Policy is valid, since Policy configurations
-     * are optional for R1 and R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithoutPolicy() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setPolicy(null);
-
-        assertTrue(config.validate());
-    }
-
-    /**
-     * Verify that a configuration without subscription update is valid for R1 and invalid for R2,
-     * since subscription update configuration is only applicable for R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithoutSubscriptionUpdate() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setSubscriptionUpdate(null);
-
-        assertTrue(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that a configuration without AAA server trusted names is valid for R1 and R2,
-     * since AAA server trusted names are optional for R1 and R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithoutAaaServerTrustedNames() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setAaaServerTrustedNames(null);
-
-        assertTrue(config.validate());
-    }
-
-    /**
-     * Verify that a configuration with a trust root certificate URL exceeding the max size
-     * is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithInvalidTrustRootCertUrl() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        byte[] rawUrlBytes = new byte[MAX_URL_BYTES + 1];
-        Map<String, byte[]> trustRootCertList = new HashMap<>();
-        Arrays.fill(rawUrlBytes, (byte) 'a');
-        trustRootCertList.put(new String(rawUrlBytes, StandardCharsets.UTF_8),
-                new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        config.setTrustRootCertList(trustRootCertList);
-
-        assertFalse(config.validate());
-
-        trustRootCertList = new HashMap<>();
-        trustRootCertList.put(null, new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        config.setTrustRootCertList(trustRootCertList);
-
-        assertFalse(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that a configuration with an invalid trust root certificate fingerprint is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateConfigWithInvalidTrustRootCertFingerprint() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        Map<String, byte[]> trustRootCertList = new HashMap<>();
-        trustRootCertList.put("test.cert.com", new byte[CERTIFICATE_FINGERPRINT_BYTES + 1]);
-        config.setTrustRootCertList(trustRootCertList);
-        assertFalse(config.validate());
-
-        trustRootCertList = new HashMap<>();
-        trustRootCertList.put("test.cert.com", new byte[CERTIFICATE_FINGERPRINT_BYTES - 1]);
-        config.setTrustRootCertList(trustRootCertList);
-        assertFalse(config.validate());
-
-        trustRootCertList = new HashMap<>();
-        trustRootCertList.put("test.cert.com", null);
-        config.setTrustRootCertList(trustRootCertList);
-        assertFalse(config.validate());
-        assertFalse(config.validateForR2());
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a null source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithNullSource() throws Exception {
-        PasspointConfiguration copyConfig = new PasspointConfiguration(null);
-        PasspointConfiguration defaultConfig = new PasspointConfiguration();
-        assertTrue(copyConfig.equals(defaultConfig));
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a valid source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithValidSource() throws Exception {
-        PasspointConfiguration sourceConfig = PasspointTestUtils.createConfig();
-        PasspointConfiguration copyConfig = new PasspointConfiguration(sourceConfig);
-        assertTrue(copyConfig.equals(sourceConfig));
-    }
-
-    /**
-     * Verify that a configuration containing all fields is valid for R2.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateFullR2Config() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createR2Config();
-        assertTrue(config.validate());
-        assertTrue(config.validateForR2());
-        assertTrue(config.isOsuProvisioned());
-    }
-
-    /**
-     * Verify that the unique identifier generated is identical for two instances
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUniqueId() throws Exception {
-        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
-        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
-
-        assertEquals(config1.getUniqueId(), config2.getUniqueId());
-    }
-
-    /**
-     * Verify that the unique identifier generated is different for two instances with different
-     * HomeSp node
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUniqueIdDifferentHomeSp() throws Exception {
-        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
-
-        // Modify config2's RCOIs to a different set of values
-        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
-        HomeSp homeSp = config2.getHomeSp();
-        homeSp.setRoamingConsortiumOis(new long[] {0xaa, 0xbb});
-        config2.setHomeSp(homeSp);
-
-        assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
-    }
-
-    /**
-     * Verify that the unique identifier generated is different for two instances with different
-     * Credential node
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUniqueIdDifferentCredential() throws Exception {
-        PasspointConfiguration config1 = PasspointTestUtils.createConfig();
-
-        // Modify config2's RCOIs to a different set of values
-        PasspointConfiguration config2 = PasspointTestUtils.createConfig();
-        Credential credential = config2.getCredential();
-        credential.setRealm("realm2.example.com");
-        credential.getSimCredential().setImsi("350460*");
-        config2.setCredential(credential);
-
-        assertNotEquals(config1.getUniqueId(), config2.getUniqueId());
-    }
-
-    /**
-     * Verify that the unique identifier API generates an exception if HomeSP is not initialized.
-     *
-     * @throws Exception
-     */
-    @Test (expected = IllegalStateException.class)
-    public void validateUniqueIdExceptionWithEmptyHomeSp() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setHomeSp(null);
-        String uniqueId = config.getUniqueId();
-    }
-
-    /**
-     * Verify that the unique identifier API generates an exception if Credential is not
-     * initialized.
-     *
-     * @throws Exception
-     */
-    @Test (expected = IllegalStateException.class)
-    public void validateUniqueIdExceptionWithEmptyCredential() throws Exception {
-        PasspointConfiguration config = PasspointTestUtils.createConfig();
-        config.setCredential(null);
-        String uniqueId = config.getUniqueId();
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java b/wifi/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java
deleted file mode 100644
index 8d55acb..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/PasspointTestUtils.java
+++ /dev/null
@@ -1,172 +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.hotspot2;
-
-import android.net.wifi.EAPConstants;
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-import android.net.wifi.hotspot2.pps.Policy;
-import android.net.wifi.hotspot2.pps.UpdateParameter;
-import android.util.Base64;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class PasspointTestUtils {
-    private static final int CERTIFICATE_FINGERPRINT_BYTES = 32;
-
-    /**
-     * Utility function for creating a {@link android.net.wifi.hotspot2.pps.HomeSP}.
-     *
-     * @return {@link android.net.wifi.hotspot2.pps.HomeSP}
-     */
-    private static HomeSp createHomeSp() {
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("fqdn");
-        homeSp.setFriendlyName("friendly name");
-        homeSp.setRoamingConsortiumOis(new long[] {0x55, 0x66});
-        return homeSp;
-    }
-
-    /**
-     * Utility function for creating a {@link android.net.wifi.hotspot2.pps.Credential}.
-     *
-     * @return {@link android.net.wifi.hotspot2.pps.Credential}
-     */
-    private static Credential createCredential() {
-        Credential cred = new Credential();
-        cred.setRealm("realm");
-        cred.setUserCredential(null);
-        cred.setCertCredential(null);
-        cred.setSimCredential(new Credential.SimCredential());
-        cred.getSimCredential().setImsi("1234*");
-        cred.getSimCredential().setEapType(EAPConstants.EAP_SIM);
-        cred.setCaCertificate(null);
-        cred.setClientCertificateChain(null);
-        cred.setClientPrivateKey(null);
-        return cred;
-    }
-
-    /**
-     * Helper function for creating a {@link Policy} for testing.
-     *
-     * @return {@link Policy}
-     */
-    private static Policy createPolicy() {
-        Policy policy = new Policy();
-        policy.setMinHomeDownlinkBandwidth(123);
-        policy.setMinHomeUplinkBandwidth(345);
-        policy.setMinRoamingDownlinkBandwidth(567);
-        policy.setMinRoamingUplinkBandwidth(789);
-        policy.setMaximumBssLoadValue(12);
-        policy.setExcludedSsidList(new String[] {"ssid1", "ssid2"});
-        HashMap<Integer, String> requiredProtoPortMap = new HashMap<>();
-        requiredProtoPortMap.put(12, "23,342,123");
-        requiredProtoPortMap.put(23, "789,372,1235");
-        policy.setRequiredProtoPortMap(requiredProtoPortMap);
-
-        List<Policy.RoamingPartner> preferredRoamingPartnerList = new ArrayList<>();
-        Policy.RoamingPartner partner1 = new Policy.RoamingPartner();
-        partner1.setFqdn("partner1.com");
-        partner1.setFqdnExactMatch(true);
-        partner1.setPriority(12);
-        partner1.setCountries("us,jp");
-        Policy.RoamingPartner partner2 = new Policy.RoamingPartner();
-        partner2.setFqdn("partner2.com");
-        partner2.setFqdnExactMatch(false);
-        partner2.setPriority(42);
-        partner2.setCountries("ca,fr");
-        preferredRoamingPartnerList.add(partner1);
-        preferredRoamingPartnerList.add(partner2);
-        policy.setPreferredRoamingPartnerList(preferredRoamingPartnerList);
-
-        UpdateParameter policyUpdate = new UpdateParameter();
-        policyUpdate.setUpdateIntervalInMinutes(1712);
-        policyUpdate.setUpdateMethod(UpdateParameter.UPDATE_METHOD_OMADM);
-        policyUpdate.setRestriction(UpdateParameter.UPDATE_RESTRICTION_HOMESP);
-        policyUpdate.setServerUri("policy.update.com");
-        policyUpdate.setUsername("username");
-        policyUpdate.setBase64EncodedPassword(
-                Base64.encodeToString("password".getBytes(), Base64.DEFAULT));
-        policyUpdate.setTrustRootCertUrl("trust.cert.com");
-        policyUpdate.setTrustRootCertSha256Fingerprint(
-                new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        policy.setPolicyUpdate(policyUpdate);
-
-        return policy;
-    }
-
-    private static UpdateParameter createSubscriptionUpdate() {
-        UpdateParameter subUpdate = new UpdateParameter();
-        subUpdate.setUpdateIntervalInMinutes(9021);
-        subUpdate.setUpdateMethod(UpdateParameter.UPDATE_METHOD_SSP);
-        subUpdate.setRestriction(UpdateParameter.UPDATE_RESTRICTION_ROAMING_PARTNER);
-        subUpdate.setServerUri("subscription.update.com");
-        subUpdate.setUsername("subUsername");
-        subUpdate.setBase64EncodedPassword(
-                Base64.encodeToString("subPassword".getBytes(), Base64.DEFAULT));
-        subUpdate.setTrustRootCertUrl("subscription.trust.cert.com");
-        subUpdate.setTrustRootCertSha256Fingerprint(new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        return subUpdate;
-    }
-    /**
-     * Helper function for creating a {@link PasspointConfiguration} for testing.
-     *
-     * @return {@link PasspointConfiguration}
-     */
-    public static PasspointConfiguration createConfig() {
-        PasspointConfiguration config = new PasspointConfiguration();
-        config.setHomeSp(createHomeSp());
-        config.setAaaServerTrustedNames(
-                new String[] {"trusted.fqdn.com", "another-trusted.fqdn.com"});
-        config.setCredential(createCredential());
-        config.setPolicy(createPolicy());
-        config.setSubscriptionUpdate(createSubscriptionUpdate());
-        Map<String, byte[]> trustRootCertList = new HashMap<>();
-        trustRootCertList.put("trustRoot.cert1.com",
-                new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        trustRootCertList.put("trustRoot.cert2.com",
-                new byte[CERTIFICATE_FINGERPRINT_BYTES]);
-        config.setTrustRootCertList(trustRootCertList);
-        config.setCredentialPriority(120);
-        config.setSubscriptionCreationTimeInMillis(231200);
-        config.setSubscriptionExpirationTimeInMillis(2134232);
-        config.setSubscriptionType("Gold");
-        config.setUsageLimitUsageTimePeriodInMinutes(3600);
-        config.setUsageLimitStartTimeInMillis(124214213);
-        config.setUsageLimitDataLimit(14121);
-        config.setUsageLimitTimeLimitInMinutes(78912);
-        Map<String, String> friendlyNames = new HashMap<>();
-        friendlyNames.put("en", "ServiceName1");
-        friendlyNames.put("kr", "ServiceName2");
-        config.setServiceFriendlyNames(friendlyNames);
-        return config;
-    }
-
-    /**
-     * Helper function for creating an R2 {@link PasspointConfiguration} for testing.
-     *
-     * @return {@link PasspointConfiguration}
-     */
-    public static PasspointConfiguration createR2Config() {
-        PasspointConfiguration config = createConfig();
-        config.setUpdateIdentifier(1234);
-        return config;
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
deleted file mode 100644
index 1ac9cb8..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/omadm/PpsMoParserTest.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.omadm;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.hotspot2.PasspointConfiguration;
-import android.net.wifi.hotspot2.pps.Credential;
-import android.net.wifi.hotspot2.pps.HomeSp;
-import android.net.wifi.hotspot2.pps.Policy;
-import android.net.wifi.hotspot2.pps.UpdateParameter;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.omadm.PpsMoParser}.
- */
-@SmallTest
-public class PpsMoParserTest {
-    private static final String VALID_PPS_MO_XML_FILE = "assets/pps/PerProviderSubscription.xml";
-    private static final String PPS_MO_XML_FILE_DUPLICATE_HOMESP =
-            "assets/pps/PerProviderSubscription_DuplicateHomeSP.xml";
-    private static final String PPS_MO_XML_FILE_DUPLICATE_VALUE =
-            "assets/pps/PerProviderSubscription_DuplicateValue.xml";
-    private static final String PPS_MO_XML_FILE_MISSING_VALUE =
-            "assets/pps/PerProviderSubscription_MissingValue.xml";
-    private static final String PPS_MO_XML_FILE_MISSING_NAME =
-            "assets/pps/PerProviderSubscription_MissingName.xml";
-    private static final String PPS_MO_XML_FILE_INVALID_NODE =
-            "assets/pps/PerProviderSubscription_InvalidNode.xml";
-    private static final String PPS_MO_XML_FILE_INVALID_NAME =
-            "assets/pps/PerProviderSubscription_InvalidName.xml";
-
-    /**
-     * Read the content of the given resource file into a String.
-     *
-     * @param filename String name of the file
-     * @return String
-     * @throws IOException
-     */
-    private String loadResourceFile(String filename) throws IOException {
-        InputStream in = getClass().getClassLoader().getResourceAsStream(filename);
-        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-        StringBuilder builder = new StringBuilder();
-        String line;
-        while ((line = reader.readLine()) != null) {
-            builder.append(line).append("\n");
-        }
-
-        return builder.toString();
-    }
-
-    /**
-     * Generate a {@link PasspointConfiguration} that matches the configuration specified in the
-     * XML file {@link #VALID_PPS_MO_XML_FILE}.
-     *
-     * @return {@link PasspointConfiguration}
-     */
-    private PasspointConfiguration generateConfigurationFromPPSMOTree() throws Exception {
-        DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
-        byte[] certFingerprint = new byte[32];
-        Arrays.fill(certFingerprint, (byte) 0x1f);
-
-        PasspointConfiguration config = new PasspointConfiguration();
-        config.setUpdateIdentifier(12);
-        config.setCredentialPriority(99);
-
-        // AAA Server trust root.
-        Map<String, byte[]> trustRootCertList = new HashMap<>();
-        trustRootCertList.put("server1.trust.root.com", certFingerprint);
-        config.setTrustRootCertList(trustRootCertList);
-
-        // Subscription update.
-        UpdateParameter subscriptionUpdate = new UpdateParameter();
-        subscriptionUpdate.setUpdateIntervalInMinutes(120);
-        subscriptionUpdate.setUpdateMethod(UpdateParameter.UPDATE_METHOD_SSP);
-        subscriptionUpdate.setRestriction(UpdateParameter.UPDATE_RESTRICTION_ROAMING_PARTNER);
-        subscriptionUpdate.setServerUri("subscription.update.com");
-        subscriptionUpdate.setUsername("subscriptionUser");
-        subscriptionUpdate.setBase64EncodedPassword("subscriptionPass");
-        subscriptionUpdate.setTrustRootCertUrl("subscription.update.cert.com");
-        subscriptionUpdate.setTrustRootCertSha256Fingerprint(certFingerprint);
-        config.setSubscriptionUpdate(subscriptionUpdate);
-
-        // Subscription parameters.
-        config.setSubscriptionCreationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
-        config.setSubscriptionExpirationTimeInMillis(format.parse("2016-03-01T10:00:00Z").getTime());
-        config.setSubscriptionType("Gold");
-        config.setUsageLimitDataLimit(921890);
-        config.setUsageLimitStartTimeInMillis(format.parse("2016-12-01T10:00:00Z").getTime());
-        config.setUsageLimitTimeLimitInMinutes(120);
-        config.setUsageLimitUsageTimePeriodInMinutes(99910);
-
-        // HomeSP configuration.
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFriendlyName("Century House");
-        homeSp.setFqdn("mi6.co.uk");
-        homeSp.setRoamingConsortiumOis(new long[] {0x112233L, 0x445566L});
-        homeSp.setIconUrl("icon.test.com");
-        Map<String, Long> homeNetworkIds = new HashMap<>();
-        homeNetworkIds.put("TestSSID", 0x12345678L);
-        homeNetworkIds.put("NullHESSID", null);
-        homeSp.setHomeNetworkIds(homeNetworkIds);
-        homeSp.setMatchAllOis(new long[] {0x11223344});
-        homeSp.setMatchAnyOis(new long[] {0x55667788});
-        homeSp.setOtherHomePartners(new String[] {"other.fqdn.com"});
-        config.setHomeSp(homeSp);
-
-        config.setAaaServerTrustedNames(
-                new String[] {"trusted.fqdn.com", "another-trusted.fqdn.com"});
-
-        // Credential configuration.
-        Credential credential = new Credential();
-        credential.setCreationTimeInMillis(format.parse("2016-01-01T10:00:00Z").getTime());
-        credential.setExpirationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
-        credential.setRealm("shaken.stirred.com");
-        credential.setCheckAaaServerCertStatus(true);
-        Credential.UserCredential userCredential = new Credential.UserCredential();
-        userCredential.setUsername("james");
-        userCredential.setPassword("Ym9uZDAwNw==");
-        userCredential.setMachineManaged(true);
-        userCredential.setSoftTokenApp("TestApp");
-        userCredential.setAbleToShare(true);
-        userCredential.setEapType(21);
-        userCredential.setNonEapInnerMethod("MS-CHAP-V2");
-        credential.setUserCredential(userCredential);
-        Credential.CertificateCredential certCredential = new Credential.CertificateCredential();
-        certCredential.setCertType("x509v3");
-        certCredential.setCertSha256Fingerprint(certFingerprint);
-        credential.setCertCredential(certCredential);
-        Credential.SimCredential simCredential = new Credential.SimCredential();
-        simCredential.setImsi("imsi");
-        simCredential.setEapType(24);
-        credential.setSimCredential(simCredential);
-        config.setCredential(credential);
-
-        // Policy configuration.
-        Policy policy = new Policy();
-        List<Policy.RoamingPartner> preferredRoamingPartnerList = new ArrayList<>();
-        Policy.RoamingPartner partner1 = new Policy.RoamingPartner();
-        partner1.setFqdn("test1.fqdn.com");
-        partner1.setFqdnExactMatch(true);
-        partner1.setPriority(127);
-        partner1.setCountries("us,fr");
-        Policy.RoamingPartner partner2 = new Policy.RoamingPartner();
-        partner2.setFqdn("test2.fqdn.com");
-        partner2.setFqdnExactMatch(false);
-        partner2.setPriority(200);
-        partner2.setCountries("*");
-        preferredRoamingPartnerList.add(partner1);
-        preferredRoamingPartnerList.add(partner2);
-        policy.setPreferredRoamingPartnerList(preferredRoamingPartnerList);
-        policy.setMinHomeDownlinkBandwidth(23412);
-        policy.setMinHomeUplinkBandwidth(9823);
-        policy.setMinRoamingDownlinkBandwidth(9271);
-        policy.setMinRoamingUplinkBandwidth(2315);
-        policy.setExcludedSsidList(new String[] {"excludeSSID"});
-        Map<Integer, String> requiredProtoPortMap = new HashMap<>();
-        requiredProtoPortMap.put(12, "34,92,234");
-        policy.setRequiredProtoPortMap(requiredProtoPortMap);
-        policy.setMaximumBssLoadValue(23);
-        UpdateParameter policyUpdate = new UpdateParameter();
-        policyUpdate.setUpdateIntervalInMinutes(120);
-        policyUpdate.setUpdateMethod(UpdateParameter.UPDATE_METHOD_OMADM);
-        policyUpdate.setRestriction(UpdateParameter.UPDATE_RESTRICTION_HOMESP);
-        policyUpdate.setServerUri("policy.update.com");
-        policyUpdate.setUsername("updateUser");
-        policyUpdate.setBase64EncodedPassword("updatePass");
-        policyUpdate.setTrustRootCertUrl("update.cert.com");
-        policyUpdate.setTrustRootCertSha256Fingerprint(certFingerprint);
-        policy.setPolicyUpdate(policyUpdate);
-        config.setPolicy(policy);
-        return config;
-    }
-
-    /**
-     * Parse and verify all supported fields under PPS MO tree.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void parseValidPPSMOTree() throws Exception {
-        String ppsMoTree = loadResourceFile(VALID_PPS_MO_XML_FILE);
-        PasspointConfiguration expectedConfig = generateConfigurationFromPPSMOTree();
-        PasspointConfiguration actualConfig = PpsMoParser.parseMoText(ppsMoTree);
-        assertTrue(actualConfig.equals(expectedConfig));
-    }
-
-    @Test
-    public void parseNullPPSMOTree() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(null));
-    }
-
-    @Test
-    public void parseEmptyPPSMOTree() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(new String()));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithDuplicateHomeSP() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_DUPLICATE_HOMESP)));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithDuplicateValue() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_DUPLICATE_VALUE)));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithMissingValue() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_MISSING_VALUE)));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithMissingName() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_MISSING_NAME)));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithInvalidNode() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_INVALID_NODE)));
-    }
-
-    @Test
-    public void parsePPSMOTreeWithInvalidName() throws Exception {
-        assertEquals(null, PpsMoParser.parseMoText(
-                loadResourceFile(PPS_MO_XML_FILE_INVALID_NAME)));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java b/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java
deleted file mode 100644
index 85d0a90..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/omadm/XMLParserTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.hotspot2.omadm;
-
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.hotspot2.omadm.XMLNode;
-import android.net.wifi.hotspot2.omadm.XMLParser;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.omadm.XMLParser}.
- */
-@SmallTest
-public class XMLParserTest {
-    XMLParser mParser;
-
-    private static XMLNode createNode(XMLNode parent, String tag, String text) {
-        XMLNode node = new XMLNode(parent, tag);
-        node.addText(text);
-        if (parent != null)
-            parent.addChild(node);
-        node.close();
-        return node;
-    }
-
-    /**
-     * Setup before tests.
-     */
-    @Before
-    public void setUp() throws Exception {
-        mParser = new XMLParser();
-    }
-
-    @Test(expected = IOException.class)
-    public void parseNullXML() throws Exception {
-        mParser.parse(null);
-    }
-
-    @Test(expected = IOException.class)
-    public void parseEmptyXML() throws Exception {
-        mParser.parse(new String());
-    }
-
-    @Test(expected = SAXException.class)
-    public void parseMalformedXML() throws Exception {
-        String malformedXmlTree = "<root><child1>test1</child2></root>";
-        mParser.parse(malformedXmlTree);
-    }
-
-    @Test
-    public void parseValidXMLTree() throws Exception {
-        String xmlTree = "<root><child1>test1</child1><child2>test2</child2></root>";
-
-        // Construct the expected XML tree.
-        XMLNode expectedRoot = createNode(null, "root", "");
-        createNode(expectedRoot, "child1", "test1");
-        createNode(expectedRoot, "child2", "test2");
-
-        XMLNode actualRoot = mParser.parse(xmlTree);
-        assertTrue(actualRoot.equals(expectedRoot));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
deleted file mode 100644
index 829d8f0..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/CredentialTest.java
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi.hotspot2.pps;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.EAPConstants;
-import android.net.wifi.FakeKeys;
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.PrivateKey;
-import java.security.cert.CertificateEncodingException;
-import java.security.cert.X509Certificate;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.pps.CredentialTest}.
- */
-@SmallTest
-public class CredentialTest {
-    /**
-     * 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;
-    }
-
-    /**
-     * Helper function for generating certificate credential for testing.
-     *
-     * @return {@link Credential}
-     */
-    private static Credential createCredentialWithCertificateCredential()
-            throws NoSuchAlgorithmException, CertificateEncodingException {
-        Credential.CertificateCredential certCred = new Credential.CertificateCredential();
-        certCred.setCertType("x509v3");
-        certCred.setCertSha256Fingerprint(
-                MessageDigest.getInstance("SHA-256").digest(FakeKeys.CLIENT_CERT.getEncoded()));
-        return createCredential(null, certCred, null, new X509Certificate[] {FakeKeys.CLIENT_CERT},
-                FakeKeys.RSA_KEY1, FakeKeys.CA_CERT0, FakeKeys.CA_CERT1);
-    }
-
-    /**
-     * Helper function for generating SIM credential for testing.
-     *
-     * @return {@link Credential}
-     */
-    private static Credential createCredentialWithSimCredential() {
-        Credential.SimCredential simCred = new Credential.SimCredential();
-        simCred.setImsi("1234*");
-        simCred.setEapType(EAPConstants.EAP_SIM);
-        return createCredential(null, null, simCred, null, null, (X509Certificate[]) null);
-    }
-
-    /**
-     * Helper function for generating user credential for testing.
-     *
-     * @return {@link Credential}
-     */
-    private static Credential createCredentialWithUserCredential() {
-        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);
-    }
-
-    private static void verifyParcel(Credential writeCred) {
-        Parcel parcel = Parcel.obtain();
-        writeCred.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        Credential readCred = Credential.CREATOR.createFromParcel(parcel);
-        assertTrue(readCred.equals(writeCred));
-        assertEquals(writeCred.hashCode(), readCred.hashCode());
-    }
-
-    /**
-     * Verify parcel read/write for a default/empty credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithDefault() throws Exception {
-        verifyParcel(new Credential());
-    }
-
-    /**
-     * Verify parcel read/write for a certificate credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithCertificateCredential() throws Exception {
-        verifyParcel(createCredentialWithCertificateCredential());
-    }
-
-    /**
-     * Verify parcel read/write for a SIM credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithSimCredential() throws Exception {
-        verifyParcel(createCredentialWithSimCredential());
-    }
-
-    /**
-     * Verify parcel read/write for a user credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithUserCredential() throws Exception {
-        verifyParcel(createCredentialWithUserCredential());
-    }
-
-    /**
-     * Verify a valid user credential.
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredential() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-
-        // For R1 validation
-        assertTrue(cred.validate());
-
-        // For R2 validation
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify that a user credential without CA Certificate is valid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithoutCaCert() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.setCaCertificate(null);
-
-        // Accept a configuration with no CA certificate, the system will use the default cert store
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify that a user credential with EAP type other than EAP-TTLS is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithEapTls() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.getUserCredential().setEapType(EAPConstants.EAP_TLS);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-
-    /**
-     * Verify that a user credential without realm is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithoutRealm() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.setRealm(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a user credential without username is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithoutUsername() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.getUserCredential().setUsername(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a user credential without password is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithoutPassword() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.getUserCredential().setPassword(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a user credential without auth methoh (non-EAP inner method) is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUserCredentialWithoutAuthMethod() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        cred.getUserCredential().setNonEapInnerMethod(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify a certificate credential. CA Certificate, client certificate chain,
-     * and client private key are all required.  Also the digest for client
-     * certificate must match the fingerprint specified in the certificate credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCertCredential() throws Exception {
-        Credential cred = createCredentialWithCertificateCredential();
-
-        // For R1 validation
-        assertTrue(cred.validate());
-
-        // For R2 validation
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify that an certificate credential without CA Certificate is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCertCredentialWithoutCaCert() throws Exception {
-        Credential cred = createCredentialWithCertificateCredential();
-        cred.setCaCertificate(null);
-
-        // Accept a configuration with no CA certificate, the system will use the default cert store
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify that a certificate credential without client certificate chain is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCertCredentialWithoutClientCertChain() throws Exception {
-        Credential cred = createCredentialWithCertificateCredential();
-        cred.setClientCertificateChain(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a certificate credential without client private key is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCertCredentialWithoutClientPrivateKey() throws Exception {
-        Credential cred = createCredentialWithCertificateCredential();
-        cred.setClientPrivateKey(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a certificate credential with mismatch client certificate fingerprint
-     * is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCertCredentialWithMismatchFingerprint() throws Exception {
-        Credential cred = createCredentialWithCertificateCredential();
-        cred.getCertCredential().setCertSha256Fingerprint(new byte[32]);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify a SIM credential using EAP-SIM.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithEapSim() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-
-        // For R1 validation
-        assertTrue(cred.validate());
-
-        // For R2 validation
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify a SIM credential using EAP-AKA.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithEapAka() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-        cred.getSimCredential().setEapType(EAPConstants.EAP_AKA);
-
-        // For R1 validation
-        assertTrue(cred.validate());
-
-        // For R2 validation
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify a SIM credential using EAP-AKA-PRIME.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithEapAkaPrime() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-        cred.getSimCredential().setEapType(EAPConstants.EAP_AKA_PRIME);
-
-        // For R1 validation
-        assertTrue(cred.validate());
-
-        // For R2 validation
-        assertTrue(cred.validate());
-    }
-
-    /**
-     * Verify that a SIM credential without IMSI is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithoutIMSI() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-        cred.getSimCredential().setImsi(null);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a SIM credential with an invalid IMSI is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithInvalidIMSI() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-        cred.getSimCredential().setImsi("dummy");
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a SIM credential with invalid EAP type is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateSimCredentialWithEapTls() throws Exception {
-        Credential cred = createCredentialWithSimCredential();
-        cred.getSimCredential().setEapType(EAPConstants.EAP_TLS);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that a credential contained both a user and a SIM credential is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCredentialWithUserAndSimCredential() throws Exception {
-        Credential cred = createCredentialWithUserCredential();
-        // Setup SIM credential.
-        Credential.SimCredential simCredential = new Credential.SimCredential();
-        simCredential.setImsi("1234*");
-        simCredential.setEapType(EAPConstants.EAP_SIM);
-        cred.setSimCredential(simCredential);
-
-        // For R1 validation
-        assertFalse(cred.validate());
-
-        // For R2 validation
-        assertFalse(cred.validate());
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a null source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithNullSource() throws Exception {
-        Credential copyCred = new Credential(null);
-        Credential defaultCred = new Credential();
-        assertTrue(copyCred.equals(defaultCred));
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a source with user credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithSourceWithUserCred() throws Exception {
-        Credential sourceCred = createCredentialWithUserCredential();
-        Credential copyCred = new Credential(sourceCred);
-        assertTrue(copyCred.equals(sourceCred));
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a source with certificate credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithSourceWithCertCred() throws Exception {
-        Credential sourceCred = createCredentialWithCertificateCredential();
-        Credential copyCred = new Credential(sourceCred);
-        assertTrue(copyCred.equals(sourceCred));
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a source with SIM credential.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorWithSourceWithSimCred() throws Exception {
-        Credential sourceCred = createCredentialWithSimCredential();
-        Credential copyCred = new Credential(sourceCred);
-        assertTrue(copyCred.equals(sourceCred));
-    }
-
-    /**
-     * Verify that two certificates are identical.
-     */
-    @Test
-    public void validateTwoCertificateIdentical() {
-        assertTrue(Credential.isX509CertificateEquals(FakeKeys.CA_CERT1, FakeKeys.CA_CERT1));
-    }
-
-    /**
-     * Verify that two certificates are different.
-     */
-    @Test
-    public void validateTwoCertificateDifferent() {
-        assertFalse(Credential.isX509CertificateEquals(FakeKeys.CA_CERT0, FakeKeys.CA_CERT1));
-    }
-
-    /**
-     * Verify that unique identifiers are the same for objects with the same credentials
-     */
-    @Test
-    public void testUniqueIdSameCredentialTypes() throws Exception {
-        assertEquals(createCredentialWithSimCredential().getUniqueId(),
-                createCredentialWithSimCredential().getUniqueId());
-        assertEquals(createCredentialWithCertificateCredential().getUniqueId(),
-                createCredentialWithCertificateCredential().getUniqueId());
-        assertEquals(createCredentialWithUserCredential().getUniqueId(),
-                createCredentialWithUserCredential().getUniqueId());
-    }
-
-    /**
-     * Verify that unique identifiers are different for each credential
-     */
-    @Test
-    public void testUniqueIdDifferentForDifferentCredentialTypes() throws Exception {
-        Credential simCred = createCredentialWithSimCredential();
-        Credential certCred = createCredentialWithCertificateCredential();
-        Credential userCred = createCredentialWithUserCredential();
-
-        assertNotEquals(simCred.getUniqueId(), userCred.getUniqueId());
-        assertNotEquals(simCred.getUniqueId(), certCred.getUniqueId());
-        assertNotEquals(certCred.getUniqueId(), userCred.getUniqueId());
-    }
-
-    /**
-     * Verify that unique identifiers are different for a credential with different values
-     */
-    @Test
-    public void testUniqueIdDifferentForSimCredentialsWithDifferentValues() throws Exception {
-        Credential simCred1 = createCredentialWithSimCredential();
-        Credential simCred2 = createCredentialWithSimCredential();
-        simCred2.getSimCredential().setImsi("567890*");
-
-        assertNotEquals(simCred1.getUniqueId(), simCred2.getUniqueId());
-    }
-
-    /**
-     * Verify that unique identifiers are different for a credential with different values
-     */
-    @Test
-    public void testUniqueIdDifferentForUserCredentialsWithDifferentValues() throws Exception {
-        Credential userCred1 = createCredentialWithUserCredential();
-        Credential userCred2 = createCredentialWithUserCredential();
-        userCred2.getUserCredential().setUsername("anotheruser");
-
-        assertNotEquals(userCred1.getUniqueId(), userCred2.getUniqueId());
-    }
-
-    /**
-     * Verify that unique identifiers are different for a credential with different values
-     */
-    @Test
-    public void testUniqueIdDifferentForCertCredentialsWithDifferentValues() throws Exception {
-        Credential certCred1 = createCredentialWithCertificateCredential();
-        Credential certCred2 = createCredentialWithCertificateCredential();
-        certCred2.getCertCredential().setCertSha256Fingerprint(
-                MessageDigest.getInstance("SHA-256").digest(FakeKeys.CA_CERT0.getEncoded()));
-
-        assertNotEquals(certCred1.getUniqueId(), certCred2.getUniqueId());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
deleted file mode 100644
index 93d471a..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/HomeSpTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License
- */
-
-package android.net.wifi.hotspot2.pps;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.pps.HomeSp}.
- */
-@SmallTest
-public class HomeSpTest {
-
-    /**
-     * Helper function for creating a map of home network IDs for testing.
-     *
-     * @return Map of home network IDs
-     */
-    private static Map<String, Long> createHomeNetworkIds() {
-        Map<String, Long> homeNetworkIds = new HashMap<>();
-        homeNetworkIds.put("ssid", 0x1234L);
-        homeNetworkIds.put("nullhessid", null);
-        return homeNetworkIds;
-    }
-
-    /**
-     * Helper function for creating a HomeSp for testing.
-     *
-     * @param homeNetworkIds The map of home network IDs associated with HomeSp
-     * @return {@link HomeSp}
-     */
-    private static HomeSp createHomeSp(Map<String, Long> homeNetworkIds) {
-        HomeSp homeSp = new HomeSp();
-        homeSp.setFqdn("fqdn");
-        homeSp.setFriendlyName("friendly name");
-        homeSp.setIconUrl("icon.url");
-        homeSp.setHomeNetworkIds(homeNetworkIds);
-        homeSp.setMatchAllOis(new long[] {0x11L, 0x22L});
-        homeSp.setMatchAnyOis(new long[] {0x33L, 0x44L});
-        homeSp.setOtherHomePartners(new String[] {"partner1", "partner2"});
-        homeSp.setRoamingConsortiumOis(new long[] {0x55, 0x66});
-        return homeSp;
-    }
-
-    /**
-     * Helper function for creating a HomeSp with home network IDs for testing.
-     *
-     * @return {@link HomeSp}
-     */
-    private static HomeSp createHomeSpWithHomeNetworkIds() {
-        return createHomeSp(createHomeNetworkIds());
-    }
-
-    /**
-     * Helper function for creating a HomeSp without home network IDs for testing.
-     *
-     * @return {@link HomeSp}
-     */
-    private static HomeSp createHomeSpWithoutHomeNetworkIds() {
-        return createHomeSp(null);
-    }
-
-    /**
-     * Helper function for verifying HomeSp after parcel write then read.
-     * @param writeHomeSp
-     * @throws Exception
-     */
-    private static void verifyParcel(HomeSp writeHomeSp) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        writeHomeSp.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        HomeSp readHomeSp = HomeSp.CREATOR.createFromParcel(parcel);
-        assertTrue(readHomeSp.equals(writeHomeSp));
-    }
-
-    /**
-     * Verify parcel read/write for an empty HomeSp.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithEmptyHomeSp() throws Exception {
-        verifyParcel(new HomeSp());
-    }
-
-    /**
-     * Verify parcel read/write for a HomeSp containing Home Network IDs.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithHomeNetworkIds() throws Exception {
-        verifyParcel(createHomeSpWithHomeNetworkIds());
-    }
-
-    /**
-     * Verify parcel read/write for a HomeSp without Home Network IDs.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutHomeNetworkIds() throws Exception {
-        verifyParcel(createHomeSpWithoutHomeNetworkIds());
-    }
-
-    /**
-     * Verify that a HomeSp is valid when both FQDN and Friendly Name
-     * are provided.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateValidHomeSp() throws Exception {
-        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
-        assertTrue(homeSp.validate());
-    }
-
-    /**
-     * Verify that a HomeSp is not valid when FQDN is not provided
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateHomeSpWithoutFqdn() throws Exception {
-        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
-        homeSp.setFqdn(null);
-        assertFalse(homeSp.validate());
-    }
-
-    /**
-     * Verify that a HomeSp is not valid when Friendly Name is not provided
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateHomeSpWithoutFriendlyName() throws Exception {
-        HomeSp homeSp = createHomeSpWithHomeNetworkIds();
-        homeSp.setFriendlyName(null);
-        assertFalse(homeSp.validate());
-    }
-
-    /**
-     * Verify that a HomeSp is valid when the optional Home Network IDs are
-     * not provided.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateHomeSpWithoutHomeNetworkIds() throws Exception {
-        HomeSp homeSp = createHomeSpWithoutHomeNetworkIds();
-        assertTrue(homeSp.validate());
-    }
-
-    /**
-     * Verify that a HomeSp is invalid when the optional Home Network IDs
-     * contained an invalid SSID (exceeding maximum number of bytes).
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateHomeSpWithInvalidHomeNetworkIds() throws Exception {
-        HomeSp homeSp = createHomeSpWithoutHomeNetworkIds();
-        // HomeNetworkID with SSID exceeding the maximum length.
-        Map<String, Long> homeNetworkIds = new HashMap<>();
-        byte[] rawSsidBytes = new byte[33];
-        Arrays.fill(rawSsidBytes, (byte) 'a');
-        homeNetworkIds.put(new String(rawSsidBytes, StandardCharsets.UTF_8), 0x1234L);
-        homeSp.setHomeNetworkIds(homeNetworkIds);
-        assertFalse(homeSp.validate());
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a null source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorFromNullSource() throws Exception {
-        HomeSp copySp = new HomeSp(null);
-        HomeSp defaultSp = new HomeSp();
-        assertTrue(copySp.equals(defaultSp));
-    }
-
-    /**
-     * Verify that copy constructor works when pass in a valid source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateCopyConstructorFromValidSource() throws Exception {
-        HomeSp sourceSp = createHomeSpWithHomeNetworkIds();
-        HomeSp copySp = new HomeSp(sourceSp);
-        assertTrue(copySp.equals(sourceSp));
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java
deleted file mode 100644
index 980b199..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/PolicyTest.java
+++ /dev/null
@@ -1,312 +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.net.wifi.hotspot2.pps;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-import android.util.Base64;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.pps.Policy}.
- */
-@SmallTest
-public class PolicyTest {
-    private static final int MAX_NUMBER_OF_EXCLUDED_SSIDS = 128;
-    private static final int MAX_SSID_BYTES = 32;
-    private static final int MAX_PORT_STRING_BYTES = 64;
-
-    /**
-     * Helper function for creating a {@link Policy} for testing.
-     *
-     * @return {@link Policy}
-     */
-    private static Policy createPolicy() {
-        Policy policy = new Policy();
-        policy.setMinHomeDownlinkBandwidth(123);
-        policy.setMinHomeUplinkBandwidth(345);
-        policy.setMinRoamingDownlinkBandwidth(567);
-        policy.setMinRoamingUplinkBandwidth(789);
-        policy.setExcludedSsidList(new String[] {"ssid1", "ssid2"});
-        Map<Integer, String> requiredProtoPortMap = new HashMap<>();
-        requiredProtoPortMap.put(12, "23,342,123");
-        requiredProtoPortMap.put(23, "789,372,1235");
-        policy.setRequiredProtoPortMap(requiredProtoPortMap);
-        policy.setMaximumBssLoadValue(12);
-
-        List<Policy.RoamingPartner> preferredRoamingPartnerList = new ArrayList<>();
-        Policy.RoamingPartner partner1 = new Policy.RoamingPartner();
-        partner1.setFqdn("partner1.com");
-        partner1.setFqdnExactMatch(true);
-        partner1.setPriority(12);
-        partner1.setCountries("us,jp");
-        Policy.RoamingPartner partner2 = new Policy.RoamingPartner();
-        partner2.setFqdn("partner2.com");
-        partner2.setFqdnExactMatch(false);
-        partner2.setPriority(42);
-        partner2.setCountries("ca,fr");
-        preferredRoamingPartnerList.add(partner1);
-        preferredRoamingPartnerList.add(partner2);
-        policy.setPreferredRoamingPartnerList(preferredRoamingPartnerList);
-
-        UpdateParameter policyUpdate = new UpdateParameter();
-        policyUpdate.setUpdateIntervalInMinutes(1712);
-        policyUpdate.setUpdateMethod(UpdateParameter.UPDATE_METHOD_OMADM);
-        policyUpdate.setRestriction(UpdateParameter.UPDATE_RESTRICTION_HOMESP);
-        policyUpdate.setServerUri("policy.update.com");
-        policyUpdate.setUsername("username");
-        policyUpdate.setBase64EncodedPassword(
-                Base64.encodeToString("password".getBytes(), Base64.DEFAULT));
-        policyUpdate.setTrustRootCertUrl("trust.cert.com");
-        policyUpdate.setTrustRootCertSha256Fingerprint(new byte[32]);
-        policy.setPolicyUpdate(policyUpdate);
-
-        return policy;
-    }
-
-    /**
-     * Helper function for verifying Policy after parcel write then read.
-     * @param policyToWrite
-     * @throws Exception
-     */
-    private static void verifyParcel(Policy policyToWrite) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        policyToWrite.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        Policy policyFromRead = Policy.CREATOR.createFromParcel(parcel);
-        assertTrue(policyFromRead.equals(policyToWrite));
-    }
-
-    /**
-     * Verify parcel read/write for an empty Policy.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithEmptyPolicy() throws Exception {
-        verifyParcel(new Policy());
-    }
-
-    /**
-     * Verify parcel read/write for a Policy with all fields set.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithFullPolicy() throws Exception {
-        verifyParcel(createPolicy());
-    }
-
-    /**
-     * Verify parcel read/write for a Policy without protocol port map.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutProtoPortMap() throws Exception {
-        Policy policy = createPolicy();
-        policy.setRequiredProtoPortMap(null);
-        verifyParcel(policy);
-    }
-
-    /**
-     * Verify parcel read/write for a Policy without preferred roaming partner list.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutPreferredRoamingPartnerList() throws Exception {
-        Policy policy = createPolicy();
-        policy.setPreferredRoamingPartnerList(null);
-        verifyParcel(policy);
-    }
-
-    /**
-     * Verify parcel read/write for a Policy without policy update parameters.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithoutPolicyUpdate() throws Exception {
-        Policy policy = createPolicy();
-        policy.setPolicyUpdate(null);
-        verifyParcel(policy);
-    }
-
-    /**
-     * Verify that policy created using copy constructor with null source should be the same
-     * as the policy created using default constructor.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructionWithNullSource() throws Exception {
-        Policy copyPolicy = new Policy(null);
-        Policy defaultPolicy = new Policy();
-        assertTrue(defaultPolicy.equals(copyPolicy));
-    }
-
-    /**
-     * Verify that policy created using copy constructor with a valid source should be the
-     * same as the source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructionWithFullPolicy() throws Exception {
-        Policy policy = createPolicy();
-        Policy copyPolicy = new Policy(policy);
-        assertTrue(policy.equals(copyPolicy));
-    }
-
-    /**
-     * Verify that a default policy (with no informatio) is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithDefault() throws Exception {
-        Policy policy = new Policy();
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy created using {@link #createPolicy} is valid, since all fields are
-     * filled in with valid values.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithFullPolicy() throws Exception {
-        assertTrue(createPolicy().validate());
-    }
-
-    /**
-     * Verify that a policy without policy update parameters is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithoutPolicyUpdate() throws Exception {
-        Policy policy = createPolicy();
-        policy.setPolicyUpdate(null);
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with invalid policy update parameters is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithInvalidPolicyUpdate() throws Exception {
-        Policy policy = createPolicy();
-        policy.setPolicyUpdate(new UpdateParameter());
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with a preferred roaming partner with FQDN not specified is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithRoamingPartnerWithoutFQDN() throws Exception {
-        Policy policy = createPolicy();
-        Policy.RoamingPartner partner = new Policy.RoamingPartner();
-        partner.setFqdnExactMatch(true);
-        partner.setPriority(12);
-        partner.setCountries("us,jp");
-        policy.getPreferredRoamingPartnerList().add(partner);
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with a preferred roaming partner with countries not specified is
-     * invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithRoamingPartnerWithoutCountries() throws Exception {
-        Policy policy = createPolicy();
-        Policy.RoamingPartner partner = new Policy.RoamingPartner();
-        partner.setFqdn("test.com");
-        partner.setFqdnExactMatch(true);
-        partner.setPriority(12);
-        policy.getPreferredRoamingPartnerList().add(partner);
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with a proto-port tuple that contains an invalid port string is
-     * invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithInvalidPortStringInProtoPortMap() throws Exception {
-        Policy policy = createPolicy();
-        byte[] rawPortBytes = new byte[MAX_PORT_STRING_BYTES + 1];
-        policy.getRequiredProtoPortMap().put(
-                324, new String(rawPortBytes, StandardCharsets.UTF_8));
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with number of excluded SSIDs exceeded the max is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithSsidExclusionListSizeExceededMax() throws Exception {
-        Policy policy = createPolicy();
-        String[] excludedSsidList = new String[MAX_NUMBER_OF_EXCLUDED_SSIDS + 1];
-        Arrays.fill(excludedSsidList, "ssid");
-        policy.setExcludedSsidList(excludedSsidList);
-        assertFalse(policy.validate());
-    }
-
-    /**
-     * Verify that a policy with an invalid SSID in the excluded SSID list is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithInvalidSsid() throws Exception {
-        Policy policy = createPolicy();
-        byte[] rawSsidBytes = new byte[MAX_SSID_BYTES + 1];
-        Arrays.fill(rawSsidBytes, (byte) 'a');
-        String[] excludedSsidList = new String[] {
-                new String(rawSsidBytes, StandardCharsets.UTF_8)};
-        policy.setExcludedSsidList(excludedSsidList);
-        assertFalse(policy.validate());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java b/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java
deleted file mode 100644
index 07cb151..0000000
--- a/wifi/tests/src/android/net/wifi/hotspot2/pps/UpdateParameterTest.java
+++ /dev/null
@@ -1,349 +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.net.wifi.hotspot2.pps;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.net.wifi.FakeKeys;
-import android.os.Parcel;
-import android.util.Base64;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-
-/**
- * Unit tests for {@link android.net.wifi.hotspot2.pps.UpdateParameter}.
- */
-@SmallTest
-public class UpdateParameterTest {
-    private static final int MAX_URI_BYTES = 1023;
-    private static final int MAX_URL_BYTES = 1023;
-    private static final int MAX_USERNAME_BYTES = 63;
-    private static final int MAX_PASSWORD_BYTES = 255;
-    private static final int CERTIFICATE_SHA256_BYTES = 32;
-
-    /**
-     * Helper function for creating a {@link UpdateParameter} for testing.
-     *
-     * @return {@link UpdateParameter}
-     */
-    private static UpdateParameter createUpdateParameter() {
-        UpdateParameter updateParam = new UpdateParameter();
-        updateParam.setUpdateIntervalInMinutes(1712);
-        updateParam.setUpdateMethod(UpdateParameter.UPDATE_METHOD_OMADM);
-        updateParam.setRestriction(UpdateParameter.UPDATE_RESTRICTION_HOMESP);
-        updateParam.setServerUri("server.pdate.com");
-        updateParam.setUsername("username");
-        updateParam.setBase64EncodedPassword(
-                Base64.encodeToString("password".getBytes(), Base64.DEFAULT));
-        updateParam.setTrustRootCertUrl("trust.cert.com");
-        updateParam.setTrustRootCertSha256Fingerprint(new byte[32]);
-        updateParam.setCaCertificate(FakeKeys.CA_CERT0);
-        return updateParam;
-    }
-
-    /**
-     * Helper function for verifying UpdateParameter after parcel write then read.
-     * @param paramToWrite The UpdateParamter to verify
-     * @throws Exception
-     */
-    private static void verifyParcel(UpdateParameter paramToWrite) throws Exception {
-        Parcel parcel = Parcel.obtain();
-        paramToWrite.writeToParcel(parcel, 0);
-
-        parcel.setDataPosition(0);    // Rewind data position back to the beginning for read.
-        UpdateParameter paramFromRead = UpdateParameter.CREATOR.createFromParcel(parcel);
-        assertTrue(paramFromRead.equals(paramToWrite));
-        assertEquals(paramToWrite.hashCode(), paramFromRead.hashCode());
-    }
-
-    /**
-     * Verify parcel read/write for an empty UpdateParameter.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithEmptyUpdateParameter() throws Exception {
-        verifyParcel(new UpdateParameter());
-    }
-
-    /**
-     * Verify parcel read/write for a UpdateParameter with all fields set.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyParcelWithFullUpdateParameter() throws Exception {
-        verifyParcel(createUpdateParameter());
-    }
-
-    /**
-     * Verify that UpdateParameter created using copy constructor with null source should be the
-     * same as the UpdateParameter created using default constructor.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructionWithNullSource() throws Exception {
-        UpdateParameter copyParam = new UpdateParameter(null);
-        UpdateParameter defaultParam = new UpdateParameter();
-        assertTrue(defaultParam.equals(copyParam));
-    }
-
-    /**
-     * Verify that UpdateParameter created using copy constructor with a valid source should be the
-     * same as the source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void verifyCopyConstructionWithFullUpdateParameter() throws Exception {
-        UpdateParameter origParam = createUpdateParameter();
-        UpdateParameter copyParam = new UpdateParameter(origParam);
-        assertTrue(origParam.equals(copyParam));
-    }
-
-    /**
-     * Verify that a default UpdateParameter is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithDefault() throws Exception {
-        UpdateParameter updateParam = new UpdateParameter();
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter created using {@link #createUpdateParameter} is valid,
-     * since all fields are filled in with valid values.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithFullPolicy() throws Exception {
-        assertTrue(createUpdateParameter().validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an unknown update method is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithUnknowMethod() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setUpdateMethod("adsfasd");
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an unknown restriction is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithUnknowRestriction() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setRestriction("adsfasd");
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an username exceeding maximum size is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithUsernameExceedingMaxSize() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        byte[] rawUsernameBytes = new byte[MAX_USERNAME_BYTES + 1];
-        Arrays.fill(rawUsernameBytes, (byte) 'a');
-        updateParam.setUsername(new String(rawUsernameBytes, StandardCharsets.UTF_8));
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an empty username is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithEmptyUsername() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setUsername(null);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with a password exceeding maximum size is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithPasswordExceedingMaxSize() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        byte[] rawPasswordBytes = new byte[MAX_PASSWORD_BYTES + 1];
-        Arrays.fill(rawPasswordBytes, (byte) 'a');
-        updateParam.setBase64EncodedPassword(new String(rawPasswordBytes, StandardCharsets.UTF_8));
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an empty password is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithEmptyPassword() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setBase64EncodedPassword(null);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with a Base64 encoded password that contained invalid padding
-     * is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithPasswordContainedInvalidPadding() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setBase64EncodedPassword(updateParam.getBase64EncodedPassword() + "=");
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter without trust root certificate URL is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithoutTrustRootCertUrl() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setTrustRootCertUrl(null);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with invalid trust root certificate URL is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithInvalidTrustRootCertUrl() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        byte[] rawUrlBytes = new byte[MAX_URL_BYTES + 1];
-        Arrays.fill(rawUrlBytes, (byte) 'a');
-        updateParam.setTrustRootCertUrl(new String(rawUrlBytes, StandardCharsets.UTF_8));
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter without trust root certificate SHA-256 fingerprint is
-     * invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithouttrustRootCertSha256Fingerprint() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setTrustRootCertSha256Fingerprint(null);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an incorrect size trust root certificate SHA-256
-     * fingerprint is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithInvalidtrustRootCertSha256Fingerprint() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setTrustRootCertSha256Fingerprint(new byte[CERTIFICATE_SHA256_BYTES + 1]);
-        assertFalse(updateParam.validate());
-
-        updateParam.setTrustRootCertSha256Fingerprint(new byte[CERTIFICATE_SHA256_BYTES - 1]);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter without server URI is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithoutServerUri() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setServerUri(null);
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with an invalid server URI is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validatePolicyWithInvalidServerUri() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        byte[] rawUriBytes = new byte[MAX_URI_BYTES + 1];
-        Arrays.fill(rawUriBytes, (byte) 'a');
-        updateParam.setServerUri(new String(rawUriBytes, StandardCharsets.UTF_8));
-        assertFalse(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with update interval set to "never" will not perform
-     * validation on other parameters, since update is not applicable in this case.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithNoServerCheck() throws Exception {
-        UpdateParameter updateParam = new UpdateParameter();
-        updateParam.setUpdateIntervalInMinutes(UpdateParameter.UPDATE_CHECK_INTERVAL_NEVER);
-        updateParam.setUsername(null);
-        updateParam.setBase64EncodedPassword(null);
-        updateParam.setUpdateMethod(null);
-        updateParam.setRestriction(null);
-        updateParam.setServerUri(null);
-        updateParam.setTrustRootCertUrl(null);
-        updateParam.setTrustRootCertSha256Fingerprint(null);
-        assertTrue(updateParam.validate());
-    }
-
-    /**
-     * Verify that an UpdateParameter with unset update interval is invalid.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void validateUpdateParameterWithoutUpdateInterval() throws Exception {
-        UpdateParameter updateParam = createUpdateParameter();
-        updateParam.setUpdateIntervalInMinutes(Long.MIN_VALUE);
-        assertFalse(updateParam.validate());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java
deleted file mode 100644
index 6199325..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pConfigTest.java
+++ /dev/null
@@ -1,173 +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.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pConfig}
- */
-@SmallTest
-public class WifiP2pConfigTest {
-
-    private static final String DEVICE_ADDRESS = "aa:bb:cc:dd:ee:ff";
-    /**
-     * Check network name setter
-     */
-    @Test
-    public void testBuilderInvalidNetworkName() throws Exception {
-        WifiP2pConfig.Builder b = new WifiP2pConfig.Builder();
-
-        // sunny case
-        try {
-            b.setNetworkName("DIRECT-ab-Hello");
-        } catch (IllegalArgumentException e) {
-            fail("Unexpected IllegalArgumentException");
-        }
-
-        // sunny case, no trailing string
-        try {
-            b.setNetworkName("DIRECT-WR");
-        } catch (IllegalArgumentException e) {
-            fail("Unexpected IllegalArgumentException");
-        }
-
-        // sunny case with maximum bytes for the network name
-        try {
-            b.setNetworkName("DIRECT-abcdefghijklmnopqrstuvwxy");
-        } catch (IllegalArgumentException e) {
-            fail("Unexpected IllegalArgumentException");
-        }
-
-        // less than 9 characters.
-        try {
-            b.setNetworkName("DIRECT-z");
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) { }
-
-        // not starts with DIRECT-xy.
-        try {
-            b.setNetworkName("ABCDEFGHIJK");
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) { }
-
-        // not starts with uppercase DIRECT-xy
-        try {
-            b.setNetworkName("direct-ab");
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) { }
-
-        // x and y are not selected from upper case letters, lower case letters or
-        // numbers.
-        try {
-            b.setNetworkName("direct-a?");
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) { }
-
-        // over maximum bytes
-        try {
-            b.setNetworkName("DIRECT-abcdefghijklmnopqrstuvwxyz");
-            fail("expected IllegalArgumentException");
-        } catch (IllegalArgumentException e) { }
-    }
-
-    /**
-     * Check passphrase setter
-     */
-    @Test
-    public void testBuilderInvalidPassphrase() throws Exception {
-        WifiP2pConfig.Builder b = new WifiP2pConfig.Builder();
-
-        // sunny case
-        try {
-            b.setPassphrase("abcd1234");
-        } catch (IllegalArgumentException e) {
-            fail("Unexpected IllegalArgumentException");
-        }
-
-        // null string.
-        try {
-            b.setPassphrase(null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            // expected exception.
-        }
-
-        // less than 8 characters.
-        try {
-            b.setPassphrase("12abcde");
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            // expected exception.
-        }
-
-        // more than 63 characters.
-        try {
-            b.setPassphrase(
-                    "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890+/");
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException e) {
-            // expected exception.
-        }
-    }
-
-    @Test
-    /*
-     * Verify WifiP2pConfig basic operations
-     */
-    public void testWifiP2pConfig() throws Exception {
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = DEVICE_ADDRESS;
-
-        WifiP2pConfig copiedConfig = new WifiP2pConfig(config);
-        // no equals operator, use toString for comparison.
-        assertEquals(config.toString(), copiedConfig.toString());
-
-        Parcel parcelW = Parcel.obtain();
-        config.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pConfig configFromParcel = WifiP2pConfig.CREATOR.createFromParcel(parcelR);
-
-        // no equals operator, use toString for comparison.
-        assertEquals(config.toString(), configFromParcel.toString());
-
-    }
-
-    @Test
-    /*
-     * Verify WifiP2pConfig invalidate API
-     */
-    public void testInvalidate() throws Exception {
-        WifiP2pConfig config = new WifiP2pConfig();
-        config.deviceAddress = DEVICE_ADDRESS;
-        config.invalidate();
-        assertEquals("", config.deviceAddress);
-    }
-
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceListTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceListTest.java
deleted file mode 100644
index 22936bd..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceListTest.java
+++ /dev/null
@@ -1,75 +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.p2p;
-
-import static org.junit.Assert.assertEquals;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pDeviceList}
- */
-@SmallTest
-public class WifiP2pDeviceListTest {
-
-    private static final WifiP2pDevice TEST_DEVICE_1 = new WifiP2pDevice("aa:bb:cc:dd:ee:ff");
-    private static final WifiP2pDevice TEST_DEVICE_2 = new WifiP2pDevice("aa:bb:cc:dd:ee:f1");
-    private static final WifiP2pDevice TEST_DEVICE_3 = new WifiP2pDevice("11:22:33:44:55:66");
-    private static final WifiP2pDevice TEST_DEVICE_4 = new WifiP2pDevice("a0:b0:c0:d0:e0:f0");
-
-    /**
-     * Verify basic operations.
-     */
-    @Test
-    public void testListOperations() throws Exception {
-        WifiP2pDeviceList list = new WifiP2pDeviceList();
-        list.update(TEST_DEVICE_1);
-        list.update(TEST_DEVICE_2);
-        list.update(TEST_DEVICE_3);
-        assertEquals(3, list.getDeviceList().size());
-
-        assertEquals(TEST_DEVICE_1, list.get(TEST_DEVICE_1.deviceAddress));
-        assertEquals(null, list.get(TEST_DEVICE_4.deviceAddress));
-
-        list.remove(TEST_DEVICE_2.deviceAddress);
-        assertEquals(null, list.get(TEST_DEVICE_2.deviceAddress));
-
-        list.remove(TEST_DEVICE_3);
-        assertEquals(null, list.get(TEST_DEVICE_3.deviceAddress));
-
-        assertEquals(1, list.getDeviceList().size());
-
-        list.clear();
-        assertEquals(0, list.getDeviceList().size());
-
-        Parcel parcelW = Parcel.obtain();
-        list.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pDeviceList fromParcel = WifiP2pDeviceList.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(list.toString(), fromParcel.toString());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java
deleted file mode 100644
index 6edc287..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pDeviceTest.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pDevice}
- */
-@SmallTest
-public class WifiP2pDeviceTest {
-
-    /**
-     * Compare two p2p devices.
-     *
-     * @param devA is the first device to be compared
-     * @param devB is the second device to be compared
-     */
-    private void compareWifiP2pDevices(WifiP2pDevice devA, WifiP2pDevice devB) {
-        assertEquals(devA.deviceName, devB.deviceName);
-        assertEquals(devA.deviceAddress, devB.deviceAddress);
-        assertEquals(devA.primaryDeviceType, devB.primaryDeviceType);
-        assertEquals(devA.secondaryDeviceType, devB.secondaryDeviceType);
-        assertEquals(devA.wpsConfigMethodsSupported, devB.wpsConfigMethodsSupported);
-        assertEquals(devA.deviceCapability, devB.deviceCapability);
-        assertEquals(devA.groupCapability, devB.groupCapability);
-        assertEquals(devA.status, devB.status);
-        if (devA.wfdInfo != null) {
-            assertEquals(devA.wfdInfo.isEnabled(), devB.wfdInfo.isEnabled());
-            assertEquals(devA.wfdInfo.getDeviceInfoHex(), devB.wfdInfo.getDeviceInfoHex());
-            assertEquals(devA.wfdInfo.getControlPort(), devB.wfdInfo.getControlPort());
-            assertEquals(devA.wfdInfo.getMaxThroughput(), devB.wfdInfo.getMaxThroughput());
-        } else {
-            assertEquals(devA.wfdInfo, devB.wfdInfo);
-        }
-    }
-
-    /**
-     * Check equals and hashCode consistency
-     */
-    @Test
-    public void testEqualsWithHashCode() throws Exception {
-        WifiP2pDevice dev_a = new WifiP2pDevice();
-        dev_a.deviceAddress = new String("02:90:4c:a0:92:54");
-        WifiP2pDevice dev_b = new WifiP2pDevice();
-        dev_b.deviceAddress = new String("02:90:4c:a0:92:54");
-
-        assertTrue(dev_a.equals(dev_b));
-        assertEquals(dev_a.hashCode(), dev_b.hashCode());
-    }
-
-    /**
-     * Check the copy constructor with default values.
-     */
-    @Test
-    public void testCopyConstructorWithDefaultValues() throws Exception {
-        WifiP2pDevice device = new WifiP2pDevice();
-        WifiP2pDevice copy = new WifiP2pDevice(device);
-        compareWifiP2pDevices(device, copy);
-    }
-
-    /**
-     * Check the copy constructor with updated values.
-     */
-    @Test
-    public void testCopyConstructorWithUpdatedValues() throws Exception {
-        WifiP2pDevice device = new WifiP2pDevice();
-        device.deviceName = "deviceName";
-        device.deviceAddress = "11:22:33:44:55:66";
-        device.primaryDeviceType = "primaryDeviceType";
-        device.secondaryDeviceType = "secondaryDeviceType";
-        device.wpsConfigMethodsSupported = 0x0008;
-        device.deviceCapability = 1;
-        device.groupCapability = 1;
-        device.status = WifiP2pDevice.CONNECTED;
-        device.wfdInfo = new WifiP2pWfdInfo();
-        WifiP2pDevice copy = new WifiP2pDevice(device);
-        compareWifiP2pDevices(device, copy);
-    }
-
-    /**
-     * Check the copy constructor when the wfdInfo of the source object is null.
-     */
-    @Test
-    public void testCopyConstructorWithNullWfdInfo() throws Exception {
-        WifiP2pDevice device = new WifiP2pDevice();
-        device.deviceName = "deviceName";
-        device.deviceAddress = "11:22:33:44:55:66";
-        device.primaryDeviceType = "primaryDeviceType";
-        device.secondaryDeviceType = "secondaryDeviceType";
-        device.wpsConfigMethodsSupported = 0x0008;
-        device.deviceCapability = 1;
-        device.groupCapability = 1;
-        device.status = WifiP2pDevice.CONNECTED;
-        device.wfdInfo = null;
-        WifiP2pDevice copy = new WifiP2pDevice(device);
-        compareWifiP2pDevices(device, copy);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupListTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupListTest.java
deleted file mode 100644
index 2402f5b..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupListTest.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.net.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pGroupList}
- */
-@SmallTest
-public class WifiP2pGroupListTest {
-
-    private static final WifiP2pDevice TEST_GROUP_OWNER_1 = new WifiP2pDevice("aa:bb:cc:dd:ee:f0");
-    private static final WifiP2pDevice TEST_GROUP_OWNER_2 = new WifiP2pDevice("aa:bb:cc:dd:ee:f1");
-    private static final WifiP2pDevice TEST_GROUP_OWNER_3 = new WifiP2pDevice("aa:bb:cc:dd:ee:f2");
-    private static final WifiP2pDevice TEST_GROUP_OWNER_OTHER =
-            new WifiP2pDevice("aa:bb:cc:dd:ee:f3");
-
-    private WifiP2pGroup mTestGroup1;
-    private WifiP2pGroup mTestGroup2;
-    private WifiP2pGroup mTestGroup3;
-    private WifiP2pGroup mTestGroup4;
-
-    private WifiP2pGroup createGroup(
-            int networkId, String networkName,
-            String passphrase, boolean isGo,
-            WifiP2pDevice goDev) {
-        WifiP2pGroup group = new WifiP2pGroup();
-        group.setNetworkId(networkId);
-        group.setNetworkName(networkName);
-        group.setPassphrase(passphrase);
-        group.setIsGroupOwner(isGo);
-        group.setOwner(goDev);
-        return group;
-    }
-
-    @Before
-    public void setUp() throws Exception {
-        mTestGroup1 = createGroup(0, "testGroup1", "12345678", false, TEST_GROUP_OWNER_1);
-        mTestGroup2 = createGroup(1, "testGroup2", "12345678", true, TEST_GROUP_OWNER_2);
-        mTestGroup3 = createGroup(2, "testGroup3", "12345678", false, TEST_GROUP_OWNER_3);
-        mTestGroup4 = createGroup(3, "testGroup4", "12345678", false, TEST_GROUP_OWNER_1);
-    }
-
-    /**
-     * Verify basic operations.
-     */
-    @Test
-    public void testListOperations() throws Exception {
-        WifiP2pGroupList list = new WifiP2pGroupList();
-        list.add(mTestGroup1);
-        list.add(mTestGroup2);
-        list.add(mTestGroup3);
-        list.add(mTestGroup4);
-        assertEquals(4, list.getGroupList().size());
-
-        // in list
-        assertEquals(mTestGroup2.getNetworkId(),
-                list.getNetworkId(TEST_GROUP_OWNER_2.deviceAddress));
-        assertEquals(TEST_GROUP_OWNER_2.deviceAddress,
-                list.getOwnerAddr(mTestGroup2.getNetworkId()));
-        // not in list
-        assertEquals(-1, list.getNetworkId(TEST_GROUP_OWNER_OTHER.deviceAddress));
-        // if there are groups with the same GO, return the first one found.
-        assertEquals(mTestGroup1.getNetworkId(),
-                list.getNetworkId(TEST_GROUP_OWNER_1.deviceAddress));
-        // identify groups with the same GO, but different network names.
-        assertEquals(mTestGroup4.getNetworkId(),
-                list.getNetworkId(TEST_GROUP_OWNER_1.deviceAddress, "testGroup4"));
-
-        list.remove(mTestGroup3.getNetworkId());
-        assertEquals(-1, list.getNetworkId(TEST_GROUP_OWNER_3.deviceAddress));
-        assertFalse(list.contains(mTestGroup3.getNetworkId()));
-
-        assertEquals(3, list.getGroupList().size());
-
-        Parcel parcelW = Parcel.obtain();
-        list.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pGroupList fromParcel = WifiP2pGroupList.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(list.toString(), fromParcel.toString());
-
-        list.clear();
-        assertEquals(0, list.getGroupList().size());
-
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupTest.java
deleted file mode 100644
index 9473e42..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pGroupTest.java
+++ /dev/null
@@ -1,92 +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.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pGroup}
- */
-@SmallTest
-public class WifiP2pGroupTest {
-
-    private static final String INTERFACE = "p2p-p2p0-3";
-    private static final int NETWORK_ID = 9;
-    private static final String NETWORK_NAME = "DIRECT-xy-Hello";
-    private static final String PASSPHRASE = "HelloWorld";
-    private static final WifiP2pDevice GROUP_OWNER = new WifiP2pDevice("de:ad:be:ef:00:01");
-    private static final int FREQUENCY = 5300;
-    private static final WifiP2pDevice CLIENT_1 = new WifiP2pDevice("aa:bb:cc:dd:ee:01");
-    private static final WifiP2pDevice CLIENT_2 = new WifiP2pDevice("aa:bb:cc:dd:ee:02");
-
-    /**
-     * Verify setter/getter functions.
-     */
-    @Test
-    public void testSetterGetter() throws Exception {
-        WifiP2pGroup group = new WifiP2pGroup();
-
-        group.setInterface(INTERFACE);
-        group.setNetworkId(NETWORK_ID);
-        group.setNetworkName(NETWORK_NAME);
-        group.setPassphrase(PASSPHRASE);
-        group.setIsGroupOwner(false);
-        group.setOwner(GROUP_OWNER);
-        group.setFrequency(FREQUENCY);
-        group.addClient(CLIENT_1.deviceAddress);
-        group.addClient(CLIENT_2);
-
-        assertEquals(INTERFACE, group.getInterface());
-        assertEquals(NETWORK_ID, group.getNetworkId());
-        assertEquals(NETWORK_NAME, group.getNetworkName());
-        assertEquals(PASSPHRASE, group.getPassphrase());
-        assertFalse(group.isGroupOwner());
-        assertEquals(GROUP_OWNER, group.getOwner());
-        assertEquals(FREQUENCY, group.getFrequency());
-
-        assertFalse(group.isClientListEmpty());
-        assertTrue(group.contains(CLIENT_1));
-
-        assertEquals(2, group.getClientList().size());
-
-        group.removeClient(CLIENT_1);
-        group.removeClient(CLIENT_2.deviceAddress);
-        assertFalse(group.contains(CLIENT_1));
-        assertTrue(group.isClientListEmpty());
-
-        Parcel parcelW = Parcel.obtain();
-        group.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pGroup fromParcel = WifiP2pGroup.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(group.toString(), fromParcel.toString());
-
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pInfoTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pInfoTest.java
deleted file mode 100644
index e207ca1..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pInfoTest.java
+++ /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.
- */
-
-package android.net.wifi.p2p;
-
-import static org.junit.Assert.assertEquals;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.net.InetAddress;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pInfo}
- */
-@SmallTest
-public class WifiP2pInfoTest {
-
-    private InetAddress mGroupOnwerIpv4Address;
-
-    @Before
-    public void setUp() throws Exception {
-        byte[] ipv4 = {(byte) 192, (byte) 168, (byte) 49, (byte) 1};
-        mGroupOnwerIpv4Address = InetAddress.getByAddress(ipv4);
-    }
-
-    /**
-     * Verifies copy constructor.
-     */
-    @Test
-    public void testCopyOperator() throws Exception {
-        WifiP2pInfo info = new WifiP2pInfo();
-        info.groupFormed = true;
-        info.isGroupOwner = true;
-        info.groupOwnerAddress = mGroupOnwerIpv4Address;
-
-        WifiP2pInfo copiedInfo = new WifiP2pInfo(info);
-
-        // no equals operator, use toString for data comparison.
-        assertEquals(info.toString(), copiedInfo.toString());
-    }
-
-    /**
-     * Verifies parcel serialization/deserialization.
-     */
-    @Test
-    public void testParcelOperation() throws Exception {
-        WifiP2pInfo info = new WifiP2pInfo();
-        info.groupFormed = true;
-        info.isGroupOwner = true;
-        info.groupOwnerAddress = mGroupOnwerIpv4Address;
-
-        Parcel parcelW = Parcel.obtain();
-        info.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pInfo fromParcel = WifiP2pInfo.CREATOR.createFromParcel(parcelR);
-
-        // no equals operator, use toString for data comparison.
-        assertEquals(info.toString(), fromParcel.toString());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java
deleted file mode 100644
index 9e8dca4..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pManagerTest.java
+++ /dev/null
@@ -1,85 +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.net.wifi.p2p;
-
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.verify;
-
-import android.content.Context;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import libcore.junit.util.ResourceLeakageDetector;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-/**
- * Unit test harness for WifiP2pManager.
- */
-@SmallTest
-public class WifiP2pManagerTest {
-    private WifiP2pManager mDut;
-    private TestLooper mTestLooper;
-
-    @Mock
-    public Context mContextMock;
-    @Mock
-    IWifiP2pManager mP2pServiceMock;
-
-    @Rule
-    public ResourceLeakageDetector.LeakageDetectorRule leakageDetectorRule =
-            ResourceLeakageDetector.getRule();
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mDut = new WifiP2pManager(mP2pServiceMock);
-        mTestLooper = new TestLooper();
-    }
-
-    /**
-     * Validate that on finalize we close the channel and flag a resource leakage.
-     */
-    @Test
-    public void testChannelFinalize() throws Exception {
-        try (WifiP2pManager.Channel channel = new WifiP2pManager.Channel(mContextMock,
-                mTestLooper.getLooper(), null, null, mDut)) {
-            leakageDetectorRule.assertUnreleasedResourceCount(channel, 1);
-        }
-    }
-
-    /**
-     * Validate that when close is called on a channel it frees up resources (i.e. don't
-     * get flagged again on finalize).
-     */
-    @Test
-    public void testChannelClose() throws Exception {
-        WifiP2pManager.Channel channel = new WifiP2pManager.Channel(mContextMock,
-                mTestLooper.getLooper(), null, null, mDut);
-
-        channel.close();
-        verify(mP2pServiceMock).close(any());
-
-        leakageDetectorRule.assertUnreleasedResourceCount(channel, 0);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pProvDiscEventTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pProvDiscEventTest.java
deleted file mode 100644
index e3b10a7..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pProvDiscEventTest.java
+++ /dev/null
@@ -1,111 +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.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pProvDiscEvent}
- */
-@SmallTest
-public class WifiP2pProvDiscEventTest {
-
-    private static final String DEVICE_ADDRESS = "aa:bb:cc:dd:ee:ff";
-    private static final String EVENT_PBC_REQ_STRING = "P2P-PROV-DISC-PBC-REQ";
-    private static final String EVENT_PBC_RSP_STRING = "P2P-PROV-DISC-PBC-RESP";
-    private static final String EVENT_ENTER_PIN_STRING = "P2P-PROV-DISC-ENTER-PIN";
-    private static final String EVENT_SHOW_PIN_STRING = "P2P-PROV-DISC-SHOW-PIN";
-    private static final String TEST_PIN = "44490607";
-
-    /**
-     * Test parsing PBC request event.
-     */
-    @Test
-    public void testPbcReqEvent() throws Exception {
-        WifiP2pProvDiscEvent event =
-                new WifiP2pProvDiscEvent(EVENT_PBC_REQ_STRING + " " + DEVICE_ADDRESS);
-        assertEquals(WifiP2pProvDiscEvent.PBC_REQ, event.event);
-        assertEquals(DEVICE_ADDRESS, event.device.deviceAddress);
-    }
-
-
-    /**
-     * Test parsing PBC response event.
-     */
-    @Test
-    public void testPbcRespEvent() throws Exception {
-        WifiP2pProvDiscEvent event =
-                new WifiP2pProvDiscEvent(EVENT_PBC_RSP_STRING + " " + DEVICE_ADDRESS);
-        assertEquals(WifiP2pProvDiscEvent.PBC_RSP, event.event);
-        assertEquals(DEVICE_ADDRESS, event.device.deviceAddress);
-    }
-
-    /**
-     * Test parsing ENTER-PIN event.
-     */
-    @Test
-    public void testEnterPinEvent() throws Exception {
-        WifiP2pProvDiscEvent event =
-                new WifiP2pProvDiscEvent(EVENT_ENTER_PIN_STRING + " " + DEVICE_ADDRESS);
-        assertEquals(WifiP2pProvDiscEvent.ENTER_PIN, event.event);
-        assertEquals(DEVICE_ADDRESS, event.device.deviceAddress);
-    }
-
-    /**
-     * Test parsing SHOW-PIN event.
-     */
-    @Test
-    public void testShowPinEvent() throws Exception {
-        WifiP2pProvDiscEvent event =
-                new WifiP2pProvDiscEvent(
-                        EVENT_SHOW_PIN_STRING + " " + DEVICE_ADDRESS + " " + TEST_PIN);
-        assertEquals(WifiP2pProvDiscEvent.SHOW_PIN, event.event);
-        assertEquals(DEVICE_ADDRESS, event.device.deviceAddress);
-        assertEquals(TEST_PIN, event.pin);
-    }
-
-    /**
-     * Test parsing malformed input.
-     */
-    @Test
-    public void testMalformedInput() throws Exception {
-        try {
-            WifiP2pProvDiscEvent event = new WifiP2pProvDiscEvent("OneToken");
-            fail("Should throw IllegalArgumentException exception.");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-    }
-
-    /**
-     * Test parsing malformed event.
-     */
-    @Test
-    public void testMalformedEvent() throws Exception {
-        try {
-            WifiP2pProvDiscEvent event = new WifiP2pProvDiscEvent("XXX " + DEVICE_ADDRESS);
-            fail("Should throw IllegalArgumentException exception.");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/WifiP2pWfdInfoTest.java b/wifi/tests/src/android/net/wifi/p2p/WifiP2pWfdInfoTest.java
deleted file mode 100644
index 2a9b36b..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/WifiP2pWfdInfoTest.java
+++ /dev/null
@@ -1,108 +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.p2p;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import android.os.Parcel;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.WifiP2pWfdInfo}
- */
-@SmallTest
-public class WifiP2pWfdInfoTest {
-
-    private static final int TEST_CTRL_PORT = 9999;
-    private static final int TEST_MAX_TPUT = 1024;
-
-    private WifiP2pWfdInfo mSourceInfo = new WifiP2pWfdInfo(
-            0,
-            TEST_CTRL_PORT,
-            TEST_MAX_TPUT);
-
-    @Before
-    public void setUp() {
-        // initialize device info flags.
-        mSourceInfo.setDeviceType(WifiP2pWfdInfo.DEVICE_TYPE_WFD_SOURCE);
-        mSourceInfo.setSessionAvailable(true);
-        mSourceInfo.setContentProtectionSupported(true);
-    }
-
-    /**
-     * Verifies setters/getters.
-     */
-    @Test
-    public void testSettersGetters() throws Exception {
-        WifiP2pWfdInfo info = new WifiP2pWfdInfo();
-
-        info.setEnabled(true);
-        assertTrue(info.isEnabled());
-
-        info.setDeviceType(WifiP2pWfdInfo.DEVICE_TYPE_WFD_SOURCE);
-        assertEquals(WifiP2pWfdInfo.DEVICE_TYPE_WFD_SOURCE, info.getDeviceType());
-
-        info.setSessionAvailable(true);
-        assertTrue(info.isSessionAvailable());
-
-        info.setContentProtectionSupported(true);
-        assertTrue(info.isContentProtectionSupported());
-
-        info.setControlPort(TEST_CTRL_PORT);
-        assertEquals(TEST_CTRL_PORT, info.getControlPort());
-
-        info.setMaxThroughput(TEST_MAX_TPUT);
-        assertEquals(TEST_MAX_TPUT, info.getMaxThroughput());
-
-        assertEquals("0110270f0400", info.getDeviceInfoHex());
-    }
-
-    /**
-     * Verifies copy constructor.
-     */
-    @Test
-    public void testCopyOperator() throws Exception {
-        WifiP2pWfdInfo copiedInfo = new WifiP2pWfdInfo(mSourceInfo);
-
-        // no equals operator, use toString for data comparison.
-        assertEquals(mSourceInfo.toString(), copiedInfo.toString());
-    }
-
-    /**
-     * Verifies parcel serialization/deserialization.
-     */
-    @Test
-    public void testParcelOperation() throws Exception {
-        Parcel parcelW = Parcel.obtain();
-        mSourceInfo.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        WifiP2pWfdInfo fromParcel = WifiP2pWfdInfo.CREATOR.createFromParcel(parcelR);
-
-        // no equals operator, use toString for data comparison.
-        assertEquals(mSourceInfo.toString(), fromParcel.toString());
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfoTest.java b/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfoTest.java
deleted file mode 100644
index e1cffee..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceInfoTest.java
+++ /dev/null
@@ -1,88 +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.p2p.nsd;
-
-import static org.junit.Assert.fail;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceInfo}
- */
-@SmallTest
-public class WifiP2pDnsSdServiceInfoTest {
-
-    private static final String INSTANCE_NAME = "MyPrinter";
-    private static final String SERVICE_TYPE = "_ipp._tcp";
-    private static final String TXTRECORD_PROP_AVAILABLE = "available";
-    private static final String TXTRECORD_PROP_AVAILABLE_VISABLE = "visable";
-
-    private Map<String, String> mTxtMap = new HashMap<>();
-
-    @Before
-    public void setUp() throws Exception {
-        mTxtMap.put(TXTRECORD_PROP_AVAILABLE, TXTRECORD_PROP_AVAILABLE_VISABLE);
-    }
-
-    /**
-     * Verify newInstance API
-     */
-    @Test
-    public void testNewInstance() throws Exception {
-        WifiP2pDnsSdServiceInfo info = null;
-
-        // the least arguments
-        info = WifiP2pDnsSdServiceInfo.newInstance(
-                INSTANCE_NAME,
-                SERVICE_TYPE,
-                null);
-
-        // all arguments are given.
-        info = WifiP2pDnsSdServiceInfo.newInstance(
-                INSTANCE_NAME,
-                SERVICE_TYPE,
-                mTxtMap);
-
-        // failure case due to no instance name.
-        try {
-            info = WifiP2pDnsSdServiceInfo.newInstance(
-                    null,
-                    SERVICE_TYPE,
-                    null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-
-        // failure case due to no service type.
-        try {
-            info = WifiP2pDnsSdServiceInfo.newInstance(
-                    INSTANCE_NAME,
-                    null,
-                    null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequestTest.java b/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequestTest.java
deleted file mode 100644
index 7d46a5f..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pDnsSdServiceRequestTest.java
+++ /dev/null
@@ -1,72 +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.p2p.nsd;
-
-import static org.junit.Assert.fail;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.nsd.WifiP2pDnsSdServiceRequest}
- */
-@SmallTest
-public class WifiP2pDnsSdServiceRequestTest {
-
-    private static final String SERVICE_NAME = "MyPrinter";
-    private static final String SERVICE_TYPE = "_ipp._tcp";
-
-    @Test
-    public void testNewInstance() throws Exception {
-        WifiP2pDnsSdServiceRequest request = null;
-
-        // default new instance
-        request = WifiP2pDnsSdServiceRequest.newInstance();
-
-        // set service type
-        request = WifiP2pDnsSdServiceRequest.newInstance(SERVICE_TYPE);
-
-        // set service type
-        request = WifiP2pDnsSdServiceRequest.newInstance(SERVICE_NAME, SERVICE_TYPE);
-
-        // failure case due to null service type
-        try {
-            request = WifiP2pDnsSdServiceRequest.newInstance(null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-
-        // failure case due to null service name
-        try {
-            request = WifiP2pDnsSdServiceRequest.newInstance(SERVICE_NAME, null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-
-        // failure case due to null service type
-        try {
-            request = WifiP2pDnsSdServiceRequest.newInstance(null, SERVICE_TYPE);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfoTest.java b/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfoTest.java
deleted file mode 100644
index 49ead11..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceInfoTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.net.wifi.p2p.nsd;
-
-import static org.junit.Assert.fail;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.nsd.WifiP2pUpnpServiceInfo}
- */
-@SmallTest
-public class WifiP2pUpnpServiceInfoTest {
-
-    private static final String UUID = "6859dede-8574-59ab-9332-123456789012";
-    private static final String DEVICE = "aa:bb:cc:dd:ee:ff";
-
-    private List<String> mServiceList = new ArrayList<>();
-
-    @Before
-    public void setUp() throws Exception {
-        mServiceList.add("urn:schemas-upnp-org:service:ContentDirectory:1");
-    }
-
-    /**
-     * Verify newInstance API
-     */
-    @Test
-    public void testNewInstance() throws Exception {
-        WifiP2pUpnpServiceInfo info = null;
-
-        // the least arguments
-        info = WifiP2pUpnpServiceInfo.newInstance(
-                UUID, DEVICE, null);
-
-        // all arguments are given.
-        info = WifiP2pUpnpServiceInfo.newInstance(
-                UUID, DEVICE, mServiceList);
-
-        // failure case due to no UUID.
-        try {
-            info = WifiP2pUpnpServiceInfo.newInstance(
-                    null, DEVICE, null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-
-        // failure case due to no device.
-        try {
-            info = WifiP2pUpnpServiceInfo.newInstance(
-                    UUID,
-                    null,
-                    null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequestTest.java b/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequestTest.java
deleted file mode 100644
index 79930dc..0000000
--- a/wifi/tests/src/android/net/wifi/p2p/nsd/WifiP2pUpnpServiceRequestTest.java
+++ /dev/null
@@ -1,49 +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.p2p.nsd;
-
-import static org.junit.Assert.fail;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Test;
-
-/**
- * Unit test harness for {@link android.net.wifi.p2p.nsd.WifiP2pUpnpServiceRequest}
- */
-@SmallTest
-public class WifiP2pUpnpServiceRequestTest {
-
-    @Test
-    public void testNewInstance() throws Exception {
-        WifiP2pUpnpServiceRequest request = null;
-
-        // Create a service discovery request to search all UPnP services.
-        request = WifiP2pUpnpServiceRequest.newInstance();
-
-        // Create a service discovery request to search specified UPnP services.
-        request = WifiP2pUpnpServiceRequest.newInstance("ssdp:all");
-
-        // failure case due to null target string
-        try {
-            request = WifiP2pUpnpServiceRequest.newInstance(null);
-            fail("should throw IllegalArgumentException");
-        } catch (IllegalArgumentException ex) {
-            // expected exception.
-        }
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/rtt/CivicLocationTest.java b/wifi/tests/src/android/net/wifi/rtt/CivicLocationTest.java
deleted file mode 100644
index f746fb7..0000000
--- a/wifi/tests/src/android/net/wifi/rtt/CivicLocationTest.java
+++ /dev/null
@@ -1,243 +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.net.wifi.rtt;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertNull;
-import static junit.framework.Assert.assertTrue;
-
-import android.location.Address;
-import android.os.Parcel;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/**
- * Tests for {@link CivicLocation}.
- */
-@RunWith(JUnit4.class)
-public class CivicLocationTest {
-    private static final String sUsCountryCode = "US";
-
-    private static final byte[] sEmptyBuffer = {};
-
-    private static final byte[] sTestCivicLocationBuffer = {
-            (byte) 17,
-            (byte) 3,
-            (byte) 'a',
-            (byte) 'b',
-            (byte) 'c',
-            (byte) 4,
-            (byte) 4,
-            (byte) 'd',
-            (byte) 'e',
-            (byte) 'f',
-            (byte) 'g',
-            (byte) 12,
-            (byte) 1,
-            (byte) 'h'
-    };
-
-    private static final byte[] sTestCivicLocationBufferWithAddress = {
-            (byte) CivicLocationKeys.HNO,
-            (byte) 2,
-            (byte) '1',
-            (byte) '5',
-            (byte) CivicLocationKeys.PRIMARY_ROAD_NAME,
-            (byte) 4,
-            (byte) 'A',
-            (byte) 'l',
-            (byte) 't',
-            (byte) 'o',
-            (byte) CivicLocationKeys.STREET_NAME_POST_MODIFIER,
-            (byte) 4,
-            (byte) 'R',
-            (byte) 'o',
-            (byte) 'a',
-            (byte) 'd',
-            (byte) CivicLocationKeys.CITY,
-            (byte) 8,
-            (byte) 'M',
-            (byte) 't',
-            (byte) 'n',
-            (byte) ' ',
-            (byte) 'V',
-            (byte) 'i',
-            (byte) 'e',
-            (byte) 'w',
-            (byte) CivicLocationKeys.STATE,
-            (byte) 2,
-            (byte) 'C',
-            (byte) 'A',
-            (byte) CivicLocationKeys.POSTAL_CODE,
-            (byte) 5,
-            (byte) '9',
-            (byte) '4',
-            (byte) '0',
-            (byte) '4',
-            (byte) '3'
-    };
-
-    /**
-     * Test inValid for null CountryCode.
-     */
-    @Test
-    public void testCivicLocationNullCountryCode() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, null);
-
-        boolean valid = civicLocation.isValid();
-
-        assertFalse(valid);
-    }
-
-    /**
-     * Test inValid for CountryCode too short.
-     */
-    @Test
-    public void testCivicLocationCountryCodeTooShort() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, "X");
-
-        boolean valid = civicLocation.isValid();
-
-        assertFalse(valid);
-    }
-
-    /**
-     * Test inValid for CountryCode too long.
-     */
-    @Test
-    public void testCivicLocationCountryCodeTooLong() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, "XYZ");
-
-        boolean valid = civicLocation.isValid();
-
-        assertFalse(valid);
-    }
-
-    /**
-     * Test inValid for null CivicLocation Buffer
-     */
-    @Test
-    public void testCivicLocationNullBuffer() {
-        CivicLocation civicLocation = new CivicLocation(null, sUsCountryCode);
-
-        boolean valid = civicLocation.isValid();
-
-        assertFalse(valid);
-    }
-
-    /**
-     * Test inValid for Empty CivicLocation Buffer.
-     */
-    @Test
-    public void testCivicLocationEmptyBuffer() {
-        CivicLocation civicLocation = new CivicLocation(sEmptyBuffer, sUsCountryCode);
-
-        boolean valid = civicLocation.isValid();
-
-        assertFalse(valid);
-    }
-
-    /**
-     * Test for valid CivicLocationBuffer and Country Code.
-     */
-    @Test
-    public void testCivicLocationValid() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, sUsCountryCode);
-
-        boolean valid = civicLocation.isValid();
-
-        assertTrue(valid);
-    }
-
-    /**
-     * Test toString Representation
-     */
-    @Test
-    public void testCivicLocationToString() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, sUsCountryCode);
-
-        String str = civicLocation.toString();
-
-        assertEquals("{4=defg, 12=h, 17=abc}", str);
-    }
-
-    /**
-     * Test the toString
-     */
-    @Test
-    public void testCivicLocationgetElementValue() {
-        CivicLocation civicLocation = new CivicLocation(sTestCivicLocationBuffer, sUsCountryCode);
-
-        String value1 = civicLocation.getCivicElementValue(4);
-        String value2 = civicLocation.getCivicElementValue(17);
-        String value3 = civicLocation.getCivicElementValue(12);
-        String value4 = civicLocation.getCivicElementValue(156); // not in test data
-        String value5 = civicLocation.getCivicElementValue(276); // greater than key index
-
-        assertEquals("defg", value1);
-        assertEquals("abc", value2);
-        assertEquals("h", value3);
-        assertNull(value4);
-        assertNull(value5);
-    }
-
-    /* Test toAddress representation */
-    @Test
-    public void testCivicLocationToAddress() {
-        CivicLocation civicLocation =
-                new CivicLocation(sTestCivicLocationBufferWithAddress, sUsCountryCode);
-
-        Address address = civicLocation.toAddress();
-
-        assertEquals("", address.getAddressLine(0));
-        assertEquals("15 Alto", address.getAddressLine(1));
-        assertEquals("Mtn View", address.getAddressLine(2));
-        assertEquals("CA 94043", address.getAddressLine(3));
-        assertEquals("US", address.getAddressLine(4));
-    }
-
-    /**
-     * Test toString Representation
-     */
-    @Test
-    public void testCivicLocationToString2() {
-        CivicLocation civicLocation =
-                new CivicLocation(sTestCivicLocationBufferWithAddress, sUsCountryCode);
-
-        String str = civicLocation.toString();
-
-        assertEquals("{1=CA, 3=Mtn View, 19=15, 24=94043, 34=Alto, 39=Road}", str);
-    }
-
-    /** Test object is Parcellable */
-    @Test
-    public void testCivicLocationParcelable() {
-        CivicLocation civicLocation =
-                new CivicLocation(sTestCivicLocationBufferWithAddress, sUsCountryCode);
-
-        Parcel parcel = Parcel.obtain();
-        civicLocation.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);
-        CivicLocation civicLocationFromParcel =
-                CivicLocation.CREATOR.createFromParcel(parcel);
-
-        assertEquals(civicLocationFromParcel, civicLocation);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/rtt/ResponderLocationTest.java b/wifi/tests/src/android/net/wifi/rtt/ResponderLocationTest.java
deleted file mode 100644
index 271339c..0000000
--- a/wifi/tests/src/android/net/wifi/rtt/ResponderLocationTest.java
+++ /dev/null
@@ -1,589 +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.net.wifi.rtt;
-
-import android.location.Address;
-import android.location.Location;
-import android.net.MacAddress;
-import android.os.Parcel;
-import android.util.SparseArray;
-import android.webkit.MimeTypeMap;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-import java.util.List;
-
-/**
- * Tests for {@link ResponderLocation}.
- */
-@RunWith(JUnit4.class)
-public class ResponderLocationTest {
-    private static final double LATLNG_TOLERANCE_DEGREES = 0.000_000_05D; // 5E-8 = 6mm of meridian
-    private static final double ALT_TOLERANCE_METERS = 0.01;
-    private static final double HEIGHT_TOLERANCE_METERS = 0.01;
-    private static final int INDEX_ELEMENT_TYPE = 2;
-    private static final int INDEX_SUBELEMENT_TYPE = 0;
-    private static final int INDEX_SUBELEMENT_LENGTH = 1;
-
-    /* Test Buffers */
-
-    private static final byte[] sTestLciIeHeader = {
-            (byte) 0x01, (byte) 0x00, (byte) 0x08 // LCI Information Element (IE)
-    };
-
-    private static final byte[] sTestLciShortBuffer = {
-        (byte) 0x00
-    };
-
-    private static final byte[] sTestLciSE = {
-            (byte) 0x00, // Subelement LCI
-            (byte) 16,   // Subelement LCI length always = 16
-            (byte) 0x52,
-            (byte) 0x83,
-            (byte) 0x4d,
-            (byte) 0x12,
-            (byte) 0xef,
-            (byte) 0xd2,
-            (byte) 0xb0,
-            (byte) 0x8b,
-            (byte) 0x9b,
-            (byte) 0x4b,
-            (byte) 0xf1,
-            (byte) 0xcc,
-            (byte) 0x2c,
-            (byte) 0x00,
-            (byte) 0x00,
-            (byte) 0x41
-    };
-
-    private static final byte[] sTestZHeightSE = {
-            (byte) 0x04, // Subelement Z
-            (byte) 6, // Length always 6
-            (byte) 0x00, // LSB STA Floor Info (2 bytes)
-            (byte) 0x01, // MSB
-            (byte) 0xcd, // LSB Height(m) (3 bytes)
-            (byte) 0x2c,
-            (byte) 0x00, // MSB Height(m)
-            (byte) 0x0e, // STA Height Uncertainty
-    };
-
-    private static final byte[] sTestUsageSE1 = {
-            (byte) 0x06, // Subelement Usage Rights
-            (byte) 1, // Length 1 (with no retention limit)
-            (byte) 0x01, // Retransmit ok, No expiration, no extra info available
-    };
-
-    private static final byte[] sTestUsageSE2 = {
-            (byte) 0x06, // Subelement Usage Rights
-            (byte) 3,    // Length 3 (including retention limit)
-            (byte) 0x06, // Retransmit not ok, Expiration, extra info available
-            (byte) 0x00, // LSB expiration time  (0x8000 = 32768 hrs)
-            (byte) 0x80  // MSB expiration time
-    };
-
-    private static final byte[] sTestBssidListSE = {
-            (byte) 0x07, // Subelement BSSID list
-            (byte) 13, // length dependent on number of BSSIDs in list
-            (byte) 0x00, // List is explicit; no expansion of list required
-            (byte) 0x01, // BSSID #1 (MSB)
-            (byte) 0x02,
-            (byte) 0x03,
-            (byte) 0x04,
-            (byte) 0x05,
-            (byte) 0x06, // (LSB)
-            (byte) 0xf1, // BSSID #2 (MSB)
-            (byte) 0xf2,
-            (byte) 0xf3,
-            (byte) 0xf4,
-            (byte) 0xf5,
-            (byte) 0xf6 // (LSB)
-    };
-
-    private static final byte[] sTestLcrBufferHeader = {
-            (byte) 0x01, (byte) 0x00, (byte) 0x0b,
-    };
-
-    private static final byte[] sEmptyBuffer = {};
-
-    private static final byte[] sTestCivicLocationSEWithAddress = {
-            (byte) 0, // Civic Location Subelement
-            (byte) 39, // Length of subelement value
-            (byte) 'U', // CountryCodeChar1
-            (byte) 'S', // CountryCodeChar2
-            (byte) CivicLocationKeys.HNO,
-            (byte) 2,
-            (byte) '1',
-            (byte) '5',
-            (byte) CivicLocationKeys.PRIMARY_ROAD_NAME,
-            (byte) 4,
-            (byte) 'A',
-            (byte) 'l',
-            (byte) 't',
-            (byte) 'o',
-            (byte) CivicLocationKeys.STREET_NAME_POST_MODIFIER,
-            (byte) 4,
-            (byte) 'R',
-            (byte) 'o',
-            (byte) 'a',
-            (byte) 'd',
-            (byte) CivicLocationKeys.CITY,
-            (byte) 8,
-            (byte) 'M',
-            (byte) 't',
-            (byte) 'n',
-            (byte) ' ',
-            (byte) 'V',
-            (byte) 'i',
-            (byte) 'e',
-            (byte) 'w',
-            (byte) CivicLocationKeys.STATE,
-            (byte) 2,
-            (byte) 'C',
-            (byte) 'A',
-            (byte) CivicLocationKeys.POSTAL_CODE,
-            (byte) 5,
-            (byte) '9',
-            (byte) '4',
-            (byte) '0',
-            (byte) '4',
-            (byte) '3'
-    };
-
-    // Buffer representing: "https://map.com/mall.jpg"
-    private static final byte[] sTestMapUrlSE = {
-            (byte) 5, // Map URL Subelement
-            (byte) 25,
-            (byte) 0, // MAP_TYPE_URL_DEFINED
-            (byte) 'h',
-            (byte) 't',
-            (byte) 't',
-            (byte) 'p',
-            (byte) 's',
-            (byte) ':',
-            (byte) '/',
-            (byte) '/',
-            (byte) 'm',
-            (byte) 'a',
-            (byte) 'p',
-            (byte) '.',
-            (byte) 'c',
-            (byte) 'o',
-            (byte) 'm',
-            (byte) '/',
-            (byte) 'm',
-            (byte) 'a',
-            (byte) 'l',
-            (byte) 'l',
-            (byte) '.',
-            (byte) 'j',
-            (byte) 'p',
-            (byte) 'g'
-    };
-
-    /**
-     * Test if the lci and lcr buffers are null.
-     */
-    @Test
-    public void testIfLciOrLcrIsNull() {
-        ResponderLocation responderLocation = new ResponderLocation(null, null);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test if the lci and lcr buffers are empty.
-     */
-    @Test
-    public void testIfLciOrLcrIsEmpty() {
-        ResponderLocation responderLocation = new ResponderLocation(sEmptyBuffer, sEmptyBuffer);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test if the lci subelement only has one byte
-     */
-    @Test
-    public void testIfLciShortBuffer() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciShortBuffer);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test that the example buffer contains a valid LCI Subelement.
-     */
-    @Test
-    public void testLciValidSubelement() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-        Location location = responderLocation.toLocation();
-
-        assertTrue(valid);
-        assertTrue(lciValid);
-        assertFalse(zValid);
-        assertEquals(0.0009765625D, responderLocation.getLatitudeUncertainty());
-        assertEquals(-33.8570095D, responderLocation.getLatitude(),
-                LATLNG_TOLERANCE_DEGREES);
-        assertEquals(0.0009765625D, responderLocation.getLongitudeUncertainty());
-        assertEquals(151.2152005D, responderLocation.getLongitude(),
-                LATLNG_TOLERANCE_DEGREES);
-        assertEquals(1, responderLocation.getAltitudeType());
-        assertEquals(64.0, responderLocation.getAltitudeUncertainty());
-        assertEquals(11.2, responderLocation.getAltitude(), ALT_TOLERANCE_METERS);
-        assertEquals(1, responderLocation.getDatum()); // WGS84
-        assertEquals(false, responderLocation.getRegisteredLocationAgreementIndication());
-        assertEquals(false, responderLocation.getRegisteredLocationDseIndication());
-        assertEquals(false, responderLocation.getDependentStationIndication());
-        assertEquals(1, responderLocation.getLciVersion());
-
-        // Testing Location Object
-        assertEquals(-33.8570095D, location.getLatitude(),
-                LATLNG_TOLERANCE_DEGREES);
-        assertEquals(151.2152005D, location.getLongitude(),
-                LATLNG_TOLERANCE_DEGREES);
-        assertEquals((0.0009765625D + 0.0009765625D) / 2, location.getAccuracy(),
-                LATLNG_TOLERANCE_DEGREES);
-        assertEquals(11.2, location.getAltitude(), ALT_TOLERANCE_METERS);
-        assertEquals(64.0, location.getVerticalAccuracyMeters(), ALT_TOLERANCE_METERS);
-    }
-
-    /**
-     * Test for an invalid LCI element.
-     */
-    @Test
-    public void testLciInvalidElement() {
-        byte[] testBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        testBuffer[INDEX_ELEMENT_TYPE] = (byte) 0xFF;
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test for an invalid subelement type.
-     */
-    @Test
-    public void testSkipLciSubElementUnusedOrUnknown() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        // Corrupt the subelement type to an unknown type.
-        testLciBuffer[sTestLciIeHeader.length + INDEX_SUBELEMENT_TYPE] = (byte) 0x77;
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test for a subelement LCI length too small.
-     */
-    @Test
-    public void testInvalidLciSubElementLengthTooSmall() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        // Corrupt the length making it too small.
-        testLciBuffer[sTestLciIeHeader.length + INDEX_SUBELEMENT_LENGTH] = (byte) 0x01;
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test for a subelement LCI length too big.
-     */
-    @Test
-    public void testInvalidLciSubElementLengthTooBig() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        // Corrupt the length making it too big.
-        testLciBuffer[sTestLciIeHeader.length + INDEX_SUBELEMENT_TYPE] = (byte) 0x11;
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean lciValid = responderLocation.isLciSubelementValid();
-        boolean zValid = responderLocation.isZaxisSubelementValid();
-
-        assertFalse(valid);
-        assertFalse(lciValid);
-        assertFalse(zValid);
-    }
-
-    /**
-     * Test for a valid Z (Height) subelement following an LCI subelement.
-     */
-    @Test
-    public void testLciValidZBufferSEAfterLci() {
-        byte[] testBufferTmp = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testBuffer = concatenateArrays(testBufferTmp, sTestZHeightSE);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean isValid = responderLocation.isValid();
-        boolean isZValid = responderLocation.isZaxisSubelementValid();
-        boolean isLciValid = responderLocation.isLciSubelementValid();
-        double staFloorNumber = responderLocation.getFloorNumber();
-        double staHeightAboveFloorMeters = responderLocation.getHeightAboveFloorMeters();
-        double staHeightAboveFloorUncertaintyMeters =
-                responderLocation.getHeightAboveFloorUncertaintyMeters();
-
-        assertTrue(isValid);
-        assertTrue(isZValid);
-        assertTrue(isLciValid);
-        assertEquals(4.0, staFloorNumber);
-        assertEquals(2.8, staHeightAboveFloorMeters, HEIGHT_TOLERANCE_METERS);
-        assertEquals(0.125, staHeightAboveFloorUncertaintyMeters);
-    }
-
-    /**
-     * Test for a valid Usage Policy that is unrestrictive
-     */
-    @Test
-    public void testLciOpenUsagePolicy() {
-        byte[] testBufferTmp = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testBuffer = concatenateArrays(testBufferTmp, sTestUsageSE1);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean retransmit = responderLocation.getRetransmitPolicyIndication();
-        boolean expiration = responderLocation.getRetentionExpiresIndication();
-        boolean extraInfo = responderLocation.getExtraInfoOnAssociationIndication();
-
-        assertTrue(valid);
-        assertTrue(retransmit);
-        assertFalse(expiration);
-        assertFalse(extraInfo);
-    }
-
-    /**
-     * Test for a valid Usage Policy that is restrictive
-     */
-    @Test
-    public void testLciRestrictiveUsagePolicy() {
-        byte[] testBufferTmp = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testBuffer = concatenateArrays(testBufferTmp, sTestUsageSE2);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        boolean retransmit = responderLocation.getRetransmitPolicyIndication();
-        boolean expiration = responderLocation.getRetentionExpiresIndication();
-        boolean extraInfo = responderLocation.getExtraInfoOnAssociationIndication();
-
-        assertFalse(valid);
-        assertFalse(retransmit);
-        assertTrue(expiration);
-        assertTrue(extraInfo);
-    }
-
-    /**
-     * Test for a valid BSSID element following an LCI subelement.
-     */
-    @Test
-    public void testLciBssidListSEAfterLci() {
-        byte[] testBufferTmp = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testBuffer = concatenateArrays(testBufferTmp, sTestBssidListSE);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        List<MacAddress> bssidList = responderLocation.getColocatedBssids();
-
-        assertTrue(valid);
-        assertEquals(2, bssidList.size());
-        MacAddress macAddress1 = bssidList.get(0);
-        assertEquals("01:02:03:04:05:06", macAddress1.toString());
-        MacAddress macAddress2 = bssidList.get(1);
-        assertEquals("f1:f2:f3:f4:f5:f6", macAddress2.toString());
-    }
-
-    /**
-     * Test for a valid BSSID element before and LCI element
-     */
-    @Test
-    public void testLciBssidListSEBeforeLci() {
-        byte[] testBufferTmp = concatenateArrays(sTestLciIeHeader, sTestBssidListSE);
-        byte[] testBuffer = concatenateArrays(testBufferTmp, sTestLciSE);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testBuffer, sTestLcrBufferHeader);
-
-        boolean valid = responderLocation.isValid();
-        List<MacAddress> bssidList = responderLocation.getColocatedBssids();
-
-        assertTrue(valid);
-        assertEquals(2, bssidList.size());
-        MacAddress macAddress1 = bssidList.get(0);
-        assertEquals("01:02:03:04:05:06", macAddress1.toString());
-        MacAddress macAddress2 = bssidList.get(1);
-        assertEquals("f1:f2:f3:f4:f5:f6", macAddress2.toString());
-    }
-
-    /**
-     * Test that a valid address can be extracted from a valid lcr buffer with Civic Location.
-     */
-    @Test
-    public void testLcrTestCivicLocationAddress() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testLcrBuffer =
-                concatenateArrays(sTestLcrBufferHeader, sTestCivicLocationSEWithAddress);
-        ResponderLocation responderLocation = new ResponderLocation(testLciBuffer, testLcrBuffer);
-
-        boolean valid = responderLocation.isValid();
-        String countryCode = responderLocation.getCivicLocationCountryCode();
-        Address address = responderLocation.toCivicLocationAddress();
-
-        assertTrue(valid);
-        assertEquals("US", countryCode);
-        assertEquals("", address.getAddressLine(0));
-        assertEquals("15 Alto", address.getAddressLine(1));
-        assertEquals("Mtn View", address.getAddressLine(2));
-        assertEquals("CA 94043", address.getAddressLine(3));
-        assertEquals("US", address.getAddressLine(4));
-    }
-
-    /**
-     * Test that a Civic Location sparseArray can be extracted from a valid lcr buffer.
-     */
-    @Test
-    public void testLcrTestCivicLocationSparseArray() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testLcrBuffer =
-                concatenateArrays(sTestLcrBufferHeader, sTestCivicLocationSEWithAddress);
-        ResponderLocation responderLocation = new ResponderLocation(testLciBuffer, testLcrBuffer);
-
-        boolean valid = responderLocation.isValid();
-        SparseArray<String> civicLocationSparseArray = responderLocation
-                .toCivicLocationSparseArray();
-
-        assertTrue(valid);
-        assertEquals("15", civicLocationSparseArray.get(CivicLocationKeys.HNO));
-        assertEquals("Alto",
-                civicLocationSparseArray.get(CivicLocationKeys.PRIMARY_ROAD_NAME));
-        assertEquals("Road",
-                civicLocationSparseArray.get(CivicLocationKeys.STREET_NAME_POST_MODIFIER));
-        assertEquals("Mtn View", civicLocationSparseArray.get(CivicLocationKeys.CITY));
-        assertEquals("94043", civicLocationSparseArray.get(CivicLocationKeys.POSTAL_CODE));
-    }
-
-    /**
-     * Test that a URL can be extracted from a valid lcr buffer with a map image subelement.
-     */
-    @Test
-    public void testLcrCheckMapUriIsValid() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        byte[] testLcrBuffer = concatenateArrays(sTestLcrBufferHeader, sTestMapUrlSE);
-        ResponderLocation responderLocation = new ResponderLocation(testLciBuffer, testLcrBuffer);
-
-        boolean valid = responderLocation.isValid();
-        String mapImageMimeType = responderLocation.getMapImageMimeType();
-        String urlString = "";
-        if (responderLocation.getMapImageUri() != null) {
-            urlString = responderLocation.getMapImageUri().toString();
-        }
-
-        assertTrue(valid);
-        MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
-        assertEquals(mimeTypeMap.getMimeTypeFromExtension("jpg"), mapImageMimeType);
-        assertEquals("https://map.com/mall.jpg", urlString);
-    }
-
-    /**
-     * Test the object is parcelable
-     */
-    @Test
-    public void testResponderLocationParcelable() {
-        byte[] testLciBuffer = concatenateArrays(sTestLciIeHeader, sTestLciSE);
-        ResponderLocation responderLocation =
-                new ResponderLocation(testLciBuffer, sTestLcrBufferHeader);
-
-        Parcel parcel = Parcel.obtain();
-        responderLocation.writeToParcel(parcel, 0);
-        parcel.setDataPosition(0);
-        ResponderLocation responderLocationFromParcel =
-                ResponderLocation.CREATOR.createFromParcel(parcel);
-
-        assertEquals(responderLocationFromParcel, responderLocation);
-    }
-
-    /* Helper Method */
-
-    /**
-     * Concatenate two arrays.
-     *
-     * @param a first array
-     * @param b second array
-     * @return a third array which is the concatenation of the two array params
-     */
-    private byte[] concatenateArrays(byte[] a, byte[] b) {
-        int aLen = a.length;
-        int bLen = b.length;
-        byte[] c = new byte[aLen + bLen];
-        System.arraycopy(a, 0, c, 0, aLen);
-        System.arraycopy(b, 0, c, aLen, bLen);
-        return c;
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java b/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
deleted file mode 100644
index e6eae416..0000000
--- a/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
+++ /dev/null
@@ -1,395 +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.net.wifi.rtt;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.when;
-
-import android.content.Context;
-import android.net.MacAddress;
-import android.net.wifi.ScanResult;
-import android.net.wifi.aware.PeerHandle;
-import android.os.IBinder;
-import android.os.Parcel;
-import android.os.test.TestLooper;
-
-import androidx.test.filters.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Executor;
-
-/**
- * Unit test harness for WifiRttManager class.
- */
-@SmallTest
-public class WifiRttManagerTest {
-    private WifiRttManager mDut;
-    private TestLooper mMockLooper;
-    private Executor mMockLooperExecutor;
-
-    private final String packageName = "some.package.name.for.rtt.app";
-    private final String featureId = "some.feature.id.in.rtt.app";
-
-    @Mock
-    public Context mockContext;
-
-    @Mock
-    public IWifiRttManager mockRttService;
-
-    @Before
-    public void setUp() throws Exception {
-        MockitoAnnotations.initMocks(this);
-
-        mDut = new WifiRttManager(mockContext, mockRttService);
-        mMockLooper = new TestLooper();
-        mMockLooperExecutor = mMockLooper.getNewExecutor();
-
-        when(mockContext.getOpPackageName()).thenReturn(packageName);
-        when(mockContext.getAttributionTag()).thenReturn(featureId);
-    }
-
-    /**
-     * Validate ranging call flow with successful results.
-     */
-    @Test
-    public void testRangeSuccess() throws Exception {
-        RangingRequest request = new RangingRequest.Builder().build();
-        List<RangingResult> results = new ArrayList<>();
-        results.add(
-                new RangingResult(RangingResult.STATUS_SUCCESS, MacAddress.BROADCAST_ADDRESS, 15, 5,
-                        10, 8, 5, null, null, null, 666));
-        RangingResultCallback callbackMock = mock(RangingResultCallback.class);
-        ArgumentCaptor<IRttCallback> callbackCaptor = ArgumentCaptor.forClass(IRttCallback.class);
-
-        // verify ranging request passed to service
-        mDut.startRanging(request, mMockLooperExecutor, callbackMock);
-        verify(mockRttService).startRanging(any(IBinder.class), eq(packageName), eq(featureId),
-                eq(null),  eq(request), callbackCaptor.capture());
-
-        // service calls back with success
-        callbackCaptor.getValue().onRangingResults(results);
-        mMockLooper.dispatchAll();
-        verify(callbackMock).onRangingResults(results);
-
-        verifyNoMoreInteractions(mockRttService, callbackMock);
-    }
-
-    /**
-     * Validate ranging call flow which failed.
-     */
-    @Test
-    public void testRangeFail() throws Exception {
-        int failureCode = RangingResultCallback.STATUS_CODE_FAIL;
-
-        RangingRequest request = new RangingRequest.Builder().build();
-        RangingResultCallback callbackMock = mock(RangingResultCallback.class);
-        ArgumentCaptor<IRttCallback> callbackCaptor = ArgumentCaptor.forClass(IRttCallback.class);
-
-        // verify ranging request passed to service
-        mDut.startRanging(request, mMockLooperExecutor, callbackMock);
-        verify(mockRttService).startRanging(any(IBinder.class), eq(packageName), eq(featureId),
-                eq(null), eq(request), callbackCaptor.capture());
-
-        // service calls back with failure code
-        callbackCaptor.getValue().onRangingFailure(failureCode);
-        mMockLooper.dispatchAll();
-        verify(callbackMock).onRangingFailure(failureCode);
-
-        verifyNoMoreInteractions(mockRttService, callbackMock);
-    }
-
-    /**
-     * Validate that RangingRequest parcel works (produces same object on write/read).
-     */
-    @Test
-    public void testRangingRequestParcel() {
-        // Note: not validating parcel code of ScanResult (assumed to work)
-        ScanResult scanResult1 = new ScanResult();
-        scanResult1.BSSID = "00:01:02:03:04:05";
-        ScanResult scanResult2 = new ScanResult();
-        scanResult2.BSSID = "06:07:08:09:0A:0B";
-        ScanResult scanResult3 = new ScanResult();
-        scanResult3.BSSID = "AA:BB:CC:DD:EE:FF";
-        List<ScanResult> scanResults2and3 = new ArrayList<>(2);
-        scanResults2and3.add(scanResult2);
-        scanResults2and3.add(scanResult3);
-        MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05");
-        PeerHandle peerHandle1 = new PeerHandle(12);
-
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addAccessPoint(scanResult1);
-        builder.addAccessPoints(scanResults2and3);
-        builder.addWifiAwarePeer(mac1);
-        builder.addWifiAwarePeer(peerHandle1);
-        RangingRequest request = builder.build();
-
-        Parcel parcelW = Parcel.obtain();
-        request.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        RangingRequest rereadRequest = RangingRequest.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(request, rereadRequest);
-    }
-
-    /**
-     * Validate that can request as many range operation as the upper limit on number of requests.
-     */
-    @Test
-    public void testRangingRequestAtLimit() {
-        ScanResult scanResult = new ScanResult();
-        scanResult.BSSID = "AA:BB:CC:DD:EE:FF";
-        List<ScanResult> scanResultList = new ArrayList<>();
-        for (int i = 0; i < RangingRequest.getMaxPeers() - 3; ++i) {
-            scanResultList.add(scanResult);
-        }
-        MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05");
-
-        // create request
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addAccessPoint(scanResult);
-        builder.addAccessPoints(scanResultList);
-        builder.addAccessPoint(scanResult);
-        builder.addWifiAwarePeer(mac1);
-        RangingRequest request = builder.build();
-
-        // verify request
-        request.enforceValidity(true);
-    }
-
-    /**
-     * Validate that limit on number of requests is applied.
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testRangingRequestPastLimit() {
-        ScanResult scanResult = new ScanResult();
-        scanResult.BSSID = "00:01:02:03:04:05";
-        List<ScanResult> scanResultList = new ArrayList<>();
-        for (int i = 0; i < RangingRequest.getMaxPeers() - 2; ++i) {
-            scanResultList.add(scanResult);
-        }
-        MacAddress mac1 = MacAddress.fromString("00:01:02:03:04:05");
-
-        // create request
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addAccessPoint(scanResult);
-        builder.addAccessPoints(scanResultList);
-        builder.addAccessPoint(scanResult);
-        builder.addWifiAwarePeer(mac1);
-        RangingRequest request = builder.build();
-
-        // verify request
-        request.enforceValidity(true);
-    }
-
-    /**
-     * Validate that Aware requests are invalid on devices which do not support Aware
-     */
-    @Test(expected = IllegalArgumentException.class)
-    public void testRangingRequestWithAwareWithNoAwareSupport() {
-        // create request
-        RangingRequest.Builder builder = new RangingRequest.Builder();
-        builder.addWifiAwarePeer(new PeerHandle(10));
-        RangingRequest request = builder.build();
-
-        // verify request
-        request.enforceValidity(false);
-    }
-
-    /**
-     * Validate that RangingResults parcel works (produces same object on write/read).
-     */
-    @Test
-    public void testRangingResultsParcel() {
-        int status = RangingResult.STATUS_SUCCESS;
-        final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05");
-        PeerHandle peerHandle = new PeerHandle(10);
-        int distanceCm = 105;
-        int distanceStdDevCm = 10;
-        int rssi = 5;
-        int numAttemptedMeasurements = 8;
-        int numSuccessfulMeasurements = 3;
-        long timestamp = System.currentTimeMillis();
-        byte[] lci = { 0x5, 0x6, 0x7 };
-        byte[] lcr = { 0x1, 0x2, 0x3, 0xA, 0xB, 0xC };
-
-        // RangingResults constructed with a MAC address
-        RangingResult result = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi,
-                numAttemptedMeasurements, numSuccessfulMeasurements, lci, lcr, null, timestamp);
-
-        Parcel parcelW = Parcel.obtain();
-        result.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        RangingResult rereadResult = RangingResult.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(result, rereadResult);
-
-        // RangingResults constructed with a PeerHandle
-        result = new RangingResult(status, peerHandle, distanceCm, distanceStdDevCm, rssi,
-                numAttemptedMeasurements, numSuccessfulMeasurements, null, null, null, timestamp);
-
-        parcelW = Parcel.obtain();
-        result.writeToParcel(parcelW, 0);
-        bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        rereadResult = RangingResult.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(result, rereadResult);
-    }
-
-    /**
-     * Validate that RangingResults tests equal even if LCI/LCR is empty (length == 0) and null.
-     */
-    @Test
-    public void testRangingResultsEqualityLciLcr() {
-        int status = RangingResult.STATUS_SUCCESS;
-        final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05");
-        PeerHandle peerHandle = new PeerHandle(10);
-        int distanceCm = 105;
-        int distanceStdDevCm = 10;
-        int rssi = 5;
-        int numAttemptedMeasurements = 10;
-        int numSuccessfulMeasurements = 3;
-        long timestamp = System.currentTimeMillis();
-        byte[] lci = { };
-        byte[] lcr = { };
-
-        RangingResult rr1 = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi,
-                numAttemptedMeasurements, numSuccessfulMeasurements, lci, lcr, null, timestamp);
-        RangingResult rr2 = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi,
-                numAttemptedMeasurements, numSuccessfulMeasurements, null, null, null, timestamp);
-
-        assertEquals(rr1, rr2);
-    }
-
-    /**
-     * Validate that ResponderConfig parcel works (produces same object on write/read).
-     */
-    @Test
-    public void testResponderConfigParcel() {
-        // ResponderConfig constructed with a MAC address
-        ResponderConfig config = new ResponderConfig(MacAddress.fromString("00:01:02:03:04:05"),
-                ResponderConfig.RESPONDER_AP, true, ResponderConfig.CHANNEL_WIDTH_80MHZ, 2134, 2345,
-                2555, ResponderConfig.PREAMBLE_LEGACY);
-
-        Parcel parcelW = Parcel.obtain();
-        config.writeToParcel(parcelW, 0);
-        byte[] bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        Parcel parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        ResponderConfig rereadConfig = ResponderConfig.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(config, rereadConfig);
-
-        // ResponderConfig constructed with a PeerHandle
-        config = new ResponderConfig(new PeerHandle(10), ResponderConfig.RESPONDER_AWARE, false,
-                ResponderConfig.CHANNEL_WIDTH_80MHZ_PLUS_MHZ, 5555, 6666, 7777,
-                ResponderConfig.PREAMBLE_VHT);
-
-        parcelW = Parcel.obtain();
-        config.writeToParcel(parcelW, 0);
-        bytes = parcelW.marshall();
-        parcelW.recycle();
-
-        parcelR = Parcel.obtain();
-        parcelR.unmarshall(bytes, 0, bytes.length);
-        parcelR.setDataPosition(0);
-        rereadConfig = ResponderConfig.CREATOR.createFromParcel(parcelR);
-
-        assertEquals(config, rereadConfig);
-    }
-
-    /**
-     * Validate preamble selection from ScanResults.
-     */
-    @Test
-    public void testResponderPreambleSelection() {
-        ScanResult.InformationElement htCap = new ScanResult.InformationElement();
-        htCap.id = ScanResult.InformationElement.EID_HT_CAPABILITIES;
-
-        ScanResult.InformationElement vhtCap = new ScanResult.InformationElement();
-        vhtCap.id = ScanResult.InformationElement.EID_VHT_CAPABILITIES;
-
-        ScanResult.InformationElement vsa = new ScanResult.InformationElement();
-        vsa.id = ScanResult.InformationElement.EID_VSA;
-
-        // no IE
-        ScanResult scan = new ScanResult();
-        scan.BSSID = "00:01:02:03:04:05";
-        scan.informationElements = null;
-        scan.channelWidth = ResponderConfig.CHANNEL_WIDTH_80MHZ;
-
-        ResponderConfig config = ResponderConfig.fromScanResult(scan);
-
-        assertEquals(ResponderConfig.PREAMBLE_VHT, config.preamble);
-
-        // IE with HT & VHT
-        scan.channelWidth = ResponderConfig.CHANNEL_WIDTH_40MHZ;
-
-        scan.informationElements = new ScanResult.InformationElement[2];
-        scan.informationElements[0] = htCap;
-        scan.informationElements[1] = vhtCap;
-
-        config = ResponderConfig.fromScanResult(scan);
-
-        assertEquals(ResponderConfig.PREAMBLE_VHT, config.preamble);
-
-        // IE with some entries but no HT or VHT
-        scan.informationElements[0] = vsa;
-        scan.informationElements[1] = vsa;
-
-        config = ResponderConfig.fromScanResult(scan);
-
-        assertEquals(ResponderConfig.PREAMBLE_LEGACY, config.preamble);
-
-        // IE with HT
-        scan.informationElements[0] = vsa;
-        scan.informationElements[1] = htCap;
-
-        config = ResponderConfig.fromScanResult(scan);
-
-        assertEquals(ResponderConfig.PREAMBLE_HT, config.preamble);
-    }
-}
diff --git a/wifi/tests/src/android/net/wifi/util/HexEncodingTest.java b/wifi/tests/src/android/net/wifi/util/HexEncodingTest.java
deleted file mode 100644
index 0d75138..0000000
--- a/wifi/tests/src/android/net/wifi/util/HexEncodingTest.java
+++ /dev/null
@@ -1,130 +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.util;
-
-import static android.net.wifi.util.HexEncoding.decode;
-import static android.net.wifi.util.HexEncoding.encode;
-import static android.net.wifi.util.HexEncoding.encodeToString;
-
-import junit.framework.TestCase;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Locale;
-
-/** Copied from {@link libcore.libcore.util.HexEncodingTest}. */
-public class HexEncodingTest extends TestCase {
-
-    public void testEncodeByte() {
-        Object[][] testCases = new Object[][]{
-                {0x01, "01"},
-                {0x09, "09"},
-                {0x0A, "0A"},
-                {0x0F, "0F"},
-                {0x10, "10"},
-                {0x1F, "1F"},
-                {0x20, "20"},
-                {0x7F, "7F"},
-                {0x80, "80"},
-                {0xFF, "FF"},
-        };
-        for (Object[] testCase : testCases) {
-            Number toEncode = (Number) testCase[0];
-            String expected = (String) testCase[1];
-
-            String actualUpper = encodeToString(toEncode.byteValue(), true /* upperCase */);
-            assertEquals(upper(expected), actualUpper);
-
-            String actualLower = encodeToString(toEncode.byteValue(), false /* upperCase */);
-            assertEquals(lower(expected), actualLower);
-        }
-    }
-
-    public void testEncodeBytes() {
-        Object[][] testCases = new Object[][]{
-                {"avocados".getBytes(StandardCharsets.UTF_8), "61766F6361646F73"},
-        };
-
-        for (Object[] testCase : testCases) {
-            byte[] bytes = (byte[]) testCase[0];
-            String encodedLower = lower((String) testCase[1]);
-            String encodedUpper = upper((String) testCase[1]);
-
-            assertArraysEqual(encodedUpper.toCharArray(), encode(bytes));
-            assertArraysEqual(encodedUpper.toCharArray(), encode(bytes, true /* upperCase */));
-            assertArraysEqual(encodedLower.toCharArray(), encode(bytes, false /* upperCase */));
-
-            assertArraysEqual(bytes, decode(encode(bytes), false /* allowSingleChar */));
-
-            // Make sure we can handle lower case hex encodings as well.
-            assertArraysEqual(bytes,
-                    decode(encodedLower.toCharArray(), false /* allowSingleChar */));
-        }
-    }
-
-    public void testDecode_allow4Bit() {
-        assertArraysEqual(new byte[]{6}, decode("6".toCharArray(), true));
-        assertArraysEqual(new byte[]{6, 0x76}, decode("676".toCharArray(), true));
-    }
-
-    public void testDecode_disallow4Bit() {
-        try {
-            decode("676".toCharArray(), false /* allowSingleChar */);
-            fail();
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    public void testDecode_invalid() {
-        try {
-            decode("DEADBARD".toCharArray(), false /* allowSingleChar */);
-            fail();
-        } catch (IllegalArgumentException expected) {
-        }
-
-        // This demonstrates a difference in behaviour from apache commons : apache
-        // commons uses Character.isDigit and would successfully decode a string with
-        // arabic and devanagari characters.
-        try {
-            decode("६१٧٥٥F6361646F73".toCharArray(), false /* allowSingleChar */);
-            fail();
-        } catch (IllegalArgumentException expected) {
-        }
-
-        try {
-            decode("#%6361646F73".toCharArray(), false /* allowSingleChar */);
-            fail();
-        } catch (IllegalArgumentException expected) {
-        }
-    }
-
-    private static void assertArraysEqual(char[] lhs, char[] rhs) {
-        assertEquals(new String(lhs), new String(rhs));
-    }
-
-    private static void assertArraysEqual(byte[] lhs, byte[] rhs) {
-        assertEquals(Arrays.toString(lhs), Arrays.toString(rhs));
-    }
-
-    private static String lower(String string) {
-        return string.toLowerCase(Locale.ROOT);
-    }
-
-    private static String upper(String string) {
-        return string.toUpperCase(Locale.ROOT);
-    }
-}
diff --git a/wifi/tests/test-jarjar-rules.txt b/wifi/tests/test-jarjar-rules.txt
deleted file mode 100644
index 41b97ab..0000000
--- a/wifi/tests/test-jarjar-rules.txt
+++ /dev/null
@@ -1 +0,0 @@
-rule com.android.modules.utils.** com.android.wifi.test.x.@0