Merge "Expose media projection consent UI to instant apps" into pi-dev
diff --git a/Android.mk b/Android.mk
index 88394d6..bb37fa2 100644
--- a/Android.mk
+++ b/Android.mk
@@ -448,6 +448,7 @@
 		-showAnnotation android.annotation.SystemApi \
 		-showAnnotation android.annotation.TestApi \
 		-privateDexApi $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
+		-removedDexApi $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE) \
 		-nodocs
 
 LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR:=external/doclava/res/assets/templates-sdk
@@ -456,7 +457,8 @@
 
 include $(BUILD_DROIDDOC)
 
-$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
+$(full_target): .KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
+                                          $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
 
 # ====  check javadoc comments but don't generate docs ========
 include $(CLEAR_VARS)
@@ -871,9 +873,16 @@
 # rules for building them. Other rules in the build system should depend on the
 # files in the build folder.
 
-# Automatically add all methods which match the following signatures.
-# These need to be greylisted in order to allow applications to write their
-# own serializers.
+# Merge light greylist from multiple files:
+#  (1) manual light greylist
+#  (2) list of usages from vendor apps
+#  (3) list of removed APIs
+#      @removed does not imply private in Doclava. We must take the subset also
+#      in PRIVATE_API.
+#  (4) list of serialization APIs
+#      Automatically adds all methods which match the signatures in
+#      REGEX_SERIALIZATION. These are greylisted in order to allow applications
+#      to write their own serializers.
 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
     "readObject\(Ljava/io/ObjectInputStream;\)V" \
     "readObjectNoData\(\)V" \
@@ -883,14 +892,15 @@
     "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
     "writeReplace\(\)Ljava/lang/Object;"
 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
-# Temporarily merge light greylist from two files. Vendor list will become dark
-# grey once we remove the UI toast.
+$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REMOVED_API := $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
 $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
                                                frameworks/base/config/hiddenapi-vendor-list.txt \
-                                               $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
+                                               $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE) \
+                                               $(INTERNAL_PLATFORM_REMOVED_DEX_API_FILE)
 	sort frameworks/base/config/hiddenapi-light-greylist.txt \
 	     frameworks/base/config/hiddenapi-vendor-list.txt \
 	     <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" $(PRIVATE_API)) \
+	     <(comm -12 <(sort $(REMOVED_API)) <(sort $(PRIVATE_API))) \
 	> $@
 
 $(eval $(call copy-one-file,frameworks/base/config/hiddenapi-dark-greylist.txt,\
diff --git a/api/current.txt b/api/current.txt
index 26e4298..8703bf4 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -162,6 +162,7 @@
   public static final class Manifest.permission_group {
     ctor public Manifest.permission_group();
     field public static final java.lang.String CALENDAR = "android.permission-group.CALENDAR";
+    field public static final java.lang.String CALL_LOG = "android.permission-group.CALL_LOG";
     field public static final java.lang.String CAMERA = "android.permission-group.CAMERA";
     field public static final java.lang.String CONTACTS = "android.permission-group.CONTACTS";
     field public static final java.lang.String LOCATION = "android.permission-group.LOCATION";
diff --git a/cmds/incidentd/src/Section.cpp b/cmds/incidentd/src/Section.cpp
index 93875cd..e5bde0d 100644
--- a/cmds/incidentd/src/Section.cpp
+++ b/cmds/incidentd/src/Section.cpp
@@ -151,7 +151,8 @@
 }
 
 // ================================================================================
-Section::Section(int i, const int64_t timeoutMs) : id(i), timeoutMs(timeoutMs) {}
+Section::Section(int i, int64_t timeoutMs, bool deviceSpecific)
+    : id(i), timeoutMs(timeoutMs), deviceSpecific(deviceSpecific) {}
 
 Section::~Section() {}
 
@@ -236,8 +237,9 @@
 // ================================================================================
 static inline bool isSysfs(const char* filename) { return strncmp(filename, "/sys/", 5) == 0; }
 
-FileSection::FileSection(int id, const char* filename, const int64_t timeoutMs)
-    : Section(id, timeoutMs), mFilename(filename) {
+FileSection::FileSection(int id, const char* filename, const bool deviceSpecific,
+                         const int64_t timeoutMs)
+    : Section(id, timeoutMs, deviceSpecific), mFilename(filename) {
     name = filename;
     mIsSysfs = isSysfs(filename);
 }
@@ -250,7 +252,7 @@
     unique_fd fd(open(mFilename, O_RDONLY | O_CLOEXEC));
     if (fd.get() == -1) {
         ALOGW("FileSection '%s' failed to open file", this->name.string());
-        return -errno;
+        return this->deviceSpecific ? NO_ERROR : -errno;
     }
 
     FdBuffer buffer;
@@ -902,11 +904,16 @@
         // Read from the pipe concurrently to avoid blocking the child.
         FdBuffer buffer;
         err = buffer.readFully(dumpPipe.readFd().get());
+        // Wait on the child to avoid it becoming a zombie process.
+        status_t cStatus = wait_child(child);
         if (err != NO_ERROR) {
             ALOGW("TombstoneSection '%s' failed to read stack dump: %d", this->name.string(), err);
             dumpPipe.readFd().reset();
             break;
         }
+        if (cStatus != NO_ERROR) {
+            ALOGE("TombstoneSection '%s' child had an issue: %s\n", this->name.string(), strerror(-cStatus));
+        }
 
         auto dump = std::make_unique<char[]>(buffer.size());
         auto iterator = buffer.data();
diff --git a/cmds/incidentd/src/Section.h b/cmds/incidentd/src/Section.h
index 20ecdb1..577892e 100644
--- a/cmds/incidentd/src/Section.h
+++ b/cmds/incidentd/src/Section.h
@@ -40,9 +40,10 @@
 public:
     const int id;
     const int64_t timeoutMs;  // each section must have a timeout
+    const bool deviceSpecific;
     String8 name;
 
-    Section(int id, const int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
+    Section(int id, int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS, bool deviceSpecific = false);
     virtual ~Section();
 
     virtual status_t Execute(ReportRequestSet* requests) const = 0;
@@ -75,7 +76,8 @@
  */
 class FileSection : public Section {
 public:
-    FileSection(int id, const char* filename, const int64_t timeoutMs = 5000 /* 5 seconds */);
+    FileSection(int id, const char* filename, bool deviceSpecific = false,
+                int64_t timeoutMs = 5000 /* 5 seconds */);
     virtual ~FileSection();
 
     virtual status_t Execute(ReportRequestSet* requests) const;
@@ -105,7 +107,7 @@
  */
 class WorkerThreadSection : public Section {
 public:
-    WorkerThreadSection(int id, const int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
+    WorkerThreadSection(int id, int64_t timeoutMs = REMOTE_CALL_TIMEOUT_MS);
     virtual ~WorkerThreadSection();
 
     virtual status_t Execute(ReportRequestSet* requests) const;
@@ -118,7 +120,7 @@
  */
 class CommandSection : public Section {
 public:
-    CommandSection(int id, const int64_t timeoutMs, const char* command, ...);
+    CommandSection(int id, int64_t timeoutMs, const char* command, ...);
 
     CommandSection(int id, const char* command, ...);
 
@@ -168,7 +170,7 @@
  */
 class TombstoneSection : public WorkerThreadSection {
 public:
-    TombstoneSection(int id, const char* type, const int64_t timeoutMs = 30000 /* 30 seconds */);
+    TombstoneSection(int id, const char* type, int64_t timeoutMs = 30000 /* 30 seconds */);
     virtual ~TombstoneSection();
 
     virtual status_t BlockingCall(int pipeWriteFd) const;
diff --git a/cmds/incidentd/tests/Section_test.cpp b/cmds/incidentd/tests/Section_test.cpp
index 33f52062..3c338b3 100644
--- a/cmds/incidentd/tests/Section_test.cpp
+++ b/cmds/incidentd/tests/Section_test.cpp
@@ -143,8 +143,16 @@
     EXPECT_THAT(GetCapturedStdout(), StrEq("\xa\vatadtsetmai"));
 }
 
+TEST_F(SectionTest, FileSectionNotExist) {
+    FileSection fs1(NOOP_PARSER, "notexist", false, QUICK_TIMEOUT_MS);
+    ASSERT_EQ(NAME_NOT_FOUND, fs1.Execute(&requests));
+
+    FileSection fs2(NOOP_PARSER, "notexist", true, QUICK_TIMEOUT_MS);
+    ASSERT_EQ(NO_ERROR, fs2.Execute(&requests));
+}
+
 TEST_F(SectionTest, FileSectionTimeout) {
-    FileSection fs(TIMEOUT_PARSER, tf.path, QUICK_TIMEOUT_MS);
+    FileSection fs(TIMEOUT_PARSER, tf.path, false, QUICK_TIMEOUT_MS);
     ASSERT_EQ(NO_ERROR, fs.Execute(&requests));
     ASSERT_TRUE(requests.sectionStats(TIMEOUT_PARSER)->timed_out());
 }
diff --git a/cmds/statsd/Android.mk b/cmds/statsd/Android.mk
index b085a09..091268e 100644
--- a/cmds/statsd/Android.mk
+++ b/cmds/statsd/Android.mk
@@ -19,6 +19,7 @@
     ../../core/java/android/os/IStatsManager.aidl \
     src/statsd_config.proto \
     src/FieldValue.cpp \
+    src/hash.cpp \
     src/stats_log_util.cpp \
     src/anomaly/AlarmMonitor.cpp \
     src/anomaly/AlarmTracker.cpp \
@@ -140,10 +141,12 @@
 
 LOCAL_MODULE_CLASS := EXECUTABLES
 
-# Enable sanitizer on eng builds
+# Enable sanitizer and allow very verbose printing on eng builds
 ifeq ($(TARGET_BUILD_VARIANT),eng)
     LOCAL_CLANG := true
     LOCAL_SANITIZE := address
+    LOCAL_CFLAGS += \
+        -DVERY_VERBOSE_PRINTING
 endif
 
 LOCAL_INIT_RC := statsd.rc
diff --git a/cmds/statsd/benchmark/metric_util.cpp b/cmds/statsd/benchmark/metric_util.cpp
index e6272ed..50ed18d 100644
--- a/cmds/statsd/benchmark/metric_util.cpp
+++ b/cmds/statsd/benchmark/metric_util.cpp
@@ -366,7 +366,7 @@
     sp<AlarmMonitor> periodicAlarmMonitor;
     sp<StatsLogProcessor> processor = new StatsLogProcessor(
         uidMap, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseSec * NS_PER_SEC,
-        [](const ConfigKey&){});
+        [](const ConfigKey&){return true;});
     processor->OnConfigUpdated(timeBaseSec * NS_PER_SEC, key, config);
     return processor;
 }
diff --git a/cmds/statsd/src/FieldValue.cpp b/cmds/statsd/src/FieldValue.cpp
index dfd8705..f150f07 100644
--- a/cmds/statsd/src/FieldValue.cpp
+++ b/cmds/statsd/src/FieldValue.cpp
@@ -237,6 +237,18 @@
     return false;
 }
 
+bool HasPositionALL(const FieldMatcher& matcher) {
+    if (matcher.has_position() && matcher.position() == Position::ALL) {
+        return true;
+    }
+    for (const auto& child : matcher.child()) {
+        if (HasPositionALL(child)) {
+            return true;
+        }
+    }
+    return false;
+}
+
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/src/FieldValue.h b/cmds/statsd/src/FieldValue.h
index f7ce23b..02c49b9 100644
--- a/cmds/statsd/src/FieldValue.h
+++ b/cmds/statsd/src/FieldValue.h
@@ -351,6 +351,7 @@
 };
 
 bool HasPositionANY(const FieldMatcher& matcher);
+bool HasPositionALL(const FieldMatcher& matcher);
 
 bool isAttributionUidField(const FieldValue& value);
 
diff --git a/cmds/statsd/src/StatsLogProcessor.cpp b/cmds/statsd/src/StatsLogProcessor.cpp
index d548c0a..4d27948 100644
--- a/cmds/statsd/src/StatsLogProcessor.cpp
+++ b/cmds/statsd/src/StatsLogProcessor.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define DEBUG true  // STOPSHIP if true
+#define DEBUG false // STOPSHIP if true
 #include "Log.h"
 #include "statslog.h"
 
@@ -65,6 +65,7 @@
 const int FIELD_ID_LAST_REPORT_WALL_CLOCK_NANOS = 5;
 const int FIELD_ID_CURRENT_REPORT_WALL_CLOCK_NANOS = 6;
 const int FIELD_ID_DUMP_REPORT_REASON = 8;
+const int FIELD_ID_STRINGS = 9;
 
 #define NS_PER_HOUR 3600 * NS_PER_SEC
 
@@ -74,7 +75,7 @@
                                      const sp<AlarmMonitor>& anomalyAlarmMonitor,
                                      const sp<AlarmMonitor>& periodicAlarmMonitor,
                                      const int64_t timeBaseNs,
-                                     const std::function<void(const ConfigKey&)>& sendBroadcast)
+                                     const std::function<bool(const ConfigKey&)>& sendBroadcast)
     : mUidMap(uidMap),
       mAnomalyAlarmMonitor(anomalyAlarmMonitor),
       mPeriodicAlarmMonitor(periodicAlarmMonitor),
@@ -161,8 +162,27 @@
     OnLogEvent(event, false);
 }
 
+void StatsLogProcessor::resetConfigs() {
+    std::lock_guard<std::mutex> lock(mMetricsMutex);
+    resetConfigsLocked(getElapsedRealtimeNs());
+}
+
+void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs) {
+    std::vector<ConfigKey> configKeys;
+    for (auto it = mMetricsManagers.begin(); it != mMetricsManagers.end(); it++) {
+        configKeys.push_back(it->first);
+    }
+    resetConfigsLocked(timestampNs, configKeys);
+}
+
 void StatsLogProcessor::OnLogEvent(LogEvent* event, bool reconnected) {
     std::lock_guard<std::mutex> lock(mMetricsMutex);
+
+#ifdef VERY_VERBOSE_PRINTING
+    if (mPrintAllLogs) {
+        ALOGI("%s", event->ToString().c_str());
+    }
+#endif
     const int64_t currentTimestampNs = event->GetElapsedTimestampNs();
 
     if (reconnected && mLastTimestampSeen != 0) {
@@ -187,11 +207,7 @@
             WriteDataToDiskLocked(CONFIG_RESET);
             // We see fresher event before we see the checkpoint. We might have lost data.
             // The best we can do is to reset.
-            std::vector<ConfigKey> configKeys;
-            for (auto it = mMetricsManagers.begin(); it != mMetricsManagers.end(); it++) {
-                configKeys.push_back(it->first);
-            }
-            resetConfigsLocked(currentTimestampNs, configKeys);
+            resetConfigsLocked(currentTimestampNs);
         } else {
             // Still in search of the CP. Keep going.
             return;
@@ -241,6 +257,7 @@
 void StatsLogProcessor::OnConfigUpdated(const int64_t timestampNs, const ConfigKey& key,
                                         const StatsdConfig& config) {
     std::lock_guard<std::mutex> lock(mMetricsMutex);
+    WriteDataToDiskLocked(key, timestampNs, CONFIG_UPDATED);
     OnConfigUpdatedLocked(timestampNs, key, config);
 }
 
@@ -250,10 +267,6 @@
     sp<MetricsManager> newMetricsManager =
         new MetricsManager(key, config, mTimeBaseNs, timestampNs, mUidMap,
                            mAnomalyAlarmMonitor, mPeriodicAlarmMonitor);
-    auto it = mMetricsManagers.find(key);
-    if (it != mMetricsManagers.end()) {
-        WriteDataToDiskLocked(it->first, CONFIG_UPDATED);
-    }
     if (newMetricsManager->isConfigValid()) {
         mUidMap->OnConfigUpdated(key);
         if (newMetricsManager->shouldAddUidMapListener()) {
@@ -293,6 +306,7 @@
  */
 void StatsLogProcessor::onDumpReport(const ConfigKey& key, const int64_t dumpTimeStampNs,
                                      const bool include_current_partial_bucket,
+                                     const bool include_string,
                                      const DumpReportReason dumpReportReason,
                                      vector<uint8_t>* outData) {
     std::lock_guard<std::mutex> lock(mMetricsMutex);
@@ -320,7 +334,7 @@
         uint64_t reportsToken =
                 proto.start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_REPORTS);
         onConfigMetricsReportLocked(key, dumpTimeStampNs, include_current_partial_bucket,
-                                    dumpReportReason, &proto);
+                                    include_string, dumpReportReason, &proto);
         proto.end(reportsToken);
         // End of ConfigMetricsReport (reports).
     } else {
@@ -349,6 +363,7 @@
 void StatsLogProcessor::onConfigMetricsReportLocked(const ConfigKey& key,
                                                     const int64_t dumpTimeStampNs,
                                                     const bool include_current_partial_bucket,
+                                                    const bool include_string,
                                                     const DumpReportReason dumpReportReason,
                                                     ProtoOutputStream* proto) {
     // We already checked whether key exists in mMetricsManagers in
@@ -360,13 +375,16 @@
     int64_t lastReportTimeNs = it->second->getLastReportTimeNs();
     int64_t lastReportWallClockNs = it->second->getLastReportWallClockNs();
 
+    std::set<string> str_set;
+
     // First, fill in ConfigMetricsReport using current data on memory, which
     // starts from filling in StatsLogReport's.
-    it->second->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, proto);
+    it->second->onDumpReport(dumpTimeStampNs, include_current_partial_bucket,
+                             &str_set, proto);
 
     // Fill in UidMap.
     uint64_t uidMapToken = proto->start(FIELD_TYPE_MESSAGE | FIELD_ID_UID_MAP);
-    mUidMap->appendUidMap(dumpTimeStampNs, key, proto);
+    mUidMap->appendUidMap(dumpTimeStampNs, key, &str_set, proto);
     proto->end(uidMapToken);
 
     // Fill in the timestamps.
@@ -380,6 +398,12 @@
                 (long long)getWallClockNs());
     // Dump report reason
     proto->write(FIELD_TYPE_INT32 | FIELD_ID_DUMP_REPORT_REASON, dumpReportReason);
+
+    if (include_string) {
+        for (const auto& str : str_set) {
+            proto->write(FIELD_TYPE_STRING | FIELD_COUNT_REPEATED | FIELD_ID_STRINGS, str);
+        }
+    }
 }
 
 void StatsLogProcessor::resetConfigsLocked(const int64_t timestampNs,
@@ -407,6 +431,7 @@
         }
     }
     if (configKeysTtlExpired.size() > 0) {
+        WriteDataToDiskLocked(CONFIG_RESET);
         resetConfigsLocked(timestampNs, configKeysTtlExpired);
     }
 }
@@ -415,7 +440,7 @@
     std::lock_guard<std::mutex> lock(mMetricsMutex);
     auto it = mMetricsManagers.find(key);
     if (it != mMetricsManagers.end()) {
-        WriteDataToDiskLocked(key, CONFIG_REMOVED);
+        WriteDataToDiskLocked(key, getElapsedRealtimeNs(), CONFIG_REMOVED);
         mMetricsManagers.erase(it);
         mUidMap->OnConfigRemoved(key);
     }
@@ -440,12 +465,21 @@
     // We suspect that the byteSize() computation is expensive, so we set a rate limit.
     size_t totalBytes = metricsManager.byteSize();
     mLastByteSizeTimes[key] = timestampNs;
+    bool requestDump = false;
     if (totalBytes >
         StatsdStats::kMaxMetricsBytesPerConfig) {  // Too late. We need to start clearing data.
         metricsManager.dropData(timestampNs);
         StatsdStats::getInstance().noteDataDropped(key);
         VLOG("StatsD had to toss out metrics for %s", key.ToString().c_str());
-    } else if (totalBytes > StatsdStats::kBytesPerConfigTriggerGetData) {
+    } else if ((totalBytes > StatsdStats::kBytesPerConfigTriggerGetData) ||
+               (mOnDiskDataConfigs.find(key) != mOnDiskDataConfigs.end())) {
+        // Request to send a broadcast if:
+        // 1. in memory data > threshold   OR
+        // 2. config has old data report on disk.
+        requestDump = true;
+    }
+
+    if (requestDump) {
         // Send broadcast so that receivers can pull data.
         auto lastBroadcastTime = mLastBroadcastTimes.find(key);
         if (lastBroadcastTime != mLastBroadcastTimes.end()) {
@@ -454,18 +488,25 @@
                 return;
             }
         }
-        mLastBroadcastTimes[key] = timestampNs;
-        VLOG("StatsD requesting broadcast for %s", key.ToString().c_str());
-        mSendBroadcast(key);
-        StatsdStats::getInstance().noteBroadcastSent(key);
+        if (mSendBroadcast(key)) {
+            mOnDiskDataConfigs.erase(key);
+            VLOG("StatsD triggered data fetch for %s", key.ToString().c_str());
+            mLastBroadcastTimes[key] = timestampNs;
+            StatsdStats::getInstance().noteBroadcastSent(key);
+        }
     }
 }
 
 void StatsLogProcessor::WriteDataToDiskLocked(const ConfigKey& key,
+                                              const int64_t timestampNs,
                                               const DumpReportReason dumpReportReason) {
+    if (mMetricsManagers.find(key) == mMetricsManagers.end()) {
+        return;
+    }
     ProtoOutputStream proto;
-    onConfigMetricsReportLocked(key, getElapsedRealtimeNs(),
-                                true /* include_current_partial_bucket*/, dumpReportReason, &proto);
+    onConfigMetricsReportLocked(key, timestampNs,
+                                true /* include_current_partial_bucket*/,
+                                false /* include strings */, dumpReportReason, &proto);
     string file_name = StringPrintf("%s/%ld_%d_%lld", STATS_DATA_DIR,
          (long)getWallClockSec(), key.GetUid(), (long long)key.GetId());
     android::base::unique_fd fd(open(file_name.c_str(),
@@ -475,20 +516,24 @@
         return;
     }
     proto.flush(fd.get());
+    // We were able to write the ConfigMetricsReport to disk, so we should trigger collection ASAP.
+    mOnDiskDataConfigs.insert(key);
 }
 
 void StatsLogProcessor::WriteDataToDiskLocked(const DumpReportReason dumpReportReason) {
+    const int64_t timeNs = getElapsedRealtimeNs();
     for (auto& pair : mMetricsManagers) {
-        WriteDataToDiskLocked(pair.first, dumpReportReason);
+        WriteDataToDiskLocked(pair.first, timeNs, dumpReportReason);
     }
 }
 
-void StatsLogProcessor::WriteDataToDisk(bool isShutdown) {
+void StatsLogProcessor::WriteDataToDisk(const DumpReportReason dumpReportReason) {
     std::lock_guard<std::mutex> lock(mMetricsMutex);
-    WriteDataToDiskLocked(DEVICE_SHUTDOWN);
+    WriteDataToDiskLocked(dumpReportReason);
 }
 
 void StatsLogProcessor::informPullAlarmFired(const int64_t timestampNs) {
+    std::lock_guard<std::mutex> lock(mMetricsMutex);
     mStatsPullerManager.OnAlarmFired(timestampNs);
 }
 
@@ -501,6 +546,11 @@
     }
 }
 
+void StatsLogProcessor::noteOnDiskData(const ConfigKey& key) {
+    std::lock_guard<std::mutex> lock(mMetricsMutex);
+    mOnDiskDataConfigs.insert(key);
+}
+
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
diff --git a/cmds/statsd/src/StatsLogProcessor.h b/cmds/statsd/src/StatsLogProcessor.h
index c2337c1..d6fb8de 100644
--- a/cmds/statsd/src/StatsLogProcessor.h
+++ b/cmds/statsd/src/StatsLogProcessor.h
@@ -48,7 +48,7 @@
     StatsLogProcessor(const sp<UidMap>& uidMap, const sp<AlarmMonitor>& anomalyAlarmMonitor,
                       const sp<AlarmMonitor>& subscriberTriggerAlarmMonitor,
                       const int64_t timeBaseNs,
-                      const std::function<void(const ConfigKey&)>& sendBroadcast);
+                      const std::function<bool(const ConfigKey&)>& sendBroadcast);
     virtual ~StatsLogProcessor();
 
     void OnLogEvent(LogEvent* event, bool reconnectionStarts);
@@ -63,7 +63,7 @@
     size_t GetMetricsSize(const ConfigKey& key) const;
 
     void onDumpReport(const ConfigKey& key, const int64_t dumpTimeNs,
-                      const bool include_current_partial_bucket,
+                      const bool include_current_partial_bucket, const bool include_string,
                       const DumpReportReason dumpReportReason, vector<uint8_t>* outData);
 
     /* Tells MetricsManager that the alarms in alarmSet have fired. Modifies anomaly alarmSet. */
@@ -77,7 +77,10 @@
             unordered_set<sp<const InternalAlarm>, SpHash<InternalAlarm>> alarmSet);
 
     /* Flushes data to disk. Data on memory will be gone after written to disk. */
-    void WriteDataToDisk(bool shutdown);
+    void WriteDataToDisk(const DumpReportReason dumpReportReason);
+
+    // Reset all configs.
+    void resetConfigs();
 
     inline sp<UidMap> getUidMap() {
         return mUidMap;
@@ -89,6 +92,16 @@
 
     int64_t getLastReportTimeNs(const ConfigKey& key);
 
+    inline void setPrintLogs(bool enabled) {
+#ifdef VERY_VERBOSE_PRINTING
+        std::lock_guard<std::mutex> lock(mMetricsMutex);
+        mPrintAllLogs = enabled;
+#endif
+    }
+
+    // Add a specific config key to the possible configs to dump ASAP.
+    void noteOnDiskData(const ConfigKey& key);
+
 private:
     // For testing only.
     inline sp<AlarmMonitor> getAnomalyAlarmMonitor() const {
@@ -108,6 +121,9 @@
     // Tracks when we last checked the bytes consumed for each config key.
     std::unordered_map<ConfigKey, long> mLastByteSizeTimes;
 
+    // Tracks which config keys has metric reports on disk
+    std::set<ConfigKey> mOnDiskDataConfigs;
+
     sp<UidMap> mUidMap;  // Reference to the UidMap to lookup app name and version for each uid.
 
     StatsPullerManager mStatsPullerManager;
@@ -121,11 +137,13 @@
     void OnConfigUpdatedLocked(
         const int64_t currentTimestampNs, const ConfigKey& key, const StatsdConfig& config);
 
-    void WriteDataToDiskLocked(DumpReportReason dumpReportReason);
-    void WriteDataToDiskLocked(const ConfigKey& key, DumpReportReason dumpReportReason);
+    void WriteDataToDiskLocked(const DumpReportReason dumpReportReason);
+    void WriteDataToDiskLocked(const ConfigKey& key, const int64_t timestampNs,
+                               const DumpReportReason dumpReportReason);
 
     void onConfigMetricsReportLocked(const ConfigKey& key, const int64_t dumpTimeStampNs,
                                      const bool include_current_partial_bucket,
+                                     const bool include_string,
                                      const DumpReportReason dumpReportReason,
                                      util::ProtoOutputStream* proto);
 
@@ -140,11 +158,14 @@
     // Handler over the isolated uid change event.
     void onIsolatedUidChangedEventLocked(const LogEvent& event);
 
+    // Reset all configs.
+    void resetConfigsLocked(const int64_t timestampNs);
+    // Reset the specified configs.
     void resetConfigsLocked(const int64_t timestampNs, const std::vector<ConfigKey>& configs);
 
     // Function used to send a broadcast so that receiver for the config key can call getData
     // to retrieve the stored data.
-    std::function<void(const ConfigKey& key)> mSendBroadcast;
+    std::function<bool(const ConfigKey& key)> mSendBroadcast;
 
     const int64_t mTimeBaseNs;
 
@@ -163,6 +184,10 @@
 
     long mLastPullerCacheClearTimeSec = 0;
 
+#ifdef VERY_VERBOSE_PRINTING
+    bool mPrintAllLogs = false;
+#endif
+
     FRIEND_TEST(StatsLogProcessorTest, TestOutOfOrderLogs);
     FRIEND_TEST(StatsLogProcessorTest, TestRateLimitByteSize);
     FRIEND_TEST(StatsLogProcessorTest, TestRateLimitBroadcast);
diff --git a/cmds/statsd/src/StatsService.cpp b/cmds/statsd/src/StatsService.cpp
index 5229071..acf3ad2 100644
--- a/cmds/statsd/src/StatsService.cpp
+++ b/cmds/statsd/src/StatsService.cpp
@@ -158,11 +158,14 @@
         auto receiver = mConfigManager->GetConfigReceiver(key);
         if (sc == nullptr) {
             VLOG("Could not find StatsCompanionService");
+            return false;
         } else if (receiver == nullptr) {
             VLOG("Statscompanion could not find a broadcast receiver for %s",
                  key.ToString().c_str());
+            return false;
         } else {
             sc->sendDataBroadcast(receiver, mProcessor->getLastReportTimeNs(key));
+            return true;
         }
     }
     );
@@ -334,6 +337,10 @@
         if (!args[0].compare(String8("clear-puller-cache"))) {
             return cmd_clear_puller_cache(out);
         }
+
+        if (!args[0].compare(String8("print-logs"))) {
+            return cmd_print_logs(out, args);
+        }
     }
 
     print_cmd_help(out);
@@ -419,6 +426,9 @@
     fprintf(out, "\n");
     fprintf(out, "usage: adb shell cmd stats clear-puller-cache\n");
     fprintf(out, "  Clear cached puller data.\n");
+    fprintf(out, "\n");
+    fprintf(out, "usage: adb shell cmd stats print-logs\n");
+    fprintf(out, "      Only works on eng build\n");
 }
 
 status_t StatsService::cmd_trigger_broadcast(FILE* out, Vector<String8>& args) {
@@ -592,7 +602,8 @@
         if (good) {
             vector<uint8_t> data;
             mProcessor->onDumpReport(ConfigKey(uid, StrToInt64(name)), getElapsedRealtimeNs(),
-                                     false /* include_current_bucket*/, ADB_DUMP, &data);
+                                     false /* include_current_bucket*/,
+                                     true /* include strings */, ADB_DUMP, &data);
             // TODO: print the returned StatsLogReport to file instead of printing to logcat.
             if (proto) {
                 for (size_t i = 0; i < data.size(); i ++) {
@@ -658,7 +669,7 @@
 
 status_t StatsService::cmd_write_data_to_disk(FILE* out) {
     fprintf(out, "Writing data to disk\n");
-    mProcessor->WriteDataToDisk(false);
+    mProcessor->WriteDataToDisk(ADB_DUMP);
     return NO_ERROR;
 }
 
@@ -737,6 +748,22 @@
     }
 }
 
+status_t StatsService::cmd_print_logs(FILE* out, const Vector<String8>& args) {
+    IPCThreadState* ipc = IPCThreadState::self();
+    VLOG("StatsService::cmd_print_logs with Pid %i, Uid %i", ipc->getCallingPid(),
+         ipc->getCallingUid());
+    if (checkCallingPermission(String16(kPermissionDump))) {
+        bool enabled = true;
+        if (args.size() >= 2) {
+            enabled = atoi(args[1].c_str()) != 0;
+        }
+        mProcessor->setPrintLogs(enabled);
+        return NO_ERROR;
+    } else {
+        return PERMISSION_DENIED;
+    }
+}
+
 Status StatsService::informAllUidData(const vector<int32_t>& uid, const vector<int64_t>& version,
                                       const vector<String16>& app) {
     ENFORCE_UID(AID_SYSTEM);
@@ -815,10 +842,10 @@
     return Status::ok();
 }
 
-Status StatsService::informDeviceShutdown(bool isShutdown) {
+Status StatsService::informDeviceShutdown() {
     ENFORCE_UID(AID_SYSTEM);
     VLOG("StatsService::informDeviceShutdown");
-    mProcessor->WriteDataToDisk(isShutdown);
+    mProcessor->WriteDataToDisk(DEVICE_SHUTDOWN);
     return Status::ok();
 }
 
@@ -865,8 +892,9 @@
     IPCThreadState* ipc = IPCThreadState::self();
     VLOG("StatsService::getData with Pid %i, Uid %i", ipc->getCallingPid(), ipc->getCallingUid());
     ConfigKey configKey(ipc->getCallingUid(), key);
-    mProcessor->onDumpReport(configKey, getElapsedRealtimeNs(), false /* include_current_bucket*/,
-                             GET_DATA_CALLED, output);
+    mProcessor->onDumpReport(configKey, getElapsedRealtimeNs(),
+                             false /* include_current_bucket*/, true /* include strings */,
+                              GET_DATA_CALLED, output);
     return Status::ok();
 }
 
@@ -923,6 +951,11 @@
     IPCThreadState* ipc = IPCThreadState::self();
     ConfigKey configKey(ipc->getCallingUid(), key);
     mConfigManager->SetConfigReceiver(configKey, intentSender);
+    if (StorageManager::hasConfigMetricsReport(configKey)) {
+        VLOG("StatsService::setDataFetchOperation marking configKey %s to dump reports on disk",
+             configKey.ToString().c_str());
+        mProcessor->noteOnDiskData(configKey);
+    }
     return Status::ok();
 }
 
@@ -963,9 +996,23 @@
     return Status::ok();
 }
 
+Status StatsService::sendAppBreadcrumbAtom(int32_t label, int32_t state) {
+    // Permission check not necessary as it's meant for applications to write to
+    // statsd.
+    android::util::stats_write(util::APP_BREADCRUMB_REPORTED,
+                               IPCThreadState::self()->getCallingUid(), label,
+                               state);
+    return Status::ok();
+}
+
 void StatsService::binderDied(const wp <IBinder>& who) {
     ALOGW("statscompanion service died");
-    mProcessor->WriteDataToDisk(STATSCOMPANION_DIED);
+    StatsdStats::getInstance().noteSystemServerRestart(getWallClockSec());
+    if (mProcessor != nullptr) {
+        ALOGW("Reset statsd upon system server restars.");
+        mProcessor->WriteDataToDisk(STATSCOMPANION_DIED);
+        mProcessor->resetConfigs();
+    }
     mAnomalyAlarmMonitor->setStatsCompanionService(nullptr);
     mPeriodicAlarmMonitor->setStatsCompanionService(nullptr);
     SubscriberReporter::getInstance().setStatsCompanionService(nullptr);
diff --git a/cmds/statsd/src/StatsService.h b/cmds/statsd/src/StatsService.h
index e409a71..b3a4776 100644
--- a/cmds/statsd/src/StatsService.h
+++ b/cmds/statsd/src/StatsService.h
@@ -66,7 +66,7 @@
                                     const vector<String16>& app);
     virtual Status informOnePackage(const String16& app, int32_t uid, int64_t version);
     virtual Status informOnePackageRemoved(const String16& app, int32_t uid);
-    virtual Status informDeviceShutdown(bool isShutdown);
+    virtual Status informDeviceShutdown();
 
     /**
      * Called right before we start processing events.
@@ -139,6 +139,11 @@
     /** Inform statsCompanion that statsd is ready. */
     virtual void sayHiToStatsCompanion();
 
+    /**
+     * Binder call to get AppBreadcrumbReported atom.
+     */
+    virtual Status sendAppBreadcrumbAtom(int32_t label, int32_t state) override;
+
     /** IBinder::DeathRecipient */
     virtual void binderDied(const wp<IBinder>& who) override;
 
@@ -221,6 +226,11 @@
     status_t cmd_clear_puller_cache(FILE* out);
 
     /**
+     * Print all stats logs received to logcat.
+     */
+    status_t cmd_print_logs(FILE* out, const Vector<String8>& args);
+
+    /**
      * Adds a configuration after checking permissions and obtaining UID from binder call.
      */
     bool addConfigurationChecked(int uid, int64_t key, const vector<uint8_t>& config);
diff --git a/cmds/statsd/src/anomaly/AlarmTracker.cpp b/cmds/statsd/src/anomaly/AlarmTracker.cpp
index c8e406f..8d73699 100644
--- a/cmds/statsd/src/anomaly/AlarmTracker.cpp
+++ b/cmds/statsd/src/anomaly/AlarmTracker.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define DEBUG true  // STOPSHIP if true
+#define DEBUG false  // STOPSHIP if true
 #include "Log.h"
 
 #include "anomaly/AlarmTracker.h"
diff --git a/cmds/statsd/src/anomaly/subscriber_util.cpp b/cmds/statsd/src/anomaly/subscriber_util.cpp
index 3f69a2c..ee9e9c0 100644
--- a/cmds/statsd/src/anomaly/subscriber_util.cpp
+++ b/cmds/statsd/src/anomaly/subscriber_util.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define DEBUG true  // STOPSHIP if true
+#define DEBUG false  // STOPSHIP if true
 #include "Log.h"
 
 #include <android/os/IIncidentManager.h>
diff --git a/cmds/statsd/src/guardrail/StatsdStats.cpp b/cmds/statsd/src/guardrail/StatsdStats.cpp
index ee3ed23..764366f 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.cpp
+++ b/cmds/statsd/src/guardrail/StatsdStats.cpp
@@ -51,6 +51,7 @@
 const int FIELD_ID_LOGGER_ERROR_STATS = 11;
 const int FIELD_ID_PERIODIC_ALARM_STATS = 12;
 const int FIELD_ID_LOG_LOSS_STATS = 14;
+const int FIELD_ID_SYSTEM_SERVER_RESTART = 15;
 
 const int FIELD_ID_ATOM_STATS_TAG = 1;
 const int FIELD_ID_ATOM_STATS_COUNT = 2;
@@ -355,6 +356,15 @@
     mPushedAtomStats[atomId]++;
 }
 
+void StatsdStats::noteSystemServerRestart(int32_t timeSec) {
+    lock_guard<std::mutex> lock(mLock);
+
+    if (mSystemServerRestartSec.size() == kMaxSystemServerRestarts) {
+        mSystemServerRestartSec.pop_front();
+    }
+    mSystemServerRestartSec.push_back(timeSec);
+}
+
 void StatsdStats::noteLoggerError(int error) {
     lock_guard<std::mutex> lock(mLock);
     // grows strictly one at a time. so it won't > kMaxLoggerErrors
@@ -377,6 +387,7 @@
     mAnomalyAlarmRegisteredStats = 0;
     mPeriodicAlarmRegisteredStats = 0;
     mLoggerErrors.clear();
+    mSystemServerRestartSec.clear();
     mLogLossTimestampNs.clear();
     for (auto& config : mConfigStats) {
         config.second->broadcast_sent_time_sec.clear();
@@ -395,7 +406,7 @@
     time_t t = timeSec;
     struct tm* tm = localtime(&t);
     char timeBuffer[80];
-    strftime(timeBuffer, sizeof(timeBuffer), "%Y-%m-%d %I:%M%p\n", tm);
+    strftime(timeBuffer, sizeof(timeBuffer), "%Y-%m-%d %I:%M%p", tm);
     return string(timeBuffer);
 }
 
@@ -511,6 +522,12 @@
         strftime(buffer, sizeof(buffer), "%Y-%m-%d %I:%M%p\n", error_tm);
         fprintf(out, "Logger error %d at %s\n", error.second, buffer);
     }
+
+    for (const auto& restart : mSystemServerRestartSec) {
+        fprintf(out, "System server restarts at %s(%lld)\n",
+            buildTimeString(restart).c_str(), (long long)restart);
+    }
+
     for (const auto& loss : mLogLossTimestampNs) {
         fprintf(out, "Log loss detected at %lld (elapsedRealtimeNs)\n", (long long)loss);
     }
@@ -673,6 +690,11 @@
                     (long long)loss);
     }
 
+    for (const auto& restart : mSystemServerRestartSec) {
+        proto.write(FIELD_TYPE_INT32 | FIELD_ID_SYSTEM_SERVER_RESTART | FIELD_COUNT_REPEATED,
+                    restart);
+    }
+
     output->clear();
     size_t bufferSize = proto.size();
     output->resize(bufferSize);
diff --git a/cmds/statsd/src/guardrail/StatsdStats.h b/cmds/statsd/src/guardrail/StatsdStats.h
index 2cbcca3..74541d3 100644
--- a/cmds/statsd/src/guardrail/StatsdStats.h
+++ b/cmds/statsd/src/guardrail/StatsdStats.h
@@ -104,6 +104,8 @@
 
     const static int kMaxLoggerErrors = 20;
 
+    const static int kMaxSystemServerRestarts = 20;
+
     const static int kMaxTimestampCount = 20;
 
     const static int kMaxLogSourceCount = 50;
@@ -114,7 +116,7 @@
 
     // Soft memory limit per configuration. Once this limit is exceeded, we begin notifying the
     // data subscriber that it's time to call getData.
-    static const size_t kBytesPerConfigTriggerGetData = 128 * 1024;
+    static const size_t kBytesPerConfigTriggerGetData = 192 * 1024;
 
     // Cap the UID map's memory usage to this. This should be fairly high since the UID information
     // is critical for understanding the metrics.
@@ -275,6 +277,11 @@
      */
     void noteLoggerError(int error);
 
+    /*
+    * Records when system server restarts.
+    */
+    void noteSystemServerRestart(int32_t timeSec);
+
     /**
      * Records statsd skipped an event.
      */
@@ -338,6 +345,8 @@
     // Timestamps when we detect log loss after logd reconnect.
     std::list<int64_t> mLogLossTimestampNs;
 
+    std::list<int32_t> mSystemServerRestartSec;
+
     // Stores the number of times statsd modified the anomaly alarm registered with
     // StatsCompanionService.
     int mAnomalyAlarmRegisteredStats = 0;
@@ -366,6 +375,7 @@
     FRIEND_TEST(StatsdStatsTest, TestAtomLog);
     FRIEND_TEST(StatsdStatsTest, TestTimestampThreshold);
     FRIEND_TEST(StatsdStatsTest, TestAnomalyMonitor);
+    FRIEND_TEST(StatsdStatsTest, TestSystemServerCrash);
 };
 
 }  // namespace statsd
diff --git a/cmds/statsd/src/hash.cpp b/cmds/statsd/src/hash.cpp
new file mode 100644
index 0000000..c501c9f
--- /dev/null
+++ b/cmds/statsd/src/hash.cpp
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "hash.h"
+
+namespace android {
+namespace os {
+namespace statsd {
+
+namespace {
+// Lower-level versions of Get... that read directly from a character buffer
+// without any bounds checking.
+inline uint32_t DecodeFixed32(const char *ptr) {
+  return ((static_cast<uint32_t>(static_cast<unsigned char>(ptr[0]))) |
+          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[1])) << 8) |
+          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[2])) << 16) |
+          (static_cast<uint32_t>(static_cast<unsigned char>(ptr[3])) << 24));
+}
+
+inline uint64_t DecodeFixed64(const char* ptr) {
+    uint64_t lo = DecodeFixed32(ptr);
+    uint64_t hi = DecodeFixed32(ptr + 4);
+    return (hi << 32) | lo;
+}
+
+// 0xff is in case char is signed.
+static inline uint32_t ByteAs32(char c) { return static_cast<uint32_t>(c) & 0xff; }
+static inline uint64_t ByteAs64(char c) { return static_cast<uint64_t>(c) & 0xff; }
+
+}  // namespace
+
+uint32_t Hash32(const char *data, size_t n, uint32_t seed) {
+  // 'm' and 'r' are mixing constants generated offline.
+  // They're not really 'magic', they just happen to work well.
+  const uint32_t m = 0x5bd1e995;
+  const int r = 24;
+
+  // Initialize the hash to a 'random' value
+  uint32_t h = static_cast<uint32_t>(seed ^ n);
+
+  // Mix 4 bytes at a time into the hash
+  while (n >= 4) {
+    uint32_t k = DecodeFixed32(data);
+    k *= m;
+    k ^= k >> r;
+    k *= m;
+    h *= m;
+    h ^= k;
+    data += 4;
+    n -= 4;
+  }
+
+  // Handle the last few bytes of the input array
+  switch (n) {
+    case 3:
+      h ^= ByteAs32(data[2]) << 16;
+    case 2:
+      h ^= ByteAs32(data[1]) << 8;
+    case 1:
+      h ^= ByteAs32(data[0]);
+      h *= m;
+  }
+
+  // Do a few final mixes of the hash to ensure the last few
+  // bytes are well-incorporated.
+  h ^= h >> 13;
+  h *= m;
+  h ^= h >> 15;
+  return h;
+}
+
+uint64_t Hash64(const char* data, size_t n, uint64_t seed) {
+  const uint64_t m = 0xc6a4a7935bd1e995;
+  const int r = 47;
+
+  uint64_t h = seed ^ (n * m);
+
+  while (n >= 8) {
+    uint64_t k = DecodeFixed64(data);
+    data += 8;
+    n -= 8;
+
+    k *= m;
+    k ^= k >> r;
+    k *= m;
+
+    h ^= k;
+    h *= m;
+  }
+
+  switch (n) {
+    case 7:
+      h ^= ByteAs64(data[6]) << 48;
+    case 6:
+      h ^= ByteAs64(data[5]) << 40;
+    case 5:
+      h ^= ByteAs64(data[4]) << 32;
+    case 4:
+      h ^= ByteAs64(data[3]) << 24;
+    case 3:
+      h ^= ByteAs64(data[2]) << 16;
+    case 2:
+      h ^= ByteAs64(data[1]) << 8;
+    case 1:
+      h ^= ByteAs64(data[0]);
+      h *= m;
+  }
+
+  h ^= h >> r;
+  h *= m;
+  h ^= h >> r;
+
+  return h;
+}
+}  // namespace statsd
+}  // namespace os
+}  // namespace android
diff --git a/cmds/statsd/src/hash.h b/cmds/statsd/src/hash.h
new file mode 100644
index 0000000..cfe869f
--- /dev/null
+++ b/cmds/statsd/src/hash.h
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <string>
+
+namespace android {
+namespace os {
+namespace statsd {
+
+extern uint32_t Hash32(const char *data, size_t n, uint32_t seed);
+extern uint64_t Hash64(const char* data, size_t n, uint64_t seed);
+
+inline uint32_t Hash32(const char *data, size_t n) {
+  return Hash32(data, n, 0xBEEF);
+}
+
+inline uint32_t Hash32(const std::string &input) {
+  return Hash32(input.data(), input.size());
+}
+
+inline uint64_t Hash64(const char* data, size_t n) {
+  return Hash64(data, n, 0xDECAFCAFFE);
+}
+
+inline uint64_t Hash64(const std::string& str) {
+  return Hash64(str.data(), str.size());
+}
+
+}  // namespace statsd
+}  // namespace os
+}  // namespace android
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.cpp b/cmds/statsd/src/metrics/CountMetricProducer.cpp
index e21392c..43f53e0 100644
--- a/cmds/statsd/src/metrics/CountMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/CountMetricProducer.cpp
@@ -45,16 +45,23 @@
 // for StatsLogReport
 const int FIELD_ID_ID = 1;
 const int FIELD_ID_COUNT_METRICS = 5;
+const int FIELD_ID_TIME_BASE = 9;
+const int FIELD_ID_BUCKET_SIZE = 10;
+const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
+const int FIELD_ID_DIMENSION_PATH_IN_CONDITION = 12;
 // for CountMetricDataWrapper
 const int FIELD_ID_DATA = 1;
 // for CountMetricData
 const int FIELD_ID_DIMENSION_IN_WHAT = 1;
 const int FIELD_ID_DIMENSION_IN_CONDITION = 2;
 const int FIELD_ID_BUCKET_INFO = 3;
+const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
+const int FIELD_ID_DIMENSION_LEAF_IN_CONDITION = 5;
 // for CountBucketInfo
-const int FIELD_ID_START_BUCKET_ELAPSED_NANOS = 1;
-const int FIELD_ID_END_BUCKET_ELAPSED_NANOS = 2;
 const int FIELD_ID_COUNT = 3;
+const int FIELD_ID_BUCKET_NUM = 4;
+const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
+const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
 
 CountMetricProducer::CountMetricProducer(const ConfigKey& key, const CountMetric& metric,
                                          const int conditionIndex,
@@ -74,6 +81,9 @@
         mContainANYPositionInDimensionsInWhat = HasPositionANY(metric.dimensions_in_what());
     }
 
+    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what()) ||
+            HasPositionALL(metric.dimensions_in_condition());
+
     if (metric.has_dimensions_in_condition()) {
         translateFieldMatcher(metric.dimensions_in_condition(), &mDimensionsInCondition);
     }
@@ -122,8 +132,15 @@
     VLOG("Metric %lld onSlicedConditionMayChange", (long long)mMetricId);
 }
 
+
+void CountMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
+    flushIfNeededLocked(dumpTimeNs);
+    mPastBuckets.clear();
+}
+
 void CountMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
                                              const bool include_current_partial_bucket,
+                                             std::set<string> *str_set,
                                              ProtoOutputStream* protoOutput) {
     if (include_current_partial_bucket) {
         flushLocked(dumpTimeNs);
@@ -134,6 +151,26 @@
         return;
     }
     protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
+
+    // Fills the dimension path if not slicing by ALL.
+    if (!mSliceByPositionALL) {
+        if (!mDimensionsInWhat.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
+            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+        if (!mDimensionsInCondition.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_CONDITION);
+            writeDimensionPathToProto(mDimensionsInCondition, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+
+    }
+
     uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_COUNT_METRICS);
 
     for (const auto& counter : mPastBuckets) {
@@ -144,27 +181,42 @@
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
 
         // First fill dimension.
-        uint64_t dimensionInWhatToken = protoOutput->start(
-                FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-        writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), protoOutput);
-        protoOutput->end(dimensionInWhatToken);
+        if (mSliceByPositionALL) {
+            uint64_t dimensionToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
+            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
+            protoOutput->end(dimensionToken);
 
-        if (dimensionKey.hasDimensionKeyInCondition()) {
-            uint64_t dimensionInConditionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(), protoOutput);
-            protoOutput->end(dimensionInConditionToken);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                uint64_t dimensionInConditionToken = protoOutput->start(
+                        FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
+                writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(),
+                                      str_set, protoOutput);
+                protoOutput->end(dimensionInConditionToken);
+            }
+        } else {
+            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
+                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInCondition(),
+                                               FIELD_ID_DIMENSION_LEAF_IN_CONDITION,
+                                               str_set, protoOutput);
+            }
         }
-
         // Then fill bucket_info (CountBucketInfo).
-
         for (const auto& bucket : counter.second) {
             uint64_t bucketInfoToken = protoOutput->start(
                     FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketStartNs);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketEndNs);
+            // Partial bucket.
+            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketStartNs));
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketEndNs));
+            } else {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
+                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
+            }
             protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_COUNT, (long long)bucket.mCount);
             protoOutput->end(bucketInfoToken);
             VLOG("\t bucket [%lld - %lld] count: %lld", (long long)bucket.mBucketStartNs,
diff --git a/cmds/statsd/src/metrics/CountMetricProducer.h b/cmds/statsd/src/metrics/CountMetricProducer.h
index cafc882..139c083 100644
--- a/cmds/statsd/src/metrics/CountMetricProducer.h
+++ b/cmds/statsd/src/metrics/CountMetricProducer.h
@@ -57,8 +57,11 @@
 
     void onDumpReportLocked(const int64_t dumpTimeNs,
                             const bool include_current_partial_bucket,
+                            std::set<string> *str_set,
                             android::util::ProtoOutputStream* protoOutput) override;
 
+    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
+
     // Internal interface to handle condition change.
     void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
 
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.cpp b/cmds/statsd/src/metrics/DurationMetricProducer.cpp
index 3661b31..62237bc 100644
--- a/cmds/statsd/src/metrics/DurationMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/DurationMetricProducer.cpp
@@ -44,16 +44,23 @@
 // for StatsLogReport
 const int FIELD_ID_ID = 1;
 const int FIELD_ID_DURATION_METRICS = 6;
+const int FIELD_ID_TIME_BASE = 9;
+const int FIELD_ID_BUCKET_SIZE = 10;
+const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
+const int FIELD_ID_DIMENSION_PATH_IN_CONDITION = 12;
 // for DurationMetricDataWrapper
 const int FIELD_ID_DATA = 1;
 // for DurationMetricData
 const int FIELD_ID_DIMENSION_IN_WHAT = 1;
 const int FIELD_ID_DIMENSION_IN_CONDITION = 2;
 const int FIELD_ID_BUCKET_INFO = 3;
+const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
+const int FIELD_ID_DIMENSION_LEAF_IN_CONDITION = 5;
 // for DurationBucketInfo
-const int FIELD_ID_START_BUCKET_ELAPSED_NANOS = 1;
-const int FIELD_ID_END_BUCKET_ELAPSED_NANOS = 2;
 const int FIELD_ID_DURATION = 3;
+const int FIELD_ID_BUCKET_NUM = 4;
+const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
+const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
 
 DurationMetricProducer::DurationMetricProducer(const ConfigKey& key, const DurationMetric& metric,
                                                const int conditionIndex, const size_t startIndex,
@@ -99,6 +106,9 @@
         translateFieldMatcher(metric.dimensions_in_condition(), &mDimensionsInCondition);
     }
 
+    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what()) ||
+            HasPositionALL(metric.dimensions_in_condition());
+
     if (metric.links().size() > 0) {
         for (const auto& link : metric.links()) {
             Metric2Condition mc;
@@ -438,8 +448,14 @@
     mPastBuckets.clear();
 }
 
+void DurationMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
+    flushIfNeededLocked(dumpTimeNs);
+    mPastBuckets.clear();
+}
+
 void DurationMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
                                                 const bool include_current_partial_bucket,
+                                                std::set<string> *str_set,
                                                 ProtoOutputStream* protoOutput) {
     if (include_current_partial_bucket) {
         flushLocked(dumpTimeNs);
@@ -452,6 +468,24 @@
     }
 
     protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
+
+    if (!mSliceByPositionALL) {
+        if (!mDimensionsInWhat.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
+            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+        if (!mDimensionsInCondition.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_CONDITION);
+            writeDimensionPathToProto(mDimensionsInCondition, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+    }
+
     uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_DURATION_METRICS);
 
     VLOG("Duration metric %lld dump report now...", (long long)mMetricId);
@@ -464,26 +498,41 @@
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
 
         // First fill dimension.
-        uint64_t dimensionToken = protoOutput->start(
-                FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-        writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), protoOutput);
-        protoOutput->end(dimensionToken);
+        if (mSliceByPositionALL) {
+            uint64_t dimensionToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
+            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
+            protoOutput->end(dimensionToken);
 
-        if (dimensionKey.hasDimensionKeyInCondition()) {
-            uint64_t dimensionInConditionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(), protoOutput);
-            protoOutput->end(dimensionInConditionToken);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                uint64_t dimensionInConditionToken = protoOutput->start(
+                        FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
+                writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(),
+                                      str_set, protoOutput);
+                protoOutput->end(dimensionInConditionToken);
+            }
+        } else {
+            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
+                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInCondition(),
+                                               FIELD_ID_DIMENSION_LEAF_IN_CONDITION,
+                                               str_set, protoOutput);
+            }
         }
-
         // Then fill bucket_info (DurationBucketInfo).
         for (const auto& bucket : pair.second) {
             uint64_t bucketInfoToken = protoOutput->start(
                     FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketStartNs);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketEndNs);
+            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketStartNs));
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketEndNs));
+            } else {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
+                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
+            }
             protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_DURATION, (long long)bucket.mDuration);
             protoOutput->end(bucketInfoToken);
             VLOG("\t bucket [%lld - %lld] duration: %lld", (long long)bucket.mBucketStartNs,
diff --git a/cmds/statsd/src/metrics/DurationMetricProducer.h b/cmds/statsd/src/metrics/DurationMetricProducer.h
index 80fbdde..88e455a 100644
--- a/cmds/statsd/src/metrics/DurationMetricProducer.h
+++ b/cmds/statsd/src/metrics/DurationMetricProducer.h
@@ -63,8 +63,11 @@
 
     void onDumpReportLocked(const int64_t dumpTimeNs,
                             const bool include_current_partial_bucket,
+                            std::set<string> *str_set,
                             android::util::ProtoOutputStream* protoOutput) override;
 
+    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
+
     // Internal interface to handle condition change.
     void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
 
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.cpp b/cmds/statsd/src/metrics/EventMetricProducer.cpp
index 2f2679e..eec90fc 100644
--- a/cmds/statsd/src/metrics/EventMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/EventMetricProducer.cpp
@@ -100,8 +100,13 @@
     return buffer;
 }
 
+void EventMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
+    mProto->clear();
+}
+
 void EventMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
                                              const bool include_current_partial_bucket,
+                                             std::set<string> *str_set,
                                              ProtoOutputStream* protoOutput) {
     if (mProto->size() <= 0) {
         return;
diff --git a/cmds/statsd/src/metrics/EventMetricProducer.h b/cmds/statsd/src/metrics/EventMetricProducer.h
index 5c29174..62d1105 100644
--- a/cmds/statsd/src/metrics/EventMetricProducer.h
+++ b/cmds/statsd/src/metrics/EventMetricProducer.h
@@ -48,7 +48,9 @@
 
     void onDumpReportLocked(const int64_t dumpTimeNs,
                             const bool include_current_partial_bucket,
+                            std::set<string> *str_set,
                             android::util::ProtoOutputStream* protoOutput) override;
+    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
 
     // Internal interface to handle condition change.
     void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
index 1270856..a940d58 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.cpp
@@ -45,21 +45,28 @@
 // for StatsLogReport
 const int FIELD_ID_ID = 1;
 const int FIELD_ID_GAUGE_METRICS = 8;
+const int FIELD_ID_TIME_BASE = 9;
+const int FIELD_ID_BUCKET_SIZE = 10;
+const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
+const int FIELD_ID_DIMENSION_PATH_IN_CONDITION = 12;
 // for GaugeMetricDataWrapper
 const int FIELD_ID_DATA = 1;
 const int FIELD_ID_SKIPPED = 2;
-const int FIELD_ID_SKIPPED_START = 1;
-const int FIELD_ID_SKIPPED_END = 2;
+const int FIELD_ID_SKIPPED_START_MILLIS = 3;
+const int FIELD_ID_SKIPPED_END_MILLIS = 4;
 // for GaugeMetricData
 const int FIELD_ID_DIMENSION_IN_WHAT = 1;
 const int FIELD_ID_DIMENSION_IN_CONDITION = 2;
 const int FIELD_ID_BUCKET_INFO = 3;
+const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
+const int FIELD_ID_DIMENSION_LEAF_IN_CONDITION = 5;
 // for GaugeBucketInfo
-const int FIELD_ID_START_BUCKET_ELAPSED_NANOS = 1;
-const int FIELD_ID_END_BUCKET_ELAPSED_NANOS = 2;
 const int FIELD_ID_ATOM = 3;
 const int FIELD_ID_ELAPSED_ATOM_TIMESTAMP = 4;
 const int FIELD_ID_WALL_CLOCK_ATOM_TIMESTAMP = 5;
+const int FIELD_ID_BUCKET_NUM = 6;
+const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 7;
+const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 8;
 
 GaugeMetricProducer::GaugeMetricProducer(const ConfigKey& key, const GaugeMetric& metric,
                                          const int conditionIndex,
@@ -113,6 +120,8 @@
         }
     }
     mConditionSliced = (metric.links().size() > 0) || (mDimensionsInCondition.size() > 0);
+    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what()) ||
+            HasPositionALL(metric.dimensions_in_condition());
 
     flushIfNeededLocked(startTimeNs);
     // Kicks off the puller immediately.
@@ -160,8 +169,15 @@
     }
 }
 
+void GaugeMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
+    flushIfNeededLocked(dumpTimeNs);
+    mPastBuckets.clear();
+    mSkippedBuckets.clear();
+}
+
 void GaugeMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
                                              const bool include_current_partial_bucket,
+                                             std::set<string> *str_set,
                                              ProtoOutputStream* protoOutput) {
     VLOG("Gauge metric %lld report now...", (long long)mMetricId);
     if (include_current_partial_bucket) {
@@ -176,13 +192,34 @@
     }
 
     protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
+
+    // Fills the dimension path if not slicing by ALL.
+    if (!mSliceByPositionALL) {
+        if (!mDimensionsInWhat.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
+            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+        if (!mDimensionsInCondition.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_CONDITION);
+            writeDimensionPathToProto(mDimensionsInCondition, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+    }
+
     uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_GAUGE_METRICS);
 
     for (const auto& pair : mSkippedBuckets) {
         uint64_t wrapperToken =
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SKIPPED);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START, (long long)pair.first);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END, (long long)pair.second);
+        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START_MILLIS,
+                           (long long)(NanoToMillis(pair.first)));
+        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END_MILLIS,
+                           (long long)(NanoToMillis(pair.second)));
         protoOutput->end(wrapperToken);
     }
     mSkippedBuckets.clear();
@@ -195,26 +232,43 @@
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
 
         // First fill dimension.
-        uint64_t dimensionToken = protoOutput->start(
-                FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-        writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), protoOutput);
-        protoOutput->end(dimensionToken);
+        if (mSliceByPositionALL) {
+            uint64_t dimensionToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
+            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
+            protoOutput->end(dimensionToken);
 
-        if (dimensionKey.hasDimensionKeyInCondition()) {
-            uint64_t dimensionInConditionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(), protoOutput);
-            protoOutput->end(dimensionInConditionToken);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                uint64_t dimensionInConditionToken = protoOutput->start(
+                        FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
+                writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(),
+                                      str_set, protoOutput);
+                protoOutput->end(dimensionInConditionToken);
+            }
+        } else {
+            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
+                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInCondition(),
+                                               FIELD_ID_DIMENSION_LEAF_IN_CONDITION,
+                                               str_set, protoOutput);
+            }
         }
 
         // Then fill bucket_info (GaugeBucketInfo).
         for (const auto& bucket : pair.second) {
             uint64_t bucketInfoToken = protoOutput->start(
                     FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketStartNs);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_NANOS,
-                               (long long)bucket.mBucketEndNs);
+
+            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketStartNs));
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketEndNs));
+            } else {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
+                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
+            }
 
             if (!bucket.mGaugeAtoms.empty()) {
                 for (const auto& atom : bucket.mGaugeAtoms) {
diff --git a/cmds/statsd/src/metrics/GaugeMetricProducer.h b/cmds/statsd/src/metrics/GaugeMetricProducer.h
index 71d5912..ac2bd77 100644
--- a/cmds/statsd/src/metrics/GaugeMetricProducer.h
+++ b/cmds/statsd/src/metrics/GaugeMetricProducer.h
@@ -90,7 +90,9 @@
 private:
     void onDumpReportLocked(const int64_t dumpTimeNs,
                             const bool include_current_partial_bucket,
+                            std::set<string> *str_set,
                             android::util::ProtoOutputStream* protoOutput) override;
+    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
 
     // for testing
     GaugeMetricProducer(const ConfigKey& key, const GaugeMetric& gaugeMetric,
diff --git a/cmds/statsd/src/metrics/MetricProducer.cpp b/cmds/statsd/src/metrics/MetricProducer.cpp
index 5ff8082..df08181 100644
--- a/cmds/statsd/src/metrics/MetricProducer.cpp
+++ b/cmds/statsd/src/metrics/MetricProducer.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define DEBUG true  // STOPSHIP if true
+#define DEBUG false  // STOPSHIP if true
 #include "Log.h"
 #include "MetricProducer.h"
 
diff --git a/cmds/statsd/src/metrics/MetricProducer.h b/cmds/statsd/src/metrics/MetricProducer.h
index 532ecbf..6fe4bfb 100644
--- a/cmds/statsd/src/metrics/MetricProducer.h
+++ b/cmds/statsd/src/metrics/MetricProducer.h
@@ -52,6 +52,7 @@
           mWizard(wizard),
           mConditionTrackerIndex(conditionIndex),
           mContainANYPositionInDimensionsInWhat(false),
+          mSliceByPositionALL(false),
           mSameConditionDimensionsInTracker(false),
           mHasLinksToAllConditionDimensionsInTracker(false) {
     }
@@ -114,9 +115,15 @@
     // This method clears all the past buckets.
     void onDumpReport(const int64_t dumpTimeNs,
                       const bool include_current_partial_bucket,
+                      std::set<string> *str_set,
                       android::util::ProtoOutputStream* protoOutput) {
         std::lock_guard<std::mutex> lock(mMutex);
-        return onDumpReportLocked(dumpTimeNs, include_current_partial_bucket, protoOutput);
+        return onDumpReportLocked(dumpTimeNs, include_current_partial_bucket, str_set, protoOutput);
+    }
+
+    void clearPastBuckets(const int64_t dumpTimeNs) {
+        std::lock_guard<std::mutex> lock(mMutex);
+        return clearPastBucketsLocked(dumpTimeNs);
     }
 
     void dumpStates(FILE* out, bool verbose) const {
@@ -176,7 +183,9 @@
                                                   const int64_t eventTime) = 0;
     virtual void onDumpReportLocked(const int64_t dumpTimeNs,
                                     const bool include_current_partial_bucket,
+                                    std::set<string> *str_set,
                                     android::util::ProtoOutputStream* protoOutput) = 0;
+    virtual void clearPastBucketsLocked(const int64_t dumpTimeNs) = 0;
     virtual size_t byteSizeLocked() const = 0;
     virtual void dumpStatesLocked(FILE* out, bool verbose) const = 0;
 
@@ -212,6 +221,10 @@
         return mTimeBaseNs + (mCurrentBucketNum + 1) * mBucketSizeNs;
     }
 
+    int64_t getBucketNumFromEndTimeNs(const int64_t endNs) {
+        return (endNs - mTimeBaseNs) / mBucketSizeNs - 1;
+    }
+
     virtual void dropDataLocked(const int64_t dropTimeNs) = 0;
 
     const int64_t mMetricId;
@@ -244,6 +257,7 @@
     vector<Matcher> mDimensionsInCondition;  // The dimensions_in_condition defined in statsd_config
 
     bool mContainANYPositionInDimensionsInWhat;
+    bool mSliceByPositionALL;
 
     // True iff the condition dimensions equal to the sliced dimensions in the simple condition
     // tracker. This field is always false for combinational condition trackers.
diff --git a/cmds/statsd/src/metrics/MetricsManager.cpp b/cmds/statsd/src/metrics/MetricsManager.cpp
index 47a1a86..2d14b05 100644
--- a/cmds/statsd/src/metrics/MetricsManager.cpp
+++ b/cmds/statsd/src/metrics/MetricsManager.cpp
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#define DEBUG true  // STOPSHIP if true
+#define DEBUG false  // STOPSHIP if true
 #include "Log.h"
 #include "MetricsManager.h"
 #include "statslog.h"
@@ -36,6 +36,7 @@
 using android::util::FIELD_TYPE_INT32;
 using android::util::FIELD_TYPE_INT64;
 using android::util::FIELD_TYPE_MESSAGE;
+using android::util::FIELD_TYPE_STRING;
 using android::util::ProtoOutputStream;
 
 using std::make_unique;
@@ -61,7 +62,7 @@
     : mConfigKey(key), mUidMap(uidMap),
       mTtlNs(config.has_ttl_in_seconds() ? config.ttl_in_seconds() * NS_PER_SEC : -1),
       mTtlEndNs(-1),
-      mLastReportTimeNs(timeBaseNs),
+      mLastReportTimeNs(currentTimeNs),
       mLastReportWallClockNs(getWallClockNs()) {
     // Init the ttl end timestamp.
     refreshTtl(timeBaseNs);
@@ -192,15 +193,19 @@
 
 void MetricsManager::onDumpReport(const int64_t dumpTimeStampNs,
                                   const bool include_current_partial_bucket,
+                                  std::set<string> *str_set,
                                   ProtoOutputStream* protoOutput) {
     VLOG("=========================Metric Reports Start==========================");
     // one StatsLogReport per MetricProduer
     for (const auto& producer : mAllMetricProducers) {
         if (mNoReportMetricIds.find(producer->getMetricId()) == mNoReportMetricIds.end()) {
-            uint64_t token =
-                    protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_METRICS);
-            producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, protoOutput);
+            uint64_t token = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_METRICS);
+            producer->onDumpReport(dumpTimeStampNs, include_current_partial_bucket, str_set,
+                                   protoOutput);
             protoOutput->end(token);
+        } else {
+            producer->clearPastBuckets(dumpTimeStampNs);
         }
     }
     for (const auto& annotation : mAnnotations) {
@@ -211,6 +216,7 @@
         protoOutput->write(FIELD_TYPE_INT32 | FIELD_ID_ANNOTATIONS_INT32, annotation.second);
         protoOutput->end(token);
     }
+
     mLastReportTimeNs = dumpTimeStampNs;
     mLastReportWallClockNs = getWallClockNs();
     VLOG("=========================Metric Reports End==========================");
@@ -241,16 +247,6 @@
             return;
         }
 
-        // Label is 2nd from last field and must be from [0, 15].
-        long appHookLabel = event.GetLong(event.size()-1, &err);
-        if (err != NO_ERROR ) {
-            VLOG("APP_BREADCRUMB_REPORTED had error when parsing the label field");
-            return;
-        } else if (appHookLabel < 0 || appHookLabel > 15) {
-            VLOG("APP_BREADCRUMB_REPORTED does not have valid label %ld", appHookLabel);
-            return;
-        }
-
         // The state must be from 0,3. This part of code must be manually updated.
         long appHookState = event.GetLong(event.size(), &err);
         if (err != NO_ERROR ) {
diff --git a/cmds/statsd/src/metrics/MetricsManager.h b/cmds/statsd/src/metrics/MetricsManager.h
index 3d2c595..4f39df9e 100644
--- a/cmds/statsd/src/metrics/MetricsManager.h
+++ b/cmds/statsd/src/metrics/MetricsManager.h
@@ -79,7 +79,8 @@
         }
     };
 
-    // Returns the elapsed realtime when this metric manager last reported metrics.
+    // Returns the elapsed realtime when this metric manager last reported metrics. If this config
+    // has not yet dumped any reports, this is the time the metricsmanager was initialized.
     inline int64_t getLastReportTimeNs() const {
         return mLastReportTimeNs;
     };
@@ -92,6 +93,7 @@
 
     virtual void onDumpReport(const int64_t dumpTimeNs,
                               const bool include_current_partial_bucket,
+                              std::set<string> *str_set,
                               android::util::ProtoOutputStream* protoOutput);
 
     // Computes the total byte size of all metrics managed by a single config source.
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
index 27fd78f..69330ba 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
@@ -48,19 +48,26 @@
 // for StatsLogReport
 const int FIELD_ID_ID = 1;
 const int FIELD_ID_VALUE_METRICS = 7;
+const int FIELD_ID_TIME_BASE = 9;
+const int FIELD_ID_BUCKET_SIZE = 10;
+const int FIELD_ID_DIMENSION_PATH_IN_WHAT = 11;
+const int FIELD_ID_DIMENSION_PATH_IN_CONDITION = 12;
 // for ValueMetricDataWrapper
 const int FIELD_ID_DATA = 1;
 const int FIELD_ID_SKIPPED = 2;
-const int FIELD_ID_SKIPPED_START = 1;
-const int FIELD_ID_SKIPPED_END = 2;
+const int FIELD_ID_SKIPPED_START_MILLIS = 3;
+const int FIELD_ID_SKIPPED_END_MILLIS = 4;
 // for ValueMetricData
 const int FIELD_ID_DIMENSION_IN_WHAT = 1;
 const int FIELD_ID_DIMENSION_IN_CONDITION = 2;
 const int FIELD_ID_BUCKET_INFO = 3;
+const int FIELD_ID_DIMENSION_LEAF_IN_WHAT = 4;
+const int FIELD_ID_DIMENSION_LEAF_IN_CONDITION = 5;
 // for ValueBucketInfo
-const int FIELD_ID_START_BUCKET_NANOS = 1;
-const int FIELD_ID_END_BUCKET_NANOS = 2;
 const int FIELD_ID_VALUE = 3;
+const int FIELD_ID_BUCKET_NUM = 4;
+const int FIELD_ID_START_BUCKET_ELAPSED_MILLIS = 5;
+const int FIELD_ID_END_BUCKET_ELAPSED_MILLIS = 6;
 
 // ValueMetric has a minimum bucket size of 10min so that we don't pull too frequently
 ValueMetricProducer::ValueMetricProducer(const ConfigKey& key, const ValueMetric& metric,
@@ -113,6 +120,8 @@
         mField = mValueField.child(0).field();
     }
     mConditionSliced = (metric.links().size() > 0) || (mDimensionsInCondition.size() > 0);
+    mSliceByPositionALL = HasPositionALL(metric.dimensions_in_what()) ||
+            HasPositionALL(metric.dimensions_in_condition());
 
     // Kicks off the puller immediately.
     flushIfNeededLocked(startTimestampNs);
@@ -151,8 +160,15 @@
     mPastBuckets.clear();
 }
 
+void ValueMetricProducer::clearPastBucketsLocked(const int64_t dumpTimeNs) {
+    flushIfNeededLocked(dumpTimeNs);
+    mPastBuckets.clear();
+    mSkippedBuckets.clear();
+}
+
 void ValueMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs,
                                              const bool include_current_partial_bucket,
+                                             std::set<string> *str_set,
                                              ProtoOutputStream* protoOutput) {
     VLOG("metric %lld dump report now...", (long long)mMetricId);
     if (include_current_partial_bucket) {
@@ -164,13 +180,33 @@
         return;
     }
     protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_ID, (long long)mMetricId);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_TIME_BASE, (long long)mTimeBaseNs);
+    protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_SIZE, (long long)mBucketSizeNs);
+    // Fills the dimension path if not slicing by ALL.
+    if (!mSliceByPositionALL) {
+        if (!mDimensionsInWhat.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_WHAT);
+            writeDimensionPathToProto(mDimensionsInWhat, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+        if (!mDimensionsInCondition.empty()) {
+            uint64_t dimenPathToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_PATH_IN_CONDITION);
+            writeDimensionPathToProto(mDimensionsInCondition, protoOutput);
+            protoOutput->end(dimenPathToken);
+        }
+    }
+
     uint64_t protoToken = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_ID_VALUE_METRICS);
 
     for (const auto& pair : mSkippedBuckets) {
         uint64_t wrapperToken =
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_SKIPPED);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START, (long long)pair.first);
-        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END, (long long)pair.second);
+        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_START_MILLIS,
+                           (long long)(NanoToMillis(pair.first)));
+        protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_SKIPPED_END_MILLIS,
+                           (long long)(NanoToMillis(pair.second)));
         protoOutput->end(wrapperToken);
     }
     mSkippedBuckets.clear();
@@ -182,25 +218,43 @@
                 protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_DATA);
 
         // First fill dimension.
-        uint64_t dimensionToken = protoOutput->start(
-            FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
-        writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), protoOutput);
-        protoOutput->end(dimensionToken);
-        if (dimensionKey.hasDimensionKeyInCondition()) {
-            uint64_t dimensionInConditionToken = protoOutput->start(
-                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
-            writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(), protoOutput);
-            protoOutput->end(dimensionInConditionToken);
+        if (mSliceByPositionALL) {
+            uint64_t dimensionToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_WHAT);
+            writeDimensionToProto(dimensionKey.getDimensionKeyInWhat(), str_set, protoOutput);
+            protoOutput->end(dimensionToken);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                uint64_t dimensionInConditionToken = protoOutput->start(
+                        FIELD_TYPE_MESSAGE | FIELD_ID_DIMENSION_IN_CONDITION);
+                writeDimensionToProto(dimensionKey.getDimensionKeyInCondition(),
+                                      str_set, protoOutput);
+                protoOutput->end(dimensionInConditionToken);
+            }
+        } else {
+            writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInWhat(),
+                                           FIELD_ID_DIMENSION_LEAF_IN_WHAT, str_set, protoOutput);
+            if (dimensionKey.hasDimensionKeyInCondition()) {
+                writeDimensionLeafNodesToProto(dimensionKey.getDimensionKeyInCondition(),
+                                               FIELD_ID_DIMENSION_LEAF_IN_CONDITION,
+                                               str_set, protoOutput);
+            }
         }
 
         // Then fill bucket_info (ValueBucketInfo).
         for (const auto& bucket : pair.second) {
             uint64_t bucketInfoToken = protoOutput->start(
                     FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | FIELD_ID_BUCKET_INFO);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_NANOS,
-                               (long long)bucket.mBucketStartNs);
-            protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_NANOS,
-                               (long long)bucket.mBucketEndNs);
+
+            if (bucket.mBucketEndNs - bucket.mBucketStartNs != mBucketSizeNs) {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_START_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketStartNs));
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_END_BUCKET_ELAPSED_MILLIS,
+                                   (long long)NanoToMillis(bucket.mBucketEndNs));
+            } else {
+                protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_BUCKET_NUM,
+                                   (long long)(getBucketNumFromEndTimeNs(bucket.mBucketEndNs)));
+            }
+
             protoOutput->write(FIELD_TYPE_INT64 | FIELD_ID_VALUE, (long long)bucket.mValue);
             protoOutput->end(bucketInfoToken);
             VLOG("\t bucket [%lld - %lld] count: %lld", (long long)bucket.mBucketStartNs,
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.h b/cmds/statsd/src/metrics/ValueMetricProducer.h
index 8df30d3..113be4b 100644
--- a/cmds/statsd/src/metrics/ValueMetricProducer.h
+++ b/cmds/statsd/src/metrics/ValueMetricProducer.h
@@ -88,7 +88,9 @@
 private:
     void onDumpReportLocked(const int64_t dumpTimeNs,
                             const bool include_current_partial_bucket,
+                            std::set<string> *str_set,
                             android::util::ProtoOutputStream* protoOutput) override;
+    void clearPastBucketsLocked(const int64_t dumpTimeNs) override;
 
     // Internal interface to handle condition change.
     void onConditionChangedLocked(const bool conditionMet, const int64_t eventTime) override;
diff --git a/cmds/statsd/src/packages/UidMap.cpp b/cmds/statsd/src/packages/UidMap.cpp
index 2674171..fff909c 100644
--- a/cmds/statsd/src/packages/UidMap.cpp
+++ b/cmds/statsd/src/packages/UidMap.cpp
@@ -16,6 +16,7 @@
 #define DEBUG false  // STOPSHIP if true
 #include "Log.h"
 
+#include "hash.h"
 #include "stats_log_util.h"
 #include "guardrail/StatsdStats.h"
 #include "packages/UidMap.h"
@@ -34,6 +35,7 @@
 using android::util::FIELD_TYPE_FLOAT;
 using android::util::FIELD_TYPE_INT32;
 using android::util::FIELD_TYPE_INT64;
+using android::util::FIELD_TYPE_UINT64;
 using android::util::FIELD_TYPE_MESSAGE;
 using android::util::FIELD_TYPE_STRING;
 using android::util::ProtoOutputStream;
@@ -46,6 +48,7 @@
 const int FIELD_ID_SNAPSHOT_PACKAGE_VERSION = 2;
 const int FIELD_ID_SNAPSHOT_PACKAGE_UID = 3;
 const int FIELD_ID_SNAPSHOT_PACKAGE_DELETED = 4;
+const int FIELD_ID_SNAPSHOT_PACKAGE_NAME_HASH = 5;
 const int FIELD_ID_SNAPSHOT_TIMESTAMP = 1;
 const int FIELD_ID_SNAPSHOT_PACKAGE_INFO = 2;
 const int FIELD_ID_SNAPSHOTS = 1;
@@ -56,6 +59,7 @@
 const int FIELD_ID_CHANGE_UID = 4;
 const int FIELD_ID_CHANGE_NEW_VERSION = 5;
 const int FIELD_ID_CHANGE_PREV_VERSION = 6;
+const int FIELD_ID_CHANGE_PACKAGE_HASH = 7;
 
 UidMap::UidMap() : mBytesUsed(0) {}
 
@@ -312,7 +316,7 @@
 }
 
 void UidMap::appendUidMap(const int64_t& timestamp, const ConfigKey& key,
-                          ProtoOutputStream* proto) {
+                          std::set<string> *str_set, ProtoOutputStream* proto) {
     lock_guard<mutex> lock(mMutex);  // Lock for updates
 
     for (const ChangeRecord& record : mChanges) {
@@ -322,7 +326,14 @@
             proto->write(FIELD_TYPE_BOOL | FIELD_ID_CHANGE_DELETION, (bool)record.deletion);
             proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_TIMESTAMP,
                          (long long)record.timestampNs);
-            proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_PACKAGE, record.package);
+            if (str_set != nullptr) {
+                str_set->insert(record.package);
+                proto->write(FIELD_TYPE_UINT64 | FIELD_ID_CHANGE_PACKAGE_HASH,
+                             (long long)Hash64(record.package));
+            } else {
+                proto->write(FIELD_TYPE_STRING | FIELD_ID_CHANGE_PACKAGE, record.package);
+            }
+
             proto->write(FIELD_TYPE_INT32 | FIELD_ID_CHANGE_UID, (int)record.uid);
             proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_NEW_VERSION, (long long)record.version);
             proto->write(FIELD_TYPE_INT64 | FIELD_ID_CHANGE_PREV_VERSION,
@@ -338,7 +349,15 @@
     for (const auto& kv : mMap) {
         uint64_t token = proto->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
                                       FIELD_ID_SNAPSHOT_PACKAGE_INFO);
-        proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_NAME, kv.first.second);
+
+        if (str_set != nullptr) {
+            str_set->insert(kv.first.second);
+            proto->write(FIELD_TYPE_UINT64 | FIELD_ID_SNAPSHOT_PACKAGE_NAME_HASH,
+                         (long long)Hash64(kv.first.second));
+        } else {
+            proto->write(FIELD_TYPE_STRING | FIELD_ID_SNAPSHOT_PACKAGE_NAME, kv.first.second);
+        }
+
         proto->write(FIELD_TYPE_INT64 | FIELD_ID_SNAPSHOT_PACKAGE_VERSION,
                      (long long)kv.second.versionCode);
         proto->write(FIELD_TYPE_INT32 | FIELD_ID_SNAPSHOT_PACKAGE_UID, kv.first.first);
diff --git a/cmds/statsd/src/packages/UidMap.h b/cmds/statsd/src/packages/UidMap.h
index 755b707..5e42cd1 100644
--- a/cmds/statsd/src/packages/UidMap.h
+++ b/cmds/statsd/src/packages/UidMap.h
@@ -128,7 +128,7 @@
     // If every config key has received a change or snapshot record, then this
     // record is deleted.
     void appendUidMap(const int64_t& timestamp, const ConfigKey& key,
-                      util::ProtoOutputStream* proto);
+                      std::set<string> *str_set, util::ProtoOutputStream* proto);
 
     // Forces the output to be cleared. We still generate a snapshot based on the current state.
     // This results in extra data uploaded but helps us reconstruct the uid mapping on the server
diff --git a/cmds/statsd/src/stats_log.proto b/cmds/statsd/src/stats_log.proto
index 447e4b7..2fe17da 100644
--- a/cmds/statsd/src/stats_log.proto
+++ b/cmds/statsd/src/stats_log.proto
@@ -33,6 +33,7 @@
     bool value_bool = 5;
     float value_float = 6;
     DimensionsValueTuple value_tuple = 7;
+    uint64 value_str_hash = 8;
   }
 }
 
@@ -54,6 +55,12 @@
   optional int64 end_bucket_elapsed_nanos = 2;
 
   optional int64 count = 3;
+
+  optional int64 bucket_num = 4;
+
+  optional int64 start_bucket_elapsed_millis = 5;
+
+  optional int64 end_bucket_elapsed_millis = 6;
 }
 
 message CountMetricData {
@@ -62,6 +69,10 @@
   optional DimensionsValue dimensions_in_condition = 2;
 
   repeated CountBucketInfo bucket_info = 3;
+
+  repeated DimensionsValue dimension_leaf_values_in_what = 4;
+
+  repeated DimensionsValue dimension_leaf_values_in_condition = 5;
 }
 
 message DurationBucketInfo {
@@ -70,6 +81,12 @@
   optional int64 end_bucket_elapsed_nanos = 2;
 
   optional int64 duration_nanos = 3;
+
+  optional int64 bucket_num = 4;
+
+  optional int64 start_bucket_elapsed_millis = 5;
+
+  optional int64 end_bucket_elapsed_millis = 6;
 }
 
 message DurationMetricData {
@@ -78,6 +95,10 @@
   optional DimensionsValue dimensions_in_condition = 2;
 
   repeated DurationBucketInfo bucket_info = 3;
+
+  repeated DimensionsValue dimension_leaf_values_in_what = 4;
+
+  repeated DimensionsValue dimension_leaf_values_in_condition = 5;
 }
 
 message ValueBucketInfo {
@@ -86,6 +107,12 @@
   optional int64 end_bucket_elapsed_nanos = 2;
 
   optional int64 value = 3;
+
+  optional int64 bucket_num = 4;
+
+  optional int64 start_bucket_elapsed_millis = 5;
+
+  optional int64 end_bucket_elapsed_millis = 6;
 }
 
 message ValueMetricData {
@@ -94,6 +121,10 @@
   optional DimensionsValue dimensions_in_condition = 2;
 
   repeated ValueBucketInfo bucket_info = 3;
+
+  repeated DimensionsValue dimension_leaf_values_in_what = 4;
+
+  repeated DimensionsValue dimension_leaf_values_in_condition = 5;
 }
 
 message GaugeBucketInfo {
@@ -106,6 +137,12 @@
   repeated int64 elapsed_timestamp_nanos = 4;
 
   repeated int64 wall_clock_timestamp_nanos = 5;
+
+  optional int64 bucket_num = 6;
+
+  optional int64 start_bucket_elapsed_millis = 7;
+
+  optional int64 end_bucket_elapsed_millis = 8;
 }
 
 message GaugeMetricData {
@@ -114,6 +151,10 @@
   optional DimensionsValue dimensions_in_condition = 2;
 
   repeated GaugeBucketInfo bucket_info = 3;
+
+  repeated DimensionsValue dimension_leaf_values_in_what = 4;
+
+  repeated DimensionsValue dimension_leaf_values_in_condition = 5;
 }
 
 message StatsLogReport {
@@ -122,8 +163,10 @@
   // Fields 2 and 3 are reserved.
 
   message SkippedBuckets {
-      optional int64 start_elapsed_nanos = 1;
-      optional int64 end_elapsed_nanos = 2;
+      optional int64 start_bucket_elapsed_nanos = 1;
+      optional int64 end_bucket_elapsed_nanos = 2;
+      optional int64 start_bucket_elapsed_millis = 3;
+      optional int64 end_bucket_elapsed_millis = 4;
   }
 
   message EventMetricDataWrapper {
@@ -152,6 +195,14 @@
     ValueMetricDataWrapper value_metrics = 7;
     GaugeMetricDataWrapper gauge_metrics = 8;
   }
+
+  optional int64 time_base_elapsed_nano_seconds = 9;
+
+  optional int64 bucket_size_nano_seconds = 10;
+
+  optional DimensionsValue dimensions_path_in_what = 11;
+
+  optional DimensionsValue dimensions_path_in_condition = 12;
 }
 
 message UidMapping {
@@ -164,6 +215,8 @@
             optional int32 uid = 3;
 
             optional bool deleted = 4;
+
+            optional uint64 name_hash = 5;
         }
         optional int64 elapsed_timestamp_nanos = 1;
 
@@ -180,6 +233,7 @@
 
         optional int64 new_version = 5;
         optional int64 prev_version = 6;
+        optional uint64 app_hash = 7;
     }
     repeated Change changes = 2;
 }
@@ -197,6 +251,12 @@
 
   optional int64 current_report_wall_clock_nanos = 6;
 
+  message Annotation {
+      optional int64 field_int64 = 1;
+      optional int32 field_int32 = 2;
+  }
+  repeated Annotation annotation = 7;
+
   enum DumpReportReason {
       DEVICE_SHUTDOWN = 1;
       CONFIG_UPDATED = 2;
@@ -208,11 +268,7 @@
   }
   optional DumpReportReason dump_report_reason = 8;
 
-  message Annotation {
-      optional int64 field_int64 = 1;
-      optional int32 field_int32 = 2;
-  }
-  repeated Annotation annotation = 7;
+  repeated string strings = 9;
 }
 
 message ConfigMetricsReportList {
@@ -327,4 +383,6 @@
     repeated SkippedLogEventStats skipped_log_event_stats = 13;
 
     repeated int64 log_loss_stats = 14;
+
+    repeated int32 system_restart_sec = 15;
 }
diff --git a/cmds/statsd/src/stats_log_util.cpp b/cmds/statsd/src/stats_log_util.cpp
index efd810f..a0ab3e4 100644
--- a/cmds/statsd/src/stats_log_util.cpp
+++ b/cmds/statsd/src/stats_log_util.cpp
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include "hash.h"
 #include "stats_log_util.h"
 
 #include <logd/LogEvent.h>
@@ -29,6 +30,8 @@
 using android::util::FIELD_TYPE_FLOAT;
 using android::util::FIELD_TYPE_INT32;
 using android::util::FIELD_TYPE_INT64;
+using android::util::FIELD_TYPE_UINT64;
+using android::util::FIELD_TYPE_FIXED64;
 using android::util::FIELD_TYPE_MESSAGE;
 using android::util::FIELD_TYPE_STRING;
 using android::util::ProtoOutputStream;
@@ -45,6 +48,7 @@
 // const int DIMENSIONS_VALUE_VALUE_BOOL = 5; // logd doesn't have bool data type.
 const int DIMENSIONS_VALUE_VALUE_FLOAT = 6;
 const int DIMENSIONS_VALUE_VALUE_TUPLE = 7;
+const int DIMENSIONS_VALUE_VALUE_STR_HASH = 8;
 
 const int DIMENSIONS_VALUE_TUPLE_VALUE = 1;
 
@@ -54,10 +58,12 @@
 const int FIELD_ID_TOTAL_PULL = 2;
 const int FIELD_ID_TOTAL_PULL_FROM_CACHE = 3;
 const int FIELD_ID_MIN_PULL_INTERVAL_SEC = 4;
+
 namespace {
 
 void writeDimensionToProtoHelper(const std::vector<FieldValue>& dims, size_t* index, int depth,
-                                 int prefix, ProtoOutputStream* protoOutput) {
+                                 int prefix, std::set<string> *str_set,
+                                 ProtoOutputStream* protoOutput) {
     size_t count = dims.size();
     while (*index < count) {
         const auto& dim = dims[*index];
@@ -87,8 +93,15 @@
                                        dim.mValue.float_value);
                     break;
                 case STRING:
-                    protoOutput->write(FIELD_TYPE_STRING | DIMENSIONS_VALUE_VALUE_STR,
-                                       dim.mValue.str_value);
+                    if (str_set == nullptr) {
+                        protoOutput->write(FIELD_TYPE_STRING | DIMENSIONS_VALUE_VALUE_STR,
+                                           dim.mValue.str_value);
+                    } else {
+                        str_set->insert(dim.mValue.str_value);
+                        protoOutput->write(
+                                FIELD_TYPE_UINT64 | DIMENSIONS_VALUE_VALUE_STR_HASH,
+                                (long long)Hash64(dim.mValue.str_value));
+                    }
                     break;
                 default:
                     break;
@@ -105,7 +118,107 @@
             uint64_t tupleToken =
                     protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
             writeDimensionToProtoHelper(dims, index, valueDepth, dim.mField.getPrefix(valueDepth),
-                                        protoOutput);
+                                        str_set, protoOutput);
+            protoOutput->end(tupleToken);
+            protoOutput->end(dimensionToken);
+        } else {
+            // Done with the prev sub tree
+            return;
+        }
+    }
+}
+
+void writeDimensionLeafToProtoHelper(const std::vector<FieldValue>& dims,
+                                     const int dimensionLeafField,
+                                     size_t* index, int depth,
+                                     int prefix, std::set<string> *str_set,
+                                     ProtoOutputStream* protoOutput) {
+    size_t count = dims.size();
+    while (*index < count) {
+        const auto& dim = dims[*index];
+        const int valueDepth = dim.mField.getDepth();
+        const int valuePrefix = dim.mField.getPrefix(depth);
+        if (valueDepth > 2) {
+            ALOGE("Depth > 2 not supported");
+            return;
+        }
+
+        if (depth == valueDepth && valuePrefix == prefix) {
+            uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
+                                                dimensionLeafField);
+            switch (dim.mValue.getType()) {
+                case INT:
+                    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_VALUE_INT,
+                                       dim.mValue.int_value);
+                    break;
+                case LONG:
+                    protoOutput->write(FIELD_TYPE_INT64 | DIMENSIONS_VALUE_VALUE_LONG,
+                                       (long long)dim.mValue.long_value);
+                    break;
+                case FLOAT:
+                    protoOutput->write(FIELD_TYPE_FLOAT | DIMENSIONS_VALUE_VALUE_FLOAT,
+                                       dim.mValue.float_value);
+                    break;
+                case STRING:
+                    if (str_set == nullptr) {
+                        protoOutput->write(FIELD_TYPE_STRING | DIMENSIONS_VALUE_VALUE_STR,
+                                           dim.mValue.str_value);
+                    } else {
+                        str_set->insert(dim.mValue.str_value);
+                        protoOutput->write(
+                                FIELD_TYPE_UINT64 | DIMENSIONS_VALUE_VALUE_STR_HASH,
+                                (long long)Hash64(dim.mValue.str_value));
+                    }
+                    break;
+                default:
+                    break;
+            }
+            if (token != 0) {
+                protoOutput->end(token);
+            }
+            (*index)++;
+        } else if (valueDepth > depth && valuePrefix == prefix) {
+            writeDimensionLeafToProtoHelper(dims, dimensionLeafField,
+                                            index, valueDepth, dim.mField.getPrefix(valueDepth),
+                                            str_set, protoOutput);
+        } else {
+            // Done with the prev sub tree
+            return;
+        }
+    }
+}
+
+void writeDimensionPathToProtoHelper(const std::vector<Matcher>& fieldMatchers,
+                                     size_t* index, int depth, int prefix,
+                                     ProtoOutputStream* protoOutput) {
+    size_t count = fieldMatchers.size();
+    while (*index < count) {
+        const Field& field = fieldMatchers[*index].mMatcher;
+        const int valueDepth = field.getDepth();
+        const int valuePrefix = field.getPrefix(depth);
+        const int fieldNum = field.getPosAtDepth(depth);
+        if (valueDepth > 2) {
+            ALOGE("Depth > 2 not supported");
+            return;
+        }
+
+        if (depth == valueDepth && valuePrefix == prefix) {
+            uint64_t token = protoOutput->start(FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED |
+                                                 DIMENSIONS_VALUE_TUPLE_VALUE);
+            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
+            if (token != 0) {
+                protoOutput->end(token);
+            }
+            (*index)++;
+        } else if (valueDepth > depth && valuePrefix == prefix) {
+            // Writing the sub tree
+            uint64_t dimensionToken = protoOutput->start(
+                    FIELD_TYPE_MESSAGE | FIELD_COUNT_REPEATED | DIMENSIONS_VALUE_TUPLE_VALUE);
+            protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD, fieldNum);
+            uint64_t tupleToken =
+                    protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
+            writeDimensionPathToProtoHelper(fieldMatchers, index, valueDepth,
+                                            field.getPrefix(valueDepth), protoOutput);
             protoOutput->end(tupleToken);
             protoOutput->end(dimensionToken);
         } else {
@@ -117,7 +230,8 @@
 
 }  // namespace
 
-void writeDimensionToProto(const HashableDimensionKey& dimension, ProtoOutputStream* protoOutput) {
+void writeDimensionToProto(const HashableDimensionKey& dimension, std::set<string> *str_set,
+                           ProtoOutputStream* protoOutput) {
     if (dimension.getValues().size() == 0) {
         return;
     }
@@ -125,7 +239,32 @@
                        dimension.getValues()[0].mField.getTag());
     uint64_t topToken = protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
     size_t index = 0;
-    writeDimensionToProtoHelper(dimension.getValues(), &index, 0, 0, protoOutput);
+    writeDimensionToProtoHelper(dimension.getValues(), &index, 0, 0, str_set, protoOutput);
+    protoOutput->end(topToken);
+}
+
+void writeDimensionLeafNodesToProto(const HashableDimensionKey& dimension,
+                                    const int dimensionLeafFieldId,
+                                    std::set<string> *str_set,
+                                    ProtoOutputStream* protoOutput) {
+    if (dimension.getValues().size() == 0) {
+        return;
+    }
+    size_t index = 0;
+    writeDimensionLeafToProtoHelper(dimension.getValues(), dimensionLeafFieldId,
+                                    &index, 0, 0, str_set, protoOutput);
+}
+
+void writeDimensionPathToProto(const std::vector<Matcher>& fieldMatchers,
+                               ProtoOutputStream* protoOutput) {
+    if (fieldMatchers.size() == 0) {
+        return;
+    }
+    protoOutput->write(FIELD_TYPE_INT32 | DIMENSIONS_VALUE_FIELD,
+                       fieldMatchers[0].mMatcher.getTag());
+    uint64_t topToken = protoOutput->start(FIELD_TYPE_MESSAGE | DIMENSIONS_VALUE_VALUE_TUPLE);
+    size_t index = 0;
+    writeDimensionPathToProtoHelper(fieldMatchers, &index, 0, 0, protoOutput);
     protoOutput->end(topToken);
 }
 
@@ -297,6 +436,14 @@
     return timestampNs / NS_PER_SEC / (5 * 60) * NS_PER_SEC * (5 * 60);
 }
 
+int64_t NanoToMillis(const int64_t nano) {
+    return nano / 1000000;
+}
+
+int64_t MillisToNano(const int64_t millis) {
+    return millis * 1000000;
+}
+
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
diff --git a/cmds/statsd/src/stats_log_util.h b/cmds/statsd/src/stats_log_util.h
index 9722050..b8f6850 100644
--- a/cmds/statsd/src/stats_log_util.h
+++ b/cmds/statsd/src/stats_log_util.h
@@ -28,9 +28,17 @@
 
 void writeFieldValueTreeToStream(int tagId, const std::vector<FieldValue>& values,
                                  util::ProtoOutputStream* protoOutput);
-void writeDimensionToProto(const HashableDimensionKey& dimension,
+void writeDimensionToProto(const HashableDimensionKey& dimension, std::set<string> *str_set,
                            util::ProtoOutputStream* protoOutput);
 
+void writeDimensionLeafNodesToProto(const HashableDimensionKey& dimension,
+                                    const int dimensionLeafFieldId,
+                                    std::set<string> *str_set,
+                                    util::ProtoOutputStream* protoOutput);
+
+void writeDimensionPathToProto(const std::vector<Matcher>& fieldMatchers,
+                               util::ProtoOutputStream* protoOutput);
+
 // Convert the TimeUnit enum to the bucket size in millis with a guardrail on
 // bucket size.
 int64_t TimeUnitToBucketSizeInMillisGuardrailed(int uid, TimeUnit unit);
@@ -56,6 +64,10 @@
 // Gets the wall clock timestamp in seconds.
 int64_t getWallClockSec();
 
+int64_t NanoToMillis(const int64_t nano);
+
+int64_t MillisToNano(const int64_t millis);
+
 // Helper function to write PulledAtomStats to ProtoOutputStream
 void writePullerStatsToStream(const std::pair<int, StatsdStats::PulledAtomStats>& pair,
                               util::ProtoOutputStream* protoOutput);
diff --git a/cmds/statsd/src/storage/StorageManager.cpp b/cmds/statsd/src/storage/StorageManager.cpp
index ea8da14..1f81812 100644
--- a/cmds/statsd/src/storage/StorageManager.cpp
+++ b/cmds/statsd/src/storage/StorageManager.cpp
@@ -160,6 +160,34 @@
     }
 }
 
+bool StorageManager::hasConfigMetricsReport(const ConfigKey& key) {
+    unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_DATA_DIR), closedir);
+    if (dir == NULL) {
+        VLOG("Path %s does not exist", STATS_DATA_DIR);
+        return false;
+    }
+
+    string suffix = StringPrintf("%d_%lld", key.GetUid(), (long long)key.GetId());
+
+    dirent* de;
+    while ((de = readdir(dir.get()))) {
+        char* name = de->d_name;
+        if (name[0] == '.') continue;
+
+        size_t nameLen = strlen(name);
+        size_t suffixLen = suffix.length();
+        if (suffixLen <= nameLen &&
+            strncmp(name + nameLen - suffixLen, suffix.c_str(), suffixLen) == 0) {
+            // Check again that the file name is parseable.
+            int64_t result[3];
+            parseFileName(name, result);
+            if (result[0] == -1) continue;
+            return true;
+        }
+    }
+    return false;
+}
+
 void StorageManager::appendConfigMetricsReport(const ConfigKey& key, ProtoOutputStream* proto) {
     unique_ptr<DIR, decltype(&closedir)> dir(opendir(STATS_DATA_DIR), closedir);
     if (dir == NULL) {
diff --git a/cmds/statsd/src/storage/StorageManager.h b/cmds/statsd/src/storage/StorageManager.h
index 8953be9..4840f3c 100644
--- a/cmds/statsd/src/storage/StorageManager.h
+++ b/cmds/statsd/src/storage/StorageManager.h
@@ -63,6 +63,11 @@
                               const std::function<void(const ConfigKey&)>& sendBroadcast);
 
     /**
+     * Returns true if there's at least one report on disk.
+     */
+    static bool hasConfigMetricsReport(const ConfigKey& key);
+
+    /**
      * Appends ConfigMetricsReport found on disk to the specific proto and
      * delete it.
      */
diff --git a/cmds/statsd/src/subscriber/IncidentdReporter.cpp b/cmds/statsd/src/subscriber/IncidentdReporter.cpp
index 1c18f67..6e4b2c8 100644
--- a/cmds/statsd/src/subscriber/IncidentdReporter.cpp
+++ b/cmds/statsd/src/subscriber/IncidentdReporter.cpp
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#define DEBUG true
+#define DEBUG false
 #include "Log.h"
 
 #include "IncidentdReporter.h"
diff --git a/cmds/statsd/tests/FieldValue_test.cpp b/cmds/statsd/tests/FieldValue_test.cpp
index 5a6aba6..c253bc1 100644
--- a/cmds/statsd/tests/FieldValue_test.cpp
+++ b/cmds/statsd/tests/FieldValue_test.cpp
@@ -226,6 +226,68 @@
     EXPECT_EQ((int32_t)27, link.conditionFields[0].mMatcher.getTag());
 }
 
+TEST(AtomMatcherTest, TestWriteDimensionPath) {
+    for (auto position : {Position::ANY, Position::ALL, Position::FIRST, Position::LAST}) {
+        FieldMatcher matcher1;
+        matcher1.set_field(10);
+        FieldMatcher* child = matcher1.add_child();
+        child->set_field(2);
+        child->set_position(position);
+        child->add_child()->set_field(1);
+        child->add_child()->set_field(3);
+
+        child = matcher1.add_child();
+        child->set_field(4);
+
+        child = matcher1.add_child();
+        child->set_field(6);
+        child->add_child()->set_field(2);
+
+        vector<Matcher> matchers;
+        translateFieldMatcher(matcher1, &matchers);
+
+        android::util::ProtoOutputStream protoOut;
+        writeDimensionPathToProto(matchers, &protoOut);
+
+        vector<uint8_t> outData;
+        outData.resize(protoOut.size());
+        size_t pos = 0;
+        auto iter = protoOut.data();
+        while (iter.readBuffer() != NULL) {
+            size_t toRead = iter.currentToRead();
+            std::memcpy(&(outData[pos]), iter.readBuffer(), toRead);
+            pos += toRead;
+            iter.rp()->move(toRead);
+        }
+
+        DimensionsValue result;
+        EXPECT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
+
+        EXPECT_EQ(10, result.field());
+        EXPECT_EQ(DimensionsValue::ValueCase::kValueTuple, result.value_case());
+        EXPECT_EQ(3, result.value_tuple().dimensions_value_size());
+
+        const auto& dim1 = result.value_tuple().dimensions_value(0);
+        EXPECT_EQ(2, dim1.field());
+        EXPECT_EQ(2, dim1.value_tuple().dimensions_value_size());
+
+        const auto& dim11 = dim1.value_tuple().dimensions_value(0);
+        EXPECT_EQ(1, dim11.field());
+
+        const auto& dim12 = dim1.value_tuple().dimensions_value(1);
+        EXPECT_EQ(3, dim12.field());
+
+        const auto& dim2 = result.value_tuple().dimensions_value(1);
+        EXPECT_EQ(4, dim2.field());
+
+        const auto& dim3 = result.value_tuple().dimensions_value(2);
+        EXPECT_EQ(6, dim3.field());
+        EXPECT_EQ(1, dim3.value_tuple().dimensions_value_size());
+        const auto& dim31 = dim3.value_tuple().dimensions_value(0);
+        EXPECT_EQ(2, dim31.field());
+    }
+}
+
 TEST(AtomMatcherTest, TestSubscriberDimensionWrite) {
     HashableDimensionKey dim;
 
@@ -275,7 +337,7 @@
     dim.addValue(FieldValue(field4, value4));
 
     android::util::ProtoOutputStream protoOut;
-    writeDimensionToProto(dim, &protoOut);
+    writeDimensionToProto(dim, nullptr /* include strings */, &protoOut);
 
     vector<uint8_t> outData;
     outData.resize(protoOut.size());
@@ -315,6 +377,62 @@
     EXPECT_EQ(99999, dim2.value_int());
 }
 
+TEST(AtomMatcherTest, TestWriteDimensionLeafNodesToProto) {
+    HashableDimensionKey dim;
+    int pos1[] = {1, 1, 1};
+    int pos2[] = {1, 1, 2};
+    int pos3[] = {1, 1, 3};
+    int pos4[] = {2, 0, 0};
+    Field field1(10, pos1, 2);
+    Field field2(10, pos2, 2);
+    Field field3(10, pos3, 2);
+    Field field4(10, pos4, 0);
+
+    Value value1((int32_t)10025);
+    Value value2("tag");
+    Value value3((int32_t)987654);
+    Value value4((int64_t)99999);
+
+    dim.addValue(FieldValue(field1, value1));
+    dim.addValue(FieldValue(field2, value2));
+    dim.addValue(FieldValue(field3, value3));
+    dim.addValue(FieldValue(field4, value4));
+
+    android::util::ProtoOutputStream protoOut;
+    writeDimensionLeafNodesToProto(dim, 1, nullptr /* include strings */, &protoOut);
+
+    vector<uint8_t> outData;
+    outData.resize(protoOut.size());
+    size_t pos = 0;
+    auto iter = protoOut.data();
+    while (iter.readBuffer() != NULL) {
+        size_t toRead = iter.currentToRead();
+        std::memcpy(&(outData[pos]), iter.readBuffer(), toRead);
+        pos += toRead;
+        iter.rp()->move(toRead);
+    }
+
+    DimensionsValueTuple result;
+    EXPECT_EQ(true, result.ParseFromArray(&outData[0], outData.size()));
+    EXPECT_EQ(4, result.dimensions_value_size());
+
+    const auto& dim1 = result.dimensions_value(0);
+    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim1.value_case());
+    EXPECT_EQ(10025, dim1.value_int());
+
+    const auto& dim2 = result.dimensions_value(1);
+    EXPECT_EQ(DimensionsValue::ValueCase::kValueStr, dim2.value_case());
+    EXPECT_EQ("tag", dim2.value_str());
+
+    const auto& dim3 = result.dimensions_value(2);
+    EXPECT_EQ(DimensionsValue::ValueCase::kValueInt, dim3.value_case());
+    EXPECT_EQ(987654, dim3.value_int());
+
+    const auto& dim4 = result.dimensions_value(3);
+    EXPECT_EQ(DimensionsValue::ValueCase::kValueLong, dim4.value_case());
+    EXPECT_EQ(99999, dim4.value_long());
+}
+
 TEST(AtomMatcherTest, TestWriteAtomToProto) {
     AttributionNodeInternal attribution_node1;
     attribution_node1.set_uid(1111);
diff --git a/cmds/statsd/tests/StatsLogProcessor_test.cpp b/cmds/statsd/tests/StatsLogProcessor_test.cpp
index 004b235..de6e6e5 100644
--- a/cmds/statsd/tests/StatsLogProcessor_test.cpp
+++ b/cmds/statsd/tests/StatsLogProcessor_test.cpp
@@ -62,7 +62,7 @@
     sp<AlarmMonitor> periodicAlarmMonitor;
     // Construct the processor with a dummy sendBroadcast function that does nothing.
     StatsLogProcessor p(m, anomalyAlarmMonitor, periodicAlarmMonitor, 0,
-        [](const ConfigKey& key) {});
+        [](const ConfigKey& key) {return true;});
 
     MockMetricsManager mockMetricsManager;
 
@@ -81,7 +81,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     int broadcastCount = 0;
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; });
+                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; return true;});
 
     MockMetricsManager mockMetricsManager;
 
@@ -107,7 +107,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     int broadcastCount = 0;
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; });
+                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; return true;});
 
     MockMetricsManager mockMetricsManager;
 
@@ -131,7 +131,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     int broadcastCount = 0;
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; });
+                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; return true;});
     ConfigKey key(3, 4);
     StatsdConfig config;
     config.add_allowed_log_source("AID_ROOT");
@@ -139,7 +139,7 @@
 
     // Expect to get no metrics, but snapshot specified above in uidmap.
     vector<uint8_t> bytes;
-    p.onDumpReport(key, 1, false, ADB_DUMP, &bytes);
+    p.onDumpReport(key, 1, false, true, ADB_DUMP, &bytes);
 
     ConfigMetricsReportList output;
     output.ParseFromArray(bytes.data(), bytes.size());
@@ -156,7 +156,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     int broadcastCount = 0;
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; });
+                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; return true;});
     ConfigKey key(3, 4);
     StatsdConfig config;
     auto annotation = config.add_annotation();
@@ -167,7 +167,7 @@
 
     // Expect to get no metrics, but snapshot specified above in uidmap.
     vector<uint8_t> bytes;
-    p.onDumpReport(key, 1, false, ADB_DUMP, &bytes);
+    p.onDumpReport(key, 1, false, true, ADB_DUMP, &bytes);
 
     ConfigMetricsReportList output;
     output.ParseFromArray(bytes.data(), bytes.size());
@@ -185,7 +185,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     int broadcastCount = 0;
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; });
+                        [&broadcastCount](const ConfigKey& key) { broadcastCount++; return true;});
 
     LogEvent event1(0, 1 /*logd timestamp*/, 1001 /*elapsedRealtime*/);
     event1.init();
diff --git a/cmds/statsd/tests/UidMap_test.cpp b/cmds/statsd/tests/UidMap_test.cpp
index 2fab975..e23131d 100644
--- a/cmds/statsd/tests/UidMap_test.cpp
+++ b/cmds/statsd/tests/UidMap_test.cpp
@@ -17,6 +17,7 @@
 #include "config/ConfigKey.h"
 #include "guardrail/StatsdStats.h"
 #include "logd/LogEvent.h"
+#include "hash.h"
 #include "statslog.h"
 #include "statsd_test_util.h"
 
@@ -43,7 +44,7 @@
     sp<AlarmMonitor> subscriberAlarmMonitor;
     // Construct the processor with a dummy sendBroadcast function that does nothing.
     StatsLogProcessor p(m, anomalyAlarmMonitor, subscriberAlarmMonitor, 0,
-        [](const ConfigKey& key) {});
+        [](const ConfigKey& key) {return true;});
     LogEvent addEvent(android::util::ISOLATED_UID_CHANGED, 1);
     addEvent.write(100);  // parent UID
     addEvent.write(101);  // isolated UID
@@ -192,7 +193,7 @@
     m.mLastUpdatePerConfigKey[config1] = 2;
 
     ProtoOutputStream proto;
-    m.appendUidMap(3, config1, &proto);
+    m.appendUidMap(3, config1, nullptr, &proto);
 
     // Check there's still a uidmap attached this one.
     UidMapping results;
@@ -215,7 +216,7 @@
     m.removeApp(2, String16(kApp2.c_str()), 1000);
 
     ProtoOutputStream proto;
-    m.appendUidMap(3, config1, &proto);
+    m.appendUidMap(3, config1, nullptr, &proto);
 
     // Snapshot should still contain this item as deleted.
     UidMapping results;
@@ -243,7 +244,7 @@
     // First, verify that we have the expected number of items.
     UidMapping results;
     ProtoOutputStream proto;
-    m.appendUidMap(3, config1, &proto);
+    m.appendUidMap(3, config1, nullptr, &proto);
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(maxDeletedApps + 10, results.snapshots(0).package_info_size());
 
@@ -254,7 +255,7 @@
     }
 
     proto.clear();
-    m.appendUidMap(5, config1, &proto);
+    m.appendUidMap(5, config1, nullptr, &proto);
     // Snapshot drops the first nine items.
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(maxDeletedApps, results.snapshots(0).package_info_size());
@@ -280,14 +281,14 @@
     m.updateMap(1, uids, versions, apps);
 
     ProtoOutputStream proto;
-    m.appendUidMap(2, config1, &proto);
+    m.appendUidMap(2, config1, nullptr, &proto);
     UidMapping results;
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(1, results.snapshots_size());
 
     // We have to keep at least one snapshot in memory at all times.
     proto.clear();
-    m.appendUidMap(2, config1, &proto);
+    m.appendUidMap(2, config1, nullptr, &proto);
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(1, results.snapshots_size());
 
@@ -296,7 +297,7 @@
     m.updateApp(5, String16(kApp1.c_str()), 1000, 40);
     EXPECT_EQ(1U, m.mChanges.size());
     proto.clear();
-    m.appendUidMap(6, config1, &proto);
+    m.appendUidMap(6, config1, nullptr, &proto);
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(1, results.snapshots_size());
     EXPECT_EQ(1, results.changes_size());
@@ -308,14 +309,14 @@
 
     // We still can't remove anything.
     proto.clear();
-    m.appendUidMap(8, config1, &proto);
+    m.appendUidMap(8, config1, nullptr, &proto);
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(1, results.snapshots_size());
     EXPECT_EQ(1, results.changes_size());
     EXPECT_EQ(2U, m.mChanges.size());
 
     proto.clear();
-    m.appendUidMap(9, config2, &proto);
+    m.appendUidMap(9, config2, nullptr, &proto);
     protoOutputStreamToUidMapping(&proto, &results);
     EXPECT_EQ(1, results.snapshots_size());
     EXPECT_EQ(2, results.changes_size());
@@ -342,10 +343,10 @@
 
     ProtoOutputStream proto;
     vector<uint8_t> bytes;
-    m.appendUidMap(2, config1, &proto);
+    m.appendUidMap(2, config1, nullptr, &proto);
     size_t prevBytes = m.mBytesUsed;
 
-    m.appendUidMap(4, config1, &proto);
+    m.appendUidMap(4, config1, nullptr, &proto);
     EXPECT_TRUE(m.mBytesUsed < prevBytes);
 }
 
@@ -376,6 +377,7 @@
     m.updateApp(5, String16("EXTREMELY_LONG_STRING_FOR_APP_TO_WASTE_MEMORY.0"), 1000, 4);
     EXPECT_EQ(1U, m.mChanges.size());
 }
+
 #else
 GTEST_LOG_(INFO) << "This test does nothing.\n";
 #endif
diff --git a/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp b/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp
index 3b24341..5c47af7 100644
--- a/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/Attribution_e2e_test.cpp
@@ -144,10 +144,13 @@
     }
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
 
@@ -287,10 +290,13 @@
     }
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 4 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
 
diff --git a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_AND_cond_test.cpp b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_AND_cond_test.cpp
index 934b951..8a74f2d 100644
--- a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_AND_cond_test.cpp
+++ b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_AND_cond_test.cpp
@@ -172,10 +172,13 @@
 
             ConfigMetricsReportList reports;
             vector<uint8_t> buffer;
-            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false,
-                                    ADB_DUMP, &buffer);
+            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1,
+                                    false, true, ADB_DUMP, &buffer);
             EXPECT_TRUE(buffer.size() > 0);
             EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+            backfillDimensionPath(&reports);
+            backfillStringInReport(&reports);
+            backfillStartEndTimestamp(&reports);
 
             EXPECT_EQ(reports.reports_size(), 1);
             EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -489,10 +492,13 @@
 
             ConfigMetricsReportList reports;
             vector<uint8_t> buffer;
-            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false,
+            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
                                     ADB_DUMP, &buffer);
             EXPECT_TRUE(buffer.size() > 0);
             EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+            backfillDimensionPath(&reports);
+            backfillStringInReport(&reports);
+            backfillStartEndTimestamp(&reports);
 
             EXPECT_EQ(reports.reports_size(), 1);
             EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -733,10 +739,13 @@
 
         ConfigMetricsReportList reports;
         vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                                &buffer);
+        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                                ADB_DUMP, &buffer);
         EXPECT_TRUE(buffer.size() > 0);
         EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+        backfillDimensionPath(&reports);
+        backfillStringInReport(&reports);
+        backfillStartEndTimestamp(&reports);
 
         EXPECT_EQ(reports.reports_size(), 1);
         EXPECT_EQ(reports.reports(0).metrics_size(), 1);
diff --git a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_OR_cond_test.cpp b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_OR_cond_test.cpp
index 9f20754..d4fe712 100644
--- a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_OR_cond_test.cpp
+++ b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_combination_OR_cond_test.cpp
@@ -130,10 +130,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
 
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -343,10 +346,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
 
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -524,10 +530,13 @@
 
         ConfigMetricsReportList reports;
         vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                                &buffer);
+        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
         EXPECT_TRUE(buffer.size() > 0);
         EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+        backfillDimensionPath(&reports);
+        backfillStringInReport(&reports);
+        backfillStartEndTimestamp(&reports);
 
         EXPECT_EQ(reports.reports_size(), 1);
         EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -723,10 +732,13 @@
 
         ConfigMetricsReportList reports;
         vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                                &buffer);
+        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                                ADB_DUMP, &buffer);
         EXPECT_TRUE(buffer.size() > 0);
         EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+        backfillDimensionPath(&reports);
+        backfillStringInReport(&reports);
+        backfillStartEndTimestamp(&reports);
 
         EXPECT_EQ(reports.reports_size(), 1);
         EXPECT_EQ(reports.reports(0).metrics_size(), 1);
diff --git a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_simple_cond_test.cpp b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_simple_cond_test.cpp
index 3f193ac..97089ca 100644
--- a/cmds/statsd/tests/e2e/DimensionInCondition_e2e_simple_cond_test.cpp
+++ b/cmds/statsd/tests/e2e/DimensionInCondition_e2e_simple_cond_test.cpp
@@ -142,10 +142,13 @@
 
             ConfigMetricsReportList reports;
             vector<uint8_t> buffer;
-            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false,
+            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
                                     ADB_DUMP, &buffer);
             EXPECT_TRUE(buffer.size() > 0);
             EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+            backfillDimensionPath(&reports);
+            backfillStringInReport(&reports);
+            backfillStartEndTimestamp(&reports);
 
             EXPECT_EQ(reports.reports_size(), 1);
             EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -434,10 +437,13 @@
 
             ConfigMetricsReportList reports;
             vector<uint8_t> buffer;
-            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false,
+            processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
                                     ADB_DUMP, &buffer);
             EXPECT_TRUE(buffer.size() > 0);
             EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+            backfillDimensionPath(&reports);
+            backfillStringInReport(&reports);
+            backfillStartEndTimestamp(&reports);
 
             EXPECT_EQ(reports.reports_size(), 1);
             EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -652,10 +658,13 @@
 
         ConfigMetricsReportList reports;
         vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                                &buffer);
+        processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                                ADB_DUMP, &buffer);
         EXPECT_TRUE(buffer.size() > 0);
         EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+        backfillDimensionPath(&reports);
+        backfillStringInReport(&reports);
+        backfillStartEndTimestamp(&reports);
 
         EXPECT_EQ(reports.reports_size(), 1);
         EXPECT_EQ(reports.reports(0).metrics_size(), 1);
diff --git a/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp b/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp
index f4ad0ce..6a69100 100644
--- a/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp
+++ b/cmds/statsd/tests/e2e/GaugeMetric_e2e_pull_test.cpp
@@ -122,10 +122,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(1, reports.reports_size());
     EXPECT_EQ(1, reports.reports(0).metrics_size());
     StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
@@ -241,10 +244,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 8 * bucketSizeNs + 10, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, configAddedTimeNs + 8 * bucketSizeNs + 10, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(1, reports.reports_size());
     EXPECT_EQ(1, reports.reports(0).metrics_size());
     StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
@@ -342,10 +348,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(1, reports.reports_size());
     EXPECT_EQ(1, reports.reports(0).metrics_size());
     StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
diff --git a/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp b/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp
index 98372ff..f1052f6 100644
--- a/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp
+++ b/cmds/statsd/tests/e2e/GaugeMetric_e2e_push_test.cpp
@@ -149,10 +149,13 @@
         }
         ConfigMetricsReportList reports;
         vector<uint8_t> buffer;
-        processor->onDumpReport(cfgKey, bucketStartTimeNs + 3 * bucketSizeNs, false, ADB_DUMP,
-                                &buffer);
+        processor->onDumpReport(cfgKey, bucketStartTimeNs + 3 * bucketSizeNs, false, true,
+                            ADB_DUMP, &buffer);
         EXPECT_TRUE(buffer.size() > 0);
         EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+        backfillDimensionPath(&reports);
+        backfillStringInReport(&reports);
+        backfillStartEndTimestamp(&reports);
         EXPECT_EQ(1, reports.reports_size());
         EXPECT_EQ(1, reports.reports(0).metrics_size());
         StatsLogReport::GaugeMetricDataWrapper gaugeMetrics;
diff --git a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp b/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
index 8020787..eca35c5 100644
--- a/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/MetricConditionLink_e2e_test.cpp
@@ -200,10 +200,13 @@
     }
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).count_metrics().data_size(), 1);
@@ -316,10 +319,13 @@
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
 
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).count_metrics().data_size(), 1);
diff --git a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp b/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp
index d646f73..545fa01 100644
--- a/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/PartialBucket_e2e_test.cpp
@@ -46,7 +46,7 @@
     IPCThreadState* ipc = IPCThreadState::self();
     ConfigKey configKey(ipc->getCallingUid(), kConfigKey);
     processor->onDumpReport(configKey, timestamp, include_current /* include_current_bucket*/,
-                            ADB_DUMP, &output);
+                            true/* include strings*/, ADB_DUMP, &output);
     ConfigMetricsReportList reports;
     reports.ParseFromArray(output.data(), output.size());
     EXPECT_EQ(1, reports.reports_size());
@@ -153,7 +153,12 @@
     service.mProcessor->OnLogEvent(CreateAppCrashEvent(100, start + 3).get());
 
     ConfigMetricsReport report = GetReports(service.mProcessor, start + 4);
+    backfillStartEndTimestamp(&report);
     EXPECT_EQ(1, report.metrics_size());
+    EXPECT_TRUE(report.metrics(0).count_metrics().data(0).bucket_info(0).
+                    has_start_bucket_elapsed_nanos());
+    EXPECT_TRUE(report.metrics(0).count_metrics().data(0).bucket_info(0).
+                    has_end_bucket_elapsed_nanos());
     EXPECT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info(0).count());
 }
 
@@ -171,7 +176,12 @@
     service.mProcessor->OnLogEvent(CreateAppCrashEvent(100, start + 3).get());
 
     ConfigMetricsReport report = GetReports(service.mProcessor, start + 4);
+    backfillStartEndTimestamp(&report);
     EXPECT_EQ(1, report.metrics_size());
+    EXPECT_TRUE(report.metrics(0).count_metrics().data(0).bucket_info(0).
+                    has_start_bucket_elapsed_nanos());
+    EXPECT_TRUE(report.metrics(0).count_metrics().data(0).bucket_info(0).
+                    has_end_bucket_elapsed_nanos());
     EXPECT_EQ(1, report.metrics(0).count_metrics().data(0).bucket_info(0).count());
 }
 
@@ -206,10 +216,13 @@
 
     ConfigMetricsReport report =
             GetReports(service.mProcessor, 5 * 60 * NS_PER_SEC + start + 100 * NS_PER_SEC, true);
+    backfillStartEndTimestamp(&report);
     EXPECT_EQ(1, report.metrics_size());
     EXPECT_EQ(1, report.metrics(0).value_metrics().skipped_size());
+    EXPECT_TRUE(report.metrics(0).value_metrics().skipped(0).has_start_bucket_elapsed_nanos());
     // Can't test the start time since it will be based on the actual time when the pulling occurs.
-    EXPECT_EQ(endSkipped, report.metrics(0).value_metrics().skipped(0).end_elapsed_nanos());
+    EXPECT_EQ(MillisToNano(NanoToMillis(endSkipped)),
+              report.metrics(0).value_metrics().skipped(0).end_bucket_elapsed_nanos());
 }
 
 TEST(PartialBucketE2eTest, TestGaugeMetricWithoutMinPartialBucket) {
@@ -243,10 +256,13 @@
 
     ConfigMetricsReport report =
             GetReports(service.mProcessor, 5 * 60 * NS_PER_SEC + start + 100 * NS_PER_SEC, true);
+    backfillStartEndTimestamp(&report);
     EXPECT_EQ(1, report.metrics_size());
     EXPECT_EQ(1, report.metrics(0).gauge_metrics().skipped_size());
     // Can't test the start time since it will be based on the actual time when the pulling occurs.
-    EXPECT_EQ(endSkipped, report.metrics(0).gauge_metrics().skipped(0).end_elapsed_nanos());
+    EXPECT_TRUE(report.metrics(0).gauge_metrics().skipped(0).has_start_bucket_elapsed_nanos());
+    EXPECT_EQ(MillisToNano(NanoToMillis(endSkipped)),
+              report.metrics(0).gauge_metrics().skipped(0).end_bucket_elapsed_nanos());
 }
 
 #else
diff --git a/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp b/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp
index a01e91f..98a312f 100644
--- a/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/ValueMetric_pull_e2e_test.cpp
@@ -117,10 +117,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, configAddedTimeNs + 7 * bucketSizeNs + 10, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(1, reports.reports_size());
     EXPECT_EQ(1, reports.reports(0).metrics_size());
     StatsLogReport::ValueMetricDataWrapper valueMetrics;
@@ -221,10 +224,13 @@
 
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, configAddedTimeNs + 9 * bucketSizeNs + 10, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, configAddedTimeNs + 9 * bucketSizeNs + 10, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(1, reports.reports_size());
     EXPECT_EQ(1, reports.reports(0).metrics_size());
     StatsLogReport::ValueMetricDataWrapper valueMetrics;
diff --git a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp b/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
index 974e442..6d1317c 100644
--- a/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
+++ b/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
@@ -127,10 +127,13 @@
     FeedEvents(config, processor);
     vector<uint8_t> buffer;
     ConfigMetricsReportList reports;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
 
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
@@ -161,11 +164,13 @@
     FeedEvents(config, processor);
     vector<uint8_t> buffer;
     ConfigMetricsReportList reports;
-
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
@@ -210,10 +215,13 @@
         processor->OnLogEvent(event.get());
     }
 
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
@@ -240,11 +248,14 @@
     FeedEvents(config, processor);
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs - 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
 
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
 
     EXPECT_EQ(reports.reports_size(), 1);
 
@@ -266,10 +277,13 @@
     FeedEvents(config, processor);
     ConfigMetricsReportList reports;
     vector<uint8_t> buffer;
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 2 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
@@ -309,10 +323,13 @@
         processor->OnLogEvent(event.get());
     }
 
-    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, ADB_DUMP,
-                            &buffer);
+    processor->onDumpReport(cfgKey, bucketStartTimeNs + 6 * bucketSizeNs + 1, false, true,
+                            ADB_DUMP, &buffer);
     EXPECT_TRUE(buffer.size() > 0);
     EXPECT_TRUE(reports.ParseFromArray(&buffer[0], buffer.size()));
+    backfillDimensionPath(&reports);
+    backfillStringInReport(&reports);
+    backfillStartEndTimestamp(&reports);
     EXPECT_EQ(reports.reports_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics_size(), 1);
     EXPECT_EQ(reports.reports(0).metrics(0).duration_metrics().data_size(), 1);
diff --git a/cmds/statsd/tests/guardrail/StatsdStats_test.cpp b/cmds/statsd/tests/guardrail/StatsdStats_test.cpp
index e99e402..967ef3c 100644
--- a/cmds/statsd/tests/guardrail/StatsdStats_test.cpp
+++ b/cmds/statsd/tests/guardrail/StatsdStats_test.cpp
@@ -298,6 +298,28 @@
     EXPECT_EQ(newTimestamp, configStats->dump_report_stats.back().first);
 }
 
+TEST(StatsdStatsTest, TestSystemServerCrash) {
+    StatsdStats stats;
+    vector<int32_t> timestamps;
+    for (int i = 0; i < StatsdStats::kMaxSystemServerRestarts; i++) {
+        timestamps.push_back(i);
+        stats.noteSystemServerRestart(timestamps[i]);
+    }
+    vector<uint8_t> output;
+    stats.dumpStats(&output, false);
+    StatsdStatsReport report;
+    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
+    const int maxCount = StatsdStats::kMaxSystemServerRestarts;
+    EXPECT_EQ(maxCount, (int)report.system_restart_sec_size());
+
+    stats.noteSystemServerRestart(StatsdStats::kMaxSystemServerRestarts + 1);
+    output.clear();
+    stats.dumpStats(&output, false);
+    EXPECT_TRUE(report.ParseFromArray(&output[0], output.size()));
+    EXPECT_EQ(maxCount, (int)report.system_restart_sec_size());
+    EXPECT_EQ(StatsdStats::kMaxSystemServerRestarts + 1, report.system_restart_sec(maxCount - 1));
+}
+
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
diff --git a/cmds/statsd/tests/statsd_test_util.cpp b/cmds/statsd/tests/statsd_test_util.cpp
index 1264909..e0c98cb 100644
--- a/cmds/statsd/tests/statsd_test_util.cpp
+++ b/cmds/statsd/tests/statsd_test_util.cpp
@@ -459,7 +459,7 @@
         new AlarmMonitor(1,  [](const sp<IStatsCompanionService>&, int64_t){},
                 [](const sp<IStatsCompanionService>&){});
     sp<StatsLogProcessor> processor = new StatsLogProcessor(
-        uidMap, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseNs, [](const ConfigKey&){});
+        uidMap, anomalyAlarmMonitor, periodicAlarmMonitor, timeBaseNs, [](const ConfigKey&){return true;});
     processor->OnConfigUpdated(currentTimeNs, key, config);
     return processor;
 }
@@ -645,6 +645,183 @@
     return LessThan(s1.dimInCondition, s2.dimInCondition);
 }
 
+void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
+                               DimensionsValue* dimension) {
+    if (dimension->has_value_str_hash()) {
+        auto it = str_map.find((uint64_t)(dimension->value_str_hash()));
+        if (it != str_map.end()) {
+            dimension->clear_value_str_hash();
+            dimension->set_value_str(it->second);
+        } else {
+            ALOGE("Can not find the string hash: %llu",
+                (unsigned long long)dimension->value_str_hash());
+        }
+    } else if (dimension->has_value_tuple()) {
+        auto value_tuple = dimension->mutable_value_tuple();
+        for (int i = 0; i < value_tuple->dimensions_value_size(); ++i) {
+            backfillStringInDimension(str_map, value_tuple->mutable_dimensions_value(i));
+        }
+    }
+}
+
+void backfillStringInReport(ConfigMetricsReport *config_report) {
+    std::map<uint64_t, string> str_map;
+    for (const auto& str : config_report->strings()) {
+        uint64_t hash = Hash64(str);
+        if (str_map.find(hash) != str_map.end()) {
+            ALOGE("String hash conflicts: %s %s", str.c_str(), str_map[hash].c_str());
+        }
+        str_map[hash] = str;
+    }
+    for (int i = 0; i < config_report->metrics_size(); ++i) {
+        auto metric_report = config_report->mutable_metrics(i);
+        if (metric_report->has_count_metrics()) {
+            backfillStringInDimension(str_map, metric_report->mutable_count_metrics());
+        } else if (metric_report->has_duration_metrics()) {
+            backfillStringInDimension(str_map, metric_report->mutable_duration_metrics());
+        } else if (metric_report->has_gauge_metrics()) {
+            backfillStringInDimension(str_map, metric_report->mutable_gauge_metrics());
+        } else if (metric_report->has_value_metrics()) {
+            backfillStringInDimension(str_map, metric_report->mutable_value_metrics());
+        }
+    }
+    // Backfill the package names.
+    for (int i = 0 ; i < config_report->uid_map().snapshots_size(); ++i) {
+        auto snapshot = config_report->mutable_uid_map()->mutable_snapshots(i);
+        for (int j = 0 ; j < snapshot->package_info_size(); ++j) {
+            auto package_info = snapshot->mutable_package_info(j);
+            if (package_info->has_name_hash()) {
+                auto it = str_map.find((uint64_t)(package_info->name_hash()));
+                if (it != str_map.end()) {
+                    package_info->clear_name_hash();
+                    package_info->set_name(it->second);
+                } else {
+                    ALOGE("Can not find the string package name hash: %llu",
+                        (unsigned long long)package_info->name_hash());
+                }
+
+            }
+        }
+    }
+    // Backfill the app name in app changes.
+    for (int i = 0 ; i < config_report->uid_map().changes_size(); ++i) {
+        auto change = config_report->mutable_uid_map()->mutable_changes(i);
+        if (change->has_app_hash()) {
+            auto it = str_map.find((uint64_t)(change->app_hash()));
+            if (it != str_map.end()) {
+                change->clear_app_hash();
+                change->set_app(it->second);
+            } else {
+                ALOGE("Can not find the string change app name hash: %llu",
+                    (unsigned long long)change->app_hash());
+            }
+        }
+    }
+}
+
+void backfillStringInReport(ConfigMetricsReportList *config_report_list) {
+    for (int i = 0; i < config_report_list->reports_size(); ++i) {
+        backfillStringInReport(config_report_list->mutable_reports(i));
+    }
+}
+
+bool backfillDimensionPath(const DimensionsValue& path,
+                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
+                           int* leafIndex,
+                           DimensionsValue* dimension) {
+    dimension->set_field(path.field());
+    if (path.has_value_tuple()) {
+        for (int i = 0; i < path.value_tuple().dimensions_value_size(); ++i) {
+            if (!backfillDimensionPath(
+                path.value_tuple().dimensions_value(i), leafValues, leafIndex,
+                dimension->mutable_value_tuple()->add_dimensions_value())) {
+                return false;
+            }
+        }
+    } else {
+        if (*leafIndex < 0 || *leafIndex >= leafValues.size()) {
+            return false;
+        }
+        dimension->MergeFrom(leafValues.Get(*leafIndex));
+        (*leafIndex)++;
+    }
+    return true;
+}
+
+bool backfillDimensionPath(const DimensionsValue& path,
+                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
+                           DimensionsValue* dimension) {
+    int leafIndex = 0;
+    return backfillDimensionPath(path, leafValues, &leafIndex, dimension);
+}
+
+void backfillDimensionPath(ConfigMetricsReportList *config_report_list) {
+    for (int i = 0; i < config_report_list->reports_size(); ++i) {
+        auto report = config_report_list->mutable_reports(i);
+        for (int j = 0; j < report->metrics_size(); ++j) {
+            auto metric_report = report->mutable_metrics(j);
+            if (metric_report->has_dimensions_path_in_what() ||
+                metric_report->has_dimensions_path_in_condition()) {
+                auto whatPath = metric_report->dimensions_path_in_what();
+                auto conditionPath = metric_report->dimensions_path_in_condition();
+                if (metric_report->has_count_metrics()) {
+                    backfillDimensionPath(whatPath, conditionPath,
+                                          metric_report->mutable_count_metrics());
+                } else if (metric_report->has_duration_metrics()) {
+                    backfillDimensionPath(whatPath, conditionPath,
+                                          metric_report->mutable_duration_metrics());
+                } else if (metric_report->has_gauge_metrics()) {
+                    backfillDimensionPath(whatPath, conditionPath,
+                                          metric_report->mutable_gauge_metrics());
+                } else if (metric_report->has_value_metrics()) {
+                    backfillDimensionPath(whatPath, conditionPath,
+                                          metric_report->mutable_value_metrics());
+                }
+                metric_report->clear_dimensions_path_in_what();
+                metric_report->clear_dimensions_path_in_condition();
+            }
+        }
+    }
+}
+
+void backfillStartEndTimestamp(StatsLogReport *report) {
+    const int64_t timeBaseNs = report->time_base_elapsed_nano_seconds();
+    const int64_t bucketSizeNs = report->bucket_size_nano_seconds();
+    if (report->has_count_metrics()) {
+        backfillStartEndTimestampForMetrics(
+            timeBaseNs, bucketSizeNs, report->mutable_count_metrics());
+    } else if (report->has_duration_metrics()) {
+        backfillStartEndTimestampForMetrics(
+            timeBaseNs, bucketSizeNs, report->mutable_duration_metrics());
+    } else if (report->has_gauge_metrics()) {
+        backfillStartEndTimestampForMetrics(
+            timeBaseNs, bucketSizeNs, report->mutable_gauge_metrics());
+        if (report->gauge_metrics().skipped_size() > 0) {
+            backfillStartEndTimestampForSkippedBuckets(
+                timeBaseNs, report->mutable_gauge_metrics());
+        }
+    } else if (report->has_value_metrics()) {
+        backfillStartEndTimestampForMetrics(
+            timeBaseNs, bucketSizeNs, report->mutable_value_metrics());
+        if (report->value_metrics().skipped_size() > 0) {
+            backfillStartEndTimestampForSkippedBuckets(
+                timeBaseNs, report->mutable_value_metrics());
+        }
+    }
+}
+
+void backfillStartEndTimestamp(ConfigMetricsReport *config_report) {
+    for (int j = 0; j < config_report->metrics_size(); ++j) {
+        backfillStartEndTimestamp(config_report->mutable_metrics(j));
+    }
+}
+
+void backfillStartEndTimestamp(ConfigMetricsReportList *config_report_list) {
+    for (int i = 0; i < config_report_list->reports_size(); ++i) {
+        backfillStartEndTimestamp(config_report_list->mutable_reports(i));
+    }
+}
+
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
\ No newline at end of file
diff --git a/cmds/statsd/tests/statsd_test_util.h b/cmds/statsd/tests/statsd_test_util.h
index 6ecca46..635c583 100644
--- a/cmds/statsd/tests/statsd_test_util.h
+++ b/cmds/statsd/tests/statsd_test_util.h
@@ -19,12 +19,16 @@
 #include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
 #include "src/StatsLogProcessor.h"
 #include "src/logd/LogEvent.h"
+#include "src/hash.h"
+#include "src/stats_log_util.h"
 #include "statslog.h"
 
 namespace android {
 namespace os {
 namespace statsd {
 
+using google::protobuf::RepeatedPtrField;
+
 // Create AtomMatcher proto to simply match a specific atom type.
 AtomMatcher CreateSimpleAtomMatcher(const string& name, int atomId);
 
@@ -201,6 +205,53 @@
 bool LessThan(const DimensionsValue& s1, const DimensionsValue& s2);
 bool LessThan(const DimensionsPair& s1, const DimensionsPair& s2);
 
+
+void backfillStartEndTimestamp(ConfigMetricsReport *config_report);
+void backfillStartEndTimestamp(ConfigMetricsReportList *config_report_list);
+
+void backfillStringInReport(ConfigMetricsReportList *config_report_list);
+void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
+                               DimensionsValue* dimension);
+
+template <typename T>
+void backfillStringInDimension(const std::map<uint64_t, string>& str_map,
+                               T* metrics) {
+    for (int i = 0; i < metrics->data_size(); ++i) {
+        auto data = metrics->mutable_data(i);
+        if (data->has_dimensions_in_what()) {
+            backfillStringInDimension(str_map, data->mutable_dimensions_in_what());
+        }
+        if (data->has_dimensions_in_condition()) {
+            backfillStringInDimension(str_map, data->mutable_dimensions_in_condition());
+        }
+    }
+}
+
+void backfillDimensionPath(ConfigMetricsReportList* config_report_list);
+
+bool backfillDimensionPath(const DimensionsValue& path,
+                           const google::protobuf::RepeatedPtrField<DimensionsValue>& leafValues,
+                           DimensionsValue* dimension);
+
+template <typename T>
+void backfillDimensionPath(const DimensionsValue& whatPath,
+                           const DimensionsValue& conditionPath,
+                           T* metricData) {
+    for (int i = 0; i < metricData->data_size(); ++i) {
+        auto data = metricData->mutable_data(i);
+        if (data->dimension_leaf_values_in_what_size() > 0) {
+            backfillDimensionPath(whatPath, data->dimension_leaf_values_in_what(),
+                                  data->mutable_dimensions_in_what());
+            data->clear_dimension_leaf_values_in_what();
+        }
+        if (data->dimension_leaf_values_in_condition_size() > 0) {
+            backfillDimensionPath(conditionPath, data->dimension_leaf_values_in_condition(),
+                                  data->mutable_dimensions_in_condition());
+            data->clear_dimension_leaf_values_in_condition();
+        }
+    }
+}
+
 struct DimensionCompare {
     bool operator()(const DimensionsPair& s1, const DimensionsPair& s2) const {
         return LessThan(s1, s2);
@@ -221,6 +272,51 @@
     }
 }
 
+template <typename T>
+void backfillStartEndTimestampForFullBucket(
+    const int64_t timeBaseNs, const int64_t bucketSizeNs, T* bucket) {
+    bucket->set_start_bucket_elapsed_nanos(timeBaseNs + bucketSizeNs * bucket->bucket_num());
+    bucket->set_end_bucket_elapsed_nanos(
+        timeBaseNs + bucketSizeNs * bucket->bucket_num() + bucketSizeNs);
+    bucket->clear_bucket_num();
+}
+
+template <typename T>
+void backfillStartEndTimestampForPartialBucket(const int64_t timeBaseNs, T* bucket) {
+    if (bucket->has_start_bucket_elapsed_millis()) {
+        bucket->set_start_bucket_elapsed_nanos(
+            MillisToNano(bucket->start_bucket_elapsed_millis()));
+        bucket->clear_start_bucket_elapsed_millis();
+    }
+    if (bucket->has_end_bucket_elapsed_millis()) {
+        bucket->set_end_bucket_elapsed_nanos(
+            MillisToNano(bucket->end_bucket_elapsed_millis()));
+        bucket->clear_end_bucket_elapsed_millis();
+    }
+}
+
+template <typename T>
+void backfillStartEndTimestampForMetrics(const int64_t timeBaseNs, const int64_t bucketSizeNs,
+                                         T* metrics) {
+    for (int i = 0; i < metrics->data_size(); ++i) {
+        auto data = metrics->mutable_data(i);
+        for (int j = 0; j < data->bucket_info_size(); ++j) {
+            auto bucket = data->mutable_bucket_info(j);
+            if (bucket->has_bucket_num()) {
+                backfillStartEndTimestampForFullBucket(timeBaseNs, bucketSizeNs, bucket);
+            } else {
+                backfillStartEndTimestampForPartialBucket(timeBaseNs, bucket);
+            }
+        }
+    }
+}
+
+template <typename T>
+void backfillStartEndTimestampForSkippedBuckets(const int64_t timeBaseNs, T* metrics) {
+    for (int i = 0; i < metrics->skipped_size(); ++i) {
+        backfillStartEndTimestampForPartialBucket(timeBaseNs, metrics->mutable_skipped(i));
+    }
+}
 }  // namespace statsd
 }  // namespace os
 }  // namespace android
\ No newline at end of file
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index 35a2689..1418012 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -29,9 +29,13 @@
 Landroid/app/ActionBar;->setShowHideAnimationEnabled(Z)V
 Landroid/app/Activity;->getActivityOptions()Landroid/app/ActivityOptions;
 Landroid/app/Activity;->getActivityToken()Landroid/os/IBinder;
+Landroid/app/Activity;->isResumed()Z
 Landroid/app/Activity;->mActivityInfo:Landroid/content/pm/ActivityInfo;
 Landroid/app/Activity;->mApplication:Landroid/app/Application;
+Landroid/app/Activity;->mCalled:Z
 Landroid/app/Activity;->mComponent:Landroid/content/ComponentName;
+Landroid/app/Activity;->mConfigChangeFlags:I
+Landroid/app/Activity;->mCurrentConfig:Landroid/content/res/Configuration;
 Landroid/app/Activity;->mFinished:Z
 Landroid/app/Activity;->mFragments:Landroid/app/FragmentController;
 Landroid/app/Activity;->mHandler:Landroid/os/Handler;
@@ -41,6 +45,7 @@
 Landroid/app/Activity;->mResultCode:I
 Landroid/app/Activity;->mResultData:Landroid/content/Intent;
 Landroid/app/Activity;->mResumed:Z
+Landroid/app/Activity;->mTitle:Ljava/lang/CharSequence;
 Landroid/app/Activity;->mToken:Landroid/os/IBinder;
 Landroid/app/Activity;->mWindow:Landroid/view/Window;
 Landroid/app/Activity;->mWindowManager:Landroid/view/WindowManager;
@@ -207,6 +212,7 @@
 Landroid/app/ApplicationPackageManager;->mPM:Landroid/content/pm/IPackageManager;
 Landroid/app/ApplicationPackageManager;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
 Landroid/app/AppOpsManager$OpEntry;->getDuration()I
+Landroid/app/AppOpsManager$OpEntry;->getMode()I
 Landroid/app/AppOpsManager$OpEntry;->getRejectTime()J
 Landroid/app/AppOpsManager;->checkOp(IILjava/lang/String;)I
 Landroid/app/AppOpsManager;->checkOpNoThrow(IILjava/lang/String;)I
@@ -263,6 +269,7 @@
 Landroid/app/ContextImpl;->mPackageManager:Landroid/content/pm/PackageManager;
 Landroid/app/ContextImpl;->mResources:Landroid/content/res/Resources;
 Landroid/app/ContextImpl;->mServiceCache:[Ljava/lang/Object;
+Landroid/app/ContextImpl;->mSharedPrefsPaths:Landroid/util/ArrayMap;
 Landroid/app/ContextImpl;->mTheme:Landroid/content/res/Resources$Theme;
 Landroid/app/ContextImpl;->mThemeResource:I
 Landroid/app/ContextImpl;->scheduleFinalCleanup(Ljava/lang/String;Ljava/lang/String;)V
@@ -281,6 +288,7 @@
 Landroid/app/DownloadManager;->setAccessFilename(Z)V
 Landroid/app/Fragment;->mChildFragmentManager:Landroid/app/FragmentManagerImpl;
 Landroid/app/Fragment;->mWho:Ljava/lang/String;
+Landroid/app/FragmentManagerImpl;->loadAnimator(Landroid/app/Fragment;IZI)Landroid/animation/Animator;
 Landroid/app/FragmentManagerImpl;->mAdded:Ljava/util/ArrayList;
 Landroid/app/FragmentManagerImpl;->mStateSaved:Z
 Landroid/app/FragmentManagerImpl;->noteStateNotSaved()V
@@ -298,6 +306,7 @@
 Landroid/app/IActivityManager;->getConfiguration()Landroid/content/res/Configuration;
 Landroid/app/IActivityManager;->getIntentSender(ILjava/lang/String;Landroid/os/IBinder;Ljava/lang/String;I[Landroid/content/Intent;[Ljava/lang/String;ILandroid/os/Bundle;I)Landroid/content/IIntentSender;
 Landroid/app/IActivityManager;->getLaunchedFromPackage(Landroid/os/IBinder;)Ljava/lang/String;
+Landroid/app/IActivityManager;->getPackageProcessState(Ljava/lang/String;Ljava/lang/String;)I
 Landroid/app/IActivityManager;->getProviderMimeType(Landroid/net/Uri;I)Ljava/lang/String;
 Landroid/app/IActivityManager;->getTaskForActivity(Landroid/os/IBinder;Z)I
 Landroid/app/IActivityManager;->moveActivityTaskToBack(Landroid/os/IBinder;Z)Z
@@ -406,14 +415,12 @@
 Landroid/app/Notification$Action;->mIcon:Landroid/graphics/drawable/Icon;
 Landroid/app/Notification$Builder;->mActions:Ljava/util/ArrayList;
 Landroid/app/Notification$Builder;->makePublicContentView()Landroid/widget/RemoteViews;
-Landroid/app/Notification$Builder;->setChannel(Ljava/lang/String;)Landroid/app/Notification$Builder;
 Landroid/app/Notification;-><init>(Landroid/content/Context;ILjava/lang/CharSequence;JLjava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/content/Intent;)V
 Landroid/app/Notification;->isGroupSummary()Z
 Landroid/app/Notification;->mChannelId:Ljava/lang/String;
 Landroid/app/Notification;->mGroupKey:Ljava/lang/String;
 Landroid/app/Notification;->mLargeIcon:Landroid/graphics/drawable/Icon;
 Landroid/app/Notification;->mSmallIcon:Landroid/graphics/drawable/Icon;
-Landroid/app/Notification;->setLatestEventInfo(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V
 Landroid/app/Notification;->setSmallIcon(Landroid/graphics/drawable/Icon;)V
 Landroid/app/NotificationManager;->getService()Landroid/app/INotificationManager;
 Landroid/app/NotificationManager;->notifyAsUser(Ljava/lang/String;ILandroid/app/Notification;Landroid/os/UserHandle;)V
@@ -446,11 +453,6 @@
 Landroid/app/SharedPreferencesImpl;-><init>(Ljava/io/File;I)V
 Landroid/app/SharedPreferencesImpl;->mFile:Ljava/io/File;
 Landroid/app/SharedPreferencesImpl;->startReloadIfChangedUnexpectedly()V
-Landroid/app/slice/Slice$Builder;-><init>(Landroid/net/Uri;)V
-Landroid/app/slice/Slice$Builder;->setSpec(Landroid/app/slice/SliceSpec;)Landroid/app/slice/Slice$Builder;
-Landroid/app/slice/SliceItem;->getTimestamp()J
-Landroid/app/slice/SliceManager;->bindSlice(Landroid/net/Uri;Ljava/util/List;)Landroid/app/slice/Slice;
-Landroid/app/slice/SliceManager;->pinSlice(Landroid/net/Uri;Ljava/util/List;)V
 Landroid/app/StatusBarManager;->collapsePanels()V
 Landroid/app/StatusBarManager;->disable(I)V
 Landroid/app/StatusBarManager;->expandNotificationsPanel()V
@@ -569,8 +571,8 @@
 Landroid/bluetooth/BluetoothHeadset;->disconnectAudio()Z
 Landroid/bluetooth/BluetoothHeadset;->getActiveDevice()Landroid/bluetooth/BluetoothDevice;
 Landroid/bluetooth/BluetoothHeadset;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
-Landroid/bluetooth/BluetoothHeadset;->startScoUsingVirtualVoiceCall(Landroid/bluetooth/BluetoothDevice;)Z
-Landroid/bluetooth/BluetoothHeadset;->stopScoUsingVirtualVoiceCall(Landroid/bluetooth/BluetoothDevice;)Z
+Landroid/bluetooth/BluetoothHeadset;->startScoUsingVirtualVoiceCall()Z
+Landroid/bluetooth/BluetoothHeadset;->stopScoUsingVirtualVoiceCall()Z
 Landroid/bluetooth/BluetoothHearingAid;->ACTION_ACTIVE_DEVICE_CHANGED:Ljava/lang/String;
 Landroid/bluetooth/BluetoothHearingAid;->getActiveDevices()Ljava/util/List;
 Landroid/bluetooth/BluetoothHearingAid;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z
@@ -698,9 +700,11 @@
 Landroid/content/pm/IPackageDataObserver$Stub$Proxy;->mRemote:Landroid/os/IBinder;
 Landroid/content/pm/IPackageDataObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDataObserver;
 Landroid/content/pm/IPackageDataObserver;->onRemoveCompleted(Ljava/lang/String;Z)V
+Landroid/content/pm/IPackageDeleteObserver$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
 Landroid/content/pm/IPackageDeleteObserver$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver;
 Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
 Landroid/content/pm/IPackageDeleteObserver2$Stub$Proxy;->mRemote:Landroid/os/IBinder;
+Landroid/content/pm/IPackageDeleteObserver2$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/pm/IPackageDeleteObserver2;
 Landroid/content/pm/IPackageDeleteObserver2;->onPackageDeleted(Ljava/lang/String;ILjava/lang/String;)V
 Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
 Landroid/content/pm/IPackageInstallerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder;
@@ -730,6 +734,7 @@
 Landroid/content/pm/IPackageManager;->getInstallerPackageName(Ljava/lang/String;)Ljava/lang/String;
 Landroid/content/pm/IPackageManager;->getInstallLocation()I
 Landroid/content/pm/IPackageManager;->getLastChosenActivity(Landroid/content/Intent;Ljava/lang/String;I)Landroid/content/pm/ResolveInfo;
+Landroid/content/pm/IPackageManager;->getPackagesForUid(I)[Ljava/lang/String;
 Landroid/content/pm/IPackageManager;->getProviderInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ProviderInfo;
 Landroid/content/pm/IPackageManager;->getReceiverInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ActivityInfo;
 Landroid/content/pm/IPackageManager;->getServiceInfo(Landroid/content/ComponentName;II)Landroid/content/pm/ServiceInfo;
@@ -769,6 +774,7 @@
 Landroid/content/pm/PackageInstaller$SessionParams;->sizeBytes:J
 Landroid/content/pm/PackageItemInfo;->setForceSafeLabels(Z)V
 Landroid/content/pm/PackageManager;->buildRequestPermissionsIntent([Ljava/lang/String;)Landroid/content/Intent;
+Landroid/content/pm/PackageManager;->deletePackage(Ljava/lang/String;Landroid/content/pm/IPackageDeleteObserver;I)V
 Landroid/content/pm/PackageManager;->freeStorage(JLandroid/content/IntentSender;)V
 Landroid/content/pm/PackageManager;->freeStorage(Ljava/lang/String;JLandroid/content/IntentSender;)V
 Landroid/content/pm/PackageManager;->freeStorageAndNotify(JLandroid/content/pm/IPackageDataObserver;)V
@@ -805,6 +811,7 @@
 Landroid/content/pm/PackageParser$Package;->mPreferredOrder:I
 Landroid/content/pm/PackageParser$Package;->mSharedUserId:Ljava/lang/String;
 Landroid/content/pm/PackageParser$Package;->mSharedUserLabel:I
+Landroid/content/pm/PackageParser$Package;->mSigningDetails:Landroid/content/pm/PackageParser$SigningDetails;
 Landroid/content/pm/PackageParser$Package;->mVersionCode:I
 Landroid/content/pm/PackageParser$Package;->mVersionName:Ljava/lang/String;
 Landroid/content/pm/PackageParser$Package;->packageName:Ljava/lang/String;
@@ -821,6 +828,7 @@
 Landroid/content/pm/PackageParser$ProviderIntentInfo;->provider:Landroid/content/pm/PackageParser$Provider;
 Landroid/content/pm/PackageParser$Service;->info:Landroid/content/pm/ServiceInfo;
 Landroid/content/pm/PackageParser$ServiceIntentInfo;->service:Landroid/content/pm/PackageParser$Service;
+Landroid/content/pm/PackageParser$SigningDetails;->signatures:[Landroid/content/pm/Signature;
 Landroid/content/pm/PackageParser;-><init>()V
 Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Ljava/io/File;Z)V
 Landroid/content/pm/PackageParser;->collectCertificates(Landroid/content/pm/PackageParser$Package;Z)V
@@ -839,11 +847,11 @@
 Landroid/content/pm/PackageParser;->parsePackage(Ljava/io/File;IZ)Landroid/content/pm/PackageParser$Package;
 Landroid/content/pm/PackageUserState;-><init>()V
 Landroid/content/pm/ParceledListSlice;-><init>(Ljava/util/List;)V
-Landroid/content/pm/ResolveInfo;->instantAppAvailable:Z
 Landroid/content/pm/ShortcutManager;->mService:Landroid/content/pm/IShortcutService;
 Landroid/content/pm/Signature;->getPublicKey()Ljava/security/PublicKey;
 Landroid/content/pm/UserInfo;-><init>(ILjava/lang/String;I)V
 Landroid/content/pm/UserInfo;->FLAG_PRIMARY:I
+Landroid/content/pm/UserInfo;->getUserHandle()Landroid/os/UserHandle;
 Landroid/content/pm/UserInfo;->id:I
 Landroid/content/pm/UserInfo;->isPrimary()Z
 Landroid/content/pm/UserInfo;->serialNumber:I
@@ -884,6 +892,7 @@
 Landroid/content/res/DrawableCache;-><init>()V
 Landroid/content/res/DrawableCache;->getInstance(JLandroid/content/res/Resources;Landroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
 Landroid/content/res/ObbInfo;->salt:[B
+Landroid/content/res/Resources$Theme;->mThemeImpl:Landroid/content/res/ResourcesImpl$ThemeImpl;
 Landroid/content/res/Resources;->getCompatibilityInfo()Landroid/content/res/CompatibilityInfo;
 Landroid/content/res/Resources;->loadXmlResourceParser(ILjava/lang/String;)Landroid/content/res/XmlResourceParser;
 Landroid/content/res/Resources;->loadXmlResourceParser(Ljava/lang/String;IILjava/lang/String;)Landroid/content/res/XmlResourceParser;
@@ -960,16 +969,18 @@
 Landroid/content/UriMatcher;->mText:Ljava/lang/String;
 Landroid/database/AbstractCursor;->mExtras:Landroid/os/Bundle;
 Landroid/database/AbstractCursor;->mNotifyUri:Landroid/net/Uri;
-Landroid/database/AbstractCursor;->mRowIdColumnIndex:I
 Landroid/database/AbstractWindowedCursor;->clearOrCreateWindow(Ljava/lang/String;)V
+Landroid/database/AbstractWindowedCursor;->closeWindow()V
 Landroid/database/CursorWindow;->mWindowPtr:J
 Landroid/database/CursorWindow;->sCursorWindowSize:I
 Landroid/database/CursorWindow;->sWindowToPidMap:Landroid/util/LongSparseArray;
 Landroid/database/CursorWrapper;->mCursor:Landroid/database/Cursor;
+Landroid/database/MatrixCursor;->get(I)Ljava/lang/Object;
 Landroid/database/sqlite/SQLiteCustomFunction;->dispatchCallback([Ljava/lang/String;)V
 Landroid/database/sqlite/SQLiteCustomFunction;->name:Ljava/lang/String;
 Landroid/database/sqlite/SQLiteCustomFunction;->numArgs:I
 Landroid/database/sqlite/SQLiteDatabase;->CONFLICT_VALUES:[Ljava/lang/String;
+Landroid/database/sqlite/SQLiteDatabase;->getThreadSession()Landroid/database/sqlite/SQLiteSession;
 Landroid/database/sqlite/SQLiteDatabase;->mConfigurationLocked:Landroid/database/sqlite/SQLiteDatabaseConfiguration;
 Landroid/database/sqlite/SQLiteDatabase;->mConnectionPoolLocked:Landroid/database/sqlite/SQLiteConnectionPool;
 Landroid/database/sqlite/SQLiteDatabase;->reopenReadWrite()V
@@ -978,11 +989,10 @@
 Landroid/database/sqlite/SQLiteDebug$PagerStats;->memoryUsed:I
 Landroid/database/sqlite/SQLiteDebug$PagerStats;->pageCacheOverflow:I
 Landroid/database/sqlite/SQLiteOpenHelper;->mName:Ljava/lang/String;
+Landroid/database/sqlite/SQLiteSession;->beginTransaction(ILandroid/database/sqlite/SQLiteTransactionListener;ILandroid/os/CancellationSignal;)V
 Landroid/database/sqlite/SQLiteStatement;-><init>(Landroid/database/sqlite/SQLiteDatabase;Ljava/lang/String;[Ljava/lang/Object;)V
 Landroid/ddm/DdmHandleAppName;->getAppName()Ljava/lang/String;
 Landroid/ddm/DdmHandleAppName;->setAppName(Ljava/lang/String;I)V
-Landroid/graphics/AvoidXfermode$Mode;->AVOID:Landroid/graphics/AvoidXfermode$Mode;
-Landroid/graphics/AvoidXfermode$Mode;->TARGET:Landroid/graphics/AvoidXfermode$Mode;
 Landroid/graphics/BaseCanvas;->mNativeCanvasWrapper:J
 Landroid/graphics/Bitmap$Config;->nativeInt:I
 Landroid/graphics/Bitmap$Config;->nativeToConfig(I)Landroid/graphics/Bitmap$Config;
@@ -1003,7 +1013,6 @@
 Landroid/graphics/Camera;->native_instance:J
 Landroid/graphics/Canvas;-><init>(J)V
 Landroid/graphics/Canvas;->release()V
-Landroid/graphics/Canvas;->save(I)I
 Landroid/graphics/ColorMatrixColorFilter;->setColorMatrix(Landroid/graphics/ColorMatrix;)V
 Landroid/graphics/drawable/AnimatedImageDrawable;->onAnimationEnd()V
 Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mStateIds:Landroid/util/SparseIntArray;
@@ -1048,6 +1057,7 @@
 Landroid/graphics/drawable/GradientDrawable;->getOpticalInsets()Landroid/graphics/Insets;
 Landroid/graphics/drawable/GradientDrawable;->mGradientState:Landroid/graphics/drawable/GradientDrawable$GradientState;
 Landroid/graphics/drawable/GradientDrawable;->mPadding:Landroid/graphics/Rect;
+Landroid/graphics/drawable/Icon;->createWithResource(Landroid/content/res/Resources;I)Landroid/graphics/drawable/Icon;
 Landroid/graphics/drawable/Icon;->getBitmap()Landroid/graphics/Bitmap;
 Landroid/graphics/drawable/Icon;->getDataBytes()[B
 Landroid/graphics/drawable/Icon;->getDataLength()I
@@ -1098,7 +1108,6 @@
 Landroid/graphics/NinePatch$InsetStruct;-><init>(IIIIIIIIFIF)V
 Landroid/graphics/NinePatch;->mBitmap:Landroid/graphics/Bitmap;
 Landroid/graphics/Picture;->mNativePicture:J
-Landroid/graphics/PixelXorXfermode;-><init>(I)V
 Landroid/graphics/PorterDuffColorFilter;->getColor()I
 Landroid/graphics/PorterDuffColorFilter;->setColor(I)V
 Landroid/graphics/PorterDuffColorFilter;->setMode(Landroid/graphics/PorterDuff$Mode;)V
@@ -1195,6 +1204,7 @@
 Landroid/hardware/display/WifiDisplayStatus;->mDisplays:[Landroid/hardware/display/WifiDisplay;
 Landroid/hardware/fingerprint/Fingerprint;->getFingerId()I
 Landroid/hardware/fingerprint/Fingerprint;->getName()Ljava/lang/CharSequence;
+Landroid/hardware/fingerprint/FingerprintManager;->getEnrolledFingerprints()Ljava/util/List;
 Landroid/hardware/fingerprint/IFingerprintService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
 Landroid/hardware/HardwareBuffer;-><init>(J)V
 Landroid/hardware/HardwareBuffer;->mNativeObject:J
@@ -1231,6 +1241,7 @@
 Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->data:[B
 Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;->keyphrases:[Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseRecognitionExtra;
 Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;-><init>(IIZIIIZLandroid/media/AudioFormat;[B)V
+Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->captureSession:I
 Landroid/hardware/soundtrigger/SoundTrigger$RecognitionEvent;->data:[B
 Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->data:[B
 Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;->uuid:Ljava/util/UUID;
@@ -1405,6 +1416,7 @@
 Landroid/media/JetPlayer;->postEventFromNative(Ljava/lang/Object;III)V
 Landroid/media/MediaCodec$CodecException;-><init>(IILjava/lang/String;)V
 Landroid/media/MediaCodec;->getBuffers(Z)[Ljava/nio/ByteBuffer;
+Landroid/media/MediaCodec;->mNativeContext:J
 Landroid/media/MediaCodec;->releaseOutputBuffer(IZZJ)V
 Landroid/media/MediaFile$MediaFileType;->fileType:I
 Landroid/media/MediaFile$MediaFileType;->mimeType:Ljava/lang/String;
@@ -1465,6 +1477,7 @@
 Landroid/media/session/MediaSessionLegacyHelper;->getHelper(Landroid/content/Context;)Landroid/media/session/MediaSessionLegacyHelper;
 Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getCaptureSession()Ljava/lang/Integer;
 Landroid/media/soundtrigger/SoundTriggerDetector$EventPayload;->getData()[B
+Landroid/media/soundtrigger/SoundTriggerManager;->isRecognitionActive(Ljava/util/UUID;)Z
 Landroid/media/soundtrigger/SoundTriggerManager;->loadSoundModel(Landroid/hardware/soundtrigger/SoundTrigger$SoundModel;)I
 Landroid/media/soundtrigger/SoundTriggerManager;->startRecognition(Ljava/util/UUID;Landroid/app/PendingIntent;Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
 Landroid/media/soundtrigger/SoundTriggerManager;->startRecognition(Ljava/util/UUID;Landroid/os/Bundle;Landroid/content/ComponentName;Landroid/hardware/soundtrigger/SoundTrigger$RecognitionConfig;)I
@@ -1505,7 +1518,6 @@
 Landroid/net/ConnectivityManager;->isNetworkTypeMobile(I)Z
 Landroid/net/ConnectivityManager;->mService:Landroid/net/IConnectivityManager;
 Landroid/net/ConnectivityManager;->registerNetworkFactory(Landroid/os/Messenger;Ljava/lang/String;)V
-Landroid/net/ConnectivityManager;->requestRouteToHost(II)Z
 Landroid/net/ConnectivityManager;->requestRouteToHostAddress(ILjava/net/InetAddress;)Z
 Landroid/net/ConnectivityManager;->setBackgroundDataSetting(Z)V
 Landroid/net/ConnectivityManager;->TYPE_MOBILE_CBS:I
@@ -1565,7 +1577,6 @@
 Landroid/net/SSLCertificateSocketFactory;->castToOpenSSLSocket(Ljava/net/Socket;)Lcom/android/org/conscrypt/OpenSSLSocketImpl;
 Landroid/net/SSLCertificateSocketFactory;->getAlpnSelectedProtocol(Ljava/net/Socket;)[B
 Landroid/net/SSLCertificateSocketFactory;->getDelegate()Ljavax/net/ssl/SSLSocketFactory;
-Landroid/net/SSLCertificateSocketFactory;->getHttpSocketFactory(ILandroid/net/SSLSessionCache;)Lorg/apache/http/conn/ssl/SSLSocketFactory;
 Landroid/net/SSLCertificateSocketFactory;->INSECURE_TRUST_MANAGER:[Ljavax/net/ssl/TrustManager;
 Landroid/net/SSLCertificateSocketFactory;->isSslCheckRelaxed()Z
 Landroid/net/SSLCertificateSocketFactory;->makeSocketFactory([Ljavax/net/ssl/KeyManager;[Ljavax/net/ssl/TrustManager;)Ljavax/net/ssl/SSLSocketFactory;
@@ -1633,7 +1644,6 @@
 Landroid/net/wifi/ScanResult;->informationElements:[Landroid/net/wifi/ScanResult$InformationElement;
 Landroid/net/wifi/ScanResult;->numUsage:I
 Landroid/net/wifi/ScanResult;->seen:J
-Landroid/net/wifi/ScanResult;->untrusted:Z
 Landroid/net/wifi/ScanResult;->wifiSsid:Landroid/net/wifi/WifiSsid;
 Landroid/net/wifi/WifiConfiguration;->apBand:I
 Landroid/net/wifi/WifiConfiguration;->apChannel:I
@@ -1780,6 +1790,7 @@
 Landroid/os/HwParcel;-><init>(Z)V
 Landroid/os/HwRemoteBinder;-><init>()V
 Landroid/os/IBatteryPropertiesRegistrar$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/os/IDeviceIdleController;->getAppIdTempWhitelist()[I
 Landroid/os/IPermissionController$Stub$Proxy;->checkPermission(Ljava/lang/String;II)Z
 Landroid/os/IPermissionController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/os/IPermissionController;
 Landroid/os/IPowerManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
@@ -1827,9 +1838,7 @@
 Landroid/os/PowerManager;->getMinimumScreenBrightnessSetting()I
 Landroid/os/PowerManager;->isLightDeviceIdleMode()Z
 Landroid/os/PowerManager;->mService:Landroid/os/IPowerManager;
-Landroid/os/PowerManager;->userActivity(JZ)V
 Landroid/os/PowerManager;->validateWakeLockParameters(ILjava/lang/String;)V
-Landroid/os/PowerManager;->wakeUp(J)V
 Landroid/os/PowerManager;->wakeUp(JLjava/lang/String;)V
 Landroid/os/Process;->getFreeMemory()J
 Landroid/os/Process;->getParentPid(I)I
@@ -1837,6 +1846,7 @@
 Landroid/os/Process;->getTotalMemory()J
 Landroid/os/Process;->getUidForPid(I)I
 Landroid/os/Process;->isIsolated(I)Z
+Landroid/os/Process;->parseProcLine([BII[I[Ljava/lang/String;[J[F)Z
 Landroid/os/Process;->readProcFile(Ljava/lang/String;[I[Ljava/lang/String;[J[F)Z
 Landroid/os/Process;->readProcLines(Ljava/lang/String;[Ljava/lang/String;[J)V
 Landroid/os/Process;->setArgV0(Ljava/lang/String;)V
@@ -1863,11 +1873,9 @@
 Landroid/os/storage/StorageManager;->findVolumeByUuid(Ljava/lang/String;)Landroid/os/storage/VolumeInfo;
 Landroid/os/storage/StorageManager;->getBestVolumeDescription(Landroid/os/storage/VolumeInfo;)Ljava/lang/String;
 Landroid/os/storage/StorageManager;->getDisks()Ljava/util/List;
-Landroid/os/storage/StorageManager;->getPrimaryVolume()Landroid/os/storage/StorageVolume;
 Landroid/os/storage/StorageManager;->getStorageBytesUntilLow(Ljava/io/File;)J
 Landroid/os/storage/StorageManager;->getStorageFullBytes(Ljava/io/File;)J
 Landroid/os/storage/StorageManager;->getStorageLowBytes(Ljava/io/File;)J
-Landroid/os/storage/StorageManager;->getVolumeList()[Landroid/os/storage/StorageVolume;
 Landroid/os/storage/StorageManager;->getVolumeList(II)[Landroid/os/storage/StorageVolume;
 Landroid/os/storage/StorageManager;->getVolumePaths()[Ljava/lang/String;
 Landroid/os/storage/StorageManager;->getVolumes()Ljava/util/List;
@@ -1878,6 +1886,7 @@
 Landroid/os/storage/StorageVolume;->getPathFile()Ljava/io/File;
 Landroid/os/storage/StorageVolume;->getUserLabel()Ljava/lang/String;
 Landroid/os/storage/StorageVolume;->mPath:Ljava/io/File;
+Landroid/os/storage/StorageVolume;->mRemovable:Z
 Landroid/os/storage/VolumeInfo;->buildStorageVolume(Landroid/content/Context;IZ)Landroid/os/storage/StorageVolume;
 Landroid/os/storage/VolumeInfo;->getDisk()Landroid/os/storage/DiskInfo;
 Landroid/os/storage/VolumeInfo;->getEnvironmentForState(I)Ljava/lang/String;
@@ -1890,12 +1899,12 @@
 Landroid/os/storage/VolumeInfo;->TYPE_EMULATED:I
 Landroid/os/storage/VolumeInfo;->TYPE_PUBLIC:I
 Landroid/os/StrictMode$Span;->finish()V
-Landroid/os/StrictMode$ThreadPolicy$Builder;->penaltyListener(Landroid/os/StrictMode$OnThreadViolationListener;Ljava/util/concurrent/Executor;)Landroid/os/StrictMode$ThreadPolicy$Builder;
 Landroid/os/StrictMode;->conditionallyCheckInstanceCounts()V
 Landroid/os/StrictMode;->disableDeathOnFileUriExposure()V
 Landroid/os/StrictMode;->enterCriticalSpan(Ljava/lang/String;)Landroid/os/StrictMode$Span;
 Landroid/os/StrictMode;->getThreadPolicyMask()I
 Landroid/os/StrictMode;->onBinderStrictModePolicyChange(I)V
+Landroid/os/StrictMode;->sLastVmViolationTime:Ljava/util/HashMap;
 Landroid/os/StrictMode;->violationsBeingTimed:Ljava/lang/ThreadLocal;
 Landroid/os/SystemProperties;-><init>()V
 Landroid/os/SystemProperties;->addChangeCallback(Ljava/lang/Runnable;)V
@@ -1942,7 +1951,6 @@
 Landroid/os/UserHandle;->USER_SERIAL_SYSTEM:I
 Landroid/os/UserHandle;->USER_SYSTEM:I
 Landroid/os/UserManager;->get(Landroid/content/Context;)Landroid/os/UserManager;
-Landroid/os/UserManager;->getBadgedLabelForUser(Ljava/lang/CharSequence;Landroid/os/UserHandle;)Ljava/lang/CharSequence;
 Landroid/os/UserManager;->getMaxSupportedUsers()I
 Landroid/os/UserManager;->getProfiles(I)Ljava/util/List;
 Landroid/os/UserManager;->getUserHandle()I
@@ -2017,17 +2025,8 @@
 Landroid/print/PrinterId;->getServiceName()Landroid/content/ComponentName;
 Landroid/print/PrintJobInfo;->getAdvancedOptions()Landroid/os/Bundle;
 Landroid/print/PrintJobInfo;->getDocumentInfo()Landroid/print/PrintDocumentInfo;
-Landroid/provider/Browser$BookmarkColumns;->DATE:Ljava/lang/String;
-Landroid/provider/Browser;->BOOKMARKS_URI:Landroid/net/Uri;
-Landroid/provider/Browser;->canClearHistory(Landroid/content/ContentResolver;)Z
-Landroid/provider/Browser;->clearHistory(Landroid/content/ContentResolver;)V
-Landroid/provider/Browser;->clearSearches(Landroid/content/ContentResolver;)V
-Landroid/provider/Browser;->deleteFromHistory(Landroid/content/ContentResolver;Ljava/lang/String;)V
 Landroid/provider/Browser;->getVisitedHistory(Landroid/content/ContentResolver;)[Ljava/lang/String;
-Landroid/provider/Browser;->HISTORY_PROJECTION:[Ljava/lang/String;
-Landroid/provider/Browser;->SEARCHES_URI:Landroid/net/Uri;
 Landroid/provider/Browser;->sendString(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
-Landroid/provider/Browser;->updateVisitedHistory(Landroid/content/ContentResolver;Ljava/lang/String;Z)V
 Landroid/provider/CalendarContract$CalendarAlerts;->findNextAlarmTime(Landroid/content/ContentResolver;J)J
 Landroid/provider/CalendarContract$CalendarAlerts;->rescheduleMissedAlarms(Landroid/content/ContentResolver;Landroid/content/Context;Landroid/app/AlarmManager;)V
 Landroid/provider/Downloads$Impl$RequestHeaders;->INSERT_KEY_PREFIX:Ljava/lang/String;
@@ -2073,7 +2072,6 @@
 Landroid/provider/Settings$System;->putStringForUser(Landroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;I)Z
 Landroid/provider/Settings$System;->SCREEN_AUTO_BRIGHTNESS_ADJ:Ljava/lang/String;
 Landroid/provider/Settings$System;->sNameValueCache:Landroid/provider/Settings$NameValueCache;
-Landroid/provider/Settings$System;->VOLUME_SETTINGS:[Ljava/lang/String;
 Landroid/provider/Settings;->isCallingPackageAllowedToDrawOverlays(Landroid/content/Context;ILjava/lang/String;Z)Z
 Landroid/provider/Settings;->isCallingPackageAllowedToWriteSettings(Landroid/content/Context;ILjava/lang/String;Z)Z
 Landroid/provider/Telephony$Sms$Inbox;->addMessage(ILandroid/content/ContentResolver;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Long;Z)Landroid/net/Uri;
@@ -2282,7 +2280,6 @@
 Landroid/renderscript/RenderScriptCacheDir;->mCacheDir:Ljava/io/File;
 Landroid/renderscript/RenderScriptCacheDir;->setupDiskCache(Ljava/io/File;)V
 Landroid/security/keystore/AndroidKeyStoreProvider;->getKeyStoreOperationHandle(Ljava/lang/Object;)J
-Landroid/security/keystore/recovery/RecoveryController;->initRecoveryService(Ljava/lang/String;[B)V
 Landroid/security/KeyStore;->getInstance()Landroid/security/KeyStore;
 Landroid/security/net/config/RootTrustManager;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
 Landroid/service/media/IMediaBrowserServiceCallbacks$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/media/IMediaBrowserServiceCallbacks;
@@ -2294,8 +2291,6 @@
 Landroid/service/media/MediaBrowserService;->KEY_MEDIA_ITEM:Ljava/lang/String;
 Landroid/service/notification/NotificationListenerService;->isBound()Z
 Landroid/service/notification/NotificationListenerService;->mHandler:Landroid/os/Handler;
-Landroid/service/notification/NotificationListenerService;->registerAsSystemService(Landroid/content/Context;Landroid/content/ComponentName;I)V
-Landroid/service/notification/NotificationListenerService;->unregisterAsSystemService()V
 Landroid/service/notification/StatusBarNotification;->getInitialPid()I
 Landroid/service/notification/StatusBarNotification;->getUid()I
 Landroid/service/persistentdata/IPersistentDataBlockService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/service/persistentdata/IPersistentDataBlockService;
@@ -2364,6 +2359,9 @@
 Landroid/telecom/TelecomManager;->EXTRA_IS_HANDOVER:Ljava/lang/String;
 Landroid/telecom/TelecomManager;->getUserSelectedOutgoingPhoneAccount()Landroid/telecom/PhoneAccountHandle;
 Landroid/telecom/TelecomManager;->setUserSelectedOutgoingPhoneAccount(Landroid/telecom/PhoneAccountHandle;)V
+Landroid/telephony/CellIdentityGsm;->mBsic:I
+Landroid/telephony/CellSignalStrengthGsm;->mBitErrorRate:I
+Landroid/telephony/CellSignalStrengthGsm;->mSignalStrength:I
 Landroid/telephony/CellSignalStrengthLte;->mCqi:I
 Landroid/telephony/CellSignalStrengthLte;->mRsrp:I
 Landroid/telephony/CellSignalStrengthLte;->mRsrq:I
@@ -2374,6 +2372,7 @@
 Landroid/telephony/CellSignalStrengthWcdma;->mSignalStrength:I
 Landroid/telephony/PhoneNumberUtils;->isLocalEmergencyNumber(Landroid/content/Context;ILjava/lang/String;)Z
 Landroid/telephony/PhoneStateListener;->mSubId:Ljava/lang/Integer;
+Landroid/telephony/Rlog;->v(Ljava/lang/String;Ljava/lang/String;)I
 Landroid/telephony/ServiceState;->newFromBundle(Landroid/os/Bundle;)Landroid/telephony/ServiceState;
 Landroid/telephony/SignalStrength;-><init>()V
 Landroid/telephony/SignalStrength;->getAsuLevel()I
@@ -2398,6 +2397,8 @@
 Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_MODERATE:I
 Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_NONE_OR_UNKNOWN:I
 Landroid/telephony/SignalStrength;->SIGNAL_STRENGTH_POOR:I
+Landroid/telephony/SmsManager;->deleteMessageFromIcc(I)Z
+Landroid/telephony/SmsManager;->getAllMessagesFromIcc()Ljava/util/ArrayList;
 Landroid/telephony/SmsManager;->sendMultipartTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;Ljava/util/ArrayList;IZI)V
 Landroid/telephony/SmsManager;->sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;IZI)V
 Landroid/telephony/SmsMessage;->getSubId()I
@@ -2424,6 +2425,7 @@
 Landroid/telephony/TelephonyManager;->getITelephony()Lcom/android/internal/telephony/ITelephony;
 Landroid/telephony/TelephonyManager;->getLine1Number(I)Ljava/lang/String;
 Landroid/telephony/TelephonyManager;->getMultiSimConfiguration()Landroid/telephony/TelephonyManager$MultiSimVariants;
+Landroid/telephony/TelephonyManager;->getNai(I)Ljava/lang/String;
 Landroid/telephony/TelephonyManager;->getNetworkClass(I)I
 Landroid/telephony/TelephonyManager;->getNetworkCountryIso(I)Ljava/lang/String;
 Landroid/telephony/TelephonyManager;->getNetworkOperator(I)Ljava/lang/String;
@@ -2595,10 +2597,13 @@
 Landroid/view/ContextThemeWrapper;->mThemeResource:I
 Landroid/view/Display$HdrCapabilities;-><init>([IFFF)V
 Landroid/view/Display;->getDisplayAdjustments()Landroid/view/DisplayAdjustments;
+Landroid/view/Display;->getDisplayInfo(Landroid/view/DisplayInfo;)Z
 Landroid/view/DisplayAdjustments;->getConfiguration()Landroid/content/res/Configuration;
 Landroid/view/DisplayAdjustments;->setCompatibilityInfo(Landroid/content/res/CompatibilityInfo;)V
 Landroid/view/DisplayEventReceiver;->dispatchHotplug(JIZ)V
 Landroid/view/DisplayEventReceiver;->dispatchVsync(JII)V
+Landroid/view/DisplayInfo;-><init>()V
+Landroid/view/DisplayInfo;->displayCutout:Landroid/view/DisplayCutout;
 Landroid/view/DisplayListCanvas;->callDrawGLFunction2(J)V
 Landroid/view/DisplayListCanvas;->drawGLFunctor2(JLjava/lang/Runnable;)V
 Landroid/view/FrameMetrics;->mTimingData:[J
@@ -2651,6 +2656,7 @@
 Landroid/view/IWindowManager;->getAnimationScale(I)F
 Landroid/view/IWindowManager;->hasNavigationBar()Z
 Landroid/view/IWindowManager;->setAnimationScale(IF)V
+Landroid/view/IWindowManager;->setAnimationScales([F)V
 Landroid/view/IWindowManager;->setShelfHeight(ZI)V
 Landroid/view/IWindowManager;->setStrictModeVisualIndicatorPreference(Ljava/lang/String;)V
 Landroid/view/IWindowSession$Stub$Proxy;->relayout(Landroid/view/IWindow;ILandroid/view/WindowManager$LayoutParams;IIIIJLandroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/view/DisplayCutout$ParcelableWrapper;Landroid/util/MergedConfiguration;Landroid/view/Surface;)I
@@ -2799,7 +2805,6 @@
 Landroid/view/View;->getViewRootImpl()Landroid/view/ViewRootImpl;
 Landroid/view/View;->getWindowDisplayFrame(Landroid/graphics/Rect;)V
 Landroid/view/View;->includeForAccessibility()Z
-Landroid/view/View;->initializeScrollbars(Landroid/content/res/TypedArray;)V
 Landroid/view/View;->internalSetPadding(IIII)V
 Landroid/view/View;->invalidateParentIfNeeded()V
 Landroid/view/View;->isPaddingResolved()Z
@@ -2867,7 +2872,6 @@
 Landroid/view/View;->transformMatrixToLocal(Landroid/graphics/Matrix;)V
 Landroid/view/ViewConfiguration;->getDeviceGlobalActionKeyTimeout()J
 Landroid/view/ViewConfiguration;->getDoubleTapMinTime()I
-Landroid/view/ViewConfiguration;->getScaledScrollFactor()I
 Landroid/view/ViewConfiguration;->mFadingMarqueeEnabled:Z
 Landroid/view/ViewConfiguration;->sHasPermanentMenuKey:Z
 Landroid/view/ViewConfiguration;->sHasPermanentMenuKeySet:Z
@@ -2900,6 +2904,7 @@
 Landroid/view/ViewRootImpl;->enqueueInputEvent(Landroid/view/InputEvent;)V
 Landroid/view/ViewRootImpl;->getWindowFlags()I
 Landroid/view/ViewRootImpl;->invokeFunctor(JZ)V
+Landroid/view/ViewRootImpl;->mLastScrolledFocus:Ljava/lang/ref/WeakReference;
 Landroid/view/ViewRootImpl;->mStopped:Z
 Landroid/view/ViewRootImpl;->mSurface:Landroid/view/Surface;
 Landroid/view/ViewRootImpl;->mView:Landroid/view/View;
@@ -2908,6 +2913,7 @@
 Landroid/view/ViewTreeObserver$InternalInsetsInfo;->TOUCHABLE_INSETS_REGION:I
 Landroid/view/ViewTreeObserver;->addOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
 Landroid/view/ViewTreeObserver;->removeOnComputeInternalInsetsListener(Landroid/view/ViewTreeObserver$OnComputeInternalInsetsListener;)V
+Landroid/view/Window;->addPrivateFlags(I)V
 Landroid/view/Window;->mAppName:Ljava/lang/String;
 Landroid/view/Window;->mAppToken:Landroid/os/IBinder;
 Landroid/view/Window;->mCallback:Landroid/view/Window$Callback;
@@ -2959,6 +2965,7 @@
 Landroid/webkit/CacheManager;->saveCacheFile(Ljava/lang/String;Landroid/webkit/CacheManager$CacheResult;)V
 Landroid/webkit/CacheManager;->startCacheTransaction()Z
 Landroid/webkit/IWebViewUpdateService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V
+Landroid/webkit/IWebViewUpdateService$Stub$Proxy;->waitForAndGetProvider()Landroid/webkit/WebViewProviderResponse;
 Landroid/webkit/WebResourceResponse;->mImmutable:Z
 Landroid/webkit/WebSettings$TextSize;->value:I
 Landroid/webkit/WebSyncManager;->mHandler:Landroid/os/Handler;
@@ -2977,13 +2984,13 @@
 Landroid/webkit/WebView;->restorePicture(Landroid/os/Bundle;Ljava/io/File;)Z
 Landroid/webkit/WebView;->savePicture(Landroid/os/Bundle;Ljava/io/File;)Z
 Landroid/webkit/WebView;->sEnforceThreadChecking:Z
-Landroid/webkit/WebViewClient;->onUnhandledInputEvent(Landroid/webkit/WebView;Landroid/view/InputEvent;)V
 Landroid/webkit/WebViewDelegate;-><init>()V
 Landroid/webkit/WebViewFactory;->getProvider()Landroid/webkit/WebViewFactoryProvider;
 Landroid/webkit/WebViewFactory;->getUpdateService()Landroid/webkit/IWebViewUpdateService;
 Landroid/webkit/WebViewFactory;->getWebViewContextAndSetProvider()Landroid/content/Context;
 Landroid/webkit/WebViewFactory;->sPackageInfo:Landroid/content/pm/PackageInfo;
 Landroid/webkit/WebViewFactory;->sProviderInstance:Landroid/webkit/WebViewFactoryProvider;
+Landroid/webkit/WebViewProviderResponse;->packageInfo:Landroid/content/pm/PackageInfo;
 Landroid/widget/AbsListView$FlingRunnable;->endFling()V
 Landroid/widget/AbsListView$FlingRunnable;->mScroller:Landroid/widget/OverScroller;
 Landroid/widget/AbsListView$FlingRunnable;->start(I)V
@@ -3048,7 +3055,9 @@
 Landroid/widget/DatePicker;->mDelegate:Landroid/widget/DatePicker$DatePickerDelegate;
 Landroid/widget/EdgeEffect;->mPaint:Landroid/graphics/Paint;
 Landroid/widget/Editor;->invalidateTextDisplayList()V
+Landroid/widget/Editor;->mInsertionControllerEnabled:Z
 Landroid/widget/Editor;->mSelectHandleLeft:Landroid/graphics/drawable/Drawable;
+Landroid/widget/Editor;->mSelectionControllerEnabled:Z
 Landroid/widget/Editor;->mShowCursor:J
 Landroid/widget/Editor;->mShowSoftInputOnFocus:Z
 Landroid/widget/ExpandableListView;->mChildDivider:Landroid/graphics/drawable/Drawable;
@@ -3098,8 +3107,6 @@
 Landroid/widget/ListView;->fillDown(II)Landroid/view/View;
 Landroid/widget/ListView;->fillSpecific(II)Landroid/view/View;
 Landroid/widget/ListView;->fillUp(II)Landroid/view/View;
-Landroid/widget/ListView;->findViewTraversal(I)Landroid/view/View;
-Landroid/widget/ListView;->findViewWithTagTraversal(Ljava/lang/Object;)Landroid/view/View;
 Landroid/widget/ListView;->mAreAllItemsSelectable:Z
 Landroid/widget/ListView;->mFooterViewInfos:Ljava/util/ArrayList;
 Landroid/widget/ListView;->mHeaderViewInfos:Ljava/util/ArrayList;
@@ -3108,8 +3115,11 @@
 Landroid/widget/MediaController;->mDecor:Landroid/view/View;
 Landroid/widget/MediaController;->mDecorLayoutParams:Landroid/view/WindowManager$LayoutParams;
 Landroid/widget/MediaController;->mWindowManager:Landroid/view/WindowManager;
+Landroid/widget/NumberPicker;->initializeSelectorWheelIndices()V
 Landroid/widget/NumberPicker;->mInputText:Landroid/widget/EditText;
+Landroid/widget/NumberPicker;->mMaxValue:I
 Landroid/widget/NumberPicker;->mSelectionDivider:Landroid/graphics/drawable/Drawable;
+Landroid/widget/NumberPicker;->mSelectionDividerHeight:I
 Landroid/widget/NumberPicker;->mSelectorWheelPaint:Landroid/graphics/Paint;
 Landroid/widget/OverScroller$SplineOverScroller;->mCurrVelocity:F
 Landroid/widget/OverScroller;->isScrollingInDirection(FF)Z
@@ -3205,7 +3215,6 @@
 Landroid/widget/TextView;->assumeLayout()V
 Landroid/widget/TextView;->createEditorIfNeeded()V
 Landroid/widget/TextView;->getHorizontallyScrolling()Z
-Landroid/widget/TextView;->getTextColor(Landroid/content/Context;Landroid/content/res/TypedArray;I)I
 Landroid/widget/TextView;->isSingleLine()Z
 Landroid/widget/TextView;->LINES:I
 Landroid/widget/TextView;->mCursorDrawableRes:I
@@ -3215,9 +3224,11 @@
 Landroid/widget/TextView;->mMarquee:Landroid/widget/TextView$Marquee;
 Landroid/widget/TextView;->mMaximum:I
 Landroid/widget/TextView;->mMaxMode:I
+Landroid/widget/TextView;->mShadowRadius:F
 Landroid/widget/TextView;->mSingleLine:Z
 Landroid/widget/TextView;->mText:Ljava/lang/CharSequence;
 Landroid/widget/TextView;->mTextPaint:Landroid/text/TextPaint;
+Landroid/widget/TextView;->mTextSelectHandleLeftRes:I
 Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;Landroid/widget/TextView$BufferType;ZI)V
 Landroid/widget/Toast$TN;->mNextView:Landroid/view/View;
 Landroid/widget/Toast$TN;->mParams:Landroid/view/WindowManager$LayoutParams;
@@ -3323,9 +3334,13 @@
 Lcom/android/internal/app/IVoiceInteractionManagerService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/app/IVoiceInteractionManagerService;
 Lcom/android/internal/app/IVoiceInteractionManagerService;->getKeyphraseSoundModel(ILjava/lang/String;)Landroid/hardware/soundtrigger/SoundTrigger$KeyphraseSoundModel;
 Lcom/android/internal/appwidget/IAppWidgetService$Stub;->asInterface(Landroid/os/IBinder;)Lcom/android/internal/appwidget/IAppWidgetService;
+Lcom/android/internal/content/PackageMonitor;->onPackageRemoved(Ljava/lang/String;I)V
+Lcom/android/internal/content/PackageMonitor;->register(Landroid/content/Context;Landroid/os/Looper;Z)V
 Lcom/android/internal/content/ReferrerIntent;-><init>(Landroid/content/Intent;Ljava/lang/String;)V
 Lcom/android/internal/content/ReferrerIntent;->mReferrer:Ljava/lang/String;
 Lcom/android/internal/location/ILocationProvider$Stub;-><init>()V
+Lcom/android/internal/logging/MetricsLogger;-><init>()V
+Lcom/android/internal/logging/MetricsLogger;->write(Landroid/metrics/LogMaker;)V
 Lcom/android/internal/os/BatterySipper;-><init>(Lcom/android/internal/os/BatterySipper$DrainType;Landroid/os/BatteryStats$Uid;D)V
 Lcom/android/internal/os/BatterySipper;->add(Lcom/android/internal/os/BatterySipper;)V
 Lcom/android/internal/os/BatterySipper;->drainType:Lcom/android/internal/os/BatterySipper$DrainType;
@@ -3402,16 +3417,19 @@
 Lcom/android/internal/R$drawable;->no_tile_256:I
 Lcom/android/internal/R$drawable;->reticle:I
 Lcom/android/internal/R$id;->amPm:I
+Lcom/android/internal/R$id;->day:I
 Lcom/android/internal/R$id;->edittext_container:I
 Lcom/android/internal/R$id;->icon:I
 Lcom/android/internal/R$id;->message:I
 Lcom/android/internal/R$id;->minute:I
+Lcom/android/internal/R$id;->month:I
 Lcom/android/internal/R$id;->shortcut:I
 Lcom/android/internal/R$id;->text:I
 Lcom/android/internal/R$id;->time:I
 Lcom/android/internal/R$id;->timePicker:I
 Lcom/android/internal/R$id;->title:I
 Lcom/android/internal/R$id;->title_container:I
+Lcom/android/internal/R$id;->year:I
 Lcom/android/internal/R$integer;->config_screenBrightnessDim:I
 Lcom/android/internal/R$integer;->config_toastDefaultGravity:I
 Lcom/android/internal/R$layout;->screen_title:I
@@ -3555,6 +3573,7 @@
 Lcom/android/internal/R$styleable;->TextAppearance:[I
 Lcom/android/internal/R$styleable;->TextView:[I
 Lcom/android/internal/R$styleable;->TextViewAppearance:[I
+Lcom/android/internal/R$styleable;->TextViewAppearance_textAppearance:I
 Lcom/android/internal/R$styleable;->TextView_drawableBottom:I
 Lcom/android/internal/R$styleable;->TextView_drawableLeft:I
 Lcom/android/internal/R$styleable;->TextView_drawableRight:I
@@ -3608,6 +3627,8 @@
 Lcom/android/internal/telephony/SmsHeader$ConcatRef;->refNumber:I
 Lcom/android/internal/telephony/SmsHeader$ConcatRef;->seqNumber:I
 Lcom/android/internal/telephony/SmsHeader;->concatRef:Lcom/android/internal/telephony/SmsHeader$ConcatRef;
+Lcom/android/internal/telephony/SmsMessageBase;->getOriginatingAddress()Ljava/lang/String;
+Lcom/android/internal/telephony/SmsMessageBase;->getPseudoSubject()Ljava/lang/String;
 Lcom/android/internal/telephony/SmsMessageBase;->mUserDataHeader:Lcom/android/internal/telephony/SmsHeader;
 Lcom/android/internal/telephony/SmsRawData;-><init>([B)V
 Lcom/android/internal/telephony/SmsRawData;->CREATOR:Landroid/os/Parcelable$Creator;
@@ -3698,6 +3719,7 @@
 Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V
 Lcom/android/org/conscrypt/OpenSSLX509Certificate;->mContext:J
 Lcom/android/org/conscrypt/TrustManagerImpl;-><init>(Ljava/security/KeyStore;)V
+Lcom/android/org/conscrypt/TrustManagerImpl;->checkServerTrusted([Ljava/security/cert/X509Certificate;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;
 Ldalvik/system/BaseDexClassLoader;->addDexPath(Ljava/lang/String;)V
 Ldalvik/system/BaseDexClassLoader;->getLdLibraryPath()Ljava/lang/String;
 Ldalvik/system/BaseDexClassLoader;->pathList:Ldalvik/system/DexPathList;
@@ -3723,6 +3745,7 @@
 Ldalvik/system/DexPathList$NativeLibraryElement;->path:Ljava/io/File;
 Ldalvik/system/DexPathList;-><init>(Ljava/lang/ClassLoader;Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)V
 Ldalvik/system/DexPathList;->addDexPath(Ljava/lang/String;Ljava/io/File;)V
+Ldalvik/system/DexPathList;->addNativePath(Ljava/util/Collection;)V
 Ldalvik/system/DexPathList;->definingContext:Ljava/lang/ClassLoader;
 Ldalvik/system/DexPathList;->dexElements:[Ldalvik/system/DexPathList$Element;
 Ldalvik/system/DexPathList;->loadDexFile(Ljava/io/File;Ljava/io/File;Ljava/lang/ClassLoader;[Ldalvik/system/DexPathList$Element;)Ldalvik/system/DexFile;
@@ -3816,6 +3839,7 @@
 Ljava/lang/Runtime;->nativeLoad(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/lang/String;
 Ljava/lang/Short;->value:S
 Ljava/lang/String;-><init>(II[C)V
+Ljava/lang/String;->count:I
 Ljava/lang/String;->getCharsNoCheck(II[CI)V
 Ljava/lang/System;-><init>()V
 Ljava/lang/System;->arraycopy([CI[CII)V
@@ -3920,6 +3944,7 @@
 Ljava/util/Arrays$ArrayList;->a:[Ljava/lang/Object;
 Ljava/util/Calendar;->zone:Ljava/util/TimeZone;
 Ljava/util/Collections$EmptyList;-><init>()V
+Ljava/util/Collections$EmptyMap;-><init>()V
 Ljava/util/Collections$SynchronizedCollection;->c:Ljava/util/Collection;
 Ljava/util/Collections$SynchronizedMap;->m:Ljava/util/Map;
 Ljava/util/Collections$UnmodifiableCollection;->c:Ljava/util/Collection;
diff --git a/config/hiddenapi-vendor-list.txt b/config/hiddenapi-vendor-list.txt
index 4f878ac..fe10f41 100644
--- a/config/hiddenapi-vendor-list.txt
+++ b/config/hiddenapi-vendor-list.txt
@@ -100,11 +100,8 @@
 Landroid/content/pm/IPackageStatsObserver;->onGetStatsCompleted(Landroid/content/pm/PackageStats;Z)V
 Landroid/database/sqlite/SqliteWrapper;->insert(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri;
 Landroid/database/sqlite/SqliteWrapper;->query(Landroid/content/Context;Landroid/content/ContentResolver;Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;
-Landroid/graphics/AvoidXfermode;-><init>(IILandroid/graphics/AvoidXfermode$Mode;)V
 Landroid/graphics/Bitmap;->createGraphicBufferHandle()Landroid/graphics/GraphicBuffer;
 Landroid/graphics/Bitmap;->createHardwareBitmap(Landroid/graphics/GraphicBuffer;)Landroid/graphics/Bitmap;
-Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;)Z
-Landroid/graphics/Canvas;->clipRegion(Landroid/graphics/Region;Landroid/graphics/Region$Op;)Z
 Landroid/graphics/drawable/Drawable;->isProjected()Z
 Landroid/graphics/drawable/Drawable;->updateTintFilter(Landroid/graphics/PorterDuffColorFilter;Landroid/content/res/ColorStateList;Landroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuffColorFilter;
 Landroid/hardware/camera2/CaptureRequest$Key;-><init>(Ljava/lang/String;Ljava/lang/Class;)V
@@ -152,8 +149,6 @@
 Landroid/net/ConnectivityManager;->getActiveNetworkQuotaInfo()Landroid/net/NetworkQuotaInfo;
 Landroid/net/ConnectivityManager;->setAirplaneMode(Z)V
 Landroid/net/ConnectivityManager;->startNattKeepalive(Landroid/net/Network;ILandroid/net/ConnectivityManager$PacketKeepaliveCallback;Ljava/net/InetAddress;ILjava/net/InetAddress;)Landroid/net/ConnectivityManager$PacketKeepalive;
-Landroid/net/ConnectivityManager;->startUsingNetworkFeature(ILjava/lang/String;)I
-Landroid/net/ConnectivityManager;->stopUsingNetworkFeature(ILjava/lang/String;)I
 Landroid/net/ConnectivityManager;->tether(Ljava/lang/String;)I
 Landroid/net/ConnectivityManager;->untether(Ljava/lang/String;)I
 Landroid/net/DhcpResults;-><init>()V
@@ -355,8 +350,6 @@
 Landroid/os/Parcel;->readBlob()[B
 Landroid/os/Parcel;->readStringArray()[Ljava/lang/String;
 Landroid/os/Parcel;->writeBlob([B)V
-Landroid/os/PowerManager;->goToSleep(J)V
-Landroid/os/PowerManager;->isScreenBrightnessBoosted()Z
 Landroid/os/Registrant;-><init>(Landroid/os/Handler;ILjava/lang/Object;)V
 Landroid/os/Registrant;->clear()V
 Landroid/os/Registrant;->notifyRegistrant()V
@@ -514,12 +507,6 @@
 Landroid/telephony/TelephonyManager;->putIntAtIndex(Landroid/content/ContentResolver;Ljava/lang/String;II)Z
 Landroid/telephony/TelephonyManager;->setPreferredNetworkType(II)Z
 Landroid/text/TextUtils;->isPrintableAsciiOnly(Ljava/lang/CharSequence;)Z
-Landroid/util/FloatMath;->ceil(F)F
-Landroid/util/FloatMath;->cos(F)F
-Landroid/util/FloatMath;->exp(F)F
-Landroid/util/FloatMath;->floor(F)F
-Landroid/util/FloatMath;->sin(F)F
-Landroid/util/FloatMath;->sqrt(F)F
 Landroid/util/IconDrawableFactory;->getBadgedIcon(Landroid/content/pm/PackageItemInfo;Landroid/content/pm/ApplicationInfo;I)Landroid/graphics/drawable/Drawable;
 Landroid/util/IconDrawableFactory;->newInstance(Landroid/content/Context;)Landroid/util/IconDrawableFactory;
 Landroid/util/LocalLog$ReadOnlyLocalLog;->dump(Ljava/io/FileDescriptor;Ljava/io/PrintWriter;[Ljava/lang/String;)V
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index b456b72..3b62bd7 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -5578,7 +5578,7 @@
         if (mParent != null) {
             throw new IllegalStateException("Can only be called on top-level activity");
         }
-        mMainThread.handleRelaunchActivityLocally(mToken);
+        mMainThread.scheduleRelaunchActivity(mToken);
     }
 
     /**
diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java
index 97c9fa5..7338bfe 100644
--- a/core/java/android/app/ActivityManagerInternal.java
+++ b/core/java/android/app/ActivityManagerInternal.java
@@ -236,6 +236,17 @@
             int userId, Intent[] intents, Bundle bOptions);
 
     /**
+     * Start activity {@code intent} without calling user-id check.
+     *
+     * - DO NOT call it with the calling UID cleared.
+     * - The caller must do the calling user ID check.
+     *
+     * @return error codes used by {@link IActivityManager#startActivity} and its siblings.
+     */
+    public abstract int startActivityAsUser(IApplicationThread caller, String callingPackage,
+            Intent intent, @Nullable Bundle options, int userId);
+
+    /**
      * Get the procstate for the UID.  The return value will be between
      * {@link ActivityManager#MIN_PROCESS_STATE} and {@link ActivityManager#MAX_PROCESS_STATE}.
      * Note if the UID doesn't exist, it'll return {@link ActivityManager#PROCESS_STATE_NONEXISTENT}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 037a87b..a183f73 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -1555,6 +1555,7 @@
         public static final int APPLICATION_INFO_CHANGED = 156;
         public static final int RUN_ISOLATED_ENTRY_POINT = 158;
         public static final int EXECUTE_TRANSACTION = 159;
+        public static final int RELAUNCH_ACTIVITY = 160;
 
         String codeToString(int code) {
             if (DEBUG_MESSAGES) {
@@ -1598,6 +1599,7 @@
                     case APPLICATION_INFO_CHANGED: return "APPLICATION_INFO_CHANGED";
                     case RUN_ISOLATED_ENTRY_POINT: return "RUN_ISOLATED_ENTRY_POINT";
                     case EXECUTE_TRANSACTION: return "EXECUTE_TRANSACTION";
+                    case RELAUNCH_ACTIVITY: return "RELAUNCH_ACTIVITY";
                 }
             }
             return Integer.toString(code);
@@ -1780,6 +1782,9 @@
                     }
                     // TODO(lifecycler): Recycle locally scheduled transactions.
                     break;
+                case RELAUNCH_ACTIVITY:
+                    handleRelaunchActivityLocally((IBinder) msg.obj);
+                    break;
             }
             Object obj = msg.obj;
             if (obj instanceof SomeArgs) {
@@ -2683,7 +2688,7 @@
         // TODO(lifecycler): Can't switch to use #handleLaunchActivity() because it will try to
         // call #reportSizeConfigurations(), but the server might not know anything about the
         // activity if it was launched from LocalAcvitivyManager.
-        return performLaunchActivity(r);
+        return performLaunchActivity(r, null /* customIntent */);
     }
 
     public final Activity getActivity(IBinder token) {
@@ -2768,7 +2773,7 @@
     }
 
     /**  Core implementation of activity launch. */
-    private Activity performLaunchActivity(ActivityClientRecord r) {
+    private Activity performLaunchActivity(ActivityClientRecord r, Intent customIntent) {
         ActivityInfo aInfo = r.activityInfo;
         if (r.packageInfo == null) {
             r.packageInfo = getPackageInfo(aInfo.applicationInfo, r.compatInfo,
@@ -2838,6 +2843,9 @@
                         r.embeddedID, r.lastNonConfigurationInstances, config,
                         r.referrer, r.voiceInteractor, window, r.configCallback);
 
+                if (customIntent != null) {
+                    activity.mIntent = customIntent;
+                }
                 r.lastNonConfigurationInstances = null;
                 checkAndBlockForNetworkAccess();
                 activity.mStartedActivity = false;
@@ -2982,7 +2990,7 @@
      */
     @Override
     public Activity handleLaunchActivity(ActivityClientRecord r,
-            PendingTransactionActions pendingActions) {
+            PendingTransactionActions pendingActions, Intent customIntent) {
         // If we are getting ready to gc after going to the background, well
         // we are back active so skip it.
         unscheduleGcIdler();
@@ -3005,7 +3013,7 @@
         }
         WindowManagerGlobal.initialize();
 
-        final Activity a = performLaunchActivity(r);
+        final Activity a = performLaunchActivity(r, customIntent);
 
         if (a != null) {
             r.createdConfig = new Configuration(mConfiguration);
@@ -4281,7 +4289,7 @@
         for (Map.Entry<IBinder, ActivityClientRecord> entry : mActivities.entrySet()) {
             final Activity activity = entry.getValue().activity;
             if (!activity.mFinished) {
-                handleRelaunchActivityLocally(entry.getKey());
+                scheduleRelaunchActivity(entry.getKey());
             }
         }
     }
@@ -4659,21 +4667,29 @@
         }
     }
 
-    /** Performs the activity relaunch locally vs. requesting from system-server. */
-    void handleRelaunchActivityLocally(IBinder token) {
-        if (Looper.myLooper() != getLooper()) {
-            throw new IllegalStateException("Must be called from main thread");
-        }
+    /**
+     * Post a message to relaunch the activity. We do this instead of launching it immediately,
+     * because this will destroy the activity from which it was called and interfere with the
+     * lifecycle changes it was going through before. We need to make sure that we have finished
+     * handling current transaction item before relaunching the activity.
+     */
+    void scheduleRelaunchActivity(IBinder token) {
+        sendMessage(H.RELAUNCH_ACTIVITY, token);
+    }
 
+    /** Performs the activity relaunch locally vs. requesting from system-server. */
+    private void handleRelaunchActivityLocally(IBinder token) {
         final ActivityClientRecord r = mActivities.get(token);
         if (r == null) {
+            Log.w(TAG, "Activity to relaunch no longer exists");
             return;
         }
 
         final int prevState = r.getLifecycleState();
 
-        if (prevState < ON_RESUME) {
-            Log.w(TAG, "Activity needs to be already resumed in other to be relaunched.");
+        if (prevState < ON_RESUME || prevState > ON_STOP) {
+            Log.w(TAG, "Activity state must be in [ON_RESUME..ON_STOP] in order to be relaunched,"
+                    + "current state is " + prevState);
             return;
         }
 
@@ -4699,6 +4715,8 @@
             List<ResultInfo> pendingResults, List<ReferrerIntent> pendingIntents,
             PendingTransactionActions pendingActions, boolean startsNotResumed,
             Configuration overrideConfig, String reason) {
+        // Preserve last used intent, it may be set from Activity#setIntent().
+        final Intent customIntent = r.activity.mIntent;
         // Need to ensure state is saved.
         if (!r.paused) {
             performPauseActivity(r, false, reason, null /* pendingActions */);
@@ -4731,7 +4749,7 @@
         r.startsNotResumed = startsNotResumed;
         r.overrideConfig = overrideConfig;
 
-        handleLaunchActivity(r, pendingActions);
+        handleLaunchActivity(r, pendingActions, customIntent);
     }
 
     @Override
@@ -5333,8 +5351,8 @@
                                         }
                                     }
                                 }
-                                final List<String> oldPaths =
-                                        sPackageManager.getPreviousCodePaths(packageName);
+                                final ArrayList<String> oldPaths = new ArrayList<>();
+                                LoadedApk.makePaths(this, pkgInfo.getApplicationInfo(), oldPaths);
                                 pkgInfo.updateApplicationInfo(aInfo, oldPaths);
                             } catch (RemoteException e) {
                             }
@@ -5512,6 +5530,7 @@
         Process.setArgV0(data.processName);
         android.ddm.DdmHandleAppName.setAppName(data.processName,
                                                 UserHandle.myUserId());
+        VMRuntime.setProcessPackageName(data.appInfo.packageName);
 
         if (mProfiler.profileFd != null) {
             mProfiler.startProfiling();
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index dcf4eec..07048f9 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -110,6 +110,27 @@
     public static final int MODE_DEFAULT = 3;
 
     /**
+     * Special mode that means "allow only when app is in foreground."  This is <b>not</b>
+     * returned from {@link #checkOp}, {@link #noteOp}, {@link #startOp}; rather, when this
+     * mode is set, these functions will return {@link #MODE_ALLOWED} when the app being
+     * checked is currently in the foreground, otherwise {@link #MODE_IGNORED}.
+     * @hide
+     */
+    public static final int MODE_FOREGROUND = 4;
+
+
+    /**
+     * @hide
+     */
+    public static final String[] MODE_NAMES = new String[] {
+            "allow",        // MODE_ALLOWED
+            "ignore",       // MODE_IGNORED
+            "deny",         // MODE_ERRORED
+            "default",      // MODE_DEFAULT
+            "foreground",   // MODE_FOREGROUND
+    };
+
+    /**
      * Metrics about an op when its uid is persistent.
      * @hide
      */
@@ -317,7 +338,9 @@
     /** @hide Any app start foreground service. */
     public static final int OP_START_FOREGROUND = 76;
     /** @hide */
-    public static final int _NUM_OP = 77;
+    public static final int OP_BLUETOOTH_SCAN = 77;
+    /** @hide */
+    public static final int _NUM_OP = 78;
 
     /** Access to coarse location information. */
     public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -559,6 +582,8 @@
     /** @hide */
     @SystemApi @TestApi
     public static final String OPSTR_START_FOREGROUND = "android:start_foreground";
+    /** @hide */
+    public static final String OPSTR_BLUETOOTH_SCAN = "android:bluetooth_scan";
 
     // Warning: If an permission is added here it also has to be added to
     // com.android.packageinstaller.permission.utils.EventLogger
@@ -619,83 +644,84 @@
      * make them all controlled by the same single operation.
      */
     private static int[] sOpToSwitch = new int[] {
-            OP_COARSE_LOCATION,
-            OP_COARSE_LOCATION,
-            OP_COARSE_LOCATION,
-            OP_VIBRATE,
-            OP_READ_CONTACTS,
-            OP_WRITE_CONTACTS,
-            OP_READ_CALL_LOG,
-            OP_WRITE_CALL_LOG,
-            OP_READ_CALENDAR,
-            OP_WRITE_CALENDAR,
-            OP_COARSE_LOCATION,
-            OP_POST_NOTIFICATION,
-            OP_COARSE_LOCATION,
-            OP_CALL_PHONE,
-            OP_READ_SMS,
-            OP_WRITE_SMS,
-            OP_RECEIVE_SMS,
-            OP_RECEIVE_SMS,
-            OP_RECEIVE_MMS,
-            OP_RECEIVE_WAP_PUSH,
-            OP_SEND_SMS,
-            OP_READ_SMS,
-            OP_WRITE_SMS,
-            OP_WRITE_SETTINGS,
-            OP_SYSTEM_ALERT_WINDOW,
-            OP_ACCESS_NOTIFICATIONS,
-            OP_CAMERA,
-            OP_RECORD_AUDIO,
-            OP_PLAY_AUDIO,
-            OP_READ_CLIPBOARD,
-            OP_WRITE_CLIPBOARD,
-            OP_TAKE_MEDIA_BUTTONS,
-            OP_TAKE_AUDIO_FOCUS,
-            OP_AUDIO_MASTER_VOLUME,
-            OP_AUDIO_VOICE_VOLUME,
-            OP_AUDIO_RING_VOLUME,
-            OP_AUDIO_MEDIA_VOLUME,
-            OP_AUDIO_ALARM_VOLUME,
-            OP_AUDIO_NOTIFICATION_VOLUME,
-            OP_AUDIO_BLUETOOTH_VOLUME,
-            OP_WAKE_LOCK,
-            OP_COARSE_LOCATION,
-            OP_COARSE_LOCATION,
-            OP_GET_USAGE_STATS,
-            OP_MUTE_MICROPHONE,
-            OP_TOAST_WINDOW,
-            OP_PROJECT_MEDIA,
-            OP_ACTIVATE_VPN,
-            OP_WRITE_WALLPAPER,
-            OP_ASSIST_STRUCTURE,
-            OP_ASSIST_SCREENSHOT,
-            OP_READ_PHONE_STATE,
-            OP_ADD_VOICEMAIL,
-            OP_USE_SIP,
-            OP_PROCESS_OUTGOING_CALLS,
-            OP_USE_FINGERPRINT,
-            OP_BODY_SENSORS,
-            OP_READ_CELL_BROADCASTS,
-            OP_MOCK_LOCATION,
-            OP_READ_EXTERNAL_STORAGE,
-            OP_WRITE_EXTERNAL_STORAGE,
-            OP_TURN_SCREEN_ON,
-            OP_GET_ACCOUNTS,
-            OP_RUN_IN_BACKGROUND,
-            OP_AUDIO_ACCESSIBILITY_VOLUME,
-            OP_READ_PHONE_NUMBERS,
-            OP_REQUEST_INSTALL_PACKAGES,
-            OP_PICTURE_IN_PICTURE,
-            OP_INSTANT_APP_START_FOREGROUND,
-            OP_ANSWER_PHONE_CALLS,
-            OP_RUN_ANY_IN_BACKGROUND,
-            OP_CHANGE_WIFI_STATE,
-            OP_REQUEST_DELETE_PACKAGES,
-            OP_BIND_ACCESSIBILITY_SERVICE,
-            OP_ACCEPT_HANDOVER,
-            OP_MANAGE_IPSEC_TUNNELS,
-            OP_START_FOREGROUND,
+            OP_COARSE_LOCATION,                 // COARSE_LOCATION
+            OP_COARSE_LOCATION,                 // FINE_LOCATION
+            OP_COARSE_LOCATION,                 // GPS
+            OP_VIBRATE,                         // VIBRATE
+            OP_READ_CONTACTS,                   // READ_CONTACTS
+            OP_WRITE_CONTACTS,                  // WRITE_CONTACTS
+            OP_READ_CALL_LOG,                   // READ_CALL_LOG
+            OP_WRITE_CALL_LOG,                  // WRITE_CALL_LOG
+            OP_READ_CALENDAR,                   // READ_CALENDAR
+            OP_WRITE_CALENDAR,                  // WRITE_CALENDAR
+            OP_COARSE_LOCATION,                 // WIFI_SCAN
+            OP_POST_NOTIFICATION,               // POST_NOTIFICATION
+            OP_COARSE_LOCATION,                 // NEIGHBORING_CELLS
+            OP_CALL_PHONE,                      // CALL_PHONE
+            OP_READ_SMS,                        // READ_SMS
+            OP_WRITE_SMS,                       // WRITE_SMS
+            OP_RECEIVE_SMS,                     // RECEIVE_SMS
+            OP_RECEIVE_SMS,                     // RECEIVE_EMERGECY_SMS
+            OP_RECEIVE_MMS,                     // RECEIVE_MMS
+            OP_RECEIVE_WAP_PUSH,                // RECEIVE_WAP_PUSH
+            OP_SEND_SMS,                        // SEND_SMS
+            OP_READ_SMS,                        // READ_ICC_SMS
+            OP_WRITE_SMS,                       // WRITE_ICC_SMS
+            OP_WRITE_SETTINGS,                  // WRITE_SETTINGS
+            OP_SYSTEM_ALERT_WINDOW,             // SYSTEM_ALERT_WINDOW
+            OP_ACCESS_NOTIFICATIONS,            // ACCESS_NOTIFICATIONS
+            OP_CAMERA,                          // CAMERA
+            OP_RECORD_AUDIO,                    // RECORD_AUDIO
+            OP_PLAY_AUDIO,                      // PLAY_AUDIO
+            OP_READ_CLIPBOARD,                  // READ_CLIPBOARD
+            OP_WRITE_CLIPBOARD,                 // WRITE_CLIPBOARD
+            OP_TAKE_MEDIA_BUTTONS,              // TAKE_MEDIA_BUTTONS
+            OP_TAKE_AUDIO_FOCUS,                // TAKE_AUDIO_FOCUS
+            OP_AUDIO_MASTER_VOLUME,             // AUDIO_MASTER_VOLUME
+            OP_AUDIO_VOICE_VOLUME,              // AUDIO_VOICE_VOLUME
+            OP_AUDIO_RING_VOLUME,               // AUDIO_RING_VOLUME
+            OP_AUDIO_MEDIA_VOLUME,              // AUDIO_MEDIA_VOLUME
+            OP_AUDIO_ALARM_VOLUME,              // AUDIO_ALARM_VOLUME
+            OP_AUDIO_NOTIFICATION_VOLUME,       // AUDIO_NOTIFICATION_VOLUME
+            OP_AUDIO_BLUETOOTH_VOLUME,          // AUDIO_BLUETOOTH_VOLUME
+            OP_WAKE_LOCK,                       // WAKE_LOCK
+            OP_COARSE_LOCATION,                 // MONITOR_LOCATION
+            OP_COARSE_LOCATION,                 // MONITOR_HIGH_POWER_LOCATION
+            OP_GET_USAGE_STATS,                 // GET_USAGE_STATS
+            OP_MUTE_MICROPHONE,                 // MUTE_MICROPHONE
+            OP_TOAST_WINDOW,                    // TOAST_WINDOW
+            OP_PROJECT_MEDIA,                   // PROJECT_MEDIA
+            OP_ACTIVATE_VPN,                    // ACTIVATE_VPN
+            OP_WRITE_WALLPAPER,                 // WRITE_WALLPAPER
+            OP_ASSIST_STRUCTURE,                // ASSIST_STRUCTURE
+            OP_ASSIST_SCREENSHOT,               // ASSIST_SCREENSHOT
+            OP_READ_PHONE_STATE,                // READ_PHONE_STATE
+            OP_ADD_VOICEMAIL,                   // ADD_VOICEMAIL
+            OP_USE_SIP,                         // USE_SIP
+            OP_PROCESS_OUTGOING_CALLS,          // PROCESS_OUTGOING_CALLS
+            OP_USE_FINGERPRINT,                 // USE_FINGERPRINT
+            OP_BODY_SENSORS,                    // BODY_SENSORS
+            OP_READ_CELL_BROADCASTS,            // READ_CELL_BROADCASTS
+            OP_MOCK_LOCATION,                   // MOCK_LOCATION
+            OP_READ_EXTERNAL_STORAGE,           // READ_EXTERNAL_STORAGE
+            OP_WRITE_EXTERNAL_STORAGE,          // WRITE_EXTERNAL_STORAGE
+            OP_TURN_SCREEN_ON,                  // TURN_SCREEN_ON
+            OP_GET_ACCOUNTS,                    // GET_ACCOUNTS
+            OP_RUN_IN_BACKGROUND,               // RUN_IN_BACKGROUND
+            OP_AUDIO_ACCESSIBILITY_VOLUME,      // AUDIO_ACCESSIBILITY_VOLUME
+            OP_READ_PHONE_NUMBERS,              // READ_PHONE_NUMBERS
+            OP_REQUEST_INSTALL_PACKAGES,        // REQUEST_INSTALL_PACKAGES
+            OP_PICTURE_IN_PICTURE,              // ENTER_PICTURE_IN_PICTURE_ON_HIDE
+            OP_INSTANT_APP_START_FOREGROUND,    // INSTANT_APP_START_FOREGROUND
+            OP_ANSWER_PHONE_CALLS,              // ANSWER_PHONE_CALLS
+            OP_RUN_ANY_IN_BACKGROUND,           // OP_RUN_ANY_IN_BACKGROUND
+            OP_CHANGE_WIFI_STATE,               // OP_CHANGE_WIFI_STATE
+            OP_REQUEST_DELETE_PACKAGES,         // OP_REQUEST_DELETE_PACKAGES
+            OP_BIND_ACCESSIBILITY_SERVICE,      // OP_BIND_ACCESSIBILITY_SERVICE
+            OP_ACCEPT_HANDOVER,                 // ACCEPT_HANDOVER
+            OP_MANAGE_IPSEC_TUNNELS,            // MANAGE_IPSEC_HANDOVERS
+            OP_START_FOREGROUND,                // START_FOREGROUND
+            OP_COARSE_LOCATION,                 // BLUETOOTH_SCAN
     };
 
     /**
@@ -779,6 +805,7 @@
             OPSTR_ACCEPT_HANDOVER,
             OPSTR_MANAGE_IPSEC_TUNNELS,
             OPSTR_START_FOREGROUND,
+            OPSTR_BLUETOOTH_SCAN,
     };
 
     /**
@@ -863,6 +890,7 @@
             "ACCEPT_HANDOVER",
             "MANAGE_IPSEC_TUNNELS",
             "START_FOREGROUND",
+            "BLUETOOTH_SCAN",
     };
 
     /**
@@ -947,6 +975,7 @@
             Manifest.permission.ACCEPT_HANDOVER,
             null, // no permission for OP_MANAGE_IPSEC_TUNNELS
             Manifest.permission.FOREGROUND_SERVICE,
+            null, // no permission for OP_BLUETOOTH_SCAN
     };
 
     /**
@@ -1032,6 +1061,7 @@
             null, // ACCEPT_HANDOVER
             null, // MANAGE_IPSEC_TUNNELS
             null, // START_FOREGROUND
+            null, // maybe should be UserManager.DISALLOW_SHARE_LOCATION, //BLUETOOTH_SCAN
     };
 
     /**
@@ -1116,6 +1146,7 @@
             false, // ACCEPT_HANDOVER
             false, // MANAGE_IPSEC_HANDOVERS
             false, // START_FOREGROUND
+            true, // BLUETOOTH_SCAN
     };
 
     /**
@@ -1199,6 +1230,7 @@
             AppOpsManager.MODE_ALLOWED,  // ACCEPT_HANDOVER
             AppOpsManager.MODE_ERRORED,  // MANAGE_IPSEC_TUNNELS
             AppOpsManager.MODE_ALLOWED,  // OP_START_FOREGROUND
+            AppOpsManager.MODE_ALLOWED,  // OP_BLUETOOTH_SCAN
     };
 
     /**
@@ -1286,6 +1318,7 @@
             false, // ACCEPT_HANDOVER
             false, // MANAGE_IPSEC_TUNNELS
             false, // START_FOREGROUND
+            false, // BLUETOOTH_SCAN
     };
 
     /**
@@ -1420,19 +1453,11 @@
      * Retrieve the human readable mode.
      * @hide
      */
-    public static String modeToString(int mode) {
-        switch (mode) {
-            case MODE_ALLOWED:
-                return "allow";
-            case MODE_IGNORED:
-                return "ignore";
-            case MODE_ERRORED:
-                return "deny";
-            case MODE_DEFAULT:
-                return "default";
-            default:
-                return "mode=" + mode;
+    public static String modeToName(int mode) {
+        if (mode >= 0 && mode < MODE_NAMES.length) {
+            return MODE_NAMES[mode];
         }
+        return "mode=" + mode;
     }
 
     /**
@@ -1554,30 +1579,42 @@
         }
 
         public long getTime() {
-            long time = 0;
-            for (int i = 0; i < _NUM_UID_STATE; i++) {
-                if (mTimes[i] > time) {
-                    time = mTimes[i];
-                }
-            }
-            return time;
+            return maxTime(mTimes, 0, _NUM_UID_STATE);
         }
 
-        public long getTimeFor(int uidState) {
+        public long getLastAccessTime() {
+            return maxTime(mTimes, 0, _NUM_UID_STATE);
+        }
+
+        public long getLastAccessForegroundTime() {
+            return maxTime(mTimes, UID_STATE_PERSISTENT, UID_STATE_FOREGROUND_SERVICE + 1);
+        }
+
+        public long getLastAccessBackgroundTime() {
+            return maxTime(mTimes, UID_STATE_FOREGROUND_SERVICE + 1, _NUM_UID_STATE);
+        }
+
+        public long getLastTimeFor(int uidState) {
             return mTimes[uidState];
         }
 
         public long getRejectTime() {
-            long time = 0;
-            for (int i = 0; i < _NUM_UID_STATE; i++) {
-                if (mRejectTimes[i] > time) {
-                    time = mRejectTimes[i];
-                }
-            }
-            return time;
+            return maxTime(mRejectTimes, 0, _NUM_UID_STATE);
         }
 
-        public long getRejectTimeFor(int uidState) {
+        public long getLastRejectTime() {
+            return maxTime(mRejectTimes, 0, _NUM_UID_STATE);
+        }
+
+        public long getLastRejectForegroundTime() {
+            return maxTime(mRejectTimes, UID_STATE_PERSISTENT, UID_STATE_FOREGROUND_SERVICE + 1);
+        }
+
+        public long getLastRejectBackgroundTime() {
+            return maxTime(mRejectTimes, UID_STATE_FOREGROUND_SERVICE + 1, _NUM_UID_STATE);
+        }
+
+        public long getLastRejectTimeFor(int uidState) {
             return mRejectTimes[uidState];
         }
 
@@ -1680,6 +1717,7 @@
      * @param ops The set of operations you are interested in, or null if you want all of them.
      * @hide
      */
+    @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS)
     public List<AppOpsManager.PackageOps> getPackagesForOps(int[] ops) {
         try {
             return mService.getPackagesForOps(ops);
@@ -1696,6 +1734,7 @@
      * @param ops The set of operations you are interested in, or null if you want all of them.
      * @hide
      */
+    @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS)
     public List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, int[] ops) {
         try {
             return mService.getOpsForPackage(uid, packageName, ops);
@@ -2009,6 +2048,17 @@
      * used for a quick check to see if an operation has been disabled for the application,
      * as an early reject of some work.  This does not modify the time stamp or other data
      * about the operation.
+     *
+     * <p>Important things this will not do (which you need to ultimate use
+     * {@link #noteOp(String, int, String)} or {@link #startOp(String, int, String)} to cover):</p>
+     * <ul>
+     *     <li>Verifying the uid and package are consistent, so callers can't spoof
+     *     their identity.</li>
+     *     <li>Taking into account the current foreground/background state of the
+     *     app; apps whose mode varies by this state will always be reported
+     *     as {@link #MODE_ALLOWED}.</li>
+     * </ul>
+     *
      * @param op The operation to check.  One of the OPSTR_* constants.
      * @param uid The user id of the application attempting to perform the operation.
      * @param packageName The name of the application attempting to perform the operation.
@@ -2128,6 +2178,17 @@
      * used for a quick check to see if an operation has been disabled for the application,
      * as an early reject of some work.  This does not modify the time stamp or other data
      * about the operation.
+     *
+     * <p>Important things this will not do (which you need to ultimate use
+     * {@link #noteOp(int, int, String)} or {@link #startOp(int, int, String)} to cover):</p>
+     * <ul>
+     *     <li>Verifying the uid and package are consistent, so callers can't spoof
+     *     their identity.</li>
+     *     <li>Taking into account the current foreground/background state of the
+     *     app; apps whose mode varies by this state will always be reported
+     *     as {@link #MODE_ALLOWED}.</li>
+     * </ul>
+     *
      * @param op The operation to check.  One of the OP_* constants.
      * @param uid The user id of the application attempting to perform the operation.
      * @param packageName The name of the application attempting to perform the operation.
@@ -2445,4 +2506,17 @@
     public static String[] getOpStrs() {
         return Arrays.copyOf(sOpToString, sOpToString.length);
     }
+
+    /**
+     * @hide
+     */
+    public static long maxTime(long[] times, int start, int end) {
+        long time = 0;
+        for (int i = start; i < end; i++) {
+            if (times[i] > time) {
+                time = times[i];
+            }
+        }
+        return time;
+    }
 }
diff --git a/core/java/android/app/ApplicationLoaders.java b/core/java/android/app/ApplicationLoaders.java
index 7257044..0ed50f2 100644
--- a/core/java/android/app/ApplicationLoaders.java
+++ b/core/java/android/app/ApplicationLoaders.java
@@ -25,6 +25,8 @@
 
 import dalvik.system.PathClassLoader;
 
+import java.util.Collection;
+
 /** @hide */
 public class ApplicationLoaders {
     public static ApplicationLoaders getDefault() {
@@ -121,6 +123,17 @@
         baseDexClassLoader.addDexPath(dexPath);
     }
 
+    /**
+     * @hide
+     */
+    void addNative(ClassLoader classLoader, Collection<String> libPaths) {
+        if (!(classLoader instanceof PathClassLoader)) {
+            throw new IllegalStateException("class loader is not a PathClassLoader");
+        }
+        final PathClassLoader baseDexClassLoader = (PathClassLoader) classLoader;
+        baseDexClassLoader.addNativePath(libPaths);
+    }
+
     private final ArrayMap<String, ClassLoader> mLoaders = new ArrayMap<>();
 
     private static final ApplicationLoaders gApplicationLoaders = new ApplicationLoaders();
diff --git a/core/java/android/app/ClientTransactionHandler.java b/core/java/android/app/ClientTransactionHandler.java
index ea0d703..d9c7cf3 100644
--- a/core/java/android/app/ClientTransactionHandler.java
+++ b/core/java/android/app/ClientTransactionHandler.java
@@ -18,6 +18,7 @@
 import android.app.servertransaction.ClientTransaction;
 import android.app.servertransaction.PendingTransactionActions;
 import android.app.servertransaction.TransactionExecutor;
+import android.content.Intent;
 import android.content.pm.ApplicationInfo;
 import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
@@ -140,7 +141,7 @@
 
     /** Perform activity launch. */
     public abstract Activity handleLaunchActivity(ActivityThread.ActivityClientRecord r,
-            PendingTransactionActions pendingActions);
+            PendingTransactionActions pendingActions, Intent customIntent);
 
     /** Perform activity start. */
     public abstract void handleStartActivity(ActivityThread.ActivityClientRecord r,
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 9a491bc..9511786 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -1048,6 +1048,22 @@
     }
 
     @Override
+    public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions) {
+        warnIfCallingFromSystemProcess();
+        String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
+        try {
+            intent.prepareToLeaveProcess(this);
+            ActivityManager.getService().broadcastIntent(
+                    mMainThread.getApplicationThread(), intent, resolvedType, null,
+                    Activity.RESULT_OK, null, null, receiverPermissions, AppOpsManager.OP_NONE,
+                    null, false, false, user.getIdentifier());
+        } catch (RemoteException e) {
+            throw e.rethrowFromSystemServer();
+        }
+    }
+
+    @Override
     public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
         warnIfCallingFromSystemProcess();
         String resolvedType = intent.resolveTypeIfNeeded(getContentResolver());
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index fc7d9a5..8c0cd23 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -90,6 +90,7 @@
 public final class LoadedApk {
     static final String TAG = "LoadedApk";
     static final boolean DEBUG = false;
+    private static final String PROPERTY_NAME_APPEND_NATIVE = "pi.append_native_lib_paths";
 
     private final ActivityThread mActivityThread;
     final String mPackageName;
@@ -723,6 +724,10 @@
             needToSetupJitProfiles = true;
         }
 
+        if (!libPaths.isEmpty() && SystemProperties.getBoolean(PROPERTY_NAME_APPEND_NATIVE, true)) {
+            ApplicationLoaders.getDefault().addNative(mClassLoader, libPaths);
+        }
+
         if (addedPaths != null && addedPaths.size() > 0) {
             final String add = TextUtils.join(File.pathSeparator, addedPaths);
             ApplicationLoaders.getDefault().addPath(mClassLoader, add);
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index c5b8019..327d4fe 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -2722,7 +2722,40 @@
      * @hide
      */
     public static boolean areRemoteViewsChanged(Builder first, Builder second) {
-        return !first.usesStandardHeader() || !second.usesStandardHeader();
+        if (!Objects.equals(first.usesStandardHeader(), second.usesStandardHeader())) {
+            return true;
+        }
+
+        if (areRemoteViewsChanged(first.mN.contentView, second.mN.contentView)) {
+            return true;
+        }
+        if (areRemoteViewsChanged(first.mN.bigContentView, second.mN.bigContentView)) {
+            return true;
+        }
+        if (areRemoteViewsChanged(first.mN.headsUpContentView, second.mN.headsUpContentView)) {
+            return true;
+        }
+
+        return false;
+    }
+
+    private static boolean areRemoteViewsChanged(RemoteViews first, RemoteViews second) {
+        if (first == null && second == null) {
+            return false;
+        }
+        if (first == null && second != null || first != null && second == null) {
+            return true;
+        }
+
+        if (!Objects.equals(first.getLayoutId(), second.getLayoutId())) {
+            return true;
+        }
+
+        if (!Objects.equals(first.getSequenceNumber(), second.getSequenceNumber())) {
+            return true;
+        }
+
+        return false;
     }
 
     /**
@@ -5102,6 +5135,10 @@
                     savedBundle.getBoolean(EXTRA_SHOW_CHRONOMETER));
             publicExtras.putBoolean(EXTRA_CHRONOMETER_COUNT_DOWN,
                     savedBundle.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN));
+            String appName = savedBundle.getString(EXTRA_SUBSTITUTE_APP_NAME);
+            if (appName != null) {
+                publicExtras.putString(EXTRA_SUBSTITUTE_APP_NAME, appName);
+            }
             mN.extras = publicExtras;
             RemoteViews view;
             if (ambient) {
diff --git a/core/java/android/app/NotificationChannel.java b/core/java/android/app/NotificationChannel.java
index 9e47ced..ba355f9 100644
--- a/core/java/android/app/NotificationChannel.java
+++ b/core/java/android/app/NotificationChannel.java
@@ -76,6 +76,7 @@
     private static final String ATT_CONTENT_TYPE = "content_type";
     private static final String ATT_SHOW_BADGE = "show_badge";
     private static final String ATT_USER_LOCKED = "locked";
+    private static final String ATT_FG_SERVICE_SHOWN = "fgservice";
     private static final String ATT_GROUP = "group";
     private static final String ATT_BLOCKABLE_SYSTEM = "blockable_system";
     private static final String DELIMITER = ",";
@@ -144,6 +145,7 @@
     // Bitwise representation of fields that have been changed by the user, preventing the app from
     // making changes to these fields.
     private int mUserLockedFields;
+    private boolean mFgServiceShown;
     private boolean mVibrationEnabled;
     private boolean mShowBadge = DEFAULT_SHOW_BADGE;
     private boolean mDeleted = DEFAULT_DELETED;
@@ -200,6 +202,7 @@
         mLights = in.readByte() != 0;
         mVibration = in.createLongArray();
         mUserLockedFields = in.readInt();
+        mFgServiceShown = in.readByte() != 0;
         mVibrationEnabled = in.readByte() != 0;
         mShowBadge = in.readByte() != 0;
         mDeleted = in.readByte() != 0;
@@ -245,6 +248,7 @@
         dest.writeByte(mLights ? (byte) 1 : (byte) 0);
         dest.writeLongArray(mVibration);
         dest.writeInt(mUserLockedFields);
+        dest.writeByte(mFgServiceShown ? (byte) 1 : (byte) 0);
         dest.writeByte(mVibrationEnabled ? (byte) 1 : (byte) 0);
         dest.writeByte(mShowBadge ? (byte) 1 : (byte) 0);
         dest.writeByte(mDeleted ? (byte) 1 : (byte) 0);
@@ -281,6 +285,13 @@
     /**
      * @hide
      */
+    public void setFgServiceShown(boolean shown) {
+        mFgServiceShown = shown;
+    }
+
+    /**
+     * @hide
+     */
     public void setDeleted(boolean deleted) {
         mDeleted = deleted;
     }
@@ -576,6 +587,13 @@
     /**
      * @hide
      */
+    public boolean isFgServiceShown() {
+        return mFgServiceShown;
+    }
+
+    /**
+     * @hide
+     */
     public boolean isBlockableSystem() {
         return mBlockableSystem;
     }
@@ -620,6 +638,7 @@
         setDeleted(safeBool(parser, ATT_DELETED, false));
         setGroup(parser.getAttributeValue(null, ATT_GROUP));
         lockFields(safeInt(parser, ATT_USER_LOCKED, 0));
+        setFgServiceShown(safeBool(parser, ATT_FG_SERVICE_SHOWN, false));
         setBlockableSystem(safeBool(parser, ATT_BLOCKABLE_SYSTEM, false));
     }
 
@@ -724,6 +743,9 @@
         if (getUserLockedFields() != 0) {
             out.attribute(null, ATT_USER_LOCKED, Integer.toString(getUserLockedFields()));
         }
+        if (isFgServiceShown()) {
+            out.attribute(null, ATT_FG_SERVICE_SHOWN, Boolean.toString(isFgServiceShown()));
+        }
         if (canShowBadge()) {
             out.attribute(null, ATT_SHOW_BADGE, Boolean.toString(canShowBadge()));
         }
@@ -772,6 +794,7 @@
         record.put(ATT_LIGHT_COLOR, Integer.toString(getLightColor()));
         record.put(ATT_VIBRATION_ENABLED, Boolean.toString(shouldVibrate()));
         record.put(ATT_USER_LOCKED, Integer.toString(getUserLockedFields()));
+        record.put(ATT_FG_SERVICE_SHOWN, Boolean.toString(isFgServiceShown()));
         record.put(ATT_VIBRATION, longArrayToString(getVibrationPattern()));
         record.put(ATT_SHOW_BADGE, Boolean.toString(canShowBadge()));
         record.put(ATT_DELETED, Boolean.toString(isDeleted()));
@@ -933,6 +956,7 @@
                 + ", mLightColor=" + mLightColor
                 + ", mVibration=" + Arrays.toString(mVibration)
                 + ", mUserLockedFields=" + Integer.toHexString(mUserLockedFields)
+                + ", mFgServiceShown=" + mFgServiceShown
                 + ", mVibrationEnabled=" + mVibrationEnabled
                 + ", mShowBadge=" + mShowBadge
                 + ", mDeleted=" + mDeleted
@@ -963,6 +987,7 @@
             }
         }
         proto.write(NotificationChannelProto.USER_LOCKED_FIELDS, mUserLockedFields);
+        proto.write(NotificationChannelProto.FG_SERVICE_SHOWN, mFgServiceShown);
         proto.write(NotificationChannelProto.IS_VIBRATION_ENABLED, mVibrationEnabled);
         proto.write(NotificationChannelProto.SHOW_BADGE, mShowBadge);
         proto.write(NotificationChannelProto.IS_DELETED, mDeleted);
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 6c2fb2d..fde756c 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -442,9 +442,6 @@
             synchronized (this) {
                 mCachedWallpaper = null;
                 mCachedWallpaperUserId = 0;
-                if (mDefaultWallpaper != null) {
-                    mDefaultWallpaper.recycle();
-                }
                 mDefaultWallpaper = null;
             }
         }
diff --git a/core/java/android/app/servertransaction/LaunchActivityItem.java b/core/java/android/app/servertransaction/LaunchActivityItem.java
index 7be82bf..6bae359 100644
--- a/core/java/android/app/servertransaction/LaunchActivityItem.java
+++ b/core/java/android/app/servertransaction/LaunchActivityItem.java
@@ -75,7 +75,7 @@
                 mOverrideConfig, mCompatInfo, mReferrer, mVoiceInteractor, mState, mPersistentState,
                 mPendingResults, mPendingNewIntents, mIsForward,
                 mProfilerInfo, client);
-        client.handleLaunchActivity(r, pendingActions);
+        client.handleLaunchActivity(r, pendingActions, null /* customIntent */);
         Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
     }
 
diff --git a/core/java/android/app/servertransaction/TransactionExecutor.java b/core/java/android/app/servertransaction/TransactionExecutor.java
index 5c803a5..43a2b4c 100644
--- a/core/java/android/app/servertransaction/TransactionExecutor.java
+++ b/core/java/android/app/servertransaction/TransactionExecutor.java
@@ -173,7 +173,8 @@
             log("Transitioning to state: " + state);
             switch (state) {
                 case ON_CREATE:
-                    mTransactionHandler.handleLaunchActivity(r, mPendingActions);
+                    mTransactionHandler.handleLaunchActivity(r, mPendingActions,
+                            null /* customIntent */);
                     break;
                 case ON_START:
                     mTransactionHandler.handleStartActivity(r, mPendingActions);
diff --git a/core/java/android/app/slice/SliceMetrics.java b/core/java/android/app/slice/SliceMetrics.java
index 20c1390..746beaf 100644
--- a/core/java/android/app/slice/SliceMetrics.java
+++ b/core/java/android/app/slice/SliceMetrics.java
@@ -18,9 +18,11 @@
 
 import android.annotation.NonNull;
 import android.content.Context;
+import android.metrics.LogMaker;
 import android.net.Uri;
 
 import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 
 /**
  * Metrics interface for slices.
@@ -34,24 +36,38 @@
 
     private static final String TAG = "SliceMetrics";
     private MetricsLogger mMetricsLogger;
+    private LogMaker mLogMaker;
 
     /**
      * An object to be used throughout the life of a slice to register events.
      */
     public SliceMetrics(@NonNull Context context, @NonNull Uri uri) {
         mMetricsLogger = new MetricsLogger();
+        mLogMaker = new LogMaker(MetricsEvent.VIEW_UNKNOWN);
+        mLogMaker.addTaggedData(MetricsEvent.FIELD_SLICE_AUTHORITY, uri.getAuthority());
+        mLogMaker.addTaggedData(MetricsEvent.FIELD_SLICE_PATH, uri.getPath());
     }
 
     /**
      * To be called whenever the slice becomes visible to the user.
      */
     public void logVisible() {
+        synchronized (mLogMaker)  {
+            mLogMaker.setCategory(MetricsEvent.SLICE)
+                    .setType(MetricsEvent.TYPE_OPEN);
+            mMetricsLogger.write(mLogMaker);
+        }
     }
 
     /**
      * To be called whenever the slice becomes invisible to the user.
      */
     public void logHidden() {
+        synchronized (mLogMaker)  {
+            mLogMaker.setCategory(MetricsEvent.SLICE)
+                    .setType(MetricsEvent.TYPE_CLOSE);
+            mMetricsLogger.write(mLogMaker);
+        }
     }
 
     /**
@@ -68,5 +84,12 @@
      * @param subSlice The URI of the sub-slice that is the subject of the interaction.
      */
     public void logTouch(int actionType, @NonNull Uri subSlice) {
+        synchronized (mLogMaker)  {
+            mLogMaker.setCategory(MetricsEvent.SLICE)
+                    .setType(MetricsEvent.TYPE_ACTION)
+                    .addTaggedData(MetricsEvent.FIELD_SUBSLICE_AUTHORITY, subSlice.getAuthority())
+                    .addTaggedData(MetricsEvent.FIELD_SUBSLICE_PATH, subSlice.getPath());
+            mMetricsLogger.write(mLogMaker);
+        }
     }
 }
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index ac21395..7a6b72e 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -848,7 +848,11 @@
             return null;
         }
         try {
-            return service.getRemoteName(this);
+            String name = service.getRemoteName(this);
+            if (name != null) {
+                return name.replaceAll("[\\t\\n\\r]+", " ");
+            }
+            return null;
         } catch (RemoteException e) {
             Log.e(TAG, "", e);
         }
diff --git a/core/java/android/bluetooth/BluetoothGatt.java b/core/java/android/bluetooth/BluetoothGatt.java
index 71edc8a..457119d 100644
--- a/core/java/android/bluetooth/BluetoothGatt.java
+++ b/core/java/android/bluetooth/BluetoothGatt.java
@@ -98,22 +98,22 @@
     public static final int GATT_FAILURE = 0x101;
 
     /**
-     * Connection paramter update - Use the connection paramters recommended by the
+     * Connection parameter update - Use the connection parameters recommended by the
      * Bluetooth SIG. This is the default value if no connection parameter update
      * is requested.
      */
     public static final int CONNECTION_PRIORITY_BALANCED = 0;
 
     /**
-     * Connection paramter update - Request a high priority, low latency connection.
-     * An application should only request high priority connection paramters to transfer
-     * large amounts of data over LE quickly. Once the transfer is complete, the application
-     * should request {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED} connectoin parameters
-     * to reduce energy use.
+     * Connection parameter update - Request a high priority, low latency connection.
+     * An application should only request high priority connection parameters to transfer large
+     * amounts of data over LE quickly. Once the transfer is complete, the application should
+     * request {@link BluetoothGatt#CONNECTION_PRIORITY_BALANCED} connection parameters to reduce
+     * energy use.
      */
     public static final int CONNECTION_PRIORITY_HIGH = 1;
 
-    /** Connection paramter update - Request low power, reduced data rate connection parameters. */
+    /** Connection parameter update - Request low power, reduced data rate connection parameters. */
     public static final int CONNECTION_PRIORITY_LOW_POWER = 2;
 
     /**
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index a68f485..0c91a20 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -16,6 +16,7 @@
 
 package android.bluetooth;
 
+import android.Manifest;
 import android.annotation.Nullable;
 import android.annotation.RequiresPermission;
 import android.annotation.SdkConstant;
@@ -633,8 +634,9 @@
      * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
      *
      * @param device Bluetooth headset
-     * @return false if there is no headset connected of if the connected headset doesn't support
-     * voice recognition or on error, true otherwise
+     * @return false if there is no headset connected, or the connected headset doesn't support
+     * voice recognition, or voice recognition is already started, or audio channel is occupied,
+     * or on error, true otherwise
      */
     public boolean startVoiceRecognition(BluetoothDevice device) {
         if (DBG) log("startVoiceRecognition()");
@@ -654,10 +656,15 @@
      * Stop Bluetooth Voice Recognition mode, and shut down the
      * Bluetooth audio path.
      *
+     * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+     * If this function returns true, this intent will be broadcasted with
+     * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+     *
      * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
      *
      * @param device Bluetooth headset
-     * @return false if there is no headset connected or on error, true otherwise
+     * @return false if there is no headset connected, or voice recognition has not started,
+     * or voice recognition has ended on this headset, or on error, true otherwise
      */
     public boolean stopVoiceRecognition(BluetoothDevice device) {
         if (DBG) log("stopVoiceRecognition()");
@@ -798,11 +805,12 @@
     }
 
     /**
-     * Check if Bluetooth SCO audio is connected.
+     * Check if at least one headset's SCO audio is connected or connecting
      *
      * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
      *
-     * @return true if SCO is connected, false otherwise or on error
+     * @return true if at least one device's SCO audio is connected or connecting, false otherwise
+     * or on error
      * @hide
      */
     public boolean isAudioOn() {
@@ -821,11 +829,21 @@
     }
 
     /**
-     * Initiates a connection of headset audio.
-     * It setup SCO channel with remote connected headset device.
+     * Initiates a connection of headset audio to the current active device
      *
-     * @return true if successful false if there was some error such as there is no connected
-     * headset
+     * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+     * If this function returns true, this intent will be broadcasted with
+     * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_CONNECTING}.
+     *
+     * <p> {@link #EXTRA_STATE} will transition from
+     * {@link #STATE_AUDIO_CONNECTING} to {@link #STATE_AUDIO_CONNECTED} when
+     * audio connection is established and to {@link #STATE_AUDIO_DISCONNECTED}
+     * in case of failure to establish the audio connection.
+     *
+     * Note that this intent will not be sent if {@link BluetoothHeadset#isAudioOn()} is true
+     * before calling this method
+     *
+     * @return false if there was some error such as there is no active headset
      * @hide
      */
     public boolean connectAudio() {
@@ -844,11 +862,14 @@
     }
 
     /**
-     * Initiates a disconnection of headset audio.
-     * It tears down the SCO channel from remote headset device.
+     * Initiates a disconnection of HFP SCO audio.
+     * Tear down voice recognition or virtual voice call if any.
      *
-     * @return true if successful false if there was some error such as there is no connected SCO
-     * channel
+     * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+     * If this function returns true, this intent will be broadcasted with
+     * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+     *
+     * @return false if audio is not connected, or on error, true otherwise
      * @hide
      */
     public boolean disconnectAudio() {
@@ -867,22 +888,33 @@
     }
 
     /**
-     * Initiates a SCO channel connection with the headset (if connected).
-     * Also initiates a virtual voice call for Handsfree devices as many devices
-     * do not accept SCO audio without a call.
-     * This API allows the handsfree device to be used for routing non-cellular
-     * call audio.
+     * Initiates a SCO channel connection as a virtual voice call to the current active device
+     * Active handsfree device will be notified of incoming call and connected call.
      *
-     * @param device Remote Bluetooth Device
-     * @return true if successful, false if there was some error.
+     * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+     * If this function returns true, this intent will be broadcasted with
+     * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_CONNECTING}.
+     *
+     * <p> {@link #EXTRA_STATE} will transition from
+     * {@link #STATE_AUDIO_CONNECTING} to {@link #STATE_AUDIO_CONNECTED} when
+     * audio connection is established and to {@link #STATE_AUDIO_DISCONNECTED}
+     * in case of failure to establish the audio connection.
+     *
+     * @return true if successful, false if one of the following case applies
+     *  - SCO audio is not idle (connecting or connected)
+     *  - virtual call has already started
+     *  - there is no active device
+     *  - a Telecom managed call is going on
+     *  - binder is dead or Bluetooth is disabled or other error
      * @hide
      */
-    public boolean startScoUsingVirtualVoiceCall(BluetoothDevice device) {
+    @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+    public boolean startScoUsingVirtualVoiceCall() {
         if (DBG) log("startScoUsingVirtualVoiceCall()");
         final IBluetoothHeadset service = mService;
-        if (service != null && isEnabled() && isValidDevice(device)) {
+        if (service != null && isEnabled()) {
             try {
-                return service.startScoUsingVirtualVoiceCall(device);
+                return service.startScoUsingVirtualVoiceCall();
             } catch (RemoteException e) {
                 Log.e(TAG, e.toString());
             }
@@ -894,19 +926,24 @@
     }
 
     /**
-     * Terminates an ongoing SCO connection and the associated virtual
-     * call.
+     * Terminates an ongoing SCO connection and the associated virtual call.
      *
-     * @param device Remote Bluetooth Device
-     * @return true if successful, false if there was some error.
+     * <p> Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}.
+     * If this function returns true, this intent will be broadcasted with
+     * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_DISCONNECTED}.
+     *
+     * @return true if successful, false if one of the following case applies
+     *  - virtual voice call is not started or has ended
+     *  - binder is dead or Bluetooth is disabled or other error
      * @hide
      */
-    public boolean stopScoUsingVirtualVoiceCall(BluetoothDevice device) {
+    @RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
+    public boolean stopScoUsingVirtualVoiceCall() {
         if (DBG) log("stopScoUsingVirtualVoiceCall()");
         final IBluetoothHeadset service = mService;
-        if (service != null && isEnabled() && isValidDevice(device)) {
+        if (service != null && isEnabled()) {
             try {
-                return service.stopScoUsingVirtualVoiceCall(device);
+                return service.stopScoUsingVirtualVoiceCall();
             } catch (RemoteException e) {
                 Log.e(TAG, e.toString());
             }
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ede7ee4..90a94ee 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -1976,6 +1976,33 @@
 
     /**
      * Broadcast the given intent to all interested BroadcastReceivers, allowing
+     * an array of required permissions to be enforced.  This call is asynchronous; it returns
+     * immediately, and you will continue executing while the receivers are run.  No results are
+     * propagated from receivers and receivers can not abort the broadcast. If you want to allow
+     * receivers to propagate results or abort the broadcast, you must send an ordered broadcast
+     * using {@link #sendOrderedBroadcast(Intent, String)}.
+     *
+     * <p>See {@link BroadcastReceiver} for more information on Intent broadcasts.
+     *
+     * @param intent The Intent to broadcast; all receivers matching this
+     *               Intent will receive the broadcast.
+     * @param user The user to send the broadcast to.
+     * @param receiverPermissions Array of names of permissions that a receiver must hold
+     *                            in order to receive your broadcast.
+     *                            If null or empty, no permissions are required.
+     *
+     * @see android.content.BroadcastReceiver
+     * @see #registerReceiver
+     * @see #sendBroadcast(Intent)
+     * @see #sendOrderedBroadcast(Intent, String)
+     * @see #sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)
+     * @hide
+     */
+    public abstract void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions);
+
+    /**
+     * Broadcast the given intent to all interested BroadcastReceivers, allowing
      * an optional required permission to be enforced.  This
      * call is asynchronous; it returns immediately, and you will continue
      * executing while the receivers are run.  No results are propagated from
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index 1867a6d..bae99b8 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -456,6 +456,13 @@
     }
 
     /** @hide */
+    @Override
+    public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions) {
+        mBase.sendBroadcastAsUserMultiplePermissions(intent, user, receiverPermissions);
+    }
+
+    /** @hide */
     @SystemApi
     @Override
     public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
diff --git a/core/java/android/content/pm/ComponentInfo.java b/core/java/android/content/pm/ComponentInfo.java
index 6b1222f..0269b6c 100644
--- a/core/java/android/content/pm/ComponentInfo.java
+++ b/core/java/android/content/pm/ComponentInfo.java
@@ -96,7 +96,8 @@
         encryptionAware = directBootAware = orig.directBootAware;
     }
 
-    @Override public CharSequence loadLabel(PackageManager pm) {
+    /** @hide */
+    @Override public CharSequence loadUnsafeLabel(PackageManager pm) {
         if (nonLocalizedLabel != null) {
             return nonLocalizedLabel;
         }
diff --git a/core/java/android/content/pm/CrossProfileApps.java b/core/java/android/content/pm/CrossProfileApps.java
index 7d5d609..87f4dab 100644
--- a/core/java/android/content/pm/CrossProfileApps.java
+++ b/core/java/android/content/pm/CrossProfileApps.java
@@ -64,7 +64,11 @@
     public void startMainActivity(@NonNull ComponentName component,
             @NonNull UserHandle targetUser) {
         try {
-            mService.startActivityAsUser(mContext.getPackageName(), component, targetUser);
+            mService.startActivityAsUser(
+                    mContext.getIApplicationThread(),
+                    mContext.getPackageName(),
+                    component,
+                    targetUser);
         } catch (RemoteException ex) {
             throw ex.rethrowFromSystemServer();
         }
diff --git a/core/java/android/content/pm/ICrossProfileApps.aidl b/core/java/android/content/pm/ICrossProfileApps.aidl
index e79deb9..bc2f92a 100644
--- a/core/java/android/content/pm/ICrossProfileApps.aidl
+++ b/core/java/android/content/pm/ICrossProfileApps.aidl
@@ -16,6 +16,7 @@
 
 package android.content.pm;
 
+import android.app.IApplicationThread;
 import android.content.ComponentName;
 import android.content.Intent;
 import android.graphics.Rect;
@@ -26,7 +27,7 @@
  * @hide
  */
 interface ICrossProfileApps {
-    void startActivityAsUser(in String callingPackage, in ComponentName component,
-        in UserHandle user);
+    void startActivityAsUser(in IApplicationThread caller, in String callingPackage,
+            in ComponentName component, in UserHandle user);
     List<UserHandle> getTargetUserProfiles(in String callingPackage);
 }
\ No newline at end of file
diff --git a/core/java/android/content/pm/ILauncherApps.aidl b/core/java/android/content/pm/ILauncherApps.aidl
index ae1c207..ba7710b 100644
--- a/core/java/android/content/pm/ILauncherApps.aidl
+++ b/core/java/android/content/pm/ILauncherApps.aidl
@@ -16,6 +16,7 @@
 
 package android.content.pm;
 
+import android.app.IApplicationThread;
 import android.content.ComponentName;
 import android.content.Intent;
 import android.content.IntentSender;
@@ -42,10 +43,10 @@
             String callingPackage, String packageName, in UserHandle user);
     ActivityInfo resolveActivity(
             String callingPackage, in ComponentName component, in UserHandle user);
-    void startActivityAsUser(String callingPackage,
+    void startActivityAsUser(in IApplicationThread caller, String callingPackage,
             in ComponentName component, in Rect sourceBounds,
             in Bundle opts, in UserHandle user);
-    void showAppDetailsAsUser(
+    void showAppDetailsAsUser(in IApplicationThread caller,
             String callingPackage, in ComponentName component, in Rect sourceBounds,
             in Bundle opts, in UserHandle user);
     boolean isPackageEnabled(String callingPackage, String packageName, in UserHandle user);
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 2be33e9..c988fa9 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -644,8 +644,6 @@
 
     boolean isPackageDeviceAdminOnAnyUser(String packageName);
 
-    List<String> getPreviousCodePaths(in String packageName);
-
     int getInstallReason(String packageName, int userId);
 
     ParceledListSlice getSharedLibraries(in String packageName, int flags, int userId);
diff --git a/core/java/android/content/pm/LauncherApps.java b/core/java/android/content/pm/LauncherApps.java
index 8717601..fa423e2 100644
--- a/core/java/android/content/pm/LauncherApps.java
+++ b/core/java/android/content/pm/LauncherApps.java
@@ -548,7 +548,8 @@
             Log.i(TAG, "StartMainActivity " + component + " " + user.getIdentifier());
         }
         try {
-            mService.startActivityAsUser(mContext.getPackageName(),
+            mService.startActivityAsUser(mContext.getIApplicationThread(),
+                    mContext.getPackageName(),
                     component, sourceBounds, opts, user);
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
@@ -568,7 +569,8 @@
             Rect sourceBounds, Bundle opts) {
         logErrorForInvalidProfileAccess(user);
         try {
-            mService.showAppDetailsAsUser(mContext.getPackageName(),
+            mService.showAppDetailsAsUser(mContext.getIApplicationThread(),
+                    mContext.getPackageName(),
                     component, sourceBounds, opts, user);
         } catch (RemoteException re) {
             throw re.rethrowFromSystemServer();
diff --git a/core/java/android/content/pm/PackageItemInfo.java b/core/java/android/content/pm/PackageItemInfo.java
index 53ffd55..07fbfb5 100644
--- a/core/java/android/content/pm/PackageItemInfo.java
+++ b/core/java/android/content/pm/PackageItemInfo.java
@@ -43,6 +43,8 @@
  */
 public class PackageItemInfo {
     private static final float MAX_LABEL_SIZE_PX = 500f;
+    /** The maximum length of a safe label, in characters */
+    private static final int MAX_SAFE_LABEL_LENGTH = 50000;
 
     private static volatile boolean sForceSafeLabels = false;
 
@@ -187,7 +189,8 @@
         // If the label contains new line characters it may push the UI
         // down to hide a part of it. Labels shouldn't have new line
         // characters, so just truncate at the first time one is seen.
-        final int labelLength = labelStr.length();
+        final int labelLength = Math.min(labelStr.length(), MAX_SAFE_LABEL_LENGTH);
+        final StringBuffer sb = new StringBuffer(labelLength);
         int offset = 0;
         while (offset < labelLength) {
             final int codePoint = labelStr.codePointAt(offset);
@@ -199,14 +202,19 @@
                 break;
             }
             // replace all non-break space to " " in order to be trimmed
+            final int charCount = Character.charCount(codePoint);
             if (type == Character.SPACE_SEPARATOR) {
-                labelStr = labelStr.substring(0, offset) + " " + labelStr.substring(offset +
-                        Character.charCount(codePoint));
+                sb.append(' ');
+            } else {
+                sb.append(labelStr.charAt(offset));
+                if (charCount == 2) {
+                    sb.append(labelStr.charAt(offset + 1));
+                }
             }
-            offset += Character.charCount(codePoint);
+            offset += charCount;
         }
 
-        labelStr = labelStr.trim();
+        labelStr = sb.toString().trim();
         if (labelStr.isEmpty()) {
             return packageName;
         }
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index 19b5c45..193e56e 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -1905,6 +1905,10 @@
      * Return whether the screen has a wide color gamut and wide color gamut rendering
      * is supported by this device.
      *
+     * When true, it implies the screen is colorspace aware but not
+     * necessarily color-managed. The final colors may still be changed by the
+     * screen depending on user settings.
+     *
      * @return true if the screen has a wide color gamut and wide color gamut rendering
      * is supported, false otherwise
      */
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index c58cde0..7adea6a8 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -128,6 +128,14 @@
     private final ArrayList<WeakReference<Theme>> mThemeRefs = new ArrayList<>();
 
     /**
+     * To avoid leaking WeakReferences to garbage collected Themes on the
+     * mThemeRefs list, we flush the list of stale references any time the
+     * mThemeRefNextFlushSize is reached.
+     */
+    private static final int MIN_THEME_REFS_FLUSH_SIZE = 32;
+    private int mThemeRefsNextFlushSize = MIN_THEME_REFS_FLUSH_SIZE;
+
+    /**
      * Returns the most appropriate default theme for the specified target SDK version.
      * <ul>
      * <li>Below API 11: Gingerbread
@@ -1770,6 +1778,13 @@
         theme.setImpl(mResourcesImpl.newThemeImpl());
         synchronized (mThemeRefs) {
             mThemeRefs.add(new WeakReference<>(theme));
+
+            // Clean up references to garbage collected themes
+            if (mThemeRefs.size() > mThemeRefsNextFlushSize) {
+                mThemeRefs.removeIf(ref -> ref.get() == null);
+                mThemeRefsNextFlushSize = Math.max(MIN_THEME_REFS_FLUSH_SIZE,
+                        2 * mThemeRefs.size());
+            }
         }
         return theme;
     }
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 9a276fb..1b80d3d5 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -18,19 +18,23 @@
 
 import static android.system.OsConstants.*;
 
+import android.annotation.Nullable;
 import android.annotation.SdkConstant;
 import android.annotation.SdkConstant.SdkConstantType;
 import android.app.ActivityThread;
+import android.app.AppOpsManager;
 import android.content.Context;
 import android.graphics.ImageFormat;
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.SurfaceTexture;
+import android.media.AudioAttributes;
 import android.media.IAudioService;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
+import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
 import android.renderscript.Allocation;
@@ -43,6 +47,10 @@
 import android.view.Surface;
 import android.view.SurfaceHolder;
 
+import com.android.internal.annotations.GuardedBy;
+import com.android.internal.app.IAppOpsCallback;
+import com.android.internal.app.IAppOpsService;
+
 import java.io.IOException;
 import java.lang.ref.WeakReference;
 import java.util.ArrayList;
@@ -174,6 +182,15 @@
     private boolean mFaceDetectionRunning = false;
     private final Object mAutoFocusCallbackLock = new Object();
 
+    private final Object mShutterSoundLock = new Object();
+    // for AppOps
+    private @Nullable IAppOpsService mAppOps;
+    private IAppOpsCallback mAppOpsCallback;
+    @GuardedBy("mShutterSoundLock")
+    private boolean mHasAppOpsPlayAudio = true;
+    @GuardedBy("mShutterSoundLock")
+    private boolean mShutterSoundEnabledFromApp = true;
+
     private static final int NO_ERROR = 0;
 
     /**
@@ -526,6 +543,7 @@
             // Should never hit this.
             throw new RuntimeException("Unknown camera error");
         }
+        initAppOps();
     }
 
 
@@ -547,6 +565,33 @@
      * An empty Camera for testing purpose.
      */
     Camera() {
+        initAppOps();
+    }
+
+    private void initAppOps() {
+        IBinder b = ServiceManager.getService(Context.APP_OPS_SERVICE);
+        mAppOps = IAppOpsService.Stub.asInterface(b);
+        // initialize mHasAppOpsPlayAudio
+        updateAppOpsPlayAudio();
+        // register a callback to monitor whether the OP_PLAY_AUDIO is still allowed
+        mAppOpsCallback = new IAppOpsCallbackWrapper(this);
+        try {
+            mAppOps.startWatchingMode(AppOpsManager.OP_PLAY_AUDIO,
+                    ActivityThread.currentPackageName(), mAppOpsCallback);
+        } catch (RemoteException e) {
+            Log.e(TAG, "Error registering appOps callback", e);
+            mHasAppOpsPlayAudio = false;
+        }
+    }
+
+    private void releaseAppOps() {
+        try {
+            if (mAppOps != null) {
+                mAppOps.stopWatchingMode(mAppOpsCallback);
+            }
+        } catch (Exception e) {
+            // nothing to do here, the object is supposed to be released anyway
+        }
     }
 
     @Override
@@ -568,6 +613,7 @@
     public final void release() {
         native_release();
         mFaceDetectionRunning = false;
+        releaseAppOps();
     }
 
     /**
@@ -1623,7 +1669,17 @@
                 Log.e(TAG, "Audio service is unavailable for queries");
             }
         }
-        return _enableShutterSound(enabled);
+        synchronized (mShutterSoundLock) {
+            if (enabled && mHasAppOpsPlayAudio) {
+                Log.i(TAG, "Shutter sound is not allowed by AppOpsManager");
+                return false;
+            }
+            boolean ret = _enableShutterSound(enabled);
+            if (ret) {
+                mShutterSoundEnabledFromApp = enabled;
+            }
+            return ret;
+        }
     }
 
     /**
@@ -1648,6 +1704,49 @@
 
     private native final boolean _enableShutterSound(boolean enabled);
 
+    private static class IAppOpsCallbackWrapper extends IAppOpsCallback.Stub {
+        private final WeakReference<Camera> mWeakCamera;
+
+        IAppOpsCallbackWrapper(Camera camera) {
+            mWeakCamera = new WeakReference<Camera>(camera);
+        }
+
+        @Override
+        public void opChanged(int op, int uid, String packageName) {
+            if (op == AppOpsManager.OP_PLAY_AUDIO) {
+                final Camera camera = mWeakCamera.get();
+                if (camera != null) {
+                    camera.updateAppOpsPlayAudio();
+                }
+            }
+        }
+    }
+
+    private void updateAppOpsPlayAudio() {
+        synchronized (mShutterSoundLock) {
+            boolean oldHasAppOpsPlayAudio = mHasAppOpsPlayAudio;
+            try {
+                int mode = AppOpsManager.MODE_IGNORED;
+                if (mAppOps != null) {
+                    mode = mAppOps.checkAudioOperation(AppOpsManager.OP_PLAY_AUDIO,
+                            AudioAttributes.USAGE_ASSISTANCE_SONIFICATION,
+                            Process.myUid(), ActivityThread.currentPackageName());
+                }
+                mHasAppOpsPlayAudio = mode == AppOpsManager.MODE_ALLOWED;
+            } catch (RemoteException e) {
+                Log.e(TAG, "AppOpsService check audio operation failed");
+                mHasAppOpsPlayAudio = false;
+            }
+            if (oldHasAppOpsPlayAudio != mHasAppOpsPlayAudio) {
+                if (!mHasAppOpsPlayAudio) {
+                    _enableShutterSound(false);
+                } else {
+                    _enableShutterSound(mShutterSoundEnabledFromApp);
+                }
+            }
+        }
+    }
+
     /**
      * Callback interface for zoom changes during a smooth zoom operation.
      *
diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java
index 03221d4..ebbfe1c 100644
--- a/core/java/android/hardware/fingerprint/FingerprintManager.java
+++ b/core/java/android/hardware/fingerprint/FingerprintManager.java
@@ -45,7 +45,6 @@
 import android.os.PowerManager;
 import android.os.RemoteException;
 import android.os.UserHandle;
-import android.util.Log;
 import android.util.Slog;
 
 import java.security.Signature;
@@ -417,7 +416,7 @@
 
         if (cancel != null) {
             if (cancel.isCanceled()) {
-                Log.w(TAG, "authentication already canceled");
+                Slog.w(TAG, "authentication already canceled");
                 return;
             } else {
                 cancel.setOnCancelListener(new OnAuthenticationCancelListener(crypto));
@@ -432,7 +431,7 @@
             mService.authenticate(mToken, sessionId, userId, mServiceReceiver, flags,
                     mContext.getOpPackageName(), null /* bundle */, null /* receiver */);
         } catch (RemoteException e) {
-            Log.w(TAG, "Remote exception while authenticating: ", e);
+            Slog.w(TAG, "Remote exception while authenticating: ", e);
             if (callback != null) {
                 // Though this may not be a hardware issue, it will cause apps to give up or try
                 // again later.
@@ -456,7 +455,7 @@
             @NonNull BiometricAuthenticator.AuthenticationCallback callback) {
         mCryptoObject = crypto;
         if (cancel.isCanceled()) {
-            Log.w(TAG, "authentication already canceled");
+            Slog.w(TAG, "authentication already canceled");
             return;
         } else {
             cancel.setOnCancelListener(new OnAuthenticationCancelListener(crypto));
@@ -470,7 +469,7 @@
                 mService.authenticate(mToken, sessionId, userId, mServiceReceiver,
                         0 /* flags */, mContext.getOpPackageName(), bundle, receiver);
             } catch (RemoteException e) {
-                Log.w(TAG, "Remote exception while authenticating", e);
+                Slog.w(TAG, "Remote exception while authenticating", e);
                 mExecutor.execute(() -> {
                     callback.onAuthenticationError(FINGERPRINT_ERROR_HW_UNAVAILABLE,
                             getErrorString(FINGERPRINT_ERROR_HW_UNAVAILABLE, 0 /* vendorCode */));
@@ -576,7 +575,7 @@
 
         if (cancel != null) {
             if (cancel.isCanceled()) {
-                Log.w(TAG, "enrollment already canceled");
+                Slog.w(TAG, "enrollment already canceled");
                 return;
             } else {
                 cancel.setOnCancelListener(new OnEnrollCancelListener());
@@ -588,7 +587,7 @@
             mService.enroll(mToken, token, userId, mServiceReceiver, flags,
                     mContext.getOpPackageName());
         } catch (RemoteException e) {
-            Log.w(TAG, "Remote exception in enroll: ", e);
+            Slog.w(TAG, "Remote exception in enroll: ", e);
             if (callback != null) {
                 // Though this may not be a hardware issue, it will cause apps to give up or try
                 // again later.
@@ -660,7 +659,7 @@
             mRemovalFingerprint = fp;
             mService.remove(mToken, fp.getFingerId(), fp.getGroupId(), userId, mServiceReceiver);
         } catch (RemoteException e) {
-            Log.w(TAG, "Remote exception in remove: ", e);
+            Slog.w(TAG, "Remote exception in remove: ", e);
             if (callback != null) {
                 callback.onRemovalError(fp, FINGERPRINT_ERROR_HW_UNAVAILABLE,
                         getErrorString(FINGERPRINT_ERROR_HW_UNAVAILABLE, 0 /* vendorCode */));
@@ -682,7 +681,7 @@
             mEnumerateCallback = callback;
             mService.enumerate(mToken, userId, mServiceReceiver);
         } catch (RemoteException e) {
-            Log.w(TAG, "Remote exception in enumerate: ", e);
+            Slog.w(TAG, "Remote exception in enumerate: ", e);
             if (callback != null) {
                 callback.onEnumerateError(FINGERPRINT_ERROR_HW_UNAVAILABLE,
                         getErrorString(FINGERPRINT_ERROR_HW_UNAVAILABLE, 0 /* vendorCode */));
@@ -708,7 +707,7 @@
                 throw e.rethrowFromSystemServer();
             }
         } else {
-            Log.w(TAG, "rename(): Service not connected!");
+            Slog.w(TAG, "rename(): Service not connected!");
         }
     }
 
@@ -791,7 +790,7 @@
                 throw e.rethrowFromSystemServer();
             }
         } else {
-            Log.w(TAG, "isFingerprintHardwareDetected(): Service not connected!");
+            Slog.w(TAG, "isFingerprintHardwareDetected(): Service not connected!");
         }
         return false;
     }
@@ -810,7 +809,7 @@
                 throw e.rethrowFromSystemServer();
             }
         } else {
-            Log.w(TAG, "getAuthenticatorId(): Service not connected!");
+            Slog.w(TAG, "getAuthenticatorId(): Service not connected!");
         }
         return 0;
     }
@@ -830,7 +829,7 @@
                 throw e.rethrowFromSystemServer();
             }
         } else {
-            Log.w(TAG, "resetTimeout(): Service not connected!");
+            Slog.w(TAG, "resetTimeout(): Service not connected!");
         }
     }
 
@@ -867,7 +866,7 @@
                 throw e.rethrowFromSystemServer();
             }
         } else {
-            Log.w(TAG, "addLockoutResetCallback(): Service not connected!");
+            Slog.w(TAG, "addLockoutResetCallback(): Service not connected!");
         }
     }
 
@@ -915,20 +914,20 @@
                 return;
             }
             if (fingerprint == null) {
-                Log.e(TAG, "Received MSG_REMOVED, but fingerprint is null");
+                Slog.e(TAG, "Received MSG_REMOVED, but fingerprint is null");
                 return;
             }
 
             int fingerId = fingerprint.getFingerId();
             int reqFingerId = mRemovalFingerprint.getFingerId();
             if (reqFingerId != 0 && fingerId != 0 && fingerId != reqFingerId) {
-                Log.w(TAG, "Finger id didn't match: " + fingerId + " != " + reqFingerId);
+                Slog.w(TAG, "Finger id didn't match: " + fingerId + " != " + reqFingerId);
                 return;
             }
             int groupId = fingerprint.getGroupId();
             int reqGroupId = mRemovalFingerprint.getGroupId();
             if (groupId != reqGroupId) {
-                Log.w(TAG, "Group id didn't match: " + groupId + " != " + reqGroupId);
+                Slog.w(TAG, "Group id didn't match: " + groupId + " != " + reqGroupId);
                 return;
             }
 
diff --git a/core/java/android/hardware/radio/RadioMetadata.java b/core/java/android/hardware/radio/RadioMetadata.java
index 6e51060..baa7a50 100644
--- a/core/java/android/hardware/radio/RadioMetadata.java
+++ b/core/java/android/hardware/radio/RadioMetadata.java
@@ -269,6 +269,29 @@
         mBundle = in.readBundle();
     }
 
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("RadioMetadata[");
+
+        final String removePrefix = "android.hardware.radio.metadata";
+
+        boolean first = true;
+        for (String key : mBundle.keySet()) {
+            if (first) first = false;
+            else sb.append(", ");
+
+            String keyDisp = key;
+            if (key.startsWith(removePrefix)) keyDisp = key.substring(removePrefix.length());
+
+            sb.append(keyDisp);
+            sb.append('=');
+            sb.append(mBundle.get(key));
+        }
+
+        sb.append("]");
+        return sb.toString();
+    }
+
     /**
      * Returns {@code true} if the given key is contained in the meta data
      *
diff --git a/core/java/android/os/IStatsManager.aidl b/core/java/android/os/IStatsManager.aidl
index 36c5deb..124f207 100644
--- a/core/java/android/os/IStatsManager.aidl
+++ b/core/java/android/os/IStatsManager.aidl
@@ -56,7 +56,7 @@
     /**
      * Tells statsd that the device is about to shutdown.
      */
-    void informDeviceShutdown(boolean isShutdown);
+    void informDeviceShutdown();
 
     /**
      * Inform statsd what the version and package are for each uid. Note that each array should
@@ -152,4 +152,10 @@
      * Requires Manifest.permission.DUMP.
      */
     void unsetBroadcastSubscriber(long configKey, long subscriberId, in String packageName);
+
+    /**
+     * Apps can send an atom via this application breadcrumb with the specified label and state for
+     * this label. This allows building custom metrics and predicates.
+     */
+    void sendAppBreadcrumbAtom(int label, int state);
 }
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 9b20ed2..11afd21 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -157,8 +157,9 @@
     public static final String DISALLOW_CONFIG_LOCALE = "no_config_locale";
 
     /**
-     * Specifies if a user is disallowed from installing applications.
-     * The default value is <code>false</code>.
+     * Specifies if a user is disallowed from installing applications. This user restriction also
+     * prevents device owners and profile owners installing apps. The default value is
+     * {@code false}.
      *
      * <p>Key for user restrictions.
      * <p>Type: Boolean
diff --git a/core/java/android/os/storage/VolumeInfo.java b/core/java/android/os/storage/VolumeInfo.java
index 9e3e386..5c99f6c 100644
--- a/core/java/android/os/storage/VolumeInfo.java
+++ b/core/java/android/os/storage/VolumeInfo.java
@@ -312,7 +312,7 @@
      * {@link android.Manifest.permission#WRITE_MEDIA_STORAGE}.
      */
     public File getInternalPathForUser(int userId) {
-        if (type == TYPE_PUBLIC && !isVisible()) {
+        if (type == TYPE_PUBLIC) {
             // TODO: plumb through cleaner path from vold
             return new File(path.replace("/storage/", "/mnt/media_rw/"));
         } else {
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index fdae191..803abf3 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1785,6 +1785,12 @@
     public static final int USER_SETUP_PERSONALIZATION_STARTED = 1;
 
     /**
+     * User has snoozed personalization and will complete it later.
+     * @hide
+     */
+    public static final int USER_SETUP_PERSONALIZATION_PAUSED = 2;
+
+    /**
      * User has completed setup personalization.
      * @hide
      */
@@ -1795,6 +1801,7 @@
     @IntDef({
             USER_SETUP_PERSONALIZATION_NOT_STARTED,
             USER_SETUP_PERSONALIZATION_STARTED,
+            USER_SETUP_PERSONALIZATION_PAUSED,
             USER_SETUP_PERSONALIZATION_COMPLETE
     })
     public @interface UserSetupPersonalization {}
@@ -9537,6 +9544,15 @@
                 "wifi_scan_always_enabled";
 
         /**
+         * The interval in milliseconds at which wifi rtt ranging requests will be throttled when
+         * they are coming from the background.
+         *
+         * @hide
+         */
+        public static final String WIFI_RTT_BACKGROUND_EXEC_GAP_MS =
+                "wifi_rtt_background_exec_gap_ms";
+
+        /**
          * Whether soft AP will shut down after a timeout period when no devices are connected.
          *
          * Type: int (0 for false, 1 for true)
@@ -10604,18 +10620,30 @@
          * App standby (app idle) specific settings.
          * This is encoded as a key=value list, separated by commas. Ex:
          * <p>
-         * "idle_duration=5000,parole_interval=4500"
+         * "idle_duration=5000,parole_interval=4500,screen_thresholds=0/0/60000/120000"
          * <p>
          * All durations are in millis.
+         * Array values are separated by forward slashes
          * The following keys are supported:
          *
          * <pre>
-         * idle_duration2       (long)
-         * wallclock_threshold  (long)
-         * parole_interval      (long)
-         * parole_duration      (long)
+         * parole_interval                  (long)
+         * parole_window                    (long)
+         * parole_duration                  (long)
+         * screen_thresholds                (long[4])
+         * elapsed_thresholds               (long[4])
+         * strong_usage_duration            (long)
+         * notification_seen_duration       (long)
+         * system_update_usage_duration     (long)
+         * prediction_timeout               (long)
+         * sync_adapter_duration            (long)
+         * exempted_sync_duration           (long)
+         * system_interaction_duration      (long)
+         * stable_charging_threshold        (long)
          *
          * idle_duration        (long) // This is deprecated and used to circumvent b/26355386.
+         * idle_duration2       (long) // deprecated
+         * wallclock_threshold  (long) // deprecated
          * </pre>
          *
          * <p>
diff --git a/core/java/android/service/notification/ZenModeConfig.java b/core/java/android/service/notification/ZenModeConfig.java
index 309fa4a..5546e80 100644
--- a/core/java/android/service/notification/ZenModeConfig.java
+++ b/core/java/android/service/notification/ZenModeConfig.java
@@ -16,6 +16,10 @@
 
 package android.service.notification;
 
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS;
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK;
+
 import android.app.ActivityManager;
 import android.app.AlarmManager;
 import android.app.NotificationManager;
@@ -68,6 +72,7 @@
     public static final int SOURCE_STAR = 2;
     public static final int MAX_SOURCE = SOURCE_STAR;
     private static final int DEFAULT_SOURCE = SOURCE_CONTACT;
+    private static final int DEFAULT_CALLS_SOURCE = SOURCE_STAR;
 
     public static final String EVENTS_DEFAULT_RULE_ID = "EVENTS_DEFAULT_RULE";
     public static final String EVERY_NIGHT_DEFAULT_RULE_ID = "EVERY_NIGHT_DEFAULT_RULE";
@@ -88,18 +93,15 @@
     private static final boolean DEFAULT_ALLOW_ALARMS = true;
     private static final boolean DEFAULT_ALLOW_MEDIA = true;
     private static final boolean DEFAULT_ALLOW_SYSTEM = false;
-    private static final boolean DEFAULT_ALLOW_CALLS = false;
+    private static final boolean DEFAULT_ALLOW_CALLS = true;
     private static final boolean DEFAULT_ALLOW_MESSAGES = false;
     private static final boolean DEFAULT_ALLOW_REMINDERS = false;
     private static final boolean DEFAULT_ALLOW_EVENTS = false;
-    private static final boolean DEFAULT_ALLOW_REPEAT_CALLERS = false;
-    private static final boolean DEFAULT_ALLOW_SCREEN_OFF = false;
-    private static final boolean DEFAULT_ALLOW_SCREEN_ON = false;
+    private static final boolean DEFAULT_ALLOW_REPEAT_CALLERS = true;
     private static final boolean DEFAULT_CHANNELS_BYPASSING_DND = false;
-    private static final int DEFAULT_SUPPRESSED_VISUAL_EFFECTS =
-            Policy.getAllSuppressedVisualEffects();
+    private static final int DEFAULT_SUPPRESSED_VISUAL_EFFECTS = 0;
 
-    public static final int XML_VERSION = 7;
+    public static final int XML_VERSION = 8;
     public static final String ZEN_TAG = "zen";
     private static final String ZEN_ATT_VERSION = "version";
     private static final String ZEN_ATT_USER = "user";
@@ -151,12 +153,10 @@
     public boolean allowMessages = DEFAULT_ALLOW_MESSAGES;
     public boolean allowReminders = DEFAULT_ALLOW_REMINDERS;
     public boolean allowEvents = DEFAULT_ALLOW_EVENTS;
-    public int allowCallsFrom = DEFAULT_SOURCE;
+    public int allowCallsFrom = DEFAULT_CALLS_SOURCE;
     public int allowMessagesFrom = DEFAULT_SOURCE;
     public int user = UserHandle.USER_SYSTEM;
     public int suppressedVisualEffects = DEFAULT_SUPPRESSED_VISUAL_EFFECTS;
-    public boolean allowWhenScreenOff = DEFAULT_ALLOW_SCREEN_OFF;
-    public boolean allowWhenScreenOn = DEFAULT_ALLOW_SCREEN_ON;
     public boolean areChannelsBypassingDnd = DEFAULT_CHANNELS_BYPASSING_DND;
     public int version;
 
@@ -185,8 +185,6 @@
                 automaticRules.put(ids[i], rules[i]);
             }
         }
-        allowWhenScreenOff = source.readInt() == 1;
-        allowWhenScreenOn = source.readInt() == 1;
         allowAlarms = source.readInt() == 1;
         allowMedia = source.readInt() == 1;
         allowSystem = source.readInt() == 1;
@@ -219,8 +217,6 @@
         } else {
             dest.writeInt(0);
         }
-        dest.writeInt(allowWhenScreenOff ? 1 : 0);
-        dest.writeInt(allowWhenScreenOn ? 1 : 0);
         dest.writeInt(allowAlarms ? 1 : 0);
         dest.writeInt(allowMedia ? 1 : 0);
         dest.writeInt(allowSystem ? 1 : 0);
@@ -242,8 +238,6 @@
                 .append(",allowMessages=").append(allowMessages)
                 .append(",allowCallsFrom=").append(sourceToString(allowCallsFrom))
                 .append(",allowMessagesFrom=").append(sourceToString(allowMessagesFrom))
-                .append(",allowWhenScreenOff=").append(allowWhenScreenOff)
-                .append(",allowWhenScreenOn=").append(allowWhenScreenOn)
                 .append(",suppressedVisualEffects=").append(suppressedVisualEffects)
                 .append(",areChannelsBypassingDnd=").append(areChannelsBypassingDnd)
                 .append(",automaticRules=").append(automaticRules)
@@ -289,12 +283,6 @@
         if (allowMessagesFrom != to.allowMessagesFrom) {
             d.addLine("allowMessagesFrom", allowMessagesFrom, to.allowMessagesFrom);
         }
-        if (allowWhenScreenOff != to.allowWhenScreenOff) {
-            d.addLine("allowWhenScreenOff", allowWhenScreenOff, to.allowWhenScreenOff);
-        }
-        if (allowWhenScreenOn != to.allowWhenScreenOn) {
-            d.addLine("allowWhenScreenOn", allowWhenScreenOn, to.allowWhenScreenOn);
-        }
         if (suppressedVisualEffects != to.suppressedVisualEffects) {
             d.addLine("suppressedVisualEffects", suppressedVisualEffects,
                     to.suppressedVisualEffects);
@@ -404,8 +392,6 @@
                 && other.allowMessagesFrom == allowMessagesFrom
                 && other.allowReminders == allowReminders
                 && other.allowEvents == allowEvents
-                && other.allowWhenScreenOff == allowWhenScreenOff
-                && other.allowWhenScreenOn == allowWhenScreenOn
                 && other.user == user
                 && Objects.equals(other.automaticRules, automaticRules)
                 && Objects.equals(other.manualRule, manualRule)
@@ -418,7 +404,7 @@
         return Objects.hash(allowAlarms, allowMedia, allowSystem, allowCalls,
                 allowRepeatCallers, allowMessages,
                 allowCallsFrom, allowMessagesFrom, allowReminders, allowEvents,
-                allowWhenScreenOff, allowWhenScreenOn, user, automaticRules, manualRule,
+                user, automaticRules, manualRule,
                 suppressedVisualEffects, areChannelsBypassingDnd);
     }
 
@@ -472,6 +458,7 @@
         final ZenModeConfig rt = new ZenModeConfig();
         rt.version = safeInt(parser, ZEN_ATT_VERSION, XML_VERSION);
         rt.user = safeInt(parser, ZEN_ATT_USER, rt.user);
+        boolean readSuppressedEffects = false;
         while ((type = parser.next()) != XmlPullParser.END_DOCUMENT) {
             tag = parser.getName();
             if (type == XmlPullParser.END_TAG && ZEN_TAG.equals(tag)) {
@@ -499,20 +486,36 @@
                         rt.allowCallsFrom = from;
                         rt.allowMessagesFrom = from;
                     } else {
-                        rt.allowCallsFrom = DEFAULT_SOURCE;
+                        rt.allowCallsFrom = DEFAULT_CALLS_SOURCE;
                         rt.allowMessagesFrom = DEFAULT_SOURCE;
                     }
-                    // continue to read even though we now have suppressedVisualEffects, in case
-                    // we need to revert to users' previous settings
-                    rt.allowWhenScreenOff =
-                            safeBoolean(parser, ALLOW_ATT_SCREEN_OFF, DEFAULT_ALLOW_SCREEN_OFF);
-                    rt.allowWhenScreenOn =
-                            safeBoolean(parser, ALLOW_ATT_SCREEN_ON, DEFAULT_ALLOW_SCREEN_ON);
                     rt.allowAlarms = safeBoolean(parser, ALLOW_ATT_ALARMS, DEFAULT_ALLOW_ALARMS);
                     rt.allowMedia = safeBoolean(parser, ALLOW_ATT_MEDIA,
                             DEFAULT_ALLOW_MEDIA);
                     rt.allowSystem = safeBoolean(parser, ALLOW_ATT_SYSTEM, DEFAULT_ALLOW_SYSTEM);
-                } else if (DISALLOW_TAG.equals(tag)) {
+
+                    // migrate old suppressed visual effects fields, if they still exist in the xml
+                    Boolean allowWhenScreenOff = unsafeBoolean(parser, ALLOW_ATT_SCREEN_OFF);
+                    if (allowWhenScreenOff != null) {
+                        readSuppressedEffects = true;
+                        if (allowWhenScreenOff) {
+                            rt.suppressedVisualEffects |= SUPPRESSED_EFFECT_LIGHTS
+                                    | SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
+                        }
+                    }
+                    Boolean allowWhenScreenOn = unsafeBoolean(parser, ALLOW_ATT_SCREEN_ON);
+                    if (allowWhenScreenOn != null) {
+                        readSuppressedEffects = true;
+                        if (allowWhenScreenOn) {
+                            rt.suppressedVisualEffects |= SUPPRESSED_EFFECT_PEEK;
+                        }
+                    }
+                    if (readSuppressedEffects) {
+                        Slog.d(TAG, "Migrated visual effects to " + rt.suppressedVisualEffects);
+                    }
+                } else if (DISALLOW_TAG.equals(tag) && !readSuppressedEffects) {
+                    // only read from suppressed visual effects field if we haven't just migrated
+                    // the values from allowOn/allowOff, lest we wipe out those settings
                     rt.suppressedVisualEffects = safeInt(parser, DISALLOW_ATT_VISUAL_EFFECTS,
                             DEFAULT_SUPPRESSED_VISUAL_EFFECTS);
                 } else if (MANUAL_TAG.equals(tag)) {
@@ -552,8 +555,6 @@
         out.attribute(null, ALLOW_ATT_EVENTS, Boolean.toString(allowEvents));
         out.attribute(null, ALLOW_ATT_CALLS_FROM, Integer.toString(allowCallsFrom));
         out.attribute(null, ALLOW_ATT_MESSAGES_FROM, Integer.toString(allowMessagesFrom));
-        out.attribute(null, ALLOW_ATT_SCREEN_OFF, Boolean.toString(allowWhenScreenOff));
-        out.attribute(null, ALLOW_ATT_SCREEN_ON, Boolean.toString(allowWhenScreenOn));
         out.attribute(null, ALLOW_ATT_ALARMS, Boolean.toString(allowAlarms));
         out.attribute(null, ALLOW_ATT_MEDIA, Boolean.toString(allowMedia));
         out.attribute(null, ALLOW_ATT_SYSTEM, Boolean.toString(allowSystem));
@@ -673,6 +674,12 @@
         return source >= SOURCE_ANYONE && source <= MAX_SOURCE;
     }
 
+    private static Boolean unsafeBoolean(XmlPullParser parser, String att) {
+        final String val = parser.getAttributeValue(null, att);
+        if (TextUtils.isEmpty(val)) return null;
+        return Boolean.parseBoolean(val);
+    }
+
     private static boolean safeBoolean(XmlPullParser parser, String att, boolean defValue) {
         final String val = parser.getAttributeValue(null, att);
         return safeBoolean(val, defValue);
diff --git a/core/java/android/transition/ChangeBounds.java b/core/java/android/transition/ChangeBounds.java
index 546f93a..56af3ac 100644
--- a/core/java/android/transition/ChangeBounds.java
+++ b/core/java/android/transition/ChangeBounds.java
@@ -311,6 +311,38 @@
                 ++numChanges;
             }
             if (numChanges > 0) {
+                if (view.getParent() instanceof ViewGroup) {
+                    final ViewGroup parent = (ViewGroup) view.getParent();
+                    parent.suppressLayout(true);
+                    TransitionListener transitionListener = new TransitionListenerAdapter() {
+                        boolean mCanceled = false;
+
+                        @Override
+                        public void onTransitionCancel(Transition transition) {
+                            parent.suppressLayout(false);
+                            mCanceled = true;
+                        }
+
+                        @Override
+                        public void onTransitionEnd(Transition transition) {
+                            if (!mCanceled) {
+                                parent.suppressLayout(false);
+                            }
+                            transition.removeListener(this);
+                        }
+
+                        @Override
+                        public void onTransitionPause(Transition transition) {
+                            parent.suppressLayout(false);
+                        }
+
+                        @Override
+                        public void onTransitionResume(Transition transition) {
+                            parent.suppressLayout(true);
+                        }
+                    };
+                    addListener(transitionListener);
+                }
                 Animator anim;
                 if (!mResizeClip) {
                     view.setLeftTopRightBottom(startLeft, startTop, startRight, startBottom);
@@ -398,38 +430,6 @@
                     anim = TransitionUtils.mergeAnimators(positionAnimator,
                             clipAnimator);
                 }
-                if (view.getParent() instanceof ViewGroup) {
-                    final ViewGroup parent = (ViewGroup) view.getParent();
-                    parent.suppressLayout(true);
-                    TransitionListener transitionListener = new TransitionListenerAdapter() {
-                        boolean mCanceled = false;
-
-                        @Override
-                        public void onTransitionCancel(Transition transition) {
-                            parent.suppressLayout(false);
-                            mCanceled = true;
-                        }
-
-                        @Override
-                        public void onTransitionEnd(Transition transition) {
-                            if (!mCanceled) {
-                                parent.suppressLayout(false);
-                            }
-                            transition.removeListener(this);
-                        }
-
-                        @Override
-                        public void onTransitionPause(Transition transition) {
-                            parent.suppressLayout(false);
-                        }
-
-                        @Override
-                        public void onTransitionResume(Transition transition) {
-                            parent.suppressLayout(true);
-                        }
-                    };
-                    addListener(transitionListener);
-                }
                 return anim;
             }
         } else {
diff --git a/core/java/android/util/StatsLog.java b/core/java/android/util/StatsLog.java
index e8b4197..e3de307 100644
--- a/core/java/android/util/StatsLog.java
+++ b/core/java/android/util/StatsLog.java
@@ -16,59 +16,101 @@
 
 package android.util;
 
-import android.os.Process;
+import android.os.IStatsManager;
+import android.os.RemoteException;
+import android.os.ServiceManager;
 
 /**
  * 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 extends StatsLogInternal {
-    private static final String TAG = "StatsManager";
+    private static final String TAG = "StatsLog";
+    private static final boolean DEBUG = false;
+
+    private static IStatsManager sService;
 
     private StatsLog() {}
 
     /**
      * Logs a start event.
      *
-     * @param label developer-chosen label that is from [0, 16).
+     * @param label developer-chosen label.
      * @return True if the log request was sent to statsd.
      */
     public static boolean logStart(int label) {
-        if (label >= 0 && label < 16) {
-            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(),
-                    label, APP_BREADCRUMB_REPORTED__STATE__START);
-            return true;
+        synchronized (StatsLog.class) {
+            try {
+                IStatsManager service = getIStatsManagerLocked();
+                if (service == null) {
+                    if (DEBUG) Slog.d(TAG, "Failed to find statsd when logging start");
+                    return false;
+                }
+                service.sendAppBreadcrumbAtom(label,
+                        StatsLog.APP_BREADCRUMB_REPORTED__STATE__START);
+                return true;
+            } catch (RemoteException e) {
+                sService = null;
+                if (DEBUG) Slog.d(TAG, "Failed to connect to statsd when logging start");
+                return false;
+            }
         }
-        return false;
     }
 
     /**
      * Logs a stop event.
      *
-     * @param label developer-chosen label that is from [0, 16).
+     * @param label developer-chosen label.
      * @return True if the log request was sent to statsd.
      */
     public static boolean logStop(int label) {
-        if (label >= 0 && label < 16) {
-            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(),
-                    label, APP_BREADCRUMB_REPORTED__STATE__STOP);
-            return true;
+        synchronized (StatsLog.class) {
+            try {
+                IStatsManager service = getIStatsManagerLocked();
+                if (service == null) {
+                    if (DEBUG) Slog.d(TAG, "Failed to find statsd when logging stop");
+                    return false;
+                }
+                service.sendAppBreadcrumbAtom(label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__STOP);
+                return true;
+            } catch (RemoteException e) {
+                sService = null;
+                if (DEBUG) Slog.d(TAG, "Failed to connect to statsd when logging stop");
+                return false;
+            }
         }
-        return false;
     }
 
     /**
      * Logs an event that does not represent a start or stop boundary.
      *
-     * @param label developer-chosen label that is from [0, 16).
+     * @param label developer-chosen label.
      * @return True if the log request was sent to statsd.
      */
     public static boolean logEvent(int label) {
-        if (label >= 0 && label < 16) {
-            StatsLog.write(APP_BREADCRUMB_REPORTED, Process.myUid(), label,
-                    APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED);
-            return true;
+        synchronized (StatsLog.class) {
+            try {
+                IStatsManager service = getIStatsManagerLocked();
+                if (service == null) {
+                    if (DEBUG) Slog.d(TAG, "Failed to find statsd when logging event");
+                    return false;
+                }
+                service.sendAppBreadcrumbAtom(
+                        label, StatsLog.APP_BREADCRUMB_REPORTED__STATE__UNSPECIFIED);
+                return true;
+            } catch (RemoteException e) {
+                sService = null;
+                if (DEBUG) Slog.d(TAG, "Failed to connect to statsd when logging event");
+                return false;
+            }
         }
-        return false;
+    }
+
+    private static IStatsManager getIStatsManagerLocked() throws RemoteException {
+        if (sService != null) {
+            return sService;
+        }
+        sService = IStatsManager.Stub.asInterface(ServiceManager.getService("stats"));
+        return sService;
     }
 }
diff --git a/core/java/android/util/apk/ApkVerityBuilder.java b/core/java/android/util/apk/ApkVerityBuilder.java
index f15e1a1..2dd0117 100644
--- a/core/java/android/util/apk/ApkVerityBuilder.java
+++ b/core/java/android/util/apk/ApkVerityBuilder.java
@@ -134,7 +134,7 @@
         assertSigningBlockAlignedAndHasFullPages(signatureInfo);
         long signingBlockSize =
                 signatureInfo.centralDirOffset - signatureInfo.apkSigningBlockOffset;
-        long dataSize = apk.length() - signingBlockSize - ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE;
+        long dataSize = apk.length() - signingBlockSize;
         int[] levelOffset = calculateVerityLevelOffset(dataSize);
 
         if (treeOutput != null) {
@@ -346,8 +346,8 @@
 
         buffer.putLong(fileSize);           // original file size
 
-        buffer.put((byte) 0);               // auth block offset, disabled here
-        buffer.put((byte) 2);               // extension count
+        buffer.put((byte) 2);               // authenticated extension count
+        buffer.put((byte) 0);               // unauthenticated extension count
         buffer.put(salt);                   // salt (8 bytes)
         skip(buffer, 22);                   // reserved
 
@@ -359,12 +359,6 @@
             long signingBlockSize, long eocdOffset) {
         // Snapshot of the FSVerity structs (subject to change once upstreamed).
         //
-        // struct fsverity_extension {
-        //   __le16 length;
-        //   u8 type;
-        //   u8 reserved[5];
-        // };
-        //
         // struct fsverity_extension_elide {
         //   __le64 offset;
         //   __le64 length;
@@ -382,10 +376,10 @@
             // struct fsverity_extension #1
             final int kSizeOfFsverityElidedExtension = 16;
 
-            buffer.putShort((short)  // total size of extension, padded to 64-bit alignment
-                    (kSizeOfFsverityExtensionHeader + kSizeOfFsverityElidedExtension));
-            buffer.put((byte) 0);    // ID of elide extension
-            skip(buffer, 5);         // reserved
+            // First field is total size of extension, padded to 64-bit alignment
+            buffer.putInt(kSizeOfFsverityExtensionHeader + kSizeOfFsverityElidedExtension);
+            buffer.putShort((short) 1);  // ID of elide extension
+            skip(buffer, 2);             // reserved
 
             // struct fsverity_extension_elide
             buffer.putLong(signingBlockOffset);
@@ -398,9 +392,9 @@
                     + 8 // offset size
                     + ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_SIZE;
 
-            buffer.putShort((short) kTotalSize);
-            buffer.put((byte) 1);    // ID of patch extension
-            skip(buffer, 5);         // reserved
+            buffer.putInt(kTotalSize);   // Total size of extension, padded to 64-bit alignment
+            buffer.putShort((short) 2);  // ID of patch extension
+            skip(buffer, 2);             // reserved
 
             // struct fsverity_extension_patch
             buffer.putLong(eocdOffset + ZIP_EOCD_CENTRAL_DIR_OFFSET_FIELD_OFFSET);  // offset
@@ -412,7 +406,7 @@
             if (kPadding == kExtensionSizeAlignment) {
                 kPadding = 0;
             }
-            skip(buffer, kPadding);                              // padding
+            skip(buffer, kPadding);      // padding
         }
 
         buffer.flip();
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index 5deee11..ed8b005 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -1580,6 +1580,20 @@
          */
         public Transaction destroy(SurfaceControl sc) {
             sc.checkNotReleased();
+
+            /**
+             * Perhaps it's safer to transfer the close guard to the Transaction
+             * but then we have a whole wonky scenario regarding merging, multiple
+             * close-guards per transaction etc...the whole scenario is kind of wonky
+             * and it seems really we'd like to just be able to call release here
+             * but the WindowManager has some code that looks like
+             * --- destroyInTransaction(a)
+             * --- reparentChildrenInTransaction(a)
+             * so we need to ensure the SC remains valid until the transaction
+             * is applied.
+             */
+            sc.mCloseGuard.close();
+
             nativeDestroy(mNativeObject, sc.mNativeObject);
             return this;
         }
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 7e54647..db34856 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -700,15 +700,9 @@
                     mIsCreating = false;
                     if (mSurfaceControl != null && !mSurfaceCreated) {
                         mSurface.release();
-                        // If we are not in the stopped state, then the destruction of the Surface
-                        // represents a visual change we need to display, and we should go ahead
-                        // and destroy the SurfaceControl. However if we are in the stopped state,
-                        // we can just leave the Surface around so it can be a part of animations,
-                        // and we let the life-time be tied to the parent surface.
-                        if (!mWindowStopped) {
-                            mSurfaceControl.destroy();
-                            mSurfaceControl = null;
-                        }
+
+                        mSurfaceControl.destroy();
+                        mSurfaceControl = null;
                     }
                 }
             } catch (Exception ex) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 6b16d42..3807079 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -20850,7 +20850,9 @@
         }
         // If this isn't laid out yet, focus assignment will be handled during the "deferment/
         // backtracking" of requestFocus during layout, so don't touch focus here.
-        if (!sCanFocusZeroSized && isLayoutValid()) {
+        if (!sCanFocusZeroSized && isLayoutValid()
+                // Don't touch focus if animating
+                && !(mParent instanceof ViewGroup && ((ViewGroup) mParent).isLayoutSuppressed())) {
             if (newWidth <= 0 || newHeight <= 0) {
                 if (hasFocus()) {
                     clearFocus();
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 4bd6fc8..239185e 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -245,7 +245,7 @@
 
     final WindowLeaked mLocation;
 
-    final WindowManager.LayoutParams mWindowAttributes = new WindowManager.LayoutParams();
+    public final WindowManager.LayoutParams mWindowAttributes = new WindowManager.LayoutParams();
 
     final W mWindow;
 
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index 1c2e43e..6bacdfe 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -901,7 +901,7 @@
      * Refreshes this info with the latest state of the view it represents, and request new
      * data be added by the View.
      *
-     * @param extraDataKey A bitmask of the extra data requested. Data that must be requested
+     * @param extraDataKey The extra data requested. Data that must be requested
      *                     with this mechanism is generally expensive to retrieve, so should only be
      *                     requested when needed. See
      *                     {@link #EXTRA_DATA_TEXT_CHARACTER_LOCATION_KEY} and
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index 88300db..4c7dc11 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -1132,8 +1132,7 @@
             if (mSaveTriggerId != null && mSaveTriggerId.equals(id)) {
                 if (sDebug) Log.d(TAG, "triggering commit by click of " + id);
                 commitLocked();
-                mMetricsLogger.action(MetricsEvent.AUTOFILL_SAVE_EXPLICITLY_TRIGGERED,
-                        mContext.getPackageName());
+                mMetricsLogger.write(newLog(MetricsEvent.AUTOFILL_SAVE_EXPLICITLY_TRIGGERED));
             }
         }
     }
@@ -1893,14 +1892,19 @@
                 }
             }
 
-            final LogMaker log = new LogMaker(MetricsEvent.AUTOFILL_DATASET_APPLIED)
-                    .setPackageName(mContext.getPackageName())
+            mMetricsLogger.write(newLog(MetricsEvent.AUTOFILL_DATASET_APPLIED)
                     .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VALUES, itemCount)
-                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED, numApplied);
-            mMetricsLogger.write(log);
+                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_VIEWS_FILLED, numApplied));
         }
     }
 
+    private LogMaker newLog(int category) {
+        return new LogMaker(category)
+                .setPackageName(mContext.getPackageName())
+                .addTaggedData(MetricsEvent.FIELD_AUTOFILL_COMPAT_MODE,
+                        isCompatibilityModeEnabledLocked() ? 1 : 0);
+    }
+
     /**
      *  Set the tracked views.
      *
diff --git a/core/java/android/view/textclassifier/TextClassifier.java b/core/java/android/view/textclassifier/TextClassifier.java
index da47bcb..24f531d 100644
--- a/core/java/android/view/textclassifier/TextClassifier.java
+++ b/core/java/android/view/textclassifier/TextClassifier.java
@@ -114,9 +114,10 @@
 
     /** @hide */
     @Retention(RetentionPolicy.SOURCE)
-    @StringDef({WIDGET_TYPE_TEXTVIEW, WIDGET_TYPE_WEBVIEW, WIDGET_TYPE_EDITTEXT,
-            WIDGET_TYPE_EDIT_WEBVIEW, WIDGET_TYPE_CUSTOM_TEXTVIEW, WIDGET_TYPE_CUSTOM_EDITTEXT,
-            WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW, WIDGET_TYPE_UNKNOWN})
+    @StringDef({WIDGET_TYPE_TEXTVIEW, WIDGET_TYPE_EDITTEXT, WIDGET_TYPE_UNSELECTABLE_TEXTVIEW,
+            WIDGET_TYPE_WEBVIEW, WIDGET_TYPE_EDIT_WEBVIEW, WIDGET_TYPE_CUSTOM_TEXTVIEW,
+            WIDGET_TYPE_CUSTOM_EDITTEXT, WIDGET_TYPE_CUSTOM_UNSELECTABLE_TEXTVIEW,
+            WIDGET_TYPE_UNKNOWN})
     @interface WidgetType {}
 
     /** The widget involved in the text classification session is a standard
diff --git a/core/java/android/widget/DateTimeView.java b/core/java/android/widget/DateTimeView.java
index 4db3607..a22f345 100644
--- a/core/java/android/widget/DateTimeView.java
+++ b/core/java/android/widget/DateTimeView.java
@@ -104,8 +104,16 @@
             sReceiverInfo.set(ri);
         }
         ri.addView(this);
+        // The view may not be added to the view hierarchy immediately right after setTime()
+        // is called which means it won't get any update from intents before being added.
+        // In such case, the view might show the incorrect relative time after being added to the
+        // view hierarchy until the next update intent comes.
+        // So we update the time here if mShowRelativeTime is enabled to prevent this case.
+        if (mShowRelativeTime) {
+            update();
+        }
     }
-        
+
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
diff --git a/core/java/android/widget/Magnifier.java b/core/java/android/widget/Magnifier.java
index f1a1457..929496f 100644
--- a/core/java/android/widget/Magnifier.java
+++ b/core/java/android/widget/Magnifier.java
@@ -38,7 +38,6 @@
 import android.view.ContextThemeWrapper;
 import android.view.Display;
 import android.view.DisplayListCanvas;
-import android.view.LayoutInflater;
 import android.view.PixelCopy;
 import android.view.RenderNode;
 import android.view.Surface;
@@ -71,8 +70,6 @@
     private final int[] mViewCoordinatesInSurface;
     // The window containing the magnifier.
     private InternalPopupWindow mWindow;
-    // The center coordinates of the window containing the magnifier.
-    private final Point mWindowCoords = new Point();
     // The width of the window containing the magnifier.
     private final int mWindowWidth;
     // The height of the window containing the magnifier.
@@ -87,8 +84,18 @@
     private final float mWindowElevation;
     // The corner radius of the window containing the magnifier.
     private final float mWindowCornerRadius;
-    // The center coordinates of the content that is to be magnified.
+    // The parent surface for the magnifier surface.
+    private SurfaceInfo mParentSurface;
+    // The surface where the content will be copied from.
+    private SurfaceInfo mContentCopySurface;
+    // The center coordinates of the window containing the magnifier.
+    private final Point mWindowCoords = new Point();
+    // The center coordinates of the content to be magnified,
+    // which can potentially contain a region outside the magnified view.
     private final Point mCenterZoomCoords = new Point();
+    // The center coordinates of the content to be magnified,
+    // clamped inside the visible region of the magnified view.
+    private final Point mClampedCenterZoomCoords = new Point();
     // Variables holding previous states, used for detecting redundant calls and invalidation.
     private final Point mPrevStartCoordsInSurface = new Point(
             NONEXISTENT_PREVIOUS_CONFIG_VALUE, NONEXISTENT_PREVIOUS_CONFIG_VALUE);
@@ -108,8 +115,6 @@
     public Magnifier(@NonNull View view) {
         mView = Preconditions.checkNotNull(view);
         final Context context = mView.getContext();
-        final View content = LayoutInflater.from(context).inflate(R.layout.magnifier, null);
-        content.findViewById(R.id.magnifier_inner).setClipToOutline(true);
         mWindowWidth = context.getResources().getDimensionPixelSize(R.dimen.magnifier_width);
         mWindowHeight = context.getResources().getDimensionPixelSize(R.dimen.magnifier_height);
         mWindowElevation = context.getResources().getDimension(R.dimen.magnifier_elevation);
@@ -155,22 +160,17 @@
         xPosInView = Math.max(0, Math.min(xPosInView, mView.getWidth()));
         yPosInView = Math.max(0, Math.min(yPosInView, mView.getHeight()));
 
-        configureCoordinates(xPosInView, yPosInView);
+        obtainSurfaces();
+        obtainContentCoordinates(xPosInView, yPosInView);
+        obtainWindowCoordinates();
 
-        // Clamp the startX location to avoid magnifying content which does not belong
-        // to the magnified view. This will not take into account overlapping views.
-        final Rect viewVisibleRegion = new Rect();
-        mView.getGlobalVisibleRect(viewVisibleRegion);
-        final int startX = Math.max(viewVisibleRegion.left, Math.min(
-                mCenterZoomCoords.x - mBitmapWidth / 2,
-                viewVisibleRegion.right - mBitmapWidth));
-        final int startY = mCenterZoomCoords.y - mBitmapHeight / 2;
-
+        final int startX = mClampedCenterZoomCoords.x - mBitmapWidth / 2;
+        final int startY = mClampedCenterZoomCoords.y - mBitmapHeight / 2;
         if (xPosInView != mPrevPosInView.x || yPosInView != mPrevPosInView.y) {
             if (mWindow == null) {
                 synchronized (mLock) {
                     mWindow = new InternalPopupWindow(mView.getContext(), mView.getDisplay(),
-                            getValidParentSurfaceForMagnifier(),
+                            mParentSurface.mSurface,
                             mWindowWidth, mWindowHeight, mWindowElevation, mWindowCornerRadius,
                             Handler.getMain() /* draw the magnifier on the UI thread */, mLock,
                             mCallback);
@@ -204,6 +204,7 @@
      */
     public void update() {
         if (mWindow != null) {
+            obtainSurfaces();
             // Update the content shown in the magnifier.
             performPixelCopy(mPrevStartCoordsInSurface.x, mPrevStartCoordsInSurface.y,
                     false /* update window position */);
@@ -235,35 +236,66 @@
 
     /**
      * @hide
+     *
+     * @return The top left coordinates of the magnifier, relative to the parent window.
      */
     @Nullable
     public Point getWindowCoords() {
         if (mWindow == null) {
             return null;
         }
-        return new Point(mWindow.mLastDrawContentPositionX, mWindow.mLastDrawContentPositionY);
+        final Rect surfaceInsets = mView.getViewRootImpl().mWindowAttributes.surfaceInsets;
+        return new Point(mWindow.mLastDrawContentPositionX - surfaceInsets.left,
+                mWindow.mLastDrawContentPositionY - surfaceInsets.top);
     }
 
-    @Nullable
-    private Surface getValidParentSurfaceForMagnifier() {
+    /**
+     * Retrieves the surfaces used by the magnifier:
+     * - a parent surface for the magnifier surface. This will usually be the main app window.
+     * - a surface where the magnified content will be copied from. This will be the main app
+     *   window unless the magnified view is a SurfaceView, in which case its backing surface
+     *   will be used.
+     */
+    private void obtainSurfaces() {
+        // Get the main window surface.
+        SurfaceInfo validMainWindowSurface = SurfaceInfo.NULL;
         if (mView.getViewRootImpl() != null) {
-            final Surface mainWindowSurface = mView.getViewRootImpl().mSurface;
+            final ViewRootImpl viewRootImpl = mView.getViewRootImpl();
+            final Surface mainWindowSurface = viewRootImpl.mSurface;
             if (mainWindowSurface != null && mainWindowSurface.isValid()) {
-                return mainWindowSurface;
+                final Rect surfaceInsets = viewRootImpl.mWindowAttributes.surfaceInsets;
+                final int surfaceWidth =
+                        viewRootImpl.getWidth() + surfaceInsets.left + surfaceInsets.right;
+                final int surfaceHeight =
+                        viewRootImpl.getHeight() + surfaceInsets.top + surfaceInsets.bottom;
+                validMainWindowSurface =
+                        new SurfaceInfo(mainWindowSurface, surfaceWidth, surfaceHeight, true);
             }
         }
+        // Get the surface backing the magnified view, if it is a SurfaceView.
+        SurfaceInfo validSurfaceViewSurface = SurfaceInfo.NULL;
         if (mView instanceof SurfaceView) {
-            final Surface surfaceViewSurface = ((SurfaceView) mView).getHolder().getSurface();
+            final SurfaceHolder surfaceHolder = ((SurfaceView) mView).getHolder();
+            final Surface surfaceViewSurface = surfaceHolder.getSurface();
             if (surfaceViewSurface != null && surfaceViewSurface.isValid()) {
-                return surfaceViewSurface;
+                final Rect surfaceFrame = surfaceHolder.getSurfaceFrame();
+                validSurfaceViewSurface = new SurfaceInfo(surfaceViewSurface,
+                        surfaceFrame.right, surfaceFrame.bottom, false);
             }
         }
-        return null;
+
+        // Choose the parent surface for the magnifier and the source surface for the content.
+        mParentSurface = validMainWindowSurface != SurfaceInfo.NULL
+                ? validMainWindowSurface : validSurfaceViewSurface;
+        mContentCopySurface = mView instanceof SurfaceView
+                ? validSurfaceViewSurface : validMainWindowSurface;
     }
 
-    private void configureCoordinates(final float xPosInView, final float yPosInView) {
-        // Compute the coordinates of the center of the content going to be displayed in the
-        // magnifier. These are relative to the surface the content is copied from.
+    /**
+     * Computes the coordinates of the center of the content going to be displayed in the
+     * magnifier. These are relative to the surface the content is copied from.
+     */
+    private void obtainContentCoordinates(final float xPosInView, final float yPosInView) {
         final float posX;
         final float posY;
         mView.getLocationInSurface(mViewCoordinatesInSurface);
@@ -278,61 +310,63 @@
         mCenterZoomCoords.x = Math.round(posX);
         mCenterZoomCoords.y = Math.round(posY);
 
+        // Clamp the x location to avoid magnifying content which does not belong
+        // to the magnified view. This will not take into account overlapping views.
+        final Rect viewVisibleRegion = new Rect();
+        mView.getGlobalVisibleRect(viewVisibleRegion);
+        if (mView.getViewRootImpl() != null) {
+            // Clamping coordinates relative to the surface, not to the window.
+            final Rect surfaceInsets = mView.getViewRootImpl().mWindowAttributes.surfaceInsets;
+            viewVisibleRegion.offset(surfaceInsets.left, surfaceInsets.top);
+        }
+        if (mView instanceof SurfaceView) {
+            // If we copy content from a SurfaceView, clamp coordinates relative to it.
+            viewVisibleRegion.offset(-mViewCoordinatesInSurface[0], -mViewCoordinatesInSurface[1]);
+        }
+        mClampedCenterZoomCoords.x = Math.max(viewVisibleRegion.left + mBitmapWidth / 2, Math.min(
+                mCenterZoomCoords.x, viewVisibleRegion.right - mBitmapWidth / 2));
+        mClampedCenterZoomCoords.y = mCenterZoomCoords.y;
+    }
+
+    private void obtainWindowCoordinates() {
         // Compute the position of the magnifier window. Again, this has to be relative to the
         // surface of the magnified view, as this surface is the parent of the magnifier surface.
         final int verticalOffset = mView.getContext().getResources().getDimensionPixelSize(
                 R.dimen.magnifier_offset);
         mWindowCoords.x = mCenterZoomCoords.x - mWindowWidth / 2;
         mWindowCoords.y = mCenterZoomCoords.y - mWindowHeight / 2 - verticalOffset;
-        if (mView instanceof SurfaceView && mView.getViewRootImpl() != null) {
-            // TODO: deduplicate against the first part of #getValidParentSurfaceForMagnifier()
-            final Surface mainWindowSurface = mView.getViewRootImpl().mSurface;
-            if (mainWindowSurface != null && mainWindowSurface.isValid()) {
-                mWindowCoords.x += mViewCoordinatesInSurface[0];
-                mWindowCoords.y += mViewCoordinatesInSurface[1];
-            }
+        if (mParentSurface != mContentCopySurface) {
+            mWindowCoords.x += mViewCoordinatesInSurface[0];
+            mWindowCoords.y += mViewCoordinatesInSurface[1];
         }
     }
 
     private void performPixelCopy(final int startXInSurface, final int startYInSurface,
             final boolean updateWindowPosition) {
-        // Get the view surface where the content will be copied from.
-        final Surface surface;
-        final int surfaceWidth;
-        final int surfaceHeight;
-        if (mView instanceof SurfaceView) {
-            final SurfaceHolder surfaceHolder = ((SurfaceView) mView).getHolder();
-            surface = surfaceHolder.getSurface();
-            surfaceWidth = surfaceHolder.getSurfaceFrame().right;
-            surfaceHeight = surfaceHolder.getSurfaceFrame().bottom;
-        } else if (mView.getViewRootImpl() != null) {
-            final ViewRootImpl viewRootImpl = mView.getViewRootImpl();
-            surface = viewRootImpl.mSurface;
-            surfaceWidth = viewRootImpl.getWidth();
-            surfaceHeight = viewRootImpl.getHeight();
-        } else {
-            surface = null;
-            surfaceWidth = NONEXISTENT_PREVIOUS_CONFIG_VALUE;
-            surfaceHeight = NONEXISTENT_PREVIOUS_CONFIG_VALUE;
-        }
-
-        if (surface == null || !surface.isValid()) {
+        if (mContentCopySurface.mSurface == null || !mContentCopySurface.mSurface.isValid()) {
             return;
         }
-
         // Clamp copy coordinates inside the surface to avoid displaying distorted content.
         final int clampedStartXInSurface = Math.max(0,
-                Math.min(startXInSurface, surfaceWidth - mBitmapWidth));
+                Math.min(startXInSurface, mContentCopySurface.mWidth - mBitmapWidth));
         final int clampedStartYInSurface = Math.max(0,
-                Math.min(startYInSurface, surfaceHeight - mBitmapHeight));
+                Math.min(startYInSurface, mContentCopySurface.mHeight - mBitmapHeight));
 
         // Clamp window coordinates inside the parent surface, to avoid displaying
         // the magnifier out of screen or overlapping with system insets.
-        final Rect insets = mView.getRootWindowInsets().getSystemWindowInsets();
-        final int windowCoordsX = Math.max(insets.left,
-                Math.min(surfaceWidth - mWindowWidth - insets.right, mWindowCoords.x));
-        final int windowCoordsY = Math.max(insets.top,
-                Math.min(surfaceHeight - mWindowHeight - insets.bottom, mWindowCoords.y));
+        final Rect windowBounds;
+        if (mParentSurface.mIsMainWindowSurface) {
+            final Rect systemInsets = mView.getRootWindowInsets().getSystemWindowInsets();
+            windowBounds = new Rect(systemInsets.left, systemInsets.top,
+                     mParentSurface.mWidth - systemInsets.right,
+                    mParentSurface.mHeight - systemInsets.bottom);
+        } else {
+            windowBounds = new Rect(0, 0, mParentSurface.mWidth, mParentSurface.mHeight);
+        }
+        final int windowCoordsX = Math.max(windowBounds.left,
+                Math.min(windowBounds.right - mWindowWidth, mWindowCoords.x));
+        final int windowCoordsY = Math.max(windowBounds.top,
+                Math.min(windowBounds.bottom - mWindowHeight, mWindowCoords.y));
 
         // Perform the pixel copy.
         mPixelCopyRequestRect.set(clampedStartXInSurface,
@@ -342,7 +376,7 @@
         final InternalPopupWindow currentWindowInstance = mWindow;
         final Bitmap bitmap =
                 Bitmap.createBitmap(mBitmapWidth, mBitmapHeight, Bitmap.Config.ARGB_8888);
-        PixelCopy.request(surface, mPixelCopyRequestRect, bitmap,
+        PixelCopy.request(mContentCopySurface.mSurface, mPixelCopyRequestRect, bitmap,
                 result -> {
                     synchronized (mLock) {
                         if (mWindow != currentWindowInstance) {
@@ -362,6 +396,26 @@
     }
 
     /**
+     * Contains a surface and metadata corresponding to it.
+     */
+    private static class SurfaceInfo {
+        public static final SurfaceInfo NULL = new SurfaceInfo(null, 0, 0, false);
+
+        private Surface mSurface;
+        private int mWidth;
+        private int mHeight;
+        private boolean mIsMainWindowSurface;
+
+        SurfaceInfo(final Surface surface, final int width, final int height,
+                final boolean isMainWindowSurface) {
+            mSurface = surface;
+            mWidth = width;
+            mHeight = height;
+            mIsMainWindowSurface = isMainWindowSurface;
+        }
+    }
+
+    /**
      * Magnifier's own implementation of PopupWindow-similar floating window.
      * This exists to ensure frame-synchronization between window position updates and window
      * content updates. By using a PopupWindow, these events would happen in different frames,
diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java
index ced66cd..e7c3a47 100644
--- a/core/java/android/widget/ProgressBar.java
+++ b/core/java/android/widget/ProgressBar.java
@@ -1373,7 +1373,7 @@
      * indicator. To animate the visual position to the target value, use
      * {@link #setProgress(int, boolean)}}.
      *
-     * @param progress the new progress, between 0 and {@link #getMax()}
+     * @param progress the new progress, between {@link #getMin()} and {@link #getMax()}
      *
      * @see #setIndeterminate(boolean)
      * @see #isIndeterminate()
@@ -1392,7 +1392,7 @@
      * Animation does not affect the result of {@link #getProgress()}, which
      * will return the target value immediately after this method is called.
      *
-     * @param progress the new progress value, between 0 and {@link #getMax()}
+     * @param progress the new progress value, between {@link #getMin()} and {@link #getMax()}
      * @param animate {@code true} to animate between the current and target
      *                values or {@code false} to not animate
      */
@@ -1425,7 +1425,8 @@
      * anything if the progress bar is in indeterminate mode.
      * </p>
      *
-     * @param secondaryProgress the new secondary progress, between 0 and {@link #getMax()}
+     * @param secondaryProgress the new secondary progress, between {@link #getMin()} and
+     * {@link #getMax()}
      * @see #setIndeterminate(boolean)
      * @see #isIndeterminate()
      * @see #getSecondaryProgress()
@@ -1455,7 +1456,7 @@
      * <p>Get the progress bar's current level of progress. Return 0 when the
      * progress bar is in indeterminate mode.</p>
      *
-     * @return the current progress, between 0 and {@link #getMax()}
+     * @return the current progress, between {@link #getMin()} and {@link #getMax()}
      *
      * @see #setIndeterminate(boolean)
      * @see #isIndeterminate()
@@ -1472,7 +1473,7 @@
      * <p>Get the progress bar's current level of secondary progress. Return 0 when the
      * progress bar is in indeterminate mode.</p>
      *
-     * @return the current secondary progress, between 0 and {@link #getMax()}
+     * @return the current secondary progress, between {@link #getMin()} and {@link #getMax()}
      *
      * @see #setIndeterminate(boolean)
      * @see #isIndeterminate()
@@ -1990,7 +1991,8 @@
 
         if (!isIndeterminate()) {
             AccessibilityNodeInfo.RangeInfo rangeInfo = AccessibilityNodeInfo.RangeInfo.obtain(
-                    AccessibilityNodeInfo.RangeInfo.RANGE_TYPE_INT, 0, getMax(), getProgress());
+                    AccessibilityNodeInfo.RangeInfo.RANGE_TYPE_INT, getMin(), getMax(),
+                    getProgress());
             info.setRangeInfo(rangeInfo);
         }
     }
diff --git a/core/java/com/android/internal/content/FileSystemProvider.java b/core/java/com/android/internal/content/FileSystemProvider.java
index a075705..b591163 100644
--- a/core/java/com/android/internal/content/FileSystemProvider.java
+++ b/core/java/com/android/internal/content/FileSystemProvider.java
@@ -85,6 +85,14 @@
 
     protected abstract Uri buildNotificationUri(String docId);
 
+    /**
+     * Callback indicating that the given document has been modified. This gives
+     * the provider a hook to invalidate cached data, such as {@code sdcardfs}.
+     */
+    protected void onDocIdChanged(String docId) {
+        // Default is no-op
+    }
+
     @Override
     public boolean onCreate() {
         throw new UnsupportedOperationException(
@@ -185,6 +193,7 @@
                 throw new IllegalStateException("Failed to mkdir " + file);
             }
             childId = getDocIdForFile(file);
+            onDocIdChanged(childId);
             addFolderToMediaStore(getFileForDocId(childId, true));
         } else {
             try {
@@ -192,6 +201,7 @@
                     throw new IllegalStateException("Failed to touch " + file);
                 }
                 childId = getDocIdForFile(file);
+                onDocIdChanged(childId);
             } catch (IOException e) {
                 throw new IllegalStateException("Failed to touch " + file + ": " + e);
             }
@@ -227,16 +237,20 @@
 
         final File before = getFileForDocId(docId);
         final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName);
-        final File visibleFileBefore = getFileForDocId(docId, true);
         if (!before.renameTo(after)) {
             throw new IllegalStateException("Failed to rename to " + after);
         }
 
         final String afterDocId = getDocIdForFile(after);
-        moveInMediaStore(visibleFileBefore, getFileForDocId(afterDocId, true));
+        onDocIdChanged(docId);
+        onDocIdChanged(afterDocId);
+
+        final File beforeVisibleFile = getFileForDocId(docId, true);
+        final File afterVisibleFile = getFileForDocId(afterDocId, true);
+        moveInMediaStore(beforeVisibleFile, afterVisibleFile);
 
         if (!TextUtils.equals(docId, afterDocId)) {
-            scanFile(after);
+            scanFile(afterVisibleFile);
             return afterDocId;
         } else {
             return null;
@@ -259,6 +273,8 @@
         }
 
         final String docId = getDocIdForFile(after);
+        onDocIdChanged(sourceDocumentId);
+        onDocIdChanged(docId);
         moveInMediaStore(visibleFileBefore, getFileForDocId(docId, true));
 
         return docId;
@@ -308,6 +324,7 @@
             throw new IllegalStateException("Failed to delete " + file);
         }
 
+        onDocIdChanged(docId);
         removeFromMediaStore(visibleFile, isDirectory);
     }
 
@@ -418,7 +435,10 @@
             try {
                 // When finished writing, kick off media scanner
                 return ParcelFileDescriptor.open(
-                        file, pfdMode, mHandler, (IOException e) -> scanFile(visibleFile));
+                        file, pfdMode, mHandler, (IOException e) -> {
+                            onDocIdChanged(documentId);
+                            scanFile(visibleFile);
+                        });
             } catch (IOException e) {
                 throw new FileNotFoundException("Failed to open for writing: " + e);
             }
diff --git a/core/java/com/android/internal/content/NativeLibraryHelper.java b/core/java/com/android/internal/content/NativeLibraryHelper.java
index a1e6fd8..c388148 100644
--- a/core/java/com/android/internal/content/NativeLibraryHelper.java
+++ b/core/java/com/android/internal/content/NativeLibraryHelper.java
@@ -282,7 +282,10 @@
         }
     }
 
-    private static void createNativeLibrarySubdir(File path) throws IOException {
+    /**
+     * @hide
+     */
+    public static void createNativeLibrarySubdir(File path) throws IOException {
         if (!path.isDirectory()) {
             path.delete();
 
diff --git a/core/java/com/android/internal/content/PackageHelper.java b/core/java/com/android/internal/content/PackageHelper.java
index 8a456d1..e2b8f7d 100644
--- a/core/java/com/android/internal/content/PackageHelper.java
+++ b/core/java/com/android/internal/content/PackageHelper.java
@@ -94,14 +94,6 @@
         abstract public boolean getAllow3rdPartyOnInternalConfig(Context context);
         abstract public ApplicationInfo getExistingAppInfo(Context context, String packageName);
         abstract public File getDataDirectory();
-
-        public boolean fitsOnInternalStorage(Context context, SessionParams params)
-                throws IOException {
-            StorageManager storage = getStorageManager(context);
-            final UUID target = storage.getUuidForPath(getDataDirectory());
-            return (params.sizeBytes <= storage.getAllocatableBytes(target,
-                    translateAllocateFlags(params.installFlags)));
-        }
     }
 
     private synchronized static TestableInterface getDefaultTestableInterface() {
@@ -175,6 +167,7 @@
     @VisibleForTesting
     public static String resolveInstallVolume(Context context, SessionParams params,
             TestableInterface testInterface) throws IOException {
+        final StorageManager storageManager = testInterface.getStorageManager(context);
         final boolean forceAllowOnExternal = testInterface.getForceAllowOnExternalSetting(context);
         final boolean allow3rdPartyOnInternal =
                 testInterface.getAllow3rdPartyOnInternalConfig(context);
@@ -183,9 +176,31 @@
         ApplicationInfo existingInfo = testInterface.getExistingAppInfo(context,
                 params.appPackageName);
 
-        final boolean fitsOnInternal = testInterface.fitsOnInternalStorage(context, params);
-        final StorageManager storageManager =
-                testInterface.getStorageManager(context);
+        // Figure out best candidate volume, and also if we fit on internal
+        final ArraySet<String> allCandidates = new ArraySet<>();
+        boolean fitsOnInternal = false;
+        VolumeInfo bestCandidate = null;
+        long bestCandidateAvailBytes = Long.MIN_VALUE;
+        for (VolumeInfo vol : storageManager.getVolumes()) {
+            if (vol.type == VolumeInfo.TYPE_PRIVATE && vol.isMountedWritable()) {
+                final boolean isInternalStorage = ID_PRIVATE_INTERNAL.equals(vol.id);
+                final UUID target = storageManager.getUuidForPath(new File(vol.path));
+                final long availBytes = storageManager.getAllocatableBytes(target,
+                        translateAllocateFlags(params.installFlags));
+                if (isInternalStorage) {
+                    fitsOnInternal = (params.sizeBytes <= availBytes);
+                }
+                if (!isInternalStorage || allow3rdPartyOnInternal) {
+                    if (availBytes >= params.sizeBytes) {
+                        allCandidates.add(vol.fsUuid);
+                    }
+                    if (availBytes >= bestCandidateAvailBytes) {
+                        bestCandidate = vol;
+                        bestCandidateAvailBytes = availBytes;
+                    }
+                }
+            }
+        }
 
         // System apps always forced to internal storage
         if (existingInfo != null && existingInfo.isSystemApp()) {
@@ -198,27 +213,6 @@
             }
         }
 
-        // Now deal with non-system apps.
-        final ArraySet<String> allCandidates = new ArraySet<>();
-        VolumeInfo bestCandidate = null;
-        long bestCandidateAvailBytes = Long.MIN_VALUE;
-        for (VolumeInfo vol : storageManager.getVolumes()) {
-            boolean isInternalStorage = ID_PRIVATE_INTERNAL.equals(vol.id);
-            if (vol.type == VolumeInfo.TYPE_PRIVATE && vol.isMountedWritable()
-                    && (!isInternalStorage || allow3rdPartyOnInternal)) {
-                final UUID target = storageManager.getUuidForPath(new File(vol.path));
-                final long availBytes = storageManager.getAllocatableBytes(target,
-                        translateAllocateFlags(params.installFlags));
-                if (availBytes >= params.sizeBytes) {
-                    allCandidates.add(vol.fsUuid);
-                }
-                if (availBytes >= bestCandidateAvailBytes) {
-                    bestCandidate = vol;
-                    bestCandidateAvailBytes = availBytes;
-                }
-            }
-        }
-
         // If app expresses strong desire for internal storage, honor it
         if (!forceAllowOnExternal
                 && params.installLocation == PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY) {
diff --git a/core/java/com/android/internal/net/NetworkStatsFactory.java b/core/java/com/android/internal/net/NetworkStatsFactory.java
index 98afebc5..c4d08c7 100644
--- a/core/java/com/android/internal/net/NetworkStatsFactory.java
+++ b/core/java/com/android/internal/net/NetworkStatsFactory.java
@@ -56,8 +56,6 @@
     private static final boolean USE_NATIVE_PARSING = true;
     private static final boolean SANITY_CHECK_NATIVE = false;
 
-    /** Path to {@code /proc/net/dev}. */
-    private final File mStatsIfaceDev;
     /** Path to {@code /proc/net/xt_qtaguid/iface_stat_all}. */
     private final File mStatsXtIfaceAll;
     /** Path to {@code /proc/net/xt_qtaguid/iface_stat_fmt}. */
@@ -133,47 +131,16 @@
 
     @VisibleForTesting
     public NetworkStatsFactory(File procRoot, boolean useBpfStats) {
-        mStatsIfaceDev = new File(procRoot, "net/dev");
         mStatsXtIfaceAll = new File(procRoot, "net/xt_qtaguid/iface_stat_all");
         mStatsXtIfaceFmt = new File(procRoot, "net/xt_qtaguid/iface_stat_fmt");
         mStatsXtUid = new File(procRoot, "net/xt_qtaguid/stats");
         mUseBpfStats = useBpfStats;
     }
 
-    @VisibleForTesting
-    public NetworkStats readNetworkStatsIfaceDev() throws IOException {
-        final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
-
+    public NetworkStats readBpfNetworkStatsDev() throws IOException {
         final NetworkStats stats = new NetworkStats(SystemClock.elapsedRealtime(), 6);
-        final NetworkStats.Entry entry = new NetworkStats.Entry();
-
-        BufferedReader reader = null;
-        try {
-            reader = new BufferedReader(new FileReader(mStatsIfaceDev));
-
-            // skip first two header lines
-            reader.readLine();
-            reader.readLine();
-
-            // parse remaining lines
-            String line;
-            while ((line = reader.readLine()) != null) {
-                String[] values = line.trim().split("\\:?\\s+");
-                entry.iface = values[0];
-                entry.uid = UID_ALL;
-                entry.set = SET_ALL;
-                entry.tag = TAG_NONE;
-                entry.rxBytes = Long.parseLong(values[1]);
-                entry.rxPackets = Long.parseLong(values[2]);
-                entry.txBytes = Long.parseLong(values[9]);
-                entry.txPackets = Long.parseLong(values[10]);
-                stats.addValues(entry);
-            }
-        } catch (NullPointerException|NumberFormatException e) {
-            throw new ProtocolException("problem parsing stats", e);
-        } finally {
-            IoUtils.closeQuietly(reader);
-            StrictMode.setThreadPolicy(savedPolicy);
+        if (nativeReadNetworkStatsDev(stats) != 0) {
+            throw new IOException("Failed to parse bpf iface stats");
         }
         return stats;
     }
@@ -188,9 +155,9 @@
      */
     public NetworkStats readNetworkStatsSummaryDev() throws IOException {
 
-        // Return the stats get from /proc/net/dev if switched to bpf module.
+        // Return xt_bpf stats if switched to bpf module.
         if (mUseBpfStats)
-            return readNetworkStatsIfaceDev();
+            return readBpfNetworkStatsDev();
 
         final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
 
@@ -244,9 +211,9 @@
      */
     public NetworkStats readNetworkStatsSummaryXt() throws IOException {
 
-        // Return the stats get from /proc/net/dev if qtaguid  module is replaced.
+        // Return xt_bpf stats if qtaguid  module is replaced.
         if (mUseBpfStats)
-            return readNetworkStatsIfaceDev();
+            return readBpfNetworkStatsDev();
 
         final StrictMode.ThreadPolicy savedPolicy = StrictMode.allowThreadDiskReads();
 
@@ -408,4 +375,7 @@
     @VisibleForTesting
     public static native int nativeReadNetworkStatsDetail(NetworkStats stats, String path,
         int limitUid, String[] limitIfaces, int limitTag, boolean useBpfStats);
+
+    @VisibleForTesting
+    public static native int nativeReadNetworkStatsDev(NetworkStats stats);
 }
diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
index 6f58365..33049be 100644
--- a/core/java/com/android/internal/os/ZygoteInit.java
+++ b/core/java/com/android/internal/os/ZygoteInit.java
@@ -35,6 +35,7 @@
 import android.os.SystemClock;
 import android.os.SystemProperties;
 import android.os.Trace;
+import android.os.UserHandle;
 import android.os.ZygoteProcess;
 import android.os.storage.StorageManager;
 import android.security.keystore.AndroidKeyStoreProvider;
@@ -466,13 +467,7 @@
                     "dalvik.vm.profilesystemserver", false);
             if (profileSystemServer && (Build.IS_USERDEBUG || Build.IS_ENG)) {
                 try {
-                    File profileDir = Environment.getDataProfilesDePackageDirectory(
-                            Process.SYSTEM_UID, "system_server");
-                    File profile = new File(profileDir, "primary.prof");
-                    profile.getParentFile().mkdirs();
-                    profile.createNewFile();
-                    String[] codePaths = systemServerClasspath.split(":");
-                    VMRuntime.registerAppInfo(profile.getPath(), codePaths);
+                    prepareSystemServerProfile(systemServerClasspath);
                 } catch (Exception e) {
                     Log.wtf(TAG, "Failed to set up system server profile", e);
                 }
@@ -514,6 +509,37 @@
         /* should never reach here */
     }
 
+    /**
+     * Note that preparing the profiles for system server does not require special
+     * selinux permissions. From the installer perspective the system server is a regular package
+     * which can capture profile information.
+     */
+    private static void prepareSystemServerProfile(String systemServerClasspath)
+            throws RemoteException {
+        if (systemServerClasspath.isEmpty()) {
+            return;
+        }
+        String[] codePaths = systemServerClasspath.split(":");
+
+        final IInstalld installd = IInstalld.Stub
+                .asInterface(ServiceManager.getService("installd"));
+
+        String systemServerPackageName = "android";
+        String systemServerProfileName = "primary.prof";
+        installd.prepareAppProfile(
+                systemServerPackageName,
+                UserHandle.USER_SYSTEM,
+                UserHandle.getAppId(Process.SYSTEM_UID),
+                systemServerProfileName,
+                codePaths[0],
+                /*dexMetadata*/ null);
+
+        File profileDir = Environment.getDataProfilesDePackageDirectory(
+                UserHandle.USER_SYSTEM, systemServerPackageName);
+        String profilePath = new File(profileDir, systemServerProfileName).getAbsolutePath();
+        VMRuntime.registerAppInfo(profilePath, codePaths);
+    }
+
     public static void setApiBlacklistExemptions(String[] exemptions) {
         VMRuntime.getRuntime().setHiddenApiExemptions(exemptions);
     }
diff --git a/core/java/com/android/internal/policy/DecorContext.java b/core/java/com/android/internal/policy/DecorContext.java
index eac9f64..cd80d53 100644
--- a/core/java/com/android/internal/policy/DecorContext.java
+++ b/core/java/com/android/internal/policy/DecorContext.java
@@ -23,6 +23,8 @@
 import android.view.WindowManager;
 import android.view.WindowManagerImpl;
 
+import java.lang.ref.WeakReference;
+
 /**
  * Context for decor views which can be seeded with pure application context and not depend on the
  * activity, but still provide some of the facilities that Activity has,
@@ -35,9 +37,12 @@
     private WindowManager mWindowManager;
     private Resources mActivityResources;
 
-    public DecorContext(Context context, Resources activityResources) {
+    private WeakReference<Context> mActivityContext;
+
+    public DecorContext(Context context, Context activityContext) {
         super(context, null);
-        mActivityResources = activityResources;
+        mActivityContext = new WeakReference<>(activityContext);
+        mActivityResources = activityContext.getResources();
     }
 
     void setPhoneWindow(PhoneWindow phoneWindow) {
@@ -60,6 +65,13 @@
 
     @Override
     public Resources getResources() {
+        Context activityContext = mActivityContext.get();
+        // Attempt to update the local cached Resources from the activity context. If the activity
+        // is no longer around, return the old cached values.
+        if (activityContext != null) {
+            mActivityResources = activityContext.getResources();
+        }
+
         return mActivityResources;
     }
 
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index eadefc9..2db5739 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -41,7 +41,6 @@
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
 import android.animation.ObjectAnimator;
-import android.app.ActivityManager;
 import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.Resources;
@@ -55,7 +54,6 @@
 import android.graphics.Shader;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
-import android.os.RemoteException;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.TypedValue;
@@ -310,10 +308,8 @@
     public void onDraw(Canvas c) {
         super.onDraw(c);
 
-        // When we are resizing, we need the fallback background to cover the area where we have our
-        // system bar background views as the navigation bar will be hidden during resizing.
-        mBackgroundFallback.draw(isResizing() ? this : mContentRoot, mContentRoot, c,
-                mWindow.mContentParent);
+        mBackgroundFallback.draw(this, mContentRoot, c, mWindow.mContentParent,
+                mStatusColorViewState.view, mNavigationColorViewState.view);
     }
 
     @Override
@@ -1844,6 +1840,13 @@
     }
 
     @Override
+    public Resources getResources() {
+        // Make sure the Resources object is propogated from the Context since it can be updated in
+        // the Context object.
+        return getContext().getResources();
+    }
+
+    @Override
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
 
diff --git a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
index 3af3e2a..a3c7a9e 100644
--- a/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
+++ b/core/java/com/android/internal/policy/DividerSnapAlgorithm.java
@@ -344,7 +344,7 @@
             if (dockedSide == DOCKED_LEFT) {
                 position += mInsets.left;
             } else if (dockedSide == DOCKED_RIGHT) {
-                position = mDisplayWidth - position - mInsets.right;
+                position = mDisplayWidth - position - mInsets.right - mDividerSize;
             }
         }
         mTargets.add(new SnapTarget(position, position, SnapTarget.FLAG_NONE));
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 528888f..7ea023e 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -2299,7 +2299,7 @@
             if (applicationContext == null) {
                 context = getContext();
             } else {
-                context = new DecorContext(applicationContext, getContext().getResources());
+                context = new DecorContext(applicationContext, getContext());
                 if (mTheme != -1) {
                     context.setTheme(mTheme);
                 }
diff --git a/core/java/com/android/internal/widget/BackgroundFallback.java b/core/java/com/android/internal/widget/BackgroundFallback.java
index 309f80c..2b05f1e 100644
--- a/core/java/com/android/internal/widget/BackgroundFallback.java
+++ b/core/java/com/android/internal/widget/BackgroundFallback.java
@@ -46,8 +46,11 @@
      * @param root The view group containing the content.
      * @param c The canvas to draw the background onto.
      * @param content The view where the actual app content is contained in.
+     * @param coveringView1 A potentially opaque view drawn atop the content
+     * @param coveringView2 A potentially opaque view drawn atop the content
      */
-    public void draw(ViewGroup boundsView, ViewGroup root, Canvas c, View content) {
+    public void draw(ViewGroup boundsView, ViewGroup root, Canvas c, View content,
+            View coveringView1, View coveringView2) {
         if (!hasFallback()) {
             return;
         }
@@ -55,6 +58,10 @@
         // Draw the fallback in the padding.
         final int width = boundsView.getWidth();
         final int height = boundsView.getHeight();
+
+        final int rootOffsetX = root.getLeft();
+        final int rootOffsetY = root.getTop();
+
         int left = width;
         int top = height;
         int right = 0;
@@ -71,17 +78,58 @@
                         ((ViewGroup) child).getChildCount() == 0) {
                     continue;
                 }
-            } else if (child.getVisibility() != View.VISIBLE || childBg == null ||
-                    childBg.getOpacity() != PixelFormat.OPAQUE) {
+            } else if (child.getVisibility() != View.VISIBLE || !isOpaque(childBg)) {
                 // Potentially translucent or invisible children don't count, and we assume
                 // the content view will cover the whole area if we're in a background
                 // fallback situation.
                 continue;
             }
-            left = Math.min(left, child.getLeft());
-            top = Math.min(top, child.getTop());
-            right = Math.max(right, child.getRight());
-            bottom = Math.max(bottom, child.getBottom());
+            left = Math.min(left, rootOffsetX + child.getLeft());
+            top = Math.min(top, rootOffsetY + child.getTop());
+            right = Math.max(right, rootOffsetX + child.getRight());
+            bottom = Math.max(bottom, rootOffsetY + child.getBottom());
+        }
+
+        // If one of the bar backgrounds is a solid color and covers the entire padding on a side
+        // we can drop that padding.
+        boolean eachBarCoversTopInY = true;
+        for (int i = 0; i < 2; i++) {
+            View v = (i == 0) ? coveringView1 : coveringView2;
+            if (v == null || v.getVisibility() != View.VISIBLE
+                    || v.getAlpha() != 1f || !isOpaque(v.getBackground())) {
+                eachBarCoversTopInY = false;
+                continue;
+            }
+
+            // Bar covers entire left padding
+            if (v.getTop() <= 0 && v.getBottom() >= height
+                    && v.getLeft() <= 0 && v.getRight() >= left) {
+                left = 0;
+            }
+            // Bar covers entire right padding
+            if (v.getTop() <= 0 && v.getBottom() >= height
+                    && v.getLeft() <= right && v.getRight() >= width) {
+                right = width;
+            }
+            // Bar covers entire top padding
+            if (v.getTop() <= 0 && v.getBottom() >= top
+                    && v.getLeft() <= 0 && v.getRight() >= width) {
+                top = 0;
+            }
+            // Bar covers entire bottom padding
+            if (v.getTop() <= bottom && v.getBottom() >= height
+                    && v.getLeft() <= 0 && v.getRight() >= width) {
+                bottom = height;
+            }
+
+            eachBarCoversTopInY &= v.getTop() <= 0 && v.getBottom() >= top;
+        }
+
+        // Special case: Sometimes, both covering views together may cover the top inset, but
+        // neither does on its own.
+        if (eachBarCoversTopInY && (viewsCoverEntireWidth(coveringView1, coveringView2, width)
+                || viewsCoverEntireWidth(coveringView2, coveringView1, width))) {
+            top = 0;
         }
 
         if (left >= right || top >= bottom) {
@@ -106,4 +154,24 @@
             mBackgroundFallback.draw(c);
         }
     }
+
+    private boolean isOpaque(Drawable childBg) {
+        return childBg != null && childBg.getOpacity() == PixelFormat.OPAQUE;
+    }
+
+    /**
+     * Returns true if {@code view1} starts before or on {@code 0} and extends at least
+     * up to {@code view2}, and that view extends at least to {@code width}.
+     *
+     * @param view1 the first view to check if it covers the width
+     * @param view2 the second view to check if it covers the width
+     * @param width the width to check for
+     * @return returns true if both views together cover the entire width (and view1 is to the left
+     *         of view2)
+     */
+    private boolean viewsCoverEntireWidth(View view1, View view2, int width) {
+        return view1.getLeft() <= 0
+                && view1.getRight() >= view2.getLeft()
+                && view2.getRight() >= width;
+    }
 }
diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java
index 1e7c11e..e143498 100644
--- a/core/java/com/android/internal/widget/ImageFloatingTextView.java
+++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java
@@ -28,8 +28,6 @@
 import android.widget.RemoteViews;
 import android.widget.TextView;
 
-import com.android.internal.R;
-
 /**
  * A TextView that can float around an image on the end.
  *
@@ -44,9 +42,7 @@
     /** Resolved layout direction */
     private int mResolvedDirection = LAYOUT_DIRECTION_UNDEFINED;
     private int mMaxLinesForHeight = -1;
-    private boolean mFirstMeasure = true;
     private int mLayoutMaxLines = -1;
-    private boolean mBlockLayouts;
     private int mImageEndMargin;
 
     public ImageFloatingTextView(Context context) {
@@ -122,30 +118,31 @@
 
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        int height = MeasureSpec.getSize(heightMeasureSpec);
-        // Lets calculate how many lines the given measurement allows us.
-        int availableHeight = height - mPaddingTop - mPaddingBottom;
-        int maxLines = availableHeight / getLineHeight();
-        maxLines = Math.max(1, maxLines);
-        if (getMaxLines() > 0) {
-            maxLines = Math.min(getMaxLines(), maxLines);
-        }
-        if (maxLines != mMaxLinesForHeight) {
-            mMaxLinesForHeight = maxLines;
-            if (getLayout() != null && mMaxLinesForHeight != mLayoutMaxLines) {
-                // Invalidate layout.
-                mBlockLayouts = true;
-                setHint(getHint());
-                mBlockLayouts = false;
-            }
+        int availableHeight = MeasureSpec.getSize(heightMeasureSpec) - mPaddingTop - mPaddingBottom;
+        if (getLayout() != null && getLayout().getHeight() != availableHeight) {
+            // We've been measured before and the new size is different than before, lets make sure
+            // we reset the maximum lines, otherwise we may be cut short
+            mMaxLinesForHeight = -1;
+            nullLayouts();
         }
         super.onMeasure(widthMeasureSpec, heightMeasureSpec);
-    }
-
-    @Override
-    public void requestLayout() {
-        if (!mBlockLayouts) {
-            super.requestLayout();
+        Layout layout = getLayout();
+        if (layout.getHeight() > availableHeight) {
+            // With the existing layout, not all of our lines fit on the screen, let's find the
+            // first one that fits and ellipsize at that one.
+            int maxLines = layout.getLineCount() - 1;
+            while (maxLines > 1 && layout.getLineBottom(maxLines - 1) > availableHeight) {
+                maxLines--;
+            }
+            if (getMaxLines() > 0) {
+                maxLines = Math.min(getMaxLines(), maxLines);
+            }
+            // Only if the number of lines is different from the current layout, we recreate it.
+            if (maxLines != mLayoutMaxLines) {
+                mMaxLinesForHeight = maxLines;
+                nullLayouts();
+                super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+            }
         }
     }
 
@@ -157,7 +154,8 @@
             mResolvedDirection = layoutDirection;
             if (mIndentLines > 0) {
                 // Invalidate layout.
-                setHint(getHint());
+                nullLayouts();
+                requestLayout();
             }
         }
     }
@@ -175,7 +173,8 @@
         if (mIndentLines != lines) {
             mIndentLines = lines;
             // Invalidate layout.
-            setHint(getHint());
+            nullLayouts();
+            requestLayout();
             return true;
         }
         return false;
diff --git a/core/java/com/android/internal/widget/MessagingGroup.java b/core/java/com/android/internal/widget/MessagingGroup.java
index 3f73237..b9a8864 100644
--- a/core/java/com/android/internal/widget/MessagingGroup.java
+++ b/core/java/com/android/internal/widget/MessagingGroup.java
@@ -118,7 +118,8 @@
             ViewGroup parent = (ViewGroup) mSenderName.getParent();
             int top = getDistanceFromParent(mSenderName, parent) - getDistanceFromParent(
                     mMessageContainer, parent) + mSenderName.getHeight();
-            clipRect = new Rect(0, top, mDisplaySize.x, mDisplaySize.y);
+            int size = Math.max(mDisplaySize.x, mDisplaySize.y);
+            clipRect = new Rect(0, top, size, size);
         } else {
             clipRect = null;
         }
@@ -146,7 +147,7 @@
             setAvatar(sender.getIcon());
         }
         mAvatarView.setVisibility(VISIBLE);
-        mSenderName.setVisibility(VISIBLE);
+        mSenderName.setVisibility(TextUtils.isEmpty(nameOverride) ? GONE : VISIBLE);
         mTextColor = getNormalTextColor();
         mSendingTextColor = calculateSendingTextColor();
     }
@@ -275,9 +276,16 @@
         boolean hasNormal = false;
         for (int i = mMessageContainer.getChildCount() - 1; i >= 0; i--) {
             View child = mMessageContainer.getChildAt(i);
+            if (child.getVisibility() == GONE) {
+                continue;
+            }
             if (child instanceof MessagingLinearLayout.MessagingChild) {
                 int type = ((MessagingLinearLayout.MessagingChild) child).getMeasuredType();
-                if (type == MEASURED_TOO_SMALL) {
+                boolean tooSmall = type == MEASURED_TOO_SMALL;
+                final MessagingLinearLayout.LayoutParams lp =
+                        (MessagingLinearLayout.LayoutParams) child.getLayoutParams();
+                tooSmall |= lp.hide;
+                if (tooSmall) {
                     if (hasNormal) {
                         return MEASURED_SHORTENED;
                     } else {
diff --git a/core/java/com/android/internal/widget/MessagingLayout.java b/core/java/com/android/internal/widget/MessagingLayout.java
index df20e63..538ea11 100644
--- a/core/java/com/android/internal/widget/MessagingLayout.java
+++ b/core/java/com/android/internal/widget/MessagingLayout.java
@@ -110,7 +110,8 @@
         // We still want to clip, but only on the top, since views can temporarily out of bounds
         // during transitions.
         DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
-        Rect rect = new Rect(0, 0, displayMetrics.widthPixels, displayMetrics.heightPixels);
+        int size = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
+        Rect rect = new Rect(0, 0, size, size);
         mMessagingLinearLayout.setClipBounds(rect);
         mTitleView = findViewById(R.id.title);
         mAvatarSize = getResources().getDimensionPixelSize(R.dimen.messaging_avatar_size);
@@ -435,10 +436,29 @@
     }
 
     private void updateHistoricMessageVisibility() {
-        for (int i = 0; i < mHistoricMessages.size(); i++) {
+        int numHistoric = mHistoricMessages.size();
+        for (int i = 0; i < numHistoric; i++) {
             MessagingMessage existing = mHistoricMessages.get(i);
             existing.setVisibility(mShowHistoricMessages ? VISIBLE : GONE);
         }
+        int numGroups = mGroups.size();
+        for (int i = 0; i < numGroups; i++) {
+            MessagingGroup group = mGroups.get(i);
+            int visibleChildren = 0;
+            List<MessagingMessage> messages = group.getMessages();
+            int numGroupMessages = messages.size();
+            for (int j = 0; j < numGroupMessages; j++) {
+                MessagingMessage message = messages.get(j);
+                if (message.getVisibility() != GONE) {
+                    visibleChildren++;
+                }
+            }
+            if (visibleChildren > 0 && group.getVisibility() == GONE) {
+                group.setVisibility(VISIBLE);
+            } else if (visibleChildren == 0 && group.getVisibility() != GONE)   {
+                group.setVisibility(GONE);
+            }
+        }
     }
 
     @Override
diff --git a/core/java/com/android/internal/widget/MessagingMessage.java b/core/java/com/android/internal/widget/MessagingMessage.java
index f0b6068..ffcb503 100644
--- a/core/java/com/android/internal/widget/MessagingMessage.java
+++ b/core/java/com/android/internal/widget/MessagingMessage.java
@@ -73,7 +73,14 @@
         if (!Objects.equals(message.getSender(), ownMessage.getSender())) {
             return false;
         }
-        if (!Objects.equals(message.getTimestamp(), ownMessage.getTimestamp())) {
+        boolean hasRemoteInputHistoryChanged = message.isRemoteInputHistory()
+                != ownMessage.isRemoteInputHistory();
+        // When the remote input history has changed, we want to regard messages equal even when
+        // the timestamp changes. The main reason is that the message that the system inserts
+        // will have a different time set than the one that the app will update us with and we
+        // still want to reuse that message.
+        if (!hasRemoteInputHistoryChanged
+                && !Objects.equals(message.getTimestamp(), ownMessage.getTimestamp())) {
             return false;
         }
         if (!Objects.equals(message.getDataMimeType(), ownMessage.getDataMimeType())) {
@@ -82,9 +89,6 @@
         if (!Objects.equals(message.getDataUri(), ownMessage.getDataUri())) {
             return false;
         }
-        if (message.isRemoteInputHistory() != ownMessage.isRemoteInputHistory()) {
-            return false;
-        }
         return true;
     }
 
@@ -141,4 +145,6 @@
     MessagingMessageState getState();
 
     void setVisibility(int visibility);
+
+    int getVisibility();
 }
diff --git a/core/java/com/android/internal/widget/MessagingTextMessage.java b/core/java/com/android/internal/widget/MessagingTextMessage.java
index 794cc1d..219116e 100644
--- a/core/java/com/android/internal/widget/MessagingTextMessage.java
+++ b/core/java/com/android/internal/widget/MessagingTextMessage.java
@@ -105,7 +105,7 @@
     public int getMeasuredType() {
         boolean measuredTooSmall = getMeasuredHeight()
                 < getLayoutHeight() + getPaddingTop() + getPaddingBottom();
-        if (measuredTooSmall) {
+        if (measuredTooSmall && getLineCount() <= 1) {
             return MEASURED_TOO_SMALL;
         } else {
             Layout layout = getLayout();
diff --git a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
index 99d9839..c15b7ee 100644
--- a/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
+++ b/core/jni/com_android_internal_net_NetworkStatsFactory.cpp
@@ -205,37 +205,8 @@
     return 0;
 }
 
-static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, jstring path,
-                                  jint limitUid, jobjectArray limitIfacesObj, jint limitTag,
-                                  jboolean useBpfStats) {
-    ScopedUtfChars path8(env, path);
-    if (path8.c_str() == NULL) {
-        return -1;
-    }
-
-    std::vector<std::string> limitIfaces;
-    if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
-        int num = env->GetArrayLength(limitIfacesObj);
-        for (int i = 0; i < num; i++) {
-            jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
-            ScopedUtfChars string8(env, string);
-            if (string8.c_str() != NULL) {
-                limitIfaces.push_back(std::string(string8.c_str()));
-            }
-        }
-    }
-    std::vector<stats_line> lines;
-
-
-    if (useBpfStats) {
-        if (parseBpfNetworkStatsDetail(&lines, limitIfaces, limitTag, limitUid) < 0)
-            return -1;
-    } else {
-        if (legacyReadNetworkStatsDetail(&lines, limitIfaces, limitTag,
-                                         limitUid, path8.c_str()) < 0)
-            return -1;
-    }
-
+static int statsLinesToNetworkStats(JNIEnv* env, jclass clazz, jobject stats,
+                            std::vector<stats_line>& lines) {
     int size = lines.size();
 
     bool grow = size > env->GetIntField(stats, gNetworkStatsClassInfo.capacity);
@@ -308,14 +279,58 @@
         env->SetObjectField(stats, gNetworkStatsClassInfo.txPackets, txPackets.getJavaArray());
         env->SetObjectField(stats, gNetworkStatsClassInfo.operations, operations.getJavaArray());
     }
-
     return 0;
 }
 
+static int readNetworkStatsDetail(JNIEnv* env, jclass clazz, jobject stats, jstring path,
+                                  jint limitUid, jobjectArray limitIfacesObj, jint limitTag,
+                                  jboolean useBpfStats) {
+    ScopedUtfChars path8(env, path);
+    if (path8.c_str() == NULL) {
+        return -1;
+    }
+
+    std::vector<std::string> limitIfaces;
+    if (limitIfacesObj != NULL && env->GetArrayLength(limitIfacesObj) > 0) {
+        int num = env->GetArrayLength(limitIfacesObj);
+        for (int i = 0; i < num; i++) {
+            jstring string = (jstring)env->GetObjectArrayElement(limitIfacesObj, i);
+            ScopedUtfChars string8(env, string);
+            if (string8.c_str() != NULL) {
+                limitIfaces.push_back(std::string(string8.c_str()));
+            }
+        }
+    }
+    std::vector<stats_line> lines;
+
+
+    if (useBpfStats) {
+        if (parseBpfNetworkStatsDetail(&lines, limitIfaces, limitTag, limitUid) < 0)
+            return -1;
+    } else {
+        if (legacyReadNetworkStatsDetail(&lines, limitIfaces, limitTag,
+                                         limitUid, path8.c_str()) < 0)
+            return -1;
+    }
+
+    return statsLinesToNetworkStats(env, clazz, stats, lines);
+}
+
+static int readNetworkStatsDev(JNIEnv* env, jclass clazz, jobject stats) {
+    std::vector<stats_line> lines;
+
+    if (parseBpfNetworkStatsDev(&lines) < 0)
+            return -1;
+
+    return statsLinesToNetworkStats(env, clazz, stats, lines);
+}
+
 static const JNINativeMethod gMethods[] = {
         { "nativeReadNetworkStatsDetail",
                 "(Landroid/net/NetworkStats;Ljava/lang/String;I[Ljava/lang/String;IZ)I",
-                (void*) readNetworkStatsDetail }
+                (void*) readNetworkStatsDetail },
+        { "nativeReadNetworkStatsDev", "(Landroid/net/NetworkStats;)I",
+                (void*) readNetworkStatsDev },
 };
 
 int register_com_android_internal_net_NetworkStatsFactory(JNIEnv* env) {
diff --git a/core/proto/android/app/notification_channel.proto b/core/proto/android/app/notification_channel.proto
index 337aa1c..d3808e8 100644
--- a/core/proto/android/app/notification_channel.proto
+++ b/core/proto/android/app/notification_channel.proto
@@ -53,4 +53,5 @@
     optional android.media.AudioAttributesProto audio_attributes = 16;
     // If this is a blockable system notification channel.
     optional bool is_blockable_system = 17;
+    optional bool fg_service_shown = 18;
 }
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index 503bd21..64e1239 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -161,6 +161,7 @@
 
     optional CpuFreqProto cpu_freq = 2004 [
         (section).type = SECTION_FILE,
+        (section).device_specific = true,
         (section).args = "/sys/devices/system/cpu/cpufreq/all_time_in_state"
     ];
 
@@ -170,7 +171,8 @@
     ];
 
     optional BatteryTypeProto battery_type = 2006 [
-        (section).type = SECTION_NONE, // disabled since the path is device specific!
+        (section).type = SECTION_FILE,
+        (section).device_specific = true,
         (section).args = "/sys/class/power_supply/bms/battery_type"
     ];
 
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 8235507..1f8d43c 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -840,6 +840,77 @@
         android:protectionLevel="dangerous|instant" />
 
     <!-- ====================================================================== -->
+    <!-- Permissions for accessing the call log                                 -->
+    <!-- ====================================================================== -->
+    <eat-comment />
+
+    <!-- Used for permissions that are associated telephony features. -->
+    <permission-group android:name="android.permission-group.CALL_LOG"
+        android:icon="@drawable/perm_group_phone_calls"
+        android:label="@string/permgrouplab_calllog"
+        android:description="@string/permgroupdesc_calllog"
+        android:request="@string/permgrouprequest_calllog"
+        android:priority="450" />
+
+    <!-- Allows an application to access the IMS call service: making and
+         modifying a call
+        <p>Protection level: signature|privileged
+        @hide
+    -->
+    <permission android:name="android.permission.ACCESS_IMS_CALL_SERVICE"
+        android:label="@string/permlab_accessImsCallService"
+        android:description="@string/permdesc_accessImsCallService"
+        android:protectionLevel="signature|privileged" />
+
+    <!-- Allows an application to read the user's call log.
+         <p class="note"><strong>Note:</strong> If your app uses the
+         {@link #READ_CONTACTS} permission and <em>both</em> your <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
+         minSdkVersion}</a> and <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
+         targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
+         grants your app this permission. If you don't need this permission, be sure your <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
+         targetSdkVersion}</a> is 16 or higher.</p>
+         <p>Protection level: dangerous
+    -->
+    <permission android:name="android.permission.READ_CALL_LOG"
+        android:permissionGroup="android.permission-group.CALL_LOG"
+        android:label="@string/permlab_readCallLog"
+        android:description="@string/permdesc_readCallLog"
+        android:protectionLevel="dangerous" />
+
+    <!-- Allows an application to write (but not read) the user's
+         call log data.
+         <p class="note"><strong>Note:</strong> If your app uses the
+         {@link #WRITE_CONTACTS} permission and <em>both</em> your <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
+         minSdkVersion}</a> and <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
+         targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
+         grants your app this permission. If you don't need this permission, be sure your <a
+         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
+         targetSdkVersion}</a> is 16 or higher.</p>
+         <p>Protection level: dangerous
+    -->
+    <permission android:name="android.permission.WRITE_CALL_LOG"
+        android:permissionGroup="android.permission-group.CALL_LOG"
+        android:label="@string/permlab_writeCallLog"
+        android:description="@string/permdesc_writeCallLog"
+        android:protectionLevel="dangerous" />
+
+    <!-- Allows an application to see the number being dialed during an outgoing
+         call with the option to redirect the call to a different number or
+         abort the call altogether.
+         <p>Protection level: dangerous
+    -->
+    <permission android:name="android.permission.PROCESS_OUTGOING_CALLS"
+        android:permissionGroup="android.permission-group.CALL_LOG"
+        android:label="@string/permlab_processOutgoingCalls"
+        android:description="@string/permdesc_processOutgoingCalls"
+        android:protectionLevel="dangerous" />
+
+    <!-- ====================================================================== -->
     <!-- Permissions for accessing the device telephony                         -->
     <!-- ====================================================================== -->
     <eat-comment />
@@ -891,54 +962,6 @@
         android:description="@string/permdesc_callPhone"
         android:protectionLevel="dangerous" />
 
-    <!-- Allows an application to access the IMS call service: making and
-         modifying a call
-        <p>Protection level: signature|privileged
-        @hide
-    -->
-    <permission android:name="android.permission.ACCESS_IMS_CALL_SERVICE"
-        android:permissionGroup="android.permission-group.PHONE"
-        android:label="@string/permlab_accessImsCallService"
-        android:description="@string/permdesc_accessImsCallService"
-        android:protectionLevel="signature|privileged" />
-
-    <!-- Allows an application to read the user's call log.
-         <p class="note"><strong>Note:</strong> If your app uses the
-         {@link #READ_CONTACTS} permission and <em>both</em> your <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
-         minSdkVersion}</a> and <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
-         targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
-         grants your app this permission. If you don't need this permission, be sure your <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
-         targetSdkVersion}</a> is 16 or higher.</p>
-         <p>Protection level: dangerous
-    -->
-    <permission android:name="android.permission.READ_CALL_LOG"
-        android:permissionGroup="android.permission-group.PHONE"
-        android:label="@string/permlab_readCallLog"
-        android:description="@string/permdesc_readCallLog"
-        android:protectionLevel="dangerous" />
-
-    <!-- Allows an application to write (but not read) the user's
-         call log data.
-         <p class="note"><strong>Note:</strong> If your app uses the
-         {@link #WRITE_CONTACTS} permission and <em>both</em> your <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
-         minSdkVersion}</a> and <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
-         targetSdkVersion}</a> values are set to 15 or lower, the system implicitly
-         grants your app this permission. If you don't need this permission, be sure your <a
-         href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
-         targetSdkVersion}</a> is 16 or higher.</p>
-         <p>Protection level: dangerous
-    -->
-    <permission android:name="android.permission.WRITE_CALL_LOG"
-        android:permissionGroup="android.permission-group.PHONE"
-        android:label="@string/permlab_writeCallLog"
-        android:description="@string/permdesc_writeCallLog"
-        android:protectionLevel="dangerous" />
-
     <!-- Allows an application to add voicemails into the system.
          <p>Protection level: dangerous
     -->
@@ -957,18 +980,6 @@
         android:label="@string/permlab_use_sip"
         android:protectionLevel="dangerous"/>
 
-    <!-- Allows an application to see the number being dialed during an outgoing
-         call with the option to redirect the call to a different number or
-         abort the call altogether.
-         <p>Protection level: dangerous
-    -->
-    <permission android:name="android.permission.PROCESS_OUTGOING_CALLS"
-        android:permissionGroup="android.permission-group.PHONE"
-        android:label="@string/permlab_processOutgoingCalls"
-        android:description="@string/permdesc_processOutgoingCalls"
-        android:protectionLevel="dangerous" />
-
-
     <!-- Allows the app to answer an incoming phone call.
          <p>Protection level: dangerous
     -->
@@ -1458,6 +1469,12 @@
     <permission android:name="android.permission.MANAGE_WIFI_WHEN_PERMISSION_REVIEW_REQUIRED"
         android:protectionLevel="signature" />
 
+    <!-- #SystemApi @hide Allows an app to bypass Private DNS.
+         <p>Not for use by third-party applications.
+         TODO: publish as system API in next API release. -->
+    <permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS"
+        android:protectionLevel="signature" />
+
     <!-- ======================================= -->
     <!-- Permissions for short range, peripheral networks -->
     <!-- ======================================= -->
diff --git a/core/res/res/anim-ldrtl/cross_profile_apps_thumbnail_enter.xml b/core/res/res/anim-ldrtl/cross_profile_apps_thumbnail_enter.xml
new file mode 100644
index 0000000..6f3dc8c
--- /dev/null
+++ b/core/res/res/anim-ldrtl/cross_profile_apps_thumbnail_enter.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+<!-- This should be kept in sync with task_open_enter.xml -->
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+     android:shareInterpolator="false" android:zAdjustment="top">
+
+    <alpha
+        android:fromAlpha="1"
+        android:toAlpha="1.0"
+        android:fillEnabled="true"
+        android:fillBefore="true"
+        android:fillAfter="true"
+        android:interpolator="@interpolator/linear"
+        android:startOffset="67"
+        android:duration="217"/>
+
+    <translate
+        android:fromXDelta="-105%"
+        android:toXDelta="0"
+        android:fillEnabled="true"
+        android:fillBefore="true"
+        android:fillAfter="true"
+        android:interpolator="@interpolator/aggressive_ease"
+        android:startOffset="50"
+        android:duration="383"/>
+
+    <scale
+        android:fromXScale="1.0526"
+        android:toXScale="1"
+        android:fromYScale="1.0526"
+        android:toYScale="1"
+        android:pivotX="50%"
+        android:pivotY="50%"
+        android:fillEnabled="true"
+        android:fillBefore="true"
+        android:fillAfter="true"
+        android:interpolator="@interpolator/fast_out_slow_in"
+        android:duration="283"/>
+
+    <scale
+        android:fromXScale="0.95"
+        android:toXScale="1"
+        android:fromYScale="0.95"
+        android:toYScale="1"
+        android:pivotX="50%"
+        android:pivotY="50%"
+        android:fillEnabled="true"
+        android:fillBefore="true"
+        android:fillAfter="true"
+        android:interpolator="@interpolator/fast_out_slow_in"
+        android:startOffset="283"
+        android:duration="317"/>
+
+    <!-- To keep the thumbnail around longer and fade out the thumbnail -->
+    <alpha android:fromAlpha="1.0" android:toAlpha="0"
+           android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
+           android:interpolator="@interpolator/decelerate_quint"
+           android:startOffset="717"
+           android:duration="200"/>
+</set>
\ No newline at end of file
diff --git a/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml b/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
index 6f3dc8c..4c2559f 100644
--- a/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
+++ b/core/res/res/anim/cross_profile_apps_thumbnail_enter.xml
@@ -31,7 +31,7 @@
         android:duration="217"/>
 
     <translate
-        android:fromXDelta="-105%"
+        android:fromXDelta="105%"
         android:toXDelta="0"
         android:fillEnabled="true"
         android:fillBefore="true"
diff --git a/core/res/res/drawable/ic_dnd_block_notifications.xml b/core/res/res/drawable/ic_dnd_block_notifications.xml
new file mode 100644
index 0000000..4983614
--- /dev/null
+++ b/core/res/res/drawable/ic_dnd_block_notifications.xml
@@ -0,0 +1,30 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="40dp"
+        android:height="40dp"
+        android:viewportWidth="40.0"
+        android:viewportHeight="40.0">
+    <path
+        android:pathData="M34,20H2c-1.1,0 -2,-0.9 -2,-2V6c0,-1.1 0.9,-2 2,-2h32c1.1,0 2,0.9 2,2v12C36,19.1 35.1,20 34,20z"
+        android:fillColor="#FBBC04"/>
+    <path
+        android:pathData="M4.63,10L4.63,10c-0.83,0 -1.5,-0.67 -1.5,-1.5v0C3.12,7.67 3.8,7 4.62,7h0c0.82,0 1.5,0.67 1.5,1.5v0C6.12,9.33 5.45,10 4.63,10z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M8.62,7.5h9.5v2h-9.5z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M3.12,15h24v2h-24z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M3.12,12h17.5v2h-17.5z"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M33.59,6.41m-5.78,0a5.78,5.78 0,1 1,11.56 0a5.78,5.78 0,1 1,-11.56 0"
+        android:fillColor="#FFFFFF"/>
+    <path
+        android:pathData="M33.5,0C29.91,0 27,2.91 27,6.5s2.91,6.5 6.5,6.5S40,10.09 40,6.5S37.09,0 33.5,0zM33.5,11.7c-2.87,0 -5.2,-2.33 -5.2,-5.2s2.33,-5.2 5.2,-5.2s5.2,2.33 5.2,5.2S36.37,11.7 33.5,11.7z"
+        android:fillColor="#4285F4"/>
+    <path
+        android:pathData="M30.25,5.85h6.5v1.3h-6.5z"
+        android:fillColor="#4285F4"/>
+</vector>
diff --git a/core/res/res/layout/choose_account_row.xml b/core/res/res/layout/choose_account_row.xml
index 71537fb..81bca21 100644
--- a/core/res/res/layout/choose_account_row.xml
+++ b/core/res/res/layout/choose_account_row.xml
@@ -23,8 +23,8 @@
     android:orientation="horizontal" >
 
    <ImageView android:id="@+id/account_row_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
+        android:layout_width="?attr/listPreferredItemHeight"
+        android:layout_height="?attr/listPreferredItemHeight"
         android:paddingEnd="8dip" />
 
     <TextView xmlns:android="http://schemas.android.com/apk/res/android"
diff --git a/core/res/res/layout/magnifier.xml b/core/res/res/layout/magnifier.xml
deleted file mode 100644
index f3344c7..0000000
--- a/core/res/res/layout/magnifier.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ Copyright (C) 2017 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<LinearLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content">
-    <LinearLayout
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:id="@+id/magnifier_inner"
-        android:layout_width="@android:dimen/magnifier_width"
-        android:layout_height="@android:dimen/magnifier_height"
-        android:elevation="@android:dimen/magnifier_elevation"
-        android:background="?android:attr/floatingToolbarPopupBackgroundDrawable"
-        android:scaleType="fitXY">
-        <ImageView
-            android:id="@+id/magnifier_image"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent" />
-    </LinearLayout>
-</LinearLayout>
diff --git a/core/res/res/layout/notification_material_reply_text.xml b/core/res/res/layout/notification_material_reply_text.xml
index dbf2dd0..71632a2 100644
--- a/core/res/res/layout/notification_material_reply_text.xml
+++ b/core/res/res/layout/notification_material_reply_text.xml
@@ -56,7 +56,6 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="horizontal"
-            android:layout_marginStart="@dimen/notification_content_margin_start"
             android:layout_marginEnd="@dimen/notification_content_margin_end">
         <TextView
                 android:id="@+id/notification_material_reply_text_1"
@@ -72,7 +71,6 @@
             android:layout_height="@dimen/messaging_group_sending_progress_size"
             android:layout_width="@dimen/messaging_group_sending_progress_size"
             android:layout_marginStart="@dimen/notification_content_margin_start"
-            android:layout_marginEnd="@dimen/notification_content_margin_end"
             android:layout_gravity="center"
             android:indeterminate="true"
             style="?android:attr/progressBarStyleSmall" />
diff --git a/core/res/res/layout/notification_template_material_big_text.xml b/core/res/res/layout/notification_template_material_big_text.xml
index d1861d9..26eb4e7 100644
--- a/core/res/res/layout/notification_template_material_big_text.xml
+++ b/core/res/res/layout/notification_template_material_big_text.xml
@@ -24,7 +24,7 @@
     >
     <include layout="@layout/notification_template_header" />
 
-    <LinearLayout
+    <com.android.internal.widget.RemeasuringLinearLayout
             android:id="@+id/notification_action_list_margin_target"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
@@ -34,7 +34,7 @@
             android:clipToPadding="false"
             android:orientation="vertical">
 
-        <LinearLayout
+        <com.android.internal.widget.RemeasuringLinearLayout
             android:id="@+id/notification_main_column"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -62,7 +62,7 @@
                 android:visibility="gone"
                 android:textAlignment="viewStart"
                 />
-        </LinearLayout>
+        </com.android.internal.widget.RemeasuringLinearLayout>
 
         <ViewStub android:layout="@layout/notification_material_reply_text"
                 android:id="@+id/notification_material_reply_container"
@@ -75,6 +75,6 @@
                 android:layout_marginEnd="@dimen/notification_content_margin_end"
                 android:layout_marginTop="@dimen/notification_content_margin" />
         <include layout="@layout/notification_material_action_list" />
-    </LinearLayout>
+    </com.android.internal.widget.RemeasuringLinearLayout>
     <include layout="@layout/notification_template_right_icon" />
 </FrameLayout>
diff --git a/core/res/res/layout/notification_template_messaging_group.xml b/core/res/res/layout/notification_template_messaging_group.xml
index 9bdc495..0717d96 100644
--- a/core/res/res/layout/notification_template_messaging_group.xml
+++ b/core/res/res/layout/notification_template_messaging_group.xml
@@ -36,14 +36,14 @@
             android:id="@+id/message_name"
             style="@style/Widget.Material.Notification.MessagingName"
             android:layout_width="wrap_content"
+            android:textAlignment="viewStart"
         />
         <com.android.internal.widget.MessagingLinearLayout
             android:id="@+id/group_message_container"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/notification_text_margin_top"
-            android:spacing="2dp"
-            android:layout_weight="1"/>
+            android:spacing="2dp"/>
     </com.android.internal.widget.RemeasuringLinearLayout>
     <FrameLayout
         android:id="@+id/messaging_group_icon_container"
diff --git a/core/res/res/layout/notification_template_messaging_text_message.xml b/core/res/res/layout/notification_template_messaging_text_message.xml
index e728e69..3611186 100644
--- a/core/res/res/layout/notification_template_messaging_text_message.xml
+++ b/core/res/res/layout/notification_template_messaging_text_message.xml
@@ -17,5 +17,6 @@
 <com.android.internal.widget.MessagingTextMessage
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/message_text"
+    android:textAlignment="viewStart"
     style="@style/Widget.Material.Notification.MessagingText"
 />
diff --git a/core/res/res/values-af/strings.xml b/core/res/res/values-af/strings.xml
index 42c04a5..e62466c 100644
--- a/core/res/res/values-af/strings.xml
+++ b/core/res/res/values-af/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"foto\'s en video te neem"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Laat &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; toe om foto\'s te neem en video\'s op te neem?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Foon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"foonoproepe te maak en te bestuur"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Laat &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; toe om foonoproepe te maak en te bestuur?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Wenk: Dubbeltik om in en uit te zoem."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Outovul"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Stel outovul op"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Outovul met <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-am/strings.xml b/core/res/res/values-am/strings.xml
index e8ccdab..3d7a92d 100644
--- a/core/res/res/values-am/strings.xml
+++ b/core/res/res/values-am/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ካሜራ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ስዕሎች ያንሱ እና ቪዲዮ ይቅረጹ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ስዕሎችን እንዲያነሳ እና ቪዲዮን እንዲቀርጽ ይፈቀድለት?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ስልክ"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"የስልክ ጥሪዎች ያድርጉ እና ያስተዳድሩ"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; የስልክ ጥሪዎችን እንዲያደርግ እና እንዲያቀናብር ይፈቀድለት?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ጠቃሚ ምክር፦ ለማጉላት እና ለማሳነስ ሁለቴ-መታ አድርግ።"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ራስ ሙላ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"በራስ ሰር ሙላ አዘጋጅ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"በ<xliff:g id="SERVICENAME">%1$s</xliff:g> በራስ-ሙላ"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">"፣ "</string>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 6fac276..20cf515 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -303,6 +303,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"الكاميرا"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"التقاط صور وتسجيل فيديو"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"‏هل تريد السماح لتطبيق &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; بالتقاط الصور وتسجيل الفيديو؟"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"الهاتف"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"إجراء مكالمات هاتفية وإدارتها"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"‏هل تريد السماح لتطبيق &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; بإجراء المكالمات الهاتفية وإدارتها؟"</string>
@@ -772,12 +778,12 @@
     <string name="lockscreen_sim_puk_locked_instructions" msgid="8127916255245181063">"راجع دليل المستخدم أو اتصل بخدمة العملاء."</string>
     <string name="lockscreen_sim_locked_message" msgid="8066660129206001039">"‏شريحة SIM مؤمّنة."</string>
     <string name="lockscreen_sim_unlock_progress_dialog_message" msgid="595323214052881264">"‏جارٍ إلغاء تأمين شريحة SIM…"</string>
-    <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6481623830344107222">"لقد رسمت نقش إلغاء التأمين بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة.\n\nيُرجى إعادة المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
+    <string name="lockscreen_too_many_failed_attempts_dialog_message" msgid="6481623830344107222">"لقد رسمت نقش فتح القفل بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة.\n\nيُرجى إعادة المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
     <string name="lockscreen_too_many_failed_password_attempts_dialog_message" msgid="2725973286239344555">"لقد كتبت كلمة المرور <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة بشكل غير صحيح. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
     <string name="lockscreen_too_many_failed_pin_attempts_dialog_message" msgid="6216672706545696955">"‏لقد كتبت رمز PIN <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة بشكل غير صحيح. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
-    <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"‏لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات تسجيل الدخول إلى Google.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="lockscreen_failed_attempts_almost_glogin" product="tablet" msgid="9191611984625460820">"‏لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات تسجيل الدخول إلى Google.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
     <string name="lockscreen_failed_attempts_almost_glogin" product="tv" msgid="5316664559603394684">"‏لديك <xliff:g id="NUMBER_0">%1$d</xliff:g> من محاولات رسم نقش إلغاء القفل غير الصحيحة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، سيُطلب منك إلغاء قفل التلفزيون من خلال تسجيل الدخول إلى Google.\n\n يمكنك إعادة التجربة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
-    <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"‏لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام معلومات تسجيل الدخول إلى Google.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="lockscreen_failed_attempts_almost_glogin" product="default" msgid="2590227559763762751">"‏لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام معلومات تسجيل الدخول إلى Google.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tablet" msgid="6128106399745755604">"لقد حاولت إلغاء تأمين الجهاز اللوحي <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة، ستتم إعادة تعيين الجهاز اللوحي إلى الإعدادات الأساسية وسيتم فقد جميع بيانات المستخدم."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="tv" msgid="950408382418270260">"لديك <xliff:g id="NUMBER_0">%1$d</xliff:g> من محاولات إلغاء قفل التلفزيون غير الصحيحة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة ضبط التلفزيون على الإعدادات الأساسية وستفقد جميع بيانات المستخدم."</string>
     <string name="lockscreen_failed_attempts_almost_at_wipe" product="default" msgid="8603565142156826565">"لقد حاولت إلغاء تأمين الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة، ستتم إعادة تعيين الهاتف إلى الإعدادات الأساسية وسيتم فقد جميع بيانات المستخدم."</string>
@@ -848,8 +854,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"نصيحة: اضغط مرتين للتكبير والتصغير."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ملء تلقائي"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"إعداد الملء التلقائي"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"الملء التلقائي من خلال <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">"، "</string>
@@ -1632,16 +1637,16 @@
     <string name="kg_login_checking_password" msgid="1052685197710252395">"جارٍ فحص الحساب…"</string>
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8276745642049502550">"‏لقد كتبت رمز PIN بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
     <string name="kg_too_many_failed_password_attempts_dialog_message" msgid="7813713389422226531">"لقد كتبت كلمة المرور بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
-    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"لقد رسمت نقش إلغاء التأمين بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
+    <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="74089475965050805">"لقد رسمت نقش فتح القفل بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="1575557200627128949">"لقد حاولت إلغاء تأمين الجهاز اللوحي بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة تعيين الجهاز اللوحي على الإعدادات الأساسية وسيتم فقد جميع بيانات المستخدم."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tv" msgid="5621231220154419413">"لديك <xliff:g id="NUMBER_0">%1$d</xliff:g> من محاولات إلغاء قفل التلفزيون غير الصحيحة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة ضبط التلفزيون على الإعدادات الأساسية وستفقد جميع بيانات المستخدم."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="4051015943038199910">"لقد حاولت إلغاء تأمين الهاتف بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستتم إعادة تعيين الهاتف على الإعدادات الأساسية وسيتم فقد جميع بيانات المستخدم."</string>
     <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="2072996269148483637">"لقد حاولت إلغاء تأمين الجهاز اللوحي بشكل غير صحيح <xliff:g id="NUMBER">%d</xliff:g> مرة. سيتم الآن إعادة تعيين الجهاز اللوحي على الإعدادات الأساسية."</string>
     <string name="kg_failed_attempts_now_wiping" product="tv" msgid="4987878286750741463">"لديك <xliff:g id="NUMBER">%d</xliff:g> من محاولات إلغاء قفل التلفزيون غير الصحيحة. ستتم الآن إعادة ضبط التلفزيون على الإعدادات الأساسية."</string>
     <string name="kg_failed_attempts_now_wiping" product="default" msgid="4817627474419471518">"لقد حاولت إلغاء تأمين الهاتف بشكل غير صحيح <xliff:g id="NUMBER">%d</xliff:g> مرة. سيتم الآن إعادة تعيين الهاتف على الإعدادات الأساسية."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
     <string name="kg_failed_attempts_almost_at_login" product="tv" msgid="4224651132862313471">"لقد رسمت نقش إلغاء القفل بشكل غير صحيح عدد <xliff:g id="NUMBER_0">%1$d</xliff:g> من المرات. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة، سيُطلب منك إلغاء قفل التلفزيون باستخدام حساب بريد إلكتروني.\n\n يمكنك إعادة التجربة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
     <string name="kg_text_message_separator" product="default" msgid="4160700433287233771">" — "</string>
     <string name="kg_reordering_delete_drop_target_text" msgid="7899202978204438708">"إزالة"</string>
     <string name="safe_media_volume_warning" product="default" msgid="2276318909314492312">"هل تريد رفع مستوى الصوت فوق المستوى الموصى به؟\n\nقد يضر سماع صوت عالٍ لفترات طويلة بسمعك."</string>
diff --git a/core/res/res/values-as/strings.xml b/core/res/res/values-as/strings.xml
index f3d71df..7071858 100644
--- a/core/res/res/values-as/strings.xml
+++ b/core/res/res/values-as/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"কেমেৰা"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ফট\' তুলিব আৰু ভিডিঅ\' ৰেকৰ্ড কৰিব পাৰে"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ক ছবি তুলিবলৈ আৰু ভিডিঅ\' ৰেকৰ্ড কৰিবলৈ অনুমতি দিবনে?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ফ’ন"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ফ\'ন কল কৰিব আৰু পৰিচলনা কৰিব পাৰে"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ক ফ\'ন কল কৰিবলৈ আৰু পৰিচালনা কৰিবলৈ অনুমতি দিবনে?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"পৰামৰ্শ: জুম ইন আৰু আউট কৰিবলৈ দুবাৰ টিপক৷"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"স্বয়ংপূৰ্তি"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"স্বয়ংপূৰ্তি ছেট আপ কৰক"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g>ৰ জৰিয়তে স্বয়ংক্ৰিয়ভাৱে পূৰ্ণ কৰা সুবিধা"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1691,8 +1696,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"আপোনাৰ প্ৰশাসকে ইনষ্টল কৰিছে"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"আপোনাৰ প্ৰশাসকে আপেডট কৰিছে"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"আপোনাৰ প্ৰশাসকে মচিছে"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"আপোনাৰ বেটাৰিৰ অৱস্থা উন্নত কৰিবলৈ বেটাৰি সঞ্চয়কাৰীয়ে ডিভাইচৰ কিছুমান সুবিধা অফ কৰে আৰু এপসমূহক সীমিত কৰে। "<annotation id="url">"অধিক জানক"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"আপোনাৰ বেটাৰিৰ অৱস্থা উন্নত কৰিবলৈ বেটাৰি সঞ্চয়কাৰীয়ে ডিভাইচৰ কিছুমান সুবিধা অফ কৰে আৰু এপসমূহক সীমিত কৰে।"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ডেটা ব্য়ৱহাৰ মাত্ৰা কম কৰিবৰ বাবে ডেটা সঞ্চয়কাৰীয়ে কিছুমান এপক নেপথ্য়ত ডেটা প্ৰেৰণ বা সংগ্ৰহ কৰাত বাধা প্ৰদান কৰে। আপুনি বৰ্তমান ব্য়ৱহাৰ কৰি থকা এটা এপে ডেটা ব্য়ৱহাৰ কৰিব পাৰে, কিন্তু সঘনাই এই কার্য কৰিব নোৱাৰিব পাৰে। ইয়াৰ অৰ্থ এইয়ে হ\'ব পাৰে যে, উদাহৰণস্বৰূপে, আপুনি নিটিপা পর্যন্ত প্ৰতিচ্ছবিসমূহ দেখুওৱা নহ\'ব।"</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ডেটা সঞ্চয়কাৰী অন কৰিবনে?"</string>
diff --git a/core/res/res/values-az/strings.xml b/core/res/res/values-az/strings.xml
index 2cd405d..5a4fb04 100644
--- a/core/res/res/values-az/strings.xml
+++ b/core/res/res/values-az/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"şəkil çəkin və video yazın"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tətbiqinə şəkil və video çəkmək icazəsi verilsin?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefon zəngləri edin və onları idarə edin"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tətbiqinə telefon zəngləri etmək və onları idarə etmək icazəsi verilsin?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Məsləhət: Böyütmək və kiçiltmək üçün iki dəfə tıklayın."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Avtodoldurma"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"AvtoDoldurmanı ayarla"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ilə avtomatik daxil etmə"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-b+sr+Latn/strings.xml b/core/res/res/values-b+sr+Latn/strings.xml
index d4bdc20..3096c1d 100644
--- a/core/res/res/values-b+sr+Latn/strings.xml
+++ b/core/res/res/values-b+sr+Latn/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"snima slike i video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Želite li da omogućite da &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; snima slike i video snimke?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"upućuje telefonske pozive i upravlja njima"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Želite li da omogućite da &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; upućuje pozive i upravlja njima?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Savet: Dodirnite dvaput da biste uvećali i umanjili prikaz."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autom. pop."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Podeš. aut. pop."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatski popunjava <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-be/strings.xml b/core/res/res/values-be/strings.xml
index 598523c..bd95fd4 100644
--- a/core/res/res/values-be/strings.xml
+++ b/core/res/res/values-be/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"рабіць фатаздымкі і запісваць відэа"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Дазволіць праграме &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; рабіць фота і запісваць відэа?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Тэлефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"рабіць тэлефонныя выклікі і кіраваць імі"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Дазволіць праграме &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; рабіць тэлефонныя выклікі і кіраваць імі?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Падказка: двойчы націсніце, каб павялічыць або паменшыць."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Аўтазапаўненне"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Усталяванне аўтазапаўнення"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Аўтазапаўненне з дапамогай сэрвісу \"<xliff:g id="SERVICENAME">%1$s</xliff:g>\""</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index af6c1c0..23f4017 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"да прави снимки и записва видеоклипове"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Да се разреши ли на &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; да прави снимки и да записва видеоклипове?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"да извършва телефонни обаждания и да ги управлява"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Да се разреши ли на &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; да извършва и управлява телефонни обаждания?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Съвет: Докоснете двукратно, за да увеличите или намалите мащаба."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Автопоп."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Автопоп.: Настройка"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Автоматично попълване с/ъс <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-bn/strings.xml b/core/res/res/values-bn/strings.xml
index b3c1955..7a2a73b 100644
--- a/core/res/res/values-bn/strings.xml
+++ b/core/res/res/values-bn/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ক্যামেরা"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ছবি তোলা এবং ভিডিও রেকর্ড"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-কে ফটো তুলতে এবং ভিডিও রেকর্ড করতে দেবেন?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ফোন"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ফোন কলগুলি এবং পরিচালনা"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-কে কল করতে এবং কল পরিচালনা করতে দেবেন?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"টিপ: জুম বাড়ানো ও কমানোর জন্য দুইবার আলতো চাপুন৷"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"স্বতঃপূর্ণ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"স্বতঃপূর্ণ সেট করুন"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> দিয়ে অটোফিল করুন"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$১$২$৩"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"আপনার প্রশাসক ইনস্টল করেছেন"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"আপনার প্রশাসক আপডেট করেছেন"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"আপনার প্রশাসক মুছে দিয়েছেন"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"আপনার ডিভাইসের চার্জ যাতে তাড়াতাড়ি শেষ না হয়ে যায় তার জন্য ব্যাটারি সেভার ডিভাইসের কিছু বৈশিষ্ট্যকে বন্ধ করে দেয় এবং অ্যাপের কাজকর্মকে সীমাবদ্ধ করে।"<annotation id="url">"আরও জানুন"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"আপনার ডিভাইসের চার্জ যাতে তাড়াতাড়ি শেষ না হয়ে যায় তার জন্য ব্যাটারি সেভার ডিভাইসের কিছু বৈশিষ্ট্যকে বন্ধ করে দেয় এবং অ্যাপের কাজকর্মকে সীমাবদ্ধ করে।"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ডেটার ব্যবহার কমাতে সহায়তা করার জন্য, ডেটা সেভার ব্যাকগ্রাউন্ডে কিছু অ্যাপ্লিকেশনকে ডেটা পাঠাতে বা গ্রহণ করতে বাধা দেয়৷ আপনি বর্তমানে এমন একটি অ্যাপ্লিকেশন ব্যবহার করছেন যেটি ডেটা অ্যাক্সেস করতে পারে, তবে সেটি কমই করে৷ এর ফলে যা হতে পারে, উদাহরণস্বরূপ, আপনি ছবির উপর ট্যাপ না করা পর্যন্ত সেগুলি দেখানো হবে না৷"</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ডেটা সেভার চালু করবেন?"</string>
diff --git a/core/res/res/values-bs/strings.xml b/core/res/res/values-bs/strings.xml
index eede788..790fa21 100644
--- a/core/res/res/values-bs/strings.xml
+++ b/core/res/res/values-bs/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"slika i snima videozapise"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Dozvoliti aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; snimanje slika i videozapisa?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"poziva i upravlja pozivima"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Dozvoliti aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uspostavljanje poziva i njihovo upravljanje?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Savjet: Dodirnite ekran dva puta za uvećanje ili smanjenje prikaza."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autofill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Podesite Autofill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatsko popunjavanje koje pruža usluga <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1382,7 +1387,7 @@
     <string name="vpn_lockdown_connecting" msgid="6443438964440960745">"Povezivanje na uvijek aktivni VPN…"</string>
     <string name="vpn_lockdown_connected" msgid="8202679674819213931">"Povezan na uvijek aktivni VPN"</string>
     <string name="vpn_lockdown_disconnected" msgid="735805531187559719">"Prekinuta je veza s uvijek uključenim VPN-om"</string>
-    <string name="vpn_lockdown_error" msgid="3133844445659711681">"Ne može se povezati na stalno uključen VPN"</string>
+    <string name="vpn_lockdown_error" msgid="3133844445659711681">"Povezivanje na stalno uključen VPN nije uspjelo na stalno uključen VPN"</string>
     <string name="vpn_lockdown_config" msgid="8151951501116759194">"Promijenite postavke mreže ili VPN-a"</string>
     <string name="upload_file" msgid="2897957172366730416">"Odabir fajla"</string>
     <string name="no_file_chosen" msgid="6363648562170759465">"Nije izabran nijedan fajl"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index 5979a2b..4c408d8 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -121,16 +121,16 @@
     <string name="roamingText11" msgid="4154476854426920970">"Bàner d\'itinerància activat"</string>
     <string name="roamingText12" msgid="1189071119992726320">"Bàner d\'itinerància desactivat"</string>
     <string name="roamingTextSearching" msgid="8360141885972279963">"S\'està cercant el servei"</string>
-    <string name="wfcRegErrorTitle" msgid="3855061241207182194">"No s\'ha pogut configurar la funció Trucades per Wi-Fi"</string>
+    <string name="wfcRegErrorTitle" msgid="3855061241207182194">"No s\'han pogut configurar les trucades per Wi-Fi"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
     <item msgid="3910386316304772394">"Per fer trucades i enviar missatges per Wi-Fi, primer has de demanar a l\'operador de telefonia mòbil que configuri aquest servei. Després, torna a activar les trucades per Wi-Fi a Configuració. (Codi d\'error: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
-    <item msgid="7372514042696663278">"Hi ha hagut un problema en registrar la funció Trucades per Wi-Fi amb el teu operador de telefonia mòbil: <xliff:g id="CODE">%1$s</xliff:g>"</item>
+    <item msgid="7372514042696663278">"Hi ha hagut un problema en registrar les trucades per Wi-Fi amb el teu operador de telefonia mòbil: <xliff:g id="CODE">%1$s</xliff:g>"</item>
   </string-array>
   <string-array name="wfcSpnFormats">
     <item msgid="6830082633573257149">"%s"</item>
-    <item msgid="4397097370387921767">"Trucada de Wi-Fi de: %s"</item>
+    <item msgid="4397097370387921767">"Trucades per Wi-Fi %s"</item>
   </string-array>
     <string name="wifi_calling_off_summary" msgid="8720659586041656098">"Desactivat"</string>
     <string name="wfc_mode_wifi_preferred_summary" msgid="1994113411286935263">"Preferència per a la Wi-Fi"</string>
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Càmera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fer fotos i vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vols permetre que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; faci fotos i vídeos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telèfon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"fer i gestionar trucades telefòniques"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vols permetre que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; faci trucades i les gestioni?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Consell: Pica dos cops per ampliar i per reduir."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Em. aut."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. empl. aut."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Emplenament automàtic amb <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 3e26d93..e8deca5 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparát"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"pořizování fotografií a nahrávání videa"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Povolit aplikaci &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; fotit a nahrávat video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"uskutečňování a spravování telefonních hovorů"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Povolit aplikaci &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uskutečňovat a spravovat telefonní hovory?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: Dvojitým klepnutím můžete zobrazení přiblížit nebo oddálit."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Aut.vyp."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Nastav aut. vyp."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatické vyplňování pomocí služby <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 8fd7d77..c18f376 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -45,10 +45,10 @@
     <string name="badPin" msgid="9015277645546710014">"Den gamle pinkode, som du har indtastet, er ikke korrekt."</string>
     <string name="badPuk" msgid="5487257647081132201">"Den indtastede PUK-kode er forkert."</string>
     <string name="mismatchPin" msgid="609379054496863419">"De indtastede pinkoder er ikke ens"</string>
-    <string name="invalidPin" msgid="3850018445187475377">"Indtast en pinkode på mellem 4 og 8 tal."</string>
+    <string name="invalidPin" msgid="3850018445187475377">"Angiv en pinkode på mellem 4 og 8 tal."</string>
     <string name="invalidPuk" msgid="8761456210898036513">"Angiv en PUK-kode på 8 eller flere cifre."</string>
-    <string name="needPuk" msgid="919668385956251611">"Dit SIM-kort er låst med PUK-koden. Indtast PUK-koden for at låse den op."</string>
-    <string name="needPuk2" msgid="4526033371987193070">"Indtast PUK2-koden for at låse op for SIM-kortet."</string>
+    <string name="needPuk" msgid="919668385956251611">"Dit SIM-kort er låst med PUK-koden. Angiv PUK-koden for at låse den op."</string>
+    <string name="needPuk2" msgid="4526033371987193070">"Angiv PUK2-koden for at låse op for SIM-kortet."</string>
     <string name="enablePin" msgid="209412020907207950">"Mislykkedes. Aktivér SIM-/RUIM-lås."</string>
     <plurals name="pinpuk_attempts" formatted="false" msgid="1251012001539225582">
       <item quantity="one">Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver låst.</item>
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tage billeder og optage video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vil du give &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tilladelse til at tage billeder og optage video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"foretage og administrere telefonopkald"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vil du give &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tilladelse til at foretage og administrere telefonopkald?"</string>
@@ -717,13 +723,13 @@
     <string name="sipAddressTypeWork" msgid="6920725730797099047">"Arbejde"</string>
     <string name="sipAddressTypeOther" msgid="4408436162950119849">"Andet"</string>
     <string name="quick_contacts_not_available" msgid="746098007828579688">"Der blev ikke fundet nogen applikation, som kan vise denne kontaktperson."</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Indtast pinkode"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"Indtast PUK- og pinkode"</string>
+    <string name="keyguard_password_enter_pin_code" msgid="3037685796058495017">"Angiv pinkode"</string>
+    <string name="keyguard_password_enter_puk_code" msgid="4800725266925845333">"Angiv PUK- og pinkode"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="1341112146710087048">"PUK-kode"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="8027680321614196258">"Ny pinkode"</string>
     <string name="keyguard_password_entry_touch_hint" msgid="2644215452200037944"><font size="17">"Tryk for at skrive adgangskode"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Indtast adgangskoden for at låse op"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Indtast pinkode for at låse op"</string>
+    <string name="keyguard_password_enter_password_code" msgid="1054721668279049780">"Angiv adgangskoden for at låse op"</string>
+    <string name="keyguard_password_enter_pin_password_code" msgid="6391755146112503443">"Angiv pinkode for at låse op"</string>
     <string name="keyguard_password_wrong_pin_code" msgid="2422225591006134936">"Forkert pinkode."</string>
     <string name="keyguard_label_text" msgid="861796461028298424">"Tryk på Menu og dernæst på 0 for at låse op."</string>
     <string name="emergency_call_dialog_number_for_display" msgid="696192103195090970">"Nødnummer"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip! Dobbeltklik for at zoome ind eller ud."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autofyld"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Konfigurer Autofyld"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Udfyld automatisk med <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1514,17 +1519,17 @@
       <item quantity="other">Prøv igen om <xliff:g id="NUMBER">%d</xliff:g> sekunder.</item>
     </plurals>
     <string name="kg_pattern_instructions" msgid="398978611683075868">"Tegn dit mønster"</string>
-    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Indtast pinkode til SIM-kort"</string>
-    <string name="kg_pin_instructions" msgid="2377242233495111557">"Indtast pinkode"</string>
+    <string name="kg_sim_pin_instructions" msgid="2319508550934557331">"Angiv pinkode til SIM-kort"</string>
+    <string name="kg_pin_instructions" msgid="2377242233495111557">"Angiv pinkode"</string>
     <string name="kg_password_instructions" msgid="5753646556186936819">"Angiv adgangskode"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Indtast den ønskede pinkode"</string>
+    <string name="kg_puk_enter_puk_hint" msgid="453227143861735537">"SIM-kortet er nu deaktiveret. Angiv PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
+    <string name="kg_puk_enter_pin_hint" msgid="7871604527429602024">"Angiv den ønskede pinkode"</string>
     <string name="kg_enter_confirm_pin_hint" msgid="325676184762529976">"Bekræft den ønskede pinkode"</string>
     <string name="kg_sim_unlock_progress_dialog_message" msgid="8950398016976865762">"SIM-kortet låses op…"</string>
     <string name="kg_password_wrong_pin_code" msgid="1139324887413846912">"Forkert pinkode."</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Indtast en pinkode på mellem 4 og 8 tal."</string>
+    <string name="kg_invalid_sim_pin_hint" msgid="8795159358110620001">"Angiv en pinkode på mellem 4 og 8 tal."</string>
     <string name="kg_invalid_sim_puk_hint" msgid="6025069204539532000">"PUK-koden skal være på 8 tal."</string>
-    <string name="kg_invalid_puk" msgid="3638289409676051243">"Indtast den korrekte PUK-kode. Gentagne forsøg vil permanent deaktivere SIM-kortet."</string>
+    <string name="kg_invalid_puk" msgid="3638289409676051243">"Angiv den korrekte PUK-kode. Gentagne forsøg vil permanent deaktivere SIM-kortet."</string>
     <string name="kg_invalid_confirm_pin_hint" product="default" msgid="7003469261464593516">"Pinkoderne stemmer ikke overens"</string>
     <string name="kg_login_too_many_attempts" msgid="6486842094005698475">"For mange forsøg på at tegne mønstret korrekt"</string>
     <string name="kg_login_instructions" msgid="1100551261265506448">"Lås op ved at logge ind med din Google-konto."</string>
@@ -1657,8 +1662,8 @@
     <string name="reason_service_unavailable" msgid="7824008732243903268">"Udskrivningstjenesten er ikke aktiveret"</string>
     <string name="print_service_installed_title" msgid="2246317169444081628">"Tjenesten <xliff:g id="NAME">%s</xliff:g> er installeret"</string>
     <string name="print_service_installed_message" msgid="5897362931070459152">"Tryk for at aktivere"</string>
-    <string name="restr_pin_enter_admin_pin" msgid="8641662909467236832">"Indtast administratorpinkoden"</string>
-    <string name="restr_pin_enter_pin" msgid="3395953421368476103">"Indtast pinkode"</string>
+    <string name="restr_pin_enter_admin_pin" msgid="8641662909467236832">"Angiv administratorpinkoden"</string>
+    <string name="restr_pin_enter_pin" msgid="3395953421368476103">"Angiv pinkode"</string>
     <string name="restr_pin_incorrect" msgid="8571512003955077924">"Forkert"</string>
     <string name="restr_pin_enter_old_pin" msgid="1462206225512910757">"Aktuel pinkode:"</string>
     <string name="restr_pin_enter_new_pin" msgid="5959606691619959184">"Ny pinkode"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 0911fdc..32d9ea92 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"Bilder und Videos aufnehmen"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; erlauben, Bilder und Videos aufzunehmen?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"Telefonanrufe tätigen und verwalten"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; erlauben, Anrufe zu tätigen und zu verwalten?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tipp: Zum Vergrößern und Verkleinern doppeltippen"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"AutoFill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"AutoFill konfig."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Mit <xliff:g id="SERVICENAME">%1$s</xliff:g> automatisch ausfüllen"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 6212884..868323e 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Κάμερα"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"γίνεται λήψη φωτογραφιών και εγγραφή βίντεο"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Να επιτρέπεται στην εφαρμογή &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; η λήψη φωτογραφιών και η εγγραφή βίντεο;"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Τηλέφωνο"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"πραγματοποιεί και να διαχειρίζεται τηλ/κές κλήσεις"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Να επιτρέπεται στην εφαρμογή &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; η πραγματοποίηση και η διαχείριση τηλεφωνικών κλήσεων;"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Συμβουλή: Πατήστε δύο φορές για μεγέθυνση και σμίκρυνση."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Αυτόματη συμπλήρωση"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Ρύθμ.αυτ.συμπλ."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Αυτόματη συμπλήρωση με την υπηρεσία <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-en-rAU/strings.xml b/core/res/res/values-en-rAU/strings.xml
index 2c900c8..ae441b6 100644
--- a/core/res/res/values-en-rAU/strings.xml
+++ b/core/res/res/values-en-rAU/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"take pictures and record video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to take pictures and record video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telephone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"make and manage phone calls"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to make and manage phone calls?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: double-tap to zoom in and out."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Auto-fill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Set up Auto-fill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofill with <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-en-rCA/strings.xml b/core/res/res/values-en-rCA/strings.xml
index 384c0a6..caad05c 100644
--- a/core/res/res/values-en-rCA/strings.xml
+++ b/core/res/res/values-en-rCA/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"take pictures and record video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to take pictures and record video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telephone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"make and manage phone calls"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to make and manage phone calls?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: double-tap to zoom in and out."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Auto-fill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Set up Auto-fill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofill with <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 2c900c8..ae441b6 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"take pictures and record video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to take pictures and record video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telephone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"make and manage phone calls"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to make and manage phone calls?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: double-tap to zoom in and out."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Auto-fill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Set up Auto-fill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofill with <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-en-rIN/strings.xml b/core/res/res/values-en-rIN/strings.xml
index 2c900c8..ae441b6 100644
--- a/core/res/res/values-en-rIN/strings.xml
+++ b/core/res/res/values-en-rIN/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"take pictures and record video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to take pictures and record video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telephone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"make and manage phone calls"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Allow &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; to make and manage phone calls?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: double-tap to zoom in and out."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Auto-fill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Set up Auto-fill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofill with <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-en-rXC/strings.xml b/core/res/res/values-en-rXC/strings.xml
index fe3959f..25e7cd1 100644
--- a/core/res/res/values-en-rXC/strings.xml
+++ b/core/res/res/values-en-rXC/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‎‏‏‏‎‎‏‎‏‎‏‏‎‎‏‏‏‎‎‏‏‏‏‏‎‏‏‎‏‏‏‏‎‏‏‎‏‏‏‎‎‎‎‏‎‎‏‎‎‏‏‏‏‎‏‏‏‎Camera‎‏‎‎‏‎"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‏‏‎‏‎‎‎‏‏‏‎‎‎‏‏‏‏‏‏‎‎‎‎‎‎‏‎‏‏‏‎‏‏‎‏‏‏‎‎‏‎‎‎‏‏‎‏‎‎‏‏‏‏‏‎‎‏‎‎‎‎take pictures and record video‎‏‎‎‏‎"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‏‏‎‎‏‎‎‎‎‎‏‎‎‏‏‏‏‎‏‏‏‏‏‏‎‎‎‎‏‏‏‏‏‎‎‎‏‎‎‏‏‎‏‏‏‎‏‏‎‎‏‎‏‏‎‏‎‎‏‏‎‎‎Allow &lt;b&gt;‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎&lt;/b&gt; to take pictures and record video?‎‏‎‎‏‎"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‎‎‏‎‎‎‏‏‎‎‎‏‏‎‎‏‏‏‏‎‏‏‏‏‏‎‏‏‏‏‎‎‏‎‎‎‎‎‎‏‎‎‏‎‎‎‏‎‎‏‎‎‎‏‏‎Phone‎‏‎‎‏‎"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‏‎‏‏‎‏‎‎‎‎‏‎‎‎‏‏‎‏‎‏‎‎‎‎‎‎‏‎‏‎‎‎‎‏‎‎‏‏‏‎‏‏‏‏‏‏‎‏‎‎‎‏‏‎‎‎‏‏‏‏‏‎make and manage phone calls‎‏‎‎‏‎"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‏‏‎‏‎‎‏‏‏‎‏‎‏‏‎‏‏‎‏‏‏‎‎‏‏‎‎‎‏‎‏‎‏‎‏‏‎‏‏‏‏‎‎‏‎‏‏‎‏‎Allow &lt;b&gt;‎‏‎‎‏‏‎<xliff:g id="APP_NAME">%1$s</xliff:g>‎‏‎‎‏‏‏‎&lt;/b&gt; to make and manage phone calls?‎‏‎‎‏‎"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index f8012f7..60652cc 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Cámara"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tomar fotografías y grabar videos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"¿Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tome fotos y grabe videos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Teléfono"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"realizar y administrar llamadas telefónicas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"¿Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; haga y administre las llamadas telefónicas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Consejo: Toca dos veces para acercar y alejar la imagen."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autocompletar"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. Autocompl."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autocompletar con <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index 6a2dacd..9413b3e 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Cámara"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"hacer fotos y grabar vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"¿Quieres permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; haga fotos y grabe vídeos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Teléfono"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"hacer y administrar llamadas telefónicas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"¿Quieres permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; haga y gestione llamadas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Sugerencia: toca dos veces para ampliar o reducir el contenido."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autocompletar"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Configurar Autocompletar"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autocompletar con <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1691,7 +1696,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"Instalado por el administrador"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"Actualizado por el administrador"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"Eliminado por el administrador"</string>
-    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"Para aumentar la duración de la batería, el ahorro de batería desactiva algunas funciones del dispositivo y limita aplicaciones. "<annotation id="url">"Más información"</annotation></string>
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"Para aumentar la duración de la batería, Ahorro de batería desactiva algunas funciones del dispositivo y limita aplicaciones. "<annotation id="url">"Más información"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"Para aumentar la duración de la batería, el ahorro de batería desactiva algunas funciones del dispositivo y limita aplicaciones."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"El ahorro de datos evita que algunas aplicaciones envíen o reciban datos en segundo plano, lo que permite reducir el uso de datos. Una aplicación activa podrá acceder a los datos, aunque con menos frecuencia. Esto significa que, por ejemplo, algunas imágenes no se mostrarán hasta que las toques."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"¿Activar ahorro de datos?"</string>
diff --git a/core/res/res/values-et/strings.xml b/core/res/res/values-et/strings.xml
index 1fbfa69..2cf33c1 100644
--- a/core/res/res/values-et/strings.xml
+++ b/core/res/res/values-et/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kaamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"pildistamine ja video salvestamine"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Kas lubada rakendusel &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; jäädvustada pilte ja salvestada videoid?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"helistamine ja telefonikõnede haldamine"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Kas lubada rakendusel &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; teha ja hallata telefonikõnesid?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Vihje: suurendamiseks ja vähendamiseks puudutage kaks korda."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Automaatne täitmine"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Automaatse täitmise seadistamine"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automaatne täitmine teenusega <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-eu/strings.xml b/core/res/res/values-eu/strings.xml
index 426af39..d27b461 100644
--- a/core/res/res/values-eu/strings.xml
+++ b/core/res/res/values-eu/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"atera argazkiak eta grabatu bideoak"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; aplikazioari argazkiak ateratzea eta bideoak grabatzea baimendu nahi diozu?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefonoa"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"egin eta kudeatu telefono-deiak"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; aplikazioari telefono-deiak egitea eta kudeatzea baimendu nahi diozu?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Aholkua: sakatu birritan handitzeko edo txikitzeko."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Betetze automatikoa"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Konfiguratu betetze automatikoa"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Bete automatikoki <xliff:g id="SERVICENAME">%1$s</xliff:g> erabiliz"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index fab0f0c..2865f3a 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"دوربین"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"عکس گرفتن و فیلم‌برداری"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"‏به &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; اجازه داده شود عکس بگیرد و ویدیو ضبط کند؟"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"تلفن"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"برقراری و مدیریت تماس‌های تلفنی"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"‏به &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;b&gt; اجازه داده شود تماس‌های تلفنی برقرار کند و آن‌ها را مدیریت کند؟"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"نکته: برای بزرگ‌نمایی و کوچک‌نمایی، دو بار ضربه بزنید."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"تکمیل خودکار"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"راه‌اندازی تکمیل خودکار"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"تکمیل خودکار با <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">"، "</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index e1008b0..9c94ffc 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ottaa kuvia ja videoita"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Saako &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ottaa kuvia ja nauhoittaa videoita?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Puhelin"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"soittaa ja hallinnoida puheluita"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Saako &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; soittaa ja hallinnoida puheluita?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Vinkki: lähennä ja loitonna kaksoisnapauttamalla."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Aut. täyttö"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Määritä autom. täyttö"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automaattinen täyttö: <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 72c182e..e077b5f 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Appareil photo"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"prendre des photos et filmer des vidéos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Autoriser « <xliff:g id="APP_NAME">%1$s</xliff:g> » à prendre des photos et à filmer des vidéos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Téléphone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"faire et gérer des appels téléphoniques"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Autoriser « <xliff:g id="APP_NAME">%1$s</xliff:g> » à faire et à gérer les appels téléphoniques?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Conseil : Appuyez deux fois pour faire un zoom avant ou arrière."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Saisie auto"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. saisie auto"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Remplissage automatique avec <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index b70a03d..c62d8f6 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Appareil photo"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"prendre des photos et enregistrer des vidéos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permettre à &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; de prendre des photos et de filmer des vidéos ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Téléphone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"effectuer et gérer des appels téléphoniques"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Permettre à &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; de passer et gérer des appels téléphoniques ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Conseil : Appuyez deux fois pour faire un zoom avant ou arrière."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Saisie auto"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. saisie auto"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Saisie automatique avec <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-gl/strings.xml b/core/res/res/values-gl/strings.xml
index c151cf2..120517d 100644
--- a/core/res/res/values-gl/strings.xml
+++ b/core/res/res/values-gl/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Cámara"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tirar fotos e gravar vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Queres permitir que a aplicación &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; realice fotos e grave vídeos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Teléfono"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"facer e xestionar chamadas telefónicas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Queres permitir que a aplicación &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; realice e xestione chamadas telefónicas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Consello: Toca dúas veces para achegar e afastar o zoom."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Encher"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. autocompletar"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autocompletar con <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-gu/strings.xml b/core/res/res/values-gu/strings.xml
index 7bdd796..9373ff0 100644
--- a/core/res/res/values-gu/strings.xml
+++ b/core/res/res/values-gu/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"કૅમેરો"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ચિત્રો લેવાની અને વીડિઓ રેકોર્ડ કરવાની"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ને ચિત્રો લેવાની અને વીડિઓ રેકૉર્ડ કરવાની મંજૂરી આપીએ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ફોન"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ફોન કૉલ કરો અને સંચાલિત કરો"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ને ફોન કૉલ કરવાની અને તેને મેનેજ કરવાની મંજૂરી આપીએ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ટિપ: ઝૂમ વધારવા અને ઘટાડવા માટે બે વાર ટેપ કરો."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"સ્વતઃભરણ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"સ્વતઃભરણ સેટ કરો"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> સાથે આપમેળે ભરો"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"તમારા વ્યવસ્થાપક દ્વારા ઇન્સ્ટૉલ કરવામાં આવેલ છે"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"તમારા વ્યવસ્થાપક દ્વારા અપડેટ કરવામાં આવેલ છે"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"તમારા વ્યવસ્થાપક દ્વારા કાઢી નાખવામાં આવેલ છે"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"તમારી બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર ઉપકરણની અમુક સુવિધાઓ બંધ કરે છે અને અમુક ઍપને પ્રતિબંધિત કરે છે. "<annotation id="url">"વધુ જાણો"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"તમારી બૅટરીની આવરદા વધારવા માટે, બૅટરી સેવર ઉપકરણની અમુક સુવિધાઓ બંધ કરે છે અને અમુક ઍપને નિયંત્રિત કરે છે."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ડેટા વપરાશને ઘટાડવામાં સહાય માટે, ડેટા સેવર કેટલીક ઍપ્લિકેશનોને પૃષ્ઠભૂમિમાં ડેટા મોકલવા અથવા પ્રાપ્ત કરવાથી અટકાવે છે. તમે હાલમાં ઉપયોગ કરી રહ્યાં છો તે ઍપ્લિકેશન ડેટાને ઍક્સેસ કરી શકે છે, પરંતુ તે આ ક્યારેક જ કરી શકે છે. આનો અર્થ એ હોઈ શકે છે, ઉદાહરણ તરીકે, છબીઓ ત્યાં સુધી પ્રદર્શિત થશે નહીં જ્યાં સુધી તમે તેને ટૅપ નહીં કરો."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ડેટા સેવર ચાલુ કરીએ?"</string>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index ba7e9fe..74fb7b4 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"कैमरा"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"चित्र लेने और वीडियो रिकॉर्ड करने"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; को फ़ोटो खींचने और वीडियो रिकॉर्ड करने की अनुमति देना चाहते हैं?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"फ़ोन"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"फ़ोन कॉल करें और प्रबंधित करें"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; को फ़ोन कॉल करने और उन्हें प्रबंधित करने की अनुमति देना चाहते हैं?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"सलाह: ज़ूम इन और आउट करने के लिए दो बार छूएं."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"स्‍वत: भरण"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"स्वत: भरण सेट करें"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> के साथ अपने आप जानकारी भरने की सुविधा"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1691,8 +1696,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"आपके व्यवस्थापक ने इंस्टॉल किया है"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"आपके व्यवस्थापक ने अपडेट किया है"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"आपके व्यवस्थापक ने हटा दिया है"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"अापके डिवाइस की बैटरी लाइफ़ बढ़ाने के लिए बैटरी सेवर, डिवाइस की कुछ सुविधाओं को बंद कर देता है और ऐप्लिकेशन को बैटरी इस्तेमाल करने से रोकता है. "<annotation id="url">"ज़्यादा जानें"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"अापके डिवाइस की बैटरी लाइफ़ बढ़ाने के लिए बैटरी सेवर, डिवाइस की कुछ सुविधाओं को बंद कर देता है और ऐप्लिकेशन को बैटरी इस्तेमाल करने से रोकता है."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"डेटा खर्च, कम करने के लिए डेटा सेवर कुछ ऐप्लिकेशन को बैकग्राउंड में डेटा भेजने या डेटा पाने से रोकता है. आप फ़िलहाल जिस एेप्लिकेशन का इस्तेमाल कर रहे हैं वह डेटा तक पहुंच सकता है लेकिन ऐसा कभी-कभी ही हो पाएगा. उदाहरण के लिए, इमेज तब तक दिखाई नहीं देंगी जब तक कि आप उन्हें टैप नहीं करते."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"डेटा बचाने की सेटिंग चालू करें?"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index 9ab10e4..8d6ef5e 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparat"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"snimati fotografije i videozapise"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Želite li dopustiti aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; da snima fotografije i videozapise?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"uspostavljati telefonske pozive i upravljati njima"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Želite li dopustiti aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; da upućuje telefonske pozive i upravlja njima?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Savjet: Dvaput dotaknite za povećavanje i smanjivanje."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Aut.pop."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Post. Auto. pop."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatsko popunjavanje koje pruža usluga <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 5c05163..f56af6b 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fényképezőgép"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotók és videók készítése"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Engedélyezi a(z) &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; számára, hogy képeket és videókat készíthessen?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefonhívások kezdeményezése és kezelése"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Engedélyezi a(z) &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; számára, hogy hívásokat indíthasson és kezelhessen?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tipp: érintse meg kétszer a nagyításhoz és kicsinyítéshez."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Kitöltés"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Kitöltés beáll."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatikus kitöltés ezzel: <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-hy/strings.xml b/core/res/res/values-hy/strings.xml
index 5d93ea8..44b4788 100644
--- a/core/res/res/values-hy/strings.xml
+++ b/core/res/res/values-hy/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Տեսախցիկ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"լուսանկարել և տեսագրել"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Թույլ տա՞լ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; հավելվածին լուսանկարել և տեսանկարել:"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Հեռախոս"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"կատարել զանգեր և կառավարել զանգերը"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Թույլ տա՞լ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; հավելվածին կատարել հեռախոսազանգեր և կառավարել դրանք:"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Հուշակ` կրկնակի հպեք` մեծացնելու և փոքրացնելու համար:"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Ինքնալրացում"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Դնել ինքնալրացում"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ինքնալրացում"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index b79a210..eaffb6e 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"mengambil gambar dan merekam video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Izinkan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; mengambil gambar dan merekam video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telepon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"melakukan dan mengelola panggilan telepon"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Izinkan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; melakukan dan mengelola panggilan telepon?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Kiat: Tap dua kali untuk memperbesar dan memperkecil."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"IsiOtomatis"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Siapkan Pengisian Otomatis"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"IsiOtomatis dengan <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">"  "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-is/strings.xml b/core/res/res/values-is/strings.xml
index de05f3a..9c10370 100644
--- a/core/res/res/values-is/strings.xml
+++ b/core/res/res/values-is/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Myndavél"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"taka myndir og taka upp myndskeið"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Viltu leyfa &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; að taka myndir og myndskeið?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Sími"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"hringja og stjórna símtölum"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Viltu leyfa &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; að hringja og stjórna símtölum?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Ábending: Ýttu tvisvar til að auka og minnka aðdrátt."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Fylla út"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Stilla útfyllingu"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Sjálfvirk útfylling með <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index 31e5a99..d4ddd50 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotocamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"scattare foto e registrare video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Consentire a &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; di scattare foto e registrare video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefono"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"eseguire e gestire le telefonate"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Consentire a &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; di effettuare e gestire telefonate?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Suggerimento. Tocca due volte per aumentare e diminuire lo zoom."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Compilazione autom."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Compilaz. autom."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Compilazione automatica <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 87ce083..9cc77cb 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"מצלמה"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"צילום תמונות והקלטת וידאו"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"‏לתת לאפליקציה &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; הרשאה לצלם תמונות וסרטונים?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"טלפון"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"התקשרות וניהול של שיחות טלפון"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"‏לתת לאפליקציה &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; הרשאה להתקשרות ולניהול של שיחות טלפון?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"טיפ: הקש פעמיים כדי להגדיל ולהקטין."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"מילוי אוטומטי"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"הגדר מילוי אוטומטי"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"מילוי אוטומטי באמצעות <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1741,8 +1746,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"הותקנה על ידי מנהל המערכת"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"עודכנה על ידי מנהל המערכת"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"נמחקה על ידי מנהל המערכת"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"כדי להאריך את חיי הסוללה, מצב החיסכון בסוללה מכבה תכונות מסוימות במכשיר ומגביל אפליקציות. "<annotation id="url">"מידע נוסף"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"כדי להאריך את חיי הסוללה, מצב החיסכון בסוללה מכבה תכונות מסוימות במכשיר ומגביל אפליקציות."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"‏כדי לסייע בהפחתת השימוש בנתונים, חוסך הנתונים (Data Saver) מונע מאפליקציות מסוימות שליחה או קבלה של נתונים ברקע. אפליקציה שבה אתה משתמש כרגע יכולה לגשת לנתונים, אבל בתדירות נמוכה יותר. משמעות הדבר היא, למשל, שתמונות יוצגו רק לאחר שתקיש עליהן."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"‏האם להפעיל את חוסך הנתונים (Data Saver)?"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index 3b1a3c3..1ee5cd9 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"カメラ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"写真と動画の撮影"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"写真と動画の撮影を &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; に許可しますか?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"電話"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"電話の発信と管理"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"電話の発信と管理を &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; に許可しますか?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ヒント: ダブルタップで拡大/縮小できます。"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"自動入力"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"自動入力を設定"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> で自動入力"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$3$2$1"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">"、 "</string>
diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml
index 5c6a1011..a736caa 100644
--- a/core/res/res/values-ka/strings.xml
+++ b/core/res/res/values-ka/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"კამერა"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ფოტოებისა და ვიდეოების გადაღება"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"გსურთ, მიანიჭოთ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>-ს&lt;/b&gt; სურათების გადაღების და ვიდეოების ჩაწერის ნებართვა?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ტელეფონი"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"სატელეფონო ზარების განხორციელება და მართვა"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"გსურთ, მიანიჭოთ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>-ს&lt;/b&gt; სატელეფონო ზარების განხორციელების და მართვის ნებართვა?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"რჩევა: მასშტაბის შესაცვლელად გამოიყენეთ ორმაგი შეხება."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ავტოშევსება"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ავტოშევსების დაყენება"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"ავტომატური შევსება <xliff:g id="SERVICENAME">%1$s</xliff:g>-ით"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-kk/strings.xml b/core/res/res/values-kk/strings.xml
index 8c26513..24a9034 100644
--- a/core/res/res/values-kk/strings.xml
+++ b/core/res/res/values-kk/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"суретке түсіріп, бейне жазу"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; қолданбасына суретке түсіруге және бейне жазуға рұқсат берілсін бе?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"қоңырау шалу және телефон қоңырауларын басқару"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; қолданбасына қоңыраулар шалуға және басқаруға рұқсат берілсін бе?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Кеңес: Ұлғайту немесе кішірейту үшін екі рет түртіңіз."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Aвто толтыру"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Автотолтыруды орнату"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> арқылы автотолтыру"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-km/strings.xml b/core/res/res/values-km/strings.xml
index 77cceab..ac641dd 100644
--- a/core/res/res/values-km/strings.xml
+++ b/core/res/res/values-km/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"កាមេរ៉ា"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ថតរូប និងថតវីដេអូ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"អនុញ្ញាតឱ្យ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ថតរូប និងថត​វីដេអូ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ទូរសព្ទ"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ហៅទូរស័ព្ទ និងគ្រប់គ្រងការហៅទូរស័ព្ទ"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"អនុញ្ញាតឱ្យ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; គ្រប់គ្រង និង​ធ្វើការហៅទូរសព្ទ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ជំនួយ៖ ប៉ះ​ពីរ​ដង ដើម្បី​ពង្រីក និង​បង្រួម។"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"បំពេញ​ស្វ័យ​ប្រវត្តិ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"រៀបចំ​ការ​បំពេញ​ស្វ័យ​ប្រវត្តិ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"បំពេញ​ដោយ​ស្វ័យ​ប្រវត្តិ​តាមរយៈ <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 0b26eaa..9123c71 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ಕ್ಯಾಮರಾ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ಚಿತ್ರಗಳನ್ನು ತೆಗೆಯಲು, ವೀಡಿಯೊ ರೆಕಾರ್ಡ್ ಮಾಡಲು"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"ಚಿತ್ರಗಳನ್ನು ಸೆರೆಹಿಡಿಯಲು ಮತ್ತು ವೀಡಿಯೊ ರೆಕಾರ್ಡ್‌ ಮಾಡಲು &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ಫೋನ್"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ಫೋನ್ ಕರೆ ಮಾಡಲು ಹಾಗೂ ನಿರ್ವಹಿಸಲು"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"ಫೋನ್ ಕರೆಗಳನ್ನು ಮಾಡಲು ಮತ್ತು ನಿರ್ವಹಿಸಲು &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ಸಲಹೆ: ಝೂಮ್ ಇನ್ ಮತ್ತು ಝೂಮ್ ಔಟ್ ಮಾಡಲು ಡಬಲ್-ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ಸ್ವಯಂತುಂಬುವಿಕೆ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ಸ್ವಯಂತುಂಬುವಿಕೆಯನ್ನು ಹೊಂದಿಸಿ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ನೊಂದಿಗೆ ಸ್ವಯಂ-ಭರ್ತಿ"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಸ್ಥಾಪಿಸಿದ್ದಾರೆ"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"ನಿಮ್ಮ ನಿರ್ವಾಹಕರಿಂದ ಅಪ್‌ಡೇಟ್ ಮಾಡಲ್ಪಟ್ಟಿದೆ"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"ನಿಮ್ಮ ನಿರ್ವಾಹಕರು ಅಳಿಸಿದ್ದಾರೆ"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"ನಿಮ್ಮ ಬ್ಯಾಟರಿ ಅವಧಿಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಉಳಿಸುವಿಕೆ ಕೆಲವು ಸಾಧನ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಮತ್ತು ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ನಿರ್ಬಂಧಿಸುತ್ತದೆ. "<annotation id="url">"ಇನ್ನಷ್ಟು ತಿಳಿಯಿರಿ"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"ನಿಮ್ಮ ಬ್ಯಾಟರಿ ಅವಧಿಯನ್ನು ವಿಸ್ತರಿಸಲು, ಬ್ಯಾಟರಿ ಉಳಿಸುವಿಕೆ ಕೆಲವು ಸಾಧನ ವೈಶಿಷ್ಟ್ಯಗಳನ್ನು ಆಫ್ ಮಾಡುತ್ತದೆ ಮತ್ತು ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ನಿರ್ಬಂಧಿಸುತ್ತದೆ."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ಡೇಟಾ ಬಳಕೆ ಕಡಿಮೆ ಮಾಡುವ ನಿಟ್ಟಿನಲ್ಲಿ, ಡೇಟಾ ಸೇವರ್ ಕೆಲವು ಅಪ್ಲಿಕೇಶನ್‌ಗಳು ಹಿನ್ನೆಲೆಯಲ್ಲಿ ಡೇಟಾ ಕಳುಹಿಸುವುದನ್ನು ಅಥವಾ ಸ್ವೀಕರಿಸುವುದನ್ನು ತಡೆಯುತ್ತದೆ. ನೀವು ಪ್ರಸ್ತುತ ಬಳಸುತ್ತಿರುವ ಅಪ್ಲಿಕೇಶನ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಬಹುದು ಆದರೆ ಪದೇ ಪದೇ ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಾಗುವುದಿಲ್ಲ. ಇದರರ್ಥ, ಉದಾಹರಣೆಗೆ, ನೀವು ಅವುಗಳನ್ನು ಟ್ಯಾಪ್ ಮಾಡುವವರೆಗೆ ಆ ಚಿತ್ರಗಳು ಕಾಣಿಸಿಕೊಳ್ಳುವುದಿಲ್ಲ."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ಡೇಟಾ ಉಳಿಸುವಿಕೆಯನ್ನು ಆನ್ ಮಾಡುವುದೇ?"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 182814f..7c9ed6d 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"카메라"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"사진 및 동영상 촬영"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;에서 사진을 촬영하고 동영상을 녹화하도록 허용하시겠습니까?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"전화"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"전화 걸기 및 관리"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;에서 전화를 걸고 관리하도록 허용하시겠습니까?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"도움말: 확대/축소하려면 두 번 탭합니다."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"자동완성"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"자동완성 설정..."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> 자동 완성"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$3$2$1"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index 8ce2b09..dc515ea0 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"сүрөт жана видео тартууга"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; колдонмосуна сүрөттөрдү тартып, видеолорду жаздырууга уруксат берилсинби?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"телефон чалуу жана аларды башкаруу"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; колдонмосуна телефон чалууга жана чалууларды башкарууга уруксат берилсинби?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Кыйытма: Чоңойтуп-кичирейтиш үчүн эки жолу басыңыз."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Авто-толтуруу"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Автотолтурууну тууралоо"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> менен автотолтуруу"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-lo/strings.xml b/core/res/res/values-lo/strings.xml
index f1c2e03..4f8f734 100644
--- a/core/res/res/values-lo/strings.xml
+++ b/core/res/res/values-lo/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ກ້ອງ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ຖ່າຍ​ຮູບ ແລະ​ບັນ​ທຶກວິ​ດີ​ໂອ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"ອະນຸຍາດ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ໃຫ້ຖ່າຍຮູບ ແລະ ບັນທຶກວິດີໂອບໍ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ໂທລະສັບ"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ໂທ ແລະ​ຈັດ​ການ​ການ​ໂທ​ລະ​ສັບ"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"ອະນຸຍາດ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ໃຫ້ໂທ ແລະ ຈັດການການໂທບໍ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ເຄັດລັບ: ແຕະສອງຄັ້ງເພື່ອຊູມເຂົ້າ ແລະຊູມອອກ."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ຕື່ມຂໍ້ມູນອັດຕະໂນມັດ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ຕັ້ງການຕື່ມຂໍ້ມູນອັດຕະໂນມັດ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"ຕື່ມຂໍ້ມູນອັດຕະໂນມັດດ້ວຍ <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index ff2c5cc..1cb3275 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparatas"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotografuoti ir filmuoti"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Leisti &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; fotografuoti ir įrašyti vaizdo įrašus?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefonas"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"skambinti ir tvarkyti telefonų skambučius"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Leisti &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; skambinti ir tvarkyti telefono skambučius?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Patarimas: palieskite dukart, kad padidintumėte ar sumažintumėte mastelį."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Automatinis pildymas"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Nust. aut. pild."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatinis pildymas naudojant „<xliff:g id="SERVICENAME">%1$s</xliff:g>“"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index 7b2f34e..b7b4a8f 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"uzņemt attēlus un ierakstīt videoklipus"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vai atļaut lietotnei &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uzņemt fotoattēlus un ierakstīt videoklipus?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Tālrunis"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"veikt un pārvaldīt tālruņa zvanus"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vai atļaut lietotnei &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; veikt un pārvaldīt tālruņa zvanus?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Padoms. Divreiz pieskarieties, lai tuvinātu un tālinātu."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Automātiskā aizpilde"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Iest. aut. aizp."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automātiskā aizpildīšana, izmantojot pakalpojumu <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-mcc405/config.xml b/core/res/res/values-mcc405/config.xml
index 6b77e9c..4cadef7 100644
--- a/core/res/res/values-mcc405/config.xml
+++ b/core/res/res/values-mcc405/config.xml
@@ -20,4 +20,6 @@
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <!-- Whether camera shutter sound is forced or not  (country specific). -->
     <bool name="config_camera_sound_forced">true</bool>
+    <!-- Show area update info settings in CellBroadcastReceiver and information in SIM status in Settings app -->
+    <bool name="config_showAreaUpdateInfoSettings">true</bool>
 </resources>
diff --git a/core/res/res/values-mk/strings.xml b/core/res/res/values-mk/strings.xml
index e543a36..ea0233f 100644
--- a/core/res/res/values-mk/strings.xml
+++ b/core/res/res/values-mk/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"фотографира и снима видео"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Дали да се дозволи &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; да фотографира и да снима видео?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"упатува и управува со телефонски повици"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Дали да се дозволи &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; да повикува и да управува со телефонските повици?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Совет: допри двапати за да зумираш и да одзумираш."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Автоматско пополнување"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Постави „Автоматско пополнување“"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Автоматско пополнување со <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ml/strings.xml b/core/res/res/values-ml/strings.xml
index 50467d3..4fe5451 100644
--- a/core/res/res/values-ml/strings.xml
+++ b/core/res/res/values-ml/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ക്യാമറ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ചിത്രങ്ങളെടുത്ത് വീഡിയോ റെക്കോർഡുചെയ്യുക"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"ചിത്രം എടുക്കാനും വീഡിയോ റെക്കോർഡ് ചെയ്യാനും &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ആപ്പിനെ അനുവദിക്കണോ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ഫോണ്‍"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ഫോൺ വിളിക്കുകയും നിയന്ത്രിക്കുകയും ചെയ്യുക"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"ഫോൺ കോളുകൾ ചെയ്യാനും അവ നിയന്ത്രിക്കാനും &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ആപ്പിനെ അനുവദിക്കണോ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"നുറുങ്ങ്: സൂം ഇൻ ചെയ്യാനും സൂം ഔട്ട് ചെയ്യാനും ഇരട്ട-ടാപ്പുചെയ്യുക."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ഓട്ടോഫിൽ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ഓട്ടോഫിൽ സജ്ജീകരിക്കുക"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ഉപയോഗിച്ച് സ്വമേധയാ പൂരിപ്പിക്കുക"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"നിങ്ങളുടെ അഡ്‌മിൻ ഇൻസ്റ്റാൾ ചെയ്യുന്നത്"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"നിങ്ങളുടെ അഡ്‌മിൻ അപ്‌ഡേറ്റ് ചെയ്യുന്നത്"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"നിങ്ങളുടെ അഡ്‌മിൻ ഇല്ലാതാക്കുന്നത്"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"നിങ്ങളുടെ ബാറ്ററി ലൈഫ് ദീർഘിപ്പിക്കാൻ, ബാറ്ററി ലാഭിക്കൽ, ചില ഉപകരണ ഫീച്ചറുകളെ ഓഫാക്കുകയും ആപ്പുകളെ പരിമിതപ്പെടുത്തുകയും ചെയ്യുന്നു. "<annotation id="url">"കൂടുതലറിയുക"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"നിങ്ങളുടെ ബാറ്ററി ലൈഫ് ദീർഘിപ്പിക്കാൻ, ബാറ്ററി ലാഭിക്കൽ, ചില ഉപകരണ ഫീച്ചറുകളെ ഓഫാക്കുകയും ആപ്പുകളെ നിയന്ത്രിക്കുകയും ചെയ്യുന്നു.‌"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ഡാറ്റാ ഉപയോഗം കുറയ്ക്കാൻ സഹായിക്കുന്നതിന്, പശ്ചാത്തലത്തിൽ ഡാറ്റ അയയ്ക്കുകയോ സ്വീകരിക്കുകയോ ചെയ്യുന്നതിൽ നിന്ന് ചില ആപ്‌സിനെ ഡാറ്റ സേവർ തടയുന്നു. നിങ്ങൾ നിലവിൽ ഉപയോഗിക്കുന്ന ഒരു ആപ്പിന് ഡാറ്റ ആക്സസ്സ് ചെയ്യാൻ കഴിയും, എന്നാൽ കുറഞ്ഞ ആവൃത്തിയിലാണിത് നടക്കുക. ഇതിനർത്ഥം, ഉദാഹരണമായി നിങ്ങൾ ടാപ്പ് ചെയ്യുന്നത് വരെ ചിത്രങ്ങൾ പ്രദ‍‍‍ർശിപ്പിക്കുകയില്ല എന്നാണ്."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ഡാറ്റ സേവർ ഓണാക്കണോ?"</string>
diff --git a/core/res/res/values-mn/strings.xml b/core/res/res/values-mn/strings.xml
index 24d3dfc..1dedd93 100644
--- a/core/res/res/values-mn/strings.xml
+++ b/core/res/res/values-mn/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камер"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"зураг авах, бичлэг хийх"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-д зураг авах, видео хийхийг зөвшөөрөх үү?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Утас"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"утасны дуудлага хийх, дуудлага удирдах"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;-д утасны дуудлага хийх, дуудлагад хариулахыг зөвшөөрөх үү?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Зөвлөмж: Өсгөх бол давхар товшино уу."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Автомат бичих"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Автомат дүүргэлтийг тохируулах"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g>-р автоматаар бөглөх"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-mr/strings.xml b/core/res/res/values-mr/strings.xml
index 0758789..942e166 100644
--- a/core/res/res/values-mr/strings.xml
+++ b/core/res/res/values-mr/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"कॅमेरा"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"चित्रे घेण्याची आणि व्हिडिओ रेकॉर्ड"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ला फोटो घेऊ आणि व्हिडिओ रेकॉर्ड करू द्यायचे?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"फोन"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"फोन कॉल आणि व्यवस्थापित"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ला फोन कॉल करू आणि ते व्यवस्थापित करू द्यायचे?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"टीप: झूम कमी करण्यासाठी आणि वाढवण्यासाठी दोनदा-टॅप करा."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"स्वयं-भरण"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"स्वयं-भरण सेट करा"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> सह ऑटोफील करा"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"आपल्या प्रशासकाने इंस्टॉल केले"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"आपल्या प्रशासकाने अपडेट केले"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"आपल्या प्रशासकाने हटवले"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"बॅटरी लाइफ वाढवण्‍यासाठी, बॅटरी सेव्‍हर काही डिव्‍हाइस वैशिष्‍ट्ये बंद करते आणि अॅप्‍सना प्रतिबंधित करते. "<annotation id="url">"अधिक जाणून घ्‍या"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"बॅटरी लाइफ वाढवण्‍यासाठी, बॅटरी सेव्‍हर काही वैशिष्‍ट्ये बंद करते आणि अॅप्‍स प्रतिबंधित करते."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"डेटा वापर कमी करण्यात मदत करण्यासाठी, डेटा सर्व्हर काही अॅप्सना पार्श्वभूमीमध्ये डेटा पाठविण्यास किंवा प्राप्त करण्यास प्रतिबंधित करतो. तुम्ही सध्या वापरत असलेला अॅप डेटामध्ये प्रवेश करू शकतो परंतु तसे तो खूप कमी वेळा करू शकतो. याचा अर्थ, उदाहरणार्थ, तुम्ही इमेज टॅप करेपर्यंत त्या प्रदर्शित करणार नाहीत असा असू शकतो."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"डेटा बचतकर्ता चालू करायचा?"</string>
diff --git a/core/res/res/values-ms/strings.xml b/core/res/res/values-ms/strings.xml
index 77d2824..f0fdf5f 100644
--- a/core/res/res/values-ms/strings.xml
+++ b/core/res/res/values-ms/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ambil gambar dan rakam video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Benarkan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; mengambil gambar dan merakam video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"membuat dan mengurus panggilan telefon"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Benarkan &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; membuat dan mengurus panggilan telefon?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Petua: Ketik dua kali untuk mengezum masuk dan keluar."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Auto isi"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Sediakan Autoisi"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autolengkap dengan <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-my/strings.xml b/core/res/res/values-my/strings.xml
index ff114c6..7c27036 100644
--- a/core/res/res/values-my/strings.xml
+++ b/core/res/res/values-my/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ကင်မရာ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ဓာတ်ပုံ ရိုက်ပြီးနောက် ဗွီဒီယို မှတ်တမ်းတင်ရန်"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; အား ဓာတ်ပုံနှင့် ဗီဒီယိုရိုက်ကူးခွင့် ပေးလိုပါသလား။"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ဖုန်း"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ဖုန်းခေါ်ဆိုမှုများ ပြုလုပ်ရန်နှင့် စီမံရန်"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; အား ဖုန်းခေါ်ဆိုမှုများ ပြုလုပ်ခွင့်နှင့် စီမံခွင့်ပေးလိုပါသလား။"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"အကြံပေးချက်- ဇူးမ်ဆွဲရန်နှင့် ဖြုတ်ရန် နှစ်ကြိမ်ဆက်တိုက် တို့ပါ"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"အလိုအလျောက်ဖြည့်ပါ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"အလိုအလျောက်ဖြည့်ရန် သတ်မှတ်သည်"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> သုံးပြီး အလိုအလျောက်ဖြည့်ပါ"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index afcdb15..b765844 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ta bilder og ta opp video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vil du la &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ta bilder og spille inn video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ring og administrer anrop"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vil du la &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ringe og administrere telefonsamtaler?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tips: Dobbelttrykk for å zoome inn og ut."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autofyll"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Konfig. autofyll"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofyll med <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ne/strings.xml b/core/res/res/values-ne/strings.xml
index e91e3c3..a2630d8 100644
--- a/core/res/res/values-ne/strings.xml
+++ b/core/res/res/values-ne/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"क्यामेरा"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"तस्बिर खिच्नुका साथै भिडियो रेकर्ड गर्नुहोस्"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; लाई तस्बिरहरू खिच्न र भिडियो रेकर्ड गर्न दिने हो?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"फोन"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"फोन कलहरू गर्नुहोस् र व्यवस्थापन गर्नुहोस्"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; लाई फोन कलहरू गर्न र तिनीहरूको व्यवस्थापन गर्न दिने हो?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"जुक्ति: जुमलाई ठूलो र सानो पार्न दुई पटक हान्नुहोस्।"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"स्वतः भर्ने"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"अटोफिल सेटअप गर्नुहोस्"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> मार्फत स्वतः भरण गर्नुहोस्‌"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$१$२$३"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1697,8 +1702,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"तपाईंका प्रशासकले स्थापना गर्नुभएको"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"तपाईंका प्रशासकले अद्यावधिक गर्नुभएको"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"तपाईंका प्रशासकले मेट्नुभएको"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"तपाईंको ब्याट्रीको आयु बढाउनाका लागि ब्याट्री सेभरले यन्त्रका केही सुविधाहरू निष्क्रिय पार्नुका साथै अनुप्रयोगहरूमाथि बन्देज लगाउँछ।"<annotation id="url">"थप जान्नुहोस्"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"तपाईंको ब्याट्रीको आयु बढाउनाका लागि ब्याट्री सेभरले यन्त्रका केही सुविधाहरू निष्क्रिय पार्छ र अनुप्रयोगहरूलाई प्रतिबन्धित गर्छ।"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"डेटाको प्रयोगलाई कम गर्नमा मद्दतका लागि डेटा सर्भरले केही अनुप्रयोगहरूलाई पृष्ठभूमिमा डेटा पठाउन वा प्राप्त गर्नबाट रोक्दछ। तपाईँले हाल प्रयोग गरिरहनुभएको अनु्प्रयोगले डेटामाथि पहुँच राख्न सक्छ, तर त्यसले यो काम थोरै पटक गर्न सक्छ। उदाहरणका लागि यसको मतलब यो हुन सक्छ: तपाईँले छविहरूलाई ट्याप नगरेसम्म ती प्रदर्शन हुँदैनन्।"</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"डेटा सेभरलाई सक्रिय गर्ने हो?"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index daa3434..cfd59ce 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"foto\'s maken en video opnemen"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; toestaan om foto\'s te maken en video op te nemen?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefoon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefoneren en oproepen beheren"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; toestaan om telefoongesprekken te starten en te beheren?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: dubbeltik om in en uit te zoomen."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autom. aanvullen"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Autom. aanvullen instellen"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatisch aanvullen met <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-or/strings.xml b/core/res/res/values-or/strings.xml
index 0301e56..a748dfd 100644
--- a/core/res/res/values-or/strings.xml
+++ b/core/res/res/values-or/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"କ୍ୟାମେରା"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ଫଟୋ ନିଏ ଓ ଭିଡିଓ ରେକର୍ଡ କରେ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;କୁ ଫଟୋ ଉଠାଇବାକୁ ଏବଂ ଭିଡିଓ ରେକର୍ଡ କରିବାକୁ ଅନୁମତି ଦେବେ କି?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ଫୋନ୍‍"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ଫୋନ୍‍ କଲ୍‍ କରେ ଏବଂ ପରିଚାଳନା କରେ"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;କୁ ଫୋନ୍‍ କଲ୍‍ କରିବାକୁ ତଥା ପରିଚାଳନା କରିବାକୁ ଅନୁମତି ଦେବେ କି?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ଧ୍ୟାନଦିଅନ୍ତୁ: ଜୁମ୍‌ ଇନ୍‍ ଓ ଆଉଟ୍‍ କରିବା ପାଇଁ ଡବଲ୍‍-ଟାପ୍‌ କରନ୍ତୁ"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ସ୍ୱତଃପୂରଣ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ଅଟୋଫିଲ୍ ସେଟ୍ କରନ୍ତୁ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ସାହାଯ୍ୟରେ ଅଟୋଫିଲ୍ କରନ୍ତୁ"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1691,8 +1696,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"ଆପଣଙ୍କ ଆଡମିନ୍‌‌ ଇନଷ୍ଟଲ୍‍ କରିଛନ୍ତି"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"ଆପଣଙ୍କ ଆଡମିନ୍‌‌ ଅପଡେଟ୍‍ କରିଛନ୍ତି"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"ଆପଣଙ୍କ ଆଡମିନ୍‌‌ ଡିଲିଟ୍‍ କରିଛନ୍ତି"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"ବ୍ୟାଟେରୀର କାର୍ଯ୍ୟକାଳକୁ ବଢ଼ାଇବା ପାଇଁ, ବ୍ୟାଟେରୀ ସେଭର୍ କିଛି ଡିଭାଇସ୍‍ ଫିଚର୍‌କୁ ବନ୍ଦ କରିବା ସହ କେତେକ ଆପ୍‌କୁ ଚାଲିବାରୁ ରୋକିଥାଏ। "<annotation id="url">"ଅଧିକ ଜାଣନ୍ତୁ"</annotation></string>
     <!-- no translation found for battery_saver_description (769989536172631582) -->
     <skip />
     <string name="data_saver_description" msgid="6015391409098303235">"ଡାଟା ବ୍ୟବହାର କମ୍‍ କରିବାରେ ସାହାଯ୍ୟ କରିବାକୁ, ଡାଟା ସେଭର୍‍ ବ୍ୟାକ୍‌ଗ୍ରାଉଣ୍ଡରେ ଡାଟା ପଠାଇବା କିମ୍ବା ପ୍ରାପ୍ତ କରିବାକୁ କିଛି ଆପ୍‍କୁ ବ୍ଲକ୍‌ କରେ। ଆପଣ ବର୍ତ୍ତମାନ ବ୍ୟବହାର କରୁଥିବା ଆପ୍‍, ଡାଟା ଆକ୍ସେସ୍‍ କରିପାରେ, କିନ୍ତୁ ଏହା କମ୍‍ ସମୟରେ କରିପାରେ। ଏହାର ଅର୍ଥ ହୋଇପାରେ, ଯେପରି, ଆପଣ ଟାପ୍‍ ନକରିବା ପର୍ଯ୍ୟନ୍ତ ଯେଉଁ ଇମେଜ୍‍ ଦେଖାଯାଏ ନାହିଁ।"</string>
diff --git a/core/res/res/values-pa/strings.xml b/core/res/res/values-pa/strings.xml
index f78c036..18f4f03 100644
--- a/core/res/res/values-pa/strings.xml
+++ b/core/res/res/values-pa/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"ਕੈਮਰਾ"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ਤਸਵੀਰਾਂ ਲੈਣ ਅਤੇ ਵੀਡੀਓ ਰਿਕਾਰਡ ਕਰਨ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"ਕੀ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ਨੂੰ ਤਸਵੀਰਾਂ ਖਿੱਚਣ ਅਤੇ ਵੀਡੀਓ ਰਿਕਾਰਡ ਕਰਨ ਦੇਣਾ ਹੈ?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ਫ਼ੋਨ ਕਰੋ"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ਫ਼ੋਨ ਕਾਲਾਂ ਕਰਨ ਅਤੇ ਉਹਨਾਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰਨ"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"ਕੀ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ਨੂੰ ਫ਼ੋਨ ਕਾਲਾਂ ਕਰਨ ਅਤੇ ਉਹਨਾਂ ਦਾ ਪ੍ਰਬੰਧਨ ਕਰਨ ਦੇਣਾ ਹੈ?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"ਨੁਕਤਾ: ਜ਼ੂਮ ਵਧਾਉਣ ਅਤੇ ਘਟਾਉਣ ਲਈ ਡਬਲ ਟੈਪ ਕਰੋ।"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ਆਟੋਫਿਲ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ਆਟੋਫਿਲ ਸੈਟ ਅਪ ਕਰੋ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ਨਾਲ ਆਟੋਫਿਲ ਕਰੋ"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਵੱਲੋਂ ਸਥਾਪਤ ਕੀਤਾ ਗਿਆ"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਵੱਲੋਂ ਅੱਪਡੇਟ ਕੀਤਾ ਗਿਆ"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"ਤੁਹਾਡੇ ਪ੍ਰਸ਼ਾਸਕ ਵੱਲੋਂ ਮਿਟਾਇਆ ਗਿਆ"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ ਕੁਝ ਡੀਵਾਈਸ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਅਤੇ ਐਪਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ। "<annotation id="url">"ਹੋਰ ਜਾਣੋ"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"ਬੈਟਰੀ ਲਾਈਫ਼ ਵਧਾਉਣ ਲਈ, ਬੈਟਰੀ ਸੇਵਰ ਕੁਝ ਡੀਵਾਈਸ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਬੰਦ ਕਰਦਾ ਹੈ ਅਤੇ ਐਪਾਂ \'ਤੇ ਪਾਬੰਦੀ ਲਗਾਉਂਦਾ ਹੈ।"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ਡਾਟਾ ਵਰਤੋਂ ਘਟਾਉਣ ਵਿੱਚ ਮਦਦ ਲਈ, ਡਾਟਾ ਸੇਵਰ ਕੁਝ ਐਪਾਂ ਨੂੰ ਬੈਕਗ੍ਰਾਊਂਡ ਵਿੱਚ ਡਾਟਾ ਭੇਜਣ ਜਾਂ ਪ੍ਰਾਪਤ ਕਰਨ ਤੋਂ ਰੋਕਦਾ ਹੈ। ਤੁਹਾਡੇ ਵੱਲੋਂ ਵਰਤਮਾਨ ਤੌਰ \'ਤੇ ਵਰਤੀ ਜਾ ਰਹੀ ਐਪ ਡਾਟਾ \'ਤੇ ਪਹੁੰਚ ਕਰ ਸਕਦੀ ਹੈ, ਪਰ ਉਹ ਇੰਝ ਕਦੇ-ਕਦਾਈਂ ਕਰ ਸਕਦੀ ਹੈ। ਉਦਾਹਰਨ ਲਈ, ਇਸ ਦਾ ਮਤਲਬ ਇਹ ਹੋ ਸਕਦਾ ਹੈ ਕਿ ਚਿੱਤਰ ਤਦ ਤੱਕ ਨਹੀਂ ਪ੍ਰਦਰਸ਼ਿਤ ਕੀਤੇ ਜਾਂਦੇ, ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਉਹਨਾਂ \'ਤੇ ਟੈਪ ਨਹੀਂ ਕਰਦੇ।"</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ਕੀ ਡਾਟਾ ਸੇਵਰ ਚਾਲੂ ਕਰਨਾ ਹੈ?"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 69fd6ae..717d054 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Aparat"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"robienie zdjęć i nagrywanie filmów"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Zezwolić aplikacji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; na robienie zdjęć i nagrywanie filmów?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"nawiązywanie połączeń telefonicznych i zarządzanie nimi"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Zezwolić aplikacji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; na wykonywanie połączeń telefonicznych i zarządzanie nimi?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Wskazówka: dotknij dwukrotnie, aby powiększyć lub pomniejszyć."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autouzupełnianie"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Ustaw autouzupełnianie"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autouzupełnianie: <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-pt-rBR/strings.xml b/core/res/res/values-pt-rBR/strings.xml
index d4377eb..961a988 100644
--- a/core/res/res/values-pt-rBR/strings.xml
+++ b/core/res/res/values-pt-rBR/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Câmera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tire fotos e grave vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tire fotos e grave vídeos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"faça e gerencie chamadas telefônicas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; faça e gerencie chamadas telefônicas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Dica: toque duas vezes para aumentar e diminuir o zoom."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Preench. aut."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. preench. aut."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Preenchimento automático do <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index fc3ae39..138e1be 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Câmara"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tirar fotos e gravar vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Pretende permitir que a aplicação &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tire fotos e grave vídeo?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telemóvel"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"fazer e gerir chamadas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Pretende permitir que a aplicação &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; faça e gira chamadas telefónicas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Sugestão: toque duas vezes para aumentar ou diminuir o zoom."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Preenchimento Automático"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Configurar Preenchimento Automático"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Preenchimento automático com <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index d4377eb..961a988 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Câmera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"tire fotos e grave vídeos"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; tire fotos e grave vídeos?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefone"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"faça e gerencie chamadas telefônicas"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Permitir que &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; faça e gerencie chamadas telefônicas?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Dica: toque duas vezes para aumentar e diminuir o zoom."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Preench. aut."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf. preench. aut."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Preenchimento automático do <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 23f0d18..0d815bc 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera foto"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotografieze și să înregistreze videoclipuri"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permiteți &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; să facă fotografii și să înregistreze videoclipuri?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"inițieze și să gestioneze apeluri telefonice"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Permiteți &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; să inițieze și să gestioneze apeluri telefonice?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Sfat: măriți și micșorați prin dublă atingere."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Automat"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Conf.Compl.auto."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Completați automat cu <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index 4b30e2c..38342f8 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"снимать фото и видео"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Разрешить приложению &lt;b&gt;\"<xliff:g id="APP_NAME">%1$s</xliff:g>\"&lt;/b&gt; снимать фото и видео?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"осуществлять вызовы и управлять ими"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Разрешить приложению &lt;b&gt;\"<xliff:g id="APP_NAME">%1$s</xliff:g>\"&lt;/b&gt; совершать звонки и управлять ими?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Совет: нажмите дважды, чтобы увеличить и уменьшить масштаб."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Автозаполнение"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Настроить автозаполнение"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Автозаполнение с помощью сервиса \"<xliff:g id="SERVICENAME">%1$s</xliff:g>\""</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-si/strings.xml b/core/res/res/values-si/strings.xml
index aee9637..4b22557 100644
--- a/core/res/res/values-si/strings.xml
+++ b/core/res/res/values-si/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"කැමරාව"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"පින්තූර ගැනීම සහ වීඩියෝ පටිගත කිරීම"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;b&gt; වෙත පින්තූර සහ වීඩියෝ ගැනීමට ඉඩ දෙන්නද?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"දුරකථනය"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"දුරකථන ඇමතුම් සිදු කිරීම සහ කළමනාකරණය කිරීම"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;b&gt; වෙත දුරකථන ඇමතුම් ලබා ගැනීමට සහ කළමනාකරණය කිරීමට ඉඩ දෙන්නද?"</string>
@@ -838,8 +844,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"උපදෙස: විශාලනය කිරීමට සහ කුඩා කිරීමට දෙවරක් තට්ටු කරන්න."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ස්වයංක්‍රිය පිරවුම"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ස්වයංක්‍රිය පිරවුම සකසන්න"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> සමගින් ස්වයං පුරවන්න"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 59c8f73..80dd144 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparát"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotenie a natáčanie videí"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Povoliť aplikácii &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; snímať fotky a zaznamenávať video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefón"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefonovanie a správu hovorov"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Povoliť aplikácii &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uskutočňovať a spravovať telefonické hovory?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: Dvojitým klepnutím môžete zobrazenie priblížiť alebo oddialiť."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Aut.dop."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Nast. Aut. dop."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Automatické dopĺňanie pomocou služby <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 13d123d..d5c466e 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparat"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotografiranje in snemanje videoposnetkov"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Želite aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; omogočiti fotografiranje in snemanje videoposnetkov?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"opravljanje in upravljanje telefonskih klicev"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Želite aplikaciji &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; omogočiti opravljanje in upravljanje telefonskih klicev?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Nasvet: Tapnite dvakrat, če želite povečati ali pomanjšati."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Samoizp."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Nastavi samoizp."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Samodejno izpolnjevanje s storitvijo <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sq/strings.xml b/core/res/res/values-sq/strings.xml
index de7f4c0..62a6d69 100644
--- a/core/res/res/values-sq/strings.xml
+++ b/core/res/res/values-sq/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"bëj fotografi dhe regjistro video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Të lejohet që &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; të nxjerrë fotografi dhe të regjistrojë video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefoni"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"kryej dhe menaxho telefonata"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Të lejohet që &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; të kryejë dhe të menaxhojë telefonata?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Këshillë! Trokit dy herë për të zmadhuar dhe zvogëluar."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Plotësim automatik"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Konfiguro plotësuesin automatik"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Plotëso automatikisht me <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 1170b27..47d0420 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -294,6 +294,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"снима слике и видео"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Желите ли да омогућите да &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; снима слике и видео снимке?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"упућује телефонске позиве и управља њима"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Желите ли да омогућите да &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; упућује позиве и управља њима?"</string>
@@ -839,8 +845,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Савет: Додирните двапут да бисте увећали и умањили приказ."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Аутом. поп."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Подеш. аут. поп."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Аутоматски попуњава <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 43c1611..862f513 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ta bilder och spela in video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vill du ge &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; behörighet att ta bilder och spela in video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ringa och hantera telefonsamtal"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vill du ge &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; behörighet att ringa och hantera telefonsamtal?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tips! Dubbelknacka om du vill zooma in eller ut."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autofyll"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Ange Autofyll"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Autofyll med <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 3eef051..a8a37b3 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -123,10 +123,10 @@
     <string name="roamingTextSearching" msgid="8360141885972279963">"Inatafuta Huduma"</string>
     <string name="wfcRegErrorTitle" msgid="3855061241207182194">"Imeshindwa kuweka mipangilio ya kupiga simu kupitia Wi‑Fi"</string>
   <string-array name="wfcOperatorErrorAlertMessages">
-    <item msgid="3910386316304772394">"Ili upige simu na kutuma ujumbe kupitia Wi-Fi, mwambie mtoa huduma wako aweke mipangilio ya huduma hii kwanza. Kisha uwashe tena kipengele cha kupiga simu kupitia Wi-Fi kwenye Mipangilio. (Msimbo wa hitilafu: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
+    <item msgid="3910386316304772394">"Ili upige simu na utume ujumbe kupitia Wi-Fi, kwanza mwambie mtoa huduma wako aweke mipangilio ya huduma hii. Kisha nenda kwenye mipangilio na uwashe tena kipengele cha kupiga simu kupitia Wi-Fi. (Msimbo wa hitilafu: <xliff:g id="CODE">%1$s</xliff:g>)"</item>
   </string-array>
   <string-array name="wfcOperatorErrorNotificationMessages">
-    <item msgid="7372514042696663278">"Tatizo limetokea wakati wa kusajili huduma ya kupiga simu kupitia Wi‑Fi ya mtoa huduma wako: <xliff:g id="CODE">%1$s</xliff:g>"</item>
+    <item msgid="7372514042696663278">"Tatizo limetokea wakati wa kuisajili huduma ya kupiga simu kupitia Wi‑Fi kwa mtoa huduma wako: <xliff:g id="CODE">%1$s</xliff:g>"</item>
   </string-array>
     <!-- String.format failed for translation -->
     <!-- no translation found for wfcSpnFormats:0 (6830082633573257149) -->
@@ -289,6 +289,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ipige picha na kurekodi video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Ungependa kuiruhusu &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ipige picha na kurekodi video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Simu"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"piga na udhibiti simu"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Ungependa kuiruhusu &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ipige na kudhibiti simu?"</string>
@@ -834,8 +840,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Kidokezo: Gusa mara mbili ili kukuza ndani na nje."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Kujaza kiotomatiki"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Weka uwezo wa kujaza kiotomatiki"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Jaza kiotomatiki ukitumia <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ta/strings.xml b/core/res/res/values-ta/strings.xml
index 04b51f6..84f6174 100644
--- a/core/res/res/values-ta/strings.xml
+++ b/core/res/res/values-ta/strings.xml
@@ -29,7 +29,7 @@
     <string name="fileSizeSuffix" msgid="8897567456150907538">"<xliff:g id="NUMBER">%1$s</xliff:g> <xliff:g id="UNIT">%2$s</xliff:g>"</string>
     <string name="untitled" msgid="4638956954852782576">"&lt;பெயரிடப்படாதது&gt;"</string>
     <string name="emptyPhoneNumber" msgid="7694063042079676517">"(தொலைபேசி எண் இல்லை)"</string>
-    <string name="unknownName" msgid="6867811765370350269">"அறியப்படாதவர்"</string>
+    <string name="unknownName" msgid="6867811765370350269">"அறிமுகமில்லாதவர்"</string>
     <string name="defaultVoiceMailAlphaTag" msgid="2660020990097733077">"குரலஞ்சல்"</string>
     <string name="defaultMsisdnAlphaTag" msgid="2850889754919584674">"MSISDN1"</string>
     <string name="mmiError" msgid="5154499457739052907">"இணைப்பு சிக்கல் அல்லது தவறான MMI குறியீடு."</string>
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"கேமரா"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"படங்கள் மற்றும் வீடியோக்கள் எடுக்கலாம்"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"படங்கள் எடுக்கவும், வீடியோ பதிவு செய்யவும் &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; பயன்பாட்டை அனுமதிக்கவா?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ஃபோன்"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"யாரையும் தொலைபேசியில் அழைக்கலாம்"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"மொபைல் அழைப்புகள் செய்யவும், அவற்றை நிர்வகிக்கவும், &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; பயன்பாட்டை அனுமதிக்கவா?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"உதவிக்குறிப்பு: அளவைப் பெரிதாக்க மற்றும் குறைக்க இருமுறைத் தட்டவும்."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"தன்னிரப்பி"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"தன்னிரப்பியை அமை"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> இலிருந்து தன்னிரப்புதல்"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"உங்கள் நிர்வாகி நிறுவியுள்ளார்"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"உங்கள் நிர்வாகி புதுப்பித்துள்ளார்"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"உங்கள் நிர்வாகி நீக்கியுள்ளார்"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"பேட்டரியின் ஆயுளை அதிகரிக்க, பேட்டரி சேமிப்பான் அம்சமானது சில சாதன அம்சங்களை ஆஃப் செய்து, ஆப்ஸைக் கட்டுப்படுத்தும். "<annotation id="url">"மேலும் அறிக"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"பேட்டரி இயங்கும் நேரத்தை அதிகரிக்க, பேட்டரி சேமிப்பான் அம்சமானது சில சாதன அம்சங்களை ஆஃப் செய்து, ஆப்ஸைக் கட்டுப்படுத்தும்."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"டேட்டா உபயோகத்தைக் குறைப்பதற்கு உதவ, பின்புலத்தில் டேட்டாவை அனுப்புவது அல்லது பெறுவதிலிருந்து சில பயன்பாடுகளை டேட்டா சேமிப்பான் தடுக்கும். தற்போது பயன்படுத்தும் பயன்பாடானது எப்போதாவது டேட்டாவை அணுகலாம். எடுத்துக்காட்டாக, படங்களை நீங்கள் தட்டும் வரை அவை காட்டப்படாது."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"டேட்டா சேமிப்பானை இயக்கவா?"</string>
diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml
index 0429b7e..47a1bf1 100644
--- a/core/res/res/values-te/strings.xml
+++ b/core/res/res/values-te/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"కెమెరా"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"చిత్రాలను తీయడానికి మరియు వీడియోను రికార్డ్ చేయడానికి"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"చిత్రాలు తీయడానికి మరియు వీడియో రికార్డ్ చేయడానికి &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ని అనుమతించాలా?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"ఫోన్"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"ఫోన్ కాల్‌లు చేయడం మరియు నిర్వహించడం"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"ఫోన్ కాల్‌లు చేయడానికి మరియు నిర్వహించడానికి &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;ని అనుమతించాలా?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"చిట్కా: దగ్గరకు మరియు దూరానికి జూమ్ చేయడానికి రెండు సార్లు నొక్కండి."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"స్వీయ పూరింపు"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"స్వీయ పూరణను సెటప్ చేయండి"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ద్వారా స్వీయ పూరింపు చేయండి"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"మీ నిర్వాహకులు ఇన్‌స్టాల్ చేసారు"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"మీ నిర్వాహకులు నవీకరించారు"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"మీ నిర్వాహకులు తొలగించారు"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"మీ బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ కొన్ని పరికర ఫీచర్‌లను ఆఫ్ చేస్తుంది మరియు కొన్ని యాప్‌లను పరిమితం చేస్తుంది. "<annotation id="url">"మరింత తెలుసుకోండి"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"మీ బ్యాటరీ జీవితకాలాన్ని పెంచడానికి, బ్యాటరీ సేవర్ కొన్ని పరికర ఫీచర్‌లను ఆఫ్ చేస్తుంది మరియు కొన్ని యాప్‌లను పరిమితం చేస్తుంది."</string>
     <string name="data_saver_description" msgid="6015391409098303235">"డేటా వినియోగాన్ని తగ్గించడంలో సహాయకరంగా ఉండటానికి, డేటా సేవర్ కొన్ని యాప్‌లను నేపథ్యంలో డేటాను పంపకుండా లేదా స్వీకరించకుండా నిరోధిస్తుంది. మీరు ప్రస్తుతం ఉపయోగిస్తున్న యాప్‌ డేటాను యాక్సెస్ చేయగలదు కానీ అలా అరుదుగా చేయవచ్చు. అంటే, ఉదాహరణకు, మీరు ఆ చిత్రాలను నొక్కే వరకు అవి ప్రదర్శించబడవు."</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"డేటా సేవర్‌ను ఆన్ చేయాలా?"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 58afa00..a04cbf9 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"กล้องถ่ายรูป"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"ถ่ายภาพและบันทึกวิดีโอ"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"อนุญาตให้ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ถ่ายรูปและบันทึกวิดีโอไหม"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"โทรศัพท์"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"โทรและจัดการการโทร"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"อนุญาตให้ &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; โทรและจัดการการโทรไหม"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"เคล็ดลับ: แตะสองครั้งเพื่อขยายและย่อ"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"ป้อนอัตโนมัติ"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"ค่าป้อนอัตโนมัติ"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"ป้อนข้อความอัตโนมัติโดยใช้ <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index ba0675b..cd00438 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Camera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"kumuha ng mga larawan at mag-record ng video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Payagan ang &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; na kumuha ng mga larawan at mag-record ng video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telepono"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"tumawag at mamahala ng mga tawag sa telepono"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Payagan ang &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; na tumawag at mamahala ng mga tawag sa telepono?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Tip: Mag-double tap upang mag-zoom in at out."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Autofill"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"I-set up ang Autofill."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Mag-autofill gamit ang <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 936de84..d55021c 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"fotoğraf çekme ve video kaydetme"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uygulamasının resim çekmesine ve video kaydı yapmasına izin verilsin mi?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefon çağrıları yapma ve yönetme"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uygulamasının telefon etmesine ve çağrıları yönetmesine izin verilsin mi?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"İpucu: Yakınlaştırmak ve uzaklaştırmak için iki kez dokunun."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Otomatik Doldur"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Otomatik doldurma ayarla"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> ile otomatik doldur"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index a40a445..c7d69ee 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -297,6 +297,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"фотографувати та записувати відео"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Дозволити додатку &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; робити знімки та записувати відео?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"телефонувати та керувати дзвінками"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Дозволити додатку &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; здійснювати телефонні дзвінки та керувати ними?"</string>
@@ -842,8 +848,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Порада: двічі торкніться для збільшення чи зменшення."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Автозап."</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Налашт.автозап."</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Автозаповнення: <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-ur/strings.xml b/core/res/res/values-ur/strings.xml
index 604d607..a4510df 100644
--- a/core/res/res/values-ur/strings.xml
+++ b/core/res/res/values-ur/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"کیمرا"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"تصاویر لیں اور ویڈیو ریکارڈ کریں"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"‏&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; کو تصاویر لینے اور ویڈیو ریکارڈ کرنے کی اجازت دیں؟"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"فون"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"فون کالز کریں اور ان کا نظم کریں"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"‏&lt;/b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; کو فون کالز کرنے اور ان کا نظم کرنے کی اجازت دیں؟"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"تجویز: زوم ان اور آؤٹ کیلئے دو بار تھپتھپائیں۔"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"آٹوفل"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"آٹوفل مقرر کریں"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> کے ساتھ آٹو فل کی سروس"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">"، "</string>
@@ -1692,8 +1697,7 @@
     <string name="package_installed_device_owner" msgid="6875717669960212648">"آپ کے منتظم کے ذریعے انسٹال کیا گیا"</string>
     <string name="package_updated_device_owner" msgid="1847154566357862089">"آپ کے منتظم کے ذریعے اپ ڈیٹ کیا گیا"</string>
     <string name="package_deleted_device_owner" msgid="2307122077550236438">"آپ کے منتظم کے ذریعے حذف کیا گیا"</string>
-    <!-- no translation found for battery_saver_description_with_learn_more (6323937147992667707) -->
-    <skip />
+    <string name="battery_saver_description_with_learn_more" msgid="6323937147992667707">"آپ کی بیٹری لائف کو بڑھانے کیلئے، بیٹری سیور آلہ کی کچھ خصوصیات کو آف اور ایپس کو محدود کرتا ہے۔ "<annotation id="url">"مزید جانیں"</annotation></string>
     <string name="battery_saver_description" msgid="769989536172631582">"آپ کی بیٹری لائف کو بڑھانے کیلئے، بیٹری سیور آلہ کی کچھ خصوصیات کو آف اور ایپس کو محدود کرتا ہے۔"</string>
     <string name="data_saver_description" msgid="6015391409098303235">"ڈیٹا کے استعمال کو کم کرنے میں مدد کیلئے، ڈیٹا سیور پس منظر میں کچھ ایپس کو ڈیٹا بھیجنے یا موصول کرنے سے روکتا ہے۔ آپ جو ایپ فی الحال استعمال کر رہے ہیں وہ ڈیٹا پر رسائی کر سکتی ہے مگر ہو سکتا ہے ایسا زیادہ نہ ہو۔ اس کا مطلب مثال کے طور پر یہ ہو سکتا ہے کہ تصاویر تھپتھپانے تک ظاہر نہ ہوں۔"</string>
     <string name="data_saver_enable_title" msgid="4674073932722787417">"ڈیٹا سیور آن کریں؟"</string>
diff --git a/core/res/res/values-uz/strings.xml b/core/res/res/values-uz/strings.xml
index ccdfc2c..c8b97fd 100644
--- a/core/res/res/values-uz/strings.xml
+++ b/core/res/res/values-uz/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Kamera"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"suratga olish va video yozib olish"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uchun surat va videoga olishga ruxsat berilsinmi?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Telefon"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"telefon qo‘ng‘iroqlarini amalga oshirish va boshqarish"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; uchun telefon chaqiruvlarini amalga oshirish va boshqarishga ruxsat berilsinmi?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Maslahat: kattalashtirish va kichiklashtirish uchun ikki marta bosing."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Avtomatik to‘ldirish"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Avto-to‘ldirishni sozlash"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> yordamida avtomatik kiritish"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 3860f46..abd9cc0 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Máy ảnh"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"chụp ảnh và quay video"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Cho phép &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; chụp ảnh và quay video?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Điện thoại"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"thực hiện và quản lý cuộc gọi điện thoại"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Cho phép &lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; thực hiện và quản lý cuộc gọi điện thoại?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Mẹo: Nhấn đúp để phóng to và thu nhỏ."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Tự động điền"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Thiết lập Tự động điền"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Tự động điền với <xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 9ca437e..5d3c571 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"相机"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"拍摄照片和录制视频"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"允许&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;拍摄照片和录制视频吗?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"电话"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"拨打电话和管理通话"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"允许&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt;拨打电话和管理通话吗?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"提示:点按两次可放大或缩小。"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"自动填充"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"设置自动填充"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g>的自动填充功能"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 87fcc09..22eb010 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"相機"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"拍照和錄製影片"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」&lt;b&gt;&lt;/b&gt;拍照和錄製影片嗎?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"電話"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"撥打電話及管理通話"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」&lt;b&gt;&lt;/b&gt;撥打電話和管理通話嗎?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"提示:輕按兩下即可放大縮小。"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"自動填入"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"設定自動填入功能"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> 的自動填入功能"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index ea717dd..20fe485 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"相機"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"拍照及錄製影片"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」拍攝相片及錄製影片嗎?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"電話"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"撥打電話及管理通話"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"要允許「<xliff:g id="APP_NAME">%1$s</xliff:g>」撥打電話及管理通話嗎?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"提示:輕觸兩下即可縮放。"</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"自動填入功能"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"設定自動填入功能"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"<xliff:g id="SERVICENAME">%1$s</xliff:g> 的自動填入功能"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" //*** Empty segment here as a separator ***//"</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values-zu/strings.xml b/core/res/res/values-zu/strings.xml
index 4d43a6f..e10c03b 100644
--- a/core/res/res/values-zu/strings.xml
+++ b/core/res/res/values-zu/strings.xml
@@ -291,6 +291,12 @@
     <string name="permgrouplab_camera" msgid="4820372495894586615">"Ikhamela"</string>
     <string name="permgroupdesc_camera" msgid="3250611594678347720">"thatha izithombe uphinde urekhode ividiyo"</string>
     <string name="permgrouprequest_camera" msgid="1299833592069671756">"Vumela i-&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ukuthatha izithombe iphinde irekhode ividiyo?"</string>
+    <!-- no translation found for permgrouplab_calllog (8798646184930388160) -->
+    <skip />
+    <!-- no translation found for permgroupdesc_calllog (3006237336748283775) -->
+    <skip />
+    <!-- no translation found for permgrouprequest_calllog (8487355309583773267) -->
+    <skip />
     <string name="permgrouplab_phone" msgid="5229115638567440675">"Ifoni"</string>
     <string name="permgroupdesc_phone" msgid="6234224354060641055">"yenza uphinde uphathe amakholi wefoni"</string>
     <string name="permgrouprequest_phone" msgid="9166979577750581037">"Vumela i-&lt;b&gt;<xliff:g id="APP_NAME">%1$s</xliff:g>&lt;/b&gt; ukuthi yenze iphinde iphathe amakholi efoni?"</string>
@@ -836,8 +842,7 @@
     <string name="double_tap_toast" msgid="4595046515400268881">"Ithiphu: thepha kabili ukusondeza ngaphandle nangaphakathi."</string>
     <string name="autofill_this_form" msgid="4616758841157816676">"Ukugcwalisa Ngokuzenzakalelayo"</string>
     <string name="setup_autofill" msgid="7103495070180590814">"Misa i-Autofill"</string>
-    <!-- no translation found for autofill_window_title (4107745526909284887) -->
-    <skip />
+    <string name="autofill_window_title" msgid="4107745526909284887">"Gcwalisa ngokuzenzakalela nge-<xliff:g id="SERVICENAME">%1$s</xliff:g>"</string>
     <string name="autofill_address_name_separator" msgid="6350145154779706772">" "</string>
     <string name="autofill_address_summary_name_format" msgid="3268041054899214945">"$1$2$3"</string>
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5c80d4d2..780cda2 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1836,12 +1836,16 @@
     <string name="db_default_sync_mode" translatable="false">FULL</string>
 
     <!-- The database synchronization mode when using Write-Ahead Logging.
-         FULL is safest and preserves durability at the cost of extra fsyncs.
-         NORMAL sacrifices durability in WAL mode because syncs are only performed before
-         and after checkpoint operations.  If checkpoints are infrequent and power loss
-         occurs, then committed transactions could be lost and applications might break.
+         From https://www.sqlite.org/pragma.html#pragma_synchronous:
+         WAL mode is safe from corruption with synchronous=NORMAL, and probably DELETE mode is safe
+         too on modern filesystems. WAL mode is always consistent with synchronous=NORMAL, but WAL
+         mode does lose durability. A transaction committed in WAL mode with
+         synchronous=NORMAL might roll back following a power loss or system crash.
+         Transactions are durable across application crashes regardless of the synchronous setting
+         or journal mode. The synchronous=NORMAL setting is a good choice for most applications
+         running in WAL mode.
          Choices are: FULL, NORMAL, OFF. -->
-    <string name="db_wal_sync_mode" translatable="false">FULL</string>
+    <string name="db_wal_sync_mode" translatable="false">NORMAL</string>
 
     <!-- The Write-Ahead Log auto-checkpoint interval in database pages (typically 1 to 4KB).
          The log is checkpointed automatically whenever it exceeds this many pages.
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index c7b65ef..791f7c6 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -247,7 +247,7 @@
     <dimen name="notification_header_shrink_min_width">72dp</dimen>
 
     <!-- The minimum height of the content if there are at least two lines or a picture-->
-    <dimen name="notification_min_content_height">41dp</dimen>
+    <dimen name="notification_min_content_height">39dp</dimen>
 
     <!-- The size of the media actions in the media notification. -->
     <dimen name="media_notification_action_button_size">48dp</dimen>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index b92052b..bf7ca52 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -724,6 +724,14 @@
         &lt;b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g>&lt;/b> to take pictures and record video?</string>
 
     <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permgrouplab_calllog">Call logs</string>
+    <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
+    <string name="permgroupdesc_calllog">read and write phone call log</string>
+    <!-- Message shown to the user when the apps requests permission from this group -->
+    <string name="permgrouprequest_calllog">Allow
+        &lt;b><xliff:g id="app_name" example="Gmail">%1$s</xliff:g>&lt;/b> to access your phone call logs?</string>
+
+    <!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgrouplab_phone">Phone</string>
     <!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permgroupdesc_phone">make and manage phone calls</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 5298e5b..5edafec 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2555,6 +2555,7 @@
   <java-symbol type="drawable" name="ic_storage_48dp" />
   <java-symbol type="drawable" name="ic_usb_48dp" />
   <java-symbol type="drawable" name="ic_zen_24dp" />
+  <java-symbol type="drawable" name="ic_dnd_block_notifications" />
 
   <!-- Floating toolbar -->
   <java-symbol type="id" name="floating_toolbar_menu_item_image" />
@@ -2586,9 +2587,6 @@
   <java-symbol type="attr" name="floatingToolbarDividerColor" />
 
   <!-- Magnifier -->
-  <java-symbol type="id" name="magnifier_image" />
-  <java-symbol type="id" name="magnifier_inner" />
-  <java-symbol type="layout" name="magnifier" />
   <java-symbol type="dimen" name="magnifier_width" />
   <java-symbol type="dimen" name="magnifier_height" />
   <java-symbol type="dimen" name="magnifier_elevation" />
diff --git a/core/res/res/xml/default_zen_mode_config.xml b/core/res/res/xml/default_zen_mode_config.xml
index 3a71851..35a0cc2 100644
--- a/core/res/res/xml/default_zen_mode_config.xml
+++ b/core/res/res/xml/default_zen_mode_config.xml
@@ -19,8 +19,8 @@
 
 <!-- Default configuration for zen mode.  See android.service.notification.ZenModeConfig. -->
 <zen version="7">
-    <allow alarms="true" media="true" system="false" calls="false" messages="false"
-           reminders="false" events="false" />
+    <allow alarms="true" media="true" system="false" calls="true" callsFrom="2" messages="false"
+           reminders="false" events="false" repeatCallers="true" />
 
     <!-- all visual effects that exist as of P -->
     <disallow suppressedVisualEffect="511" />
diff --git a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
index 9ef58ab..1750dac 100644
--- a/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
+++ b/core/tests/coretests/src/android/app/activity/ActivityThreadTest.java
@@ -16,7 +16,11 @@
 
 package android.app.activity;
 
+import static android.content.Intent.ACTION_EDIT;
+import static android.content.Intent.ACTION_VIEW;
+
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import android.app.Activity;
 import android.app.ActivityThread;
@@ -27,6 +31,7 @@
 import android.app.servertransaction.ResumeActivityItem;
 import android.app.servertransaction.StopActivityItem;
 import android.content.Intent;
+import android.os.IBinder;
 import android.support.test.InstrumentationRegistry;
 import android.support.test.filters.MediumTest;
 import android.support.test.rule.ActivityTestRule;
@@ -94,6 +99,36 @@
         });
     }
 
+    /** Verify that custom intent set via Activity#setIntent() is preserved on relaunch. */
+    @Test
+    public void testCustomIntentPreservedOnRelaunch() throws Exception {
+        final Intent initIntent = new Intent();
+        initIntent.setAction(ACTION_VIEW);
+        final Activity activity = mActivityTestRule.launchActivity(initIntent);
+        IBinder token = activity.getActivityToken();
+
+        final ActivityThread activityThread = activity.getActivityThread();
+        InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> {
+            // Recreate and check that intent is still the same.
+            activity.recreate();
+
+            final Activity newActivity = activityThread.getActivity(token);
+            assertTrue("Original intent must be preserved after recreate",
+                    initIntent.filterEquals(newActivity.getIntent()));
+
+            // Set custom intent, recreate and check if it is preserved.
+            final Intent customIntent = new Intent();
+            customIntent.setAction(ACTION_EDIT);
+            newActivity.setIntent(customIntent);
+
+            activity.recreate();
+
+            final Activity lastActivity = activityThread.getActivity(token);
+            assertTrue("Custom intent must be preserved after recreate",
+                    customIntent.filterEquals(lastActivity.getIntent()));
+        });
+    }
+
     private static ClientTransaction newRelaunchResumeTransaction(Activity activity) {
         final ClientTransactionItem callbackItem = ActivityRelaunchItem.obtain(null,
                 null, 0, new MergedConfiguration(), false /* preserveWindow */);
diff --git a/core/tests/coretests/src/android/provider/SettingsBackupTest.java b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
index dafd475..db221cd 100644
--- a/core/tests/coretests/src/android/provider/SettingsBackupTest.java
+++ b/core/tests/coretests/src/android/provider/SettingsBackupTest.java
@@ -466,6 +466,7 @@
                     Settings.Global.WIFI_ON,
                     Settings.Global.WIFI_P2P_DEVICE_NAME,
                     Settings.Global.WIFI_REENABLE_DELAY_MS,
+                    Settings.Global.WIFI_RTT_BACKGROUND_EXEC_GAP_MS,
                     Settings.Global.WIFI_SAVED_STATE,
                     Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE,
                     Settings.Global.WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS,
diff --git a/core/tests/coretests/src/com/android/internal/widget/BackgroundFallbackTest.java b/core/tests/coretests/src/com/android/internal/widget/BackgroundFallbackTest.java
new file mode 100644
index 0000000..e21143d
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/widget/BackgroundFallbackTest.java
@@ -0,0 +1,262 @@
+/*
+ * 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.internal.widget;
+
+import static android.view.View.VISIBLE;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+
+import static java.util.Arrays.asList;
+import static java.util.Collections.emptyList;
+
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.support.test.InstrumentationRegistry;
+import android.view.ViewGroup;
+import android.widget.FrameLayout;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import java.util.List;
+
+public class BackgroundFallbackTest {
+
+    private static final int NAVBAR_BOTTOM = 0;
+    private static final int NAVBAR_LEFT = 1;
+    private static final int NAVBAR_RIGHT = 2;
+
+    private static final int SCREEN_HEIGHT = 2000;
+    private static final int SCREEN_WIDTH = 1000;
+    private static final int STATUS_HEIGHT = 100;
+    private static final int NAV_SIZE = 200;
+
+    private static final boolean INSET_CONTENT_VIEWS = true;
+    private static final boolean DONT_INSET_CONTENT_VIEWS = false;
+
+    BackgroundFallback mFallback;
+    Drawable mDrawableMock;
+
+    ViewGroup mStatusBarView;
+    ViewGroup mNavigationBarView;
+
+    ViewGroup mDecorViewMock;
+    ViewGroup mContentRootMock;
+    ViewGroup mContentContainerMock;
+    ViewGroup mContentMock;
+
+    int mLastTop = 0;
+
+    @Before
+    public void setUp() throws Exception {
+        mFallback = new BackgroundFallback();
+        mDrawableMock = mock(Drawable.class);
+
+        mFallback.setDrawable(mDrawableMock);
+
+    }
+
+    @Test
+    public void hasFallback_withDrawable_true() {
+        mFallback.setDrawable(mDrawableMock);
+        assertThat(mFallback.hasFallback(), is(true));
+    }
+
+    @Test
+    public void hasFallback_withoutDrawable_false() {
+        mFallback.setDrawable(null);
+        assertThat(mFallback.hasFallback(), is(false));
+    }
+
+    @Test
+    public void draw_portrait_noFallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_BOTTOM);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_portrait_translucentBars_fallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_BOTTOM);
+        setTranslucent(mStatusBarView);
+        setTranslucent(mNavigationBarView);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyFallbackTop(STATUS_HEIGHT);
+        verifyFallbackBottom(NAV_SIZE);
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_landscape_translucentBars_fallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_RIGHT);
+        setTranslucent(mStatusBarView);
+        setTranslucent(mNavigationBarView);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyFallbackTop(STATUS_HEIGHT);
+        verifyFallbackRight(NAV_SIZE);
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_seascape_translucentBars_fallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_LEFT);
+        setTranslucent(mStatusBarView);
+        setTranslucent(mNavigationBarView);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyFallbackTop(STATUS_HEIGHT);
+        verifyFallbackLeft(NAV_SIZE);
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_landscape_noFallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_RIGHT);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_seascape_noFallback() {
+        setUpViewHierarchy(INSET_CONTENT_VIEWS, NAVBAR_LEFT);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    @Test
+    public void draw_seascape_translucentBars_noInsets_noFallback() {
+        setUpViewHierarchy(DONT_INSET_CONTENT_VIEWS, NAVBAR_LEFT);
+        setTranslucent(mStatusBarView);
+        setTranslucent(mNavigationBarView);
+
+        mFallback.draw(mDecorViewMock, mContentRootMock, null /* canvas */, mContentContainerMock,
+                mStatusBarView, mNavigationBarView);
+
+        verifyNoMoreInteractions(mDrawableMock);
+    }
+
+    private void verifyFallbackTop(int size) {
+        verify(mDrawableMock).setBounds(0, 0, SCREEN_WIDTH, size);
+        verify(mDrawableMock, atLeastOnce()).draw(any());
+        mLastTop = size;
+    }
+
+    private void verifyFallbackLeft(int size) {
+        verify(mDrawableMock).setBounds(0, mLastTop, size, SCREEN_HEIGHT);
+        verify(mDrawableMock, atLeastOnce()).draw(any());
+    }
+
+    private void verifyFallbackRight(int size) {
+        verify(mDrawableMock).setBounds(SCREEN_WIDTH - size, mLastTop, SCREEN_WIDTH, SCREEN_HEIGHT);
+        verify(mDrawableMock, atLeastOnce()).draw(any());
+    }
+
+    private void verifyFallbackBottom(int size) {
+        verify(mDrawableMock).setBounds(0, SCREEN_HEIGHT - size, SCREEN_WIDTH, SCREEN_HEIGHT);
+        verify(mDrawableMock, atLeastOnce()).draw(any());
+    }
+
+    private void setUpViewHierarchy(boolean insetContentViews, int navBarPosition) {
+        int insetLeft = 0;
+        int insetTop = 0;
+        int insetRight = 0;
+        int insetBottom = 0;
+
+        mStatusBarView = mockView(0, 0, SCREEN_WIDTH, STATUS_HEIGHT,
+                new ColorDrawable(Color.BLACK), VISIBLE, emptyList());
+        if (insetContentViews) {
+            insetTop = STATUS_HEIGHT;
+        }
+
+        switch (navBarPosition) {
+            case NAVBAR_BOTTOM:
+                mNavigationBarView = mockView(0, SCREEN_HEIGHT - NAV_SIZE, SCREEN_WIDTH,
+                        SCREEN_HEIGHT, new ColorDrawable(Color.BLACK), VISIBLE, emptyList());
+                if (insetContentViews) {
+                    insetBottom = NAV_SIZE;
+                }
+                break;
+            case NAVBAR_LEFT:
+                mNavigationBarView = mockView(0, 0, NAV_SIZE, SCREEN_HEIGHT,
+                        new ColorDrawable(Color.BLACK), VISIBLE, emptyList());
+                if (insetContentViews) {
+                    insetLeft = NAV_SIZE;
+                }
+                break;
+            case NAVBAR_RIGHT:
+                mNavigationBarView = mockView(SCREEN_WIDTH - NAV_SIZE, 0, SCREEN_WIDTH,
+                        SCREEN_HEIGHT, new ColorDrawable(Color.BLACK), VISIBLE, emptyList());
+                if (insetContentViews) {
+                    insetRight = NAV_SIZE;
+                }
+                break;
+        }
+
+        mContentMock = mockView(0, 0, SCREEN_WIDTH - insetLeft - insetRight,
+                SCREEN_HEIGHT - insetTop - insetBottom, null, VISIBLE, emptyList());
+        mContentContainerMock = mockView(0, 0, SCREEN_WIDTH - insetLeft - insetRight,
+                SCREEN_HEIGHT - insetTop - insetBottom, null, VISIBLE, asList(mContentMock));
+        mContentRootMock = mockView(insetLeft, insetTop, SCREEN_WIDTH - insetRight,
+                SCREEN_HEIGHT - insetBottom, null, VISIBLE, asList(mContentContainerMock));
+
+        mDecorViewMock = mockView(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, null, VISIBLE,
+                asList(mContentRootMock, mStatusBarView, mNavigationBarView));
+    }
+
+    private void setTranslucent(ViewGroup bar) {
+        bar.setBackground(new ColorDrawable(Color.TRANSPARENT));
+    }
+
+    private ViewGroup mockView(int left, int top, int right, int bottom, Drawable background,
+            int visibility, List<ViewGroup> children) {
+        final ViewGroup v = new FrameLayout(InstrumentationRegistry.getTargetContext());
+
+        v.layout(left, top, right, bottom);
+        v.setBackground(background);
+        v.setVisibility(visibility);
+
+        for (ViewGroup c : children) {
+            v.addView(c);
+        }
+
+        return v;
+    }
+}
\ No newline at end of file
diff --git a/libs/hwui/DeferredLayerUpdater.cpp b/libs/hwui/DeferredLayerUpdater.cpp
index be7d663..569de76 100644
--- a/libs/hwui/DeferredLayerUpdater.cpp
+++ b/libs/hwui/DeferredLayerUpdater.cpp
@@ -40,7 +40,6 @@
 }
 
 DeferredLayerUpdater::~DeferredLayerUpdater() {
-    SkSafeUnref(mColorFilter);
     setTransform(nullptr);
     mRenderState.unregisterDeferredLayerUpdater(this);
     destroyLayer();
@@ -67,8 +66,11 @@
 void DeferredLayerUpdater::setPaint(const SkPaint* paint) {
     mAlpha = PaintUtils::getAlphaDirect(paint);
     mMode = PaintUtils::getBlendModeDirect(paint);
-    SkColorFilter* colorFilter = (paint) ? paint->getColorFilter() : nullptr;
-    SkRefCnt_SafeAssign(mColorFilter, colorFilter);
+    if (paint) {
+        mColorFilter = paint->refColorFilter();
+    } else {
+        mColorFilter.reset();
+    }
 }
 
 void DeferredLayerUpdater::apply() {
@@ -143,7 +145,7 @@
 #endif
         mSurfaceTexture->getTransformMatrix(transform);
 
-        updateLayer(forceFilter, transform);
+        updateLayer(forceFilter, transform, mSurfaceTexture->getCurrentDataSpace());
     }
 }
 
@@ -153,17 +155,19 @@
                         Layer::Api::OpenGL, Layer::Api::Vulkan);
 
     static const mat4 identityMatrix;
-    updateLayer(false, identityMatrix.data);
+    updateLayer(false, identityMatrix.data, HAL_DATASPACE_UNKNOWN);
 
     VkLayer* vkLayer = static_cast<VkLayer*>(mLayer);
     vkLayer->updateTexture();
 }
 
-void DeferredLayerUpdater::updateLayer(bool forceFilter, const float* textureTransform) {
+void DeferredLayerUpdater::updateLayer(bool forceFilter, const float* textureTransform,
+                                       android_dataspace dataspace) {
     mLayer->setBlend(mBlend);
     mLayer->setForceFilter(forceFilter);
     mLayer->setSize(mWidth, mHeight);
     mLayer->getTexTransform().load(textureTransform);
+    mLayer->setDataSpace(dataspace);
 }
 
 void DeferredLayerUpdater::detachSurfaceTexture() {
diff --git a/libs/hwui/DeferredLayerUpdater.h b/libs/hwui/DeferredLayerUpdater.h
index 9dc029f..fe3ee7a 100644
--- a/libs/hwui/DeferredLayerUpdater.h
+++ b/libs/hwui/DeferredLayerUpdater.h
@@ -20,6 +20,7 @@
 #include <SkMatrix.h>
 #include <cutils/compiler.h>
 #include <gui/GLConsumer.h>
+#include <system/graphics.h>
 #include <utils/StrongPointer.h>
 
 #include <GLES2/gl2.h>
@@ -41,7 +42,7 @@
     // Note that DeferredLayerUpdater assumes it is taking ownership of the layer
     // and will not call incrementRef on it as a result.
     typedef std::function<Layer*(RenderState& renderState, uint32_t layerWidth,
-                                 uint32_t layerHeight, SkColorFilter* colorFilter, int alpha,
+                                 uint32_t layerHeight, sk_sp<SkColorFilter> colorFilter, int alpha,
                                  SkBlendMode mode, bool blend)>
             CreateLayerFn;
     ANDROID_API explicit DeferredLayerUpdater(RenderState& renderState, CreateLayerFn createLayerFn,
@@ -96,7 +97,7 @@
 
     void detachSurfaceTexture();
 
-    void updateLayer(bool forceFilter, const float* textureTransform);
+    void updateLayer(bool forceFilter, const float* textureTransform, android_dataspace dataspace);
 
     void destroyLayer();
 
@@ -109,7 +110,7 @@
     int mWidth = 0;
     int mHeight = 0;
     bool mBlend = false;
-    SkColorFilter* mColorFilter = nullptr;
+    sk_sp<SkColorFilter> mColorFilter;
     int mAlpha = 255;
     SkBlendMode mMode = SkBlendMode::kSrcOver;
     sp<GLConsumer> mSurfaceTexture;
diff --git a/libs/hwui/GlLayer.cpp b/libs/hwui/GlLayer.cpp
index 32a3014..42ae29d 100644
--- a/libs/hwui/GlLayer.cpp
+++ b/libs/hwui/GlLayer.cpp
@@ -32,7 +32,7 @@
 namespace uirenderer {
 
 GlLayer::GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-                 SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend)
+                 sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode, bool blend)
         : Layer(renderState, Api::OpenGL, colorFilter, alpha, mode)
         , caches(Caches::getInstance())
         , texture(caches) {
diff --git a/libs/hwui/GlLayer.h b/libs/hwui/GlLayer.h
index 1b09191..28749a0 100644
--- a/libs/hwui/GlLayer.h
+++ b/libs/hwui/GlLayer.h
@@ -32,7 +32,7 @@
 class GlLayer : public Layer {
 public:
     GlLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-            SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend);
+            sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode, bool blend);
     virtual ~GlLayer();
 
     uint32_t getWidth() const override { return texture.mWidth; }
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 86950d5..fb8f033 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -18,34 +18,58 @@
 
 #include "renderstate/RenderState.h"
 
-#include <SkColorFilter.h>
+#include <SkToSRGBColorFilter.h>
 
 namespace android {
 namespace uirenderer {
 
-Layer::Layer(RenderState& renderState, Api api, SkColorFilter* colorFilter, int alpha,
+Layer::Layer(RenderState& renderState, Api api, sk_sp<SkColorFilter> colorFilter, int alpha,
              SkBlendMode mode)
         : GpuMemoryTracker(GpuObjectType::Layer)
         , mRenderState(renderState)
         , mApi(api)
-        , colorFilter(nullptr)
+        , mColorFilter(colorFilter)
         , alpha(alpha)
         , mode(mode) {
     // TODO: This is a violation of Android's typical ref counting, but it
     // preserves the old inc/dec ref locations. This should be changed...
     incStrong(nullptr);
-
+    buildColorSpaceWithFilter();
     renderState.registerLayer(this);
 }
 
 Layer::~Layer() {
-    SkSafeUnref(colorFilter);
-
     mRenderState.unregisterLayer(this);
 }
 
-void Layer::setColorFilter(SkColorFilter* filter) {
-    SkRefCnt_SafeAssign(colorFilter, filter);
+void Layer::setColorFilter(sk_sp<SkColorFilter> filter) {
+    if (filter != mColorFilter) {
+        mColorFilter = filter;
+        buildColorSpaceWithFilter();
+    }
+}
+
+void Layer::setDataSpace(android_dataspace dataspace) {
+    if (dataspace != mCurrentDataspace) {
+        mCurrentDataspace = dataspace;
+        buildColorSpaceWithFilter();
+    }
+}
+
+void Layer::buildColorSpaceWithFilter() {
+    sk_sp<SkColorFilter> colorSpaceFilter;
+    sk_sp<SkColorSpace> colorSpace = DataSpaceToColorSpace(mCurrentDataspace);
+    if (colorSpace && !colorSpace->isSRGB()) {
+        colorSpaceFilter = SkToSRGBColorFilter::Make(colorSpace);
+    }
+
+    if (mColorFilter && colorSpaceFilter) {
+        mColorSpaceWithFilter = mColorFilter->makeComposed(colorSpaceFilter);
+    } else if (colorSpaceFilter) {
+        mColorSpaceWithFilter = colorSpaceFilter;
+    } else {
+        mColorSpaceWithFilter = mColorFilter;
+    }
 }
 
 void Layer::postDecStrong() {
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 6921381..89bcddc 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -19,6 +19,8 @@
 #include <GpuMemoryTracker.h>
 #include <utils/RefBase.h>
 
+#include <SkColorFilter.h>
+#include <SkColorSpace.h>
 #include <SkBlendMode.h>
 #include <SkPaint.h>
 
@@ -72,9 +74,15 @@
 
     inline SkBlendMode getMode() const { return mode; }
 
-    inline SkColorFilter* getColorFilter() const { return colorFilter; }
+    inline SkColorFilter* getColorFilter() const { return mColorFilter.get(); }
 
-    void setColorFilter(SkColorFilter* filter);
+    void setColorFilter(sk_sp<SkColorFilter> filter);
+
+    void setDataSpace(android_dataspace dataspace);
+
+    void setColorSpace(sk_sp<SkColorSpace> colorSpace);
+
+    inline sk_sp<SkColorFilter> getColorSpaceWithFilter() const { return mColorSpaceWithFilter; }
 
     inline mat4& getTexTransform() { return texTransform; }
 
@@ -87,18 +95,30 @@
     void postDecStrong();
 
 protected:
-    Layer(RenderState& renderState, Api api, SkColorFilter* colorFilter, int alpha,
+    Layer(RenderState& renderState, Api api, sk_sp<SkColorFilter>, int alpha,
           SkBlendMode mode);
 
     RenderState& mRenderState;
 
 private:
+    void buildColorSpaceWithFilter();
+
     Api mApi;
 
     /**
      * Color filter used to draw this layer. Optional.
      */
-    SkColorFilter* colorFilter;
+    sk_sp<SkColorFilter> mColorFilter;
+
+    /**
+     * Colorspace of the contents of the layer. Optional.
+     */
+    android_dataspace mCurrentDataspace = HAL_DATASPACE_UNKNOWN;
+
+    /**
+     * A color filter that is the combination of the mColorFilter and mColorSpace. Optional.
+     */
+    sk_sp<SkColorFilter> mColorSpaceWithFilter;
 
     /**
      * Indicates raster data backing the layer is scaled, requiring filtration.
diff --git a/libs/hwui/VkLayer.h b/libs/hwui/VkLayer.h
index f23f472..e9664d0 100644
--- a/libs/hwui/VkLayer.h
+++ b/libs/hwui/VkLayer.h
@@ -28,7 +28,7 @@
 class VkLayer : public Layer {
 public:
     VkLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-            SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend)
+            sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode, bool blend)
             : Layer(renderState, Api::Vulkan, colorFilter, alpha, mode)
             , mWidth(layerWidth)
             , mHeight(layerHeight)
diff --git a/libs/hwui/pipeline/skia/LayerDrawable.cpp b/libs/hwui/pipeline/skia/LayerDrawable.cpp
index 293e45f..4f16ddb 100644
--- a/libs/hwui/pipeline/skia/LayerDrawable.cpp
+++ b/libs/hwui/pipeline/skia/LayerDrawable.cpp
@@ -51,8 +51,13 @@
         GrGLTextureInfo externalTexture;
         externalTexture.fTarget = glLayer->getRenderTarget();
         externalTexture.fID = glLayer->getTextureId();
-        GrBackendTexture backendTexture(layerWidth, layerHeight, kRGBA_8888_GrPixelConfig,
-                                        externalTexture);
+        // The format may not be GL_RGBA8, but given the DeferredLayerUpdater and GLConsumer don't
+        // expose that info we use it as our default.  Further, given that we only use this texture
+        // as a source this will not impact how Skia uses the texture.  The only potential affect
+        // this is anticipated to have is that for some format types if we are not bound as an OES
+        // texture we may get invalid results for SKP capture if we read back the texture.
+        externalTexture.fFormat = GL_RGBA8;
+        GrBackendTexture backendTexture(layerWidth, layerHeight, GrMipMapped::kNo, externalTexture);
         layerImage = SkImage::MakeFromTexture(context, backendTexture, kTopLeft_GrSurfaceOrigin,
                                               kPremul_SkAlphaType, nullptr);
     } else {
@@ -82,7 +87,7 @@
         SkPaint paint;
         paint.setAlpha(layer->getAlpha());
         paint.setBlendMode(layer->getMode());
-        paint.setColorFilter(sk_ref_sp(layer->getColorFilter()));
+        paint.setColorFilter(layer->getColorSpaceWithFilter());
 
         const bool nonIdentityMatrix = !matrix.isIdentity();
         if (nonIdentityMatrix) {
diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
index 74cfb28..270527d5 100644
--- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.cpp
@@ -28,6 +28,8 @@
 #include "utils/TraceUtils.h"
 
 #include <GrBackendSurface.h>
+#include <SkImageInfo.h>
+#include <SkBlendMode.h>
 
 #include <cutils/properties.h>
 #include <strings.h>
@@ -129,20 +131,49 @@
     deferredLayer->updateTexImage();
     deferredLayer->apply();
 
+    // drop the colorSpace as we only support readback into sRGB or extended sRGB
+    SkImageInfo surfaceInfo = bitmap->info().makeColorSpace(nullptr);
+
     /* This intermediate surface is present to work around a bug in SwiftShader that
      * prevents us from reading the contents of the layer's texture directly. The
      * workaround involves first rendering that texture into an intermediate buffer and
      * then reading from the intermediate buffer into the bitmap.
      */
     sk_sp<SkSurface> tmpSurface = SkSurface::MakeRenderTarget(mRenderThread.getGrContext(),
-                                                              SkBudgeted::kYes, bitmap->info());
+                                                              SkBudgeted::kYes, surfaceInfo);
+
+    if (!tmpSurface.get()) {
+        surfaceInfo = surfaceInfo.makeColorType(SkColorType::kN32_SkColorType);
+        tmpSurface = SkSurface::MakeRenderTarget(mRenderThread.getGrContext(),
+                                                 SkBudgeted::kYes, surfaceInfo);
+        if (!tmpSurface.get()) {
+            ALOGW("Unable to readback GPU contents into the provided bitmap");
+            return false;
+        }
+    }
 
     Layer* layer = deferredLayer->backingLayer();
     const SkRect dstRect = SkRect::MakeIWH(bitmap->width(), bitmap->height());
     if (LayerDrawable::DrawLayer(mRenderThread.getGrContext(), tmpSurface->getCanvas(), layer,
                                  &dstRect)) {
         sk_sp<SkImage> tmpImage = tmpSurface->makeImageSnapshot();
-        if (tmpImage->readPixels(bitmap->info(), bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) {
+        if (tmpImage->readPixels(surfaceInfo, bitmap->getPixels(), bitmap->rowBytes(), 0, 0)) {
+            bitmap->notifyPixelsChanged();
+            return true;
+        }
+
+        // if we fail to readback from the GPU directly (e.g. 565) then we attempt to read into 8888
+        // and then draw that into the destination format before giving up.
+        SkBitmap tmpBitmap;
+        SkImageInfo bitmapInfo = SkImageInfo::MakeN32(bitmap->width(), bitmap->height(),
+                                                      bitmap->alphaType());
+        if (tmpBitmap.tryAllocPixels(bitmapInfo) &&
+                tmpImage->readPixels(bitmapInfo, tmpBitmap.getPixels(),
+                                     tmpBitmap.rowBytes(), 0, 0)) {
+            SkCanvas canvas(*bitmap);
+            SkPaint paint;
+            paint.setBlendMode(SkBlendMode::kSrc);
+            canvas.drawBitmap(tmpBitmap, 0, 0, &paint);
             bitmap->notifyPixelsChanged();
             return true;
         }
@@ -152,7 +183,7 @@
 }
 
 static Layer* createLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-                          SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend) {
+                          sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode, bool blend) {
     GlLayer* layer =
             new GlLayer(renderState, layerWidth, layerHeight, colorFilter, alpha, mode, blend);
     layer->generateTexture();
@@ -266,6 +297,26 @@
     GLuint mTexture = 0;
 };
 
+static bool isFP16Supported(const sk_sp<GrContext>& grContext) {
+    static std::once_flag sOnceFlag;
+    static bool supported = false;
+
+    std::call_once(sOnceFlag, [](const sk_sp<GrContext>& grContext) {
+        if (!grContext->caps()->isConfigTexturable(kRGBA_half_GrPixelConfig)) {
+            supported = false;
+            return;
+        }
+
+        sp<GraphicBuffer> buffer = new GraphicBuffer(1, 1, PIXEL_FORMAT_RGBA_FP16,
+                GraphicBuffer::USAGE_HW_TEXTURE | GraphicBuffer::USAGE_SW_WRITE_NEVER |
+                        GraphicBuffer::USAGE_SW_READ_NEVER, "tempFp16Buffer");
+        status_t error = buffer->initCheck();
+        supported = !error;
+    }, grContext);
+
+    return supported;
+}
+
 sk_sp<Bitmap> SkiaOpenGLPipeline::allocateHardwareBitmap(renderthread::RenderThread& renderThread,
                                                          SkBitmap& skBitmap) {
     renderThread.eglManager().initialize();
@@ -287,7 +338,7 @@
             type = GL_UNSIGNED_BYTE;
             break;
         case kRGBA_F16_SkColorType:
-            isSupported = grContext->caps()->isConfigTexturable(kRGBA_half_GrPixelConfig);
+            isSupported = isFP16Supported(grContext);
             if (isSupported) {
                 type = GL_HALF_FLOAT;
                 pixelFormat = PIXEL_FORMAT_RGBA_FP16;
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
index 9e73046..d66cba1 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
@@ -147,6 +147,7 @@
             GrContext* currentContext = layerNode->getLayerSurface()->getCanvas()->getGrContext();
             if (cachedContext.get() != currentContext) {
                 if (cachedContext.get()) {
+                    ATRACE_NAME("flush layers (context changed)");
                     cachedContext->flush();
                 }
                 cachedContext.reset(SkSafeRef(currentContext));
@@ -155,6 +156,7 @@
     }
 
     if (cachedContext.get()) {
+        ATRACE_NAME("flush layers");
         cachedContext->flush();
     }
 }
diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
index 6530074..5825060 100644
--- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp
@@ -115,7 +115,8 @@
 }
 
 static Layer* createLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-                          SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend) {
+                          sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode,
+                          bool blend) {
     return new VkLayer(renderState, layerWidth, layerHeight, colorFilter, alpha, mode, blend);
 }
 
diff --git a/libs/hwui/renderthread/OpenGLPipeline.cpp b/libs/hwui/renderthread/OpenGLPipeline.cpp
index 876af47..f96001e 100644
--- a/libs/hwui/renderthread/OpenGLPipeline.cpp
+++ b/libs/hwui/renderthread/OpenGLPipeline.cpp
@@ -123,7 +123,8 @@
 }
 
 static Layer* createLayer(RenderState& renderState, uint32_t layerWidth, uint32_t layerHeight,
-                          SkColorFilter* colorFilter, int alpha, SkBlendMode mode, bool blend) {
+                          sk_sp<SkColorFilter> colorFilter, int alpha, SkBlendMode mode,
+                          bool blend) {
     GlLayer* layer =
             new GlLayer(renderState, layerWidth, layerHeight, colorFilter, alpha, mode, blend);
     Caches::getInstance().textureState().activateTexture(0);
diff --git a/libs/hwui/tests/common/TestListViewSceneBase.cpp b/libs/hwui/tests/common/TestListViewSceneBase.cpp
index a7f4d4d..fd33133 100644
--- a/libs/hwui/tests/common/TestListViewSceneBase.cpp
+++ b/libs/hwui/tests/common/TestListViewSceneBase.cpp
@@ -57,7 +57,8 @@
     int pxOffset = -(scrollPx % (mItemSpacing + mItemHeight));
 
     std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(
-            mListView->stagingProperties().getWidth(), mListView->stagingProperties().getHeight()));
+            mListView->stagingProperties().getWidth(), mListView->stagingProperties().getHeight(),
+            mListView.get()));
     for (size_t ci = 0; ci < mListItems.size(); ci++) {
         // update item position
         auto listItem = mListItems[(ci + itemIndexOffset) % mListItems.size()];
diff --git a/libs/hwui/tests/common/TestUtils.cpp b/libs/hwui/tests/common/TestUtils.cpp
index b99854e..02ac97e 100644
--- a/libs/hwui/tests/common/TestUtils.cpp
+++ b/libs/hwui/tests/common/TestUtils.cpp
@@ -75,7 +75,7 @@
     layerUpdater->setTransform(&transform);
 
     // updateLayer so it's ready to draw
-    layerUpdater->updateLayer(true, Matrix4::identity().data);
+    layerUpdater->updateLayer(true, Matrix4::identity().data, HAL_DATASPACE_UNKNOWN);
     if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
         static_cast<GlLayer*>(layerUpdater->backingLayer())
                 ->setRenderTarget(GL_TEXTURE_EXTERNAL_OES);
diff --git a/libs/hwui/tests/common/TestUtils.h b/libs/hwui/tests/common/TestUtils.h
index 1bfa046..2752ae9 100644
--- a/libs/hwui/tests/common/TestUtils.h
+++ b/libs/hwui/tests/common/TestUtils.h
@@ -250,7 +250,8 @@
 
     static void recordNode(RenderNode& node, std::function<void(Canvas&)> contentCallback) {
         std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(
-                node.stagingProperties().getWidth(), node.stagingProperties().getHeight()));
+                node.stagingProperties().getWidth(), node.stagingProperties().getHeight(),
+                &node));
         contentCallback(*canvas.get());
         node.setStagingDisplayList(canvas->finishRecording());
     }
diff --git a/libs/hwui/tests/common/scenes/GlyphStressAnimation.cpp b/libs/hwui/tests/common/scenes/GlyphStressAnimation.cpp
index 38999cb..f0a5e9d 100644
--- a/libs/hwui/tests/common/scenes/GlyphStressAnimation.cpp
+++ b/libs/hwui/tests/common/scenes/GlyphStressAnimation.cpp
@@ -44,7 +44,8 @@
 
         std::unique_ptr<Canvas> canvas(
                 Canvas::create_recording_canvas(container->stagingProperties().getWidth(),
-                                                container->stagingProperties().getHeight()));
+                                                container->stagingProperties().getHeight(),
+                                                container.get()));
 
         Paint paint;
         paint.setAntiAlias(true);
diff --git a/libs/hwui/tests/common/scenes/TvApp.cpp b/libs/hwui/tests/common/scenes/TvApp.cpp
index 003d8e9..a64e844 100644
--- a/libs/hwui/tests/common/scenes/TvApp.cpp
+++ b/libs/hwui/tests/common/scenes/TvApp.cpp
@@ -194,7 +194,8 @@
 
         // re-recording card's canvas, not necessary but to add some burden to CPU
         std::unique_ptr<Canvas> cardcanvas(Canvas::create_recording_canvas(
-                card->stagingProperties().getWidth(), card->stagingProperties().getHeight()));
+                card->stagingProperties().getWidth(), card->stagingProperties().getHeight(),
+                card.get()));
         sp<RenderNode> image = mImages[ci];
         sp<RenderNode> infoArea = mInfoAreas[ci];
         cardcanvas->drawRenderNode(infoArea.get());
@@ -205,14 +206,16 @@
             sp<RenderNode> overlay = mOverlays[ci];
             std::unique_ptr<Canvas> canvas(
                     Canvas::create_recording_canvas(overlay->stagingProperties().getWidth(),
-                                                    overlay->stagingProperties().getHeight()));
+                                                    overlay->stagingProperties().getHeight(),
+                                                    overlay.get()));
             canvas->drawColor((curFrame % 150) << 24, SkBlendMode::kSrcOver);
             overlay->setStagingDisplayList(canvas->finishRecording());
             cardcanvas->drawRenderNode(overlay.get());
         } else {
             // re-recording image node's canvas, animating ColorFilter
             std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(
-                    image->stagingProperties().getWidth(), image->stagingProperties().getHeight()));
+                    image->stagingProperties().getWidth(), image->stagingProperties().getHeight(),
+                    image.get()));
             SkPaint paint;
             sk_sp<SkColorFilter> filter(
                     SkColorFilter::MakeModeFilter((curFrame % 150) << 24, SkBlendMode::kSrcATop));
diff --git a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
index b8b5050..f29830f 100644
--- a/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
+++ b/libs/hwui/tests/unit/DeferredLayerUpdaterTests.cpp
@@ -44,7 +44,7 @@
     // push the deferred updates to the layer
     Matrix4 scaledMatrix;
     scaledMatrix.loadScale(0.5, 0.5, 0.0);
-    layerUpdater->updateLayer(true, scaledMatrix.data);
+    layerUpdater->updateLayer(true, scaledMatrix.data, HAL_DATASPACE_UNKNOWN);
     if (layerUpdater->backingLayer()->getApi() == Layer::Api::OpenGL) {
         GlLayer* glLayer = static_cast<GlLayer*>(layerUpdater->backingLayer());
         glLayer->setRenderTarget(GL_TEXTURE_EXTERNAL_OES);
diff --git a/libs/hwui/utils/Color.cpp b/libs/hwui/utils/Color.cpp
index c2af867..75740e8 100644
--- a/libs/hwui/utils/Color.cpp
+++ b/libs/hwui/utils/Color.cpp
@@ -16,6 +16,8 @@
 
 #include "Color.h"
 
+
+#include <utils/Log.h>
 #include <cmath>
 
 namespace android {
@@ -53,5 +55,57 @@
     return false;
 }
 
+sk_sp<SkColorSpace> DataSpaceToColorSpace(android_dataspace dataspace) {
+
+    SkColorSpace::Gamut gamut;
+    switch (dataspace & HAL_DATASPACE_STANDARD_MASK) {
+        case HAL_DATASPACE_STANDARD_BT709:
+            gamut = SkColorSpace::kSRGB_Gamut;
+            break;
+        case HAL_DATASPACE_STANDARD_BT2020:
+            gamut = SkColorSpace::kRec2020_Gamut;
+            break;
+        case HAL_DATASPACE_STANDARD_DCI_P3:
+            gamut = SkColorSpace::kDCIP3_D65_Gamut;
+            break;
+        case HAL_DATASPACE_STANDARD_ADOBE_RGB:
+            gamut = SkColorSpace::kAdobeRGB_Gamut;
+            break;
+        case HAL_DATASPACE_STANDARD_UNSPECIFIED:
+            return nullptr;
+        case HAL_DATASPACE_STANDARD_BT601_625:
+        case HAL_DATASPACE_STANDARD_BT601_625_UNADJUSTED:
+        case HAL_DATASPACE_STANDARD_BT601_525:
+        case HAL_DATASPACE_STANDARD_BT601_525_UNADJUSTED:
+        case HAL_DATASPACE_STANDARD_BT2020_CONSTANT_LUMINANCE:
+        case HAL_DATASPACE_STANDARD_BT470M:
+        case HAL_DATASPACE_STANDARD_FILM:
+        default:
+            ALOGW("Unsupported Gamut: %d", dataspace);
+            return nullptr;
+    }
+
+    switch (dataspace & HAL_DATASPACE_TRANSFER_MASK) {
+        case HAL_DATASPACE_TRANSFER_LINEAR:
+            return SkColorSpace::MakeRGB(SkColorSpace::kLinear_RenderTargetGamma, gamut);
+        case HAL_DATASPACE_TRANSFER_SRGB:
+            return SkColorSpace::MakeRGB(SkColorSpace::kSRGB_RenderTargetGamma, gamut);
+        case HAL_DATASPACE_TRANSFER_GAMMA2_2:
+            return SkColorSpace::MakeRGB({2.2f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, gamut);
+        case HAL_DATASPACE_TRANSFER_GAMMA2_6:
+            return SkColorSpace::MakeRGB({2.6f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, gamut);
+        case HAL_DATASPACE_TRANSFER_GAMMA2_8:
+            return SkColorSpace::MakeRGB({2.8f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, gamut);
+        case HAL_DATASPACE_TRANSFER_UNSPECIFIED:
+            return nullptr;
+        case HAL_DATASPACE_TRANSFER_SMPTE_170M:
+        case HAL_DATASPACE_TRANSFER_ST2084:
+        case HAL_DATASPACE_TRANSFER_HLG:
+        default:
+            ALOGW("Unsupported Gamma: %d", dataspace);
+            return nullptr;
+    }
+}
+
 };  // namespace uirenderer
 };  // namespace android
diff --git a/libs/hwui/utils/Color.h b/libs/hwui/utils/Color.h
index 7ac0d96..2bec1f5 100644
--- a/libs/hwui/utils/Color.h
+++ b/libs/hwui/utils/Color.h
@@ -17,6 +17,7 @@
 #define COLOR_H
 
 #include <math.h>
+#include <system/graphics.h>
 
 #include <SkColor.h>
 #include <SkColorSpace.h>
@@ -111,6 +112,8 @@
 // approximated with the native sRGB transfer function. This method
 // returns true for sRGB, gamma 2.2 and Display P3 for instance
 bool transferFunctionCloseToSRGB(const SkColorSpace* colorSpace);
+
+sk_sp<SkColorSpace> DataSpaceToColorSpace(android_dataspace dataspace);
 } /* namespace uirenderer */
 } /* namespace android */
 
diff --git a/libs/incident/proto/android/section.proto b/libs/incident/proto/android/section.proto
index b3ed393..e8280ed 100644
--- a/libs/incident/proto/android/section.proto
+++ b/libs/incident/proto/android/section.proto
@@ -51,6 +51,7 @@
 message SectionFlags {
   optional SectionType type = 1 [default = SECTION_NONE];
   optional string args = 2;
+  optional bool device_specific = 3 [default = false];
 }
 
 extend google.protobuf.FieldOptions {
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index 68463e1..566db94 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -4558,8 +4558,7 @@
     /**
      * The list of {@link AudioDeviceCallback} objects to receive add/remove notifications.
      */
-    private ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate>
-        mDeviceCallbacks =
+    private final ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate> mDeviceCallbacks =
             new ArrayMap<AudioDeviceCallback, NativeEventHandlerDelegate>();
 
     /**
@@ -4859,22 +4858,21 @@
                     calcListDeltas(mPreviousPorts, current_ports, GET_DEVICES_ALL);
             AudioDeviceInfo[] removed_devices =
                     calcListDeltas(current_ports, mPreviousPorts, GET_DEVICES_ALL);
-
             if (added_devices.length != 0 || removed_devices.length != 0) {
                 synchronized (mDeviceCallbacks) {
                     for (int i = 0; i < mDeviceCallbacks.size(); i++) {
                         handler = mDeviceCallbacks.valueAt(i).getHandler();
                         if (handler != null) {
-                            if (added_devices.length != 0) {
-                                handler.sendMessage(Message.obtain(handler,
-                                                                   MSG_DEVICES_DEVICES_ADDED,
-                                                                   added_devices));
-                            }
                             if (removed_devices.length != 0) {
                                 handler.sendMessage(Message.obtain(handler,
                                                                    MSG_DEVICES_DEVICES_REMOVED,
                                                                    removed_devices));
                             }
+                            if (added_devices.length != 0) {
+                                handler.sendMessage(Message.obtain(handler,
+                                                                   MSG_DEVICES_DEVICES_ADDED,
+                                                                   added_devices));
+                            }
                         }
                     }
                 }
diff --git a/packages/BackupRestoreConfirmation/res/values-da/strings.xml b/packages/BackupRestoreConfirmation/res/values-da/strings.xml
index 94872e2..8b7e21f 100644
--- a/packages/BackupRestoreConfirmation/res/values-da/strings.xml
+++ b/packages/BackupRestoreConfirmation/res/values-da/strings.xml
@@ -24,12 +24,12 @@
     <string name="restore_confirm_text" msgid="7499866728030461776">"Der er anmodet om en fuld backup af alle data til en tilsluttet stationær computer. Vil du tillade dette?\n\nHvis du ikke har anmodet om backup, skal du ikke tillade denne handling."</string>
     <string name="allow_restore_button_label" msgid="3081286752277127827">"Gendan mine data"</string>
     <string name="deny_restore_button_label" msgid="1724367334453104378">"Gendan ikke"</string>
-    <string name="current_password_text" msgid="8268189555578298067">"Indtast din aktuelle adgangskode til backup nedenfor:"</string>
-    <string name="device_encryption_restore_text" msgid="1570864916855208992">"Indtast adgangskoden til kryptering for din enhed nedenfor."</string>
-    <string name="device_encryption_backup_text" msgid="5866590762672844664">"Indtast adgangskoden til kryptering for din enhed nedenfor. Denne bliver også brugt til at kryptere sikkerhedskopien af arkivet."</string>
+    <string name="current_password_text" msgid="8268189555578298067">"Angiv din aktuelle adgangskode til backup nedenfor:"</string>
+    <string name="device_encryption_restore_text" msgid="1570864916855208992">"Angiv adgangskoden til kryptering for din enhed nedenfor."</string>
+    <string name="device_encryption_backup_text" msgid="5866590762672844664">"Angiv adgangskoden til kryptering for din enhed nedenfor. Denne bliver også brugt til at kryptere sikkerhedskopien af arkivet."</string>
     <string name="backup_enc_password_text" msgid="4981585714795233099">"Angiv en adgangskode, som skal bruges til kryptering af alle dine sikkerhedsdata. Hvis dette felt er tomt, bruges din aktuelle adgangskode til backup:"</string>
     <string name="backup_enc_password_optional" msgid="1350137345907579306">"Hvis du ønsker at kryptere sikkerhedsdataene, skal du indtaste en adgangskode nedenfor:"</string>
-    <string name="backup_enc_password_required" msgid="7889652203371654149">"Eftersom din enhed er krypteret, skal du kryptere din backup. Indtast en adgangskode nedenfor:"</string>
+    <string name="backup_enc_password_required" msgid="7889652203371654149">"Eftersom din enhed er krypteret, skal du kryptere din backup. Angiv en adgangskode nedenfor:"</string>
     <string name="restore_enc_password_text" msgid="6140898525580710823">"Hvis gendannelsesdataene er krypteret, skal du angive adgangskoden nedenfor:"</string>
     <string name="toast_backup_started" msgid="550354281452756121">"Backup begynder..."</string>
     <string name="toast_backup_ended" msgid="3818080769548726424">"Backup er færdig"</string>
diff --git a/packages/CaptivePortalLogin/AndroidManifest.xml b/packages/CaptivePortalLogin/AndroidManifest.xml
index 5fc9627..72e37ed 100644
--- a/packages/CaptivePortalLogin/AndroidManifest.xml
+++ b/packages/CaptivePortalLogin/AndroidManifest.xml
@@ -23,6 +23,7 @@
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
     <uses-permission android:name="android.permission.NETWORK_SETTINGS" />
+    <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
 
     <application android:label="@string/app_name"
                  android:usesCleartextTraffic="true">
diff --git a/packages/CarrierDefaultApp/AndroidManifest.xml b/packages/CarrierDefaultApp/AndroidManifest.xml
index 824d9f4..4d9aaec 100644
--- a/packages/CarrierDefaultApp/AndroidManifest.xml
+++ b/packages/CarrierDefaultApp/AndroidManifest.xml
@@ -25,6 +25,7 @@
     <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
     <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
     <uses-permission android:name="android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS" />
+    <uses-permission android:name="android.permission.NETWORK_BYPASS_PRIVATE_DNS" />
     <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME" />
 
     <application
diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
index 7479d9aa..b1933373 100644
--- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
+++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
@@ -111,13 +111,11 @@
         mWebView.setWebViewClient(mWebViewClient);
         mWebView.setWebChromeClient(new MyWebChromeClient());
 
-        mNetwork = getNetworkForCaptivePortal();
-        if (mNetwork == null) {
+        final Network network = getNetworkForCaptivePortal();
+        if (network == null) {
             requestNetworkForCaptivePortal();
         } else {
-            mCm.bindProcessToNetwork(mNetwork);
-            mCm.setProcessDefaultNetworkForHostResolution(
-                    ResolvUtil.getNetworkWithUseLocalNameserversFlag(mNetwork));
+            setNetwork(network);
             // Start initial page load so WebView finishes loading proxy settings.
             // Actual load of mUrl is initiated by MyWebViewClient.
             mWebView.loadData("", "text/html", null);
@@ -159,6 +157,15 @@
         super.onDestroy();
     }
 
+    private void setNetwork(Network network) {
+        if (network != null) {
+            mCm.bindProcessToNetwork(network);
+            mCm.setProcessDefaultNetworkForHostResolution(
+                    ResolvUtil.getNetworkWithUseLocalNameserversFlag(network));
+        }
+        mNetwork = network;
+    }
+
     // Find WebView's proxy BroadcastReceiver and prompt it to read proxy system properties.
     private void setWebViewProxy() {
         LoadedApk loadedApk = getApplication().mLoadedApk;
@@ -235,6 +242,7 @@
     private void testForCaptivePortal() {
         mTestingThread = new Thread(new Runnable() {
             public void run() {
+                final Network network = ResolvUtil.makeNetworkWithPrivateDnsBypass(mNetwork);
                 // Give time for captive portal to open.
                 try {
                     Thread.sleep(1000);
@@ -245,7 +253,7 @@
                 int httpResponseCode = 500;
                 int oldTag = TrafficStats.getAndSetThreadStatsTag(TrafficStats.TAG_SYSTEM_PROBE);
                 try {
-                    urlConnection = (HttpURLConnection) mNetwork.openConnection(
+                    urlConnection = (HttpURLConnection) network.openConnection(
                             new URL(mCm.getCaptivePortalServerUrl()));
                     urlConnection.setInstanceFollowRedirects(false);
                     urlConnection.setConnectTimeout(SOCKET_TIMEOUT_MS);
@@ -292,8 +300,7 @@
             @Override
             public void onAvailable(Network network) {
                 if (DBG) logd("Network available: " + network);
-                mCm.bindProcessToNetwork(network);
-                mNetwork = network;
+                setNetwork(network);
                 runOnUiThreadIfNotFinishing(() -> {
                     if (mReload) {
                         mWebView.reload();
diff --git a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
index 1ca3c1d..cdaabdc 100644
--- a/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
+++ b/packages/CompanionDeviceManager/src/com/android/companiondevicemanager/DeviceDiscoveryService.java
@@ -234,7 +234,9 @@
 
         DeviceChooserActivity activity = mActivity;
         if (activity != null) {
-            activity.mDeviceListView.removeFooterView(activity.mLoadingIndicator);
+            if (activity.mDeviceListView != null) {
+                activity.mDeviceListView.removeFooterView(activity.mLoadingIndicator);
+            }
             mActivity = null;
         }
 
diff --git a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
index 2a82fc9..0a720a5 100644
--- a/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
+++ b/packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java
@@ -38,6 +38,9 @@
 import android.provider.DocumentsContract.Path;
 import android.provider.DocumentsContract.Root;
 import android.provider.Settings;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.OsConstants;
 import android.text.TextUtils;
 import android.util.ArrayMap;
 import android.util.DebugUtils;
@@ -360,14 +363,19 @@
 
     @Override
     protected File getFileForDocId(String docId, boolean visible) throws FileNotFoundException {
+        return getFileForDocId(docId, visible, true);
+    }
+
+    private File getFileForDocId(String docId, boolean visible, boolean mustExist)
+            throws FileNotFoundException {
         RootInfo root = getRootFromDocId(docId);
-        return buildFile(root, docId, visible);
+        return buildFile(root, docId, visible, mustExist);
     }
 
     private Pair<RootInfo, File> resolveDocId(String docId, boolean visible)
             throws FileNotFoundException {
         RootInfo root = getRootFromDocId(docId);
-        return Pair.create(root, buildFile(root, docId, visible));
+        return Pair.create(root, buildFile(root, docId, visible, true));
     }
 
     private RootInfo getRootFromDocId(String docId) throws FileNotFoundException {
@@ -385,7 +393,7 @@
         return root;
     }
 
-    private File buildFile(RootInfo root, String docId, boolean visible)
+    private File buildFile(RootInfo root, String docId, boolean visible, boolean mustExist)
             throws FileNotFoundException {
         final int splitIndex = docId.indexOf(':', 1);
         final String path = docId.substring(splitIndex + 1);
@@ -398,7 +406,7 @@
             target.mkdirs();
         }
         target = new File(target, path);
-        if (!target.exists()) {
+        if (mustExist && !target.exists()) {
             throw new FileNotFoundException("Missing file for " + docId + " at " + target);
         }
         return target;
@@ -410,6 +418,19 @@
     }
 
     @Override
+    protected void onDocIdChanged(String docId) {
+        try {
+            // Touch the visible path to ensure that any sdcardfs caches have
+            // been updated to reflect underlying changes on disk.
+            final File visiblePath = getFileForDocId(docId, true, false);
+            if (visiblePath != null) {
+                Os.access(visiblePath.getAbsolutePath(), OsConstants.F_OK);
+            }
+        } catch (FileNotFoundException | ErrnoException ignored) {
+        }
+    }
+
+    @Override
     public Cursor queryRoots(String[] projection) throws FileNotFoundException {
         final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection));
         synchronized (mRootsLock) {
diff --git a/packages/Osu/Android.mk b/packages/Osu/Android.mk
deleted file mode 100644
index 63c7578..0000000
--- a/packages/Osu/Android.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SRC_FILES += \
-	src/com/android/hotspot2/app/IOSUAccessor.aidl \
-	src/com/android/hotspot2/flow/IFlowService.aidl
-
-LOCAL_JAVA_LIBRARIES := telephony-common ims-common bouncycastle conscrypt
-
-LOCAL_PACKAGE_NAME := Osu
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-
-include $(BUILD_PACKAGE)
-
-########################
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/Osu/AndroidManifest.xml b/packages/Osu/AndroidManifest.xml
deleted file mode 100644
index b804739..0000000
--- a/packages/Osu/AndroidManifest.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.hotspot2">
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
-    <uses-permission android:name="android.permission.READ_WIFI_CREDENTIAL" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
-    <uses-permission android:name="android.permission.INTERNET" />
-
-    <application
-    android:enabled="true"
-        android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
-        android:label="@string/app_name"
-        android:supportsRtl="true">
-        <activity android:name="com.android.hotspot2.app.MainActivity">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="com.android.hotspot2.OSU_NOTIFICATION" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-        <activity android:name="com.android.hotspot2.osu.OSUWebView">
-        </activity>
-        <service android:name=".app.OSUService" android:directBootAware="true">
-        </service>
-        <service android:name=".flow.FlowService" android:process=":osuflow">
-        </service>
-    </application>
-
-</manifest>
diff --git a/packages/Osu/res/layout/activity_main.xml b/packages/Osu/res/layout/activity_main.xml
deleted file mode 100644
index 7e33537..0000000
--- a/packages/Osu/res/layout/activity_main.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <TextView
-        android:id="@+id/no_osu"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="@string/no_osu"/>
-    <ListView
-        android:id="@+id/profile_list"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:divider="#1F000000"
-        android:dividerHeight="1dp"
-        android:padding="16dp" />
-
-</LinearLayout>
diff --git a/packages/Osu/res/layout/list_item.xml b/packages/Osu/res/layout/list_item.xml
deleted file mode 100644
index eb431d3..0000000
--- a/packages/Osu/res/layout/list_item.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:gravity="top"
-    android:layout_marginTop="10sp"
-    android:layout_marginBottom="10sp"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content">
-    <ImageView
-        android:id="@+id/profile_logo"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_weight="1"
-        android:layout_width="0dp"
-        android:layout_height="wrap_content">
-
-        <TextView
-            android:id="@+id/profile_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textSize="20sp"/>
-
-        <TextView
-            android:id="@+id/profile_detail"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginBottom="10sp"
-            android:textSize="12sp"/>
-
-    </LinearLayout>
-
-</LinearLayout>
diff --git a/packages/Osu/res/layout/osu_web_view.xml b/packages/Osu/res/layout/osu_web_view.xml
deleted file mode 100644
index 4eafb39..0000000
--- a/packages/Osu/res/layout/osu_web_view.xml
+++ /dev/null
@@ -1,13 +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">
-    <WebView
-        android:id="@+id/webview"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_alignParentBottom="true"
-        android:layout_alignParentRight="true" />
-
-</FrameLayout>
diff --git a/packages/Osu/res/mipmap-hdpi/ic_launcher.png b/packages/Osu/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index cde69bc..0000000
--- a/packages/Osu/res/mipmap-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu/res/mipmap-mdpi/ic_launcher.png b/packages/Osu/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c133a0c..0000000
--- a/packages/Osu/res/mipmap-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu/res/mipmap-xhdpi/ic_launcher.png b/packages/Osu/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index bfa42f0..0000000
--- a/packages/Osu/res/mipmap-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu/res/mipmap-xxhdpi/ic_launcher.png b/packages/Osu/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 324e72c..0000000
--- a/packages/Osu/res/mipmap-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu/res/mipmap-xxxhdpi/ic_launcher.png b/packages/Osu/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index aee44e1..0000000
--- a/packages/Osu/res/mipmap-xxxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu/res/values-w820dp/dimens.xml b/packages/Osu/res/values-w820dp/dimens.xml
deleted file mode 100644
index 63fc816..0000000
--- a/packages/Osu/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<resources>
-    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
-         (such as screen margins) for screens with more than 820dp of available width. This
-         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
-    <dimen name="activity_horizontal_margin">64dp</dimen>
-</resources>
diff --git a/packages/Osu/res/values/colors.xml b/packages/Osu/res/values/colors.xml
deleted file mode 100644
index 3ab3e9c..0000000
--- a/packages/Osu/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <color name="colorPrimary">#3F51B5</color>
-    <color name="colorPrimaryDark">#303F9F</color>
-    <color name="colorAccent">#FF4081</color>
-</resources>
diff --git a/packages/Osu/res/values/dimens.xml b/packages/Osu/res/values/dimens.xml
deleted file mode 100644
index 47c8224..0000000
--- a/packages/Osu/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/Osu/res/values/strings.xml b/packages/Osu/res/values/strings.xml
deleted file mode 100644
index 93593dc..0000000
--- a/packages/Osu/res/values/strings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<resources>
-    <string name="app_name">OSU</string>
-    <string name="no_osu">No OSU available</string>
-</resources>
diff --git a/packages/Osu/src/com/android/anqp/ANQPElement.java b/packages/Osu/src/com/android/anqp/ANQPElement.java
deleted file mode 100644
index 58aee29..0000000
--- a/packages/Osu/src/com/android/anqp/ANQPElement.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.android.anqp;
-
-/**
- * Base class for an IEEE802.11u ANQP element.
- */
-public abstract class ANQPElement {
-    private final Constants.ANQPElementType mID;
-
-    protected ANQPElement(Constants.ANQPElementType id) {
-        mID = id;
-    }
-
-    public Constants.ANQPElementType getID() {
-        return mID;
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/Constants.java b/packages/Osu/src/com/android/anqp/Constants.java
deleted file mode 100644
index 214bb93..0000000
--- a/packages/Osu/src/com/android/anqp/Constants.java
+++ /dev/null
@@ -1,233 +0,0 @@
-package com.android.anqp;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.Charset;
-import java.util.Collection;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * ANQP related constants (802.11-2012)
- */
-public class Constants {
-
-    public static final int NIBBLE_MASK = 0x0f;
-    public static final int BYTE_MASK = 0xff;
-    public static final int SHORT_MASK = 0xffff;
-    public static final long INT_MASK = 0xffffffffL;
-    public static final int BYTES_IN_SHORT = 2;
-    public static final int BYTES_IN_INT = 4;
-    public static final int BYTES_IN_EUI48 = 6;
-    public static final long MILLIS_IN_A_SEC = 1000L;
-
-    public static final int HS20_PREFIX = 0x119a6f50;   // Note that this is represented as a LE int
-    public static final int HS20_FRAME_PREFIX = 0x109a6f50;
-    public static final int UTF8_INDICATOR = 1;
-
-    public static final int LANG_CODE_LENGTH = 3;
-
-    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;
-
-    public enum ANQPElementType {
-        ANQPQueryList,
-        ANQPCapabilityList,
-        ANQPVenueName,
-        ANQPEmergencyNumber,
-        ANQPNwkAuthType,
-        ANQPRoamingConsortium,
-        ANQPIPAddrAvailability,
-        ANQPNAIRealm,
-        ANQP3GPPNetwork,
-        ANQPGeoLoc,
-        ANQPCivicLoc,
-        ANQPLocURI,
-        ANQPDomName,
-        ANQPEmergencyAlert,
-        ANQPTDLSCap,
-        ANQPEmergencyNAI,
-        ANQPNeighborReport,
-        ANQPVendorSpec,
-        HSQueryList,
-        HSCapabilityList,
-        HSFriendlyName,
-        HSWANMetrics,
-        HSConnCapability,
-        HSNAIHomeRealmQuery,
-        HSOperatingclass,
-        HSOSUProviders,
-        HSIconRequest,
-        HSIconFile
-    }
-
-    private static final Map<Integer, ANQPElementType> sAnqpMap = new HashMap<>();
-    private static final Map<Integer, ANQPElementType> sHs20Map = new HashMap<>();
-    private static final Map<ANQPElementType, Integer> sRevAnqpmap =
-            new EnumMap<>(ANQPElementType.class);
-    private static final Map<ANQPElementType, Integer> sRevHs20map =
-            new EnumMap<>(ANQPElementType.class);
-
-    static {
-        sAnqpMap.put(ANQP_QUERY_LIST, ANQPElementType.ANQPQueryList);
-        sAnqpMap.put(ANQP_CAPABILITY_LIST, ANQPElementType.ANQPCapabilityList);
-        sAnqpMap.put(ANQP_VENUE_NAME, ANQPElementType.ANQPVenueName);
-        sAnqpMap.put(ANQP_EMERGENCY_NUMBER, ANQPElementType.ANQPEmergencyNumber);
-        sAnqpMap.put(ANQP_NWK_AUTH_TYPE, ANQPElementType.ANQPNwkAuthType);
-        sAnqpMap.put(ANQP_ROAMING_CONSORTIUM, ANQPElementType.ANQPRoamingConsortium);
-        sAnqpMap.put(ANQP_IP_ADDR_AVAILABILITY, ANQPElementType.ANQPIPAddrAvailability);
-        sAnqpMap.put(ANQP_NAI_REALM, ANQPElementType.ANQPNAIRealm);
-        sAnqpMap.put(ANQP_3GPP_NETWORK, ANQPElementType.ANQP3GPPNetwork);
-        sAnqpMap.put(ANQP_GEO_LOC, ANQPElementType.ANQPGeoLoc);
-        sAnqpMap.put(ANQP_CIVIC_LOC, ANQPElementType.ANQPCivicLoc);
-        sAnqpMap.put(ANQP_LOC_URI, ANQPElementType.ANQPLocURI);
-        sAnqpMap.put(ANQP_DOM_NAME, ANQPElementType.ANQPDomName);
-        sAnqpMap.put(ANQP_EMERGENCY_ALERT, ANQPElementType.ANQPEmergencyAlert);
-        sAnqpMap.put(ANQP_TDLS_CAP, ANQPElementType.ANQPTDLSCap);
-        sAnqpMap.put(ANQP_EMERGENCY_NAI, ANQPElementType.ANQPEmergencyNAI);
-        sAnqpMap.put(ANQP_NEIGHBOR_REPORT, ANQPElementType.ANQPNeighborReport);
-        sAnqpMap.put(ANQP_VENDOR_SPEC, ANQPElementType.ANQPVendorSpec);
-
-        sHs20Map.put(HS_QUERY_LIST, ANQPElementType.HSQueryList);
-        sHs20Map.put(HS_CAPABILITY_LIST, ANQPElementType.HSCapabilityList);
-        sHs20Map.put(HS_FRIENDLY_NAME, ANQPElementType.HSFriendlyName);
-        sHs20Map.put(HS_WAN_METRICS, ANQPElementType.HSWANMetrics);
-        sHs20Map.put(HS_CONN_CAPABILITY, ANQPElementType.HSConnCapability);
-        sHs20Map.put(HS_NAI_HOME_REALM_QUERY, ANQPElementType.HSNAIHomeRealmQuery);
-        sHs20Map.put(HS_OPERATING_CLASS, ANQPElementType.HSOperatingclass);
-        sHs20Map.put(HS_OSU_PROVIDERS, ANQPElementType.HSOSUProviders);
-        sHs20Map.put(HS_ICON_REQUEST, ANQPElementType.HSIconRequest);
-        sHs20Map.put(HS_ICON_FILE, ANQPElementType.HSIconFile);
-
-        for (Map.Entry<Integer, ANQPElementType> entry : sAnqpMap.entrySet()) {
-            sRevAnqpmap.put(entry.getValue(), entry.getKey());
-        }
-        for (Map.Entry<Integer, ANQPElementType> entry : sHs20Map.entrySet()) {
-            sRevHs20map.put(entry.getValue(), entry.getKey());
-        }
-    }
-
-    public static ANQPElementType mapANQPElement(int id) {
-        return sAnqpMap.get(id);
-    }
-
-    public static ANQPElementType mapHS20Element(int id) {
-        return sHs20Map.get(id);
-    }
-
-    public static Integer getANQPElementID(ANQPElementType elementType) {
-        return sRevAnqpmap.get(elementType);
-    }
-
-    public static Integer getHS20ElementID(ANQPElementType elementType) {
-        return sRevHs20map.get(elementType);
-    }
-
-    public static boolean hasBaseANQPElements(Collection<ANQPElementType> elements) {
-        if (elements == null) {
-            return false;
-        }
-        for (ANQPElementType element : elements) {
-            if (sRevAnqpmap.containsKey(element)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public static boolean hasR2Elements(List<ANQPElementType> elements) {
-        return elements.contains(ANQPElementType.HSOSUProviders);
-    }
-
-    public static long getInteger(ByteBuffer payload, ByteOrder bo, int size) {
-        byte[] octets = new byte[size];
-        payload.get(octets);
-        long value = 0;
-        if (bo == ByteOrder.LITTLE_ENDIAN) {
-            for (int n = octets.length - 1; n >= 0; n--) {
-                value = (value << Byte.SIZE) | (octets[n] & BYTE_MASK);
-            }
-        }
-        else {
-            for (byte octet : octets) {
-                value = (value << Byte.SIZE) | (octet & BYTE_MASK);
-            }
-        }
-        return value;
-    }
-
-    public static String getPrefixedString(ByteBuffer payload, int lengthLength, Charset charset)
-            throws ProtocolException {
-        return getPrefixedString(payload, lengthLength, charset, false);
-    }
-
-    public static String getPrefixedString(ByteBuffer payload, int lengthLength, Charset charset,
-                                           boolean useNull) throws ProtocolException {
-        if (payload.remaining() < lengthLength) {
-            throw new ProtocolException("Runt string: " + payload.remaining());
-        }
-        return getString(payload, (int) getInteger(payload, ByteOrder.LITTLE_ENDIAN,
-                lengthLength), charset, useNull);
-    }
-
-    public static String getTrimmedString(ByteBuffer payload, int length, Charset charset)
-            throws ProtocolException {
-        String s = getString(payload, length, charset, false);
-        int zero = length - 1;
-        while (zero >= 0) {
-            if (s.charAt(zero) != 0) {
-                break;
-            }
-            zero--;
-        }
-        return zero < length - 1 ? s.substring(0, zero + 1) : s;
-    }
-
-    public static String getString(ByteBuffer payload, int length, Charset charset)
-            throws ProtocolException {
-        return getString(payload, length, charset, false);
-    }
-
-    public static String getString(ByteBuffer payload, int length, Charset charset, boolean useNull)
-            throws ProtocolException {
-        if (length > payload.remaining()) {
-            throw new ProtocolException("Bad string length: " + length);
-        }
-        if (useNull && length == 0) {
-            return null;
-        }
-        byte[] octets = new byte[length];
-        payload.get(octets);
-        return new String(octets, charset);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/HSIconFileElement.java b/packages/Osu/src/com/android/anqp/HSIconFileElement.java
deleted file mode 100644
index 28c597a..0000000
--- a/packages/Osu/src/com/android/anqp/HSIconFileElement.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package com.android.anqp;
-
-import android.os.Parcel;
-
-import com.android.hotspot2.Utils;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-import static com.android.anqp.Constants.SHORT_MASK;
-
-/**
- * The Icon Binary File vendor specific ANQP Element,
- * Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00,
- * section 4.11
- */
-public class HSIconFileElement extends ANQPElement {
-
-    public enum StatusCode {Success, FileNotFound, Unspecified}
-
-    private final StatusCode mStatusCode;
-    private final String mType;
-    private final byte[] mIconData;
-
-    public HSIconFileElement(Constants.ANQPElementType infoID, ByteBuffer payload)
-            throws ProtocolException {
-        super(infoID);
-
-        if (payload.remaining() < 4) {
-            throw new ProtocolException("Truncated icon file: " + payload.remaining());
-        }
-
-        int statusID = payload.get() & BYTE_MASK;
-        mStatusCode = statusID < StatusCode.values().length ? StatusCode.values()[statusID] : null;
-        mType = Constants.getPrefixedString(payload, 1, StandardCharsets.US_ASCII);
-
-        int dataLength = payload.getShort() & SHORT_MASK;
-        mIconData = new byte[dataLength];
-        payload.get(mIconData);
-    }
-
-    public StatusCode getStatusCode() {
-        return mStatusCode;
-    }
-
-    public String getType() {
-        return mType;
-    }
-
-    public byte[] getIconData() {
-        return mIconData;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject.getClass() != HSIconFileElement.class) {
-            return false;
-        }
-        HSIconFileElement that = (HSIconFileElement) thatObject;
-        if (getStatusCode() != that.getStatusCode() || getStatusCode() != StatusCode.Success) {
-            return false;
-        }
-        return getType().equals(that.getType()) && Arrays.equals(getIconData(), that.getIconData());
-    }
-
-    @Override
-    public String toString() {
-        return "HSIconFile{" +
-                "statusCode=" + mStatusCode +
-                ", type='" + mType + '\'' +
-                ", iconData=" + mIconData.length + " bytes }";
-    }
-
-    public HSIconFileElement(Parcel in) {
-        super(Constants.ANQPElementType.HSIconFile);
-        mStatusCode = Utils.mapEnum(in.readInt(), StatusCode.class);
-        mType = in.readString();
-        mIconData = in.readBlob();
-    }
-
-    public void writeParcel(Parcel out) {
-        out.writeInt(mStatusCode.ordinal());
-        out.writeString(mType);
-        out.writeBlob(mIconData);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/HSOsuProvidersElement.java b/packages/Osu/src/com/android/anqp/HSOsuProvidersElement.java
deleted file mode 100644
index 646e003..0000000
--- a/packages/Osu/src/com/android/anqp/HSOsuProvidersElement.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.android.anqp;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * The OSU Providers List vendor specific ANQP Element,
- * Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00,
- * section 4.8
- */
-public class HSOsuProvidersElement extends ANQPElement {
-    private final String mSSID;
-    private final List<OSUProvider> mProviders;
-
-    public HSOsuProvidersElement(Constants.ANQPElementType infoID, ByteBuffer payload)
-            throws ProtocolException {
-        super(infoID);
-
-        mSSID = Constants.getPrefixedString(payload, 1, StandardCharsets.UTF_8);
-        int providerCount = payload.get() & Constants.BYTE_MASK;
-
-        mProviders = new ArrayList<>(providerCount);
-
-        while (providerCount > 0) {
-            mProviders.add(new OSUProvider(mSSID, payload));
-            providerCount--;
-        }
-    }
-
-    public String getSSID() {
-        return mSSID;
-    }
-
-    public List<OSUProvider> getProviders() {
-        return Collections.unmodifiableList(mProviders);
-    }
-
-    @Override
-    public String toString() {
-        return "HSOsuProviders{" +
-                "SSID='" + mSSID + '\'' +
-                ", providers=" + mProviders +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/I18Name.java b/packages/Osu/src/com/android/anqp/I18Name.java
deleted file mode 100644
index b048228..0000000
--- a/packages/Osu/src/com/android/anqp/I18Name.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.android.anqp;
-
-import android.os.Parcel;
-
-import java.io.IOException;
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.Locale;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-
-/**
- * A generic Internationalized name used in ANQP elements as specified in 802.11-2012 and
- * "Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00"
- */
-public class I18Name {
-    private final String mLanguage;
-    private final Locale mLocale;
-    private final String mText;
-
-    public I18Name(ByteBuffer payload) throws ProtocolException {
-        if (payload.remaining() < Constants.LANG_CODE_LENGTH + 1) {
-            throw new ProtocolException("Truncated I18Name: " + payload.remaining());
-        }
-        int nameLength = payload.get() & BYTE_MASK;
-        if (nameLength < Constants.LANG_CODE_LENGTH) {
-            throw new ProtocolException("Runt I18Name: " + nameLength);
-        }
-        mLanguage = Constants.getTrimmedString(payload,
-                Constants.LANG_CODE_LENGTH, StandardCharsets.US_ASCII);
-        mLocale = Locale.forLanguageTag(mLanguage);
-        mText = Constants.getString(payload, nameLength -
-                Constants.LANG_CODE_LENGTH, StandardCharsets.UTF_8);
-    }
-
-    public I18Name(String compoundString) throws IOException {
-        if (compoundString.length() < Constants.LANG_CODE_LENGTH) {
-            throw new IOException("I18String too short: '" + compoundString + "'");
-        }
-        mLanguage = compoundString.substring(0, Constants.LANG_CODE_LENGTH);
-        mText = compoundString.substring(Constants.LANG_CODE_LENGTH);
-        mLocale = Locale.forLanguageTag(mLanguage);
-    }
-
-    public String getLanguage() {
-        return mLanguage;
-    }
-
-    public Locale getLocale() {
-        return mLocale;
-    }
-
-    public String getText() {
-        return mText;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        I18Name that = (I18Name) thatObject;
-        return mLanguage.equals(that.mLanguage) && mText.equals(that.mText);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = mLanguage.hashCode();
-        result = 31 * result + mText.hashCode();
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        return mText + ':' + mLocale.getLanguage();
-    }
-
-    public I18Name(Parcel in) throws IOException {
-        mLanguage = in.readString();
-        mText = in.readString();
-        mLocale = Locale.forLanguageTag(mLanguage);
-    }
-
-    public void writeParcel(Parcel out) {
-        out.writeString(mLanguage);
-        out.writeString(mText);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/IconInfo.java b/packages/Osu/src/com/android/anqp/IconInfo.java
deleted file mode 100644
index ac507c7..0000000
--- a/packages/Osu/src/com/android/anqp/IconInfo.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.android.anqp;
-
-import android.os.Parcel;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-
-import static com.android.anqp.Constants.SHORT_MASK;
-
-/**
- * The Icons available OSU Providers sub field, as specified in
- * Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00,
- * section 4.8.1.4
- */
-public class IconInfo {
-    private final int mWidth;
-    private final int mHeight;
-    private final String mLanguage;
-    private final String mIconType;
-    private final String mFileName;
-
-    public IconInfo(ByteBuffer payload) throws ProtocolException {
-        if (payload.remaining() < 9) {
-            throw new ProtocolException("Truncated icon meta data");
-        }
-
-        mWidth = payload.getShort() & SHORT_MASK;
-        mHeight = payload.getShort() & SHORT_MASK;
-        mLanguage = Constants.getTrimmedString(payload,
-                Constants.LANG_CODE_LENGTH, StandardCharsets.US_ASCII);
-        mIconType = Constants.getPrefixedString(payload, 1, StandardCharsets.US_ASCII);
-        mFileName = Constants.getPrefixedString(payload, 1, StandardCharsets.UTF_8);
-    }
-
-    public int getWidth() {
-        return mWidth;
-    }
-
-    public int getHeight() {
-        return mHeight;
-    }
-
-    public String getLanguage() {
-        return mLanguage;
-    }
-
-    public String getIconType() {
-        return mIconType;
-    }
-
-    public String getFileName() {
-        return mFileName;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        IconInfo that = (IconInfo) thatObject;
-        return mHeight == that.mHeight &&
-                mWidth == that.mWidth &&
-                mFileName.equals(that.mFileName) &&
-                mIconType.equals(that.mIconType) &&
-                mLanguage.equals(that.mLanguage);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = mWidth;
-        result = 31 * result + mHeight;
-        result = 31 * result + mLanguage.hashCode();
-        result = 31 * result + mIconType.hashCode();
-        result = 31 * result + mFileName.hashCode();
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        return "IconInfo{" +
-                "Width=" + mWidth +
-                ", Height=" + mHeight +
-                ", Language=" + mLanguage +
-                ", IconType='" + mIconType + '\'' +
-                ", FileName='" + mFileName + '\'' +
-                '}';
-    }
-
-    public IconInfo(Parcel in) {
-        mWidth = in.readInt();
-        mHeight = in.readInt();
-        mLanguage = in.readString();
-        mIconType = in.readString();
-        mFileName = in.readString();
-    }
-
-    public void writeParcel(Parcel out) {
-        out.writeInt(mWidth);
-        out.writeInt(mHeight);
-        out.writeString(mLanguage);
-        out.writeString(mIconType);
-        out.writeString(mFileName);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/OSUProvider.java b/packages/Osu/src/com/android/anqp/OSUProvider.java
deleted file mode 100644
index 3724cf0..0000000
--- a/packages/Osu/src/com/android/anqp/OSUProvider.java
+++ /dev/null
@@ -1,213 +0,0 @@
-package com.android.anqp;
-
-import android.os.Parcel;
-
-import com.android.hotspot2.Utils;
-
-import java.io.IOException;
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-import static com.android.anqp.Constants.SHORT_MASK;
-
-/**
- * An OSU Provider, as specified in
- * Wi-Fi Alliance Hotspot 2.0 (Release 2) Technical Specification - Version 5.00,
- * section 4.8.1
- */
-public class OSUProvider {
-
-    public enum OSUMethod {OmaDm, SoapXml}
-
-    private final String mSSID;
-    private final List<I18Name> mNames;
-    private final String mOSUServer;
-    private final List<OSUMethod> mOSUMethods;
-    private final List<IconInfo> mIcons;
-    private final String mOsuNai;
-    private final List<I18Name> mServiceDescriptions;
-    private final int mHashCode;
-
-    public OSUProvider(String ssid, ByteBuffer payload) throws ProtocolException {
-        if (payload.remaining() < 11) {
-            throw new ProtocolException("Truncated OSU provider: " + payload.remaining());
-        }
-
-        mSSID = ssid;
-
-        int length = payload.getShort() & SHORT_MASK;
-        int namesLength = payload.getShort() & SHORT_MASK;
-
-        ByteBuffer namesBuffer = payload.duplicate().order(ByteOrder.LITTLE_ENDIAN);
-        namesBuffer.limit(namesBuffer.position() + namesLength);
-        payload.position(payload.position() + namesLength);
-
-        mNames = new ArrayList<>();
-
-        while (namesBuffer.hasRemaining()) {
-            mNames.add(new I18Name(namesBuffer));
-        }
-
-        mOSUServer = Constants.getPrefixedString(payload, 1, StandardCharsets.UTF_8);
-        int methodLength = payload.get() & BYTE_MASK;
-        mOSUMethods = new ArrayList<>(methodLength);
-        while (methodLength > 0) {
-            int methodID = payload.get() & BYTE_MASK;
-            mOSUMethods.add(methodID < OSUMethod.values().length ?
-                    OSUMethod.values()[methodID] :
-                    null);
-            methodLength--;
-        }
-
-        int iconsLength = payload.getShort() & SHORT_MASK;
-        ByteBuffer iconsBuffer = payload.duplicate().order(ByteOrder.LITTLE_ENDIAN);
-        iconsBuffer.limit(iconsBuffer.position() + iconsLength);
-        payload.position(payload.position() + iconsLength);
-
-        mIcons = new ArrayList<>();
-
-        while (iconsBuffer.hasRemaining()) {
-            mIcons.add(new IconInfo(iconsBuffer));
-        }
-
-        mOsuNai = Constants.getPrefixedString(payload, 1, StandardCharsets.UTF_8, true);
-
-        int descriptionsLength = payload.getShort() & SHORT_MASK;
-        ByteBuffer descriptionsBuffer = payload.duplicate().order(ByteOrder.LITTLE_ENDIAN);
-        descriptionsBuffer.limit(descriptionsBuffer.position() + descriptionsLength);
-        payload.position(payload.position() + descriptionsLength);
-
-        mServiceDescriptions = new ArrayList<>();
-
-        while (descriptionsBuffer.hasRemaining()) {
-            mServiceDescriptions.add(new I18Name(descriptionsBuffer));
-        }
-
-        int result = mNames.hashCode();
-        result = 31 * result + mSSID.hashCode();
-        result = 31 * result + mOSUServer.hashCode();
-        result = 31 * result + mOSUMethods.hashCode();
-        result = 31 * result + mIcons.hashCode();
-        result = 31 * result + (mOsuNai != null ? mOsuNai.hashCode() : 0);
-        result = 31 * result + mServiceDescriptions.hashCode();
-        mHashCode = result;
-    }
-
-    public String getSSID() {
-        return mSSID;
-    }
-
-    public List<I18Name> getNames() {
-        return mNames;
-    }
-
-    public String getOSUServer() {
-        return mOSUServer;
-    }
-
-    public List<OSUMethod> getOSUMethods() {
-        return mOSUMethods;
-    }
-
-    public List<IconInfo> getIcons() {
-        return mIcons;
-    }
-
-    public String getOsuNai() {
-        return mOsuNai;
-    }
-
-    public List<I18Name> getServiceDescriptions() {
-        return mServiceDescriptions;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        OSUProvider that = (OSUProvider) o;
-
-        if (!mSSID.equals(that.mSSID)) return false;
-        if (!mOSUServer.equals(that.mOSUServer)) return false;
-        if (!mNames.equals(that.mNames)) return false;
-        if (!mServiceDescriptions.equals(that.mServiceDescriptions)) return false;
-        if (!mIcons.equals(that.mIcons)) return false;
-        if (!mOSUMethods.equals(that.mOSUMethods)) return false;
-        if (mOsuNai != null ? !mOsuNai.equals(that.mOsuNai) : that.mOsuNai != null) return false;
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return mHashCode;
-    }
-
-    @Override
-    public String toString() {
-        return "OSUProvider{" +
-                "names=" + mNames +
-                ", OSUServer='" + mOSUServer + '\'' +
-                ", OSUMethods=" + mOSUMethods +
-                ", icons=" + mIcons +
-                ", NAI='" + mOsuNai + '\'' +
-                ", serviceDescriptions=" + mServiceDescriptions +
-                '}';
-    }
-
-    public OSUProvider(Parcel in) throws IOException {
-        mSSID = in.readString();
-        int nameCount = in.readInt();
-        mNames = new ArrayList<>(nameCount);
-        for (int n = 0; n < nameCount; n++) {
-            mNames.add(new I18Name(in));
-        }
-        mOSUServer = in.readString();
-        int methodCount = in.readInt();
-        mOSUMethods = new ArrayList<>(methodCount);
-        for (int n = 0; n < methodCount; n++) {
-            mOSUMethods.add(Utils.mapEnum(in.readInt(), OSUMethod.class));
-        }
-        int iconCount = in.readInt();
-        mIcons = new ArrayList<>(iconCount);
-        for (int n = 0; n < iconCount; n++) {
-            mIcons.add(new IconInfo(in));
-        }
-        mOsuNai = in.readString();
-        int serviceCount = in.readInt();
-        mServiceDescriptions = new ArrayList<>(serviceCount);
-        for (int n = 0; n < serviceCount; n++) {
-            mServiceDescriptions.add(new I18Name(in));
-        }
-        mHashCode = in.readInt();
-    }
-
-    public void writeParcel(Parcel out) {
-        out.writeString(mSSID);
-        out.writeInt(mNames.size());
-        for (I18Name name : mNames) {
-            name.writeParcel(out);
-        }
-        out.writeString(mOSUServer);
-        out.writeInt(mOSUMethods.size());
-        for (OSUMethod method : mOSUMethods) {
-            out.writeInt(method.ordinal());
-        }
-        out.writeInt(mIcons.size());
-        for (IconInfo iconInfo : mIcons) {
-            iconInfo.writeParcel(out);
-        }
-        out.writeString(mOsuNai);
-        out.writeInt(mServiceDescriptions.size());
-        for (I18Name serviceDescription : mServiceDescriptions) {
-            serviceDescription.writeParcel(out);
-        }
-        out.writeInt(mHashCode);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/AuthParam.java b/packages/Osu/src/com/android/anqp/eap/AuthParam.java
deleted file mode 100644
index 4243954..0000000
--- a/packages/Osu/src/com/android/anqp/eap/AuthParam.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.android.anqp.eap;
-
-/**
- * An Authentication parameter, part of the NAI Realm ANQP element, specified in
- * IEEE802.11-2012 section 8.4.4.10, table 8-188
- */
-public interface AuthParam {
-    public EAP.AuthInfoID getAuthInfoID();
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/Credential.java b/packages/Osu/src/com/android/anqp/eap/Credential.java
deleted file mode 100644
index 0a89f4f..0000000
--- a/packages/Osu/src/com/android/anqp/eap/Credential.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.android.anqp.eap;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-
-/**
- * An EAP authentication parameter, IEEE802.11-2012, table 8-188
- */
-public class Credential implements AuthParam {
-
-    public enum CredType {
-        Reserved,
-        SIM,
-        USIM,
-        NFC,
-        HWToken,
-        Softoken,
-        Certificate,
-        Username,
-        None,
-        Anonymous,
-        VendorSpecific}
-
-    private final EAP.AuthInfoID mAuthInfoID;
-    private final CredType mCredType;
-
-    public Credential(EAP.AuthInfoID infoID, int length, ByteBuffer payload)
-            throws ProtocolException {
-        if (length != 1) {
-            throw new ProtocolException("Bad length: " + length);
-        }
-
-        mAuthInfoID = infoID;
-        int typeID = payload.get() & BYTE_MASK;
-
-        mCredType = typeID < CredType.values().length ?
-                CredType.values()[typeID] :
-                CredType.Reserved;
-    }
-
-    @Override
-    public EAP.AuthInfoID getAuthInfoID() {
-        return mAuthInfoID;
-    }
-
-    @Override
-    public int hashCode() {
-        return mAuthInfoID.hashCode() * 31 + mCredType.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject == null || thatObject.getClass() != Credential.class) {
-            return false;
-        } else {
-            return ((Credential) thatObject).getCredType() == getCredType();
-        }
-    }
-
-    public CredType getCredType() {
-        return mCredType;
-    }
-
-    @Override
-    public String toString() {
-        return "Auth method " + mAuthInfoID + " = " + mCredType + "\n";
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/EAP.java b/packages/Osu/src/com/android/anqp/eap/EAP.java
deleted file mode 100644
index 4b968b6..0000000
--- a/packages/Osu/src/com/android/anqp/eap/EAP.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package com.android.anqp.eap;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * EAP Related constants for the ANQP NAIRealm element, IEEE802.11-2012 section 8.4.4.10
- */
-public abstract class EAP {
-
-    private static final Map<Integer, EAPMethodID> sEapIds = new HashMap<>();
-    private static final Map<EAPMethodID, Integer> sRevEapIds = new HashMap<>();
-    private static final Map<Integer, AuthInfoID> sAuthIds = new HashMap<>();
-
-    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_AKAPrim = 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;
-
-    public enum EAPMethodID {
-        EAP_MD5,
-        EAP_OTP,
-        EAP_RSA,
-        EAP_KEA,
-        EAP_KEA_VALIDATE,
-        EAP_TLS,
-        EAP_LEAP,
-        EAP_SIM,
-        EAP_TTLS,
-        EAP_AKA,
-        EAP_3Com,
-        EAP_MSCHAPv2,
-        EAP_PEAP,
-        EAP_POTP,
-        EAP_ActiontecWireless,
-        EAP_HTTPDigest,
-        EAP_SPEKE,
-        EAP_MOBAC,
-        EAP_FAST,
-        EAP_ZLXEAP,
-        EAP_Link,
-        EAP_PAX,
-        EAP_PSK,
-        EAP_SAKE,
-        EAP_IKEv2,
-        EAP_AKAPrim,
-        EAP_GPSK,
-        EAP_PWD,
-        EAP_EKE,
-        EAP_TEAP
-    }
-
-    public static final int ExpandedEAPMethod = 1;
-    public static final int NonEAPInnerAuthType = 2;
-    public static final int InnerAuthEAPMethodType = 3;
-    public static final int ExpandedInnerEAPMethod = 4;
-    public static final int CredentialType = 5;
-    public static final int TunneledEAPMethodCredType = 6;
-    public static final int VendorSpecific = 221;
-
-    public enum AuthInfoID {
-        Undefined,
-        ExpandedEAPMethod,
-        NonEAPInnerAuthType,
-        InnerAuthEAPMethodType,
-        ExpandedInnerEAPMethod,
-        CredentialType,
-        TunneledEAPMethodCredType,
-        VendorSpecific
-    }
-
-    static {
-        sEapIds.put(EAP_MD5, EAPMethodID.EAP_MD5);
-        sEapIds.put(EAP_OTP, EAPMethodID.EAP_OTP);
-        sEapIds.put(EAP_RSA, EAPMethodID.EAP_RSA);
-        sEapIds.put(EAP_KEA, EAPMethodID.EAP_KEA);
-        sEapIds.put(EAP_KEA_VALIDATE, EAPMethodID.EAP_KEA_VALIDATE);
-        sEapIds.put(EAP_TLS, EAPMethodID.EAP_TLS);
-        sEapIds.put(EAP_LEAP, EAPMethodID.EAP_LEAP);
-        sEapIds.put(EAP_SIM, EAPMethodID.EAP_SIM);
-        sEapIds.put(EAP_TTLS, EAPMethodID.EAP_TTLS);
-        sEapIds.put(EAP_AKA, EAPMethodID.EAP_AKA);
-        sEapIds.put(EAP_3Com, EAPMethodID.EAP_3Com);
-        sEapIds.put(EAP_MSCHAPv2, EAPMethodID.EAP_MSCHAPv2);
-        sEapIds.put(EAP_PEAP, EAPMethodID.EAP_PEAP);
-        sEapIds.put(EAP_POTP, EAPMethodID.EAP_POTP);
-        sEapIds.put(EAP_ActiontecWireless, EAPMethodID.EAP_ActiontecWireless);
-        sEapIds.put(EAP_HTTPDigest, EAPMethodID.EAP_HTTPDigest);
-        sEapIds.put(EAP_SPEKE, EAPMethodID.EAP_SPEKE);
-        sEapIds.put(EAP_MOBAC, EAPMethodID.EAP_MOBAC);
-        sEapIds.put(EAP_FAST, EAPMethodID.EAP_FAST);
-        sEapIds.put(EAP_ZLXEAP, EAPMethodID.EAP_ZLXEAP);
-        sEapIds.put(EAP_Link, EAPMethodID.EAP_Link);
-        sEapIds.put(EAP_PAX, EAPMethodID.EAP_PAX);
-        sEapIds.put(EAP_PSK, EAPMethodID.EAP_PSK);
-        sEapIds.put(EAP_SAKE, EAPMethodID.EAP_SAKE);
-        sEapIds.put(EAP_IKEv2, EAPMethodID.EAP_IKEv2);
-        sEapIds.put(EAP_AKAPrim, EAPMethodID.EAP_AKAPrim);
-        sEapIds.put(EAP_GPSK, EAPMethodID.EAP_GPSK);
-        sEapIds.put(EAP_PWD, EAPMethodID.EAP_PWD);
-        sEapIds.put(EAP_EKE, EAPMethodID.EAP_EKE);
-        sEapIds.put(EAP_TEAP, EAPMethodID.EAP_TEAP);
-
-        for (Map.Entry<Integer, EAPMethodID> entry : sEapIds.entrySet()) {
-            sRevEapIds.put(entry.getValue(), entry.getKey());
-        }
-
-        sAuthIds.put(ExpandedEAPMethod, AuthInfoID.ExpandedEAPMethod);
-        sAuthIds.put(NonEAPInnerAuthType, AuthInfoID.NonEAPInnerAuthType);
-        sAuthIds.put(InnerAuthEAPMethodType, AuthInfoID.InnerAuthEAPMethodType);
-        sAuthIds.put(ExpandedInnerEAPMethod, AuthInfoID.ExpandedInnerEAPMethod);
-        sAuthIds.put(CredentialType, AuthInfoID.CredentialType);
-        sAuthIds.put(TunneledEAPMethodCredType, AuthInfoID.TunneledEAPMethodCredType);
-        sAuthIds.put(VendorSpecific, AuthInfoID.VendorSpecific);
-    }
-
-    public static EAPMethodID mapEAPMethod(int methodID) {
-        return sEapIds.get(methodID);
-    }
-
-    public static Integer mapEAPMethod(EAPMethodID methodID) {
-        return sRevEapIds.get(methodID);
-    }
-
-    public static AuthInfoID mapAuthMethod(int methodID) {
-        return sAuthIds.get(methodID);
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/EAPMethod.java b/packages/Osu/src/com/android/anqp/eap/EAPMethod.java
deleted file mode 100644
index fa6c2f9..0000000
--- a/packages/Osu/src/com/android/anqp/eap/EAPMethod.java
+++ /dev/null
@@ -1,191 +0,0 @@
-package com.android.anqp.eap;
-
-import com.android.anqp.Constants;
-import com.android.hotspot2.AuthMatch;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * An EAP Method, part of the NAI Realm ANQP element, specified in
- * IEEE802.11-2012 section 8.4.4.10, figure 8-420
- */
-public class EAPMethod {
-    private final EAP.EAPMethodID mEAPMethodID;
-    private final Map<EAP.AuthInfoID, Set<AuthParam>> mAuthParams;
-
-    public EAPMethod(ByteBuffer payload) throws ProtocolException {
-        if (payload.remaining() < 3) {
-            throw new ProtocolException("Runt EAP Method: " + payload.remaining());
-        }
-
-        int length = payload.get() & Constants.BYTE_MASK;
-        int methodID = payload.get() & Constants.BYTE_MASK;
-        int count = payload.get() & Constants.BYTE_MASK;
-
-        mEAPMethodID = EAP.mapEAPMethod(methodID);
-        mAuthParams = new EnumMap<>(EAP.AuthInfoID.class);
-
-        int realCount = 0;
-
-        ByteBuffer paramPayload = payload.duplicate().order(ByteOrder.LITTLE_ENDIAN);
-        paramPayload.limit(paramPayload.position() + length - 2);
-        payload.position(payload.position() + length - 2);
-        while (paramPayload.hasRemaining()) {
-            int id = paramPayload.get() & Constants.BYTE_MASK;
-
-            EAP.AuthInfoID authInfoID = EAP.mapAuthMethod(id);
-            if (authInfoID == null) {
-                throw new ProtocolException("Unknown auth parameter ID: " + id);
-            }
-
-            int len = paramPayload.get() & Constants.BYTE_MASK;
-            if (len == 0 || len > paramPayload.remaining()) {
-                throw new ProtocolException("Bad auth method length: " + len);
-            }
-
-            switch (authInfoID) {
-                case ExpandedEAPMethod:
-                    addAuthParam(new ExpandedEAPMethod(authInfoID, len, paramPayload));
-                    break;
-                case NonEAPInnerAuthType:
-                    addAuthParam(new NonEAPInnerAuth(len, paramPayload));
-                    break;
-                case InnerAuthEAPMethodType:
-                    addAuthParam(new InnerAuthEAP(len, paramPayload));
-                    break;
-                case ExpandedInnerEAPMethod:
-                    addAuthParam(new ExpandedEAPMethod(authInfoID, len, paramPayload));
-                    break;
-                case CredentialType:
-                    addAuthParam(new Credential(authInfoID, len, paramPayload));
-                    break;
-                case TunneledEAPMethodCredType:
-                    addAuthParam(new Credential(authInfoID, len, paramPayload));
-                    break;
-                case VendorSpecific:
-                    addAuthParam(new VendorSpecificAuth(len, paramPayload));
-                    break;
-            }
-
-            realCount++;
-        }
-        if (realCount != count)
-            throw new ProtocolException("Invalid parameter count: " + realCount +
-                    ", expected " + count);
-    }
-
-    public EAPMethod(EAP.EAPMethodID eapMethodID, AuthParam authParam) {
-        mEAPMethodID = eapMethodID;
-        mAuthParams = new HashMap<>(1);
-        if (authParam != null) {
-            Set<AuthParam> authParams = new HashSet<>();
-            authParams.add(authParam);
-            mAuthParams.put(authParam.getAuthInfoID(), authParams);
-        }
-    }
-
-    private void addAuthParam(AuthParam param) {
-        Set<AuthParam> authParams = mAuthParams.get(param.getAuthInfoID());
-        if (authParams == null) {
-            authParams = new HashSet<>();
-            mAuthParams.put(param.getAuthInfoID(), authParams);
-        }
-        authParams.add(param);
-    }
-
-    public Map<EAP.AuthInfoID, Set<AuthParam>> getAuthParams() {
-        return Collections.unmodifiableMap(mAuthParams);
-    }
-
-    public EAP.EAPMethodID getEAPMethodID() {
-        return mEAPMethodID;
-    }
-
-    public int match(com.android.hotspot2.pps.Credential credential) {
-
-        EAPMethod credMethod = credential.getEAPMethod();
-        if (mEAPMethodID != credMethod.getEAPMethodID()) {
-            return AuthMatch.None;
-        }
-
-        switch (mEAPMethodID) {
-            case EAP_TTLS:
-                if (mAuthParams.isEmpty()) {
-                    return AuthMatch.Method;
-                }
-                int paramCount = 0;
-                for (Map.Entry<EAP.AuthInfoID, Set<AuthParam>> entry :
-                        credMethod.getAuthParams().entrySet()) {
-                    Set<AuthParam> params = mAuthParams.get(entry.getKey());
-                    if (params == null) {
-                        continue;
-                    }
-
-                    if (!Collections.disjoint(params, entry.getValue())) {
-                        return AuthMatch.MethodParam;
-                    }
-                    paramCount += params.size();
-                }
-                return paramCount > 0 ? AuthMatch.None : AuthMatch.Method;
-            case EAP_TLS:
-                return AuthMatch.MethodParam;
-            case EAP_SIM:
-            case EAP_AKA:
-            case EAP_AKAPrim:
-                return AuthMatch.Method;
-            default:
-                return AuthMatch.Method;
-        }
-    }
-
-    public AuthParam getAuthParam() {
-        if (mAuthParams.isEmpty()) {
-            return null;
-        }
-        Set<AuthParam> params = mAuthParams.values().iterator().next();
-        if (params.isEmpty()) {
-            return null;
-        }
-        return params.iterator().next();
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        }
-        else if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        EAPMethod that = (EAPMethod) thatObject;
-        return mEAPMethodID == that.mEAPMethodID && mAuthParams.equals(that.mAuthParams);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = mEAPMethodID.hashCode();
-        result = 31 * result + mAuthParams.hashCode();
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("EAP Method ").append(mEAPMethodID).append('\n');
-        for (Set<AuthParam> paramSet : mAuthParams.values()) {
-            for (AuthParam param : paramSet) {
-                sb.append("      ").append(param.toString());
-            }
-        }
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/ExpandedEAPMethod.java b/packages/Osu/src/com/android/anqp/eap/ExpandedEAPMethod.java
deleted file mode 100644
index 1358c09..0000000
--- a/packages/Osu/src/com/android/anqp/eap/ExpandedEAPMethod.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.android.anqp.eap;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-import static com.android.anqp.Constants.INT_MASK;
-import static com.android.anqp.Constants.SHORT_MASK;
-
-/**
- * An EAP authentication parameter, IEEE802.11-2012, table 8-188
- */
-public class ExpandedEAPMethod implements AuthParam {
-
-    private final EAP.AuthInfoID mAuthInfoID;
-    private final int mVendorID;
-    private final long mVendorType;
-
-    public ExpandedEAPMethod(EAP.AuthInfoID authInfoID, int length, ByteBuffer payload)
-            throws ProtocolException {
-        if (length != 7) {
-            throw new ProtocolException("Bad length: " + payload.remaining());
-        }
-
-        mAuthInfoID = authInfoID;
-
-        ByteBuffer vndBuffer = payload.duplicate().order(ByteOrder.BIG_ENDIAN);
-
-        int id = vndBuffer.getShort() & SHORT_MASK;
-        id = (id << Byte.SIZE) | (vndBuffer.get() & BYTE_MASK);
-        mVendorID = id;
-        mVendorType = vndBuffer.getInt() & INT_MASK;
-
-        payload.position(payload.position()+7);
-    }
-
-    public ExpandedEAPMethod(EAP.AuthInfoID authInfoID, int vendorID, long vendorType) {
-        mAuthInfoID = authInfoID;
-        mVendorID = vendorID;
-        mVendorType = vendorType;
-    }
-
-    @Override
-    public EAP.AuthInfoID getAuthInfoID() {
-        return mAuthInfoID;
-    }
-
-    @Override
-    public int hashCode() {
-        return (mAuthInfoID.hashCode() * 31 + mVendorID) * 31 + (int) mVendorType;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject == null || thatObject.getClass() != ExpandedEAPMethod.class) {
-            return false;
-        } else {
-            ExpandedEAPMethod that = (ExpandedEAPMethod) thatObject;
-            return that.getVendorID() == getVendorID() && that.getVendorType() == getVendorType();
-        }
-    }
-
-    public int getVendorID() {
-        return mVendorID;
-    }
-
-    public long getVendorType() {
-        return mVendorType;
-    }
-
-    @Override
-    public String toString() {
-        return "Auth method " + mAuthInfoID + ", id " + mVendorID + ", type " + mVendorType + "\n";
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/InnerAuthEAP.java b/packages/Osu/src/com/android/anqp/eap/InnerAuthEAP.java
deleted file mode 100644
index 571cf26..0000000
--- a/packages/Osu/src/com/android/anqp/eap/InnerAuthEAP.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.android.anqp.eap;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-
-/**
- * An EAP authentication parameter, IEEE802.11-2012, table 8-188
- */
-public class InnerAuthEAP implements AuthParam {
-
-    private final EAP.EAPMethodID mEapMethodID;
-
-    public InnerAuthEAP(int length, ByteBuffer payload) throws ProtocolException {
-        if (length != 1) {
-            throw new ProtocolException("Bad length: " + length);
-        }
-        int typeID = payload.get() & BYTE_MASK;
-        mEapMethodID = EAP.mapEAPMethod(typeID);
-    }
-
-    public InnerAuthEAP(EAP.EAPMethodID eapMethodID) {
-        mEapMethodID = eapMethodID;
-    }
-
-    @Override
-    public EAP.AuthInfoID getAuthInfoID() {
-        return EAP.AuthInfoID.InnerAuthEAPMethodType;
-    }
-
-    public EAP.EAPMethodID getEAPMethodID() {
-        return mEapMethodID;
-    }
-
-    @Override
-    public int hashCode() {
-        return mEapMethodID != null ? mEapMethodID.hashCode() : 0;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject == null || thatObject.getClass() != InnerAuthEAP.class) {
-            return false;
-        } else {
-            return ((InnerAuthEAP) thatObject).getEAPMethodID() == getEAPMethodID();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "Auth method InnerAuthEAP, inner = " + mEapMethodID + '\n';
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/NonEAPInnerAuth.java b/packages/Osu/src/com/android/anqp/eap/NonEAPInnerAuth.java
deleted file mode 100644
index 9d37b4d..0000000
--- a/packages/Osu/src/com/android/anqp/eap/NonEAPInnerAuth.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.android.anqp.eap;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Map;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-
-/**
- * An EAP authentication parameter, IEEE802.11-2012, table 8-188
- */
-public class NonEAPInnerAuth implements AuthParam {
-
-    public enum NonEAPType {Reserved, PAP, CHAP, MSCHAP, MSCHAPv2}
-    private static final Map<NonEAPType, String> sOmaMap = new EnumMap<>(NonEAPType.class);
-    private static final Map<String, NonEAPType> sRevOmaMap = new HashMap<>();
-
-    private final NonEAPType mType;
-
-    static {
-        sOmaMap.put(NonEAPType.PAP, "PAP");
-        sOmaMap.put(NonEAPType.CHAP, "CHAP");
-        sOmaMap.put(NonEAPType.MSCHAP, "MS-CHAP");
-        sOmaMap.put(NonEAPType.MSCHAPv2, "MS-CHAP-V2");
-
-        for (Map.Entry<NonEAPType, String> entry : sOmaMap.entrySet()) {
-            sRevOmaMap.put(entry.getValue(), entry.getKey());
-        }
-    }
-
-    public NonEAPInnerAuth(int length, ByteBuffer payload) throws ProtocolException {
-        if (length != 1) {
-            throw new ProtocolException("Bad length: " + payload.remaining());
-        }
-
-        int typeID = payload.get() & BYTE_MASK;
-        mType = typeID < NonEAPType.values().length ?
-                NonEAPType.values()[typeID] :
-                NonEAPType.Reserved;
-    }
-
-    public NonEAPInnerAuth(NonEAPType type) {
-        mType = type;
-    }
-
-    /**
-     * Construct from the OMA-DM PPS data
-     * @param eapType as defined in the HS2.0 spec.
-     */
-    public NonEAPInnerAuth(String eapType) {
-        mType = sRevOmaMap.get(eapType);
-    }
-
-    @Override
-    public EAP.AuthInfoID getAuthInfoID() {
-        return EAP.AuthInfoID.NonEAPInnerAuthType;
-    }
-
-    public NonEAPType getType() {
-        return mType;
-    }
-
-    public String getOMAtype() {
-        return sOmaMap.get(mType);
-    }
-
-    public static String mapInnerType(NonEAPType type) {
-        return sOmaMap.get(type);
-    }
-
-    @Override
-    public int hashCode() {
-        return mType.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject == null || thatObject.getClass() != NonEAPInnerAuth.class) {
-            return false;
-        } else {
-            return ((NonEAPInnerAuth) thatObject).getType() == getType();
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "Auth method NonEAPInnerAuthEAP, inner = " + mType + '\n';
-    }
-}
diff --git a/packages/Osu/src/com/android/anqp/eap/VendorSpecificAuth.java b/packages/Osu/src/com/android/anqp/eap/VendorSpecificAuth.java
deleted file mode 100644
index 04a315d..0000000
--- a/packages/Osu/src/com/android/anqp/eap/VendorSpecificAuth.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.android.anqp.eap;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-
-/**
- * An EAP authentication parameter, IEEE802.11-2012, table 8-188
- */
-public class VendorSpecificAuth implements AuthParam {
-
-    private final byte[] mData;
-
-    public VendorSpecificAuth(int length, ByteBuffer payload) throws ProtocolException {
-        mData = new byte[length];
-        payload.get(mData);
-    }
-
-    @Override
-    public EAP.AuthInfoID getAuthInfoID() {
-        return EAP.AuthInfoID.VendorSpecific;
-    }
-
-    public int hashCode() {
-        return Arrays.hashCode(mData);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (thatObject == this) {
-            return true;
-        } else if (thatObject == null || thatObject.getClass() != VendorSpecificAuth.class) {
-            return false;
-        } else {
-            return Arrays.equals(((VendorSpecificAuth) thatObject).getData(), getData());
-        }
-    }
-
-    public byte[] getData() {
-        return mData;
-    }
-
-    @Override
-    public String toString() {
-        return "Auth method VendorSpecificAuth, data = " + Arrays.toString(mData) + '\n';
-    }
-}
diff --git a/packages/Osu/src/com/android/configparse/ConfigBuilder.java b/packages/Osu/src/com/android/configparse/ConfigBuilder.java
deleted file mode 100644
index b760ade..0000000
--- a/packages/Osu/src/com/android/configparse/ConfigBuilder.java
+++ /dev/null
@@ -1,258 +0,0 @@
-package com.android.configparse;
-
-import android.content.Context;
-import android.net.Uri;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.util.Base64;
-import android.util.Log;
-
-import com.android.anqp.eap.AuthParam;
-import com.android.anqp.eap.EAP;
-import com.android.anqp.eap.EAPMethod;
-import com.android.anqp.eap.NonEAPInnerAuth;
-import com.android.hotspot2.IMSIParameter;
-import com.android.hotspot2.pps.Credential;
-import com.android.hotspot2.pps.HomeSP;
-
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.MessageDigest;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-
-public class ConfigBuilder {
-    private static final String TAG = "WCFG";
-
-    private static void dropFile(Uri uri, Context context) {
-        context.getContentResolver().delete(uri, null, null);
-    }
-
-    public static WifiConfiguration buildConfig(HomeSP homeSP, X509Certificate caCert,
-                                                 List<X509Certificate> clientChain, PrivateKey key)
-            throws IOException, GeneralSecurityException {
-
-        Credential credential = homeSP.getCredential();
-
-        WifiConfiguration config;
-
-        EAP.EAPMethodID eapMethodID = credential.getEAPMethod().getEAPMethodID();
-        switch (eapMethodID) {
-            case EAP_TTLS:
-                if (key != null || clientChain != null) {
-                    Log.w(TAG, "Client cert and/or key included with EAP-TTLS profile");
-                }
-                config = buildTTLSConfig(homeSP);
-                break;
-            case EAP_TLS:
-                config = buildTLSConfig(homeSP, clientChain, key);
-                break;
-            case EAP_AKA:
-            case EAP_AKAPrim:
-            case EAP_SIM:
-                if (key != null || clientChain != null || caCert != null) {
-                    Log.i(TAG, "Client/CA cert and/or key included with " +
-                            eapMethodID + " profile");
-                }
-                config = buildSIMConfig(homeSP);
-                break;
-            default:
-                throw new IOException("Unsupported EAP Method: " + eapMethodID);
-        }
-
-        WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
-
-        enterpriseConfig.setCaCertificate(caCert);
-        enterpriseConfig.setAnonymousIdentity("anonymous@" + credential.getRealm());
-
-        return config;
-    }
-
-    // Retain for debugging purposes
-    /*
-    private static void xIterateCerts(KeyStore ks, X509Certificate caCert)
-            throws GeneralSecurityException {
-        Enumeration<String> aliases = ks.aliases();
-        while (aliases.hasMoreElements()) {
-            String alias = aliases.nextElement();
-            Certificate cert = ks.getCertificate(alias);
-            Log.d("HS2J", "Checking " + alias);
-            if (cert instanceof X509Certificate) {
-                X509Certificate x509Certificate = (X509Certificate) cert;
-                boolean sm = x509Certificate.getSubjectX500Principal().equals(
-                        caCert.getSubjectX500Principal());
-                boolean eq = false;
-                if (sm) {
-                    eq = Arrays.equals(x509Certificate.getEncoded(), caCert.getEncoded());
-                }
-                Log.d("HS2J", "Subject: " + x509Certificate.getSubjectX500Principal() +
-                        ": " + sm + "/" + eq);
-            }
-        }
-    }
-    */
-
-    private static WifiConfiguration buildTTLSConfig(HomeSP homeSP)
-            throws IOException {
-        Credential credential = homeSP.getCredential();
-
-        if (credential.getUserName() == null || credential.getPassword() == null) {
-            throw new IOException("EAP-TTLS provisioned without user name or password");
-        }
-
-        EAPMethod eapMethod = credential.getEAPMethod();
-
-        AuthParam authParam = eapMethod.getAuthParam();
-        if (authParam == null ||
-                authParam.getAuthInfoID() != EAP.AuthInfoID.NonEAPInnerAuthType) {
-            throw new IOException("Bad auth parameter for EAP-TTLS: " + authParam);
-        }
-
-        WifiConfiguration config = buildBaseConfiguration(homeSP);
-        NonEAPInnerAuth ttlsParam = (NonEAPInnerAuth) authParam;
-        WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
-        enterpriseConfig.setPhase2Method(remapInnerMethod(ttlsParam.getType()));
-        enterpriseConfig.setIdentity(credential.getUserName());
-        enterpriseConfig.setPassword(credential.getPassword());
-
-        return config;
-    }
-
-    private static WifiConfiguration buildTLSConfig(HomeSP homeSP,
-                                                    List<X509Certificate> clientChain,
-                                                    PrivateKey clientKey)
-            throws IOException, GeneralSecurityException {
-
-        Credential credential = homeSP.getCredential();
-
-        X509Certificate clientCertificate = null;
-
-        if (clientKey == null || clientChain == null) {
-            throw new IOException("No key and/or cert passed for EAP-TLS");
-        }
-        if (credential.getCertType() != Credential.CertType.x509v3) {
-            throw new IOException("Invalid certificate type for TLS: " +
-                    credential.getCertType());
-        }
-
-        byte[] reference = credential.getFingerPrint();
-        MessageDigest digester = MessageDigest.getInstance("SHA-256");
-        for (X509Certificate certificate : clientChain) {
-            digester.reset();
-            byte[] fingerprint = digester.digest(certificate.getEncoded());
-            if (Arrays.equals(reference, fingerprint)) {
-                clientCertificate = certificate;
-                break;
-            }
-        }
-        if (clientCertificate == null) {
-            throw new IOException("No certificate in chain matches supplied fingerprint");
-        }
-
-        String alias = Base64.encodeToString(reference, Base64.DEFAULT);
-
-        WifiConfiguration config = buildBaseConfiguration(homeSP);
-        WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
-        enterpriseConfig.setClientCertificateAlias(alias);
-        enterpriseConfig.setClientKeyEntry(clientKey, clientCertificate);
-
-        return config;
-    }
-
-    private static WifiConfiguration buildSIMConfig(HomeSP homeSP)
-            throws IOException {
-
-        Credential credential = homeSP.getCredential();
-        IMSIParameter credImsi = credential.getImsi();
-
-        /*
-         * Uncomment to enforce strict IMSI matching with currently installed SIM cards.
-         *
-        TelephonyManager tm = TelephonyManager.from(context);
-        SubscriptionManager sub = SubscriptionManager.from(context);
-        boolean match = false;
-
-        for (int subId : sub.getActiveSubscriptionIdList()) {
-            String imsi = tm.getSubscriberId(subId);
-            if (credImsi.matches(imsi)) {
-                match = true;
-                break;
-            }
-        }
-        if (!match) {
-            throw new IOException("Supplied IMSI does not match any SIM card");
-        }
-        */
-
-        WifiConfiguration config = buildBaseConfiguration(homeSP);
-        config.enterpriseConfig.setPlmn(credImsi.toString());
-        return config;
-    }
-
-    private static WifiConfiguration buildBaseConfiguration(HomeSP homeSP) throws IOException {
-        EAP.EAPMethodID eapMethodID = homeSP.getCredential().getEAPMethod().getEAPMethodID();
-
-        WifiConfiguration config = new WifiConfiguration();
-
-        config.FQDN = homeSP.getFQDN();
-
-        HashSet<Long> roamingConsortiumIds = homeSP.getRoamingConsortiums();
-        config.roamingConsortiumIds = new long[roamingConsortiumIds.size()];
-        int i = 0;
-        for (long id : roamingConsortiumIds) {
-            config.roamingConsortiumIds[i] = id;
-            i++;
-        }
-        config.providerFriendlyName = homeSP.getFriendlyName();
-
-        config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_EAP);
-        config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.IEEE8021X);
-
-        WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
-        enterpriseConfig.setEapMethod(remapEAPMethod(eapMethodID));
-        enterpriseConfig.setRealm(homeSP.getCredential().getRealm());
-        if (homeSP.getUpdateIdentifier() >= 0) {
-            config.updateIdentifier = Integer.toString(homeSP.getUpdateIdentifier());
-        }
-        config.enterpriseConfig = enterpriseConfig;
-        if (homeSP.getUpdateIdentifier() >= 0) {
-            config.updateIdentifier = Integer.toString(homeSP.getUpdateIdentifier());
-        }
-
-        return config;
-    }
-
-    private static int remapEAPMethod(EAP.EAPMethodID eapMethodID) throws IOException {
-        switch (eapMethodID) {
-            case EAP_TTLS:
-                return WifiEnterpriseConfig.Eap.TTLS;
-            case EAP_TLS:
-                return WifiEnterpriseConfig.Eap.TLS;
-            case EAP_SIM:
-                return WifiEnterpriseConfig.Eap.SIM;
-            case EAP_AKA:
-                return WifiEnterpriseConfig.Eap.AKA;
-            case EAP_AKAPrim:
-                return WifiEnterpriseConfig.Eap.AKA_PRIME;
-            default:
-                throw new IOException("Bad EAP method: " + eapMethodID);
-        }
-    }
-
-    private static int remapInnerMethod(NonEAPInnerAuth.NonEAPType type) throws IOException {
-        switch (type) {
-            case PAP:
-                return WifiEnterpriseConfig.Phase2.PAP;
-            case MSCHAP:
-                return WifiEnterpriseConfig.Phase2.MSCHAP;
-            case MSCHAPv2:
-                return WifiEnterpriseConfig.Phase2.MSCHAPV2;
-            case CHAP:
-            default:
-                throw new IOException("Inner method " + type + " not supported");
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/AppBridge.java b/packages/Osu/src/com/android/hotspot2/AppBridge.java
deleted file mode 100644
index 81542f7..0000000
--- a/packages/Osu/src/com/android/hotspot2/AppBridge.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.android.hotspot2;
-
-import android.content.Context;
-import android.content.Intent;
-
-import com.android.hotspot2.osu.OSUOperationStatus;
-
-public class AppBridge {
-    public static final String ACTION_OSU_NOTIFICATION = "com.android.hotspot2.OSU_NOTIFICATION";
-    public static final String OSU_COUNT = "osu-count";
-    public static final String SP_NAME = "sp-name";
-    public static final String PROV_SUCCESS = "prov-success";
-    public static final String DEAUTH = "deauth";
-    public static final String DEAUTH_DELAY = "deauth-delay";
-    public static final String DEAUTH_URL = "deauth-url";
-    public static final String PROV_MESSAGE = "prov-message";
-    public static final String OSU_INFO = "osu-info";
-
-    public static final String GET_OSUS_ACTION = "com.android.hotspot2.GET_OSUS";
-
-    private final Context mContext;
-
-    public AppBridge(Context context) {
-        mContext = context;
-    }
-
-    public void showOsuCount(int osuCount) {
-        Intent intent = new Intent(ACTION_OSU_NOTIFICATION);
-        intent.putExtra(OSU_COUNT, osuCount);
-        intent.setFlags(
-                Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
-
-        mContext.startActivity(intent);
-    }
-
-    public void showStatus(OSUOperationStatus status, String spName, String message,
-                           String remoteStatus) {
-        Intent intent = new Intent(ACTION_OSU_NOTIFICATION);
-        intent.putExtra(SP_NAME, spName);
-        intent.putExtra(PROV_SUCCESS, status == OSUOperationStatus.ProvisioningSuccess);
-        if (message != null) {
-            intent.putExtra(PROV_MESSAGE, message);
-        }
-        intent.setFlags(
-                Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
-        mContext.startActivity(intent);
-    }
-
-    public void showDeauth(String spName, boolean ess, int delay, String url) {
-        Intent intent = new Intent(ACTION_OSU_NOTIFICATION);
-        intent.putExtra(SP_NAME, spName);
-        intent.putExtra(DEAUTH, ess);
-        intent.putExtra(DEAUTH_DELAY, delay);
-        intent.putExtra(DEAUTH_URL, url);
-        intent.setFlags(
-                Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT | Intent.FLAG_ACTIVITY_NEW_TASK);
-        mContext.startActivity(intent);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/AuthMatch.java b/packages/Osu/src/com/android/hotspot2/AuthMatch.java
deleted file mode 100644
index f9c1f42..0000000
--- a/packages/Osu/src/com/android/hotspot2/AuthMatch.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.android.hotspot2;
-
-/**
- * Match score for EAP credentials:
- * None means that there is a distinct mismatch, i.e. realm, method or parameter is defined
- * and mismatches that of the credential.
- * Indeterminate means that there is no ANQP information to match against.
- * Note: The numeric values given to the constants are used for preference comparison and
- * must be maintained accordingly.
- */
-public abstract class AuthMatch {
-    public static final int None = -1;
-    public static final int Indeterminate = 0;
-    public static final int Realm = 0x04;
-    public static final int Method = 0x02;
-    public static final int Param = 0x01;
-    public static final int MethodParam = Method | Param;
-    public static final int Exact = Realm | Method | Param;
-
-    public static String toString(int match) {
-        if (match < 0) {
-            return "None";
-        } else if (match == 0) {
-            return "Indeterminate";
-        }
-
-        StringBuilder sb = new StringBuilder();
-        if ((match & Realm) != 0) {
-            sb.append("Realm");
-        }
-        if ((match & Method) != 0) {
-            sb.append("Method");
-        }
-        if ((match & Param) != 0) {
-            sb.append("Param");
-        }
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/IMSIParameter.java b/packages/Osu/src/com/android/hotspot2/IMSIParameter.java
deleted file mode 100644
index 1d5d95d..0000000
--- a/packages/Osu/src/com/android/hotspot2/IMSIParameter.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.android.hotspot2;
-
-import java.io.IOException;
-
-public class IMSIParameter {
-    private final String mImsi;
-    private final boolean mPrefix;
-
-    public IMSIParameter(String imsi, boolean prefix) {
-        mImsi = imsi;
-        mPrefix = prefix;
-    }
-
-    public IMSIParameter(String imsi) throws IOException {
-        if (imsi == null || imsi.length() == 0) {
-            throw new IOException("Bad IMSI: '" + imsi + "'");
-        }
-
-        int nonDigit;
-        char stopChar = '\0';
-        for (nonDigit = 0; nonDigit < imsi.length(); nonDigit++) {
-            stopChar = imsi.charAt(nonDigit);
-            if (stopChar < '0' || stopChar > '9') {
-                break;
-            }
-        }
-
-        if (nonDigit == imsi.length()) {
-            mImsi = imsi;
-            mPrefix = false;
-        } else if (nonDigit == imsi.length() - 1 && stopChar == '*') {
-            mImsi = imsi.substring(0, nonDigit);
-            mPrefix = true;
-        } else {
-            throw new IOException("Bad IMSI: '" + imsi + "'");
-        }
-    }
-
-    public boolean matches(String fullIMSI) {
-        if (mPrefix) {
-            return mImsi.regionMatches(false, 0, fullIMSI, 0, mImsi.length());
-        } else {
-            return mImsi.equals(fullIMSI);
-        }
-    }
-
-    public boolean matchesMccMnc(String mccMnc) {
-        if (mPrefix) {
-            // For a prefix match, the entire prefix must match the mcc+mnc
-            return mImsi.regionMatches(false, 0, mccMnc, 0, mImsi.length());
-        } else {
-            // For regular match, the entire length of mcc+mnc must match this IMSI
-            return mImsi.regionMatches(false, 0, mccMnc, 0, mccMnc.length());
-        }
-    }
-
-    public boolean isPrefix() {
-        return mPrefix;
-    }
-
-    public String getImsi() {
-        return mImsi;
-    }
-
-    public int prefixLength() {
-        return mImsi.length();
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        } else if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        IMSIParameter that = (IMSIParameter) thatObject;
-        return mPrefix == that.mPrefix && mImsi.equals(that.mImsi);
-    }
-
-    @Override
-    public int hashCode() {
-        int result = mImsi != null ? mImsi.hashCode() : 0;
-        result = 31 * result + (mPrefix ? 1 : 0);
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        if (mPrefix) {
-            return mImsi + '*';
-        } else {
-            return mImsi;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/OMADMAdapter.java b/packages/Osu/src/com/android/hotspot2/OMADMAdapter.java
deleted file mode 100644
index 1429b0b..0000000
--- a/packages/Osu/src/com/android/hotspot2/OMADMAdapter.java
+++ /dev/null
@@ -1,601 +0,0 @@
-package com.android.hotspot2;
-
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.net.wifi.WifiManager;
-import android.os.SystemProperties;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.util.Log;
-
-import com.android.anqp.eap.EAP;
-import com.android.hotspot2.omadm.MOTree;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMAConstructed;
-import com.android.hotspot2.osu.OSUManager;
-
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static com.android.anqp.eap.NonEAPInnerAuth.NonEAPType;
-import static com.android.anqp.eap.NonEAPInnerAuth.mapInnerType;
-
-public class OMADMAdapter {
-    private final Context mContext;
-    private final String mImei;
-    private final String mImsi;
-    private final String mDevID;
-    private final List<PathAccessor> mDevInfo;
-    private final List<PathAccessor> mDevDetail;
-
-    private static final int IMEI_Length = 14;
-
-    private static final String[] ExtWiFiPath = {"DevDetail", "Ext", "org.wi-fi", "Wi-Fi"};
-
-    private static final Map<String, String> RTProps = new HashMap<>();
-
-    private MOTree mDevInfoTree;
-    private MOTree mDevDetailTree;
-
-    private static OMADMAdapter sInstance;
-
-    static {
-        RTProps.put(ExtWiFiPath[2], "urn:wfa:mo-ext:hotspot2dot0-devdetail-ext:1.0");
-    }
-
-    private static abstract class PathAccessor {
-        private final String[] mPath;
-        private final int mHashCode;
-
-        protected PathAccessor(Object... path) {
-            int length = 0;
-            for (Object o : path) {
-                if (o.getClass() == String[].class) {
-                    length += ((String[]) o).length;
-                } else {
-                    length++;
-                }
-            }
-            mPath = new String[length];
-            int n = 0;
-            for (Object o : path) {
-                if (o.getClass() == String[].class) {
-                    for (String element : (String[]) o) {
-                        mPath[n++] = element;
-                    }
-                } else if (o.getClass() == Integer.class) {
-                    mPath[n++] = "x" + o.toString();
-                } else {
-                    mPath[n++] = o.toString();
-                }
-            }
-            mHashCode = Arrays.hashCode(mPath);
-        }
-
-        @Override
-        public int hashCode() {
-            return mHashCode;
-        }
-
-        @Override
-        public boolean equals(Object thatObject) {
-            return thatObject == this || (thatObject instanceof ConstPathAccessor &&
-                    Arrays.equals(mPath, ((PathAccessor) thatObject).mPath));
-        }
-
-        private String[] getPath() {
-            return mPath;
-        }
-
-        protected abstract Object getValue();
-    }
-
-    private static class ConstPathAccessor<T> extends PathAccessor {
-        private final T mValue;
-
-        protected ConstPathAccessor(T value, Object... path) {
-            super(path);
-            mValue = value;
-        }
-
-        protected Object getValue() {
-            return mValue;
-        }
-    }
-
-    public static OMADMAdapter getInstance(Context context) {
-        synchronized (OMADMAdapter.class) {
-            if (sInstance == null) {
-                sInstance = new OMADMAdapter(context);
-            }
-            return sInstance;
-        }
-    }
-
-    private OMADMAdapter(Context context) {
-        mContext = context;
-
-        TelephonyManager tm = (TelephonyManager) context
-                .getSystemService(Context.TELEPHONY_SERVICE);
-        String simOperator = tm.getSimOperator();
-        mImsi = tm.getSubscriberId();
-        mImei = tm.getImei();
-        String strDevId;
-
-        /* Use MEID for sprint */
-        if ("310120".equals(simOperator) || (mImsi != null && mImsi.startsWith("310120"))) {
-                /* MEID is 14 digits. If IMEI is returned as DevId, MEID can be extracted by taking
-                 * first 14 characters. This is not always true but should be the case for sprint */
-            strDevId = tm.getDeviceId().toUpperCase(Locale.US);
-            if (strDevId != null && strDevId.length() >= IMEI_Length) {
-                strDevId = strDevId.substring(0, IMEI_Length);
-            } else {
-                Log.w(OSUManager.TAG, "MEID cannot be extracted from DeviceId " + strDevId);
-            }
-        } else {
-            if (isPhoneTypeLTE()) {
-                strDevId = mImei;
-            } else {
-                strDevId = tm.getDeviceId();
-            }
-            if (strDevId == null) {
-                strDevId = "unknown";
-            }
-            strDevId = strDevId.toUpperCase(Locale.US);
-
-            if (!isPhoneTypeLTE()) {
-                strDevId = strDevId.substring(0, IMEI_Length);
-            }
-        }
-        mDevID = strDevId;
-
-        mDevInfo = new ArrayList<>();
-        mDevInfo.add(new ConstPathAccessor<>(strDevId, "DevInfo", "DevID"));
-        mDevInfo.add(new ConstPathAccessor<>(getProperty(context,
-                "Man", "ro.product.manufacturer", "unknown"), "DevInfo", "Man"));
-        mDevInfo.add(new ConstPathAccessor<>(getProperty(context,
-                "Mod", "ro.product.model", "generic"), "DevInfo", "Mod"));
-        mDevInfo.add(new ConstPathAccessor<>(getLocale(context), "DevInfo", "Lang"));
-        mDevInfo.add(new ConstPathAccessor<>("1.2", "DevInfo", "DmV"));
-
-        mDevDetail = new ArrayList<>();
-        mDevDetail.add(new ConstPathAccessor<>(getDeviceType(), "DevDetail", "DevType"));
-        mDevDetail.add(new ConstPathAccessor<>(SystemProperties.get("ro.product.brand"),
-                "DevDetail", "OEM"));
-        mDevDetail.add(new ConstPathAccessor<>(getVersion(context, false), "DevDetail", "FwV"));
-        mDevDetail.add(new ConstPathAccessor<>(getVersion(context, true), "DevDetail", "SwV"));
-        mDevDetail.add(new ConstPathAccessor<>(getHwV(), "DevDetail", "HwV"));
-        mDevDetail.add(new ConstPathAccessor<>("TRUE", "DevDetail", "LrgObj"));
-
-        mDevDetail.add(new ConstPathAccessor<>(32, "DevDetail", "URI", "MaxDepth"));
-        mDevDetail.add(new ConstPathAccessor<>(2048, "DevDetail", "URI", "MaxTotLen"));
-        mDevDetail.add(new ConstPathAccessor<>(64, "DevDetail", "URI", "MaxSegLen"));
-
-        AtomicInteger index = new AtomicInteger(1);
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_TTLS, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        mDevDetail.add(new ConstPathAccessor<>(mapInnerType(NonEAPType.MSCHAPv2), ExtWiFiPath,
-                "EAPMethodList", index, "InnerMethod"));
-
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_TTLS, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        mDevDetail.add(new ConstPathAccessor<>(mapInnerType(NonEAPType.PAP), ExtWiFiPath,
-                "EAPMethodList", index, "InnerMethod"));
-
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_TTLS, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        mDevDetail.add(new ConstPathAccessor<>(mapInnerType(NonEAPType.MSCHAP), ExtWiFiPath,
-                "EAPMethodList", index, "InnerMethod"));
-
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_TLS, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_AKA, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_AKAPrim, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-        index.incrementAndGet();
-        mDevDetail.add(new ConstPathAccessor<>(EAP.EAP_SIM, ExtWiFiPath,
-                "EAPMethodList", index, "EAPType"));
-
-        mDevDetail.add(new ConstPathAccessor<>("FALSE", ExtWiFiPath, "ManufacturingCertificate"));
-        mDevDetail.add(new ConstPathAccessor<>(mImsi, ExtWiFiPath, "IMSI"));
-        mDevDetail.add(new ConstPathAccessor<>(mImei, ExtWiFiPath, "IMEI_MEID"));
-        mDevDetail.add(new PathAccessor(ExtWiFiPath, "Wi-FiMACAddress") {
-            @Override
-            protected String getValue() {
-                return getMAC();
-            }
-        });
-    }
-
-    private static void buildNode(PathAccessor pathAccessor, int depth, OMAConstructed parent)
-            throws IOException {
-        String[] path = pathAccessor.getPath();
-        String name = path[depth];
-        if (depth < path.length - 1) {
-            OMAConstructed node = (OMAConstructed) parent.getChild(name);
-            if (node == null) {
-                node = (OMAConstructed) parent.addChild(name, RTProps.get(name),
-                        null, null);
-            }
-            buildNode(pathAccessor, depth + 1, node);
-        } else if (pathAccessor.getValue() != null) {
-            parent.addChild(name, null, pathAccessor.getValue().toString(), null);
-        }
-    }
-
-    public String getMAC() {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        return wifiManager != null ?
-                String.format("%012x",
-                        Utils.parseMac(wifiManager.getConnectionInfo().getMacAddress())) :
-                null;
-    }
-
-    public String getImei() {
-        return mImei;
-    }
-
-    public byte[] getMeid() {
-        return Arrays.copyOf(mImei.getBytes(StandardCharsets.ISO_8859_1), IMEI_Length);
-    }
-
-    public String getDevID() {
-        return mDevID;
-    }
-
-    public MOTree getMO(String urn) {
-        try {
-            switch (urn) {
-                case OMAConstants.DevInfoURN:
-                    if (mDevInfoTree == null) {
-                        OMAConstructed root = new OMAConstructed(null, "DevInfo", urn);
-                        for (PathAccessor pathAccessor : mDevInfo) {
-                            buildNode(pathAccessor, 1, root);
-                        }
-                        mDevInfoTree = MOTree.buildMgmtTree(OMAConstants.DevInfoURN,
-                                OMAConstants.OMAVersion, root);
-                    }
-                    return mDevInfoTree;
-                case OMAConstants.DevDetailURN:
-                    if (mDevDetailTree == null) {
-                        OMAConstructed root = new OMAConstructed(null, "DevDetail", urn);
-                        for (PathAccessor pathAccessor : mDevDetail) {
-                            buildNode(pathAccessor, 1, root);
-                        }
-                        mDevDetailTree = MOTree.buildMgmtTree(OMAConstants.DevDetailURN,
-                                OMAConstants.OMAVersion, root);
-                    }
-                    return mDevDetailTree;
-                default:
-                    throw new IllegalArgumentException(urn);
-            }
-        } catch (IOException ioe) {
-            Log.e(OSUManager.TAG, "Caught exception building OMA Tree: " + ioe, ioe);
-            return null;
-        }
-
-        /*
-        switch (urn) {
-            case DevInfoURN: return DevInfo;
-            case DevDetailURN: return DevDetail;
-            default: throw new IllegalArgumentException(urn);
-        }
-        */
-    }
-
-    // TODO: For now, assume the device supports LTE.
-    private static boolean isPhoneTypeLTE() {
-        return true;
-    }
-
-    private static String getHwV() {
-        try {
-            return SystemProperties.get("ro.hardware", "Unknown")
-                    + "." + SystemProperties.get("ro.revision", "Unknown");
-        } catch (RuntimeException e) {
-            return "Unknown";
-        }
-    }
-
-    private static String getDeviceType() {
-        String devicetype = SystemProperties.get("ro.build.characteristics");
-        if ((((TextUtils.isEmpty(devicetype)) || (!devicetype.equals("tablet"))))) {
-            devicetype = "phone";
-        }
-        return devicetype;
-    }
-
-    private static String getVersion(Context context, boolean swv) {
-        String version;
-        try {
-            if (!isSprint(context) && swv) {
-                return "Android " + SystemProperties.get("ro.build.version.release");
-            } else {
-                version = SystemProperties.get("ro.build.version.full");
-                if (null == version || version.equals("")) {
-                    return SystemProperties.get("ro.build.id", null) + "~"
-                            + SystemProperties.get("ro.build.config.version", null) + "~"
-                            + SystemProperties.get("gsm.version.baseband", null) + "~"
-                            + SystemProperties.get("ro.gsm.flexversion", null);
-                }
-            }
-        } catch (RuntimeException e) {
-            return "Unknown";
-        }
-        return version;
-    }
-
-    private static boolean isSprint(Context context) {
-        TelephonyManager tm = (TelephonyManager) context
-                .getSystemService(Context.TELEPHONY_SERVICE);
-        String simOperator = tm.getSimOperator();
-        String imsi = tm.getSubscriberId();
-        /* Use MEID for sprint */
-        if ("310120".equals(simOperator) || (imsi != null && imsi.startsWith("310120"))) {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    private static String getLocale(Context context) {
-        String strLang = readValueFromFile(context, "Lang");
-        if (strLang == null) {
-            strLang = Locale.getDefault().toString();
-        }
-        return strLang;
-    }
-
-    private static String getProperty(Context context, String key, String propKey, String dflt) {
-        String strMan = readValueFromFile(context, key);
-        if (strMan == null) {
-            strMan = SystemProperties.get(propKey, dflt);
-        }
-        return strMan;
-    }
-
-    private static String readValueFromFile(Context context, String propName) {
-        String ret = null;
-        // use preference instead of the system property
-        SharedPreferences prefs = context.getSharedPreferences("dmconfig", 0);
-        if (prefs.contains(propName)) {
-            ret = prefs.getString(propName, "");
-            if (ret.length() == 0) {
-                ret = null;
-            }
-        }
-        return ret;
-    }
-
-    private static final String DevDetail =
-            "<MgmtTree>" +
-                    "<VerDTD>1.2</VerDTD>" +
-                    "<Node>" +
-                    "<NodeName>DevDetail</NodeName>" +
-                    "<RTProperties>" +
-                    "<Type>" +
-                    "<DDFName>urn:oma:mo:oma-dm-devdetail:1.0</DDFName>" +
-                    "</Type>" +
-                    "</RTProperties>" +
-                    "<Node>" +
-                    "<NodeName>Ext</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>org.wi-fi</NodeName>" +
-                    "<RTProperties>" +
-                    "<Type>" +
-                    "<DDFName>" +
-                    "urn:wfa:mo-ext:hotspot2dot0-devdetail-ext :1.0" +
-                    "</DDFName>" +
-                    "</Type>" +
-                    "</RTProperties>" +
-                    "<Node>" +
-                    "<NodeName>Wi-Fi</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>EAPMethodList</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>Method01</NodeName>" +
-                    "<!-- EAP-TTLS/MS-CHAPv2 -->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>21</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>InnerMethod</NodeName>" +
-                    "<Value>MS-CHAP-V2</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method02</NodeName>" +
-                    "<!-- EAP-TLS -->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>13</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method03</NodeName>" +
-                    "<!-- EAP-SIM -->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>18</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method04</NodeName>" +
-                    "<!-- EAP-AKA -->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>23</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method05</NodeName>" +
-                    "<!-- EAP-AKA' -->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>50</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method06</NodeName>" +
-                    "<!-- Supported method (EAP-TTLS/PAP) not mandated by Hotspot2.0-->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>21</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>InnerMethod</NodeName>" +
-                    "<Value>PAP</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Method07</NodeName>" +
-                    "<!-- Supported method (PEAP/EAP-GTC) not mandated by Hotspot 2.0-->" +
-                    "<Node>" +
-                    "<NodeName>EAPType</NodeName>" +
-                    "<Value>25</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>InnerEAPType</NodeName>" +
-                    "<Value>6</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>SPCertificate</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>Cert01</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>CertificateIssuerName</NodeName>" +
-                    "<Value>CN=RuckusCA</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>ManufacturingCertificate</NodeName>" +
-                    "<Value>FALSE</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Wi-FiMACAddress</NodeName>" +
-                    "<Value>001d2e112233</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>ClientTriggerRedirectURI</NodeName>" +
-                    "<Value>http://127.0.0.1:12345/index.htm</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Ops</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>launchBrowserToURI</NodeName>" +
-                    "<Value></Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>negotiateClientCertTLS</NodeName>" +
-                    "<Value></Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>getCertificate</NodeName>" +
-                    "<Value></Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<!-- End of Wi-Fi node -->" +
-                    "</Node>" +
-                    "<!-- End of org.wi-fi node -->" +
-                    "</Node>" +
-                    "<!-- End of Ext node -->" +
-                    "<Node>" +
-                    "<NodeName>URI</NodeName>" +
-                    "<Node>" +
-                    "<NodeName>MaxDepth</NodeName>" +
-                    "<Value>32</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>MaxTotLen</NodeName>" +
-                    "<Value>2048</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>MaxSegLen</NodeName>" +
-                    "<Value>64</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>DevType</NodeName>" +
-                    "<Value>Smartphone</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>OEM</NodeName>" +
-                    "<Value>ACME</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>FwV</NodeName>" +
-                    "<Value>1.2.100.5</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>SwV</NodeName>" +
-                    "<Value>9.11.130</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>HwV</NodeName>" +
-                    "<Value>1.0</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>LrgObj</NodeName>" +
-                    "<Value>TRUE</Value>" +
-                    "</Node>" +
-                    "</Node>" +
-                    "</MgmtTree>";
-
-
-    private static final String DevInfo =
-            "<MgmtTree>" +
-                    "<VerDTD>1.2</VerDTD>" +
-                    "<Node>" +
-                    "<NodeName>DevInfo</NodeName>" +
-                    "<RTProperties>" +
-                    "<Type>" +
-                    "<DDFName>urn:oma:mo:oma-dm-devinfo:1.0" +
-                    "</DDFName>" +
-                    "</Type>" +
-                    "</RTProperties>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>DevID</NodeName>" +
-                    "<Path>DevInfo</Path>" +
-                    "<Value>urn:acme:00-11-22-33-44-55</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Man</NodeName>" +
-                    "<Path>DevInfo</Path>" +
-                    "<Value>ACME</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Mod</NodeName>" +
-                    "<Path>DevInfo</Path>" +
-                    "<Value>HS2.0-01</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>DmV</NodeName>" +
-                    "<Path>DevInfo</Path>" +
-                    "<Value>1.2</Value>" +
-                    "</Node>" +
-                    "<Node>" +
-                    "<NodeName>Lang</NodeName>" +
-                    "<Path>DevInfo</Path>" +
-                    "<Value>en-US</Value>" +
-                    "</Node>" +
-                    "</MgmtTree>";
-}
diff --git a/packages/Osu/src/com/android/hotspot2/PasspointMatch.java b/packages/Osu/src/com/android/hotspot2/PasspointMatch.java
deleted file mode 100644
index 8330283..0000000
--- a/packages/Osu/src/com/android/hotspot2/PasspointMatch.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.android.hotspot2;
-
-public enum PasspointMatch {
-    HomeProvider,
-    RoamingProvider,
-    Incomplete,
-    None,
-    Declined
-}
diff --git a/packages/Osu/src/com/android/hotspot2/Utils.java b/packages/Osu/src/com/android/hotspot2/Utils.java
deleted file mode 100644
index 880007f..0000000
--- a/packages/Osu/src/com/android/hotspot2/Utils.java
+++ /dev/null
@@ -1,407 +0,0 @@
-package com.android.hotspot2;
-
-import com.android.anqp.Constants;
-
-import java.nio.ByteBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.nio.charset.CharsetDecoder;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.TimeZone;
-
-import static com.android.anqp.Constants.BYTE_MASK;
-import static com.android.anqp.Constants.NIBBLE_MASK;
-
-public abstract class Utils {
-
-    public static final long UNSET_TIME = -1;
-
-    private static final int EUI48Length = 6;
-    private static final int EUI64Length = 8;
-    private static final long EUI48Mask = 0xffffffffffffL;
-    private static final String[] PLMNText = {"org", "3gppnetwork", "mcc*", "mnc*", "wlan"};
-
-    public static List<String> splitDomain(String domain) {
-
-        if (domain.endsWith("."))
-            domain = domain.substring(0, domain.length() - 1);
-        int at = domain.indexOf('@');
-        if (at >= 0)
-            domain = domain.substring(at + 1);
-
-        String[] labels = domain.toLowerCase().split("\\.");
-        LinkedList<String> labelList = new LinkedList<String>();
-        for (String label : labels) {
-            labelList.addFirst(label);
-        }
-
-        return labelList;
-    }
-
-    public static long parseMac(String s) {
-
-        long mac = 0;
-        int count = 0;
-        for (int n = 0; n < s.length(); n++) {
-            int nibble = Utils.fromHex(s.charAt(n), true);  // Set lenient to not blow up on ':'
-            if (nibble >= 0) {                              // ... and use only legit hex.
-                mac = (mac << 4) | nibble;
-                count++;
-            }
-        }
-        if (count < 12 || (count & 1) == 1) {
-            throw new IllegalArgumentException("Bad MAC address: '" + s + "'");
-        }
-        return mac;
-    }
-
-    public static String macToString(long mac) {
-        int len = (mac & ~EUI48Mask) != 0 ? EUI64Length : EUI48Length;
-        StringBuilder sb = new StringBuilder();
-        boolean first = true;
-        for (int n = (len - 1) * Byte.SIZE; n >= 0; n -= Byte.SIZE) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(':');
-            }
-            sb.append(String.format("%02x", (mac >>> n) & Constants.BYTE_MASK));
-        }
-        return sb.toString();
-    }
-
-    public static String getMccMnc(List<String> domain) {
-        if (domain.size() != PLMNText.length) {
-            return null;
-        }
-
-        for (int n = 0; n < PLMNText.length; n++) {
-            String expect = PLMNText[n];
-            int len = expect.endsWith("*") ? expect.length() - 1 : expect.length();
-            if (!domain.get(n).regionMatches(0, expect, 0, len)) {
-                return null;
-            }
-        }
-
-        String prefix = domain.get(2).substring(3) + domain.get(3).substring(3);
-        for (int n = 0; n < prefix.length(); n++) {
-            char ch = prefix.charAt(n);
-            if (ch < '0' || ch > '9') {
-                return null;
-            }
-        }
-        return prefix;
-    }
-
-    public static String toIpString(int leIp) {
-        return String.format("%d.%d.%d.%d",
-                leIp & BYTE_MASK,
-                (leIp >> 8) & BYTE_MASK,
-                (leIp >> 16) & BYTE_MASK,
-                (leIp >> 24) & BYTE_MASK);
-    }
-
-    public static String bssidsToString(Collection<Long> bssids) {
-        StringBuilder sb = new StringBuilder();
-        for (Long bssid : bssids) {
-            sb.append(String.format(" %012x", bssid));
-        }
-        return sb.toString();
-    }
-
-    public static String roamingConsortiumsToString(long[] ois) {
-        if (ois == null) {
-            return "null";
-        }
-        List<Long> list = new ArrayList<Long>(ois.length);
-        for (long oi : ois) {
-            list.add(oi);
-        }
-        return roamingConsortiumsToString(list);
-    }
-
-    public static String roamingConsortiumsToString(Collection<Long> ois) {
-        StringBuilder sb = new StringBuilder();
-        boolean first = true;
-        for (long oi : ois) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(", ");
-            }
-            if (Long.numberOfLeadingZeros(oi) > 40) {
-                sb.append(String.format("%06x", oi));
-            } else {
-                sb.append(String.format("%010x", oi));
-            }
-        }
-        return sb.toString();
-    }
-
-    public static String toUnicodeEscapedString(String s) {
-        StringBuilder sb = new StringBuilder(s.length());
-        for (int n = 0; n < s.length(); n++) {
-            char ch = s.charAt(n);
-            if (ch >= ' ' && ch < 127) {
-                sb.append(ch);
-            } else {
-                sb.append("\\u").append(String.format("%04x", (int) ch));
-            }
-        }
-        return sb.toString();
-    }
-
-    public static String toHexString(byte[] data) {
-        if (data == null) {
-            return "null";
-        }
-        StringBuilder sb = new StringBuilder(data.length * 3);
-
-        boolean first = true;
-        for (byte b : data) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(' ');
-            }
-            sb.append(String.format("%02x", b & BYTE_MASK));
-        }
-        return sb.toString();
-    }
-
-    public static String toHex(byte[] octets) {
-        StringBuilder sb = new StringBuilder(octets.length * 2);
-        for (byte o : octets) {
-            sb.append(String.format("%02x", o & BYTE_MASK));
-        }
-        return sb.toString();
-    }
-
-    public static byte[] hexToBytes(String text) {
-        if ((text.length() & 1) == 1) {
-            throw new NumberFormatException("Odd length hex string: " + text.length());
-        }
-        byte[] data = new byte[text.length() >> 1];
-        int position = 0;
-        for (int n = 0; n < text.length(); n += 2) {
-            data[position] =
-                    (byte) (((fromHex(text.charAt(n), false) & NIBBLE_MASK) << 4) |
-                            (fromHex(text.charAt(n + 1), false) & NIBBLE_MASK));
-            position++;
-        }
-        return data;
-    }
-
-    public static int fromHex(char ch, boolean lenient) throws NumberFormatException {
-        if (ch <= '9' && ch >= '0') {
-            return ch - '0';
-        } else if (ch >= 'a' && ch <= 'f') {
-            return ch + 10 - 'a';
-        } else if (ch <= 'F' && ch >= 'A') {
-            return ch + 10 - 'A';
-        } else if (lenient) {
-            return -1;
-        } else {
-            throw new NumberFormatException("Bad hex-character: " + ch);
-        }
-    }
-
-    private static char toAscii(int b) {
-        return b >= ' ' && b < 0x7f ? (char) b : '.';
-    }
-
-    static boolean isDecimal(String s) {
-        for (int n = 0; n < s.length(); n++) {
-            char ch = s.charAt(n);
-            if (ch < '0' || ch > '9') {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public static <T extends Comparable> int compare(Comparable<T> c1, T c2) {
-        if (c1 == null) {
-            return c2 == null ? 0 : -1;
-        } else if (c2 == null) {
-            return 1;
-        } else {
-            return c1.compareTo(c2);
-        }
-    }
-
-    public static String bytesToBingoCard(ByteBuffer data, int len) {
-        ByteBuffer dup = data.duplicate();
-        dup.limit(dup.position() + len);
-        return bytesToBingoCard(dup);
-    }
-
-    public static String bytesToBingoCard(ByteBuffer data) {
-        ByteBuffer dup = data.duplicate();
-        StringBuilder sbx = new StringBuilder();
-        while (dup.hasRemaining()) {
-            sbx.append(String.format("%02x ", dup.get() & BYTE_MASK));
-        }
-        dup = data.duplicate();
-        sbx.append(' ');
-        while (dup.hasRemaining()) {
-            sbx.append(String.format("%c", toAscii(dup.get() & BYTE_MASK)));
-        }
-        return sbx.toString();
-    }
-
-    public static String toHMS(long millis) {
-        long time = millis >= 0 ? millis : -millis;
-        long tmp = time / 1000L;
-        long ms = time - tmp * 1000L;
-
-        time = tmp;
-        tmp /= 60L;
-        long s = time - tmp * 60L;
-
-        time = tmp;
-        tmp /= 60L;
-        long m = time - tmp * 60L;
-
-        return String.format("%s%d:%02d:%02d.%03d", millis < 0 ? "-" : "", tmp, m, s, ms);
-    }
-
-    public static String toUTCString(long ms) {
-        if (ms < 0) {
-            return "unset";
-        }
-        Calendar c = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
-        c.setTimeInMillis(ms);
-        return String.format("%4d/%02d/%02d %2d:%02d:%02dZ",
-                c.get(Calendar.YEAR),
-                c.get(Calendar.MONTH) + 1,
-                c.get(Calendar.DAY_OF_MONTH),
-                c.get(Calendar.HOUR_OF_DAY),
-                c.get(Calendar.MINUTE),
-                c.get(Calendar.SECOND));
-    }
-
-    /**
-     * Decode a wpa_supplicant SSID. wpa_supplicant uses double quotes around plain strings, or
-     * expects a hex-string if no quotes appear.
-     * 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.
-     *
-     * @param ssid The SSID from the config.
-     * @return The actual string content of the SSID
-     */
-    public static String decodeSsid(String ssid) {
-        if (ssid.length() <= 1) {
-            return ssid;
-        } else if (ssid.startsWith("\"") && ssid.endsWith("\"")) {
-            return unescapeSsid(ssid.substring(1, ssid.length() - 1));
-        } else if ((ssid.length() & 1) == 1) {
-            return ssid;
-        }
-
-        byte[] codepoints;
-        try {
-            codepoints = new byte[ssid.length() / 2];
-            for (int n = 0; n < ssid.length(); n += 2) {
-                codepoints[n / 2] = (byte) decodeHexPair(ssid, n);
-            }
-        } catch (NumberFormatException nfe) {
-            return ssid;
-        }
-
-        try {
-            CharsetDecoder decoder = StandardCharsets.UTF_8.newDecoder();
-            return decoder.decode(ByteBuffer.wrap(codepoints)).toString();
-        } catch (CharacterCodingException cce) {
-            /* Do nothing, try LATIN-1 */
-        }
-        try {
-            CharsetDecoder decoder = StandardCharsets.ISO_8859_1.newDecoder();
-            return decoder.decode(ByteBuffer.wrap(codepoints)).toString();
-        } catch (CharacterCodingException cce) {    // Should not be possible.
-            return ssid;
-        }
-    }
-
-    private static String unescapeSsid(String s) {
-        StringBuilder sb = new StringBuilder();
-        for (int n = 0; n < s.length(); n++) {
-            char ch = s.charAt(n);
-            if (ch != '\\' || n >= s.length() - 1) {
-                sb.append(ch);
-            } else {
-                n++;
-                ch = s.charAt(n);
-                switch (ch) {
-                    case '"':
-                    case '\\':
-                    default:
-                        sb.append(ch);
-                        break;
-                    case 'e':
-                        sb.append((char) 27);    // Escape char
-                        break;
-                    case 'n':
-                        sb.append('\n');
-                        break;
-                    case 'r':
-                        sb.append('\r');
-                        break;
-                    case 't':
-                        sb.append('\t');
-                        break;
-                    case 'x':
-                        if (s.length() - n < 3) {
-                            sb.append('\\').append(ch);
-                        } else {
-                            n++;
-                            sb.append((char) decodeHexPair(s, n));
-                            n++;
-                        }
-                        break;
-                }
-            }
-        }
-        return sb.toString();
-    }
-
-    private static int decodeHexPair(String s, int position) {
-        return fromHex(s.charAt(position)) << 4 | fromHex(s.charAt(position + 1));
-    }
-
-    private static int fromHex(char ch) {
-        if (ch >= '0' && ch <= '9') {
-            return ch - '0';
-        } else if (ch >= 'A' && ch <= 'F') {
-            return ch - 'A' + 10;
-        } else if (ch >= 'a' && ch <= 'f') {
-            return ch - 'a' + 10;
-        } else {
-            throw new NumberFormatException(String.format("Not hex: '%c'", ch));
-        }
-    }
-
-    public static void delay(long ms) {
-        long until = System.currentTimeMillis() + ms;
-        for (; ; ) {
-            long remainder = until - System.currentTimeMillis();
-            if (remainder <= 0) {
-                break;
-            }
-            try {
-                Thread.sleep(remainder);
-            } catch (InterruptedException ie) { /**/ }
-        }
-    }
-
-    public static <T extends Enum<T>> T mapEnum(int ordinal, Class<T> enumClass) {
-        T[] constants = enumClass.getEnumConstants();
-        return ordinal >= 0 && ordinal < constants.length ? constants[ordinal]: null;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/app/IOSUAccessor.aidl b/packages/Osu/src/com/android/hotspot2/app/IOSUAccessor.aidl
deleted file mode 100644
index 500dd2e..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/IOSUAccessor.aidl
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.android.hotspot2.app;
-
-import com.android.hotspot2.app.OSUData;
-
-interface IOSUAccessor {
-    List<OSUData> getOsuData();
-    void selectOsu(int id);
-}
diff --git a/packages/Osu/src/com/android/hotspot2/app/LocalServiceBinder.java b/packages/Osu/src/com/android/hotspot2/app/LocalServiceBinder.java
deleted file mode 100644
index 8801839..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/LocalServiceBinder.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.android.hotspot2.app;
-
-import android.os.Binder;
-
-public class LocalServiceBinder extends Binder {
-    private final OSUService mDelegate;
-
-    public LocalServiceBinder(OSUService delegate) {
-        mDelegate = delegate;
-    }
-
-    public OSUService getService() {
-        return mDelegate;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/app/MainActivity.java b/packages/Osu/src/com/android/hotspot2/app/MainActivity.java
deleted file mode 100644
index 7fd2238..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/MainActivity.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package com.android.hotspot2.app;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.app.TaskStackBuilder;
-import android.content.ComponentName;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.graphics.BitmapFactory;
-import android.graphics.drawable.BitmapDrawable;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.TextView;
-
-import com.android.hotspot2.AppBridge;
-import com.android.hotspot2.R;
-import com.android.hotspot2.osu.OSUManager;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Main activity.
- */
-public class MainActivity extends Activity {
-    private static final int NOTIFICATION_ID = 0; // Used for OSU count
-    private static final int NOTIFICATION_MESSAGE_ID = 1; // Used for other messages
-    private static final String ACTION_SVC_BOUND = "SVC_BOUND";
-
-    private volatile OSUService mLocalService;
-
-    private final ServiceConnection mConnection = new ServiceConnection() {
-        @Override
-        public void onServiceConnected(ComponentName name, IBinder service) {
-            LocalServiceBinder binder = (LocalServiceBinder) service;
-            mLocalService = binder.getService();
-            showOsuSelection(mLocalService);
-        }
-
-        @Override
-        public void onServiceDisconnected(ComponentName name) {
-            mLocalService = null;
-        }
-    };
-
-    private ListView osuListView;
-    private OsuListAdapter osuListAdapter;
-    private String message;
-
-    public MainActivity() {
-
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        if (mLocalService != null) {
-            unbindService(mConnection);
-            mLocalService = null;
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        if (message != null) {
-            showDialog(message);
-            message = null;
-        }
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        final Intent intent = getIntent();
-        Bundle bundle = intent.getExtras();
-
-        if (intent.getAction() == null) {
-            if (mLocalService == null) {
-                bindService(new Intent(this, OSUService.class), mConnection, 0);
-            }
-        } else if (intent.getAction().equals(AppBridge.ACTION_OSU_NOTIFICATION)) {
-            if (bundle == null) {
-                Log.d(OSUManager.TAG, "No parameters for OSU notification");
-                return;
-            }
-            if (bundle.containsKey(AppBridge.OSU_COUNT)) {
-                showOsuCount(bundle.getInt("osu-count", 0), Collections.<OSUData>emptyList());
-            } else if (bundle.containsKey(AppBridge.PROV_SUCCESS)) {
-                showStatus(bundle.getBoolean(AppBridge.PROV_SUCCESS),
-                        bundle.getString(AppBridge.SP_NAME),
-                        bundle.getString(AppBridge.PROV_MESSAGE),
-                        null);
-            } else if (bundle.containsKey(AppBridge.DEAUTH)) {
-                showDeauth(bundle.getString(AppBridge.SP_NAME),
-                        bundle.getBoolean(AppBridge.DEAUTH),
-                        bundle.getInt(AppBridge.DEAUTH_DELAY),
-                        bundle.getString(AppBridge.DEAUTH_URL));
-            }
-        }
-    }
-
-    private void showOsuSelection(final OSUService osuService) {
-        List<OSUData> osuData = osuService.getOsuData();
-
-        setContentView(R.layout.activity_main);
-        Log.d("osu", "osu count:" + osuData.size());
-        View noOsuView = findViewById(R.id.no_osu);
-        if (osuData.size() > 0) {
-            noOsuView.setVisibility(View.GONE);
-            osuListAdapter = new OsuListAdapter(this, osuData);
-            osuListView = findViewById(R.id.profile_list);
-            osuListView.setAdapter(osuListAdapter);
-            osuListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-                @Override
-                public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
-                    OSUData osuData = (OSUData) adapterView.getAdapter().getItem(position);
-                    Log.d("osu", "launch osu:" + osuData.getName()
-                            + " id:" + osuData.getId());
-                    osuService.selectOsu(osuData.getId());
-                    finish();
-                }
-            });
-        } else {
-            noOsuView.setVisibility(View.VISIBLE);
-        }
-    }
-
-    private void showOsuCount(int osuCount, List<OSUData> osus) {
-        if (osuCount > 0) {
-            printOsuDataList(osus);
-            sendNotification(osuCount);
-        } else {
-            cancelNotification();
-        }
-        finish();
-    }
-
-    private void showStatus(boolean provSuccess, String spName, String provMessage,
-                            String remoteStatus) {
-        if (provSuccess) {
-            sendDialogMessage(
-                    String.format("Credentials for %s was successfully installed", spName));
-        } else {
-            if (spName != null) {
-                if (remoteStatus != null) {
-                    sendDialogMessage(
-                            String.format("Failed to install credentials for %s: %s: %s",
-                                    spName, provMessage, remoteStatus));
-                } else {
-                    sendDialogMessage(
-                            String.format("Failed to install credentials for %s: %s",
-                                    spName, provMessage));
-                }
-            } else {
-                sendDialogMessage(
-                        String.format("Failed to contact OSU: %s", provMessage));
-            }
-        }
-    }
-
-    private void showDeauth(String spName, boolean ess, int delay, String url) {
-        String delayReadable = getReadableTimeInSeconds(delay);
-        if (ess) {
-            if (delay > 60) {
-                sendDialogMessage(
-                        String.format("There is an issue connecting to %s [for the next %s]. " +
-                                "Please visit %s for details", spName, delayReadable, url));
-            } else {
-                sendDialogMessage(
-                        String.format("There is an issue connecting to %s. " +
-                                "Please visit %s for details", spName, url));
-            }
-        } else {
-            sendDialogMessage(
-                    String.format("There is an issue with the closest Access Point for %s. " +
-                                    "You may wait %s or move to another Access Point to " +
-                                    "regain access. Please visit %s for details.",
-                            spName, delayReadable, url));
-        }
-    }
-
-    private String getReadableTimeInSeconds(int timeSeconds) {
-        long hours = TimeUnit.SECONDS.toHours(timeSeconds);
-        long minutes = TimeUnit.SECONDS.toMinutes(timeSeconds) - TimeUnit.HOURS.toMinutes(hours);
-        long seconds =
-                timeSeconds - TimeUnit.HOURS.toSeconds(hours) - TimeUnit.MINUTES.toSeconds(minutes);
-        if (hours > 0) {
-            return String.format("%02d:%02d:%02d", hours, minutes, seconds);
-        } else {
-            return String.format("%ds", seconds);
-        }
-    }
-
-    private void sendNotification(int count) {
-        Notification.Builder builder =
-                new Notification.Builder(this)
-                        .setContentTitle(String.format("%s OSU available", count))
-                        .setContentText("Choose one to connect")
-                        .setSmallIcon(android.R.drawable.ic_dialog_info)
-                        .setAutoCancel(false);
-        Intent resultIntent = new Intent(this, MainActivity.class);
-
-        TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);
-        stackBuilder.addParentStack(MainActivity.class);
-        stackBuilder.addNextIntent(resultIntent);
-        PendingIntent resultPendingIntent =
-                stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);
-        builder.setContentIntent(resultPendingIntent);
-        NotificationManager notificationManager =
-                (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
-        notificationManager.notify(NOTIFICATION_ID, builder.build());
-    }
-
-    private void cancelNotification() {
-        NotificationManager notificationManager =
-                (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
-        notificationManager.cancel(NOTIFICATION_ID);
-    }
-
-    private void sendDialogMessage(String message) {
-//        sendNotificationMessage(message);
-        this.message = message;
-    }
-
-    private void showDialog(String message) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setMessage(message)
-                .setTitle("OSU");
-        builder.setOnCancelListener(new DialogInterface.OnCancelListener() {
-            @Override
-            public void onCancel(DialogInterface dialogInterface) {
-                dialogInterface.cancel();
-                finish();
-            }
-        });
-        AlertDialog dialog = builder.create();
-        dialog.show();
-    }
-
-    private void sendNotificationMessage(String title) {
-        Notification.Builder builder =
-                new Notification.Builder(this)
-                        .setContentTitle(title)
-                        .setContentText("Click to dismiss.")
-                        .setSmallIcon(android.R.drawable.ic_dialog_info)
-                        .setAutoCancel(true);
-        NotificationManager notificationManager =
-                (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
-        notificationManager.notify(NOTIFICATION_MESSAGE_ID, builder.build());
-    }
-
-    private static class OsuListAdapter extends ArrayAdapter<OSUData> {
-        private Activity activity;
-
-        public OsuListAdapter(Activity activity, List<OSUData> osuDataList) {
-            super(activity, R.layout.list_item, osuDataList);
-            this.activity = activity;
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            View view = convertView;
-            if (view == null) {
-                view = LayoutInflater.from(getContext()).inflate(R.layout.list_item, parent, false);
-            }
-            OSUData osuData = getItem(position);
-            TextView osuName = (TextView) view.findViewById(R.id.profile_name);
-            osuName.setText(osuData.getName());
-            TextView osuDetail = (TextView) view.findViewById(R.id.profile_detail);
-            osuDetail.setText(osuData.getServiceDescription());
-            ImageView osuIcon = (ImageView) view.findViewById(R.id.profile_logo);
-            byte[] iconData = osuData.getIconData();
-            osuIcon.setImageDrawable(
-                    new BitmapDrawable(activity.getResources(),
-                            BitmapFactory.decodeByteArray(iconData, 0, iconData.length)));
-            return view;
-        }
-    }
-
-    private void printOsuDataList(List<OSUData> osuDataList) {
-        for (OSUData osuData : osuDataList) {
-            Log.d("osu", String.format("OSUData:[%s][%s][%d]",
-                    osuData.getName(), osuData.getServiceDescription(),
-                    osuData.getId()));
-        }
-    }
-
-}
diff --git a/packages/Osu/src/com/android/hotspot2/app/OSUData.aidl b/packages/Osu/src/com/android/hotspot2/app/OSUData.aidl
deleted file mode 100644
index 3407f47..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/OSUData.aidl
+++ /dev/null
@@ -1,4 +0,0 @@
-package com.android.hotspot2.app;
-
-parcelable OSUData;
-
diff --git a/packages/Osu/src/com/android/hotspot2/app/OSUData.java b/packages/Osu/src/com/android/hotspot2/app/OSUData.java
deleted file mode 100644
index 17cc49b..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/OSUData.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.android.hotspot2.app;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import com.android.hotspot2.flow.OSUInfo;
-import com.android.hotspot2.osu.OSUManager;
-
-public class OSUData implements Parcelable {
-    private final String mName;
-    private final String mServiceDescription;
-    private final byte[] mIconData;
-    private final int mId;
-
-    public OSUData(OSUInfo osuInfo) {
-        mName = osuInfo.getName(OSUManager.LOCALE);
-        mServiceDescription = osuInfo.getServiceDescription(OSUManager.LOCALE);
-        mIconData = osuInfo.getIconFileElement().getIconData();
-        mId = osuInfo.getOsuID();
-    }
-
-    public String getName() {
-        return mName;
-    }
-
-    public String getServiceDescription() {
-        return mServiceDescription;
-    }
-
-    public byte[] getIconData() {
-        return mIconData;
-    }
-
-    public int getId() {
-        return mId;
-    }
-
-    private OSUData(Parcel in) {
-        mName = in.readString();
-        mServiceDescription = in.readString();
-        int iconSize = in.readInt();
-        mIconData = new byte[iconSize];
-        in.readByteArray(mIconData);
-        mId = in.readInt();
-    }
-
-    public static final Parcelable.Creator<OSUData> CREATOR = new Parcelable.Creator<OSUData>() {
-        public OSUData createFromParcel(Parcel in) {
-            return new OSUData(in);
-        }
-
-        public OSUData[] newArray(int size) {
-            return new OSUData[size];
-        }
-    };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeString(mName);
-        dest.writeString(mServiceDescription);
-        dest.writeByteArray(mIconData);
-        dest.writeInt(mId);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/app/OSUService.java b/packages/Osu/src/com/android/hotspot2/app/OSUService.java
deleted file mode 100644
index e9da113..0000000
--- a/packages/Osu/src/com/android/hotspot2/app/OSUService.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.android.hotspot2.app;
-
-import android.app.IntentService;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.Bundle;
-import android.os.IBinder;
-import android.util.Log;
-
-import com.android.anqp.OSUProvider;
-import com.android.hotspot2.PasspointMatch;
-import com.android.hotspot2.osu.OSUManager;
-
-import java.io.IOException;
-import java.util.List;
-
-/**
- * This is the Hotspot 2.0 release 2 OSU background service that is continuously running and caches
- * OSU information.
- *
- * The OSU App is made up of two services; FlowService and OSUService.
- *
- * OSUService is a long running light weight service, kept alive throughout the lifetime of the
- * operating system by being bound from the framework (in WifiManager in stage
- * PHASE_THIRD_PARTY_APPS_CAN_START), and is responsible for continuously caching OSU information
- * and notifying the UI when OSUs are available.
- *
- * FlowService is only started on demand from OSUService and is responsible for handling actual
- * provisioning and remediation flows, and requires a fairly significant memory footprint.
- *
- * FlowService is defined to run in its own process through the definition
- *      <service android:name=".flow.FlowService" android:process=":osuflow">
- * in the AndroidManifest.
- * This is done as a means to keep total app memory footprint low (pss < 10M) and only start the
- * FlowService on demand and make it available for "garbage collection" by the OS when not in use.
- */
-public class OSUService extends IntentService {
-    public static final String REMEDIATION_DONE_ACTION = "com.android.hotspot2.REMEDIATION_DONE";
-    public static final String REMEDIATION_FQDN_EXTRA = "com.android.hotspot2.REMEDIATION_FQDN";
-    public static final String REMEDIATION_POLICY_EXTRA = "com.android.hotspot2.REMEDIATION_POLICY";
-
-    private static final String[] INTENTS = {
-            WifiManager.SCAN_RESULTS_AVAILABLE_ACTION,
-            // TODO(b/32883320): use updated intent definitions.
-            //WifiManager.PASSPOINT_WNM_FRAME_RECEIVED_ACTION,
-            //WifiManager.PASSPOINT_ICON_RECEIVED_ACTION,
-            WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION,
-            WifiManager.WIFI_STATE_CHANGED_ACTION,
-            WifiManager.NETWORK_STATE_CHANGED_ACTION,
-            REMEDIATION_DONE_ACTION
-    };
-
-    private OSUManager mOsuManager;
-    private final LocalServiceBinder mLocalServiceBinder;
-
-    public OSUService() {
-        super("OSUService");
-        mLocalServiceBinder = new LocalServiceBinder(this);
-    }
-
-    /*
-    public final class OSUAccessorImpl extends IOSUAccessor.Stub {
-        public List<OSUData> getOsuData() {
-            List<OSUInfo> infos = getOsuInfos();
-            List<OSUData> data = new ArrayList<>(infos.size());
-            for (OSUInfo osuInfo : infos) {
-                data.add(new OSUData(osuInfo));
-            }
-            return data;
-        }
-
-        public void selectOsu(int id) {
-            OSUService.this.selectOsu(id);
-        }
-    }
-    */
-
-    @Override
-    public int onStartCommand(Intent intent, int flags, int startId) {
-        onHandleIntent(intent);
-        return START_STICKY;
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        BroadcastReceiver receiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                handleIntent(intent.getAction(), intent);
-            }
-        };
-        for (String intentString : INTENTS) {
-            registerReceiver(receiver, new IntentFilter(intentString));
-        }
-        return mLocalServiceBinder;
-    }
-
-    @Override
-    protected void onHandleIntent(Intent intent) {
-        if (intent == null) {
-            Log.d(OSUManager.TAG, "Null intent!");
-            return;
-        }
-        //handleIntent(intent.getStringExtra(MainActivity.ACTION_KEY), intent);
-    }
-
-    private void handleIntent(String action, Intent intent) {
-        WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
-        Bundle bundle = intent.getExtras();
-        if (mOsuManager == null) {
-            mOsuManager = new OSUManager(this);
-        }
-        Log.d(OSUManager.TAG, "Got intent " + intent.getAction());
-
-        switch (action) {
-            case WifiManager.SCAN_RESULTS_AVAILABLE_ACTION:
-                mOsuManager.pushScanResults(wifiManager.getScanResults());
-                break;
-            // TODO(b/32883320): use updated intent definitions.
-            /*
-            case WifiManager.PASSPOINT_WNM_FRAME_RECEIVED_ACTION:
-                long bssid = bundle.getLong(WifiManager.EXTRA_PASSPOINT_WNM_BSSID);
-                String url = bundle.getString(WifiManager.EXTRA_PASSPOINT_WNM_URL);
-
-                try {
-                    if (bundle.containsKey(WifiManager.EXTRA_PASSPOINT_WNM_METHOD)) {
-                        int method = bundle.getInt(WifiManager.EXTRA_PASSPOINT_WNM_METHOD);
-                        if (method != OSUProvider.OSUMethod.SoapXml.ordinal()) {
-                            Log.w(OSUManager.TAG, "Unsupported remediation method: " + method);
-                            return;
-                        }
-                        PasspointMatch match = null;
-                        if (bundle.containsKey(WifiManager.EXTRA_PASSPOINT_WNM_PPOINT_MATCH)) {
-                            int ordinal =
-                                    bundle.getInt(WifiManager.EXTRA_PASSPOINT_WNM_PPOINT_MATCH);
-                            if (ordinal >= 0 && ordinal < PasspointMatch.values().length) {
-                                match = PasspointMatch.values()[ordinal];
-                            }
-                        }
-                        mOsuManager.wnmRemediate(bssid, url, match);
-                    } else if (bundle.containsKey(WifiManager.EXTRA_PASSPOINT_WNM_ESS)) {
-                        boolean ess = bundle.getBoolean(WifiManager.EXTRA_PASSPOINT_WNM_ESS);
-                        int delay = bundle.getInt(WifiManager.EXTRA_PASSPOINT_WNM_DELAY);
-                        mOsuManager.deauth(bssid, ess, delay, url);
-                    } else {
-                        Log.w(OSUManager.TAG, "Unknown WNM event");
-                    }
-                } catch (IOException e) {
-                    Log.w(OSUManager.TAG, "Remediation event failed to parse: " + e);
-                }
-                break;
-            case WifiManager.PASSPOINT_ICON_RECEIVED_ACTION:
-                mOsuManager.notifyIconReceived(
-                        bundle.getLong(WifiManager.EXTRA_PASSPOINT_ICON_BSSID),
-                        bundle.getString(WifiManager.EXTRA_PASSPOINT_ICON_FILE),
-                        bundle.getByteArray(WifiManager.EXTRA_PASSPOINT_ICON_DATA));
-                break;
-            */
-            case WifiManager.NETWORK_STATE_CHANGED_ACTION:
-                mOsuManager.networkConnectChange(
-                        (WifiInfo) intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO));
-                break;
-            case WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION:
-                boolean multiNetwork =
-                        bundle.getBoolean(WifiManager.EXTRA_MULTIPLE_NETWORKS_CHANGED, false);
-                if (multiNetwork) {
-                    mOsuManager.networkConfigChanged();
-                } else if (bundle.getInt(WifiManager.EXTRA_CHANGE_REASON,
-                        WifiManager.CHANGE_REASON_CONFIG_CHANGE)
-                        == WifiManager.CHANGE_REASON_REMOVED) {
-                    WifiConfiguration configuration =
-                            intent.getParcelableExtra(WifiManager.EXTRA_WIFI_CONFIGURATION);
-                    mOsuManager.networkDeleted(configuration);
-                } else {
-                    mOsuManager.networkConfigChanged();
-                }
-                break;
-            case WifiManager.WIFI_STATE_CHANGED_ACTION:
-                int state = bundle.getInt(WifiManager.EXTRA_WIFI_STATE);
-                if (state == WifiManager.WIFI_STATE_DISABLED) {
-                    mOsuManager.wifiStateChange(false);
-                } else if (state == WifiManager.WIFI_STATE_ENABLED) {
-                    mOsuManager.wifiStateChange(true);
-                }
-                break;
-            case REMEDIATION_DONE_ACTION:
-                String fqdn = bundle.getString(REMEDIATION_FQDN_EXTRA);
-                boolean policy = bundle.getBoolean(REMEDIATION_POLICY_EXTRA);
-                mOsuManager.remediationDone(fqdn, policy);
-                break;
-            }
-    }
-
-    public List<OSUData> getOsuData() {
-        return mOsuManager.getAvailableOSUs();
-    }
-
-    public void selectOsu(int id) {
-        mOsuManager.setOSUSelection(id);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Boolean.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Boolean.java
deleted file mode 100644
index 18af3b8..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Boolean.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-
-public class Asn1Boolean extends Asn1Object {
-    private final boolean mBoolean;
-
-    public Asn1Boolean(int tag, Asn1Class asn1Class, int length, ByteBuffer data)
-            throws DecodeException {
-        super(tag, asn1Class, false, length);
-        if (length != 1) {
-            throw new DecodeException("Boolean length != 1: " + length, data.position());
-        }
-        mBoolean = data.get() != 0;
-    }
-
-    public boolean getValue() {
-        return mBoolean;
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() + "=" + Boolean.toString(mBoolean);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Class.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Class.java
deleted file mode 100644
index 8a4d8a8..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Class.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.hotspot2.asn1;
-
-public enum Asn1Class {
-    Universal, Application, Context, Private
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Constructed.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Constructed.java
deleted file mode 100644
index 69b65dc..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Constructed.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.*;
-
-public class Asn1Constructed extends Asn1Object {
-    private final int mTagPosition;
-    private final List<Asn1Object> mChildren;
-
-    public Asn1Constructed(int tag, Asn1Class asn1Class, int length,
-                           ByteBuffer payload, int tagPosition) {
-        super(tag, asn1Class, true, length, payload);
-        mTagPosition = tagPosition;
-        mChildren = new ArrayList<>();
-    }
-
-    public void addChild(Asn1Object object) {
-        mChildren.add(object);
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        return Collections.unmodifiableCollection(mChildren);
-    }
-
-    public ByteBuffer getEncoding() {
-        return getPayload(mTagPosition);
-    }
-
-    private void toString(int level, StringBuilder sb) {
-        sb.append(indent(level)).append(super.toString()).append(":\n");
-        for (Asn1Object child : mChildren) {
-            if (child.isConstructed()) {
-                ((Asn1Constructed) child).toString(level + 1, sb);
-            } else {
-                sb.append(indent(level + 1)).append(child.toString()).append('\n');
-            }
-        }
-    }
-
-    public static String indent(int level) {
-        char[] indent = new char[level * 2];
-        Arrays.fill(indent, ' ');
-        return new String(indent);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        toString(0, sb);
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Decoder.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Decoder.java
deleted file mode 100644
index 53452e7..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Decoder.java
+++ /dev/null
@@ -1,211 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-public class Asn1Decoder {
-    public static final int TAG_UNIVZERO = 0x00;
-    public static final int TAG_BOOLEAN = 0x01;
-    public static final int TAG_INTEGER = 0x02;
-    public static final int TAG_BITSTRING = 0x03;
-    public static final int TAG_OCTET_STRING = 0x04;
-    public static final int TAG_NULL = 0x05;
-    public static final int TAG_OID = 0x06;
-    public static final int TAG_ObjectDescriptor = 0x07;
-    public static final int TAG_EXTERNAL = 0x08;
-    public static final int TAG_REAL = 0x09;
-    public static final int TAG_ENUMERATED = 0x0a;
-    public static final int TAG_UTF8String = 0x0c;      // * (*) are X.509 DirectoryString's
-    public static final int TAG_RelativeOID = 0x0d;
-    public static final int TAG_SEQ = 0x10;             //   30 if constructed
-    public static final int TAG_SET = 0x11;
-    public static final int TAG_NumericString = 0x12;   //   [UNIVERSAL 18]
-    public static final int TAG_PrintableString = 0x13; // * [UNIVERSAL 19]
-    public static final int TAG_T61String = 0x14;       // * TeletexString [UNIVERSAL 20]
-    public static final int TAG_VideotexString = 0x15;  //   [UNIVERSAL 21]
-    public static final int TAG_IA5String = 0x16;       //   [UNIVERSAL 22]
-    public static final int TAG_UTCTime = 0x17;
-    public static final int TAG_GeneralizedTime = 0x18;
-    public static final int TAG_GraphicString = 0x19;   //   [UNIVERSAL 25]
-    public static final int TAG_VisibleString = 0x1a;   //   ISO64String [UNIVERSAL 26]
-    public static final int TAG_GeneralString = 0x1b;   //   [UNIVERSAL 27]
-    public static final int TAG_UniversalString = 0x1c; // * [UNIVERSAL 28]
-    public static final int TAG_BMPString = 0x1e;       // * [UNIVERSAL 30]
-
-    public static final int IntOverflow = 0xffff0000;
-    public static final int MoreBit = 0x80;
-    public static final int MoreData = 0x7f;
-    public static final int ConstructedBit = 0x20;
-    public static final int ClassShift = 6;
-    public static final int ClassMask = 0x3;
-    public static final int MoreWidth = 7;
-    public static final int ByteWidth = 8;
-    public static final int ByteMask = 0xff;
-    public static final int ContinuationTag = 31;
-
-    public static final int IndefiniteLength = -1;
-
-    private static final Map<Integer, Asn1Tag> sTagMap = new HashMap<>();
-
-    static {
-        sTagMap.put(TAG_UNIVZERO, Asn1Tag.UNIVZERO);
-        sTagMap.put(TAG_BOOLEAN, Asn1Tag.BOOLEAN);
-        sTagMap.put(TAG_INTEGER, Asn1Tag.INTEGER);
-        sTagMap.put(TAG_BITSTRING, Asn1Tag.BITSTRING);
-        sTagMap.put(TAG_OCTET_STRING, Asn1Tag.OCTET_STRING);
-        sTagMap.put(TAG_NULL, Asn1Tag.NULL);
-        sTagMap.put(TAG_OID, Asn1Tag.OID);
-        sTagMap.put(TAG_ObjectDescriptor, Asn1Tag.ObjectDescriptor);
-        sTagMap.put(TAG_EXTERNAL, Asn1Tag.EXTERNAL);
-        sTagMap.put(TAG_REAL, Asn1Tag.REAL);
-        sTagMap.put(TAG_ENUMERATED, Asn1Tag.ENUMERATED);
-        sTagMap.put(TAG_UTF8String, Asn1Tag.UTF8String);
-        sTagMap.put(TAG_RelativeOID, Asn1Tag.RelativeOID);
-        sTagMap.put(TAG_SEQ, Asn1Tag.SEQUENCE);
-        sTagMap.put(TAG_SET, Asn1Tag.SET);
-        sTagMap.put(TAG_NumericString, Asn1Tag.NumericString);
-        sTagMap.put(TAG_PrintableString, Asn1Tag.PrintableString);
-        sTagMap.put(TAG_T61String, Asn1Tag.T61String);
-        sTagMap.put(TAG_VideotexString, Asn1Tag.VideotexString);
-        sTagMap.put(TAG_IA5String, Asn1Tag.IA5String);
-        sTagMap.put(TAG_UTCTime, Asn1Tag.UTCTime);
-        sTagMap.put(TAG_GeneralizedTime, Asn1Tag.GeneralizedTime);
-        sTagMap.put(TAG_GraphicString, Asn1Tag.GraphicString);
-        sTagMap.put(TAG_VisibleString, Asn1Tag.VisibleString);
-        sTagMap.put(TAG_GeneralString, Asn1Tag.GeneralString);
-        sTagMap.put(TAG_UniversalString, Asn1Tag.UniversalString);
-        sTagMap.put(TAG_BMPString, Asn1Tag.BMPString);
-    }
-
-    public static Asn1Tag mapTag(int tag) {
-        return sTagMap.get(tag);
-    }
-
-    public static Collection<Asn1Object> decode(ByteBuffer data) throws DecodeException {
-        Asn1Constructed root =
-                new Asn1Constructed(0, null, data.remaining(), data, data.position());
-        decode(0, root);
-        return root.getChildren();
-    }
-
-    private static void decode(int level, Asn1Constructed parent) throws DecodeException {
-        ByteBuffer data = parent.getPayload();
-        while (data.hasRemaining()) {
-            int tagPosition = data.position();
-            int propMask = data.get(tagPosition) & ByteMask;
-            if (propMask == 0 && parent.isIndefiniteLength() && data.get(tagPosition + 1) == 0) {
-                parent.setEndOfData(tagPosition);
-                return;
-            }
-            Asn1Class asn1Class = Asn1Class.values()[(propMask >> ClassShift) & ClassMask];
-            boolean constructed = (propMask & ConstructedBit) != 0;
-
-            int tag = decodeTag(data);
-            int length = decodeLength(data);
-
-            if (constructed) {
-                ByteBuffer payload = peelOff(data, length);
-                Asn1Constructed root =
-                        new Asn1Constructed(tag, asn1Class, length, payload, tagPosition);
-                decode(level + 1, root);
-                if (length == IndefiniteLength) {
-                    data.position(root.getEndOfData() + 2);     // advance past '00'
-                }
-                parent.addChild(root);
-            } else {
-                if (asn1Class != Asn1Class.Universal) {
-                    parent.addChild(new Asn1Octets(tag, asn1Class, length, data));
-                } else {
-                    parent.addChild(buildScalar(tag, asn1Class, length, data));
-                }
-            }
-        }
-    }
-
-    private static ByteBuffer peelOff(ByteBuffer base, int length) {
-        ByteBuffer copy = base.duplicate();
-        if (length == IndefiniteLength) {
-            return copy;
-        }
-        copy.limit(copy.position() + length);
-        base.position(base.position() + length);
-        return copy;
-    }
-
-    private static Asn1Object buildScalar(int tag, Asn1Class asn1Class, int length, ByteBuffer data)
-            throws DecodeException {
-        switch (tag) {
-            case TAG_BOOLEAN:
-                return new Asn1Boolean(tag, asn1Class, length, data);
-            case TAG_INTEGER:
-            case TAG_ENUMERATED:
-                return new Asn1Integer(tag, asn1Class, length, data);
-            case TAG_BITSTRING:
-                int bitResidual = data.get() & ByteMask;
-                return new Asn1Octets(tag, asn1Class, length, data, bitResidual);
-            case TAG_OCTET_STRING:
-                return new Asn1Octets(tag, asn1Class, length, data);
-            case TAG_OID:
-                return new Asn1Oid(tag, asn1Class, length, data);
-            case TAG_UTF8String:
-            case TAG_NumericString:
-            case TAG_PrintableString:
-            case TAG_T61String:
-            case TAG_VideotexString:
-            case TAG_IA5String:
-            case TAG_GraphicString:
-            case TAG_VisibleString:
-            case TAG_GeneralString:
-            case TAG_UniversalString:
-            case TAG_BMPString:
-                return new Asn1String(tag, asn1Class, length, data);
-            case TAG_GeneralizedTime:
-            case TAG_UTCTime:
-                // Should really be a dedicated time object
-                return new Asn1String(tag, asn1Class, length, data);
-            default:
-                return new Asn1Octets(tag, asn1Class, length, data);
-        }
-    }
-
-    private static int decodeTag(ByteBuffer data) throws DecodeException {
-        int tag;
-        byte tag0 = data.get();
-
-        if ((tag = (tag0 & ContinuationTag)) == ContinuationTag) {
-            int tagByte;
-            tag = 0;
-            while (((tagByte = data.get() & ByteMask) & MoreBit) != 0) {
-                tag = (tag << MoreWidth) | (tagByte & MoreData);
-                if ((tag & IntOverflow) != 0)
-                    throw new DecodeException("Tag overflow", data.position());
-            }
-            tag = (tag << MoreWidth) | tagByte;
-        }
-        return tag;
-    }
-
-    private static int decodeLength(ByteBuffer data) throws DecodeException {
-        int length;
-        int lenlen = data.get() & ByteMask;
-
-        if ((lenlen & MoreBit) == 0)    // One byte encoding
-            length = lenlen;
-        else {
-            lenlen &= MoreData;
-            if (lenlen == 0) {
-                return IndefiniteLength;
-            }
-            length = 0;
-            while (lenlen-- > 0) {
-                length = (length << ByteWidth) | (data.get() & ByteMask);
-                if ((length & IntOverflow) != 0 && lenlen > 0)
-                    throw new DecodeException("Length overflow", data.position());
-            }
-        }
-        return length;
-    }
-
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1ID.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1ID.java
deleted file mode 100644
index 452d85c..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1ID.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.android.hotspot2.asn1;
-
-public class Asn1ID {
-    private final int mTag;
-    private final Asn1Class mClass;
-
-    public Asn1ID(int tag, Asn1Class asn1Class) {
-        mTag = tag;
-        mClass = asn1Class;
-    }
-
-    public int getTag() {
-        return mTag;
-    }
-
-    public Asn1Class getAsn1Class() {
-        return mClass;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Integer.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Integer.java
deleted file mode 100644
index 5180a4d..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Integer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-
-public class Asn1Integer extends Asn1Object {
-    private static final int SignBit = 0x80;
-
-    private final long mValue;
-    private final BigInteger mBigValue;
-
-    public Asn1Integer(int tag, Asn1Class asn1Class, int length, ByteBuffer data) {
-        super(tag, asn1Class, false, length);
-
-        if (length <= 8) {
-            long value = (data.get(data.position()) & SignBit) != 0 ? -1 : 0;
-            for (int n = 0; n < length; n++) {
-                value = (value << Byte.SIZE) | data.get();
-            }
-            mValue = value;
-            mBigValue = null;
-        } else {
-            byte[] payload = new byte[length];
-            data.get(payload);
-            mValue = 0;
-            mBigValue = new BigInteger(payload);
-        }
-    }
-
-    public boolean isBigValue() {
-        return mBigValue != null;
-    }
-
-    public long getValue() {
-        return mValue;
-    }
-
-    public BigInteger getBigValue() {
-        return mBigValue;
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String toString() {
-        if (isBigValue()) {
-            return super.toString() + '=' + mBigValue.toString(16);
-        } else {
-            return super.toString() + '=' + mValue;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Object.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Object.java
deleted file mode 100644
index 8137583..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Object.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-
-public abstract class Asn1Object {
-    private final int mTag;
-    private final Asn1Class mClass;
-    private final boolean mConstructed;
-    private final int mLength;
-    private final ByteBuffer mPayload;
-
-    protected Asn1Object(int tag, Asn1Class asn1Class, boolean constructed, int length) {
-        this(tag, asn1Class, constructed, length, null);
-    }
-
-    protected Asn1Object(int tag, Asn1Class asn1Class, boolean constructed,
-                         int length, ByteBuffer payload) {
-        mTag = tag;
-        mClass = asn1Class;
-        mConstructed = constructed;
-        mLength = length;
-        mPayload = payload != null ? payload.duplicate() : null;
-    }
-
-    public int getTag() {
-        return mTag;
-    }
-
-    public Asn1Class getAsn1Class() {
-        return mClass;
-    }
-
-    public boolean isConstructed() {
-        return mConstructed;
-    }
-
-    public boolean isIndefiniteLength() {
-        return mLength == Asn1Decoder.IndefiniteLength;
-    }
-
-    public int getLength() {
-        return mLength;
-    }
-
-    public ByteBuffer getPayload() {
-        return mPayload != null ? mPayload.duplicate() : null;
-    }
-
-    protected ByteBuffer getPayload(int position) {
-        if (mPayload == null) {
-            return null;
-        }
-        ByteBuffer encoding = mPayload.duplicate();
-        encoding.position(position);
-        return encoding;
-    }
-
-    protected void setEndOfData(int position) {
-        mPayload.limit(position);
-    }
-
-    protected int getEndOfData() {
-        return mPayload.limit();
-    }
-
-    public boolean matches(Asn1ID id) {
-        return mTag == id.getTag() && mClass == id.getAsn1Class();
-    }
-
-    public String toSimpleString() {
-        Asn1Tag tag = mClass == Asn1Class.Universal ? Asn1Decoder.mapTag(mTag) : null;
-        if (tag != null) {
-            return tag.name();
-        } else if (mClass == Asn1Class.Universal) {
-            return String.format("[%d]", mTag);
-        } else {
-            return String.format("[%s %d]", mClass, mTag);
-        }
-    }
-
-    public abstract Collection<Asn1Object> getChildren();
-
-    @Override
-    public String toString() {
-        return toSimpleString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Octets.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Octets.java
deleted file mode 100644
index 1e19953..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Octets.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-
-public class Asn1Octets extends Asn1Object {
-    private final byte[] mOctets;
-    private final int mBitResidual;
-
-    public Asn1Octets(int tag, Asn1Class asn1Class, int length, ByteBuffer data) {
-        super(tag, asn1Class, false, length);
-        mOctets = new byte[length];
-        data.get(mOctets);
-        mBitResidual = -1;
-    }
-
-    public Asn1Octets(int tag, Asn1Class asn1Class, int length, ByteBuffer data, int bitResidual) {
-        super(tag, asn1Class, false, length);
-        mOctets = new byte[length - 1];
-        data.get(mOctets);
-        mBitResidual = bitResidual;
-    }
-
-    public byte[] getOctets() {
-        return mOctets;
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        for (byte b : mOctets) {
-            sb.append(String.format(" %02x", b & Asn1Decoder.ByteMask));
-        }
-        if (mBitResidual >= 0) {
-            return super.toString() + '=' + sb + '/' + mBitResidual;
-        } else if (getTag() == Asn1Decoder.TAG_NULL && getLength() == 0) {
-            return super.toString();
-        } else {
-            return super.toString() + '=' + sb;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Oid.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Oid.java
deleted file mode 100644
index 50f0553..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Oid.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class Asn1Oid extends Asn1Object {
-    public static final int OidMaxOctet1 = 2;
-    public static final int OidOctet1Modulus = 40;
-
-    private final List<Long> mArcs;
-    private final int mHashcode;
-
-    private static final Map<Asn1Oid, String> sOidMap = new HashMap<>();
-
-    public Asn1Oid(int tag, Asn1Class asn1Class, int length, ByteBuffer data)
-            throws DecodeException {
-        super(tag, asn1Class, false, length);
-
-        if (length == 0)
-            throw new DecodeException("oid-encoding length is zero", data.position());
-
-        mArcs = new ArrayList<>();
-
-        ByteBuffer payload = data.duplicate();
-        payload.limit(payload.position() + length);
-        data.position(data.position() + length);
-
-        byte current = payload.get();
-        long seg01 = current & Asn1Decoder.ByteMask;
-        long segValue = seg01 / OidOctet1Modulus;
-        int hashcode = (int) segValue;
-        mArcs.add(segValue);
-        segValue = seg01 - segValue * OidOctet1Modulus;
-        hashcode = hashcode * 31 + (int) segValue;
-        mArcs.add(segValue);
-
-        current = 0;
-        segValue = 0L;
-
-        while (payload.hasRemaining()) {
-            current = payload.get();
-            segValue |= current & Asn1Decoder.MoreData;
-            if ((current & Asn1Decoder.MoreBit) == 0) {
-                hashcode = hashcode * 31 + (int) segValue;
-                mArcs.add(segValue);
-                segValue = 0L;
-            } else
-                segValue <<= Asn1Decoder.MoreWidth;
-        }
-        if ((current & Asn1Decoder.MoreBit) != 0)
-            throw new DecodeException("Illegal (end of) oid-encoding", payload.position());
-        mHashcode = hashcode;
-    }
-
-    public Asn1Oid(Long... arcs) {
-        super(Asn1Decoder.TAG_OID, Asn1Class.Universal, false, -1);
-        mArcs = Arrays.asList(arcs);
-        int hashcode = 0;
-        for (long arc : arcs) {
-            hashcode = hashcode * 31 + (int) arc;
-        }
-        mHashcode = hashcode;
-    }
-
-    @Override
-    public int hashCode() {
-        return mHashcode;
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        return !(thatObject == null || thatObject.getClass() != Asn1Oid.class) &&
-                mArcs.equals(((Asn1Oid) thatObject).mArcs);
-    }
-
-    public String toOIDString() {
-        StringBuilder sb = new StringBuilder();
-        boolean first = true;
-        for (long arc : mArcs) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append('.');
-            }
-            sb.append(arc);
-        }
-        return sb.toString();
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(toOIDString());
-        String name = sOidMap.get(this);
-        if (name != null) {
-            sb.append(" (").append(name).append(')');
-        }
-        return super.toString() + '=' + sb.toString();
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    public static final Asn1Oid PKCS7Data = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 7L, 1L);
-    public static final Asn1Oid PKCS7SignedData = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 7L, 2L);
-    // encoded as an IA5STRING type
-    public static final Asn1Oid OidMacAddress = new Asn1Oid(1L, 3L, 6L, 1L, 1L, 1L, 1L, 22L);
-    // encoded as an IA5STRING type
-    public static final Asn1Oid OidImei = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 3L);
-    // encoded as a BITSTRING type
-    public static final Asn1Oid OidMeid = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 4L);
-    // encoded as a PRINTABLESTRING type
-    public static final Asn1Oid OidDevId = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 5L);
-
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 1L), "algo_id_dsa");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 3L), "algo_id_dsawithsha1");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10045L, 2L, 1L), "algo_id_ecPublicKey");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 3L), "eccdaWithSHA384");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 1L), "algo_id_rsaEncryption");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 2L), "algo_id_md2WithRSAEncryption");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 4L), "algo_id_md5WithRSAEncryption");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 5L), "algo_id_sha1WithRSAEncryption");
-    //sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 11L),
-    // "algo_id_sha256WithRSAEncryption");
-
-    static {
-        sOidMap.put(new Asn1Oid(0L, 0L), "NullOid");
-        sOidMap.put(new Asn1Oid(0L, 9L, 2342L, 19200300L, 100L, 1L, 25L), "domComp");
-
-        sOidMap.put(OidMacAddress, "mac-address");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 1L), "algo_id_dsa");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 3L), "algo_id_dsawithsha1");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10045L, 2L, 1L), "algo_id_ecPublicKey");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 3L), "eccdaWithSHA384");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 10046L, 2L, 1L), "algo_id_dhpublicnumber");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 1L), "algo_id_rsaEncryption");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 2L), "algo_id_md2WithRSAEncryption");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 4L), "algo_id_md5WithRSAEncryption");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 5L),
-                "algo_id_sha1WithRSAEncryption");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 11L),
-                "algo_id_sha256WithRSAEncryption");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 7L), "pkcs7");
-        sOidMap.put(PKCS7Data, "pkcs7-data");
-        sOidMap.put(PKCS7SignedData, "pkcs7-signedData");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 9L, 1L), "emailAddress");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 9L, 7L), "challengePassword");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 9L, 14L), "extensionRequest");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 3L, 2L), "algo_id_RC2_CBC");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 3L, 4L), "algo_id_RC4_ENC");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 3L, 7L), "algo_id_DES_EDE3_CBC");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 3L, 9L), "algo_id_RC5_CBC_PAD");
-        sOidMap.put(new Asn1Oid(1L, 2L, 840L, 113549L, 3L, 10L), "algo_id_desCDMF");
-        sOidMap.put(new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 2L), "id-kp-HS2.0Auth");
-        sOidMap.put(OidImei, "imei");
-        sOidMap.put(OidMeid, "meid");
-        sOidMap.put(OidDevId, "DevId");
-        sOidMap.put(new Asn1Oid(1L, 3L, 6L, 1L, 5L, 5L, 7L, 1L, 1L),
-                "certAuthorityInfoAccessSyntax");
-        sOidMap.put(new Asn1Oid(1L, 3L, 6L, 1L, 5L, 5L, 7L, 1L, 11L),
-                "certSubjectInfoAccessSyntax");
-        sOidMap.put(new Asn1Oid(1L, 3L, 14L, 3L, 2L, 26L), "algo_id_SHA1");
-        sOidMap.put(new Asn1Oid(1L, 3L, 132L, 0L, 34L), "secp384r1");
-
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 3L), "x500_CN");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 4L), "x500_SN");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 5L), "x500_serialNum");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 6L), "x500_C");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 7L), "x500_L");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 8L), "x500_ST");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 9L), "x500_STREET");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 10L), "x500_O");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 11L), "x500_OU");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 12L), "x500_title");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 13L), "x500_description");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 17L), "x500_postalCode");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 18L), "x500_poBox");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 20L), "x500_phone");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 41L), "x500_name");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 42L), "x500_givenName");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 44L), "x500_genQual");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 43L), "x500_initials");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 46L), "x500_dnQualifier");
-        sOidMap.put(new Asn1Oid(2L, 5L, 4L, 65L), "x500_pseudonym");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 9L), "certSubjectDirectoryAttributes");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 14L), "certSubjectKeyIdentifier ");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 15L), "certKeyUsage");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 16L), "certPrivateKeyUsagePeriod");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 17L), "certSubjectAltName");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 18L), "certIssuerAltName");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 19L), "certBasicConstraints");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 30L), "certNameConstraints");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 31L), "certCRLDistributionPoints");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 32L), "certificatePolicies");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 33L), "certPolicyMappings");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 35L), "certAuthorityKeyIdentifier ");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 36L), "certPolicyConstraints");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 37L), "certExtKeyUsageSyntax");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 46L), "certFreshestCRL");
-        sOidMap.put(new Asn1Oid(2L, 5L, 29L, 54L), "certInhibitAnyPolicy");
-        sOidMap.put(new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 1L, 2L), "algo_id_aes128");
-        sOidMap.put(new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 1L, 22L), "algo_id_aes192");
-        sOidMap.put(new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 1L, 42L), "algo_id_aes256");
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1String.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1String.java
deleted file mode 100644
index 37ed2b2..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1String.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.util.Collection;
-
-public class Asn1String extends Asn1Object {
-    private final String mString;
-
-    public Asn1String(int tag, Asn1Class asn1Class, int length, ByteBuffer data) {
-        super(tag, asn1Class, false, length);
-
-        byte[] octets = new byte[length];
-        data.get(octets);
-        Charset charset = tag == Asn1Decoder.TAG_UTF8String
-                ? StandardCharsets.UTF_8 : StandardCharsets.ISO_8859_1;
-        mString = new String(octets, charset);
-    }
-
-    public String getString() {
-        return mString;
-    }
-
-    @Override
-    public Collection<Asn1Object> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() + "='" + mString + '\'';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Tag.java b/packages/Osu/src/com/android/hotspot2/asn1/Asn1Tag.java
deleted file mode 100644
index 8129481..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/Asn1Tag.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.android.hotspot2.asn1;
-
-public enum Asn1Tag {
-    UNIVZERO,
-    BOOLEAN,
-    INTEGER,
-    BITSTRING,
-    OCTET_STRING,
-    NULL,
-    OID,
-    ObjectDescriptor,
-    EXTERNAL,
-    REAL,
-    ENUMERATED,
-    UTF8String,
-    RelativeOID,
-    SEQUENCE,
-    SET,
-    NumericString,
-    PrintableString,
-    T61String,
-    VideotexString,
-    IA5String,
-    UTCTime,
-    GeneralizedTime,
-    GraphicString,
-    VisibleString,
-    GeneralString,
-    UniversalString,
-    BMPString
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/DecodeException.java b/packages/Osu/src/com/android/hotspot2/asn1/DecodeException.java
deleted file mode 100644
index 1f10ee4..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/DecodeException.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.io.IOException;
-
-public class DecodeException extends IOException {
-    private final int mOffset;
-
-    public DecodeException(String message, int offset) {
-        super(message);
-        mOffset = offset;
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() + " at " + mOffset;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/asn1/OidMappings.java b/packages/Osu/src/com/android/hotspot2/asn1/OidMappings.java
deleted file mode 100644
index 01a6fd6..0000000
--- a/packages/Osu/src/com/android/hotspot2/asn1/OidMappings.java
+++ /dev/null
@@ -1,197 +0,0 @@
-package com.android.hotspot2.asn1;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-public class OidMappings {
-    public static class SigEntry {
-        private final String mSigAlgo;
-        private final Asn1Oid mKeyAlgo;
-
-        private SigEntry(String sigAlgo, Asn1Oid keyAlgo) {
-            mSigAlgo = sigAlgo;
-            mKeyAlgo = keyAlgo;
-        }
-
-        public String getSigAlgo() {
-            return mSigAlgo;
-        }
-
-        public Asn1Oid getKeyAlgo() {
-            return mKeyAlgo;
-        }
-    }
-
-    public static final String IdPeLogotype = "1.3.6.1.5.5.7.1.12";
-    public static final String IdCeSubjectAltName = "2.5.29.17";
-
-    private static final Map<Asn1Oid, String> sCryptoMapping = new HashMap<>();
-    private static final Map<Asn1Oid, String> sNameMapping = new HashMap<>();
-    private static final Set<Asn1Oid> sIDMapping = new HashSet<>();
-    private static final Map<Asn1Oid, SigEntry> sSigAlgos = new HashMap<>();
-
-    // DSA
-    private static final Asn1Oid sAlgo_DSA = new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 1L);
-    private static final Asn1Oid sAlgo_SHA1withDSA = new Asn1Oid(1L, 2L, 840L, 10040L, 4L, 3L);
-
-    // RSA
-    public static final Asn1Oid sAlgo_RSA = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 1L);
-    private static final Asn1Oid sAlgo_MD2withRSA = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 2L);
-    private static final Asn1Oid sAlgo_MD5withRSA = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 4L);
-    private static final Asn1Oid sAlgo_SHA1withRSA = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 5L);
-    private static final Asn1Oid sAlgo_SHA224withRSA =
-            new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 14L);   // n/a
-    private static final Asn1Oid sAlgo_SHA256withRSA =
-            new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 11L);
-    private static final Asn1Oid sAlgo_SHA384withRSA =
-            new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 12L);
-    private static final Asn1Oid sAlgo_SHA512withRSA =
-            new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 1L, 13L);
-
-    // ECC
-    public static final Asn1Oid sAlgo_EC = new Asn1Oid(1L, 2L, 840L, 10045L, 2L, 1L);
-    private static final Asn1Oid sAlgo_SHA1withECDSA = new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 1L);
-    private static final Asn1Oid sAlgo_SHA224withECDSA =
-            new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 1L);     // n/a
-    private static final Asn1Oid sAlgo_SHA256withECDSA =
-            new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 2L);
-    private static final Asn1Oid sAlgo_SHA384withECDSA =
-            new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 3L);
-    private static final Asn1Oid sAlgo_SHA512withECDSA =
-            new Asn1Oid(1L, 2L, 840L, 10045L, 4L, 3L, 4L);
-
-    private static final Asn1Oid sAlgo_MD2 = new Asn1Oid(1L, 2L, 840L, 113549L, 2L, 2L);
-    private static final Asn1Oid sAlgo_MD5 = new Asn1Oid(1L, 2L, 840L, 113549L, 2L, 5L);
-    private static final Asn1Oid sAlgo_SHA1 = new Asn1Oid(1L, 3L, 14L, 3L, 2L, 26L);
-    private static final Asn1Oid sAlgo_SHA256 =
-            new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 2L, 1L);
-    private static final Asn1Oid sAlgo_SHA384 =
-            new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 2L, 2L);
-    private static final Asn1Oid sAlgo_SHA512 =
-            new Asn1Oid(2L, 16L, 840L, 1L, 101L, 3L, 4L, 2L, 3L);
-
-    // HS2.0 stuff:
-    public static final Asn1Oid sPkcs9AtChallengePassword =
-            new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 9L, 7L);
-    public static final Asn1Oid sExtensionRequest = new Asn1Oid(1L, 2L, 840L, 113549L, 1L, 9L, 14L);
-
-    public static final Asn1Oid sMAC = new Asn1Oid(1L, 3L, 6L, 1L, 1L, 1L, 1L, 22L);
-    public static final Asn1Oid sIMEI = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 3L);
-    public static final Asn1Oid sMEID = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 4L);
-    public static final Asn1Oid sDevID = new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 5L);
-
-    public static final Asn1Oid sIdWfaHotspotFriendlyName =
-            new Asn1Oid(1L, 3L, 6L, 1L, 4L, 1L, 40808L, 1L, 1L, 1L);
-
-    static {
-        sCryptoMapping.put(sAlgo_DSA, "DSA");
-        sCryptoMapping.put(sAlgo_RSA, "RSA");
-        sCryptoMapping.put(sAlgo_EC, "EC");
-
-        sSigAlgos.put(sAlgo_SHA1withDSA, new SigEntry("SHA1withDSA", sAlgo_DSA));
-
-        sSigAlgos.put(sAlgo_MD2withRSA, new SigEntry("MD2withRSA", sAlgo_RSA));
-        sSigAlgos.put(sAlgo_MD5withRSA, new SigEntry("MD5withRSA", sAlgo_RSA));
-        sSigAlgos.put(sAlgo_SHA1withRSA, new SigEntry("SHA1withRSA", sAlgo_RSA));
-        sSigAlgos.put(sAlgo_SHA224withRSA, new SigEntry(null, sAlgo_RSA));
-        sSigAlgos.put(sAlgo_SHA256withRSA, new SigEntry("SHA256withRSA", sAlgo_RSA));
-        sSigAlgos.put(sAlgo_SHA384withRSA, new SigEntry("SHA384withRSA", sAlgo_RSA));
-        sSigAlgos.put(sAlgo_SHA512withRSA, new SigEntry("SHA512withRSA", sAlgo_RSA));
-
-        sSigAlgos.put(sAlgo_SHA1withECDSA, new SigEntry("SHA1withECDSA", sAlgo_EC));
-        sSigAlgos.put(sAlgo_SHA224withECDSA, new SigEntry(null, sAlgo_EC));
-        sSigAlgos.put(sAlgo_SHA256withECDSA, new SigEntry("SHA256withECDSA", sAlgo_EC));
-        sSigAlgos.put(sAlgo_SHA384withECDSA, new SigEntry("SHA384withECDSA", sAlgo_EC));
-        sSigAlgos.put(sAlgo_SHA512withECDSA, new SigEntry("SHA512withECDSA", sAlgo_EC));
-
-        sIDMapping.add(sMAC);
-        sIDMapping.add(sIMEI);
-        sIDMapping.add(sMEID);
-        sIDMapping.add(sDevID);
-
-        for (Map.Entry<Asn1Oid, String> entry : sCryptoMapping.entrySet()) {
-            sNameMapping.put(entry.getKey(), entry.getValue());
-        }
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 1L), "sect163k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 2L), "sect163r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 3L), "sect239k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 4L), "sect113r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 5L), "sect113r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 6L), "secp112r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 7L), "secp112r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 8L), "secp160r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 9L), "secp160k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 10L), "secp256k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 15L), "sect163r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 16L), "sect283k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 17L), "sect283r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 22L), "sect131r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 23L), "sect131r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 24L), "sect193r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 25L), "sect193r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 26L), "sect233k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 27L), "sect233r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 28L), "secp128r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 29L), "secp128r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 30L), "secp160r2");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 31L), "secp192k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 32L), "secp224k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 33L), "secp224r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 34L), "secp384r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 35L), "secp521r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 36L), "sect409k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 37L), "sect409r1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 38L), "sect571k1");
-        sNameMapping.put(new Asn1Oid(1L, 3L, 132L, 0L, 39L), "sect571r1");
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 1L), "secp192r1");
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 7L), "secp256r1");
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 2L), "prime192v2");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 3L), "prime192v3");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 4L), "prime239v1");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 5L), "prime239v2");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 1L, 6L), "prime239v3");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 5L), "c2tnb191v1");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 6L), "c2tnb191v2");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 7L), "c2tnb191v3");    // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 11L), "c2tnb239v1");   // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 12L), "c2tnb239v2");   // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 13L), "c2tnb239v3");   // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 18L), "c2tnb359v1");   // X9.62
-        sNameMapping.put(new Asn1Oid(1L, 2L, 840L, 10045L, 3L, 0L, 20L), "c2tnb431r1");   // X9.62
-
-        sNameMapping.put(sAlgo_MD2, "MD2");
-        sNameMapping.put(sAlgo_MD5, "MD5");
-        sNameMapping.put(sAlgo_SHA1, "SHA-1");
-        sNameMapping.put(sAlgo_SHA256, "SHA-256");
-        sNameMapping.put(sAlgo_SHA384, "SHA-384");
-        sNameMapping.put(sAlgo_SHA512, "SHA-512");
-    }
-
-    public static SigEntry getSigEntry(Asn1Oid oid) {
-        return sSigAlgos.get(oid);
-    }
-
-    public static String getCryptoID(Asn1Oid oid) {
-        return sCryptoMapping.get(oid);
-    }
-
-    public static String getJCEName(Asn1Oid oid) {
-        return sNameMapping.get(oid);
-    }
-
-    public static String getSigAlgoName(Asn1Oid oid) {
-        SigEntry sigEntry = sSigAlgos.get(oid);
-        return sigEntry != null ? sigEntry.getSigAlgo() : null;
-    }
-
-    public static String getKeyAlgoName(Asn1Oid oid) {
-        SigEntry sigEntry = sSigAlgos.get(oid);
-        return sigEntry != null ? sNameMapping.get(sigEntry.getKeyAlgo()) : null;
-    }
-
-    public static boolean isIDAttribute(Asn1Oid oid) {
-        return sIDMapping.contains(oid);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/est/ESTHandler.java b/packages/Osu/src/com/android/hotspot2/est/ESTHandler.java
deleted file mode 100644
index cdcff80..0000000
--- a/packages/Osu/src/com/android/hotspot2/est/ESTHandler.java
+++ /dev/null
@@ -1,501 +0,0 @@
-package com.android.hotspot2.est;
-
-import android.net.Network;
-import android.util.Base64;
-import android.util.Log;
-
-import com.android.hotspot2.OMADMAdapter;
-import com.android.hotspot2.asn1.Asn1Class;
-import com.android.hotspot2.asn1.Asn1Constructed;
-import com.android.hotspot2.asn1.Asn1Decoder;
-import com.android.hotspot2.asn1.Asn1ID;
-import com.android.hotspot2.asn1.Asn1Integer;
-import com.android.hotspot2.asn1.Asn1Object;
-import com.android.hotspot2.asn1.Asn1Oid;
-import com.android.hotspot2.asn1.OidMappings;
-import com.android.hotspot2.osu.HTTPHandler;
-import com.android.hotspot2.osu.OSUFlowManager;
-import com.android.hotspot2.osu.OSUSocketFactory;
-import com.android.hotspot2.osu.commands.GetCertData;
-import com.android.hotspot2.pps.HomeSP;
-import com.android.hotspot2.utils.HTTPMessage;
-import com.android.hotspot2.utils.HTTPResponse;
-import com.android.org.bouncycastle.asn1.ASN1Encodable;
-import com.android.org.bouncycastle.asn1.ASN1EncodableVector;
-import com.android.org.bouncycastle.asn1.ASN1Set;
-import com.android.org.bouncycastle.asn1.DERBitString;
-import com.android.org.bouncycastle.asn1.DEREncodableVector;
-import com.android.org.bouncycastle.asn1.DERIA5String;
-import com.android.org.bouncycastle.asn1.DERObjectIdentifier;
-import com.android.org.bouncycastle.asn1.DERPrintableString;
-import com.android.org.bouncycastle.asn1.DERSet;
-import com.android.org.bouncycastle.asn1.x509.Attribute;
-import com.android.org.bouncycastle.jce.PKCS10CertificationRequest;
-import com.android.org.bouncycastle.jce.spec.ECNamedCurveGenParameterSpec;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.security.AlgorithmParameters;
-import java.security.GeneralSecurityException;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.KeyStore;
-import java.security.PrivateKey;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.net.ssl.KeyManager;
-import javax.security.auth.x500.X500Principal;
-
-//import com.android.org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-public class ESTHandler implements AutoCloseable {
-    private static final String TAG = "HS2EST";
-    private static final int MinRSAKeySize = 2048;
-
-    private static final String CACERT_PATH = "/cacerts";
-    private static final String CSR_PATH = "/csrattrs";
-    private static final String SIMPLE_ENROLL_PATH = "/simpleenroll";
-    private static final String SIMPLE_REENROLL_PATH = "/simplereenroll";
-
-    private final URL mURL;
-    private final String mUser;
-    private final byte[] mPassword;
-    private final OSUSocketFactory mSocketFactory;
-    private final OMADMAdapter mOMADMAdapter;
-
-    private final List<X509Certificate> mCACerts = new ArrayList<>();
-    private final List<X509Certificate> mClientCerts = new ArrayList<>();
-    private PrivateKey mClientKey;
-
-    public ESTHandler(GetCertData certData, Network network, OMADMAdapter omadmAdapter,
-                      KeyManager km, KeyStore ks, HomeSP homeSP, OSUFlowManager.FlowType flowType)
-            throws IOException, GeneralSecurityException {
-        mURL = new URL(certData.getServer());
-        mUser = certData.getUserName();
-        mPassword = certData.getPassword();
-        mSocketFactory = OSUSocketFactory.getSocketFactory(ks, homeSP, flowType,
-                network, mURL, km, true);
-        mOMADMAdapter = omadmAdapter;
-    }
-
-    @Override
-    public void close() throws IOException {
-    }
-
-    public List<X509Certificate> getCACerts() {
-        return mCACerts;
-    }
-
-    public List<X509Certificate> getClientCerts() {
-        return mClientCerts;
-    }
-
-    public PrivateKey getClientKey() {
-        return mClientKey;
-    }
-
-    private static String indent(int amount) {
-        char[] indent = new char[amount * 2];
-        Arrays.fill(indent, ' ');
-        return new String(indent);
-    }
-
-    public void execute(boolean reenroll) throws IOException, GeneralSecurityException {
-        URL caURL = new URL(mURL.getProtocol(), mURL.getHost(), mURL.getPort(),
-                mURL.getFile() + CACERT_PATH);
-
-        HTTPResponse response;
-        try (HTTPHandler httpHandler = new HTTPHandler(StandardCharsets.ISO_8859_1, mSocketFactory,
-                mUser, mPassword)) {
-            response = httpHandler.doGetHTTP(caURL);
-
-            if (!"application/pkcs7-mime".equals(response.getHeaders().
-                    get(HTTPMessage.ContentTypeHeader))) {
-                throw new IOException("Unexpected Content-Type: " +
-                        response.getHeaders().get(HTTPMessage.ContentTypeHeader));
-            }
-            ByteBuffer octetBuffer = response.getBinaryPayload();
-            Collection<Asn1Object> pkcs7Content1 = Asn1Decoder.decode(octetBuffer);
-            for (Asn1Object asn1Object : pkcs7Content1) {
-                Log.d(TAG, "---");
-                Log.d(TAG, asn1Object.toString());
-            }
-            Log.d(TAG, CACERT_PATH);
-
-            mCACerts.addAll(unpackPkcs7(octetBuffer));
-            for (X509Certificate certificate : mCACerts) {
-                Log.d(TAG, "CA-Cert: " + certificate.getSubjectX500Principal());
-            }
-
-            /*
-            byte[] octets = new byte[octetBuffer.remaining()];
-            octetBuffer.duplicate().get(octets);
-            for (byte b : octets) {
-                System.out.printf("%02x ", b & 0xff);
-            }
-            Log.d(TAG, );
-            */
-
-            /* + BC
-            try {
-                byte[] octets = new byte[octetBuffer.remaining()];
-                octetBuffer.duplicate().get(octets);
-                ASN1InputStream asnin = new ASN1InputStream(octets);
-                for (int n = 0; n < 100; n++) {
-                    ASN1Primitive object = asnin.readObject();
-                    if (object == null) {
-                        break;
-                    }
-                    parseObject(object, 0);
-                }
-            }
-            catch (Throwable t) {
-                t.printStackTrace();
-            }
-
-            Collection<Asn1Object> pkcs7Content = Asn1Decoder.decode(octetBuffer);
-            for (Asn1Object asn1Object : pkcs7Content) {
-                Log.d(TAG, asn1Object);
-            }
-
-            if (pkcs7Content.size() != 1) {
-                throw new IOException("Unexpected pkcs 7 container: " + pkcs7Content.size());
-            }
-
-            Asn1Constructed pkcs7Root = (Asn1Constructed) pkcs7Content.iterator().next();
-            Iterator<Asn1ID> certPath = Arrays.asList(Pkcs7CertPath).iterator();
-            Asn1Object certObject = pkcs7Root.findObject(certPath);
-            if (certObject == null || certPath.hasNext()) {
-                throw new IOException("Failed to find cert; returned object " + certObject +
-                        ", path " + (certPath.hasNext() ? "short" : "exhausted"));
-            }
-
-            ByteBuffer certOctets = certObject.getPayload();
-            if (certOctets == null) {
-                throw new IOException("No cert payload in: " + certObject);
-            }
-
-            byte[] certBytes = new byte[certOctets.remaining()];
-            certOctets.get(certBytes);
-
-            CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-            Certificate cert = certFactory.generateCertificate(new ByteArrayInputStream(certBytes));
-            Log.d(TAG, "EST Cert: " + cert);
-            */
-
-            URL csrURL = new URL(mURL.getProtocol(), mURL.getHost(), mURL.getPort(),
-                    mURL.getFile() + CSR_PATH);
-            response = httpHandler.doGetHTTP(csrURL);
-
-            octetBuffer = response.getBinaryPayload();
-            byte[] csrData = buildCSR(octetBuffer, mOMADMAdapter, httpHandler);
-
-        /**/
-            Collection<Asn1Object> o = Asn1Decoder.decode(ByteBuffer.wrap(csrData));
-            Log.d(TAG, "CSR:");
-            Log.d(TAG, o.iterator().next().toString());
-            Log.d(TAG, "End CSR.");
-        /**/
-
-            URL enrollURL = new URL(mURL.getProtocol(), mURL.getHost(), mURL.getPort(),
-                    mURL.getFile() + (reenroll ? SIMPLE_REENROLL_PATH : SIMPLE_ENROLL_PATH));
-            String data = Base64.encodeToString(csrData, Base64.DEFAULT);
-            octetBuffer = httpHandler.exchangeBinary(enrollURL, data, "application/pkcs10");
-
-            Collection<Asn1Object> pkcs7Content2 = Asn1Decoder.decode(octetBuffer);
-            for (Asn1Object asn1Object : pkcs7Content2) {
-                Log.d(TAG, "---");
-                Log.d(TAG, asn1Object.toString());
-            }
-            mClientCerts.addAll(unpackPkcs7(octetBuffer));
-            for (X509Certificate cert : mClientCerts) {
-                Log.d(TAG, cert.toString());
-            }
-        }
-    }
-
-    private static final Asn1ID sSEQUENCE = new Asn1ID(Asn1Decoder.TAG_SEQ, Asn1Class.Universal);
-    private static final Asn1ID sCTXT0 = new Asn1ID(0, Asn1Class.Context);
-    private static final int PKCS7DataVersion = 1;
-    private static final int PKCS7SignedDataVersion = 3;
-
-    private static List<X509Certificate> unpackPkcs7(ByteBuffer pkcs7)
-            throws IOException, GeneralSecurityException {
-        Collection<Asn1Object> pkcs7Content = Asn1Decoder.decode(pkcs7);
-
-        if (pkcs7Content.size() != 1) {
-            throw new IOException("Unexpected pkcs 7 container: " + pkcs7Content.size());
-        }
-
-        Asn1Object data = pkcs7Content.iterator().next();
-        if (!data.isConstructed() || !data.matches(sSEQUENCE)) {
-            throw new IOException("Expected SEQ OF, got " + data.toSimpleString());
-        } else if (data.getChildren().size() != 2) {
-            throw new IOException("Expected content info to have two children, got " +
-                    data.getChildren().size());
-        }
-
-        Iterator<Asn1Object> children = data.getChildren().iterator();
-        Asn1Object contentType = children.next();
-        if (!contentType.equals(Asn1Oid.PKCS7SignedData)) {
-            throw new IOException("Content not PKCS7 signed data");
-        }
-        Asn1Object content = children.next();
-        if (!content.isConstructed() || !content.matches(sCTXT0)) {
-            throw new IOException("Expected [CONTEXT 0] with one child, got " +
-                    content.toSimpleString() + ", " + content.getChildren().size());
-        }
-
-        Asn1Object signedData = content.getChildren().iterator().next();
-        Map<Integer, Asn1Object> itemMap = new HashMap<>();
-        for (Asn1Object item : signedData.getChildren()) {
-            if (itemMap.put(item.getTag(), item) != null && item.getTag() != Asn1Decoder.TAG_SET) {
-                throw new IOException("Duplicate item in SignedData: " + item.toSimpleString());
-            }
-        }
-
-        Asn1Object versionObject = itemMap.get(Asn1Decoder.TAG_INTEGER);
-        if (versionObject == null || !(versionObject instanceof Asn1Integer)) {
-            throw new IOException("Bad or missing PKCS7 version: " + versionObject);
-        }
-        int pkcs7version = (int) ((Asn1Integer) versionObject).getValue();
-        Asn1Object innerContentInfo = itemMap.get(Asn1Decoder.TAG_SEQ);
-        if (innerContentInfo == null ||
-                !innerContentInfo.isConstructed() ||
-                !innerContentInfo.matches(sSEQUENCE) ||
-                innerContentInfo.getChildren().size() != 1) {
-            throw new IOException("Bad or missing PKCS7 contentInfo");
-        }
-        Asn1Object contentID = innerContentInfo.getChildren().iterator().next();
-        if (pkcs7version == PKCS7DataVersion && !contentID.equals(Asn1Oid.PKCS7Data) ||
-                pkcs7version == PKCS7SignedDataVersion && !contentID.equals(Asn1Oid.PKCS7SignedData)) {
-            throw new IOException("Inner PKCS7 content (" + contentID +
-                    ") not expected for version " + pkcs7version);
-        }
-        Asn1Object certWrapper = itemMap.get(0);
-        if (certWrapper == null || !certWrapper.isConstructed() || !certWrapper.matches(sCTXT0)) {
-            throw new IOException("Expected [CONTEXT 0], got: " + certWrapper);
-        }
-
-        List<X509Certificate> certList = new ArrayList<>(certWrapper.getChildren().size());
-        CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-        for (Asn1Object certObject : certWrapper.getChildren()) {
-            ByteBuffer certOctets = ((Asn1Constructed) certObject).getEncoding();
-            if (certOctets == null) {
-                throw new IOException("No cert payload in: " + certObject);
-            }
-            byte[] certBytes = new byte[certOctets.remaining()];
-            certOctets.get(certBytes);
-
-            certList.add((X509Certificate) certFactory.
-                    generateCertificate(new ByteArrayInputStream(certBytes)));
-        }
-        return certList;
-    }
-
-    private byte[] buildCSR(ByteBuffer octetBuffer, OMADMAdapter omadmAdapter,
-                            HTTPHandler httpHandler) throws IOException, GeneralSecurityException {
-
-        //Security.addProvider(new BouncyCastleProvider());
-
-        Log.d(TAG, "/csrattrs:");
-        /*
-        byte[] octets = new byte[octetBuffer.remaining()];
-        octetBuffer.duplicate().get(octets);
-        for (byte b : octets) {
-            System.out.printf("%02x ", b & 0xff);
-        }
-        */
-        Collection<Asn1Object> csrs = Asn1Decoder.decode(octetBuffer);
-        for (Asn1Object asn1Object : csrs) {
-            Log.d(TAG, asn1Object.toString());
-        }
-
-        if (csrs.size() != 1) {
-            throw new IOException("Unexpected object count in CSR attributes response: " +
-                    csrs.size());
-        }
-        Asn1Object sequence = csrs.iterator().next();
-        if (sequence.getClass() != Asn1Constructed.class) {
-            throw new IOException("Unexpected CSR attribute container: " + sequence);
-        }
-
-        String keyAlgo = null;
-        Asn1Oid keyAlgoOID = null;
-        String sigAlgo = null;
-        String curveName = null;
-        Asn1Oid pubCrypto = null;
-        int keySize = -1;
-        Map<Asn1Oid, ASN1Encodable> idAttributes = new HashMap<>();
-
-        for (Asn1Object child : sequence.getChildren()) {
-            if (child.getTag() == Asn1Decoder.TAG_OID) {
-                Asn1Oid oid = (Asn1Oid) child;
-                OidMappings.SigEntry sigEntry = OidMappings.getSigEntry(oid);
-                if (sigEntry != null) {
-                    sigAlgo = sigEntry.getSigAlgo();
-                    keyAlgoOID = sigEntry.getKeyAlgo();
-                    keyAlgo = OidMappings.getJCEName(keyAlgoOID);
-                } else if (oid.equals(OidMappings.sPkcs9AtChallengePassword)) {
-                    byte[] tlsUnique = httpHandler.getTLSUnique();
-                    if (tlsUnique != null) {
-                        idAttributes.put(oid, new DERPrintableString(
-                                Base64.encodeToString(tlsUnique, Base64.DEFAULT)));
-                    } else {
-                        Log.w(TAG, "Cannot retrieve TLS unique channel binding");
-                    }
-                }
-            } else if (child.getTag() == Asn1Decoder.TAG_SEQ) {
-                Asn1Oid oid = null;
-                Set<Asn1Oid> oidValues = new HashSet<>();
-                List<Asn1Object> values = new ArrayList<>();
-
-                for (Asn1Object attributeSeq : child.getChildren()) {
-                    if (attributeSeq.getTag() == Asn1Decoder.TAG_OID) {
-                        oid = (Asn1Oid) attributeSeq;
-                    } else if (attributeSeq.getTag() == Asn1Decoder.TAG_SET) {
-                        for (Asn1Object value : attributeSeq.getChildren()) {
-                            if (value.getTag() == Asn1Decoder.TAG_OID) {
-                                oidValues.add((Asn1Oid) value);
-                            } else {
-                                values.add(value);
-                            }
-                        }
-                    }
-                }
-                if (oid == null) {
-                    throw new IOException("Invalid attribute, no OID");
-                }
-                if (oid.equals(OidMappings.sExtensionRequest)) {
-                    for (Asn1Oid subOid : oidValues) {
-                        if (OidMappings.isIDAttribute(subOid)) {
-                            if (subOid.equals(OidMappings.sMAC)) {
-                                idAttributes.put(subOid, new DERIA5String(omadmAdapter.getMAC()));
-                            } else if (subOid.equals(OidMappings.sIMEI)) {
-                                idAttributes.put(subOid, new DERIA5String(omadmAdapter.getImei()));
-                            } else if (subOid.equals(OidMappings.sMEID)) {
-                                idAttributes.put(subOid, new DERBitString(omadmAdapter.getMeid()));
-                            } else if (subOid.equals(OidMappings.sDevID)) {
-                                idAttributes.put(subOid,
-                                        new DERPrintableString(omadmAdapter.getDevID()));
-                            }
-                        }
-                    }
-                } else if (OidMappings.getCryptoID(oid) != null) {
-                    pubCrypto = oid;
-                    if (!values.isEmpty()) {
-                        for (Asn1Object value : values) {
-                            if (value.getTag() == Asn1Decoder.TAG_INTEGER) {
-                                keySize = (int) ((Asn1Integer) value).getValue();
-                            }
-                        }
-                    }
-                    if (oid.equals(OidMappings.sAlgo_EC)) {
-                        if (oidValues.isEmpty()) {
-                            throw new IOException("No ECC curve name provided");
-                        }
-                        for (Asn1Oid value : oidValues) {
-                            curveName = OidMappings.getJCEName(value);
-                            if (curveName != null) {
-                                break;
-                            }
-                        }
-                        if (curveName == null) {
-                            throw new IOException("Found no ECC curve for " + oidValues);
-                        }
-                    }
-                }
-            }
-        }
-
-        if (keyAlgoOID == null) {
-            throw new IOException("No public key algorithm specified");
-        }
-        if (pubCrypto != null && !pubCrypto.equals(keyAlgoOID)) {
-            throw new IOException("Mismatching key algorithms");
-        }
-
-        if (keyAlgoOID.equals(OidMappings.sAlgo_RSA)) {
-            if (keySize < MinRSAKeySize) {
-                if (keySize >= 0) {
-                    Log.i(TAG, "Upgrading suggested RSA key size from " +
-                            keySize + " to " + MinRSAKeySize);
-                }
-                keySize = MinRSAKeySize;
-            }
-        }
-
-        Log.d(TAG, String.format("pub key '%s', signature '%s', ECC curve '%s', id-atts %s",
-                keyAlgo, sigAlgo, curveName, idAttributes));
-
-        /*
-          Ruckus:
-            SEQUENCE:
-              OID=1.2.840.113549.1.1.11 (algo_id_sha256WithRSAEncryption)
-
-          RFC-7030:
-            SEQUENCE:
-              OID=1.2.840.113549.1.9.7 (challengePassword)
-              SEQUENCE:
-                OID=1.2.840.10045.2.1 (algo_id_ecPublicKey)
-                SET:
-                  OID=1.3.132.0.34 (secp384r1)
-              SEQUENCE:
-                OID=1.2.840.113549.1.9.14 (extensionRequest)
-                SET:
-                  OID=1.3.6.1.1.1.1.22 (mac-address)
-              OID=1.2.840.10045.4.3.3 (eccdaWithSHA384)
-
-              1L, 3L, 6L, 1L, 1L, 1L, 1L, 22
-         */
-
-        // ECC Does not appear to be supported currently
-        KeyPairGenerator kpg = KeyPairGenerator.getInstance(keyAlgo);
-        if (curveName != null) {
-            AlgorithmParameters algorithmParameters = AlgorithmParameters.getInstance(keyAlgo);
-            algorithmParameters.init(new ECNamedCurveGenParameterSpec(curveName));
-            kpg.initialize(algorithmParameters
-                    .getParameterSpec(ECNamedCurveGenParameterSpec.class));
-        } else {
-            kpg.initialize(keySize);
-        }
-        KeyPair kp = kpg.generateKeyPair();
-
-        X500Principal subject = new X500Principal("CN=Android, O=Google, C=US");
-
-        mClientKey = kp.getPrivate();
-
-        // !!! Map the idAttributes into an ASN1Set of values to pass to
-        // the PKCS10CertificationRequest - this code is using outdated BC classes and
-        // has *not* been tested.
-        ASN1Set attributes;
-        if (!idAttributes.isEmpty()) {
-            ASN1EncodableVector payload = new DEREncodableVector();
-            for (Map.Entry<Asn1Oid, ASN1Encodable> entry : idAttributes.entrySet()) {
-                DERObjectIdentifier type = new DERObjectIdentifier(entry.getKey().toOIDString());
-                ASN1Set values = new DERSet(entry.getValue());
-                Attribute attribute = new Attribute(type, values);
-                payload.add(attribute);
-            }
-            attributes = new DERSet(payload);
-        } else {
-            attributes = null;
-        }
-
-        return new PKCS10CertificationRequest(sigAlgo, subject, kp.getPublic(),
-                attributes, mClientKey).getEncoded();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/flow/FlowService.java b/packages/Osu/src/com/android/hotspot2/flow/FlowService.java
deleted file mode 100644
index 8bbbf06..0000000
--- a/packages/Osu/src/com/android/hotspot2/flow/FlowService.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.android.hotspot2.flow;
-
-import android.annotation.Nullable;
-import android.app.IntentService;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.Network;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.IBinder;
-import android.util.Log;
-
-import com.android.hotspot2.osu.OSUFlowManager;
-import com.android.hotspot2.osu.OSUManager;
-import com.android.hotspot2.osu.OSUOperationStatus;
-import com.android.hotspot2.pps.HomeSP;
-
-import java.io.IOException;
-
-/**
- * This is the Hotspot 2.0 release 2 service that handles actual provisioning and remediation flows.
- *
- * The OSU App is made up of two services; FlowService and OSUService.
- *
- * OSUService is a long running light weight service, kept alive throughout the lifetime of the
- * operating system by being bound from the framework (in WifiManager in stage
- * PHASE_THIRD_PARTY_APPS_CAN_START), and is responsible for continuously caching OSU information
- * and notifying the UI when OSUs are available.
- *
- * FlowService is only started on demand from OSUService and is responsible for handling actual
- * provisioning and remediation flows, and requires a fairly significant memory footprint.
- *
- * FlowService is defined to run in its own process through the definition
- *      <service android:name=".flow.FlowService" android:process=":osuflow">
- * in the AndroidManifest.
- * This is done as a means to keep total app memory footprint low (pss < 10M) and only start the
- * FlowService on demand and make it available for "garbage collection" by the OS when not in use.
- */
-public class FlowService extends IntentService {
-    private static final String[] INTENTS = {
-            WifiManager.NETWORK_STATE_CHANGED_ACTION
-    };
-
-    private OSUFlowManager mOSUFlowManager;
-    private PlatformAdapter mPlatformAdapter;
-    private final FlowServiceImpl mOSUAccessor = new FlowServiceImpl();
-
-    /*
-    public FlowService(Context context) {
-        super("FlowService");
-        mOSUFlowManager = new OSUFlowManager();
-        mPlatformAdapter = new PlatformAdapter(context);
-        BroadcastReceiver receiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                handleIntent(intent.getAction(), intent);
-            }
-        };
-        for (String intentString : INTENTS) {
-            context.registerReceiver(receiver, new IntentFilter(intentString));
-        }
-    }
-    */
-
-    public FlowService() {
-        super("FlowService");
-    }
-
-    public final class FlowServiceImpl extends IFlowService.Stub {
-        public void provision(OSUInfo osuInfo) {
-            FlowService.this.provision(osuInfo);
-        }
-
-        public void remediate(String spFqdn, String url, boolean policy, Network network) {
-            FlowService.this.remediate(spFqdn, url, policy, network);
-        }
-
-        public void spDeleted(String fqdn) {
-            FlowService.this.serviceProviderDeleted(fqdn);
-        }
-    }
-
-    public void provision(OSUInfo osuInfo) {
-        try {
-            mOSUFlowManager.appendFlow(new OSUFlowManager.OSUFlow(osuInfo, mPlatformAdapter,
-                    mPlatformAdapter.getKeyManager(null)));
-        } catch (IOException ioe) {
-            mPlatformAdapter.notifyUser(OSUOperationStatus.ProvisioningFailure, ioe.getMessage(),
-                    osuInfo.getName(PlatformAdapter.LOCALE));
-        }
-    }
-
-    /**
-     * Initiate remediation
-     * @param spFqdn The FQDN of the current SP, not set for WNM based remediation
-     * @param url The URL of the remediation server
-     * @param policy Set if this is a policy update rather than a subscription update
-     * @param network The network to use for remediation
-     */
-    public void remediate(String spFqdn, String url, boolean policy, Network network) {
-        Log.d(OSUManager.TAG, "Starting remediation for " + spFqdn + " to " + url);
-        if (spFqdn != null) {
-            HomeSP homeSP = mPlatformAdapter.getHomeSP(spFqdn);
-            if (homeSP == null) {
-                Log.e(OSUManager.TAG, "No HomeSP object matches '" + spFqdn + "'");
-                return;
-            }
-
-            try {
-                mOSUFlowManager.appendFlow(new OSUFlowManager.OSUFlow(network, url,
-                        mPlatformAdapter, mPlatformAdapter.getKeyManager(homeSP),
-                        homeSP, policy
-                        ? OSUFlowManager.FlowType.Policy : OSUFlowManager.FlowType.Remediation));
-            } catch (IOException ioe) {
-                Log.e(OSUManager.TAG, "Failed to remediate: " + ioe, ioe);
-            }
-        } else {
-            HomeSP homeSP = mPlatformAdapter.getCurrentSP();
-            if (homeSP == null) {
-                Log.e(OSUManager.TAG, "Remediation request on unidentified Passpoint network ");
-                return;
-            }
-
-            try {
-                mOSUFlowManager.appendFlow(new OSUFlowManager.OSUFlow(network, url,
-                        mPlatformAdapter, mPlatformAdapter.getKeyManager(homeSP), homeSP,
-                        OSUFlowManager.FlowType.Remediation));
-            } catch (IOException ioe) {
-                Log.e(OSUManager.TAG, "Failed to start remediation: " + ioe, ioe);
-            }
-        }
-    }
-
-    public void serviceProviderDeleted(String fqdn) {
-        mPlatformAdapter.serviceProviderDeleted(fqdn);
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        mOSUFlowManager = new OSUFlowManager(this);
-        mPlatformAdapter = new PlatformAdapter(this);
-        BroadcastReceiver receiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                handleIntent(intent.getAction(), intent);
-            }
-        };
-        for (String intentString : INTENTS) {
-            registerReceiver(receiver, new IntentFilter(intentString));
-        }
-        return mOSUAccessor;
-    }
-
-    @Override
-    protected void onHandleIntent(@Nullable Intent intent) {
-    }
-
-    private void handleIntent(String action, Intent intent) {
-        if (WifiManager.NETWORK_STATE_CHANGED_ACTION.equals(action)) {
-            WifiInfo wifiInfo = intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO);
-            if (wifiInfo != null) {
-                mOSUFlowManager.networkChange();
-            }
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/flow/IFlowService.aidl b/packages/Osu/src/com/android/hotspot2/flow/IFlowService.aidl
deleted file mode 100644
index a61274f..0000000
--- a/packages/Osu/src/com/android/hotspot2/flow/IFlowService.aidl
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.android.hotspot2.flow;
-
-import com.android.hotspot2.flow.OSUInfo;
-import android.net.Network;
-
-interface IFlowService {
-    void provision(in OSUInfo osuInfo);
-    void remediate(String spFqdn, String url, boolean policy, in Network network);
-    void spDeleted(String fqdn);
-}
diff --git a/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.aidl b/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.aidl
deleted file mode 100644
index 172486e..0000000
--- a/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.android.hotspot2.flow;
-
-parcelable OSUInfo;
diff --git a/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.java b/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.java
deleted file mode 100644
index 401eccb..0000000
--- a/packages/Osu/src/com/android/hotspot2/flow/OSUInfo.java
+++ /dev/null
@@ -1,321 +0,0 @@
-package com.android.hotspot2.flow;
-
-import android.net.wifi.ScanResult;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.util.Log;
-
-import com.android.anqp.HSIconFileElement;
-import com.android.anqp.I18Name;
-import com.android.anqp.IconInfo;
-import com.android.anqp.OSUProvider;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.osu.OSUManager;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Locale;
-import java.util.Set;
-
-public class OSUInfo implements Parcelable {
-    public static final String GenericLocale = "zxx";
-
-    public enum IconStatus {
-        NotQueried,     //
-        InProgress,     // Query pending
-        NotAvailable,   // Deterministically unavailable
-        Available       // Icon data retrieved
-    }
-
-    private final long mBSSID;
-    private final long mHESSID;
-    private final int mAnqpDomID;
-    private final String mAdvertisingSSID;
-    private final OSUProvider mOSUProvider;
-    private final int mOsuID;
-    private long mOSUBssid;
-    private IconStatus mIconStatus = IconStatus.NotQueried;
-    private HSIconFileElement mIconFileElement;
-    private String mIconFileName;
-    private IconInfo mIconInfo;
-
-    public OSUInfo(ScanResult scanResult, OSUProvider osuProvider, int osuID) {
-        mOsuID = osuID;
-        mBSSID = Utils.parseMac(scanResult.BSSID);
-        mHESSID = scanResult.hessid;
-        mAnqpDomID = scanResult.anqpDomainId;
-        mAdvertisingSSID = scanResult.SSID;
-        mOSUProvider = osuProvider;
-    }
-
-    public long getOSUBssid() {
-        return mOSUBssid;
-    }
-
-    public void setOSUBssid(long OSUBssid) {
-        mOSUBssid = OSUBssid;
-    }
-
-    public long getHESSID() {
-        return mHESSID;
-    }
-
-    public int getAnqpDomID() {
-        return mAnqpDomID;
-    }
-
-    public String getAdvertisingSsid() {
-        return mAdvertisingSSID;
-    }
-
-    public Set<Locale> getNameLocales() {
-        Set<Locale> locales = new HashSet<>(mOSUProvider.getNames().size());
-        for (I18Name name : mOSUProvider.getNames()) {
-            locales.add(name.getLocale());
-        }
-        return locales;
-    }
-
-    public Set<Locale> getServiceLocales() {
-        Set<Locale> locales = new HashSet<>(mOSUProvider.getServiceDescriptions().size());
-        for (I18Name name : mOSUProvider.getServiceDescriptions()) {
-            locales.add(name.getLocale());
-        }
-        return locales;
-    }
-
-    public Set<String> getIconLanguages() {
-        Set<String> locales = new HashSet<>(mOSUProvider.getIcons().size());
-        for (IconInfo iconInfo : mOSUProvider.getIcons()) {
-            locales.add(iconInfo.getLanguage());
-        }
-        return locales;
-    }
-
-    public String getName(Locale locale) {
-        List<ScoreEntry<String>> scoreList = new ArrayList<>();
-        for (I18Name name : mOSUProvider.getNames()) {
-            if (locale == null || name.getLocale().equals(locale)) {
-                return name.getText();
-            }
-            scoreList.add(new ScoreEntry<>(name.getText(),
-                    languageScore(name.getLanguage(), locale)));
-        }
-        Collections.sort(scoreList);
-        return scoreList.isEmpty() ? null : scoreList.get(scoreList.size() - 1).getData();
-    }
-
-    public String getServiceDescription(Locale locale) {
-        List<ScoreEntry<String>> scoreList = new ArrayList<>();
-        for (I18Name service : mOSUProvider.getServiceDescriptions()) {
-            if (locale == null || service.getLocale().equals(locale)) {
-                return service.getText();
-            }
-            scoreList.add(new ScoreEntry<>(service.getText(),
-                    languageScore(service.getLanguage(), locale)));
-        }
-        Collections.sort(scoreList);
-        return scoreList.isEmpty() ? null : scoreList.get(scoreList.size() - 1).getData();
-    }
-
-    public int getOsuID() {
-        return mOsuID;
-    }
-
-    public void setIconStatus(IconStatus iconStatus) {
-        synchronized (mOSUProvider) {
-            mIconStatus = iconStatus;
-        }
-    }
-
-    public IconStatus getIconStatus() {
-        synchronized (mOSUProvider) {
-            return mIconStatus;
-        }
-    }
-
-    public HSIconFileElement getIconFileElement() {
-        synchronized (mOSUProvider) {
-            return mIconFileElement;
-        }
-    }
-
-    public IconInfo getIconInfo() {
-        synchronized (mOSUProvider) {
-            return mIconInfo;
-        }
-    }
-
-    public String getIconFileName() {
-        return mIconFileName;
-    }
-
-    public void setIconFileElement(HSIconFileElement iconFileElement, String fileName) {
-        synchronized (mOSUProvider) {
-            mIconFileElement = iconFileElement;
-            for (IconInfo iconInfo : mOSUProvider.getIcons()) {
-                if (iconInfo.getFileName().equals(fileName)) {
-                    mIconInfo = iconInfo;
-                    mIconFileName = fileName;
-                    break;
-                }
-            }
-            mIconStatus = IconStatus.Available;
-        }
-    }
-
-    private static class ScoreEntry<T> implements Comparable<ScoreEntry> {
-        private final T mData;
-        private final int mScore;
-
-        private ScoreEntry(T data, int score) {
-            mData = data;
-            mScore = score;
-        }
-
-        public T getData() {
-            return mData;
-        }
-
-        @Override
-        public int compareTo(ScoreEntry other) {
-            return Integer.compare(mScore, other.mScore);
-        }
-
-        @Override
-        public String toString() {
-            return String.format("%d for '%s'", mScore, mData);
-        }
-    }
-
-    public List<IconInfo> getIconInfo(Locale locale, Set<String> types, int width, int height) {
-        if (mOSUProvider.getIcons().isEmpty()) {
-            return null;
-        }
-        Log.d(OSUManager.TAG, "Matching icons against " + locale
-                + ", types " + types + ", " + width + "*" + height);
-
-        List<ScoreEntry<IconInfo>> matches = new ArrayList<>();
-        for (IconInfo iconInfo : mOSUProvider.getIcons()) {
-            Log.d(OSUManager.TAG, "Checking icon " + iconInfo.toString());
-            if (!types.contains(iconInfo.getIconType())) {
-                continue;
-            }
-
-            int score = languageScore(iconInfo.getLanguage(), locale);
-            int delta = iconInfo.getWidth() - width;
-            // Best size score is 1024 for a exact match, i.e. 2048 if both sides match
-            if (delta >= 0) {
-                score += (256 - delta) * 4;  // Prefer down-scaling
-            } else {
-                score += 256 + delta;    // Before up-scaling
-            }
-            delta = iconInfo.getHeight() - height;
-            if (delta >= 0) {
-                score += (256 - delta) * 4;
-            } else {
-                score += 256 + delta;
-            }
-            matches.add(new ScoreEntry<>(iconInfo, score));
-        }
-        if (matches.isEmpty()) {
-            return Collections.emptyList();
-        }
-        Collections.sort(matches);
-        List<IconInfo> icons = new ArrayList<>(matches.size());
-        ListIterator<ScoreEntry<IconInfo>> matchIterator = matches.listIterator(matches.size());
-        while (matchIterator.hasPrevious()) {
-            icons.add(matchIterator.previous().getData());
-        }
-        return icons;
-    }
-
-    private static int languageScore(String language, Locale locale) {
-        if (language.length() == 3 && language.equalsIgnoreCase(locale.getISO3Language()) ||
-                language.length() == 2 && language.equalsIgnoreCase(locale.getLanguage())) {
-            return 4096;
-        } else if (language.equalsIgnoreCase(GenericLocale)) {
-            return 3072;
-        } else if (language.equalsIgnoreCase("eng")) {
-            return 2048;
-        } else {
-            return 1024;
-        }
-    }
-
-    public long getBSSID() {
-        return mBSSID;
-    }
-
-    public String getOsuSsid() {
-        return mOSUProvider.getSSID();
-    }
-
-    public OSUProvider getOSUProvider() {
-        return mOSUProvider;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("OSU Info '%s' %012x -> %s, icon %s",
-                getOsuSsid(), mBSSID, getServiceDescription(null), mIconStatus);
-    }
-
-    private OSUInfo(Parcel in) {
-        mBSSID = in.readLong();
-        mHESSID = in.readLong();
-        mAnqpDomID = in.readInt();
-        mAdvertisingSSID = in.readString();
-        mOsuID = in.readInt();
-        mOSUBssid = in.readLong();
-        mIconFileName = in.readString();
-        mIconStatus = Utils.mapEnum(in.readInt(), IconStatus.class);
-        OSUProvider osuProvider;
-        try {
-            osuProvider = new OSUProvider(in);
-        } catch (IOException ioe) {
-            osuProvider = null;
-        }
-        mOSUProvider = osuProvider;
-        if (osuProvider == null) {
-            return;
-        }
-        mIconFileElement = new HSIconFileElement(in);
-        int iconIndex = in.readInt();
-        mIconInfo = iconIndex >= 0 && iconIndex < mOSUProvider.getIcons().size()
-                ? mOSUProvider.getIcons().get(iconIndex) : null;
-    }
-
-    public static final Parcelable.Creator<OSUInfo> CREATOR = new Parcelable.Creator<OSUInfo>() {
-        public OSUInfo createFromParcel(Parcel in) {
-            return new OSUInfo(in);
-        }
-
-        public OSUInfo[] newArray(int size) {
-            return new OSUInfo[size];
-        }
-    };
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel dest, int flags) {
-        dest.writeLong(mBSSID);
-        dest.writeLong(mHESSID);
-        dest.writeInt(mAnqpDomID);
-        dest.writeString(mAdvertisingSSID);
-        dest.writeInt(mOsuID);
-        dest.writeLong(mOSUBssid);
-        dest.writeString(mIconFileName);
-        dest.writeInt(mIconStatus.ordinal());
-        mOSUProvider.writeParcel(dest);
-        mIconFileElement.writeParcel(dest);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java b/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java
deleted file mode 100644
index d95af61..0000000
--- a/packages/Osu/src/com/android/hotspot2/flow/PlatformAdapter.java
+++ /dev/null
@@ -1,620 +0,0 @@
-package com.android.hotspot2.flow;
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.Network;
-import android.net.wifi.PasspointManagementObjectDefinition;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiEnterpriseConfig;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.util.Log;
-
-import com.android.configparse.ConfigBuilder;
-import com.android.hotspot2.AppBridge;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.app.OSUService;
-import com.android.hotspot2.omadm.MOManager;
-import com.android.hotspot2.omadm.MOTree;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.OMAParser;
-import com.android.hotspot2.osu.ClientKeyManager;
-import com.android.hotspot2.osu.OSUCertType;
-import com.android.hotspot2.osu.OSUManager;
-import com.android.hotspot2.osu.OSUOperationStatus;
-import com.android.hotspot2.osu.OSUSocketFactory;
-import com.android.hotspot2.osu.WiFiKeyManager;
-import com.android.hotspot2.osu.commands.MOData;
-import com.android.hotspot2.pps.HomeSP;
-
-import org.xml.sax.SAXException;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.PrivateKey;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.net.ssl.KeyManager;
-
-public class PlatformAdapter {
-    private static final String TAG = "OSUFLOW";
-
-    public static final Locale LOCALE = Locale.getDefault();
-
-    public static final String CERT_WFA_ALIAS = "wfa-root-";
-    public static final String CERT_REM_ALIAS = "rem-";
-    public static final String CERT_POLICY_ALIAS = "pol-";
-    public static final String CERT_SHARED_ALIAS = "shr-";
-    public static final String CERT_CLT_CERT_ALIAS = "clt-";
-    public static final String CERT_CLT_KEY_ALIAS = "prv-";
-    public static final String CERT_CLT_CA_ALIAS = "aaa-";
-
-    private static final String KEYSTORE_FILE = "passpoint.ks";
-
-    private final Context mContext;
-    private final File mKeyStoreFile;
-    private final KeyStore mKeyStore;
-    private final AppBridge mAppBridge;
-    private final Map<String, PasspointConfig> mPasspointConfigs;
-
-    public PlatformAdapter(Context context) {
-        mContext = context;
-        mAppBridge = new AppBridge(context);
-
-        File appFolder = context.getFilesDir();
-        mKeyStoreFile = new File(appFolder, KEYSTORE_FILE);
-        Log.d(TAG, "KS file: " + mKeyStoreFile.getPath());
-        KeyStore ks = null;
-        try {
-            //ks = loadKeyStore(KEYSTORE_FILE, readCertsFromDisk(WFA_CA_LOC));
-            ks = loadKeyStore(mKeyStoreFile, OSUSocketFactory.buildCertSet());
-        } catch (IOException e) {
-            Log.e(TAG, "Failed to initialize Passpoint keystore, OSU disabled", e);
-        }
-        mKeyStore = ks;
-
-        mPasspointConfigs = loadAllSps(context);
-    }
-
-    private static KeyStore loadKeyStore(File ksFile, Set<X509Certificate> diskCerts)
-            throws IOException {
-        try {
-            KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
-            if (ksFile.exists()) {
-                try (FileInputStream in = new FileInputStream(ksFile)) {
-                    keyStore.load(in, null);
-                }
-
-                // Note: comparing two sets of certs does not work.
-                boolean mismatch = false;
-                int loadCount = 0;
-                for (int n = 0; n < 1000; n++) {
-                    String alias = String.format("%s%d", CERT_WFA_ALIAS, n);
-                    Certificate cert = keyStore.getCertificate(alias);
-                    if (cert == null) {
-                        break;
-                    }
-
-                    loadCount++;
-                    boolean matched = false;
-                    Iterator<X509Certificate> iter = diskCerts.iterator();
-                    while (iter.hasNext()) {
-                        X509Certificate diskCert = iter.next();
-                        if (cert.equals(diskCert)) {
-                            iter.remove();
-                            matched = true;
-                            break;
-                        }
-                    }
-                    if (!matched) {
-                        mismatch = true;
-                        break;
-                    }
-                }
-                if (mismatch || !diskCerts.isEmpty()) {
-                    Log.d(TAG, "Re-seeding Passpoint key store with " +
-                            diskCerts.size() + " WFA certs");
-                    for (int n = 0; n < 1000; n++) {
-                        String alias = String.format("%s%d", CERT_WFA_ALIAS, n);
-                        Certificate cert = keyStore.getCertificate(alias);
-                        if (cert == null) {
-                            break;
-                        } else {
-                            keyStore.deleteEntry(alias);
-                        }
-                    }
-                    int index = 0;
-                    for (X509Certificate caCert : diskCerts) {
-                        keyStore.setCertificateEntry(
-                                String.format("%s%d", CERT_WFA_ALIAS, index), caCert);
-                        index++;
-                    }
-
-                    try (FileOutputStream out = new FileOutputStream(ksFile)) {
-                        keyStore.store(out, null);
-                    }
-                } else {
-                    Log.d(TAG, "Loaded Passpoint key store with " + loadCount + " CA certs");
-                    Enumeration<String> aliases = keyStore.aliases();
-                    while (aliases.hasMoreElements()) {
-                        Log.d("ZXC", "KS Alias '" + aliases.nextElement() + "'");
-                    }
-                }
-            } else {
-                keyStore.load(null, null);
-                int index = 0;
-                for (X509Certificate caCert : diskCerts) {
-                    keyStore.setCertificateEntry(
-                            String.format("%s%d", CERT_WFA_ALIAS, index), caCert);
-                    index++;
-                }
-
-                try (FileOutputStream out = new FileOutputStream(ksFile)) {
-                    keyStore.store(out, null);
-                }
-                Log.d(TAG, "Initialized Passpoint key store with " +
-                        diskCerts.size() + " CA certs");
-            }
-            return keyStore;
-        } catch (GeneralSecurityException gse) {
-            throw new IOException(gse);
-        }
-    }
-
-    private static Map<String, PasspointConfig> loadAllSps(Context context) {
-        Map<String, PasspointConfig> passpointConfigs = new HashMap<>();
-
-        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        List<WifiConfiguration> configs = wifiManager.getPrivilegedConfiguredNetworks();
-        if (configs == null) {
-            return passpointConfigs;
-        }
-        int count = 0;
-        for (WifiConfiguration config : configs) {
-            String moTree = config.getMoTree();
-            if (moTree != null) {
-                try {
-                    passpointConfigs.put(config.FQDN, new PasspointConfig(config));
-                    count++;
-                } catch (IOException | SAXException e) {
-                    Log.w(OSUManager.TAG, "Failed to parse MO: " + e);
-                }
-            }
-        }
-        Log.d(OSUManager.TAG, "Loaded " + count + " SPs");
-        return passpointConfigs;
-    }
-
-    public KeyStore getKeyStore() {
-        return mKeyStore;
-    }
-
-    public Context getContext() {
-        return mContext;
-    }
-
-    /**
-     * Connect to an OSU provisioning network. The connection should not bring down other existing
-     * connection and the network should not be made the default network since the connection
-     * is solely for sign up and is neither intended for nor likely provides access to any
-     * generic resources.
-     *
-     * @param osuInfo The OSU info object that defines the parameters for the network. An OSU
-     *                network is either an open network, or, if the OSU NAI is set, an "OSEN"
-     *                network, which is an anonymous EAP-TLS network with special keys.
-     * @return an Integer holding the network-id of the just added network configuration, or null
-     * if the network existed prior to this call (was not added by the OSU infrastructure).
-     * The value will be used at the end of the OSU flow to delete the network as applicable.
-     * @throws IOException Issues:
-     *                     1. The network id is not returned. addNetwork cannot be called from here since the method
-     *                     runs in the context of the app and doesn't have the appropriate permission.
-     *                     2. The connection is not immediately usable if the network was not previously selected
-     *                     manually.
-     */
-    public Integer connect(OSUInfo osuInfo) throws IOException {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = '"' + osuInfo.getOsuSsid() + '"';
-        if (osuInfo.getOSUBssid() != 0) {
-            config.BSSID = Utils.macToString(osuInfo.getOSUBssid());
-            Log.d(OSUManager.TAG, String.format("Setting BSSID of '%s' to %012x",
-                    osuInfo.getOsuSsid(), osuInfo.getOSUBssid()));
-        }
-
-        if (osuInfo.getOSUProvider().getOsuNai() == null) {
-            config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        } else {
-            config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.OSEN);
-            config.allowedProtocols.set(WifiConfiguration.Protocol.OSEN);
-            config.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
-            config.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.GTK_NOT_USED);
-            config.enterpriseConfig = new WifiEnterpriseConfig();
-            config.enterpriseConfig.setEapMethod(WifiEnterpriseConfig.Eap.UNAUTH_TLS);
-            config.enterpriseConfig.setIdentity(osuInfo.getOSUProvider().getOsuNai());
-            Set<X509Certificate> cas = OSUSocketFactory.buildCertSet();
-            config.enterpriseConfig.setCaCertificates(cas.toArray(new X509Certificate[cas.size()]));
-        }
-
-        int networkId = wifiManager.addNetwork(config);
-        if (networkId < 0) {
-            throw new IOException("Failed to add OSU network");
-        }
-        if (wifiManager.enableNetwork(networkId, true)) {
-            return networkId;
-        } else {
-            throw new IOException("Failed to enable OSU network");
-        }
-    }
-
-    /**
-     * @param homeSP The Home SP associated with the keying material in question. Passing
-     *               null returns a "system wide" KeyManager to support pre-provisioned certs based
-     *               on names retrieved from the ClientCertInfo request.
-     * @return A key manager suitable for the given configuration (or pre-provisioned keys).
-     */
-    public KeyManager getKeyManager(HomeSP homeSP) throws IOException {
-        return homeSP != null
-                ? new ClientKeyManager(homeSP, mKeyStore) : new WiFiKeyManager(mKeyStore);
-    }
-
-    public void provisioningComplete(OSUInfo osuInfo,
-                                     MOData moData, Map<OSUCertType, List<X509Certificate>> certs,
-                                     PrivateKey privateKey, Network osuNetwork) {
-        try {
-            String xml = moData.getMOTree().toXml();
-            HomeSP homeSP = MOManager.buildSP(xml);
-
-            Integer spNwk = addNetwork(homeSP, certs, privateKey, osuNetwork);
-            if (spNwk == null) {
-                notifyUser(OSUOperationStatus.ProvisioningFailure,
-                        "Failed to save network configuration", osuInfo.getName(LOCALE));
-            } else {
-                if (addSP(xml) < 0) {
-                    deleteNetwork(spNwk);
-                    Log.e(TAG, "Failed to provision: " + homeSP.getFQDN());
-                    notifyUser(OSUOperationStatus.ProvisioningFailure, "Failed to add MO",
-                            osuInfo.getName(LOCALE));
-                    return;
-                }
-                Set<X509Certificate> rootCerts = OSUSocketFactory.getRootCerts(mKeyStore);
-                X509Certificate remCert = getCert(certs, OSUCertType.Remediation);
-                X509Certificate polCert = getCert(certs, OSUCertType.Policy);
-                int newCerts = 0;
-                if (privateKey != null) {
-                    X509Certificate cltCert = getCert(certs, OSUCertType.Client);
-                    mKeyStore.setKeyEntry(CERT_CLT_KEY_ALIAS + homeSP.getFQDN(),
-                            privateKey, null, new X509Certificate[]{cltCert});
-                    mKeyStore.setCertificateEntry(CERT_CLT_CERT_ALIAS + homeSP.getFQDN(), cltCert);
-                    newCerts++;
-                }
-                boolean usingShared = false;
-                if (remCert != null) {
-                    if (!rootCerts.contains(remCert)) {
-                        if (remCert.equals(polCert)) {
-                            mKeyStore.setCertificateEntry(CERT_SHARED_ALIAS + homeSP.getFQDN(),
-                                    remCert);
-                            usingShared = true;
-                            newCerts++;
-                        } else {
-                            mKeyStore.setCertificateEntry(CERT_REM_ALIAS + homeSP.getFQDN(),
-                                    remCert);
-                            newCerts++;
-                        }
-                    }
-                }
-                if (!usingShared && polCert != null) {
-                    if (!rootCerts.contains(polCert)) {
-                        mKeyStore.setCertificateEntry(CERT_POLICY_ALIAS + homeSP.getFQDN(),
-                                remCert);
-                        newCerts++;
-                    }
-                }
-
-
-                if (newCerts > 0) {
-                    try (FileOutputStream out = new FileOutputStream(mKeyStoreFile)) {
-                        mKeyStore.store(out, null);
-                    }
-                }
-                notifyUser(OSUOperationStatus.ProvisioningSuccess, null, osuInfo.getName(LOCALE));
-                Log.d(TAG, "Provisioning complete.");
-            }
-        } catch (IOException | GeneralSecurityException | SAXException e) {
-            Log.e(TAG, "Failed to provision: " + e, e);
-            notifyUser(OSUOperationStatus.ProvisioningFailure, e.toString(),
-                    osuInfo.getName(LOCALE));
-        }
-    }
-
-    public void remediationComplete(HomeSP homeSP, Collection<MOData> mods,
-                                    Map<OSUCertType, List<X509Certificate>> certs,
-                                    PrivateKey privateKey, boolean policy)
-            throws IOException, GeneralSecurityException {
-
-        HomeSP altSP = null;
-        if (modifySP(homeSP, mods) > 0) {
-            altSP = MOManager.modifySP(homeSP, getMOTree(homeSP), mods);
-        }
-
-        X509Certificate caCert = null;
-        List<X509Certificate> clientCerts = null;
-        if (certs != null) {
-            List<X509Certificate> certList = certs.get(OSUCertType.AAA);
-            caCert = certList != null && !certList.isEmpty() ? certList.iterator().next() : null;
-            clientCerts = certs.get(OSUCertType.Client);
-        }
-        if (altSP != null || certs != null) {
-            if (altSP == null) {
-                altSP = homeSP;
-            }
-            updateNetwork(altSP, caCert, clientCerts, privateKey);
-
-            if (privateKey != null) {
-                X509Certificate cltCert = getCert(certs, OSUCertType.Client);
-                mKeyStore.setKeyEntry(CERT_CLT_KEY_ALIAS + homeSP.getFQDN(),
-                        privateKey, null, new X509Certificate[]{cltCert});
-                mKeyStore.setCertificateEntry(CERT_CLT_CERT_ALIAS + homeSP.getFQDN(), cltCert);
-            }
-        }
-
-        Intent intent = new Intent(OSUService.REMEDIATION_DONE_ACTION);
-        intent.putExtra(OSUService.REMEDIATION_FQDN_EXTRA, homeSP.getFQDN());
-        intent.putExtra(OSUService.REMEDIATION_POLICY_EXTRA, policy);
-        mContext.sendBroadcast(intent);
-
-        notifyUser(OSUOperationStatus.ProvisioningSuccess, null, homeSP.getFriendlyName());
-    }
-
-    public void serviceProviderDeleted(String fqdn) {
-        int count = deleteCerts(mKeyStore, fqdn,
-                CERT_REM_ALIAS, CERT_POLICY_ALIAS, CERT_SHARED_ALIAS, CERT_CLT_CERT_ALIAS);
-
-        Log.d(TAG, "Passpoint network deleted, removing " + count + " key store entries");
-
-        try {
-            if (mKeyStore.getKey(CERT_CLT_KEY_ALIAS + fqdn, null) != null) {
-                mKeyStore.deleteEntry(CERT_CLT_KEY_ALIAS + fqdn);
-            }
-        } catch (GeneralSecurityException e) {
-                /**/
-        }
-
-        if (count > 0) {
-            try (FileOutputStream out = new FileOutputStream(mKeyStoreFile)) {
-                mKeyStore.store(out, null);
-            } catch (IOException | GeneralSecurityException e) {
-                Log.w(TAG, "Failed to remove certs from key store: " + e);
-            }
-        }
-    }
-
-    private static int deleteCerts(KeyStore keyStore, String fqdn, String... prefixes) {
-        int count = 0;
-        for (String prefix : prefixes) {
-            try {
-                String alias = prefix + fqdn;
-                Certificate cert = keyStore.getCertificate(alias);
-                if (cert != null) {
-                    keyStore.deleteEntry(alias);
-                    count++;
-                }
-            } catch (KeyStoreException kse) {
-                /**/
-            }
-        }
-        return count;
-    }
-
-    private static X509Certificate getCert(Map<OSUCertType, List<X509Certificate>> certMap,
-                                           OSUCertType certType) {
-        List<X509Certificate> certs = certMap.get(certType);
-        if (certs == null || certs.isEmpty()) {
-            return null;
-        }
-        return certs.iterator().next();
-    }
-
-    public String notifyUser(OSUOperationStatus status, String message, String spName) {
-        if (status == OSUOperationStatus.UserInputComplete) {
-            return null;
-        }
-        mAppBridge.showStatus(status, spName, message, null);
-        return null;
-    }
-
-    public void provisioningFailed(String spName, String message) {
-        notifyUser(OSUOperationStatus.ProvisioningFailure, message, spName);
-    }
-
-    private Integer addNetwork(HomeSP homeSP, Map<OSUCertType, List<X509Certificate>> certs,
-                              PrivateKey privateKey, Network osuNetwork)
-            throws IOException, GeneralSecurityException {
-
-        List<X509Certificate> aaaTrust = certs.get(OSUCertType.AAA);
-        if (aaaTrust.isEmpty()) {
-            aaaTrust = certs.get(OSUCertType.CA);   // Get the CAs from the EST flow.
-        }
-
-        WifiConfiguration config = ConfigBuilder.buildConfig(homeSP,
-                aaaTrust.iterator().next(),
-                certs.get(OSUCertType.Client), privateKey);
-
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        int nwkId = wifiManager.addNetwork(config);
-        boolean saved = false;
-        if (nwkId >= 0) {
-            saved = wifiManager.saveConfiguration();
-        }
-        Log.d(OSUManager.TAG, "Wifi configuration " + nwkId +
-                " " + (saved ? "saved" : "not saved"));
-
-        if (saved) {
-            reconnect(osuNetwork, nwkId);
-            return nwkId;
-        } else {
-            return null;
-        }
-    }
-
-    private void updateNetwork(HomeSP homeSP, X509Certificate caCert,
-                              List<X509Certificate> clientCerts, PrivateKey privateKey)
-            throws IOException, GeneralSecurityException {
-
-        WifiConfiguration config = getWifiConfig(homeSP);
-        if (config == null) {
-            throw new IOException("Failed to find matching network config");
-        }
-        Log.d(OSUManager.TAG, "Found matching config " + config.networkId + ", updating");
-
-        WifiEnterpriseConfig enterpriseConfig = config.enterpriseConfig;
-        WifiConfiguration newConfig = ConfigBuilder.buildConfig(homeSP,
-                caCert != null ? caCert : enterpriseConfig.getCaCertificate(),
-                clientCerts, privateKey);
-        newConfig.networkId = config.networkId;
-
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        wifiManager.save(newConfig, null);
-        wifiManager.saveConfiguration();
-    }
-
-    private WifiConfiguration getWifiConfig(HomeSP homeSP) {
-        PasspointConfig passpointConfig = mPasspointConfigs.get(homeSP.getFQDN());
-        return passpointConfig != null ? passpointConfig.getWifiConfiguration() : null;
-    }
-
-    public MOTree getMOTree(HomeSP homeSP) {
-        PasspointConfig config = mPasspointConfigs.get(homeSP.getFQDN());
-        return config != null ? config.getmMOTree() : null;
-    }
-
-    public HomeSP getHomeSP(String fqdn) {
-        PasspointConfig passpointConfig = mPasspointConfigs.get(fqdn);
-        return passpointConfig != null ? passpointConfig.getHomeSP() : null;
-    }
-
-    public HomeSP getCurrentSP() {
-        PasspointConfig passpointConfig = getActivePasspointConfig();
-        return passpointConfig != null ? passpointConfig.getHomeSP() : null;
-    }
-
-    private PasspointConfig getActivePasspointConfig() {
-        WifiInfo wifiInfo = getConnectionInfo();
-        if (wifiInfo == null) {
-            return null;
-        }
-
-        for (PasspointConfig passpointConfig : mPasspointConfigs.values()) {
-            if (passpointConfig.getWifiConfiguration().networkId == wifiInfo.getNetworkId()) {
-                return passpointConfig;
-            }
-        }
-        return null;
-    }
-
-    private int addSP(String xml) throws IOException, SAXException {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        // TODO(b/32883320): use the new API for adding Passpoint configuration.
-        return 0;
-    }
-
-    private int modifySP(HomeSP homeSP, Collection<MOData> mods) throws IOException {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        List<PasspointManagementObjectDefinition> defMods = new ArrayList<>(mods.size());
-        for (MOData mod : mods) {
-            defMods.add(new PasspointManagementObjectDefinition(mod.getBaseURI(),
-                    mod.getURN(), mod.getMOTree().toXml()));
-        }
-        // TODO(b/32883320): use the new API to update Passpoint configuration.
-        return 0;
-    }
-
-    private void reconnect(Network osuNetwork, int newNwkId) {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        if (osuNetwork != null) {
-            wifiManager.disableNetwork(osuNetwork.netId);
-        }
-        if (newNwkId != WifiConfiguration.INVALID_NETWORK_ID) {
-            wifiManager.enableNetwork(newNwkId, true);
-        }
-    }
-
-    public void deleteNetwork(int id) {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        wifiManager.disableNetwork(id);
-        wifiManager.forget(id, null);
-    }
-
-    public WifiInfo getConnectionInfo() {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        return wifiManager.getConnectionInfo();
-    }
-
-    public Network getCurrentNetwork() {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        return wifiManager.getCurrentNetwork();
-    }
-
-    public WifiConfiguration getActiveWifiConfig() {
-        WifiInfo wifiInfo = getConnectionInfo();
-        if (wifiInfo == null) {
-            return null;
-        }
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        List<WifiConfiguration> configs = wifiManager.getConfiguredNetworks();
-        if (configs == null) {
-            return null;
-        }
-        for (WifiConfiguration config : configs) {
-            if (config.networkId == wifiInfo.getNetworkId()) {
-                return config;
-            }
-        }
-        return null;
-    }
-
-    private static class PasspointConfig {
-        private final WifiConfiguration mWifiConfiguration;
-        private final MOTree mMOTree;
-        private final HomeSP mHomeSP;
-
-        private PasspointConfig(WifiConfiguration config) throws IOException, SAXException {
-            mWifiConfiguration = config;
-            OMAParser omaParser = new OMAParser();
-            mMOTree = omaParser.parse(config.getMoTree(), OMAConstants.PPS_URN);
-            List<HomeSP> spList = MOManager.buildSPs(mMOTree);
-            if (spList.size() != 1) {
-                throw new OMAException("Expected exactly one HomeSP, got " + spList.size());
-            }
-            mHomeSP = spList.iterator().next();
-        }
-
-        public WifiConfiguration getWifiConfiguration() {
-            return mWifiConfiguration;
-        }
-
-        public HomeSP getHomeSP() {
-            return mHomeSP;
-        }
-
-        public MOTree getmMOTree() {
-            return mMOTree;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/MOManager.java b/packages/Osu/src/com/android/hotspot2/omadm/MOManager.java
deleted file mode 100644
index 8a1eef4..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/MOManager.java
+++ /dev/null
@@ -1,1037 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import android.util.Base64;
-import android.util.Log;
-
-import com.android.anqp.eap.EAP;
-import com.android.anqp.eap.EAPMethod;
-import com.android.anqp.eap.ExpandedEAPMethod;
-import com.android.anqp.eap.InnerAuthEAP;
-import com.android.anqp.eap.NonEAPInnerAuth;
-import com.android.hotspot2.IMSIParameter;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.osu.OSUManager;
-import com.android.hotspot2.osu.commands.MOData;
-import com.android.hotspot2.pps.Credential;
-import com.android.hotspot2.pps.HomeSP;
-import com.android.hotspot2.pps.Policy;
-import com.android.hotspot2.pps.SubscriptionParameters;
-import com.android.hotspot2.pps.UpdateInfo;
-
-import org.xml.sax.SAXException;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TimeZone;
-
-/**
- * Handles provisioning of PerProviderSubscription data.
- */
-public class MOManager {
-
-    public static final String TAG_AAAServerTrustRoot = "AAAServerTrustRoot";
-    public static final String TAG_AbleToShare = "AbleToShare";
-    public static final String TAG_CertificateType = "CertificateType";
-    public static final String TAG_CertSHA256Fingerprint = "CertSHA256Fingerprint";
-    public static final String TAG_CertURL = "CertURL";
-    public static final String TAG_CheckAAAServerCertStatus = "CheckAAAServerCertStatus";
-    public static final String TAG_Country = "Country";
-    public static final String TAG_CreationDate = "CreationDate";
-    public static final String TAG_Credential = "Credential";
-    public static final String TAG_CredentialPriority = "CredentialPriority";
-    public static final String TAG_DataLimit = "DataLimit";
-    public static final String TAG_DigitalCertificate = "DigitalCertificate";
-    public static final String TAG_DLBandwidth = "DLBandwidth";
-    public static final String TAG_EAPMethod = "EAPMethod";
-    public static final String TAG_EAPType = "EAPType";
-    public static final String TAG_ExpirationDate = "ExpirationDate";
-    public static final String TAG_Extension = "Extension";
-    public static final String TAG_FQDN = "FQDN";
-    public static final String TAG_FQDN_Match = "FQDN_Match";
-    public static final String TAG_FriendlyName = "FriendlyName";
-    public static final String TAG_HESSID = "HESSID";
-    public static final String TAG_HomeOI = "HomeOI";
-    public static final String TAG_HomeOIList = "HomeOIList";
-    public static final String TAG_HomeOIRequired = "HomeOIRequired";
-    public static final String TAG_HomeSP = "HomeSP";
-    public static final String TAG_IconURL = "IconURL";
-    public static final String TAG_IMSI = "IMSI";
-    public static final String TAG_InnerEAPType = "InnerEAPType";
-    public static final String TAG_InnerMethod = "InnerMethod";
-    public static final String TAG_InnerVendorID = "InnerVendorID";
-    public static final String TAG_InnerVendorType = "InnerVendorType";
-    public static final String TAG_IPProtocol = "IPProtocol";
-    public static final String TAG_MachineManaged = "MachineManaged";
-    public static final String TAG_MaximumBSSLoadValue = "MaximumBSSLoadValue";
-    public static final String TAG_MinBackhaulThreshold = "MinBackhaulThreshold";
-    public static final String TAG_NetworkID = "NetworkID";
-    public static final String TAG_NetworkType = "NetworkType";
-    public static final String TAG_Other = "Other";
-    public static final String TAG_OtherHomePartners = "OtherHomePartners";
-    public static final String TAG_Password = "Password";
-    public static final String TAG_PerProviderSubscription = "PerProviderSubscription";
-    public static final String TAG_Policy = "Policy";
-    public static final String TAG_PolicyUpdate = "PolicyUpdate";
-    public static final String TAG_PortNumber = "PortNumber";
-    public static final String TAG_PreferredRoamingPartnerList = "PreferredRoamingPartnerList";
-    public static final String TAG_Priority = "Priority";
-    public static final String TAG_Realm = "Realm";
-    public static final String TAG_RequiredProtoPortTuple = "RequiredProtoPortTuple";
-    public static final String TAG_Restriction = "Restriction";
-    public static final String TAG_RoamingConsortiumOI = "RoamingConsortiumOI";
-    public static final String TAG_SIM = "SIM";
-    public static final String TAG_SoftTokenApp = "SoftTokenApp";
-    public static final String TAG_SPExclusionList = "SPExclusionList";
-    public static final String TAG_SSID = "SSID";
-    public static final String TAG_StartDate = "StartDate";
-    public static final String TAG_SubscriptionParameters = "SubscriptionParameters";
-    public static final String TAG_SubscriptionUpdate = "SubscriptionUpdate";
-    public static final String TAG_TimeLimit = "TimeLimit";
-    public static final String TAG_TrustRoot = "TrustRoot";
-    public static final String TAG_TypeOfSubscription = "TypeOfSubscription";
-    public static final String TAG_ULBandwidth = "ULBandwidth";
-    public static final String TAG_UpdateIdentifier = "UpdateIdentifier";
-    public static final String TAG_UpdateInterval = "UpdateInterval";
-    public static final String TAG_UpdateMethod = "UpdateMethod";
-    public static final String TAG_URI = "URI";
-    public static final String TAG_UsageLimits = "UsageLimits";
-    public static final String TAG_UsageTimePeriod = "UsageTimePeriod";
-    public static final String TAG_Username = "Username";
-    public static final String TAG_UsernamePassword = "UsernamePassword";
-    public static final String TAG_VendorId = "VendorId";
-    public static final String TAG_VendorType = "VendorType";
-
-    public static final long IntervalFactor = 60000L;  // All MO intervals are in minutes
-
-    private static final DateFormat DTFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
-
-    private static final Map<String, Map<String, Object>> sSelectionMap;
-
-    static {
-        DTFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
-
-        sSelectionMap = new HashMap<>();
-
-        setSelections(TAG_FQDN_Match,
-                "exactmatch", Boolean.FALSE,
-                "includesubdomains", Boolean.TRUE);
-        setSelections(TAG_UpdateMethod,
-                "oma-dm-clientinitiated", Boolean.FALSE,
-                "spp-clientinitiated", Boolean.TRUE);
-        setSelections(TAG_Restriction,
-                "homesp", UpdateInfo.UpdateRestriction.HomeSP,
-                "roamingpartner", UpdateInfo.UpdateRestriction.RoamingPartner,
-                "unrestricted", UpdateInfo.UpdateRestriction.Unrestricted);
-    }
-
-    private static void setSelections(String key, Object... pairs) {
-        Map<String, Object> kvp = new HashMap<>();
-        sSelectionMap.put(key, kvp);
-        for (int n = 0; n < pairs.length; n += 2) {
-            kvp.put(pairs[n].toString(), pairs[n + 1]);
-        }
-    }
-
-    private final File mPpsFile;
-    private final boolean mEnabled;
-    private final Map<String, HomeSP> mSPs;
-
-    public MOManager(File ppsFile, boolean hs2enabled) {
-        mPpsFile = ppsFile;
-        mEnabled = hs2enabled;
-        mSPs = new HashMap<>();
-    }
-
-    public File getPpsFile() {
-        return mPpsFile;
-    }
-
-    public boolean isEnabled() {
-        return mEnabled;
-    }
-
-    public boolean isConfigured() {
-        return mEnabled && !mSPs.isEmpty();
-    }
-
-    public Map<String, HomeSP> getLoadedSPs() {
-        return Collections.unmodifiableMap(mSPs);
-    }
-
-    public List<HomeSP> loadAllSPs() throws IOException {
-
-        if (!mEnabled || !mPpsFile.exists()) {
-            return Collections.emptyList();
-        }
-
-        try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mPpsFile))) {
-            MOTree moTree = MOTree.unmarshal(in);
-            mSPs.clear();
-            if (moTree == null) {
-                return Collections.emptyList();     // Empty file
-            }
-
-            List<HomeSP> sps = buildSPs(moTree);
-            if (sps != null) {
-                for (HomeSP sp : sps) {
-                    if (mSPs.put(sp.getFQDN(), sp) != null) {
-                        throw new OMAException("Multiple SPs for FQDN '" + sp.getFQDN() + "'");
-                    } else {
-                        Log.d(OSUManager.TAG, "retrieved " + sp.getFQDN() + " from PPS");
-                    }
-                }
-                return sps;
-
-            } else {
-                throw new OMAException("Failed to build HomeSP");
-            }
-        }
-    }
-
-    public static HomeSP buildSP(String xml) throws IOException, SAXException {
-        OMAParser omaParser = new OMAParser();
-        MOTree tree = omaParser.parse(xml, OMAConstants.PPS_URN);
-        List<HomeSP> spList = buildSPs(tree);
-        if (spList.size() != 1) {
-            throw new OMAException("Expected exactly one HomeSP, got " + spList.size());
-        }
-        return spList.iterator().next();
-    }
-
-    public HomeSP addSP(String xml, OSUManager osuManager) throws IOException, SAXException {
-        OMAParser omaParser = new OMAParser();
-        return addSP(omaParser.parse(xml, OMAConstants.PPS_URN));
-    }
-
-    private static final List<String> FQDNPath = Arrays.asList(TAG_HomeSP, TAG_FQDN);
-
-    /**
-     * R1 *only* addSP method.
-     *
-     * @param homeSP
-     * @throws IOException
-     */
-    public void addSP(HomeSP homeSP) throws IOException {
-        if (!mEnabled) {
-            throw new IOException("HS2.0 not enabled on this device");
-        }
-        if (mSPs.containsKey(homeSP.getFQDN())) {
-            Log.d(OSUManager.TAG, "HS20 profile for " +
-                    homeSP.getFQDN() + " already exists");
-            return;
-        }
-        Log.d(OSUManager.TAG, "Adding new HS20 profile for " + homeSP.getFQDN());
-
-        OMAConstructed dummyRoot = new OMAConstructed(null, TAG_PerProviderSubscription, null);
-        buildHomeSPTree(homeSP, dummyRoot, mSPs.size() + 1);
-        try {
-            addSP(dummyRoot);
-        } catch (FileNotFoundException fnfe) {
-            MOTree tree =
-                    MOTree.buildMgmtTree(OMAConstants.PPS_URN, OMAConstants.OMAVersion, dummyRoot);
-            // No file to load a pre-build MO tree from, create a new one and save it.
-            //MOTree tree = new MOTree(OMAConstants.PPS_URN, OMAConstants.OMAVersion, dummyRoot);
-            writeMO(tree, mPpsFile);
-        }
-        mSPs.put(homeSP.getFQDN(), homeSP);
-    }
-
-    public HomeSP addSP(MOTree instanceTree) throws IOException {
-        List<HomeSP> spList = buildSPs(instanceTree);
-        if (spList.size() != 1) {
-            throw new OMAException("Expected exactly one HomeSP, got " + spList.size());
-        }
-
-        HomeSP sp = spList.iterator().next();
-        String fqdn = sp.getFQDN();
-        if (mSPs.put(fqdn, sp) != null) {
-            throw new OMAException("SP " + fqdn + " already exists");
-        }
-
-        OMAConstructed pps = (OMAConstructed) instanceTree.getRoot().
-                getChild(TAG_PerProviderSubscription);
-
-        try {
-            addSP(pps);
-        } catch (FileNotFoundException fnfe) {
-            MOTree tree = new MOTree(instanceTree.getUrn(), instanceTree.getDtdRev(),
-                    instanceTree.getRoot());
-            writeMO(tree, mPpsFile);
-        }
-
-        return sp;
-    }
-
-    /**
-     * Add an SP sub-tree. mo must be PPS with an immediate instance child (e.g. Cred01) and an
-     * optional UpdateIdentifier,
-     *
-     * @param mo The new MO
-     * @throws IOException
-     */
-    private void addSP(OMANode mo) throws IOException {
-        MOTree moTree;
-        try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mPpsFile))) {
-            moTree = MOTree.unmarshal(in);
-            moTree.getRoot().addChild(mo);
-
-                /*
-            OMAConstructed ppsRoot = (OMAConstructed)
-                    moTree.getRoot().addChild(TAG_PerProviderSubscription, "", null, null);
-            for (OMANode child : mo.getChildren()) {
-                ppsRoot.addChild(child);
-                if (!child.isLeaf()) {
-                    moTree.getRoot().addChild(child);
-                }
-                else if (child.getName().equals(TAG_UpdateIdentifier)) {
-                    OMANode currentUD = moTree.getRoot().getChild(TAG_UpdateIdentifier);
-                    if (currentUD != null) {
-                        moTree.getRoot().replaceNode(currentUD, child);
-                    }
-                    else {
-                        moTree.getRoot().addChild(child);
-                    }
-                }
-            }
-                */
-        }
-        writeMO(moTree, mPpsFile);
-    }
-
-    private static OMAConstructed findTargetTree(MOTree moTree, String fqdn) throws OMAException {
-        OMANode pps = moTree.getRoot();
-        for (OMANode node : pps.getChildren()) {
-            OMANode instance = null;
-            if (node.getName().equals(TAG_PerProviderSubscription)) {
-                instance = getInstanceNode((OMAConstructed) node);
-            } else if (!node.isLeaf()) {
-                instance = node;
-            }
-            if (instance != null) {
-                String nodeFqdn = getString(instance.getListValue(FQDNPath.iterator()));
-                if (fqdn.equalsIgnoreCase(nodeFqdn)) {
-                    return (OMAConstructed) node;
-                    // targetTree is rooted at the PPS
-                }
-            }
-        }
-        return null;
-    }
-
-    private static OMAConstructed getInstanceNode(OMAConstructed root) throws OMAException {
-        for (OMANode child : root.getChildren()) {
-            if (!child.isLeaf()) {
-                return (OMAConstructed) child;
-            }
-        }
-        throw new OMAException("Cannot find instance node");
-    }
-
-    public static HomeSP modifySP(HomeSP homeSP, MOTree moTree, Collection<MOData> mods)
-            throws OMAException {
-
-        OMAConstructed ppsTree =
-                (OMAConstructed) moTree.getRoot().getChildren().iterator().next();
-        OMAConstructed instance = getInstanceNode(ppsTree);
-
-        int ppsMods = 0;
-        int updateIdentifier = homeSP.getUpdateIdentifier();
-        for (MOData mod : mods) {
-            LinkedList<String> tailPath =
-                    getTailPath(mod.getBaseURI(), TAG_PerProviderSubscription);
-            OMAConstructed modRoot = mod.getMOTree().getRoot();
-            // modRoot is the MgmtTree with the actual object as a direct child
-            // (e.g. Credential)
-
-            if (tailPath.getFirst().equals(TAG_UpdateIdentifier)) {
-                updateIdentifier = getInteger(modRoot.getChildren().iterator().next());
-                OMANode oldUdi = ppsTree.getChild(TAG_UpdateIdentifier);
-                if (getInteger(oldUdi) != updateIdentifier) {
-                    ppsMods++;
-                }
-                if (oldUdi != null) {
-                    ppsTree.replaceNode(oldUdi, modRoot.getChild(TAG_UpdateIdentifier));
-                } else {
-                    ppsTree.addChild(modRoot.getChild(TAG_UpdateIdentifier));
-                }
-            } else {
-                tailPath.removeFirst();     // Drop the instance
-                OMANode current = instance.getListValue(tailPath.iterator());
-                if (current == null) {
-                    throw new OMAException("No previous node for " + tailPath + " in "
-                            + homeSP.getFQDN());
-                }
-                for (OMANode newNode : modRoot.getChildren()) {
-                    // newNode is something like Credential
-                    // current is the same existing node
-                    OMANode old = current.getParent().replaceNode(current, newNode);
-                    ppsMods++;
-                }
-            }
-        }
-
-        return ppsMods > 0 ? buildHomeSP(instance, updateIdentifier) : null;
-    }
-
-    public HomeSP modifySP(HomeSP homeSP, Collection<MOData> mods)
-            throws IOException {
-
-        Log.d(OSUManager.TAG, "modifying SP: " + mods);
-        MOTree moTree;
-        int ppsMods = 0;
-        int updateIdentifier = 0;
-        try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mPpsFile))) {
-            moTree = MOTree.unmarshal(in);
-            // moTree is PPS/?/provider-data
-
-            OMAConstructed targetTree = findTargetTree(moTree, homeSP.getFQDN());
-            if (targetTree == null) {
-                throw new IOException("Failed to find PPS tree for " + homeSP.getFQDN());
-            }
-            OMAConstructed instance = getInstanceNode(targetTree);
-
-            for (MOData mod : mods) {
-                LinkedList<String> tailPath =
-                        getTailPath(mod.getBaseURI(), TAG_PerProviderSubscription);
-                OMAConstructed modRoot = mod.getMOTree().getRoot();
-                // modRoot is the MgmtTree with the actual object as a direct child
-                // (e.g. Credential)
-
-                if (tailPath.getFirst().equals(TAG_UpdateIdentifier)) {
-                    updateIdentifier = getInteger(modRoot.getChildren().iterator().next());
-                    OMANode oldUdi = targetTree.getChild(TAG_UpdateIdentifier);
-                    if (getInteger(oldUdi) != updateIdentifier) {
-                        ppsMods++;
-                    }
-                    if (oldUdi != null) {
-                        targetTree.replaceNode(oldUdi, modRoot.getChild(TAG_UpdateIdentifier));
-                    } else {
-                        targetTree.addChild(modRoot.getChild(TAG_UpdateIdentifier));
-                    }
-                } else {
-                    tailPath.removeFirst();     // Drop the instance
-                    OMANode current = instance.getListValue(tailPath.iterator());
-                    if (current == null) {
-                        throw new IOException("No previous node for " + tailPath + " in " +
-                                homeSP.getFQDN());
-                    }
-                    for (OMANode newNode : modRoot.getChildren()) {
-                        // newNode is something like Credential
-                        // current is the same existing node
-                        OMANode old = current.getParent().replaceNode(current, newNode);
-                        ppsMods++;
-                    }
-                }
-            }
-        }
-        writeMO(moTree, mPpsFile);
-
-        if (ppsMods == 0) {
-            return null;    // HomeSP not modified.
-        }
-
-        // Return a new rebuilt HomeSP
-        List<HomeSP> sps = buildSPs(moTree);
-        if (sps != null) {
-            for (HomeSP sp : sps) {
-                if (sp.getFQDN().equals(homeSP.getFQDN())) {
-                    return sp;
-                }
-            }
-        } else {
-            throw new OMAException("Failed to build HomeSP");
-        }
-        return null;
-    }
-
-    private static LinkedList<String> getTailPath(String pathString, String rootName)
-            throws OMAException {
-        String[] path = pathString.split("/");
-        int pathIndex;
-        for (pathIndex = 0; pathIndex < path.length; pathIndex++) {
-            if (path[pathIndex].equalsIgnoreCase(rootName)) {
-                pathIndex++;
-                break;
-            }
-        }
-        if (pathIndex >= path.length) {
-            throw new OMAException("Bad node-path: " + pathString);
-        }
-        LinkedList<String> tailPath = new LinkedList<>();
-        while (pathIndex < path.length) {
-            tailPath.add(path[pathIndex]);
-            pathIndex++;
-        }
-        return tailPath;
-    }
-
-    public HomeSP getHomeSP(String fqdn) {
-        return mSPs.get(fqdn);
-    }
-
-    public void removeSP(String fqdn) throws IOException {
-        if (mSPs.remove(fqdn) == null) {
-            Log.d(OSUManager.TAG, "No HS20 profile to delete for " + fqdn);
-            return;
-        }
-
-        Log.d(OSUManager.TAG, "Deleting HS20 profile for " + fqdn);
-
-        MOTree moTree;
-        try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mPpsFile))) {
-            moTree = MOTree.unmarshal(in);
-            OMAConstructed tbd = findTargetTree(moTree, fqdn);
-            if (tbd == null) {
-                throw new IOException("Node " + fqdn + " doesn't exist in MO tree");
-            }
-            OMAConstructed pps = moTree.getRoot();
-            OMANode removed = pps.removeNode("?", tbd);
-            if (removed == null) {
-                throw new IOException("Failed to remove " + fqdn + " out of MO tree");
-            }
-        }
-        writeMO(moTree, mPpsFile);
-    }
-
-    public MOTree getMOTree(HomeSP homeSP) throws IOException {
-        try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mPpsFile))) {
-            MOTree moTree = MOTree.unmarshal(in);
-            OMAConstructed target = findTargetTree(moTree, homeSP.getFQDN());
-            if (target == null) {
-                throw new IOException("Can't find " + homeSP.getFQDN() + " in MO tree");
-            }
-            return MOTree.buildMgmtTree(OMAConstants.PPS_URN, OMAConstants.OMAVersion, target);
-        }
-    }
-
-    private static void writeMO(MOTree moTree, File f) throws IOException {
-        try (BufferedOutputStream out =
-                     new BufferedOutputStream(new FileOutputStream(f, false))) {
-            moTree.marshal(out);
-            out.flush();
-        }
-    }
-
-    private static String fqdnList(Collection<HomeSP> sps) {
-        StringBuilder sb = new StringBuilder();
-        boolean first = true;
-        for (HomeSP sp : sps) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(", ");
-            }
-            sb.append(sp.getFQDN());
-        }
-        return sb.toString();
-    }
-
-    private static OMANode buildHomeSPTree(HomeSP homeSP, OMAConstructed root, int instanceID)
-            throws IOException {
-        OMANode providerSubNode = root.addChild(getInstanceString(instanceID),
-                null, null, null);
-
-        // The HomeSP:
-        OMANode homeSpNode = providerSubNode.addChild(TAG_HomeSP, null, null, null);
-        if (!homeSP.getSSIDs().isEmpty()) {
-            OMAConstructed nwkIDNode =
-                    (OMAConstructed) homeSpNode.addChild(TAG_NetworkID, null, null, null);
-            int instance = 0;
-            for (Map.Entry<String, Long> entry : homeSP.getSSIDs().entrySet()) {
-                OMAConstructed inode =
-                        (OMAConstructed) nwkIDNode
-                                .addChild(getInstanceString(instance++), null, null, null);
-                inode.addChild(TAG_SSID, null, entry.getKey(), null);
-                if (entry.getValue() != null) {
-                    inode.addChild(TAG_HESSID, null,
-                            String.format("%012x", entry.getValue()), null);
-                }
-            }
-        }
-
-        homeSpNode.addChild(TAG_FriendlyName, null, homeSP.getFriendlyName(), null);
-
-        if (homeSP.getIconURL() != null) {
-            homeSpNode.addChild(TAG_IconURL, null, homeSP.getIconURL(), null);
-        }
-
-        homeSpNode.addChild(TAG_FQDN, null, homeSP.getFQDN(), null);
-
-        if (!homeSP.getMatchAllOIs().isEmpty() || !homeSP.getMatchAnyOIs().isEmpty()) {
-            OMAConstructed homeOIList =
-                    (OMAConstructed) homeSpNode.addChild(TAG_HomeOIList, null, null, null);
-
-            int instance = 0;
-            for (Long oi : homeSP.getMatchAllOIs()) {
-                OMAConstructed inode =
-                        (OMAConstructed) homeOIList.addChild(getInstanceString(instance++),
-                                null, null, null);
-                inode.addChild(TAG_HomeOI, null, String.format("%x", oi), null);
-                inode.addChild(TAG_HomeOIRequired, null, "TRUE", null);
-            }
-            for (Long oi : homeSP.getMatchAnyOIs()) {
-                OMAConstructed inode =
-                        (OMAConstructed) homeOIList.addChild(getInstanceString(instance++),
-                                null, null, null);
-                inode.addChild(TAG_HomeOI, null, String.format("%x", oi), null);
-                inode.addChild(TAG_HomeOIRequired, null, "FALSE", null);
-            }
-        }
-
-        if (!homeSP.getOtherHomePartners().isEmpty()) {
-            OMAConstructed otherPartners =
-                    (OMAConstructed) homeSpNode.addChild(TAG_OtherHomePartners, null, null, null);
-            int instance = 0;
-            for (String fqdn : homeSP.getOtherHomePartners()) {
-                OMAConstructed inode =
-                        (OMAConstructed) otherPartners.addChild(getInstanceString(instance++),
-                                null, null, null);
-                inode.addChild(TAG_FQDN, null, fqdn, null);
-            }
-        }
-
-        if (!homeSP.getRoamingConsortiums().isEmpty()) {
-            homeSpNode.addChild(TAG_RoamingConsortiumOI, null,
-                    getRCList(homeSP.getRoamingConsortiums()), null);
-        }
-
-        // The Credential:
-        OMANode credentialNode = providerSubNode.addChild(TAG_Credential, null, null, null);
-        Credential cred = homeSP.getCredential();
-        EAPMethod method = cred.getEAPMethod();
-
-        if (cred.getCtime() > 0) {
-            credentialNode.addChild(TAG_CreationDate,
-                    null, DTFormat.format(new Date(cred.getCtime())), null);
-        }
-        if (cred.getExpTime() > 0) {
-            credentialNode.addChild(TAG_ExpirationDate,
-                    null, DTFormat.format(new Date(cred.getExpTime())), null);
-        }
-
-        if (method.getEAPMethodID() == EAP.EAPMethodID.EAP_SIM
-                || method.getEAPMethodID() == EAP.EAPMethodID.EAP_AKA
-                || method.getEAPMethodID() == EAP.EAPMethodID.EAP_AKAPrim) {
-
-            OMANode simNode = credentialNode.addChild(TAG_SIM, null, null, null);
-            simNode.addChild(TAG_IMSI, null, cred.getImsi().toString(), null);
-            simNode.addChild(TAG_EAPType, null,
-                    Integer.toString(EAP.mapEAPMethod(method.getEAPMethodID())), null);
-
-        } else if (method.getEAPMethodID() == EAP.EAPMethodID.EAP_TTLS) {
-
-            OMANode unpNode = credentialNode.addChild(TAG_UsernamePassword, null, null, null);
-            unpNode.addChild(TAG_Username, null, cred.getUserName(), null);
-            unpNode.addChild(TAG_Password, null,
-                    Base64.encodeToString(cred.getPassword().getBytes(StandardCharsets.UTF_8),
-                            Base64.DEFAULT), null);
-            OMANode eapNode = unpNode.addChild(TAG_EAPMethod, null, null, null);
-            eapNode.addChild(TAG_EAPType, null,
-                    Integer.toString(EAP.mapEAPMethod(method.getEAPMethodID())), null);
-            eapNode.addChild(TAG_InnerMethod, null,
-                    ((NonEAPInnerAuth) method.getAuthParam()).getOMAtype(), null);
-
-        } else if (method.getEAPMethodID() == EAP.EAPMethodID.EAP_TLS) {
-
-            OMANode certNode = credentialNode.addChild(TAG_DigitalCertificate, null, null, null);
-            certNode.addChild(TAG_CertificateType, null, Credential.CertTypeX509, null);
-            certNode.addChild(TAG_CertSHA256Fingerprint, null,
-                    Utils.toHex(cred.getFingerPrint()), null);
-
-        } else {
-            throw new OMAException("Invalid credential on " + homeSP.getFQDN());
-        }
-
-        credentialNode.addChild(TAG_Realm, null, cred.getRealm(), null);
-
-        // !!! Note: This node defines CRL checking through OSCP, I suspect we won't be able
-        // to do that so it is commented out:
-        //credentialNode.addChild(TAG_CheckAAAServerCertStatus, null, "TRUE", null);
-        return providerSubNode;
-    }
-
-    private static String getInstanceString(int instance) {
-        return "r1i" + instance;
-    }
-
-    private static String getRCList(Collection<Long> rcs) {
-        StringBuilder builder = new StringBuilder();
-        boolean first = true;
-        for (Long roamingConsortium : rcs) {
-            if (first) {
-                first = false;
-            } else {
-                builder.append(',');
-            }
-            builder.append(String.format("%x", roamingConsortium));
-        }
-        return builder.toString();
-    }
-
-    public static List<HomeSP> buildSPs(MOTree moTree) throws OMAException {
-        OMAConstructed spList;
-        List<HomeSP> homeSPs = new ArrayList<>();
-        if (moTree.getRoot().getName().equals(TAG_PerProviderSubscription)) {
-            // The old PPS file was rooted at PPS instead of MgmtTree to conserve space
-            spList = moTree.getRoot();
-
-            if (spList == null) {
-                return homeSPs;
-            }
-
-            for (OMANode node : spList.getChildren()) {
-                if (!node.isLeaf()) {
-                    homeSPs.add(buildHomeSP(node, 0));
-                }
-            }
-        } else {
-            for (OMANode ppsRoot : moTree.getRoot().getChildren()) {
-                if (ppsRoot.getName().equals(TAG_PerProviderSubscription)) {
-                    Integer updateIdentifier = null;
-                    OMANode instance = null;
-                    for (OMANode child : ppsRoot.getChildren()) {
-                        if (child.getName().equals(TAG_UpdateIdentifier)) {
-                            updateIdentifier = getInteger(child);
-                        } else if (!child.isLeaf()) {
-                            instance = child;
-                        }
-                    }
-                    if (instance == null) {
-                        throw new OMAException("PPS node missing instance node");
-                    }
-                    homeSPs.add(buildHomeSP(instance,
-                            updateIdentifier != null ? updateIdentifier : 0));
-                }
-            }
-        }
-
-        return homeSPs;
-    }
-
-    private static HomeSP buildHomeSP(OMANode ppsRoot, int updateIdentifier) throws OMAException {
-        OMANode spRoot = ppsRoot.getChild(TAG_HomeSP);
-
-        String fqdn = spRoot.getScalarValue(Arrays.asList(TAG_FQDN).iterator());
-        String friendlyName = spRoot.getScalarValue(Arrays.asList(TAG_FriendlyName).iterator());
-        String iconURL = spRoot.getScalarValue(Arrays.asList(TAG_IconURL).iterator());
-
-        HashSet<Long> roamingConsortiums = new HashSet<>();
-        String oiString = spRoot.getScalarValue(Arrays.asList(TAG_RoamingConsortiumOI).iterator());
-        if (oiString != null) {
-            for (String oi : oiString.split(",")) {
-                roamingConsortiums.add(Long.parseLong(oi.trim(), 16));
-            }
-        }
-
-        Map<String, Long> ssids = new HashMap<>();
-
-        OMANode ssidListNode = spRoot.getListValue(Arrays.asList(TAG_NetworkID).iterator());
-        if (ssidListNode != null) {
-            for (OMANode ssidRoot : ssidListNode.getChildren()) {
-                OMANode hessidNode = ssidRoot.getChild(TAG_HESSID);
-                ssids.put(ssidRoot.getChild(TAG_SSID).getValue(), getMac(hessidNode));
-            }
-        }
-
-        Set<Long> matchAnyOIs = new HashSet<>();
-        List<Long> matchAllOIs = new ArrayList<>();
-        OMANode homeOIListNode = spRoot.getListValue(Arrays.asList(TAG_HomeOIList).iterator());
-        if (homeOIListNode != null) {
-            for (OMANode homeOIRoot : homeOIListNode.getChildren()) {
-                String homeOI = homeOIRoot.getChild(TAG_HomeOI).getValue();
-                if (Boolean.parseBoolean(homeOIRoot.getChild(TAG_HomeOIRequired).getValue())) {
-                    matchAllOIs.add(Long.parseLong(homeOI, 16));
-                } else {
-                    matchAnyOIs.add(Long.parseLong(homeOI, 16));
-                }
-            }
-        }
-
-        Set<String> otherHomePartners = new HashSet<>();
-        OMANode otherListNode =
-                spRoot.getListValue(Arrays.asList(TAG_OtherHomePartners).iterator());
-        if (otherListNode != null) {
-            for (OMANode fqdnNode : otherListNode.getChildren()) {
-                otherHomePartners.add(fqdnNode.getChild(TAG_FQDN).getValue());
-            }
-        }
-
-        Credential credential = buildCredential(ppsRoot.getChild(TAG_Credential));
-
-        OMANode policyNode = ppsRoot.getChild(TAG_Policy);
-        Policy policy = policyNode != null ? new Policy(policyNode) : null;
-
-        Map<String, String> aaaTrustRoots;
-        OMANode aaaRootNode = ppsRoot.getChild(TAG_AAAServerTrustRoot);
-        if (aaaRootNode == null) {
-            aaaTrustRoots = null;
-        } else {
-            aaaTrustRoots = new HashMap<>(aaaRootNode.getChildren().size());
-            for (OMANode child : aaaRootNode.getChildren()) {
-                aaaTrustRoots.put(getString(child, TAG_CertURL),
-                        getString(child, TAG_CertSHA256Fingerprint));
-            }
-        }
-
-        OMANode updateNode = ppsRoot.getChild(TAG_SubscriptionUpdate);
-        UpdateInfo subscriptionUpdate = updateNode != null ? new UpdateInfo(updateNode) : null;
-        OMANode subNode = ppsRoot.getChild(TAG_SubscriptionParameters);
-        SubscriptionParameters subscriptionParameters = subNode != null ?
-                new SubscriptionParameters(subNode) : null;
-
-        return new HomeSP(ssids, fqdn, roamingConsortiums, otherHomePartners,
-                matchAnyOIs, matchAllOIs, friendlyName, iconURL, credential,
-                policy, getInteger(ppsRoot.getChild(TAG_CredentialPriority), 0),
-                aaaTrustRoots, subscriptionUpdate, subscriptionParameters, updateIdentifier);
-    }
-
-    private static Credential buildCredential(OMANode credNode) throws OMAException {
-        long ctime = getTime(credNode.getChild(TAG_CreationDate));
-        long expTime = getTime(credNode.getChild(TAG_ExpirationDate));
-        String realm = getString(credNode.getChild(TAG_Realm));
-        boolean checkAAACert = getBoolean(credNode.getChild(TAG_CheckAAAServerCertStatus));
-
-        OMANode unNode = credNode.getChild(TAG_UsernamePassword);
-        OMANode certNode = credNode.getChild(TAG_DigitalCertificate);
-        OMANode simNode = credNode.getChild(TAG_SIM);
-
-        int alternatives = 0;
-        alternatives += unNode != null ? 1 : 0;
-        alternatives += certNode != null ? 1 : 0;
-        alternatives += simNode != null ? 1 : 0;
-        if (alternatives != 1) {
-            throw new OMAException("Expected exactly one credential type, got " + alternatives);
-        }
-
-        if (unNode != null) {
-            String userName = getString(unNode.getChild(TAG_Username));
-            String password = getString(unNode.getChild(TAG_Password));
-            boolean machineManaged = getBoolean(unNode.getChild(TAG_MachineManaged));
-            String softTokenApp = getString(unNode.getChild(TAG_SoftTokenApp));
-            boolean ableToShare = getBoolean(unNode.getChild(TAG_AbleToShare));
-
-            OMANode eapMethodNode = unNode.getChild(TAG_EAPMethod);
-            int eapID = getInteger(eapMethodNode.getChild(TAG_EAPType));
-
-            EAP.EAPMethodID eapMethodID = EAP.mapEAPMethod(eapID);
-            if (eapMethodID == null) {
-                throw new OMAException("Unknown EAP method: " + eapID);
-            }
-
-            Long vid = getOptionalInteger(eapMethodNode.getChild(TAG_VendorId));
-            Long vtype = getOptionalInteger(eapMethodNode.getChild(TAG_VendorType));
-            Long innerEAPType = getOptionalInteger(eapMethodNode.getChild(TAG_InnerEAPType));
-            EAP.EAPMethodID innerEAPMethod = null;
-            if (innerEAPType != null) {
-                innerEAPMethod = EAP.mapEAPMethod(innerEAPType.intValue());
-                if (innerEAPMethod == null) {
-                    throw new OMAException("Bad inner EAP method: " + innerEAPType);
-                }
-            }
-
-            Long innerVid = getOptionalInteger(eapMethodNode.getChild(TAG_InnerVendorID));
-            Long innerVtype = getOptionalInteger(eapMethodNode.getChild(TAG_InnerVendorType));
-            String innerNonEAPMethod = getString(eapMethodNode.getChild(TAG_InnerMethod));
-
-            EAPMethod eapMethod;
-            if (innerEAPMethod != null) {
-                eapMethod = new EAPMethod(eapMethodID, new InnerAuthEAP(innerEAPMethod));
-            } else if (vid != null) {
-                eapMethod = new EAPMethod(eapMethodID,
-                        new ExpandedEAPMethod(EAP.AuthInfoID.ExpandedEAPMethod,
-                                vid.intValue(), vtype));
-            } else if (innerVid != null) {
-                eapMethod =
-                        new EAPMethod(eapMethodID, new ExpandedEAPMethod(EAP.AuthInfoID
-                                .ExpandedInnerEAPMethod, innerVid.intValue(), innerVtype));
-            } else if (innerNonEAPMethod != null) {
-                eapMethod = new EAPMethod(eapMethodID, new NonEAPInnerAuth(innerNonEAPMethod));
-            } else {
-                throw new OMAException("Incomplete set of EAP parameters");
-            }
-
-            return new Credential(ctime, expTime, realm, checkAAACert, eapMethod, userName,
-                    password, machineManaged, softTokenApp, ableToShare);
-        }
-        if (certNode != null) {
-            try {
-                String certTypeString = getString(certNode.getChild(TAG_CertificateType));
-                byte[] fingerPrint = getOctets(certNode.getChild(TAG_CertSHA256Fingerprint));
-
-                EAPMethod eapMethod = new EAPMethod(EAP.EAPMethodID.EAP_TLS, null);
-
-                return new Credential(ctime, expTime, realm, checkAAACert, eapMethod,
-                        Credential.mapCertType(certTypeString), fingerPrint);
-            } catch (NumberFormatException nfe) {
-                throw new OMAException("Bad hex string: " + nfe.toString());
-            }
-        }
-        if (simNode != null) {
-            try {
-                IMSIParameter imsi = new IMSIParameter(getString(simNode.getChild(TAG_IMSI)));
-
-                EAPMethod eapMethod =
-                        new EAPMethod(EAP.mapEAPMethod(getInteger(simNode.getChild(TAG_EAPType))),
-                                null);
-
-                return new Credential(ctime, expTime, realm, checkAAACert, eapMethod, imsi);
-            } catch (IOException ioe) {
-                throw new OMAException("Failed to parse IMSI: " + ioe);
-            }
-        }
-        throw new OMAException("Missing credential parameters");
-    }
-
-    public static OMANode getChild(OMANode node, String key) throws OMAException {
-        OMANode child = node.getChild(key);
-        if (child == null) {
-            throw new OMAException("No such node: " + key);
-        }
-        return child;
-    }
-
-    public static String getString(OMANode node, String key) throws OMAException {
-        OMANode child = node.getChild(key);
-        if (child == null) {
-            throw new OMAException("Missing value for " + key);
-        } else if (!child.isLeaf()) {
-            throw new OMAException(key + " is not a leaf node");
-        }
-        return child.getValue();
-    }
-
-    public static long getLong(OMANode node, String key, Long dflt) throws OMAException {
-        OMANode child = node.getChild(key);
-        if (child == null) {
-            if (dflt != null) {
-                return dflt;
-            } else {
-                throw new OMAException("Missing value for " + key);
-            }
-        } else {
-            if (!child.isLeaf()) {
-                throw new OMAException(key + " is not a leaf node");
-            }
-            String value = child.getValue();
-            try {
-                long result = Long.parseLong(value);
-                if (result < 0) {
-                    throw new OMAException("Negative value for " + key);
-                }
-                return result;
-            } catch (NumberFormatException nfe) {
-                throw new OMAException("Value for " + key + " is non-numeric: " + value);
-            }
-        }
-    }
-
-    public static <T> T getSelection(OMANode node, String key) throws OMAException {
-        OMANode child = node.getChild(key);
-        if (child == null) {
-            throw new OMAException("Missing value for " + key);
-        } else if (!child.isLeaf()) {
-            throw new OMAException(key + " is not a leaf node");
-        }
-        return getSelection(key, child.getValue());
-    }
-
-    public static <T> T getSelection(String key, String value) throws OMAException {
-        if (value == null) {
-            throw new OMAException("No value for " + key);
-        }
-        Map<String, Object> kvp = sSelectionMap.get(key);
-        T result = (T) kvp.get(value.toLowerCase());
-        if (result == null) {
-            throw new OMAException("Invalid value '" + value + "' for " + key);
-        }
-        return result;
-    }
-
-    private static boolean getBoolean(OMANode boolNode) {
-        return boolNode != null && Boolean.parseBoolean(boolNode.getValue());
-    }
-
-    public static String getString(OMANode stringNode) {
-        return stringNode != null ? stringNode.getValue() : null;
-    }
-
-    private static int getInteger(OMANode intNode, int dflt) throws OMAException {
-        if (intNode == null) {
-            return dflt;
-        }
-        return getInteger(intNode);
-    }
-
-    private static int getInteger(OMANode intNode) throws OMAException {
-        if (intNode == null) {
-            throw new OMAException("Missing integer value");
-        }
-        try {
-            return Integer.parseInt(intNode.getValue());
-        } catch (NumberFormatException nfe) {
-            throw new OMAException("Invalid integer: " + intNode.getValue());
-        }
-    }
-
-    private static Long getMac(OMANode macNode) throws OMAException {
-        if (macNode == null) {
-            return null;
-        }
-        try {
-            return Long.parseLong(macNode.getValue(), 16);
-        } catch (NumberFormatException nfe) {
-            throw new OMAException("Invalid MAC: " + macNode.getValue());
-        }
-    }
-
-    private static Long getOptionalInteger(OMANode intNode) throws OMAException {
-        if (intNode == null) {
-            return null;
-        }
-        try {
-            return Long.parseLong(intNode.getValue());
-        } catch (NumberFormatException nfe) {
-            throw new OMAException("Invalid integer: " + intNode.getValue());
-        }
-    }
-
-    public static long getTime(OMANode timeNode) throws OMAException {
-        if (timeNode == null) {
-            return Utils.UNSET_TIME;
-        }
-        String timeText = timeNode.getValue();
-        try {
-            Date date = DTFormat.parse(timeText);
-            return date.getTime();
-        } catch (ParseException pe) {
-            throw new OMAException("Badly formatted time: " + timeText);
-        }
-    }
-
-    private static byte[] getOctets(OMANode octetNode) throws OMAException {
-        if (octetNode == null) {
-            throw new OMAException("Missing byte value");
-        }
-        return Utils.hexToBytes(octetNode.getValue());
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/MOTree.java b/packages/Osu/src/com/android/hotspot2/omadm/MOTree.java
deleted file mode 100644
index 0c5ce40..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/MOTree.java
+++ /dev/null
@@ -1,269 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class MOTree {
-    public static final String MgmtTreeTag = "MgmtTree";
-
-    public static final String NodeTag = "Node";
-    public static final String NodeNameTag = "NodeName";
-    public static final String PathTag = "Path";
-    public static final String ValueTag = "Value";
-    public static final String RTPropTag = "RTProperties";
-    public static final String TypeTag = "Type";
-    public static final String DDFNameTag = "DDFName";
-
-    private final String mUrn;
-    private final String mDtdRev;
-    private final OMAConstructed mRoot;
-
-    public MOTree(XMLNode node, String urn) throws IOException, SAXException {
-        Iterator<XMLNode> children = node.getChildren().iterator();
-
-        String dtdRev = null;
-
-        while (children.hasNext()) {
-            XMLNode child = children.next();
-            if (child.getTag().equals(OMAConstants.SyncMLVersionTag)) {
-                dtdRev = child.getText();
-                children.remove();
-                break;
-            }
-        }
-
-        mUrn = urn;
-        mDtdRev = dtdRev;
-
-        mRoot = new MgmtTreeRoot(node, dtdRev);
-
-        for (XMLNode child : node.getChildren()) {
-            buildNode(mRoot, child);
-        }
-    }
-
-    public MOTree(String urn, String rev, OMAConstructed root) throws IOException {
-        mUrn = urn;
-        mDtdRev = rev;
-        mRoot = root;
-    }
-
-    public static MOTree buildMgmtTree(String urn, String rev, OMAConstructed root)
-            throws IOException {
-        OMAConstructed realRoot;
-        switch (urn) {
-            case OMAConstants.PPS_URN:
-            case OMAConstants.DevInfoURN:
-            case OMAConstants.DevDetailURN:
-            case OMAConstants.DevDetailXURN:
-                realRoot = new MgmtTreeRoot(OMAConstants.OMAVersion);
-                realRoot.addChild(root);
-                return new MOTree(urn, rev, realRoot);
-            default:
-                return new MOTree(urn, rev, root);
-        }
-    }
-
-    public static boolean hasMgmtTreeTag(String text) {
-        for (int n = 0; n < text.length(); n++) {
-            char ch = text.charAt(n);
-            if (ch > ' ') {
-                return text.regionMatches(true, n, '<' + MgmtTreeTag + '>',
-                        0, MgmtTreeTag.length() + 2);
-            }
-        }
-        return false;
-    }
-
-    private static class NodeData {
-        private final String mName;
-        private String mPath;
-        private String mValue;
-
-        private NodeData(String name) {
-            mName = name;
-        }
-
-        private void setPath(String path) {
-            mPath = path;
-        }
-
-        private void setValue(String value) {
-            mValue = value;
-        }
-
-        public String getName() {
-            return mName;
-        }
-
-        public String getPath() {
-            return mPath;
-        }
-
-        public String getValue() {
-            return mValue;
-        }
-    }
-
-    private static void buildNode(OMANode parent, XMLNode node) throws IOException {
-        if (!node.getTag().equals(NodeTag))
-            throw new IOException("Node is a '" + node.getTag() + "' instead of a 'Node'");
-
-        Map<String, XMLNode> checkMap = new HashMap<>(3);
-        String context = null;
-        List<NodeData> values = new ArrayList<>();
-        List<XMLNode> children = new ArrayList<>();
-
-        NodeData curValue = null;
-
-        for (XMLNode child : node.getChildren()) {
-            XMLNode old = checkMap.put(child.getTag(), child);
-
-            switch (child.getTag()) {
-                case NodeNameTag:
-                    if (curValue != null)
-                        throw new IOException(NodeNameTag + " not expected");
-                    curValue = new NodeData(child.getText());
-
-                    break;
-                case PathTag:
-                    if (curValue == null || curValue.getPath() != null)
-                        throw new IOException(PathTag + " not expected");
-                    curValue.setPath(child.getText());
-
-                    break;
-                case ValueTag:
-                    if (!children.isEmpty())
-                        throw new IOException(ValueTag + " in constructed node");
-                    if (curValue == null || curValue.getValue() != null)
-                        throw new IOException(ValueTag + " not expected");
-                    curValue.setValue(child.getText());
-                    values.add(curValue);
-                    curValue = null;
-
-                    break;
-                case RTPropTag:
-                    if (old != null)
-                        throw new IOException("Duplicate " + RTPropTag);
-                    XMLNode typeNode = getNextNode(child, TypeTag);
-                    XMLNode ddfName = getNextNode(typeNode, DDFNameTag);
-                    context = ddfName.getText();
-                    if (context == null)
-                        throw new IOException("No text in " + DDFNameTag);
-
-                    break;
-                case NodeTag:
-                    if (!values.isEmpty())
-                        throw new IOException("Scalar node " + node.getText() + " has Node child");
-                    children.add(child);
-
-                    break;
-            }
-        }
-
-        if (values.isEmpty()) {
-            if (curValue == null)
-                throw new IOException("Missing name");
-
-            OMANode subNode = parent.addChild(curValue.getName(),
-                    context, null, curValue.getPath());
-
-            for (XMLNode child : children) {
-                buildNode(subNode, child);
-            }
-        } else {
-            if (!children.isEmpty())
-                throw new IOException("Got both sub nodes and value(s)");
-
-            for (NodeData nodeData : values) {
-                parent.addChild(nodeData.getName(), context,
-                        nodeData.getValue(), nodeData.getPath());
-            }
-        }
-    }
-
-    private static XMLNode getNextNode(XMLNode node, String tag) throws IOException {
-        if (node == null)
-            throw new IOException("No node for " + tag);
-        if (node.getChildren().size() != 1)
-            throw new IOException("Expected " + node.getTag() + " to have exactly one child");
-        XMLNode child = node.getChildren().iterator().next();
-        if (!child.getTag().equals(tag))
-            throw new IOException("Expected " + node.getTag() + " to have child '" + tag +
-                    "' instead of '" + child.getTag() + "'");
-        return child;
-    }
-
-    public String getUrn() {
-        return mUrn;
-    }
-
-    public String getDtdRev() {
-        return mDtdRev;
-    }
-
-    public OMAConstructed getRoot() {
-        return mRoot;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("MO Tree v").append(mDtdRev).append(", urn ").append(mUrn).append(")\n");
-        sb.append(mRoot);
-
-        return sb.toString();
-    }
-
-    public void marshal(OutputStream out) throws IOException {
-        out.write("tree ".getBytes(StandardCharsets.UTF_8));
-        OMAConstants.serializeString(mDtdRev, out);
-        out.write(String.format("(%s)\n", mUrn).getBytes(StandardCharsets.UTF_8));
-        mRoot.marshal(out, 0);
-    }
-
-    public static MOTree unmarshal(InputStream in) throws IOException {
-        boolean strip = true;
-        StringBuilder tree = new StringBuilder();
-        for (; ; ) {
-            int octet = in.read();
-            if (octet < 0) {
-                return null;
-            } else if (octet > ' ') {
-                tree.append((char) octet);
-                strip = false;
-            } else if (!strip) {
-                break;
-            }
-        }
-        if (!tree.toString().equals("tree")) {
-            throw new IOException("Not a tree: " + tree);
-        }
-
-        String version = OMAConstants.deserializeString(in);
-        int next = in.read();
-        if (next != '(') {
-            throw new IOException("Expected URN in tree definition");
-        }
-        String urn = OMAConstants.readURN(in);
-
-        OMAConstructed root = OMANode.unmarshal(in);
-
-        return new MOTree(urn, version, root);
-    }
-
-    public String toXml() {
-        StringBuilder sb = new StringBuilder();
-        mRoot.toXml(sb);
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/MgmtTreeRoot.java b/packages/Osu/src/com/android/hotspot2/omadm/MgmtTreeRoot.java
deleted file mode 100644
index 9416140..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/MgmtTreeRoot.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.util.Map;
-
-public class MgmtTreeRoot extends OMAConstructed {
-    private final String mDtdRev;
-
-    public MgmtTreeRoot(XMLNode node, String dtdRev) {
-        super(null, MOTree.MgmtTreeTag, null, new MultiValueMap<OMANode>(),
-                node.getTextualAttributes());
-        mDtdRev = dtdRev;
-    }
-
-    public MgmtTreeRoot(String dtdRev) {
-        super(null, MOTree.MgmtTreeTag, null, "xmlns", OMAConstants.SyncML);
-        mDtdRev = dtdRev;
-    }
-
-    @Override
-    public void toXml(StringBuilder sb) {
-        sb.append('<').append(MOTree.MgmtTreeTag);
-        if (getAttributes() != null && !getAttributes().isEmpty()) {
-            for (Map.Entry<String, String> avp : getAttributes().entrySet()) {
-                sb.append(' ').append(avp.getKey()).append("=\"")
-                        .append(avp.getValue()).append('"');
-            }
-        }
-        sb.append(">\n");
-
-        sb.append('<').append(OMAConstants.SyncMLVersionTag).append('>').append(mDtdRev)
-                .append("</").append(OMAConstants.SyncMLVersionTag).append(">\n");
-        for (OMANode child : getChildren()) {
-            child.toXml(sb);
-        }
-        sb.append("</").append(MOTree.MgmtTreeTag).append(">\n");
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/MultiValueMap.java b/packages/Osu/src/com/android/hotspot2/omadm/MultiValueMap.java
deleted file mode 100644
index ead0dbc..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/MultiValueMap.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-public class MultiValueMap<T> {
-    private final Map<String, ArrayList<T>> mMap = new LinkedHashMap<>();
-
-    public void put(String key, T value) {
-        key = key.toLowerCase();
-        ArrayList<T> values = mMap.get(key);
-        if (values == null) {
-            values = new ArrayList<>();
-            mMap.put(key, values);
-        }
-        values.add(value);
-    }
-
-    public T get(String key) {
-        key = key.toLowerCase();
-        List<T> values = mMap.get(key);
-        if (values == null) {
-            return null;
-        } else if (values.size() == 1) {
-            return values.get(0);
-        } else {
-            throw new IllegalArgumentException("Cannot do get on multi-value");
-        }
-    }
-
-    public T replace(String key, T oldValue, T newValue) {
-        key = key.toLowerCase();
-        List<T> values = mMap.get(key);
-        if (values == null) {
-            return null;
-        }
-
-        for (int n = 0; n < values.size(); n++) {
-            T value = values.get(n);
-            if (value == oldValue) {
-                values.set(n, newValue);
-                return value;
-            }
-        }
-        return null;
-    }
-
-    public T remove(String key, T value) {
-        key = key.toLowerCase();
-        List<T> values = mMap.get(key);
-        if (values == null) {
-            return null;
-        }
-
-        T result = null;
-        Iterator<T> valueIterator = values.iterator();
-        while (valueIterator.hasNext()) {
-            if (valueIterator.next() == value) {
-                valueIterator.remove();
-                result = value;
-                break;
-            }
-        }
-        if (values.isEmpty()) {
-            mMap.remove(key);
-        }
-        return result;
-    }
-
-    public T remove(T value) {
-        T result = null;
-        Iterator<Map.Entry<String, ArrayList<T>>> iterator = mMap.entrySet().iterator();
-        while (iterator.hasNext()) {
-            ArrayList<T> values = iterator.next().getValue();
-            Iterator<T> valueIterator = values.iterator();
-            while (valueIterator.hasNext()) {
-                if (valueIterator.next() == value) {
-                    valueIterator.remove();
-                    result = value;
-                    break;
-                }
-            }
-            if (result != null) {
-                if (values.isEmpty()) {
-                    iterator.remove();
-                }
-                break;
-            }
-        }
-        return result;
-    }
-
-    public Collection<T> values() {
-        List<T> allValues = new ArrayList<>(mMap.size());
-        for (List<T> values : mMap.values()) {
-            for (T value : values) {
-                allValues.add(value);
-            }
-        }
-        return allValues;
-    }
-
-    public T getSingletonValue() {
-        if (mMap.size() != 1) {
-            throw new IllegalArgumentException("Map is not a single entry map");
-        }
-        List<T> values = mMap.values().iterator().next();
-        if (values.size() != 1) {
-            throw new IllegalArgumentException("Map is not a single entry map");
-        }
-        return values.iterator().next();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/NodeAttribute.java b/packages/Osu/src/com/android/hotspot2/omadm/NodeAttribute.java
deleted file mode 100644
index e4a08b3..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/NodeAttribute.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.android.hotspot2.omadm;
-
-public class NodeAttribute {
-    private final String mName;
-    private final String mType;
-    private final String mValue;
-
-    public NodeAttribute(String name, String type, String value) {
-        mName = name;
-        mType = type;
-        mValue = value;
-    }
-
-    public String getName() {
-        return mName;
-    }
-
-    public String getValue() {
-        return mValue;
-    }
-
-    public String getType() {
-        return mType;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("%s (%s) = '%s'", mName, mType, mValue);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMAConstants.java b/packages/Osu/src/com/android/hotspot2/omadm/OMAConstants.java
deleted file mode 100644
index 92d8ed7..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMAConstants.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import com.android.hotspot2.osu.OSUError;
-import com.android.hotspot2.osu.OSUStatus;
-
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Map;
-
-public class OMAConstants {
-    private OMAConstants() {
-    }
-
-    public static final String MOVersion = "1.0";
-    public static final String PPS_URN = "urn:wfa:mo:hotspot2dot0-perprovidersubscription:1.0";
-    public static final String DevInfoURN = "urn:oma:mo:oma-dm-devinfo:1.0";
-    public static final String DevDetailURN = "urn:oma:mo:oma-dm-devdetail:1.0";
-    public static final String DevDetailXURN = "urn:wfa:mo-ext:hotspot2dot0-devdetail-ext:1.0";
-
-    public static final String[] SupportedMO_URNs = {
-            PPS_URN, DevInfoURN, DevDetailURN, DevDetailXURN
-    };
-
-    public static final String SppMOAttribute = "spp:moURN";
-    public static final String TAG_PostDevData = "spp:sppPostDevData";
-    public static final String TAG_SupportedVersions = "spp:supportedSPPVersions";
-    public static final String TAG_SupportedMOs = "spp:supportedMOList";
-    public static final String TAG_UpdateResponse = "spp:sppUpdateResponse";
-    public static final String TAG_MOContainer = "spp:moContainer";
-    public static final String TAG_Version = "spp:sppVersion";
-
-    public static final String TAG_SessionID = "spp:sessionID";
-    public static final String TAG_Status = "spp:sppStatus";
-    public static final String TAG_Error = "spp:sppError";
-
-    public static final String SyncMLVersionTag = "VerDTD";
-    public static final String OMAVersion = "1.2";
-    public static final String SyncML = "syncml:dmddf1.2";
-
-    private static final byte[] INDENT = new byte[1024];
-
-    private static final Map<OSUStatus, String> sStatusStrings = new EnumMap<>(OSUStatus.class);
-    private static final Map<String, OSUStatus> sStatusEnums = new HashMap<>();
-    private static final Map<OSUError, String> sErrorStrings = new EnumMap<>(OSUError.class);
-    private static final Map<String, OSUError> sErrorEnums = new HashMap<>();
-
-    static {
-        sStatusStrings.put(OSUStatus.OK, "OK");
-        sStatusStrings.put(OSUStatus.ProvComplete,
-                "Provisioning complete, request sppUpdateResponse");
-        sStatusStrings.put(OSUStatus.RemediationComplete,
-                "Remediation complete, request sppUpdateResponse");
-        sStatusStrings.put(OSUStatus.UpdateComplete, "Update complete, request sppUpdateResponse");
-        sStatusStrings.put(OSUStatus.ExchangeComplete, "Exchange complete, release TLS connection");
-        sStatusStrings.put(OSUStatus.Unknown, "No update available at this time");
-        sStatusStrings.put(OSUStatus.Error, "Error occurred");
-
-        for (Map.Entry<OSUStatus, String> entry : sStatusStrings.entrySet()) {
-            sStatusEnums.put(entry.getValue().toLowerCase(), entry.getKey());
-        }
-
-        sErrorStrings.put(OSUError.SPPversionNotSupported, "SPP version not supported");
-        sErrorStrings.put(OSUError.MOsNotSupported, "One or more mandatory MOs not supported");
-        sErrorStrings.put(OSUError.CredentialsFailure,
-                "Credentials cannot be provisioned at this time");
-        sErrorStrings.put(OSUError.RemediationFailure,
-                "Remediation cannot be completed at this time");
-        sErrorStrings.put(OSUError.ProvisioningFailed,
-                "Provisioning cannot be completed at this time");
-        sErrorStrings.put(OSUError.ExistingCertificate, "Continue to use existing certificate");
-        sErrorStrings.put(OSUError.CookieInvalid, "Cookie invalid");
-        sErrorStrings.put(OSUError.WebSessionID,
-                "No corresponding web-browser-connection Session ID");
-        sErrorStrings.put(OSUError.PermissionDenied, "Permission denied");
-        sErrorStrings.put(OSUError.CommandFailed, "Command failed");
-        sErrorStrings.put(OSUError.MOaddOrUpdateFailed, "MO addition or update failed");
-        sErrorStrings.put(OSUError.DeviceFull, "Device full");
-        sErrorStrings.put(OSUError.BadTreeURI, "Bad management tree URI");
-        sErrorStrings.put(OSUError.TooLarge, "Requested entity too large");
-        sErrorStrings.put(OSUError.CommandNotAllowed, "Command not allowed");
-        sErrorStrings.put(OSUError.UserAborted, "Command not executed due to user");
-        sErrorStrings.put(OSUError.NotFound, "Not found");
-        sErrorStrings.put(OSUError.Other, "Other");
-
-        for (Map.Entry<OSUError, String> entry : sErrorStrings.entrySet()) {
-            sErrorEnums.put(entry.getValue().toLowerCase(), entry.getKey());
-        }
-        Arrays.fill(INDENT, (byte) ' ');
-    }
-
-    public static String mapStatus(OSUStatus status) {
-        return sStatusStrings.get(status);
-    }
-
-    public static OSUStatus mapStatus(String status) {
-        return sStatusEnums.get(status.toLowerCase());
-    }
-
-    public static String mapError(OSUError error) {
-        return sErrorStrings.get(error);
-    }
-
-    public static OSUError mapError(String error) {
-        return sErrorEnums.get(error.toLowerCase());
-    }
-
-    public static void serializeString(String s, OutputStream out) throws IOException {
-        byte[] octets = s.getBytes(StandardCharsets.UTF_8);
-        byte[] prefix = String.format("%x:", octets.length).getBytes(StandardCharsets.UTF_8);
-        out.write(prefix);
-        out.write(octets);
-    }
-
-    public static void indent(int level, OutputStream out) throws IOException {
-        out.write(INDENT, 0, level);
-    }
-
-    public static String deserializeString(InputStream in) throws IOException {
-        StringBuilder prefix = new StringBuilder();
-        for (; ; ) {
-            byte b = (byte) in.read();
-            if (b == '.')
-                return null;
-            else if (b == ':')
-                break;
-            else if (b > ' ')
-                prefix.append((char) b);
-        }
-        int length = Integer.parseInt(prefix.toString(), 16);
-        byte[] octets = new byte[length];
-        int offset = 0;
-        while (offset < octets.length) {
-            int amount = in.read(octets, offset, octets.length - offset);
-            if (amount <= 0)
-                throw new EOFException();
-            offset += amount;
-        }
-        return new String(octets, StandardCharsets.UTF_8);
-    }
-
-    public static String readURN(InputStream in) throws IOException {
-        StringBuilder urn = new StringBuilder();
-
-        for (; ; ) {
-            byte b = (byte) in.read();
-            if (b == ')')
-                break;
-            urn.append((char) b);
-        }
-        return urn.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMAConstructed.java b/packages/Osu/src/com/android/hotspot2/omadm/OMAConstructed.java
deleted file mode 100644
index e5285f2..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMAConstructed.java
+++ /dev/null
@@ -1,169 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.charset.StandardCharsets;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-
-public class OMAConstructed extends OMANode {
-    private final MultiValueMap<OMANode> mChildren;
-
-    public OMAConstructed(OMAConstructed parent, String name, String context, String... avps) {
-        this(parent, name, context, new MultiValueMap<OMANode>(), buildAttributes(avps));
-    }
-
-    protected OMAConstructed(OMAConstructed parent, String name, String context,
-                             MultiValueMap<OMANode> children, Map<String, String> avps) {
-        super(parent, name, context, avps);
-        mChildren = children;
-    }
-
-    @Override
-    public OMANode addChild(String name, String context, String value, String pathString)
-            throws IOException {
-        if (pathString == null) {
-            OMANode child = value != null ?
-                    new OMAScalar(this, name, context, value) :
-                    new OMAConstructed(this, name, context);
-            mChildren.put(name, child);
-            return child;
-        } else {
-            OMANode target = this;
-            while (target.getParent() != null)
-                target = target.getParent();
-
-            for (String element : pathString.split("/")) {
-                target = target.getChild(element);
-                if (target == null)
-                    throw new IOException("No child node '" + element + "' in " + getPathString());
-                else if (target.isLeaf())
-                    throw new IOException("Cannot add child to leaf node: " + getPathString());
-            }
-            return target.addChild(name, context, value, null);
-        }
-    }
-
-    @Override
-    public OMAConstructed reparent(OMAConstructed parent) {
-        return new OMAConstructed(parent, getName(), getContext(), mChildren, getAttributes());
-    }
-
-    public void addChild(OMANode child) {
-        mChildren.put(child.getName(), child.reparent(this));
-    }
-
-    public String getScalarValue(Iterator<String> path) throws OMAException {
-        if (!path.hasNext()) {
-            throw new OMAException("Path too short for " + getPathString());
-        }
-        String tag = path.next();
-        OMANode child = mChildren.get(tag);
-        if (child != null) {
-            return child.getScalarValue(path);
-        } else {
-            return null;
-        }
-    }
-
-    @Override
-    public OMANode getListValue(Iterator<String> path) throws OMAException {
-        if (!path.hasNext()) {
-            return null;
-        }
-        String tag = path.next();
-        OMANode child;
-        if (tag.equals("?")) {
-            child = mChildren.getSingletonValue();
-        } else {
-            child = mChildren.get(tag);
-        }
-
-        if (child == null) {
-            return null;
-        } else if (path.hasNext()) {
-            return child.getListValue(path);
-        } else {
-            return child;
-        }
-    }
-
-    @Override
-    public boolean isLeaf() {
-        return false;
-    }
-
-    @Override
-    public Collection<OMANode> getChildren() {
-        return Collections.unmodifiableCollection(mChildren.values());
-    }
-
-    public OMANode getChild(String name) {
-        return mChildren.get(name);
-    }
-
-    public OMANode replaceNode(OMANode oldNode, OMANode newNode) {
-        return mChildren.replace(oldNode.getName(), oldNode, newNode);
-    }
-
-    public OMANode removeNode(String key, OMANode node) {
-        if (key.equals("?")) {
-            return mChildren.remove(node);
-        } else {
-            return mChildren.remove(key, node);
-        }
-    }
-
-    @Override
-    public String getValue() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void toString(StringBuilder sb, int level) {
-        sb.append(getPathString());
-        if (getContext() != null) {
-            sb.append(" (").append(getContext()).append(')');
-        }
-        sb.append('\n');
-
-        for (OMANode node : mChildren.values()) {
-            node.toString(sb, level + 1);
-        }
-    }
-
-    @Override
-    public void marshal(OutputStream out, int level) throws IOException {
-        OMAConstants.indent(level, out);
-        OMAConstants.serializeString(getName(), out);
-        if (getContext() != null) {
-            out.write(String.format("(%s)", getContext()).getBytes(StandardCharsets.UTF_8));
-        }
-        out.write(new byte[]{'+', '\n'});
-
-        for (OMANode child : mChildren.values()) {
-            child.marshal(out, level + 1);
-        }
-        OMAConstants.indent(level, out);
-        out.write(".\n".getBytes(StandardCharsets.UTF_8));
-    }
-
-    @Override
-    public void fillPayload(StringBuilder sb) {
-        if (getContext() != null) {
-            sb.append('<').append(MOTree.RTPropTag).append(">\n");
-            sb.append('<').append(MOTree.TypeTag).append(">\n");
-            sb.append('<').append(MOTree.DDFNameTag).append(">");
-            sb.append(getContext());
-            sb.append("</").append(MOTree.DDFNameTag).append(">\n");
-            sb.append("</").append(MOTree.TypeTag).append(">\n");
-            sb.append("</").append(MOTree.RTPropTag).append(">\n");
-        }
-
-        for (OMANode child : getChildren()) {
-            child.toXml(sb);
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMAException.java b/packages/Osu/src/com/android/hotspot2/omadm/OMAException.java
deleted file mode 100644
index 33a6e37..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMAException.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.io.IOException;
-
-public class OMAException extends IOException {
-    public OMAException(String message) {
-        super(message);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMANode.java b/packages/Osu/src/com/android/hotspot2/omadm/OMANode.java
deleted file mode 100644
index a00f433..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMANode.java
+++ /dev/null
@@ -1,163 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-public abstract class OMANode {
-    private final OMAConstructed mParent;
-    private final String mName;
-    private final String mContext;
-    private final Map<String, String> mAttributes;
-
-    protected OMANode(OMAConstructed parent, String name, String context, Map<String, String> avps) {
-        mParent = parent;
-        mName = name;
-        mContext = context;
-        mAttributes = avps;
-    }
-
-    protected static Map<String, String> buildAttributes(String[] avps) {
-        if (avps == null) {
-            return null;
-        }
-        Map<String, String> attributes = new HashMap<>();
-        for (int n = 0; n < avps.length; n += 2) {
-            attributes.put(avps[n], avps[n + 1]);
-        }
-        return attributes;
-    }
-
-    protected Map<String, String> getAttributes() {
-        return mAttributes;
-    }
-
-    public OMAConstructed getParent() {
-        return mParent;
-    }
-
-    public String getName() {
-        return mName;
-    }
-
-    public String getContext() {
-        return mContext;
-    }
-
-    public List<String> getPath() {
-        LinkedList<String> path = new LinkedList<>();
-        for (OMANode node = this; node != null; node = node.getParent()) {
-            path.addFirst(node.getName());
-        }
-        return path;
-    }
-
-    public String getPathString() {
-        StringBuilder sb = new StringBuilder();
-        for (String element : getPath()) {
-            sb.append('/').append(element);
-        }
-        return sb.toString();
-    }
-
-    public abstract OMANode reparent(OMAConstructed parent);
-
-    public abstract String getScalarValue(Iterator<String> path) throws OMAException;
-
-    public abstract OMANode getListValue(Iterator<String> path) throws OMAException;
-
-    public abstract boolean isLeaf();
-
-    public abstract Collection<OMANode> getChildren();
-
-    public abstract OMANode getChild(String name) throws OMAException;
-
-    public abstract String getValue();
-
-    public abstract OMANode addChild(String name, String context, String value, String path)
-            throws IOException;
-
-    public abstract void marshal(OutputStream out, int level) throws IOException;
-
-    public abstract void toString(StringBuilder sb, int level);
-
-    public abstract void fillPayload(StringBuilder sb);
-
-    public void toXml(StringBuilder sb) {
-        sb.append('<').append(MOTree.NodeTag);
-        if (mAttributes != null && !mAttributes.isEmpty()) {
-            for (Map.Entry<String, String> avp : mAttributes.entrySet()) {
-                sb.append(' ').append(avp.getKey()).append("=\"").append(avp.getValue()).append('"');
-            }
-        }
-        sb.append(">\n");
-
-        sb.append('<').append(MOTree.NodeNameTag).append('>');
-        sb.append(getName());
-        sb.append("</").append(MOTree.NodeNameTag).append(">\n");
-
-        fillPayload(sb);
-
-        sb.append("</").append(MOTree.NodeTag).append(">\n");
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        toString(sb, 0);
-        return sb.toString();
-    }
-
-    public static OMAConstructed unmarshal(InputStream in) throws IOException {
-        OMANode node = buildNode(in, null);
-        if (node == null || node.isLeaf()) {
-            throw new IOException("Bad OMA tree");
-        }
-        unmarshal(in, (OMAConstructed) node);
-        return (OMAConstructed) node;
-    }
-
-    private static void unmarshal(InputStream in, OMAConstructed parent) throws IOException {
-        for (; ; ) {
-            OMANode node = buildNode(in, parent);
-            if (node == null) {
-                return;
-            } else if (!node.isLeaf()) {
-                unmarshal(in, (OMAConstructed) node);
-            }
-        }
-    }
-
-    private static OMANode buildNode(InputStream in, OMAConstructed parent) throws IOException {
-        String name = OMAConstants.deserializeString(in);
-        if (name == null) {
-            return null;
-        }
-
-        String urn = null;
-        int next = in.read();
-        if (next == '(') {
-            urn = OMAConstants.readURN(in);
-            next = in.read();
-        }
-
-        if (next == '=') {
-            String value = OMAConstants.deserializeString(in);
-            return parent.addChild(name, urn, value, null);
-        } else if (next == '+') {
-            if (parent != null) {
-                return parent.addChild(name, urn, null, null);
-            } else {
-                return new OMAConstructed(null, name, urn);
-            }
-        } else {
-            throw new IOException("Parse error: expected = or + after node name");
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMAParser.java b/packages/Osu/src/com/android/hotspot2/omadm/OMAParser.java
deleted file mode 100644
index 21cc19a..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMAParser.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * Parses an OMA-DM XML tree.
- */
-public class OMAParser extends DefaultHandler {
-    private XMLNode mRoot;
-    private XMLNode mCurrent;
-
-    public OMAParser() {
-        mRoot = null;
-        mCurrent = null;
-    }
-
-    public MOTree parse(String text, String urn) throws IOException, SAXException {
-        try {
-            SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
-            parser.parse(new InputSource(new StringReader(text)), this);
-            return new MOTree(mRoot, urn);
-        } 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(mCurrent, qName, attributes);
-
-        if (mRoot == null)
-            mRoot = mCurrent;
-        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);
-
-        try {
-            mCurrent.close();
-        } catch (IOException ioe) {
-            throw new SAXException("Failed to close element", ioe);
-        }
-
-        mCurrent = mCurrent.getParent();
-    }
-
-    @Override
-    public void characters(char[] ch, int start, int length) throws SAXException {
-        mCurrent.addText(ch, start, length);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/OMAScalar.java b/packages/Osu/src/com/android/hotspot2/omadm/OMAScalar.java
deleted file mode 100644
index a971ac4..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/OMAScalar.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-
-public class OMAScalar extends OMANode {
-    private final String mValue;
-
-    public OMAScalar(OMAConstructed parent, String name, String context, String value,
-                     String ... avps) {
-        this(parent, name, context, value, buildAttributes(avps));
-    }
-
-    public OMAScalar(OMAConstructed parent, String name, String context, String value,
-                     Map<String, String> avps) {
-        super(parent, name, context, avps);
-        mValue = value;
-    }
-
-    @Override
-    public OMAScalar reparent(OMAConstructed parent) {
-        return new OMAScalar(parent, getName(), getContext(), mValue, getAttributes());
-    }
-
-    public String getScalarValue(Iterator<String> path) throws OMAException {
-        return mValue;
-    }
-
-    @Override
-    public OMANode getListValue(Iterator<String> path) throws OMAException {
-        throw new OMAException("Scalar encountered in list path: " + getPathString());
-    }
-
-    @Override
-    public boolean isLeaf() {
-        return true;
-    }
-
-    @Override
-    public Collection<OMANode> getChildren() {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String getValue() {
-        return mValue;
-    }
-
-    @Override
-    public OMANode getChild(String name) throws OMAException {
-        throw new OMAException("'" + getName() + "' is a scalar node");
-    }
-
-    @Override
-    public OMANode addChild(String name, String context, String value, String path)
-            throws IOException {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public void toString(StringBuilder sb, int level) {
-        sb.append(getPathString()).append('=').append(mValue);
-        if (getContext() != null) {
-            sb.append(" (").append(getContext()).append(')');
-        }
-        sb.append('\n');
-    }
-
-    @Override
-    public void marshal(OutputStream out, int level) throws IOException {
-        OMAConstants.indent(level, out);
-        OMAConstants.serializeString(getName(), out);
-        out.write((byte) '=');
-        OMAConstants.serializeString(getValue(), out);
-        out.write((byte) '\n');
-    }
-
-    @Override
-    public void fillPayload(StringBuilder sb) {
-        sb.append('<').append(MOTree.ValueTag).append('>');
-        sb.append(mValue);
-        sb.append("</").append(MOTree.ValueTag).append(">\n");
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/omadm/XMLNode.java b/packages/Osu/src/com/android/hotspot2/omadm/XMLNode.java
deleted file mode 100644
index b77c820..0000000
--- a/packages/Osu/src/com/android/hotspot2/omadm/XMLNode.java
+++ /dev/null
@@ -1,240 +0,0 @@
-package com.android.hotspot2.omadm;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class XMLNode {
-    private final String mTag;
-    private final Map<String, NodeAttribute> mAttributes;
-    private final List<XMLNode> mChildren;
-    private final XMLNode mParent;
-    private MOTree mMO;
-    private StringBuilder mTextBuilder;
-    private String mText;
-
-    private static final String XML_SPECIAL_CHARS = "\"'<>&";
-    private static final Set<Character> XML_SPECIAL = new HashSet<>();
-    private static final String CDATA_OPEN = "<![CDATA[";
-    private static final String CDATA_CLOSE = "]]>";
-
-    static {
-        for (int n = 0; n < XML_SPECIAL_CHARS.length(); n++) {
-            XML_SPECIAL.add(XML_SPECIAL_CHARS.charAt(n));
-        }
-    }
-
-    public XMLNode(XMLNode parent, String tag, Attributes attributes) throws SAXException {
-        mTag = tag;
-
-        mAttributes = new HashMap<>();
-
-        if (attributes.getLength() > 0) {
-            for (int n = 0; n < attributes.getLength(); n++)
-                mAttributes.put(attributes.getQName(n), new NodeAttribute(attributes.getQName(n),
-                        attributes.getType(n), attributes.getValue(n)));
-        }
-
-        mParent = parent;
-        mChildren = new ArrayList<>();
-
-        mTextBuilder = new StringBuilder();
-    }
-
-    public XMLNode(XMLNode parent, String tag, Map<String, String> attributes) {
-        mTag = tag;
-
-        mAttributes = new HashMap<>(attributes == null ? 0 : attributes.size());
-
-        if (attributes != null) {
-            for (Map.Entry<String, String> entry : attributes.entrySet()) {
-                mAttributes.put(entry.getKey(),
-                        new NodeAttribute(entry.getKey(), "", entry.getValue()));
-            }
-        }
-
-        mParent = parent;
-        mChildren = new ArrayList<>();
-
-        mTextBuilder = new StringBuilder();
-    }
-
-    public void setText(String text) {
-        mText = text;
-        mTextBuilder = null;
-    }
-
-    public void addText(char[] chs, int start, int length) {
-        String s = new String(chs, start, length);
-        String trimmed = s.trim();
-        if (trimmed.isEmpty())
-            return;
-
-        if (s.charAt(0) != trimmed.charAt(0))
-            mTextBuilder.append(' ');
-        mTextBuilder.append(trimmed);
-        if (s.charAt(s.length() - 1) != trimmed.charAt(trimmed.length() - 1))
-            mTextBuilder.append(' ');
-    }
-
-    public void addChild(XMLNode child) {
-        mChildren.add(child);
-    }
-
-    public void close() throws IOException, SAXException {
-        String text = mTextBuilder.toString().trim();
-        StringBuilder filtered = new StringBuilder(text.length());
-        for (int n = 0; n < text.length(); n++) {
-            char ch = text.charAt(n);
-            if (ch >= ' ')
-                filtered.append(ch);
-        }
-
-        mText = filtered.toString();
-        mTextBuilder = null;
-
-        if (MOTree.hasMgmtTreeTag(mText)) {
-            try {
-                NodeAttribute urn = mAttributes.get(OMAConstants.SppMOAttribute);
-                OMAParser omaParser = new OMAParser();
-                mMO = omaParser.parse(mText, urn != null ? urn.getValue() : null);
-            } catch (SAXException | IOException e) {
-                mMO = null;
-            }
-        }
-    }
-
-    public String getTag() {
-        return mTag;
-    }
-
-    public String getNameSpace() throws OMAException {
-        String[] nsn = mTag.split(":");
-        if (nsn.length != 2) {
-            throw new OMAException("Non-namespaced tag: '" + mTag + "'");
-        }
-        return nsn[0];
-    }
-
-    public String getStrippedTag() throws OMAException {
-        String[] nsn = mTag.split(":");
-        if (nsn.length != 2) {
-            throw new OMAException("Non-namespaced tag: '" + mTag + "'");
-        }
-        return nsn[1].toLowerCase();
-    }
-
-    public XMLNode getSoleChild() throws OMAException {
-        if (mChildren.size() != 1) {
-            throw new OMAException("Expected exactly one child to " + mTag);
-        }
-        return mChildren.get(0);
-    }
-
-    public XMLNode getParent() {
-        return mParent;
-    }
-
-    public String getText() {
-        return mText;
-    }
-
-    public Map<String, NodeAttribute> getAttributes() {
-        return Collections.unmodifiableMap(mAttributes);
-    }
-
-    public Map<String, String> getTextualAttributes() {
-        Map<String, String> map = new HashMap<>(mAttributes.size());
-        for (Map.Entry<String, NodeAttribute> entry : mAttributes.entrySet()) {
-            map.put(entry.getKey(), entry.getValue().getValue());
-        }
-        return map;
-    }
-
-    public String getAttributeValue(String name) {
-        NodeAttribute nodeAttribute = mAttributes.get(name);
-        return nodeAttribute != null ? nodeAttribute.getValue() : null;
-    }
-
-    public List<XMLNode> getChildren() {
-        return mChildren;
-    }
-
-    public MOTree getMOTree() {
-        return mMO;
-    }
-
-    private void toString(char[] indent, StringBuilder sb) {
-        Arrays.fill(indent, ' ');
-
-        sb.append(indent).append('<').append(mTag);
-        for (Map.Entry<String, NodeAttribute> entry : mAttributes.entrySet()) {
-            sb.append(' ').append(entry.getKey()).append("='")
-                    .append(entry.getValue().getValue()).append('\'');
-        }
-
-        if (mText != null && !mText.isEmpty()) {
-            sb.append('>').append(escapeCdata(mText)).append("</").append(mTag).append(">\n");
-        } else if (mChildren.isEmpty()) {
-            sb.append("/>\n");
-        } else {
-            sb.append(">\n");
-            char[] subIndent = Arrays.copyOf(indent, indent.length + 2);
-            for (XMLNode child : mChildren) {
-                child.toString(subIndent, sb);
-            }
-            sb.append(indent).append("</").append(mTag).append(">\n");
-        }
-    }
-
-    private static String escapeCdata(String text) {
-        if (!escapable(text)) {
-            return text;
-        }
-
-        // Any appearance of ]]> in the text must be split into "]]" | "]]>" | <![CDATA[ | ">"
-        // i.e. "split the sequence by putting a close CDATA and a new open CDATA before the '>'
-        StringBuilder sb = new StringBuilder();
-        sb.append(CDATA_OPEN);
-        int start = 0;
-        for (; ; ) {
-            int etoken = text.indexOf(CDATA_CLOSE);
-            if (etoken >= 0) {
-                sb.append(text.substring(start, etoken + 2)).append(CDATA_CLOSE).append(CDATA_OPEN);
-                start = etoken + 2;
-            } else {
-                if (start < text.length() - 1) {
-                    sb.append(text.substring(start));
-                }
-                break;
-            }
-        }
-        sb.append(CDATA_CLOSE);
-        return sb.toString();
-    }
-
-    private static boolean escapable(String s) {
-        for (int n = 0; n < s.length(); n++) {
-            if (XML_SPECIAL.contains(s.charAt(n))) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        toString(new char[0], sb);
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/ClientKeyManager.java b/packages/Osu/src/com/android/hotspot2/osu/ClientKeyManager.java
deleted file mode 100644
index cfc84bbc..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/ClientKeyManager.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.util.Log;
-
-import com.android.hotspot2.flow.PlatformAdapter;
-import com.android.hotspot2.pps.HomeSP;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.Principal;
-import java.security.PrivateKey;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.net.ssl.X509KeyManager;
-
-public class ClientKeyManager implements X509KeyManager {
-    private final KeyStore mKeyStore;
-    private final Map<OSUCertType, String> mAliasMap;
-    private final Map<OSUCertType, Object> mTempKeys;
-
-    private static final String sTempAlias = "client-alias";
-
-    public ClientKeyManager(HomeSP homeSP, KeyStore keyStore) throws IOException {
-        mKeyStore = keyStore;
-        mAliasMap = new HashMap<>();
-        mAliasMap.put(OSUCertType.AAA, PlatformAdapter.CERT_CLT_CA_ALIAS + homeSP.getFQDN());
-        mAliasMap.put(OSUCertType.Client, PlatformAdapter.CERT_CLT_CERT_ALIAS + homeSP.getFQDN());
-        mAliasMap.put(OSUCertType.PrivateKey, PlatformAdapter.CERT_CLT_KEY_ALIAS + homeSP.getFQDN());
-        mTempKeys = new HashMap<>();
-    }
-
-    public void reloadKeys(Map<OSUCertType, List<X509Certificate>> certs, PrivateKey key)
-            throws IOException {
-        List<X509Certificate> clientCerts = certs.get(OSUCertType.Client);
-        X509Certificate[] certArray = new X509Certificate[clientCerts.size()];
-        int n = 0;
-        for (X509Certificate cert : clientCerts) {
-            certArray[n++] = cert;
-        }
-        mTempKeys.put(OSUCertType.Client, certArray);
-        mTempKeys.put(OSUCertType.PrivateKey, key);
-    }
-
-    @Override
-    public String chooseClientAlias(String[] keyType, Principal[] issuers, Socket socket) {
-        if (mTempKeys.isEmpty()) {
-            return mAliasMap.get(OSUCertType.Client);
-        } else {
-            return sTempAlias;
-        }
-    }
-
-    @Override
-    public String[] getClientAliases(String keyType, Principal[] issuers) {
-        if (mTempKeys.isEmpty()) {
-            String alias = mAliasMap.get(OSUCertType.Client);
-            return alias != null ? new String[]{alias} : null;
-        } else {
-            return new String[]{sTempAlias};
-        }
-    }
-
-    @Override
-    public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String[] getServerAliases(String keyType, Principal[] issuers) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public X509Certificate[] getCertificateChain(String alias) {
-        if (mTempKeys.isEmpty()) {
-            if (!mAliasMap.get(OSUCertType.Client).equals(alias)) {
-                Log.w(OSUManager.TAG, "Bad cert alias requested: '" + alias + "'");
-                return null;
-            }
-            try {
-                Certificate cert = mKeyStore.getCertificate(alias);
-                return new X509Certificate[] {(X509Certificate) cert};
-            } catch (KeyStoreException kse) {
-                Log.w(OSUManager.TAG, "Failed to retrieve certificates: " + kse);
-                return null;
-            }
-        } else if (sTempAlias.equals(alias)) {
-            return (X509Certificate[]) mTempKeys.get(OSUCertType.Client);
-        } else {
-            Log.w(OSUManager.TAG, "Bad cert alias requested: '" + alias + "'");
-            return null;
-        }
-    }
-
-    @Override
-    public PrivateKey getPrivateKey(String alias) {
-        if (mTempKeys.isEmpty()) {
-            if (!mAliasMap.get(OSUCertType.Client).equals(alias)) {
-                Log.w(OSUManager.TAG, "Bad key alias requested: '" + alias + "'");
-            }
-            try {
-                return (PrivateKey) mKeyStore.getKey(mAliasMap.get(OSUCertType.PrivateKey), null);
-            } catch (GeneralSecurityException gse) {
-                Log.w(OSUManager.TAG, "Failed to retrieve private key: " + gse);
-                return null;
-            }
-        } else if (sTempAlias.equals(alias)) {
-            return (PrivateKey) mTempKeys.get(OSUCertType.PrivateKey);
-        } else {
-            Log.w(OSUManager.TAG, "Bad cert alias requested: '" + alias + "'");
-            return null;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/ExchangeCompleteResponse.java b/packages/Osu/src/com/android/hotspot2/osu/ExchangeCompleteResponse.java
deleted file mode 100644
index fe23b5c..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/ExchangeCompleteResponse.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-	/*
-	<xsd:element name="sppExchangeComplete">
-		<xsd:annotation>
-			<xsd:documentation>SOAP method used by SPP server to end session.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="sppError" minOccurs="0"/>
-				<xsd:any namespace="##other" maxOccurs="unbounded" minOccurs="0"/>
-			</xsd:sequence>
-			<xsd:attribute ref="sppVersion" use="required"/>
-			<xsd:attribute ref="sppStatus" use="required"/>
-			<xsd:attribute ref="sessionID" use="required"/>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-	 */
-
-public class ExchangeCompleteResponse extends OSUResponse {
-    public ExchangeCompleteResponse(XMLNode root) throws OMAException {
-        super(root, OSUMessageType.ExchangeComplete);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/ExecCommand.java b/packages/Osu/src/com/android/hotspot2/osu/ExecCommand.java
deleted file mode 100644
index 38a3947..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/ExecCommand.java
+++ /dev/null
@@ -1,3 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum ExecCommand {Browser, GetCert, UseClientCertTLS, UploadMO}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/HTTPHandler.java b/packages/Osu/src/com/android/hotspot2/osu/HTTPHandler.java
deleted file mode 100644
index 4b583df..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/HTTPHandler.java
+++ /dev/null
@@ -1,180 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.util.Log;
-
-import com.android.hotspot2.utils.HTTPMessage;
-import com.android.hotspot2.utils.HTTPRequest;
-import com.android.hotspot2.utils.HTTPResponse;
-
-import com.android.org.conscrypt.OpenSSLSocketImpl;
-
-import org.xml.sax.SAXException;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.Socket;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.PrivateKey;
-import java.security.cert.X509Certificate;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLSocket;
-import javax.xml.parsers.ParserConfigurationException;
-
-public class HTTPHandler implements AutoCloseable {
-    private final Charset mCharset;
-    private final OSUSocketFactory mSocketFactory;
-    private Socket mSocket;
-    private BufferedOutputStream mOut;
-    private BufferedInputStream mIn;
-    private final String mUser;
-    private final byte[] mPassword;
-    private boolean mHTTPAuthPerformed;
-    private static final AtomicInteger sSequence = new AtomicInteger();
-
-    public HTTPHandler(Charset charset, OSUSocketFactory socketFactory) throws IOException {
-        this(charset, socketFactory, null, null);
-    }
-
-    public HTTPHandler(Charset charset, OSUSocketFactory socketFactory,
-                       String user, byte[] password) throws IOException {
-        mCharset = charset;
-        mSocketFactory = socketFactory;
-        mSocket = mSocketFactory.createSocket();
-        mOut = new BufferedOutputStream(mSocket.getOutputStream());
-        mIn = new BufferedInputStream(mSocket.getInputStream());
-        mUser = user;
-        mPassword = password;
-    }
-
-    public boolean isHTTPAuthPerformed() {
-        return mHTTPAuthPerformed;
-    }
-
-    public X509Certificate getOSUCertificate(URL osu) throws GeneralSecurityException {
-        return mSocketFactory.getOSUCertificate(osu);
-    }
-
-    public void renegotiate(Map<OSUCertType, List<X509Certificate>> certs, PrivateKey key)
-            throws IOException {
-        if (!(mSocket instanceof SSLSocket)) {
-            throw new IOException("Not a TLS connection");
-        }
-        if (certs != null) {
-            mSocketFactory.reloadKeys(certs, key);
-        }
-        ((SSLSocket) mSocket).startHandshake();
-    }
-
-    public byte[] getTLSUnique() throws SSLException {
-        if (mSocket instanceof OpenSSLSocketImpl) {
-            return ((OpenSSLSocketImpl) mSocket).getChannelId();
-        }
-        return null;
-    }
-
-    public OSUResponse exchangeSOAP(URL url, String message) throws IOException {
-        HTTPResponse response = exchangeWithRetry(url, message, HTTPMessage.Method.POST,
-                HTTPMessage.ContentTypeSOAP);
-        if (response.getStatusCode() >= 300) {
-            throw new IOException("Bad HTTP status code " + response.getStatusCode());
-        }
-        try {
-            SOAPParser parser = new SOAPParser(response.getPayloadStream());
-            return parser.getResponse();
-        } catch (ParserConfigurationException | SAXException e) {
-            ByteBuffer x = response.getPayload();
-            byte[] b = new byte[x.remaining()];
-            x.get(b);
-            Log.w("XML", "Bad: '" + new String(b, StandardCharsets.ISO_8859_1));
-            throw new IOException(e);
-        }
-    }
-
-    public ByteBuffer exchangeBinary(URL url, String message, String contentType)
-            throws IOException {
-        HTTPResponse response =
-                exchangeWithRetry(url, message, HTTPMessage.Method.POST, contentType);
-        return response.getBinaryPayload();
-    }
-
-    public InputStream doGet(URL url) throws IOException {
-        HTTPResponse response = exchangeWithRetry(url, null, HTTPMessage.Method.GET, null);
-        return response.getPayloadStream();
-    }
-
-    public HTTPResponse doGetHTTP(URL url) throws IOException {
-        return exchangeWithRetry(url, null, HTTPMessage.Method.GET, null);
-    }
-
-    private HTTPResponse exchangeWithRetry(URL url, String message, HTTPMessage.Method method,
-                                           String contentType) throws IOException {
-        HTTPResponse response = null;
-        int retry = 0;
-        for (; ; ) {
-            try {
-                response = httpExchange(url, message, method, contentType);
-                break;
-            } catch (IOException ioe) {
-                close();
-                retry++;
-                if (retry > 3) {
-                    break;
-                }
-                Log.d(OSUManager.TAG, "Failed HTTP exchange, retry " + retry);
-                mSocket = mSocketFactory.createSocket();
-                mOut = new BufferedOutputStream(mSocket.getOutputStream());
-                mIn = new BufferedInputStream(mSocket.getInputStream());
-            }
-        }
-        if (response == null) {
-            throw new IOException("Failed to establish connection to peer");
-        }
-        return response;
-    }
-
-    private HTTPResponse httpExchange(URL url, String message, HTTPMessage.Method method,
-                                      String contentType)
-            throws IOException {
-        HTTPRequest request = new HTTPRequest(message, mCharset, method, url, contentType, false);
-        request.send(mOut);
-        HTTPResponse response = new HTTPResponse(mIn);
-        Log.d(OSUManager.TAG, "HTTP code " + response.getStatusCode() + ", user " + mUser +
-                ", pw " + (mPassword != null ? '\'' + new String(mPassword) + '\'' : "-"));
-        if (response.getStatusCode() == 401) {
-            if (mUser == null) {
-                throw new IOException("Missing user name for HTTP authentication");
-            }
-            try {
-                request = new HTTPRequest(message, StandardCharsets.ISO_8859_1, method, url,
-                        contentType, true);
-                request.doAuthenticate(response, mUser, mPassword, url,
-                        sSequence.incrementAndGet());
-                request.send(mOut);
-                mHTTPAuthPerformed = true;
-            } catch (GeneralSecurityException gse) {
-                throw new IOException(gse);
-            }
-
-            response = new HTTPResponse(mIn);
-        }
-        return response;
-    }
-
-    public void close() throws IOException {
-        mSocket.shutdownInput();
-        mSocket.shutdownOutput();
-        mSocket.close();
-        mIn.close();
-        mOut.close();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/IconCache.java b/packages/Osu/src/com/android/hotspot2/osu/IconCache.java
deleted file mode 100644
index bd8a018..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/IconCache.java
+++ /dev/null
@@ -1,337 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.util.Log;
-
-import com.android.anqp.HSIconFileElement;
-import com.android.anqp.IconInfo;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.flow.OSUInfo;
-
-import java.net.ProtocolException;
-import java.nio.BufferUnderflowException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import static com.android.anqp.Constants.ANQPElementType.HSIconFile;
-
-public class IconCache extends Thread {
-    // Preferred icon parameters
-    private static final Set<String> ICON_TYPES =
-            new HashSet<>(Arrays.asList("image/png", "image/jpeg"));
-    private static final int ICON_WIDTH = 64;
-    private static final int ICON_HEIGHT = 64;
-    public static final Locale LOCALE = java.util.Locale.getDefault();
-
-    private static final int MAX_RETRY = 3;
-    private static final long REQUERY_TIME = 5000L;
-    private static final long REQUERY_TIMEOUT = 120000L;
-
-    private final OSUManager mOsuManager;
-    private final Map<EssKey, Map<String, FileEntry>> mPending;
-    private final Map<EssKey, Map<String, HSIconFileElement>> mCache;
-
-    private static class EssKey {
-        private final int mAnqpDomainId;
-        private final long mBssid;
-        private final long mHessid;
-        private final String mSsid;
-
-        private EssKey(OSUInfo osuInfo) {
-            mAnqpDomainId = osuInfo.getAnqpDomID();
-            mBssid = osuInfo.getBSSID();
-            mHessid = osuInfo.getHESSID();
-            mSsid = osuInfo.getAdvertisingSsid();
-        }
-
-        /*
-         *  ANQP ID 1   ANQP ID 2
-         *  0           0           BSSID equality
-         *  0           X           BSSID equality
-         *  Y           X           BSSID equality
-         *  X           X           Then:
-         *
-         *  HESSID1     HESSID2
-         *  0           0           compare SSIDs
-         *  0           X           not equal
-         *  Y           X           not equal
-         *  X           X           equal
-         */
-
-        @Override
-        public boolean equals(Object thatObject) {
-            if (this == thatObject) {
-                return true;
-            }
-            if (thatObject == null || getClass() != thatObject.getClass()) {
-                return false;
-            }
-
-            EssKey that = (EssKey) thatObject;
-            if (mAnqpDomainId != 0 && mAnqpDomainId == that.mAnqpDomainId) {
-                return mHessid == that.mHessid
-                        && (mHessid != 0 || mSsid.equals(that.mSsid));
-            } else {
-                return mBssid == that.mBssid;
-            }
-        }
-
-        @Override
-        public int hashCode() {
-            if (mAnqpDomainId == 0) {
-                return (int) (mBssid ^ (mBssid >>> 32));
-            } else if (mHessid != 0) {
-                return mAnqpDomainId * 31 + (int) (mHessid ^ (mHessid >>> 32));
-            } else {
-                return mAnqpDomainId * 31 + mSsid.hashCode();
-            }
-        }
-
-        @Override
-        public String toString() {
-            if (mAnqpDomainId == 0) {
-                return String.format("BSS %012x", mBssid);
-            } else if (mHessid != 0) {
-                return String.format("ESS %012x [%d]", mBssid, mAnqpDomainId);
-            } else {
-                return String.format("ESS '%s' [%d]", mSsid, mAnqpDomainId);
-            }
-        }
-    }
-
-    private static class FileEntry {
-        private final String mFileName;
-        private int mRetry = 0;
-        private final long mTimestamp;
-        private final LinkedList<OSUInfo> mQueued;
-        private final Set<Long> mBssids;
-
-        private FileEntry(OSUInfo osuInfo, String fileName) {
-            mFileName = fileName;
-            mQueued = new LinkedList<>();
-            mBssids = new HashSet<>();
-            mQueued.addLast(osuInfo);
-            mBssids.add(osuInfo.getBSSID());
-            mTimestamp = System.currentTimeMillis();
-        }
-
-        private void enqueu(OSUInfo osuInfo) {
-            mQueued.addLast(osuInfo);
-            mBssids.add(osuInfo.getBSSID());
-        }
-
-        private int update(long bssid, HSIconFileElement iconFileElement) {
-            if (!mBssids.contains(bssid)) {
-                return 0;
-            }
-            Log.d(OSUManager.TAG, "Updating icon on " + mQueued.size() + " osus");
-            for (OSUInfo osuInfo : mQueued) {
-                osuInfo.setIconFileElement(iconFileElement, mFileName);
-            }
-            return mQueued.size();
-        }
-
-        private int getAndIncrementRetry() {
-            return mRetry++;
-        }
-
-        private long getTimestamp() {
-            return mTimestamp;
-        }
-
-        public String getFileName() {
-            return mFileName;
-        }
-
-        private long getLastBssid() {
-            return mQueued.getLast().getBSSID();
-        }
-
-        @Override
-        public String toString() {
-            return String.format("'%s', retry %d, age %d, BSSIDs: %s",
-                    mFileName, mRetry,
-                    System.currentTimeMillis() - mTimestamp, Utils.bssidsToString(mBssids));
-        }
-    }
-
-    public IconCache(OSUManager osuManager) {
-        mOsuManager = osuManager;
-        mPending = new HashMap<>();
-        mCache = new HashMap<>();
-    }
-
-    public int resolveIcons(Collection<OSUInfo> osuInfos) {
-        Set<EssKey> current = new HashSet<>();
-        int modCount = 0;
-        for (OSUInfo osuInfo : osuInfos) {
-            EssKey key = new EssKey(osuInfo);
-            current.add(key);
-
-            if (osuInfo.getIconStatus() == OSUInfo.IconStatus.NotQueried) {
-                List<IconInfo> iconInfo =
-                        osuInfo.getIconInfo(LOCALE, ICON_TYPES, ICON_WIDTH, ICON_HEIGHT);
-                if (iconInfo.isEmpty()) {
-                    osuInfo.setIconStatus(OSUInfo.IconStatus.NotAvailable);
-                    continue;
-                }
-
-                String fileName = iconInfo.get(0).getFileName();
-                HSIconFileElement iconFileElement = get(key, fileName);
-                if (iconFileElement != null) {
-                    osuInfo.setIconFileElement(iconFileElement, fileName);
-                    Log.d(OSUManager.TAG, "Icon cache hit for " + osuInfo + "/" + fileName);
-                    modCount++;
-                } else {
-                    FileEntry fileEntry = enqueue(key, fileName, osuInfo);
-                    if (fileEntry != null) {
-                        Log.d(OSUManager.TAG, "Initiating icon query for "
-                                + osuInfo + "/" + fileName);
-                        mOsuManager.doIconQuery(osuInfo.getBSSID(), fileName);
-                    } else {
-                        Log.d(OSUManager.TAG, "Piggybacking icon query for "
-                                + osuInfo + "/" + fileName);
-                    }
-                }
-            }
-        }
-
-        // Drop all non-current ESS's
-        Iterator<EssKey> pendingKeys = mPending.keySet().iterator();
-        while (pendingKeys.hasNext()) {
-            EssKey key = pendingKeys.next();
-            if (!current.contains(key)) {
-                pendingKeys.remove();
-            }
-        }
-        Iterator<EssKey> cacheKeys = mCache.keySet().iterator();
-        while (cacheKeys.hasNext()) {
-            EssKey key = cacheKeys.next();
-            if (!current.contains(key)) {
-                cacheKeys.remove();
-            }
-        }
-        return modCount;
-    }
-
-    public HSIconFileElement getIcon(OSUInfo osuInfo) {
-        List<IconInfo> iconInfos = osuInfo.getIconInfo(LOCALE, ICON_TYPES, ICON_WIDTH, ICON_HEIGHT);
-        if (iconInfos == null || iconInfos.isEmpty()) {
-            return null;
-        }
-        EssKey key = new EssKey(osuInfo);
-        Map<String, HSIconFileElement> fileMap = mCache.get(key);
-        return fileMap != null ? fileMap.get(iconInfos.get(0).getFileName()) : null;
-    }
-
-    public int notifyIconReceived(long bssid, String fileName, byte[] iconData) {
-        Log.d(OSUManager.TAG, String.format("Icon '%s':%d received from %012x",
-                fileName, iconData != null ? iconData.length : -1, bssid));
-        if (fileName == null || iconData == null) {
-            return 0;
-        }
-
-        HSIconFileElement iconFileElement;
-        try {
-            iconFileElement = new HSIconFileElement(HSIconFile,
-                    ByteBuffer.wrap(iconData).order(ByteOrder.LITTLE_ENDIAN));
-        } catch (ProtocolException | BufferUnderflowException e) {
-            Log.e(OSUManager.TAG, "Failed to parse ANQP icon file: " + e);
-            return 0;
-        }
-
-        int updates = 0;
-        Iterator<Map.Entry<EssKey, Map<String, FileEntry>>> entries =
-                mPending.entrySet().iterator();
-
-        while (entries.hasNext()) {
-            Map.Entry<EssKey, Map<String, FileEntry>> entry = entries.next();
-
-            Map<String, FileEntry> fileMap = entry.getValue();
-            FileEntry fileEntry = fileMap.get(fileName);
-            updates = fileEntry.update(bssid, iconFileElement);
-            if (updates > 0) {
-                put(entry.getKey(), fileName, iconFileElement);
-                fileMap.remove(fileName);
-                if (fileMap.isEmpty()) {
-                    entries.remove();
-                }
-                break;
-            }
-        }
-        return updates;
-    }
-
-    public void tick(boolean wifiOff) {
-        if (wifiOff) {
-            mPending.clear();
-            mCache.clear();
-            return;
-        }
-
-        Iterator<Map.Entry<EssKey, Map<String, FileEntry>>> entries =
-                mPending.entrySet().iterator();
-
-        long now = System.currentTimeMillis();
-        while (entries.hasNext()) {
-            Map<String, FileEntry> fileMap = entries.next().getValue();
-            Iterator<Map.Entry<String, FileEntry>> fileEntries = fileMap.entrySet().iterator();
-            while (fileEntries.hasNext()) {
-                FileEntry fileEntry = fileEntries.next().getValue();
-                long age = now - fileEntry.getTimestamp();
-                if (age > REQUERY_TIMEOUT || fileEntry.getAndIncrementRetry() > MAX_RETRY) {
-                    fileEntries.remove();
-                } else if (age > REQUERY_TIME) {
-                    mOsuManager.doIconQuery(fileEntry.getLastBssid(), fileEntry.getFileName());
-                }
-            }
-            if (fileMap.isEmpty()) {
-                entries.remove();
-            }
-        }
-    }
-
-    private HSIconFileElement get(EssKey key, String fileName) {
-        Map<String, HSIconFileElement> fileMap = mCache.get(key);
-        if (fileMap == null) {
-            return null;
-        }
-        return fileMap.get(fileName);
-    }
-
-    private void put(EssKey key, String fileName, HSIconFileElement icon) {
-        Map<String, HSIconFileElement> fileMap = mCache.get(key);
-        if (fileMap == null) {
-            fileMap = new HashMap<>();
-            mCache.put(key, fileMap);
-        }
-        fileMap.put(fileName, icon);
-    }
-
-    private FileEntry enqueue(EssKey key, String fileName, OSUInfo osuInfo) {
-        Map<String, FileEntry> entryMap = mPending.get(key);
-        if (entryMap == null) {
-            entryMap = new HashMap<>();
-            mPending.put(key, entryMap);
-        }
-
-        FileEntry fileEntry = entryMap.get(fileName);
-        osuInfo.setIconStatus(OSUInfo.IconStatus.InProgress);
-        if (fileEntry == null) {
-            fileEntry = new FileEntry(osuInfo, fileName);
-            entryMap.put(fileName, fileEntry);
-            return fileEntry;
-        }
-        fileEntry.enqueu(osuInfo);
-        return null;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUCache.java b/packages/Osu/src/com/android/hotspot2/osu/OSUCache.java
deleted file mode 100644
index 260fb72..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUCache.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.net.wifi.AnqpInformationElement;
-import android.net.wifi.ScanResult;
-import android.util.Log;
-
-import com.android.anqp.Constants;
-import com.android.anqp.HSOsuProvidersElement;
-import com.android.anqp.OSUProvider;
-
-import java.net.ProtocolException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * This class holds a stable set of OSU information as well as scan results based on a trail of
- * scan results.
- * The purpose of this class is to provide a stable set of information over a a limited span of
- * time (SCAN_BATCH_HISTORY_SIZE scan batches) so that OSU entries in the selection list does not
- * come and go with temporarily lost scan results.
- * The stable set of scan results are used by the remediation flow to retrieve ANQP information
- * for the current network to determine whether the currently associated network is a roaming
- * network for the Home SP whose timer has currently fired.
- */
-public class OSUCache {
-    private static final int SCAN_BATCH_HISTORY_SIZE = 8;
-
-    private int mInstant;
-    private final Map<OSUProvider, ScanResult> mBatchedOSUs = new HashMap<>();
-    private final Map<OSUProvider, ScanInstance> mCache = new HashMap<>();
-
-    private static class ScanInstance {
-        private final ScanResult mScanResult;
-        private int mInstant;
-
-        private ScanInstance(ScanResult scanResult, int instant) {
-            mScanResult = scanResult;
-            mInstant = instant;
-        }
-
-        public ScanResult getScanResult() {
-            return mScanResult;
-        }
-
-        public int getInstant() {
-            return mInstant;
-        }
-
-        private boolean bssidEqual(ScanResult scanResult) {
-            return mScanResult.BSSID.equals(scanResult.BSSID);
-        }
-
-        private void updateInstant(int newInstant) {
-            mInstant = newInstant;
-        }
-
-        @Override
-        public String toString() {
-            return mScanResult.SSID + " @ " + mInstant;
-        }
-    }
-
-    public OSUCache() {
-        mInstant = 0;
-    }
-
-    private void clear() {
-        mBatchedOSUs.clear();
-    }
-
-    public void clearAll() {
-        clear();
-        mCache.clear();
-    }
-
-    public Map<OSUProvider, ScanResult> pushScanResults(Collection<ScanResult> scanResults) {
-        for (ScanResult scanResult : scanResults) {
-            AnqpInformationElement[] osuInfo = scanResult.anqpElements;
-            if (osuInfo != null && osuInfo.length > 0) {
-                Log.d(OSUManager.TAG, scanResult.SSID +
-                        " has " + osuInfo.length + " ANQP elements");
-                putResult(scanResult, osuInfo);
-            }
-        }
-        return scanEnd();
-    }
-
-    private void putResult(ScanResult scanResult, AnqpInformationElement[] elements) {
-        for (AnqpInformationElement ie : elements) {
-            Log.d(OSUManager.TAG, String.format("ANQP IE %d vid %x size %d", ie.getElementId(),
-                    ie.getVendorId(), ie.getPayload().length));
-            if (ie.getElementId() == AnqpInformationElement.HS_OSU_PROVIDERS
-                    && ie.getVendorId() == AnqpInformationElement.HOTSPOT20_VENDOR_ID) {
-                try {
-                    HSOsuProvidersElement providers = new HSOsuProvidersElement(
-                            Constants.ANQPElementType.HSOSUProviders,
-                            ByteBuffer.wrap(ie.getPayload()).order(ByteOrder.LITTLE_ENDIAN));
-
-                    putProviders(scanResult, providers);
-                } catch (ProtocolException pe) {
-                    Log.w(OSUManager.TAG,
-                            "Failed to parse OSU element: " + pe);
-                }
-            }
-        }
-    }
-
-    private void putProviders(ScanResult scanResult, HSOsuProvidersElement osuProviders) {
-        Log.d(OSUManager.TAG, osuProviders.getProviders().size() + " OSU providers in element");
-        for (OSUProvider provider : osuProviders.getProviders()) {
-            // Make a predictive put
-            ScanResult existing = mBatchedOSUs.put(provider, scanResult);
-            if (existing != null && existing.level > scanResult.level) {
-                // But undo it if the entry already held a better RSSI
-                mBatchedOSUs.put(provider, existing);
-            }
-        }
-    }
-
-    private Map<OSUProvider, ScanResult> scanEnd() {
-        // Update the trail of OSU Providers:
-        int changes = 0;
-        Map<OSUProvider, ScanInstance> aged = new HashMap<>(mCache);
-        for (Map.Entry<OSUProvider, ScanResult> entry : mBatchedOSUs.entrySet()) {
-            ScanInstance current = aged.remove(entry.getKey());
-            if (current == null || !current.bssidEqual(entry.getValue())) {
-                mCache.put(entry.getKey(), new ScanInstance(entry.getValue(), mInstant));
-                changes++;
-                if (current == null) {
-                    Log.d(OSUManager.TAG,
-                            "Add OSU " + entry.getKey() + " from " + entry.getValue().SSID);
-                } else {
-                    Log.d(OSUManager.TAG, "Update OSU " + entry.getKey() + " with " +
-                            entry.getValue().SSID + " to " + current);
-                }
-            } else {
-                Log.d(OSUManager.TAG, "Existing OSU " + entry.getKey() + ", "
-                        + current.getInstant() + " -> " + mInstant);
-                current.updateInstant(mInstant);
-            }
-        }
-
-        for (Map.Entry<OSUProvider, ScanInstance> entry : aged.entrySet()) {
-            if (mInstant - entry.getValue().getInstant() > SCAN_BATCH_HISTORY_SIZE) {
-                Log.d(OSUManager.TAG, "Remove OSU " + entry.getKey() + ", "
-                        + entry.getValue().getInstant() + " @ " + mInstant);
-                mCache.remove(entry.getKey());
-                changes++;
-            }
-        }
-
-        mInstant++;
-        clear();
-
-        // Return the latest results if there were any changes from last batch
-        if (changes > 0) {
-            Map<OSUProvider, ScanResult> results = new HashMap<>(mCache.size());
-            for (Map.Entry<OSUProvider, ScanInstance> entry : mCache.entrySet()) {
-                results.put(entry.getKey(), entry.getValue().getScanResult());
-            }
-            return results;
-        } else {
-            return null;
-        }
-    }
-
-    private static String toBSSIDStrings(Set<Long> bssids) {
-        StringBuilder sb = new StringBuilder();
-        for (Long bssid : bssids) {
-            sb.append(String.format(" %012x", bssid));
-        }
-        return sb.toString();
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUCertType.java b/packages/Osu/src/com/android/hotspot2/osu/OSUCertType.java
deleted file mode 100644
index 91d7f72..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUCertType.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUCertType {
-    CA,
-    Client,
-    AAA,
-    Remediation,
-    Policy,
-    PrivateKey
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUClient.java b/packages/Osu/src/com/android/hotspot2/osu/OSUClient.java
deleted file mode 100644
index 8179a63..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUClient.java
+++ /dev/null
@@ -1,540 +0,0 @@
-package com.android.hotspot2.osu;
-
-/*
- * policy-server.r2-testbed             IN      A       10.123.107.107
- * remediation-server.r2-testbed        IN      A       10.123.107.107
- * subscription-server.r2-testbed       IN      A       10.123.107.107
- * www.r2-testbed                       IN      A       10.123.107.107
- * osu-server.r2-testbed-rks            IN      A       10.123.107.107
- * policy-server.r2-testbed-rks         IN      A       10.123.107.107
- * remediation-server.r2-testbed-rks    IN      A       10.123.107.107
- * subscription-server.r2-testbed-rks   IN      A       10.123.107.107
- */
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.Network;
-import android.util.Log;
-
-import com.android.hotspot2.OMADMAdapter;
-import com.android.hotspot2.est.ESTHandler;
-import com.android.hotspot2.flow.OSUInfo;
-import com.android.hotspot2.flow.PlatformAdapter;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMANode;
-import com.android.hotspot2.osu.commands.BrowserURI;
-import com.android.hotspot2.osu.commands.ClientCertInfo;
-import com.android.hotspot2.osu.commands.GetCertData;
-import com.android.hotspot2.osu.commands.MOData;
-import com.android.hotspot2.osu.service.RedirectListener;
-import com.android.hotspot2.pps.Credential;
-import com.android.hotspot2.pps.HomeSP;
-import com.android.hotspot2.pps.UpdateInfo;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.PrivateKey;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.net.ssl.KeyManager;
-
-public class OSUClient {
-    private static final String TAG = "OSUCLT";
-
-    private final OSUInfo mOSUInfo;
-    private final URL mURL;
-    private final KeyStore mKeyStore;
-    private final Context mContext;
-    private volatile HTTPHandler mHTTPHandler;
-    private volatile RedirectListener mRedirectListener;
-
-    public OSUClient(OSUInfo osuInfo, KeyStore ks, Context context) throws MalformedURLException {
-        mOSUInfo = osuInfo;
-        mURL = new URL(osuInfo.getOSUProvider().getOSUServer());
-        mKeyStore = ks;
-        mContext = context;
-    }
-
-    public OSUClient(String osu, KeyStore ks, Context context) throws MalformedURLException {
-        mOSUInfo = null;
-        mURL = new URL(osu);
-        mKeyStore = ks;
-        mContext = context;
-    }
-
-    public OSUInfo getOSUInfo() {
-        return mOSUInfo;
-    }
-
-    public void provision(PlatformAdapter platformAdapter, Network network, KeyManager km)
-            throws IOException, GeneralSecurityException {
-        try (HTTPHandler httpHandler = new HTTPHandler(StandardCharsets.UTF_8,
-                OSUSocketFactory.getSocketFactory(mKeyStore, null,
-                        OSUFlowManager.FlowType.Provisioning, network, mURL, km, true))) {
-
-            mHTTPHandler = httpHandler;
-
-            SPVerifier spVerifier = new SPVerifier(mOSUInfo);
-            spVerifier.verify(httpHandler.getOSUCertificate(mURL));
-
-            URL redirectURL = prepareUserInput(platformAdapter,
-                    mOSUInfo.getName(Locale.getDefault()));
-            OMADMAdapter omadmAdapter = getOMADMAdapter();
-
-            String regRequest = SOAPBuilder.buildPostDevDataResponse(RequestReason.SubRegistration,
-                    null,
-                    redirectURL.toString(),
-                    omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                    omadmAdapter.getMO(OMAConstants.DevDetailURN));
-            Log.d(TAG, "Registration request: " + regRequest);
-            OSUResponse osuResponse = httpHandler.exchangeSOAP(mURL, regRequest);
-
-            Log.d(TAG, "Response: " + osuResponse);
-            if (osuResponse.getMessageType() != OSUMessageType.PostDevData) {
-                throw new IOException("Expected a PostDevDataResponse");
-            }
-            PostDevDataResponse regResponse = (PostDevDataResponse) osuResponse;
-            String sessionID = regResponse.getSessionID();
-            if (regResponse.getExecCommand() == ExecCommand.UseClientCertTLS) {
-                ClientCertInfo ccInfo = (ClientCertInfo) regResponse.getCommandData();
-                if (ccInfo.doesAcceptMfgCerts()) {
-                    throw new IOException("Mfg certs are not supported in Android");
-                } else if (ccInfo.doesAcceptProviderCerts()) {
-                    ((WiFiKeyManager) km).enableClientAuth(ccInfo.getIssuerNames());
-                    httpHandler.renegotiate(null, null);
-                } else {
-                    throw new IOException("Neither manufacturer nor provider cert specified");
-                }
-                regRequest = SOAPBuilder.buildPostDevDataResponse(RequestReason.SubRegistration,
-                        sessionID,
-                        redirectURL.toString(),
-                        omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                        omadmAdapter.getMO(OMAConstants.DevDetailURN));
-
-                osuResponse = httpHandler.exchangeSOAP(mURL, regRequest);
-                if (osuResponse.getMessageType() != OSUMessageType.PostDevData) {
-                    throw new IOException("Expected a PostDevDataResponse");
-                }
-                regResponse = (PostDevDataResponse) osuResponse;
-            }
-
-            if (regResponse.getExecCommand() != ExecCommand.Browser) {
-                throw new IOException("Expected a launchBrowser command");
-            }
-            Log.d(TAG, "Exec: " + regResponse.getExecCommand() + ", for '" +
-                    regResponse.getCommandData() + "'");
-
-            if (!osuResponse.getSessionID().equals(sessionID)) {
-                throw new IOException("Mismatching session IDs");
-            }
-            String webURL = ((BrowserURI) regResponse.getCommandData()).getURI();
-
-            if (webURL == null) {
-                throw new IOException("No web-url");
-            } else if (!webURL.contains(sessionID)) {
-                throw new IOException("Bad or missing session ID in webURL");
-            }
-
-            if (!startUserInput(new URL(webURL), network)) {
-                throw new IOException("User session failed");
-            }
-
-            Log.d(TAG, " -- Sending user input complete:");
-            String userComplete = SOAPBuilder.buildPostDevDataResponse(RequestReason.InputComplete,
-                    sessionID, null,
-                    omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                    omadmAdapter.getMO(OMAConstants.DevDetailURN));
-            OSUResponse moResponse1 = httpHandler.exchangeSOAP(mURL, userComplete);
-            if (moResponse1.getMessageType() != OSUMessageType.PostDevData) {
-                throw new IOException("Bad user input complete response: " + moResponse1);
-            }
-            PostDevDataResponse provResponse = (PostDevDataResponse) moResponse1;
-            GetCertData estData = checkResponse(provResponse);
-
-            Map<OSUCertType, List<X509Certificate>> certs = new HashMap<>();
-            PrivateKey clientKey = null;
-
-            MOData moData;
-            if (estData == null) {
-                moData = (MOData) provResponse.getCommandData();
-            } else {
-                try (ESTHandler estHandler = new ESTHandler((GetCertData) provResponse.
-                        getCommandData(), network, getOMADMAdapter(),
-                        km, mKeyStore, null, OSUFlowManager.FlowType.Provisioning)) {
-                    estHandler.execute(false);
-                    certs.put(OSUCertType.CA, estHandler.getCACerts());
-                    certs.put(OSUCertType.Client, estHandler.getClientCerts());
-                    clientKey = estHandler.getClientKey();
-                }
-
-                Log.d(TAG, " -- Sending provisioning cert enrollment complete:");
-                String certComplete =
-                        SOAPBuilder.buildPostDevDataResponse(RequestReason.CertEnrollmentComplete,
-                                sessionID, null,
-                                omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                                omadmAdapter.getMO(OMAConstants.DevDetailURN));
-                OSUResponse moResponse2 = httpHandler.exchangeSOAP(mURL, certComplete);
-                if (moResponse2.getMessageType() != OSUMessageType.PostDevData) {
-                    throw new IOException("Bad cert enrollment complete response: " + moResponse2);
-                }
-                PostDevDataResponse provComplete = (PostDevDataResponse) moResponse2;
-                if (provComplete.getStatus() != OSUStatus.ProvComplete ||
-                        provComplete.getOSUCommand() != OSUCommandID.AddMO) {
-                    throw new IOException("Expected addMO: " + provComplete);
-                }
-                moData = (MOData) provComplete.getCommandData();
-            }
-
-            // !!! How can an ExchangeComplete be sent w/o knowing the fate of the certs???
-            String updateResponse = SOAPBuilder.buildUpdateResponse(sessionID, null);
-            Log.d(TAG, " -- Sending updateResponse:");
-            OSUResponse exComplete = httpHandler.exchangeSOAP(mURL, updateResponse);
-            Log.d(TAG, "exComplete response: " + exComplete);
-            if (exComplete.getMessageType() != OSUMessageType.ExchangeComplete) {
-                throw new IOException("Expected ExchangeComplete: " + exComplete);
-            } else if (exComplete.getStatus() != OSUStatus.ExchangeComplete) {
-                throw new IOException("Bad ExchangeComplete status: " + exComplete);
-            }
-
-            retrieveCerts(moData.getMOTree().getRoot(), certs, network, km, mKeyStore);
-            platformAdapter.provisioningComplete(mOSUInfo, moData, certs, clientKey, network);
-        }
-    }
-
-    public void remediate(PlatformAdapter platformAdapter, Network network, KeyManager km,
-            HomeSP homeSP, OSUFlowManager.FlowType flowType)
-            throws IOException, GeneralSecurityException {
-        try (HTTPHandler httpHandler = createHandler(network, homeSP, km, flowType)) {
-
-            mHTTPHandler = httpHandler;
-
-            URL redirectURL = prepareUserInput(platformAdapter, homeSP.getFriendlyName());
-            OMADMAdapter omadmAdapter = getOMADMAdapter();
-
-            String regRequest = SOAPBuilder.buildPostDevDataResponse(RequestReason.SubRemediation,
-                    null,
-                    redirectURL.toString(),
-                    omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                    omadmAdapter.getMO(OMAConstants.DevDetailURN));
-
-            OSUResponse serverResponse = httpHandler.exchangeSOAP(mURL, regRequest);
-            if (serverResponse.getMessageType() != OSUMessageType.PostDevData) {
-                throw new IOException("Expected a PostDevDataResponse");
-            }
-            String sessionID = serverResponse.getSessionID();
-
-            PostDevDataResponse pddResponse = (PostDevDataResponse) serverResponse;
-            Log.d(TAG, "Remediation response: " + pddResponse);
-
-            Map<OSUCertType, List<X509Certificate>> certs = null;
-            PrivateKey clientKey = null;
-
-            if (pddResponse.getStatus() != OSUStatus.RemediationComplete) {
-                if (pddResponse.getExecCommand() == ExecCommand.UploadMO) {
-                    String ulMessage = SOAPBuilder.buildPostDevDataResponse(RequestReason.MOUpload,
-                            null,
-                            redirectURL.toString(),
-                            omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                            omadmAdapter.getMO(OMAConstants.DevDetailURN),
-                            platformAdapter.getMOTree(homeSP));
-
-                    Log.d(TAG, "Upload MO: " + ulMessage);
-
-                    OSUResponse ulResponse = httpHandler.exchangeSOAP(mURL, ulMessage);
-                    if (ulResponse.getMessageType() != OSUMessageType.PostDevData) {
-                        throw new IOException("Expected a PostDevDataResponse to MOUpload");
-                    }
-                    pddResponse = (PostDevDataResponse) ulResponse;
-                }
-
-                if (pddResponse.getExecCommand() == ExecCommand.Browser) {
-                    if (flowType == OSUFlowManager.FlowType.Policy) {
-                        throw new IOException("Browser launch requested in policy flow");
-                    }
-                    String webURL = ((BrowserURI) pddResponse.getCommandData()).getURI();
-
-                    if (webURL == null) {
-                        throw new IOException("No web-url");
-                    } else if (!webURL.contains(sessionID)) {
-                        throw new IOException("Bad or missing session ID in webURL");
-                    }
-
-                    if (!startUserInput(new URL(webURL), network)) {
-                        throw new IOException("User session failed");
-                    }
-
-                    Log.d(TAG, " -- Sending user input complete:");
-                    String userComplete =
-                            SOAPBuilder.buildPostDevDataResponse(RequestReason.InputComplete,
-                                    sessionID, null,
-                                    omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                                    omadmAdapter.getMO(OMAConstants.DevDetailURN));
-
-                    OSUResponse udResponse = httpHandler.exchangeSOAP(mURL, userComplete);
-                    if (udResponse.getMessageType() != OSUMessageType.PostDevData) {
-                        throw new IOException("Bad user input complete response: " + udResponse);
-                    }
-                    pddResponse = (PostDevDataResponse) udResponse;
-                } else if (pddResponse.getExecCommand() == ExecCommand.GetCert) {
-                    certs = new HashMap<>();
-                    try (ESTHandler estHandler = new ESTHandler((GetCertData) pddResponse.
-                            getCommandData(), network, getOMADMAdapter(),
-                            km, mKeyStore, homeSP, flowType)) {
-                        estHandler.execute(true);
-                        certs.put(OSUCertType.CA, estHandler.getCACerts());
-                        certs.put(OSUCertType.Client, estHandler.getClientCerts());
-                        clientKey = estHandler.getClientKey();
-                    }
-
-                    if (httpHandler.isHTTPAuthPerformed()) {        // 8.4.3.6
-                        httpHandler.renegotiate(certs, clientKey);
-                    }
-
-                    Log.d(TAG, " -- Sending remediation cert enrollment complete:");
-                    // 8.4.3.5 in the spec actually prescribes that an update URI is sent here,
-                    // but there is no remediation flow that defines user interaction after EST
-                    // so for now a null is passed.
-                    String certComplete =
-                            SOAPBuilder
-                                    .buildPostDevDataResponse(RequestReason.CertEnrollmentComplete,
-                                            sessionID, null,
-                                            omadmAdapter.getMO(OMAConstants.DevInfoURN),
-                                            omadmAdapter.getMO(OMAConstants.DevDetailURN));
-                    OSUResponse ceResponse = httpHandler.exchangeSOAP(mURL, certComplete);
-                    if (ceResponse.getMessageType() != OSUMessageType.PostDevData) {
-                        throw new IOException("Bad cert enrollment complete response: "
-                                + ceResponse);
-                    }
-                    pddResponse = (PostDevDataResponse) ceResponse;
-                } else {
-                    throw new IOException("Unexpected command: " + pddResponse.getExecCommand());
-                }
-            }
-
-            if (pddResponse.getStatus() != OSUStatus.RemediationComplete) {
-                throw new IOException("Expected a PostDevDataResponse to MOUpload");
-            }
-
-            Log.d(TAG, "Remediation response: " + pddResponse);
-
-            List<MOData> mods = new ArrayList<>();
-            for (OSUCommand command : pddResponse.getCommands()) {
-                if (command.getOSUCommand() == OSUCommandID.UpdateNode) {
-                    mods.add((MOData) command.getCommandData());
-                } else if (command.getOSUCommand() != OSUCommandID.NoMOUpdate) {
-                    throw new IOException("Unexpected OSU response: " + command);
-                }
-            }
-
-            // 1. Machine remediation: Remediation complete + replace node
-            // 2a. User remediation with upload: ExecCommand.UploadMO
-            // 2b. User remediation without upload: ExecCommand.Browser
-            // 3. User remediation only: -> sppPostDevData user input complete
-            //
-            // 4. Update node
-            // 5. -> Update response
-            // 6. Exchange complete
-
-            OSUError error = null;
-
-            String updateResponse = SOAPBuilder.buildUpdateResponse(sessionID, error);
-            Log.d(TAG, " -- Sending updateResponse:");
-            OSUResponse exComplete = httpHandler.exchangeSOAP(mURL, updateResponse);
-            Log.d(TAG, "exComplete response: " + exComplete);
-            if (exComplete.getMessageType() != OSUMessageType.ExchangeComplete) {
-                throw new IOException("Expected ExchangeComplete: " + exComplete);
-            } else if (exComplete.getStatus() != OSUStatus.ExchangeComplete) {
-                throw new IOException("Bad ExchangeComplete status: " + exComplete);
-            }
-
-            // There's a chicken and egg here: If the config is saved before sending update complete
-            // the network is lost and the remediation flow fails.
-            try {
-                platformAdapter.remediationComplete(homeSP, mods, certs, clientKey,
-                        flowType == OSUFlowManager.FlowType.Policy);
-            } catch (IOException | GeneralSecurityException e) {
-                platformAdapter.provisioningFailed(homeSP.getFriendlyName(), e.getMessage());
-                error = OSUError.CommandFailed;
-            }
-        }
-    }
-
-    private OMADMAdapter getOMADMAdapter() {
-        return OMADMAdapter.getInstance(mContext);
-    }
-
-    private URL prepareUserInput(PlatformAdapter platformAdapter, String spName)
-            throws IOException {
-        mRedirectListener = new RedirectListener(platformAdapter, spName);
-        return mRedirectListener.getURL();
-    }
-
-    private boolean startUserInput(URL target, Network network)
-            throws IOException {
-        mRedirectListener.startService();
-
-        Intent intent = new Intent(mContext, OSUWebView.class);
-        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-        intent.putExtra(OSUWebView.OSU_NETWORK, network);
-        intent.putExtra(OSUWebView.OSU_URL, target.toString());
-        mContext.startActivity(intent);
-
-        return mRedirectListener.waitForUser();
-    }
-
-    public void close(boolean abort) {
-        if (mRedirectListener != null) {
-            mRedirectListener.abort();
-            mRedirectListener = null;
-        }
-        if (abort) {
-            try {
-                mHTTPHandler.close();
-            } catch (IOException ioe) {
-                /**/
-            }
-        }
-    }
-
-    private HTTPHandler createHandler(Network network, HomeSP homeSP, KeyManager km,
-            OSUFlowManager.FlowType flowType)
-            throws GeneralSecurityException, IOException {
-        Credential credential = homeSP.getCredential();
-
-        Log.d(TAG, "Credential method " + credential.getEAPMethod().getEAPMethodID());
-        switch (credential.getEAPMethod().getEAPMethodID()) {
-            case EAP_TTLS:
-                String user;
-                byte[] password;
-                UpdateInfo subscriptionUpdate;
-                if (flowType == OSUFlowManager.FlowType.Policy) {
-                    subscriptionUpdate = homeSP.getPolicy() != null ?
-                            homeSP.getPolicy().getPolicyUpdate() : null;
-                } else {
-                    subscriptionUpdate = homeSP.getSubscriptionUpdate();
-                }
-                if (subscriptionUpdate != null && subscriptionUpdate.getUsername() != null) {
-                    user = subscriptionUpdate.getUsername();
-                    password = subscriptionUpdate.getPassword() != null ?
-                            subscriptionUpdate.getPassword().getBytes(StandardCharsets.UTF_8) :
-                            new byte[0];
-                } else {
-                    user = credential.getUserName();
-                    password = credential.getPassword().getBytes(StandardCharsets.UTF_8);
-                }
-                return new HTTPHandler(StandardCharsets.UTF_8,
-                        OSUSocketFactory.getSocketFactory(mKeyStore, homeSP, flowType, network,
-                                mURL, km, true), user, password);
-            case EAP_TLS:
-                return new HTTPHandler(StandardCharsets.UTF_8,
-                        OSUSocketFactory.getSocketFactory(mKeyStore, homeSP, flowType, network,
-                                mURL, km, true));
-            default:
-                throw new IOException("Cannot remediate account with " +
-                        credential.getEAPMethod().getEAPMethodID());
-        }
-    }
-
-    private static GetCertData checkResponse(PostDevDataResponse response) throws IOException {
-        if (response.getStatus() == OSUStatus.ProvComplete &&
-                response.getOSUCommand() == OSUCommandID.AddMO) {
-            return null;
-        }
-
-        if (response.getOSUCommand() == OSUCommandID.Exec &&
-                response.getExecCommand() == ExecCommand.GetCert) {
-            return (GetCertData) response.getCommandData();
-        } else {
-            throw new IOException("Unexpected command: " + response);
-        }
-    }
-
-    private static final String[] AAACertPath =
-            {"PerProviderSubscription", "?", "AAAServerTrustRoot", "*", "CertURL"};
-    private static final String[] RemdCertPath =
-            {"PerProviderSubscription", "?", "SubscriptionUpdate", "TrustRoot", "CertURL"};
-    private static final String[] PolicyCertPath =
-            {"PerProviderSubscription", "?", "Policy", "PolicyUpdate", "TrustRoot", "CertURL"};
-
-    private static void retrieveCerts(OMANode ppsRoot,
-                                      Map<OSUCertType, List<X509Certificate>> certs,
-                                      Network network, KeyManager km, KeyStore ks)
-            throws GeneralSecurityException, IOException {
-
-        List<X509Certificate> aaaCerts = getCerts(ppsRoot, AAACertPath, network, km, ks);
-        certs.put(OSUCertType.AAA, aaaCerts);
-        certs.put(OSUCertType.Remediation, getCerts(ppsRoot, RemdCertPath, network, km, ks));
-        certs.put(OSUCertType.Policy, getCerts(ppsRoot, PolicyCertPath, network, km, ks));
-    }
-
-    private static List<X509Certificate> getCerts(OMANode ppsRoot, String[] path, Network network,
-                                                  KeyManager km, KeyStore ks)
-            throws GeneralSecurityException, IOException {
-        List<String> urls = new ArrayList<>();
-        getCertURLs(ppsRoot, Arrays.asList(path).iterator(), urls);
-        Log.d(TAG, Arrays.toString(path) + ": " + urls);
-
-        List<X509Certificate> certs = new ArrayList<>(urls.size());
-        CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-        for (String urlString : urls) {
-            URL url = new URL(urlString);
-            HTTPHandler httpHandler = new HTTPHandler(StandardCharsets.UTF_8,
-                    OSUSocketFactory.getSocketFactory(ks, null,
-                            OSUFlowManager.FlowType.Provisioning, network, url, km, false));
-
-            certs.add((X509Certificate) certFactory.generateCertificate(httpHandler.doGet(url)));
-        }
-        return certs;
-    }
-
-    private static void getCertURLs(OMANode root, Iterator<String> path, List<String> urls)
-            throws IOException {
-
-        String name = path.next();
-        // Log.d(TAG, "Pulling '" + name + "' out of '" + root.getName() + "'");
-        Collection<OMANode> nodes = null;
-        switch (name) {
-            case "?":
-                for (OMANode node : root.getChildren()) {
-                    if (!node.isLeaf()) {
-                        nodes = Collections.singletonList(node);
-                        break;
-                    }
-                }
-                break;
-            case "*":
-                nodes = root.getChildren();
-                break;
-            default:
-                nodes = Collections.singletonList(root.getChild(name));
-                break;
-        }
-
-        if (nodes == null) {
-            throw new IllegalArgumentException("No matching node in " + root.getName()
-                    + " for " + name);
-        }
-
-        for (OMANode node : nodes) {
-            if (path.hasNext()) {
-                getCertURLs(node, path, urls);
-            } else {
-                urls.add(node.getValue());
-            }
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUCommand.java b/packages/Osu/src/com/android/hotspot2/osu/OSUCommand.java
deleted file mode 100644
index 4730377..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUCommand.java
+++ /dev/null
@@ -1,130 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-import com.android.hotspot2.osu.commands.BrowserURI;
-import com.android.hotspot2.osu.commands.ClientCertInfo;
-import com.android.hotspot2.osu.commands.GetCertData;
-import com.android.hotspot2.osu.commands.MOData;
-import com.android.hotspot2.osu.commands.MOURN;
-import com.android.hotspot2.osu.commands.OSUCommandData;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class OSUCommand {
-    private final OSUCommandID mOSUCommand;
-    private final ExecCommand mExecCommand;
-    private final OSUCommandData mCommandData;
-
-    private static final Map<String, OSUCommandID> sCommands = new HashMap<>();
-    private static final Map<String, ExecCommand> sExecs = new HashMap<>();
-
-    static {
-        sCommands.put("exec", OSUCommandID.Exec);
-        sCommands.put("addmo", OSUCommandID.AddMO);
-        sCommands.put("updatenode", OSUCommandID.UpdateNode);      // Multi
-        sCommands.put("nomoupdate", OSUCommandID.NoMOUpdate);
-
-        sExecs.put("launchbrowsertouri", ExecCommand.Browser);
-        sExecs.put("getcertificate", ExecCommand.GetCert);
-        sExecs.put("useclientcerttls", ExecCommand.UseClientCertTLS);
-        sExecs.put("uploadmo", ExecCommand.UploadMO);
-    }
-
-    public OSUCommand(XMLNode child) throws OMAException {
-        mOSUCommand = sCommands.get(child.getStrippedTag());
-
-        switch (mOSUCommand) {
-            case Exec:
-                /*
-                 * Receipt of this element by a mobile device causes the following command
-                 * to be executed.
-                 */
-                child = child.getSoleChild();
-                mExecCommand = sExecs.get(child.getStrippedTag());
-                if (mExecCommand == null) {
-                    throw new OMAException("Unrecognized exec command: " + child.getStrippedTag());
-                }
-                switch (mExecCommand) {
-                    case Browser:
-                        /*
-                         * When the mobile device receives this command, it launches its default
-                         * browser to the URI contained in this element. The URI must use HTTPS as
-                         * the protocol and must contain an FQDN.
-                         */
-                        mCommandData = new BrowserURI(child);
-                        break;
-                    case GetCert:
-                        mCommandData = new GetCertData(child);
-                        break;
-                    case UploadMO:
-                        mCommandData = new MOURN(child);
-                        break;
-                    case UseClientCertTLS:
-                        /*
-                         * Command to mobile to re-negotiate the TLS connection using a client
-                         * certificate of the accepted type or Issuer to authenticate with the
-                         * Subscription server.
-                         */
-                        mCommandData = new ClientCertInfo(child);
-                        break;
-                    default:
-                        mCommandData = null;
-                        break;
-                }
-                break;
-            case AddMO:
-                /*
-                 * This command causes an management object in the mobile devices management tree
-                 * at the specified location to be added.
-                 * If there is already a management object at that location, the object is replaced.
-                 */
-                mExecCommand = null;
-                mCommandData = new MOData(child);
-                break;
-            case UpdateNode:
-                /*
-                 * This command causes the update of an interior node and its child nodes (if any)
-                 * at the location specified in the management tree URI attribute. The content of
-                 * this element is the MO node XML.
-                 */
-                mExecCommand = null;
-                mCommandData = new MOData(child);
-                break;
-            case NoMOUpdate:
-                /*
-                 * This response is used when there is no command to be executed nor update of
-                 * any MO required.
-                 */
-                mExecCommand = null;
-                mCommandData = null;
-                break;
-            default:
-                mExecCommand = null;
-                mCommandData = null;
-                break;
-        }
-    }
-
-    public OSUCommandID getOSUCommand() {
-        return mOSUCommand;
-    }
-
-    public ExecCommand getExecCommand() {
-        return mExecCommand;
-    }
-
-    public OSUCommandData getCommandData() {
-        return mCommandData;
-    }
-
-    @Override
-    public String toString() {
-        return "OSUCommand{" +
-                "OSUCommand=" + mOSUCommand +
-                ", execCommand=" + mExecCommand +
-                ", commandData=" + mCommandData +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUCommandID.java b/packages/Osu/src/com/android/hotspot2/osu/OSUCommandID.java
deleted file mode 100644
index eca953f..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUCommandID.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUCommandID {
-    Exec, AddMO, UpdateNode, NoMOUpdate
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUError.java b/packages/Osu/src/com/android/hotspot2/osu/OSUError.java
deleted file mode 100644
index 2fa7de0..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUError.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUError {
-    SPPversionNotSupported,
-    MOsNotSupported,
-    CredentialsFailure,
-    RemediationFailure,
-    ProvisioningFailed,
-    ExistingCertificate,
-    CookieInvalid,
-    WebSessionID,
-    PermissionDenied,
-    CommandFailed,
-    MOaddOrUpdateFailed,
-    DeviceFull,
-    BadTreeURI,
-    TooLarge,
-    CommandNotAllowed,
-    UserAborted,
-    NotFound,
-    Other
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUFlowManager.java b/packages/Osu/src/com/android/hotspot2/osu/OSUFlowManager.java
deleted file mode 100644
index 0123d69..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUFlowManager.java
+++ /dev/null
@@ -1,392 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.content.Context;
-import android.content.Intent;
-import android.net.Network;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.os.SystemClock;
-import android.util.Log;
-
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.flow.FlowService;
-import com.android.hotspot2.flow.OSUInfo;
-import com.android.hotspot2.flow.PlatformAdapter;
-import com.android.hotspot2.pps.HomeSP;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import javax.net.ssl.KeyManager;
-
-public class OSUFlowManager {
-    private static final boolean MATCH_BSSID = false;
-    private static final long WAIT_QUANTA = 10000L;
-    private static final long WAIT_TIMEOUT = 1800000L;
-
-    private final Context mContext;
-    private final LinkedList<OSUFlow> mQueue;
-    private FlowWorker mWorker;
-    private OSUFlow mCurrent;
-
-    public OSUFlowManager(Context context) {
-        mContext = context;
-        mQueue = new LinkedList<>();
-    }
-
-    public enum FlowType {Provisioning, Remediation, Policy}
-
-    public static class OSUFlow implements Runnable {
-        private final OSUClient mOSUClient;
-        private final PlatformAdapter mPlatformAdapter;
-        private final HomeSP mHomeSP;
-        private final String mSpName;
-        private final FlowType mFlowType;
-        private final KeyManager mKeyManager;
-        private final Object mNetworkLock = new Object();
-        private final Network mNetwork;
-        private Network mResultNetwork;
-        private boolean mNetworkCreated;
-        private int mWifiNetworkId;
-        private volatile long mLaunchTime;
-        private volatile boolean mAborted;
-
-        /**
-         * A policy flow.
-         * @param osuInfo The OSU information for the flow (SSID, BSSID, URL)
-         * @param platformAdapter the platform adapter
-         * @param km A key manager for TLS
-         * @throws MalformedURLException
-         */
-        public OSUFlow(OSUInfo osuInfo, PlatformAdapter platformAdapter, KeyManager km)
-                throws MalformedURLException {
-
-            mWifiNetworkId = -1;
-            mNetwork = null;
-            mOSUClient = new OSUClient(osuInfo,
-                    platformAdapter.getKeyStore(), platformAdapter.getContext());
-            mPlatformAdapter = platformAdapter;
-            mHomeSP = null;
-            mSpName = osuInfo.getName(OSUManager.LOCALE);
-            mFlowType = FlowType.Provisioning;
-            mKeyManager = km;
-        }
-
-        /**
-         * A Remediation flow for credential or policy provisioning.
-         * @param network The network to use, only set for timed provisioning
-         * @param osuURL The URL to connect to.
-         * @param platformAdapter the platform adapter
-         * @param km A key manager for TLS
-         * @param homeSP The Home SP to which this remediation flow pertains.
-         * @param flowType Remediation or Policy
-         * @throws MalformedURLException
-         */
-        public OSUFlow(Network network, String osuURL,
-                       PlatformAdapter platformAdapter, KeyManager km, HomeSP homeSP,
-                       FlowType flowType) throws MalformedURLException {
-
-            mNetwork = network;
-            mWifiNetworkId = network.netId;
-            mOSUClient = new OSUClient(osuURL,
-                    platformAdapter.getKeyStore(), platformAdapter.getContext());
-            mPlatformAdapter = platformAdapter;
-            mHomeSP = homeSP;
-            mSpName = homeSP.getFriendlyName();
-            mFlowType = flowType;
-            mKeyManager = km;
-        }
-
-        private boolean deleteNetwork(OSUFlow next) {
-            synchronized (mNetworkLock) {
-                if (!mNetworkCreated) {
-                    return false;
-                } else if (next.getFlowType() != FlowType.Provisioning) {
-                    return true;
-                }
-                OSUInfo thisInfo = mOSUClient.getOSUInfo();
-                OSUInfo thatInfo = next.mOSUClient.getOSUInfo();
-                if (thisInfo.getOsuSsid().equals(thatInfo.getOsuSsid())
-                        && thisInfo.getOSUBssid() == thatInfo.getOSUBssid()) {
-                    // Reuse the OSU network from previous and carry forward the creation fact.
-                    mNetworkCreated = true;
-                    return false;
-                } else {
-                    return true;
-                }
-            }
-        }
-
-        private Network connect() throws IOException {
-            Network network = networkMatch();
-
-            synchronized (mNetworkLock) {
-                mResultNetwork = network;
-                if (mResultNetwork != null) {
-                    return mResultNetwork;
-                }
-            }
-
-            Log.d(OSUManager.TAG, "No network match for " + toString());
-
-            int osuNetworkId = -1;
-            boolean created = false;
-
-            if (mFlowType == FlowType.Provisioning) {
-                osuNetworkId = mPlatformAdapter.connect(mOSUClient.getOSUInfo());
-                created = true;
-            }
-
-            synchronized (mNetworkLock) {
-                mNetworkCreated = created;
-                if (created) {
-                    mWifiNetworkId = osuNetworkId;
-                }
-                Log.d(OSUManager.TAG, String.format("%s waiting for %snet ID %d",
-                        toString(), created ? "created " : "existing ", osuNetworkId));
-
-                while (mResultNetwork == null && !mAborted) {
-                    try {
-                        mNetworkLock.wait();
-                    } catch (InterruptedException ie) {
-                        throw new IOException("Interrupted");
-                    }
-                }
-                if (mAborted) {
-                    throw new IOException("Aborted");
-                }
-                Utils.delay(500L);
-            }
-            return mResultNetwork;
-        }
-
-        private Network networkMatch() {
-            if (mFlowType == FlowType.Provisioning) {
-                OSUInfo match = mOSUClient.getOSUInfo();
-                WifiConfiguration config = mPlatformAdapter.getActiveWifiConfig();
-                if (config != null && bssidMatch(match, mPlatformAdapter)
-                        && Utils.decodeSsid(config.SSID).equals(match.getOsuSsid())) {
-                    synchronized (mNetworkLock) {
-                        mWifiNetworkId = config.networkId;
-                    }
-                    return mPlatformAdapter.getCurrentNetwork();
-                }
-            } else {
-                WifiConfiguration config = mPlatformAdapter.getActiveWifiConfig();
-                synchronized (mNetworkLock) {
-                    mWifiNetworkId = config != null ? config.networkId : -1;
-                }
-                return mNetwork;
-            }
-            return null;
-        }
-
-        private void networkChange() {
-            WifiInfo connectionInfo = mPlatformAdapter.getConnectionInfo();
-            if (connectionInfo == null) {
-                return;
-            }
-            Network network = mPlatformAdapter.getCurrentNetwork();
-            Log.d(OSUManager.TAG, "New network " + network
-                    + ", current OSU " + mOSUClient.getOSUInfo() +
-                    ", addr " + Utils.toIpString(connectionInfo.getIpAddress()));
-
-            synchronized (mNetworkLock) {
-                if (mResultNetwork == null && network != null && connectionInfo.getIpAddress() != 0
-                        && connectionInfo.getNetworkId() == mWifiNetworkId) {
-                    mResultNetwork = network;
-                    mNetworkLock.notifyAll();
-                }
-            }
-        }
-
-        public boolean createdNetwork() {
-            synchronized (mNetworkLock) {
-                return mNetworkCreated;
-            }
-        }
-
-        public FlowType getFlowType() {
-            return mFlowType;
-        }
-
-        public PlatformAdapter getPlatformAdapter() {
-            return mPlatformAdapter;
-        }
-
-        private void setLaunchTime() {
-            mLaunchTime = SystemClock.currentThreadTimeMillis();
-        }
-
-        public long getLaunchTime() {
-            return mLaunchTime;
-        }
-
-        private int getWifiNetworkId() {
-            synchronized (mNetworkLock) {
-                return mWifiNetworkId;
-            }
-        }
-
-        @Override
-        public void run() {
-            try {
-                Network network = connect();
-                Log.d(OSUManager.TAG, "OSU SSID Associated at " + network);
-
-                if (mFlowType == FlowType.Provisioning) {
-                    mOSUClient.provision(mPlatformAdapter, network, mKeyManager);
-                } else {
-                    mOSUClient.remediate(mPlatformAdapter, network,
-                            mKeyManager, mHomeSP, mFlowType);
-                }
-            } catch (Throwable t) {
-                if (mAborted) {
-                    Log.d(OSUManager.TAG, "OSU flow aborted: " + t, t);
-                } else {
-                    Log.w(OSUManager.TAG, "OSU flow failed: " + t, t);
-                    mPlatformAdapter.provisioningFailed(mSpName, t.getMessage());
-                }
-            } finally {
-                if (!mAborted) {
-                    mOSUClient.close(false);
-                }
-            }
-        }
-
-        public void abort() {
-            synchronized (mNetworkLock) {
-                mAborted = true;
-                mNetworkLock.notifyAll();
-            }
-            // Sockets cannot be closed on the main thread...
-            // TODO: Might want to change this to a handler.
-            new Thread() {
-                @Override
-                public void run() {
-                    try {
-                        mOSUClient.close(true);
-                    } catch (Throwable t) {
-                        Log.d(OSUManager.TAG, "Exception aborting " + toString());
-                    }
-                }
-            }.start();
-        }
-
-        @Override
-        public String toString() {
-            return mFlowType + " for " + mSpName;
-        }
-    }
-
-    private class FlowWorker extends Thread {
-        private final PlatformAdapter mPlatformAdapter;
-
-        private FlowWorker(PlatformAdapter platformAdapter) {
-            mPlatformAdapter = platformAdapter;
-        }
-
-        @Override
-        public void run() {
-            for (; ; ) {
-                synchronized (mQueue) {
-                    if (mCurrent != null && mCurrent.createdNetwork()
-                            && (mQueue.isEmpty() || mCurrent.deleteNetwork(mQueue.getLast()))) {
-                        mPlatformAdapter.deleteNetwork(mCurrent.getWifiNetworkId());
-                    }
-
-                    mCurrent = null;
-                    while (mQueue.isEmpty()) {
-                        try {
-                            mQueue.wait(WAIT_QUANTA);
-                        } catch (InterruptedException ie) {
-                            return;
-                        }
-                        if (mQueue.isEmpty()) {
-                            // Bail out on time out
-                            Log.d(OSUManager.TAG, "Flow worker terminating.");
-                            mWorker = null;
-                            mContext.stopService(new Intent(mContext, FlowService.class));
-                            return;
-                        }
-                    }
-                    mCurrent = mQueue.removeLast();
-                    mCurrent.setLaunchTime();
-                }
-                Log.d(OSUManager.TAG, "Starting " + mCurrent);
-                mCurrent.run();
-                Log.d(OSUManager.TAG, "Exiting " + mCurrent);
-            }
-        }
-    }
-
-    /*
-     * Provisioning:    Wait until there is an active WiFi info and the active WiFi config
-     *                  matches SSID and optionally BSSID.
-     * WNM Remediation: Wait until the active WiFi info matches BSSID.
-     * Timed remediation: The network is given (may be cellular).
-     */
-
-    public void appendFlow(OSUFlow flow) {
-        synchronized (mQueue) {
-            if (mCurrent != null &&
-                    SystemClock.currentThreadTimeMillis()
-                            - mCurrent.getLaunchTime() >= WAIT_TIMEOUT) {
-                Log.d(OSUManager.TAG, "Aborting stale OSU flow " + mCurrent);
-                mCurrent.abort();
-                mCurrent = null;
-            }
-
-            if (flow.getFlowType() == FlowType.Provisioning) {
-                // Kill any outstanding provisioning flows.
-                Iterator<OSUFlow> flows = mQueue.iterator();
-                while (flows.hasNext()) {
-                    if (flows.next().getFlowType() == FlowType.Provisioning) {
-                        flows.remove();
-                    }
-                }
-
-                if (mCurrent != null
-                        && mCurrent.getFlowType() == FlowType.Provisioning) {
-                    Log.d(OSUManager.TAG, "Aborting current provisioning flow " + mCurrent);
-                    mCurrent.abort();
-                    mCurrent = null;
-                }
-
-                mQueue.addLast(flow);
-            } else {
-                mQueue.addFirst(flow);
-            }
-
-            if (mWorker == null) {
-                // TODO: Might want to change this to a handler.
-                mWorker = new FlowWorker(flow.getPlatformAdapter());
-                mWorker.start();
-            }
-
-            mQueue.notifyAll();
-        }
-    }
-
-    public void networkChange() {
-        OSUFlow pending;
-        synchronized (mQueue) {
-            pending = mCurrent;
-        }
-        Log.d(OSUManager.TAG, "Network change, current flow: " + pending);
-        if (pending != null) {
-            pending.networkChange();
-        }
-    }
-
-    private static boolean bssidMatch(OSUInfo osuInfo, PlatformAdapter platformAdapter) {
-        if (MATCH_BSSID) {
-            WifiInfo wifiInfo = platformAdapter.getConnectionInfo();
-            return wifiInfo != null && Utils.parseMac(wifiInfo.getBSSID()) == osuInfo.getOSUBssid();
-        } else {
-            return true;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUListener.java b/packages/Osu/src/com/android/hotspot2/osu/OSUListener.java
deleted file mode 100644
index 9197620..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUListener.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.hotspot2.osu;
-
-public interface OSUListener {
-    public void osuNotification(int count);
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUManager.java b/packages/Osu/src/com/android/hotspot2/osu/OSUManager.java
deleted file mode 100644
index 24cd10f..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUManager.java
+++ /dev/null
@@ -1,264 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.net.wifi.ScanResult;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-
-import com.android.anqp.HSIconFileElement;
-import com.android.anqp.OSUProvider;
-import com.android.hotspot2.AppBridge;
-import com.android.hotspot2.PasspointMatch;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.app.OSUData;
-import com.android.hotspot2.flow.FlowService;
-import com.android.hotspot2.flow.OSUInfo;
-import com.android.hotspot2.osu.service.RemediationHandler;
-import com.android.hotspot2.flow.IFlowService;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-public class OSUManager {
-    public static final String TAG = "OSUMGR";
-    public static final boolean R2_MOCK = true;
-    private static final String REMEDIATION_FILE = "remediation.state";
-
-    // Preferred icon parameters
-    public static final Locale LOCALE = java.util.Locale.getDefault();
-
-    private final AppBridge mAppBridge;
-    private final Context mContext;
-    private final IconCache mIconCache;
-    private final RemediationHandler mRemediationHandler;
-    private final Set<String> mOSUSSIDs = new HashSet<>();
-    private final Map<OSUProvider, OSUInfo> mOSUMap = new HashMap<>();
-    private final AtomicInteger mOSUSequence = new AtomicInteger();
-
-    private final OSUCache mOSUCache;
-
-    public OSUManager(Context context) {
-        mContext = context;
-        mAppBridge = new AppBridge(context);
-        mIconCache = new IconCache(this);
-        File appFolder = context.getFilesDir();
-        mRemediationHandler =
-                new RemediationHandler(context, new File(appFolder, REMEDIATION_FILE));
-        mOSUCache = new OSUCache();
-    }
-
-    public Context getContext() {
-        return mContext;
-    }
-
-    public List<OSUData> getAvailableOSUs() {
-        synchronized (mOSUMap) {
-            List<OSUData> completeOSUs = new ArrayList<>();
-            for (OSUInfo osuInfo : mOSUMap.values()) {
-                if (osuInfo.getIconStatus() == OSUInfo.IconStatus.Available) {
-                    completeOSUs.add(new OSUData(osuInfo));
-                }
-            }
-            return completeOSUs;
-        }
-    }
-
-    public void setOSUSelection(int osuID) {
-        OSUInfo selection = null;
-        for (OSUInfo osuInfo : mOSUMap.values()) {
-            if (osuInfo.getOsuID() == osuID &&
-                    osuInfo.getIconStatus() == OSUInfo.IconStatus.Available) {
-                selection = osuInfo;
-                break;
-            }
-        }
-
-        Log.d(TAG, "Selected OSU ID " + osuID + ": " + selection);
-
-        if (selection == null) {
-            return;
-        }
-
-        final OSUInfo osu = selection;
-
-        mContext.bindService(new Intent(mContext, FlowService.class), new ServiceConnection() {
-            @Override
-            public void onServiceConnected(ComponentName name, IBinder service) {
-                try {
-                    IFlowService fs = IFlowService.Stub.asInterface(service);
-                    fs.provision(osu);
-                } catch (RemoteException re) {
-                    Log.e(OSUManager.TAG, "Caught re: " + re);
-                }
-            }
-
-            @Override
-            public void onServiceDisconnected(ComponentName name) {
-                Log.d(OSUManager.TAG, "Service disconnect: " + name);
-            }
-        }, Context.BIND_AUTO_CREATE);
-    }
-
-    public void networkDeleted(final WifiConfiguration configuration) {
-        if (configuration.FQDN == null) {
-            return;
-        }
-
-        mRemediationHandler.networkConfigChange();
-        mContext.bindService(new Intent(mContext, FlowService.class), new ServiceConnection() {
-            @Override
-            public void onServiceConnected(ComponentName name, IBinder service) {
-                try {
-                    IFlowService fs = IFlowService.Stub.asInterface(service);
-                    fs.spDeleted(configuration.FQDN);
-                } catch (RemoteException re) {
-                    Log.e(OSUManager.TAG, "Caught re: " + re);
-                }
-            }
-
-            @Override
-            public void onServiceDisconnected(ComponentName name) {
-
-            }
-        }, Context.BIND_AUTO_CREATE);
-    }
-
-    public void networkConnectChange(WifiInfo newNetwork) {
-        mRemediationHandler.newConnection(newNetwork);
-    }
-
-    public void networkConfigChanged() {
-        mRemediationHandler.networkConfigChange();
-    }
-
-    public void wifiStateChange(boolean on) {
-        if (on) {
-            return;
-        }
-
-        // Notify the remediation handler that there are no WiFi networks available.
-        // Do NOT turn it off though as remediation, per at least this implementation, can take
-        // place over cellular. The subject of remediation over cellular (when restriction is
-        // "unrestricted") is not addresses by the WFA spec and direct ask to authors gives no
-        // distinct answer one way or the other.
-        mRemediationHandler.newConnection(null);
-        int current = mOSUMap.size();
-        mOSUMap.clear();
-        mOSUCache.clearAll();
-        mIconCache.tick(true);
-        if (current > 0) {
-            notifyOSUCount();
-        }
-    }
-
-    public boolean isOSU(String ssid) {
-        synchronized (mOSUMap) {
-            return mOSUSSIDs.contains(ssid);
-        }
-    }
-
-    public void pushScanResults(Collection<ScanResult> scanResults) {
-        Map<OSUProvider, ScanResult> results = mOSUCache.pushScanResults(scanResults);
-        if (results != null) {
-            updateOSUInfoCache(results);
-        }
-        mIconCache.tick(false);
-    }
-
-    private void updateOSUInfoCache(Map<OSUProvider, ScanResult> results) {
-        Map<OSUProvider, OSUInfo> osus = new HashMap<>();
-        for (Map.Entry<OSUProvider, ScanResult> entry : results.entrySet()) {
-            OSUInfo existing = mOSUMap.get(entry.getKey());
-            long bssid = Utils.parseMac(entry.getValue().BSSID);
-
-            if (existing == null) {
-                osus.put(entry.getKey(), new OSUInfo(entry.getValue(), entry.getKey(),
-                        mOSUSequence.getAndIncrement()));
-            } else if (existing.getBSSID() != bssid) {
-                HSIconFileElement icon = mIconCache.getIcon(existing);
-                if (icon != null && icon.equals(existing.getIconFileElement())) {
-                    OSUInfo osuInfo = new OSUInfo(entry.getValue(), entry.getKey(),
-                            existing.getOsuID());
-                    osuInfo.setIconFileElement(icon, existing.getIconFileName());
-                    osus.put(entry.getKey(), osuInfo);
-                } else {
-                    osus.put(entry.getKey(), new OSUInfo(entry.getValue(),
-                            entry.getKey(), mOSUSequence.getAndIncrement()));
-                }
-            } else {
-                // Maintain existing entries.
-                osus.put(entry.getKey(), existing);
-            }
-        }
-
-        mOSUMap.clear();
-        mOSUMap.putAll(osus);
-
-        mOSUSSIDs.clear();
-        for (OSUInfo osuInfo : mOSUMap.values()) {
-            mOSUSSIDs.add(osuInfo.getOsuSsid());
-        }
-
-        int mods = mIconCache.resolveIcons(mOSUMap.values());
-
-        if (mOSUMap.isEmpty() || mods > 0) {
-            notifyOSUCount();
-        }
-    }
-
-    public void notifyIconReceived(long bssid, String fileName, byte[] data) {
-        if (mIconCache.notifyIconReceived(bssid, fileName, data) > 0) {
-            notifyOSUCount();
-        }
-    }
-
-    public void doIconQuery(long bssid, String fileName) {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        wifiManager.queryPasspointIcon(bssid, fileName);
-    }
-
-    private void notifyOSUCount() {
-        int count = 0;
-        for (OSUInfo existing : mOSUMap.values()) {
-            if (existing.getIconStatus() == OSUInfo.IconStatus.Available) {
-                count++;
-            }
-        }
-        Log.d(TAG, "Latest OSU info: " + count + " with icons, map " + mOSUMap);
-        mAppBridge.showOsuCount(count);
-    }
-
-    public void deauth(long bssid, boolean ess, int delay, String url)
-            throws MalformedURLException {
-        Log.d(TAG, String.format("De-auth imminent on %s, delay %ss to '%s'",
-                ess ? "ess" : "bss", delay, url));
-        // TODO: Missing framework functionality:
-        // mWifiNetworkAdapter.setHoldoffTime(delay * Constants.MILLIS_IN_A_SEC, ess);
-        String spName = mRemediationHandler.getCurrentSpName();
-        mAppBridge.showDeauth(spName, ess, delay, url);
-    }
-
-    public void wnmRemediate(final long bssid, final String url, PasspointMatch match) {
-        mRemediationHandler.wnmReceived(bssid, url);
-    }
-
-    public void remediationDone(String fqdn, boolean policy) {
-        mRemediationHandler.remediationDone(fqdn, policy);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUMessageType.java b/packages/Osu/src/com/android/hotspot2/osu/OSUMessageType.java
deleted file mode 100644
index 8c1b50a..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUMessageType.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUMessageType {
-    PostDevData, ExchangeComplete, GetCertificate, Error
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUOperationStatus.java b/packages/Osu/src/com/android/hotspot2/osu/OSUOperationStatus.java
deleted file mode 100644
index ddda89c..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUOperationStatus.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUOperationStatus {
-    UserInputComplete,
-    UserInputAborted,
-    ProvisioningSuccess,
-    ProvisioningFailure
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUResponse.java b/packages/Osu/src/com/android/hotspot2/osu/OSUResponse.java
deleted file mode 100644
index 1e4398d..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUResponse.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public abstract class OSUResponse {
-    private static final String SPPVersionAttribute = "sppVersion";
-    private static final String SPPStatusAttribute = "sppStatus";
-    private static final String SPPSessionIDAttribute = "sessionID";
-
-    private final OSUMessageType mMessageType;
-    private final String mVersion;
-    private final String mSessionID;
-    private final OSUStatus mStatus;
-    private final OSUError mError;
-    private final Map<String, String> mAttributes;
-
-    protected OSUResponse(XMLNode root, OSUMessageType messageType, String... attributes)
-            throws OMAException {
-        mMessageType = messageType;
-        String ns = root.getNameSpace() + ":";
-        mVersion = root.getAttributeValue(ns + SPPVersionAttribute);
-        mSessionID = root.getAttributeValue(ns + SPPSessionIDAttribute);
-
-        String status = root.getAttributeValue(ns + SPPStatusAttribute);
-        if (status == null) {
-            throw new OMAException("Missing status");
-        }
-        mStatus = OMAConstants.mapStatus(status);
-
-        if (mVersion == null || mSessionID == null || mStatus == null) {
-            throw new OMAException("Incomplete request: " + root.getAttributes());
-        }
-
-        if (attributes != null) {
-            mAttributes = new HashMap<>();
-            for (String attribute : attributes) {
-                String value = root.getAttributeValue(ns + attribute);
-                if (value == null) {
-                    throw new OMAException("Missing attribute: " + attribute);
-                }
-                mAttributes.put(attribute, value);
-            }
-        } else {
-            mAttributes = null;
-        }
-
-        if (mStatus == OSUStatus.Error) {
-            OSUError error = null;
-            String errorTag = ns + "sppError";
-            for (XMLNode child : root.getChildren()) {
-                if (child.getTag().equals(errorTag)) {
-                    error = OMAConstants.mapError(child.getAttributeValue("errorCode"));
-                    break;
-                }
-            }
-            mError = error;
-        } else {
-            mError = null;
-        }
-    }
-
-    public OSUMessageType getMessageType() {
-        return mMessageType;
-    }
-
-    public String getVersion() {
-        return mVersion;
-    }
-
-    public String getSessionID() {
-        return mSessionID;
-    }
-
-    public OSUStatus getStatus() {
-        return mStatus;
-    }
-
-    public OSUError getError() {
-        return mError;
-    }
-
-    protected Map<String, String> getAttributes() {
-        return mAttributes;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("%s version '%s', status %s, session-id '%s'%s",
-                mMessageType, mVersion, mStatus, mSessionID, mError != null
-                        ? (" (" + mError + ")") : "");
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUSocketFactory.java b/packages/Osu/src/com/android/hotspot2/osu/OSUSocketFactory.java
deleted file mode 100644
index 1f5547b..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUSocketFactory.java
+++ /dev/null
@@ -1,451 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.net.Network;
-import android.util.Base64;
-import android.util.Log;
-
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.flow.PlatformAdapter;
-import com.android.hotspot2.pps.HomeSP;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.URL;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.PrivateKey;
-import java.security.cert.CertPath;
-import java.security.cert.CertPathValidator;
-import java.security.cert.CertPathValidatorException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.PKIXCertPathChecker;
-import java.security.cert.PKIXParameters;
-import java.security.cert.TrustAnchor;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.X509TrustManager;
-
-public class OSUSocketFactory {
-    private static final long ConnectionTimeout = 10000L;
-    private static final long ReconnectWait = 2000L;
-
-    private static final String SecureHTTP = "https";
-    private static final String UnsecureHTTP = "http";
-    private static final String EKU_ID = "2.5.29.37";
-    private static final Set<String> EKU_ID_SET = new HashSet<>(Arrays.asList(EKU_ID));
-    private static final EKUChecker sEKUChecker = new EKUChecker();
-
-    private final Network mNetwork;
-    private final SocketFactory mSocketFactory;
-    private final KeyManager mKeyManager;
-    private final WFATrustManager mTrustManager;
-    private final List<InetSocketAddress> mRemotes;
-
-    public static Set<X509Certificate> buildCertSet() {
-        try {
-            CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-            Set<X509Certificate> set = new HashSet<>();
-            for (String b64 : WFACerts) {
-                ByteArrayInputStream bis = new ByteArrayInputStream(
-                        Base64.decode(b64, Base64.DEFAULT));
-                X509Certificate cert = (X509Certificate) certFactory.generateCertificate(bis);
-                set.add(cert);
-            }
-            return set;
-        } catch (CertificateException ce) {
-            Log.e(OSUManager.TAG, "Cannot build CA cert set");
-            return null;
-        }
-    }
-
-    public static OSUSocketFactory getSocketFactory(KeyStore ks, HomeSP homeSP,
-                                                    OSUFlowManager.FlowType flowType,
-                                                    Network network, URL url, KeyManager km,
-                                                    boolean enforceSecurity)
-            throws GeneralSecurityException, IOException {
-
-        if (enforceSecurity && !url.getProtocol().equalsIgnoreCase(SecureHTTP)) {
-            throw new IOException("Protocol '" + url.getProtocol() + "' is not secure");
-        }
-        return new OSUSocketFactory(ks, homeSP, flowType, network, url, km);
-    }
-
-    private OSUSocketFactory(KeyStore ks, HomeSP homeSP, OSUFlowManager.FlowType flowType,
-                             Network network,
-                             URL url, KeyManager km) throws GeneralSecurityException, IOException {
-        mNetwork = network;
-        mKeyManager = km;
-        mTrustManager = new WFATrustManager(ks, homeSP, flowType);
-        int port;
-        switch (url.getProtocol()) {
-            case UnsecureHTTP:
-                mSocketFactory = new DefaultSocketFactory();
-                port = url.getPort() > 0 ? url.getPort() : 80;
-                break;
-            case SecureHTTP:
-                SSLContext tlsContext = SSLContext.getInstance("TLSv1");
-                tlsContext.init(km != null ? new KeyManager[]{km} : null,
-                        new TrustManager[]{mTrustManager}, null);
-                mSocketFactory = tlsContext.getSocketFactory();
-                port = url.getPort() > 0 ? url.getPort() : 443;
-                break;
-            default:
-                throw new IOException("Bad URL: " + url);
-        }
-        if (OSUManager.R2_MOCK && url.getHost().endsWith(".wi-fi.org")) {
-            // !!! Warning: Ruckus hack!
-            mRemotes = new ArrayList<>(1);
-            mRemotes.add(new InetSocketAddress(InetAddress.getByName("10.123.107.107"), port));
-        } else {
-            InetAddress[] remotes = mNetwork.getAllByName(url.getHost());
-            android.util.Log.d(OSUManager.TAG, "'" + url.getHost() + "' resolves to " +
-                    Arrays.toString(remotes));
-            if (remotes == null || remotes.length == 0) {
-                throw new IOException("Failed to look up host from " + url);
-            }
-            mRemotes = new ArrayList<>(remotes.length);
-            for (InetAddress remote : remotes) {
-                mRemotes.add(new InetSocketAddress(remote, port));
-            }
-        }
-        Collections.shuffle(mRemotes);
-    }
-
-    public void reloadKeys(Map<OSUCertType, List<X509Certificate>> certs, PrivateKey key)
-            throws IOException {
-        if (mKeyManager instanceof ClientKeyManager) {
-            ((ClientKeyManager) mKeyManager).reloadKeys(certs, key);
-        }
-    }
-
-    public Socket createSocket() throws IOException {
-        Socket socket = mSocketFactory.createSocket();
-        mNetwork.bindSocket(socket);
-
-        long bail = System.currentTimeMillis() + ConnectionTimeout;
-        boolean success = false;
-
-        while (System.currentTimeMillis() < bail) {
-            for (InetSocketAddress remote : mRemotes) {
-                try {
-                    socket.connect(remote);
-                    Log.d(OSUManager.TAG, "Connection " + socket.getLocalSocketAddress() +
-                            " to " + socket.getRemoteSocketAddress());
-                    success = true;
-                    break;
-                } catch (IOException ioe) {
-                    Log.d(OSUManager.TAG, "Failed to connect to " + remote + ": " + ioe);
-                    socket = mSocketFactory.createSocket();
-                    mNetwork.bindSocket(socket);
-                }
-            }
-            if (success) {
-                break;
-            }
-            Utils.delay(ReconnectWait);
-        }
-        if (!success) {
-            throw new IOException("No available network");
-        }
-        return socket;
-    }
-
-    public X509Certificate getOSUCertificate(URL url) throws GeneralSecurityException {
-        String fqdn = url.getHost();
-        for (X509Certificate certificate : mTrustManager.getTrustChain()) {
-            for (List<?> name : certificate.getSubjectAlternativeNames()) {
-                if (name.size() >= SPVerifier.DNSName &&
-                        name.get(0).getClass() == Integer.class &&
-                        name.get(1).toString().equals(fqdn)) {
-                    return certificate;
-                }
-            }
-        }
-        return null;
-    }
-
-    final class DefaultSocketFactory extends SocketFactory {
-
-        DefaultSocketFactory() {
-        }
-
-        @Override
-        public Socket createSocket() throws IOException {
-            return new Socket();
-        }
-
-        @Override
-        public Socket createSocket(String host, int port) throws IOException {
-            return new Socket(host, port);
-        }
-
-        @Override
-        public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
-                throws IOException {
-            return new Socket(host, port, localHost, localPort);
-        }
-
-        @Override
-        public Socket createSocket(InetAddress host, int port) throws IOException {
-            return new Socket(host, port);
-        }
-
-        @Override
-        public Socket createSocket(InetAddress address, int port, InetAddress localAddress,
-                                   int localPort) throws IOException {
-            return new Socket(address, port, localAddress, localPort);
-        }
-    }
-
-    private static class WFATrustManager implements X509TrustManager {
-        private final KeyStore mKeyStore;
-        private final HomeSP mHomeSP;
-        private final OSUFlowManager.FlowType mFlowType;
-        private X509Certificate[] mTrustChain;
-
-        private WFATrustManager(KeyStore ks, HomeSP homeSP, OSUFlowManager.FlowType flowType)
-                throws CertificateException {
-            mKeyStore = ks;
-            mHomeSP = homeSP;
-            mFlowType = flowType;
-        }
-
-        @Override
-        public void checkClientTrusted(X509Certificate[] chain, String authType)
-                throws CertificateException {
-            // N/A
-        }
-
-        @Override
-        public void checkServerTrusted(X509Certificate[] chain, String authType)
-                throws CertificateException {
-            Log.d("TLSOSU", "Checking " + chain.length + " certs.");
-
-            try {
-                CertPathValidator validator =
-                        CertPathValidator.getInstance(CertPathValidator.getDefaultType());
-                CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
-                CertPath path = certFactory.generateCertPath(
-                        Arrays.asList(chain));
-                Set<TrustAnchor> trustAnchors = new HashSet<>();
-                if (mHomeSP == null) {
-                    for (X509Certificate cert : getRootCerts(mKeyStore)) {
-                        trustAnchors.add(new TrustAnchor(cert, null));
-                    }
-                } else {
-                    String prefix = mFlowType == OSUFlowManager.FlowType.Remediation ?
-                            PlatformAdapter.CERT_REM_ALIAS : PlatformAdapter.CERT_POLICY_ALIAS;
-
-                    X509Certificate cert = getCert(mKeyStore, prefix + mHomeSP.getFQDN());
-                    if (cert == null) {
-                        cert = getCert(mKeyStore,
-                                PlatformAdapter.CERT_SHARED_ALIAS + mHomeSP.getFQDN());
-                    }
-                    if (cert == null) {
-                        for (X509Certificate root : getRootCerts(mKeyStore)) {
-                            trustAnchors.add(new TrustAnchor(root, null));
-                        }
-                    } else {
-                        trustAnchors.add(new TrustAnchor(cert, null));
-                    }
-                }
-                PKIXParameters params = new PKIXParameters(trustAnchors);
-                params.setRevocationEnabled(false);
-                params.addCertPathChecker(sEKUChecker);
-                validator.validate(path, params);
-                mTrustChain = chain;
-            } catch (GeneralSecurityException gse) {
-                throw new SecurityException(gse);
-            }
-            mTrustChain = chain;
-        }
-
-        @Override
-        public X509Certificate[] getAcceptedIssuers() {
-            return null;
-        }
-
-        public X509Certificate[] getTrustChain() {
-            return mTrustChain != null ? mTrustChain : new X509Certificate[0];
-        }
-    }
-
-    private static X509Certificate getCert(KeyStore keyStore, String alias)
-            throws KeyStoreException {
-        Certificate cert = keyStore.getCertificate(alias);
-        if (cert != null && cert instanceof X509Certificate) {
-            return (X509Certificate) cert;
-        }
-        return null;
-    }
-
-    public static Set<X509Certificate> getRootCerts(KeyStore keyStore) throws KeyStoreException {
-        Set<X509Certificate> certSet = new HashSet<>();
-        int index = 0;
-        for (int n = 0; n < 1000; n++) {
-            Certificate cert = keyStore.getCertificate(
-                    String.format("%s%d", PlatformAdapter.CERT_WFA_ALIAS, index));
-            if (cert == null) {
-                break;
-            } else if (cert instanceof X509Certificate) {
-                certSet.add((X509Certificate) cert);
-            }
-            index++;
-        }
-        return certSet;
-    }
-
-    private static class EKUChecker extends PKIXCertPathChecker {
-        @Override
-        public void init(boolean forward) throws CertPathValidatorException {
-
-        }
-
-        @Override
-        public boolean isForwardCheckingSupported() {
-            return true;
-        }
-
-        @Override
-        public Set<String> getSupportedExtensions() {
-            return EKU_ID_SET;
-        }
-
-        @Override
-        public void check(Certificate cert, Collection<String> unresolvedCritExts)
-                throws CertPathValidatorException {
-            Log.d(OSUManager.TAG, "Checking EKU " + unresolvedCritExts);
-            unresolvedCritExts.remove(EKU_ID);
-        }
-    }
-
-    /*
-     *
-      Subject: CN=osu-server.r2-testbed-rks.wi-fi.org, O=Intel Corporation CCG DRD, C=US
-      Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
-      Validity: [From: Wed Jan 28 16:00:00 PST 2015,
-                   To: Sat Jan 28 15:59:59 PST 2017]
-      Issuer: CN="NetworkFX, Inc. Hotspot 2.0 Intermediate CA", OU=OSU CA - 01, O="NetworkFX, Inc.", C=US
-      SerialNumber: [    312af3db 138eae19 1defbce2 e2b88b55]
-    *
-    *
-      Subject: CN="NetworkFX, Inc. Hotspot 2.0 Intermediate CA", OU=OSU CA - 01, O="NetworkFX, Inc.", C=US
-      Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11
-      Validity: [From: Tue Nov 19 16:00:00 PST 2013,
-                   To: Sun Nov 19 15:59:59 PST 2023]
-      Issuer: CN=Hotspot 2.0 Trust Root CA - 01, O=WFA Hotspot 2.0, C=US
-      SerialNumber: [    4152b1b0 301495f3 8fa76428 2ef41046]
-     */
-
-    public static final String[] WFACerts = {
-            "MIIFbDCCA1SgAwIBAgIQDLMPcPKGpDPguQmJ3gHttzANBgkqhkiG9w0BAQsFADBQ" +
-                    "MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPV0ZBIEhvdHNwb3QgMi4wMScwJQYDVQQD" +
-                    "Ex5Ib3RzcG90IDIuMCBUcnVzdCBSb290IENBIC0gMDMwHhcNMTMxMjA4MTIwMDAw" +
-                    "WhcNNDMxMjA4MTIwMDAwWjBQMQswCQYDVQQGEwJVUzEYMBYGA1UEChMPV0ZBIEhv" +
-                    "dHNwb3QgMi4wMScwJQYDVQQDEx5Ib3RzcG90IDIuMCBUcnVzdCBSb290IENBIC0g" +
-                    "MDMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCsdEtReIUbMlO+hR6b" +
-                    "yQk4nGVITv3meYTaDeVwZnQVal8EjHuu4Kd89g8yRYVTv3J1kq9ukE7CDrDehrXK" +
-                    "ym+8VlR7ro0lB/lwRyNk3W7yNccg3AknQ0x5fKVwcFznwD/FYg37owGmhGFtpMTB" +
-                    "cxzreQaLXvLta8YNlJU10ZkfputBpzi9bLPWsLOkIrQw7KH1Wc+Oiy4hUMUbTlSi" +
-                    "cjqacKPR188mVIoxxUoICHyVV1KvMmYZrVdc/b5dbmd0haMHxC0VSqbydXxxS7vv" +
-                    "/lCrC2d5qbKE66PiuBPkhzyU7SI9C8GU/S7akYm1MMSTn5W7lSp2AWRDnf9LQg51" +
-                    "dLvDxJ7t2fruXtSkkqG/cwY1yQI8O+WZYPDThKPcDmNbaxVE9lOizAHXFVsfYrXA" +
-                    "PbbMOkzKehYwaIikmNgcpxtQNw+wikJiZb9N8VwwtwHK71XEFi+n5DGlPa9VDYgB" +
-                    "YkBcxvVo2rbE3i3teQgHm+pWZNP08aFNWwMk9yQkm/SOGdLq1jLbQA9yd7fyR1Ct" +
-                    "W1GLzKi1Ojr/6XiB9/noL3oxP/+gb8OSgcqVfkZp4QLvrGdlKiOI2fE7Bslmzn6l" +
-                    "B3UTpApjab7BQ99rCXzDwt3Xd7IrCtAJNkxi302J7k6hnGlW8S4oPQBElkOtoH9y" +
-                    "XEhp9rNS0lZiuwtFmWW2q50fkQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G" +
-                    "A1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUZw5JLGEXnuvt4FTnhNmbrWRgc2UwDQYJ" +
-                    "KoZIhvcNAQELBQADggIBAFPoGFDyzFg9B9+jJUPGW32omftBhChVcgjllI07RCie" +
-                    "KTMBi47+auuLgiMox3xRyP7/dX7YaUeMXEQ1BMv6nlrsXWv1lH4yu+RNuehPlqRs" +
-                    "fY351mAfPtQ654SBUi0Wg++9iyTOfgF5a9IWEDt4lnSZMvA4vlw8pUCz6zpKXHnA" +
-                    "RXKrpY3bU+2dnrFDKR0XQhmAQdo7UvdsT1elVoFIxHhLpwfzx+kpEhtrXw3nGgt+" +
-                    "M4jNp684XoWpxVGaQ4Vvv00Sm2DQ8jq2sf9F+kRWszZpQOTiMGKZr0lX2CI5cww1" +
-                    "dfmd1BkAjI9cIWLkD8YSeaggZzvYe1o9d7e7lKfdJmjDlSQ0uBiG77keUK4tF2fi" +
-                    "xFTxibtPux56p3GYQ2GdRsBaKjH3A3HMJSKXwIGR+wb1sgz/bBdlyJSylG8hYD//" +
-                    "0Hyo+UrMUszAdszoPhMY+4Ol3QE3QRWzXi+W/NtKeYD2K8xUzjZM10wMdxCfoFOa" +
-                    "8bzzWnxZQlnu880ULUSHIxDPeE+DDZYYOaN1hV2Rh/hrFKvvV+gJj2eXHF5G7y9u" +
-                    "Yg7nHYCCf7Hy8UTIXDtAAeDCQNon1ReN8G+XOqhLQ9TalmnJ5U5ARtC0MdQDht7T" +
-                    "DZpWeEVv+pQHARX9GDV/T85MV2RPJWKqfZ6kK0gvQDkunADdg8IhZAjwMMx3k6B/",
-
-            "MIIFbDCCA1SgAwIBAgIQaAV8NQv/Xdusi4IU+tpUfjANBgkqhkiG9w0BAQsFADBQ" +
-                    "MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPV0ZBIEhvdHNwb3QgMi4wMScwJQYDVQQD" +
-                    "Ex5Ib3RzcG90IDIuMCBUcnVzdCBSb290IENBIC0gMDEwHhcNMTMxMTIwMDAwMDAw" +
-                    "WhcNNDMxMTE5MjM1OTU5WjBQMQswCQYDVQQGEwJVUzEYMBYGA1UEChMPV0ZBIEhv" +
-                    "dHNwb3QgMi4wMScwJQYDVQQDEx5Ib3RzcG90IDIuMCBUcnVzdCBSb290IENBIC0g" +
-                    "MDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/gf4CHxWjr2EcktAZ" +
-                    "pHT4z1yFYZILD3ZVqvzzXBK+YKjWhjsgZ28Z1VwXqu51JvVzwTGDalPf5m7zMcJW" +
-                    "CpPtPBdxxwQ/cBDPK4w+/sCuYYSddlMLzwZ/IgwFike12tKTR7Kk7Nk6ghrYaxCG" +
-                    "R+QEZDVrxITj79vGpgk2otVnMI4d3H9mWt1o6Lx+hVioyBgOvmo2OWHR2uKkbg5h" +
-                    "tktXqmBEtzK+qDqIIUY4WRRZHxlOaF2/EdIIGhXlf+Vlr13aPqOPiDiE08o+GARz" +
-                    "TIp8BrW2boo0+2kpEFUKiqc427vOYEkUdSMfwu4aGOcuOewc8sk6ztquL/JcPROL" +
-                    "VSFSSFR3HKhUto8EJcHEEG9wzcOi1OO/OOSVxjNwiaV/hB9Ed1wvoBhiJ+C+Q8/K" +
-                    "HXmoH/ankXDaB06yjt2Ojemt0nO45qlarRj8tO7zbpghJuJxztur47U7PJta7Zcg" +
-                    "z7kOPJPTAbzmOU2TXt1pXO1hVnSlV+M1rRwe7qivnSMMrTnkX15YWmyK27/tgJeu" +
-                    "muR2YzvPwPtF/m1N0bRKI7FW05NYg3smItFq0E/eyf/orgolcXTZ7zNRyRGnjWNs" +
-                    "/w9SDbdby0uVUfdN4V/5uC4HBmA1rikoBbGZ+nzCtesY4yW8eEwMfguVpNT3ueaU" +
-                    "q30nufeY2VnA3Rv1WH8TaeZU+wIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4G" +
-                    "A1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU+RjGVZbebjpzEPfthaTLqbvXMiEwDQYJ" +
-                    "KoZIhvcNAQELBQADggIBABj3LP1UXVa16HYeXC1+GU1dX/cla1n1bwpIlxRnCZ5/" +
-                    "3I3zGw/nRnsLUTkGf8q3XCgin+jX22kyzzQNrgepn0zqBsmAj+pjUUwWzYQUzphc" +
-                    "Uzmg4PJRWaEaGG3kvD+wJEC0pWvIhe48qcq8FZCCmjbvecEVn5mM0smPzPyUjf/o" +
-                    "fjUMQvVWqug/Ff5HT6kbyDWhC3nD+8IZ5PjyO85OnoBnQkr8WYwr24XJgO2HS2rs" +
-                    "W40CzQe3Kdg7HHyef+/iyLYTBJH7EUJPCHGVQtZ3q0aNqURkutXJ/CxKJYMcNTEB" +
-                    "x+a09EhZ6DOHQDqsdTuAqGh3VyrxhFk+3suNsxoh6XaRK10VslvdNB/1YKfU8DWe" +
-                    "V6XfDH/TR0NIL04exUp3rER8sERulpJGBOnaG6OQKh4bFYDB406+QfusQnvO0aYR" +
-                    "UXJzf01B15HRJgpZsggpIuex0UDcJhTTpkRfTj8L4ayUce2ZRsGn3dBaT9ZMx4o9" +
-                    "E/YsQyOpfw28gM5u+zZt4BJz4gAaRGbp4r4sk5Vm/P1/0EXJ70Du6K9d0HAHtpEv" +
-                    "Y94Ww5W6fpMDdyAKYTXZBgTX3cqtikNkLX/kHH8l4o/XW2sXqU3X7vOYqgeVYoD9" +
-                    "NnhZXYCerH4Se5Lgj8/KhXxRWtcn3XduMdkC6UTApMooA64Vs508173Z3lJn2SeQ",
-
-            "MIIFXTCCA0WgAwIBAgIBATANBgkqhkiG9w0BAQsFADBQMQswCQYDVQQGEwJVUzEY" +
-                    "MBYGA1UECgwPV0ZBIEhvdHNwb3QgMi4wMScwJQYDVQQDDB5Ib3RzcG90IDIuMCBU" +
-                    "cnVzdCBSb290IENBIC0gMDIwHhcNMTMxMjAyMjA1NzU3WhcNNDMxMjAyMjA1NTAz" +
-                    "WjBQMQswCQYDVQQGEwJVUzEYMBYGA1UECgwPV0ZBIEhvdHNwb3QgMi4wMScwJQYD" +
-                    "VQQDDB5Ib3RzcG90IDIuMCBUcnVzdCBSb290IENBIC0gMDIwggIiMA0GCSqGSIb3" +
-                    "DQEBAQUAA4ICDwAwggIKAoICAQDCSoMqNhtTwbnIsINp6nUhx5UFuq9ZQoTv+KDk" +
-                    "vAajT0di6+cQG3sAVvZLySmJoiBAv3PizYYLOD4eGMrFQRqi7PmSJ83WqNv23ZYF" +
-                    "ryFFJiy/URXc/ALDuB3dgElPt24Mx7n2xDPAh9t82HTmuskpQRrsyg9QPoi5rRRS" +
-                    "Djm5mjFJjKChq99RWcweNV/KGH1sTwcmlDmNMScK16A+BBNiSvmZlsGJgAlP369k" +
-                    "lnNqt6UiDhepcktuKpHmSvNel+c/xqzR0gURfUnXcZhzjzS94Rx5O+CNWL4EGiJq" +
-                    "qKAfk99j/lbD0MWYo7Rh0UKQlXSdohWDiV93hxvvfugej8KUOIb+1wmd1Fi+lwDZ" +
-                    "bR2yg2f0qyxbC/tAV4JJNnuDLFb19leD78x+68eAnlbMi+xMH5lINs15+26s2H5d" +
-                    "lx9kwRDBJq02LuHnen6FLafWjejnnBQ/PuGD0ACvBegSsDKDaCuTAnTNS6MDmQr4" +
-                    "wza08iX360ZN+BbSAnCK1YGa/7J7fhyydwxLJ7s5Eo0b6SUMY87FMc5XmkAk4xxL" +
-                    "MLqS2HMtqsGBI5JQT0SgH0ghE6DjMWArBTZcD+swuzTi1/Cz5+Z9Es8xJ3MPvSZW" +
-                    "pJi6VVB2eVMAqfHOj4ozHoVpvJypIVGRwWBzVRWom76R47utuRK6uKzoLiB1jwE5" +
-                    "vwHpUQIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBxjAd" +
-                    "BgNVHQ4EFgQU5C9c1OMsB+/MOwl9OKG2D/XSwrUwDQYJKoZIhvcNAQELBQADggIB" +
-                    "AGULYE/VrnA3K0ptgHrWlQoPfp5wGvScgsmy0wp9qE3b6n/4bLehBKb5w4Y3JVA9" +
-                    "gjxoQ5xE2ssDtULZ3nKnGWmMN3qOBoRZCA6KjKs1860p09tm1ScUsajDJ15Tp1nI" +
-                    "zfR0oP63+2bJx+JXM8fPKOJe245hj2rs1c3JXsGCe+UVrlGsotG+wR0PdrejaXJ8" +
-                    "HbhBQHcbhgjsD1Gb6Egm4YxRKAtcVY3q9EKKWAGhbC1qvCh1iLNKo3FeGgm2r3EG" +
-                    "L4cYJBb2fhSKltjISqCDhYq4tplOIeQSJJyJC8gfW/BnMU39lTjNgnSjjGPLQXGV" +
-                    "+Ulb/CgNMJ3RhRJdBoLcpIm/EeLx6JLq/2Erxy7CxjaSOcD0UKa14+dzLSHVsXft" +
-                    "HZuOy548X8m18KruSZsf5uAT3c7NqlXtr9YgOVUqSJykNAHTGi/BHB1dC2clKvxN" +
-                    "ElfLWWrG9yaAd5TFW0+3wsaDIwRZL584AsFwwAD3KMo1oU/2zRvtm0E+VghsuD/Z" +
-                    "IE1xaVGTPaL7ph/YgC9+0rGHieauT8SXz6Ryp3h0RtYMLFZOMTKM7xjmcbMZDwrO" +
-                    "c+J/XjK9dbiCqlx5/B8P0xWaYYHzvE5/fafiPYzoGyFVUXquu0dFCCQrvjF/y0tC" +
-                    "TPm4hQim3k1F+5NChcbeNggN+kq+VdlSqPhQEuOY+kNv"
-    };
-
-    //private static final Set<TrustAnchor> sTrustAnchors = buildCertSet();
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUStatus.java b/packages/Osu/src/com/android/hotspot2/osu/OSUStatus.java
deleted file mode 100644
index 00f0634..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUStatus.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum OSUStatus {
-    OK, ProvComplete, RemediationComplete, UpdateComplete, ExchangeComplete, Unknown, Error
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/OSUWebView.java b/packages/Osu/src/com/android/hotspot2/osu/OSUWebView.java
deleted file mode 100644
index a6778c8..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/OSUWebView.java
+++ /dev/null
@@ -1,91 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.annotation.Nullable;
-import android.app.Activity;
-import android.graphics.Bitmap;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.http.SslError;
-import android.os.Bundle;
-import android.util.Log;
-import android.util.TypedValue;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
-
-import com.android.hotspot2.R;
-
-public class OSUWebView extends Activity {
-    public static final String OSU_URL = "com.android.hotspot2.osu.URL";
-    public static final String OSU_NETWORK = "com.android.hotspot2.osu.NETWORK";
-
-    private String mUrl;
-
-    @Override
-    protected void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        Log.d(OSUManager.TAG, "Opening OSU Web View");
-
-        ConnectivityManager connectivityManager = ConnectivityManager.from(this);
-
-        mUrl = getIntent().getStringExtra(OSU_URL);
-        Network network = getIntent().getParcelableExtra(OSU_NETWORK);
-        connectivityManager.bindProcessToNetwork(network);
-
-        getActionBar().setDisplayShowHomeEnabled(false);
-        setContentView(R.layout.osu_web_view);
-        getActionBar().setDisplayShowHomeEnabled(false);
-
-        final WebView myWebView = findViewById(R.id.webview);
-        myWebView.clearCache(true);
-        WebSettings webSettings = myWebView.getSettings();
-        webSettings.setJavaScriptEnabled(true);
-        MyWebViewClient mWebViewClient = new MyWebViewClient();
-        myWebView.setWebViewClient(mWebViewClient);
-        Log.d(OSUManager.TAG, "OSU Web View to " + mUrl);
-        myWebView.loadUrl(mUrl);
-        Log.d(OSUManager.TAG, "OSU Web View loading");
-        //myWebView.setWebChromeClient(new MyWebChromeClient());
-        // Start initial page load so WebView finishes loading proxy settings.
-        // Actual load of mUrl is initiated by MyWebViewClient.
-        //myWebView.loadData("", "text/html", null);
-    }
-
-    private class MyWebViewClient extends WebViewClient {
-        private static final String INTERNAL_ASSETS = "file:///android_asset/";
-        // How many Android device-independent-pixels per scaled-pixel
-        // dp/sp = (px/sp) / (px/dp) = (1/sp) / (1/dp)
-        private final float mDpPerSp = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 1,
-                getResources().getDisplayMetrics()) /
-                TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1,
-                        getResources().getDisplayMetrics());
-        private int mPagesLoaded;
-
-        // If we haven't finished cleaning up the history, don't allow going back.
-        public boolean allowBack() {
-            return mPagesLoaded > 1;
-        }
-
-        // Convert Android device-independent-pixels (dp) to HTML size.
-        private String dp(int dp) {
-            // HTML px's are scaled just like dp's, so just add "px" suffix.
-            return Integer.toString(dp) + "px";
-        }
-
-        // Convert Android scaled-pixels (sp) to HTML size.
-        private String sp(int sp) {
-            // Convert sp to dp's.
-            float dp = sp * mDpPerSp;
-            // Apply a scale factor to make things look right.
-            dp *= 1.3;
-            // Convert dp's to HTML size.
-            return dp((int)dp);
-        }
-
-        @Override
-        public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
-            Log.d(OSUManager.TAG, "TLS error in Web View: " + error);
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/PostDevDataResponse.java b/packages/Osu/src/com/android/hotspot2/osu/PostDevDataResponse.java
deleted file mode 100644
index 12b9997..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/PostDevDataResponse.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-import com.android.hotspot2.osu.commands.OSUCommandData;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-public class PostDevDataResponse extends OSUResponse {
-    private final List<OSUCommand> mOSUCommands;
-
-    public PostDevDataResponse(XMLNode root) throws OMAException {
-        super(root, OSUMessageType.PostDevData);
-
-        if (getStatus() == OSUStatus.Error) {
-            mOSUCommands = null;
-            return;
-        }
-
-        mOSUCommands = new ArrayList<>();
-        for (XMLNode child : root.getChildren()) {
-            mOSUCommands.add(new OSUCommand(child));
-        }
-    }
-
-    public OSUCommandID getOSUCommand() {
-        return mOSUCommands.size() == 1 ? mOSUCommands.get(0).getOSUCommand() : null;
-    }
-
-    public ExecCommand getExecCommand() {
-        return mOSUCommands.size() == 1 ? mOSUCommands.get(0).getExecCommand() : null;
-    }
-
-    public OSUCommandData getCommandData() {
-        return mOSUCommands.size() == 1 ? mOSUCommands.get(0).getCommandData() : null;
-    }
-
-    public Collection<OSUCommand> getCommands() {
-        return Collections.unmodifiableCollection(mOSUCommands);
-    }
-
-    @Override
-    public String toString() {
-        return super.toString() + ", commands " + mOSUCommands;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/RequestReason.java b/packages/Osu/src/com/android/hotspot2/osu/RequestReason.java
deleted file mode 100644
index db222b4..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/RequestReason.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.android.hotspot2.osu;
-
-public enum RequestReason {
-    SubRegistration,
-    SubProvisioning,
-    SubRemediation,
-    InputComplete,
-    NoClientCert,
-    CertEnrollmentComplete,
-    CertEnrollmentFailed,
-    SubMetaDataUpdate,
-    PolicyUpdate,
-    NextCommand,
-    MOUpload,
-    Unspecified
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/ResponseFactory.java b/packages/Osu/src/com/android/hotspot2/osu/ResponseFactory.java
deleted file mode 100644
index 3e236a7..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/ResponseFactory.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-public interface ResponseFactory {
-    public OSUResponse buildResponse(XMLNode root) throws OMAException;
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/SOAPBuilder.java b/packages/Osu/src/com/android/hotspot2/osu/SOAPBuilder.java
deleted file mode 100644
index e2f91ea..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/SOAPBuilder.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.MOTree;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.XMLNode;
-
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.Map;
-
-public class SOAPBuilder {
-    private static final String EnvelopeTag = "s12:Envelope";
-    private static final String BodyTag = "s12:Body";
-
-    private static final Map<String, String> sEnvelopeAttributes = new HashMap<>(2);
-    private static final Map<RequestReason, String> sRequestReasons =
-            new EnumMap<>(RequestReason.class);
-
-    static {
-        sEnvelopeAttributes.put("xmlns:s12", "http://www.w3.org/2003/05/soap-envelope");
-        sEnvelopeAttributes.put("xmlns:spp",
-                "http://www.wi-fi.org/specifications/hotspot2dot0/v1.0/spp");
-
-        sRequestReasons.put(RequestReason.SubRegistration, "Subscription registration");
-        sRequestReasons.put(RequestReason.SubProvisioning, "Subscription provisioning");
-        sRequestReasons.put(RequestReason.SubRemediation, "Subscription remediation");
-        sRequestReasons.put(RequestReason.InputComplete, "User input completed");
-        sRequestReasons.put(RequestReason.NoClientCert, "No acceptable client certificate");
-        sRequestReasons.put(RequestReason.CertEnrollmentComplete,
-                "Certificate enrollment completed");
-        sRequestReasons.put(RequestReason.CertEnrollmentFailed, "Certificate enrollment failed");
-        sRequestReasons.put(RequestReason.SubMetaDataUpdate, "Subscription metadata update");
-        sRequestReasons.put(RequestReason.PolicyUpdate, "Policy update");
-        sRequestReasons.put(RequestReason.NextCommand, "Retrieve next command");
-        sRequestReasons.put(RequestReason.MOUpload, "MO upload");
-        sRequestReasons.put(RequestReason.Unspecified, "Unspecified");
-    }
-
-    public static String buildPostDevDataResponse(RequestReason reason, String sessionID,
-                                                  String redirURI, MOTree... mos) {
-        XMLNode envelope = buildEnvelope();
-        buildSppPostDevData(envelope.getChildren().get(0), sessionID, reason, redirURI, mos);
-        return envelope.toString();
-    }
-
-    public static String buildUpdateResponse(String sessionID, OSUError error) {
-        XMLNode envelope = buildEnvelope();
-        buildSppUpdateResponse(envelope.getChildren().get(0), sessionID, error);
-        return envelope.toString();
-    }
-
-    private static XMLNode buildEnvelope() {
-        XMLNode envelope = new XMLNode(null, EnvelopeTag, sEnvelopeAttributes);
-        envelope.addChild(new XMLNode(envelope, BodyTag, (Map<String, String>) null));
-        return envelope;
-    }
-
-    private static XMLNode buildSppPostDevData(XMLNode parent, String sessionID,
-                                               RequestReason reason, String redirURI,
-                                               MOTree... mos) {
-        Map<String, String> pddAttributes = new HashMap<>();
-        pddAttributes.put(OMAConstants.TAG_Version, OMAConstants.MOVersion);
-        pddAttributes.put("requestReason", sRequestReasons.get(reason));
-        if (sessionID != null) {
-            pddAttributes.put(OMAConstants.TAG_SessionID, sessionID);
-        }
-        if (redirURI != null) {
-            pddAttributes.put("redirectURI", redirURI);
-        }
-
-        XMLNode pddNode = new XMLNode(parent, OMAConstants.TAG_PostDevData, pddAttributes);
-
-        XMLNode vNode = new XMLNode(pddNode, OMAConstants.TAG_SupportedVersions,
-                (HashMap<String, String>) null);
-        vNode.setText("1.0");
-        pddNode.addChild(vNode);
-
-        XMLNode moNode = new XMLNode(pddNode, OMAConstants.TAG_SupportedMOs,
-                (HashMap<String, String>) null);
-        StringBuilder sb = new StringBuilder();
-        boolean first = true;
-        for (String urn : OMAConstants.SupportedMO_URNs) {
-            if (first) {
-                first = false;
-            } else {
-                sb.append(' ');
-            }
-            sb.append(urn);
-        }
-        moNode.setText(sb.toString());
-        pddNode.addChild(moNode);
-
-        if (mos != null) {
-            for (MOTree moTree : mos) {
-                Map<String, String> map = null;
-                if (moTree.getUrn() != null) {
-                    map = new HashMap<>(1);
-                    map.put(OMAConstants.SppMOAttribute, moTree.getUrn());
-                }
-                moNode = new XMLNode(pddNode, OMAConstants.TAG_MOContainer, map);
-                moNode.setText(moTree.toXml());
-                pddNode.addChild(moNode);
-            }
-        }
-
-        parent.addChild(pddNode);
-        return pddNode;
-    }
-
-    private static XMLNode buildSppUpdateResponse(XMLNode parent, String sessionID,
-                                                  OSUError error) {
-        Map<String, String> urAttributes = new HashMap<>();
-        urAttributes.put(OMAConstants.TAG_Version, OMAConstants.MOVersion);
-        if (sessionID != null) {
-            urAttributes.put(OMAConstants.TAG_SessionID, sessionID);
-        }
-        if (error == null) {
-            urAttributes.put(OMAConstants.TAG_Status, OMAConstants.mapStatus(OSUStatus.OK));
-        } else {
-            urAttributes.put(OMAConstants.TAG_Status, OMAConstants.mapStatus(OSUStatus.Error));
-        }
-
-        XMLNode urNode = new XMLNode(parent, OMAConstants.TAG_UpdateResponse, urAttributes);
-
-        if (error != null) {
-            Map<String, String> errorAttributes = new HashMap<>();
-            errorAttributes.put("errorCode", OMAConstants.mapError(error));
-            XMLNode errorNode = new XMLNode(urNode, OMAConstants.TAG_Error, errorAttributes);
-            urNode.addChild(errorNode);
-        }
-
-        parent.addChild(urNode);
-        return urNode;
-    }
-
-    /*
-    <xsd:element name="sppUpdateResponse">
-		<xsd:annotation>
-			<xsd:documentation>SOAP method used by SPP client to confirm installation of MO addition or update.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="sppError" minOccurs="0"/>
-				<xsd:any namespace="##other" maxOccurs="unbounded" minOccurs="0"/>
-			</xsd:sequence>
-			<xsd:attribute ref="sppVersion" use="required"/>
-			<xsd:attribute ref="sppStatus" use="required"/>
-			<xsd:attribute ref="sessionID" use="required"/>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-
-    <xsd:element name="sppError">
-		<xsd:annotation>
-			<xsd:documentation>Error response.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="errorCode" use="required">
-				<xsd:simpleType>
-					<xsd:restriction base="xsd:string">
-						<xsd:enumeration value="SPP version not supported"/>
-						<xsd:enumeration value="One or more mandatory MOs not supported"/>
-						<xsd:enumeration value="Credentials cannot be provisioned at this time"/>
-						<xsd:enumeration value="Remediation cannot be completed at this time"/>
-						<xsd:enumeration value="Provisioning cannot be completed at this time"/>
-						<xsd:enumeration value="Continue to use existing certificate"/>
-						<xsd:enumeration value="Cookie invalid"/>
-						<xsd:enumeration value="No corresponding web-browser-connection Session ID"/>
-						<xsd:enumeration value="Permission denied"/>
-						<xsd:enumeration value="Command failed"/>
-						<xsd:enumeration value="MO addition or update failed"/>
-						<xsd:enumeration value="Device full"/>
-						<xsd:enumeration value="Bad management tree URI"/>
-						<xsd:enumeration value="Requested entity too large"/>
-						<xsd:enumeration value="Command not allowed"/>
-						<xsd:enumeration value="Command not executed due to user"/>
-						<xsd:enumeration value="Not found"/>
-						<xsd:enumeration value="Other"/>
-					</xsd:restriction>
-				</xsd:simpleType>
-			</xsd:attribute>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-
-
-     */
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/SOAPParser.java b/packages/Osu/src/com/android/hotspot2/osu/SOAPParser.java
deleted file mode 100644
index b848ba9..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/SOAPParser.java
+++ /dev/null
@@ -1,327 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-public class SOAPParser {
-
-    private static final String EnvelopeTag = "envelope";
-    private static final String BodyTag = "body";
-
-    private static final Map<String, ResponseFactory> sResponseMap = new HashMap<>();
-
-    static {
-        sResponseMap.put("spppostdevdataresponse", new ResponseFactory() {
-            @Override
-            public OSUResponse buildResponse(XMLNode root) throws OMAException {
-                return new PostDevDataResponse(root);
-            }
-        });
-        sResponseMap.put("sppexchangecomplete", new ResponseFactory() {
-            @Override
-            public OSUResponse buildResponse(XMLNode root) throws OMAException {
-                return new ExchangeCompleteResponse(root);
-            }
-        });
-        sResponseMap.put("getcertificate", new ResponseFactory() {
-            @Override
-            public OSUResponse buildResponse(XMLNode root) {
-                return null;
-            }
-        });
-        sResponseMap.put("spperror", new ResponseFactory() {
-            @Override
-            public OSUResponse buildResponse(XMLNode root) {
-                return null;
-            }
-        });
-    }
-
-    private final XMLNode mResponseNode;
-
-    public SOAPParser(InputStream in)
-            throws ParserConfigurationException, SAXException, IOException {
-        XMLNode root;
-
-        try {
-            XMLParser parser = new XMLParser(in);
-            root = parser.getRoot();
-        } finally {
-            in.close();
-        }
-
-        String[] nsn = root.getTag().split(":");
-        if (nsn.length > 2) {
-            throw new OMAException("Bad root tag syntax: '" + root.getTag() + "'");
-        } else if (!EnvelopeTag.equalsIgnoreCase(nsn[nsn.length - 1])) {
-            throw new OMAException("Expected envelope: '" + root.getTag() + "'");
-        }
-
-        String bodyTag = nsn.length > 1 ? (nsn[0] + ":" + BodyTag) : BodyTag;
-        XMLNode body = null;
-
-        for (XMLNode child : root.getChildren()) {
-            if (bodyTag.equalsIgnoreCase(child.getTag())) {
-                body = child;
-                break;
-            }
-        }
-
-        if (body == null || body.getChildren().isEmpty()) {
-            throw new OMAException("Missing SOAP body");
-        }
-
-        mResponseNode = body.getSoleChild();
-    }
-
-    public OSUResponse getResponse() throws OMAException {
-        ResponseFactory responseFactory = sResponseMap.get(mResponseNode.getStrippedTag());
-        if (responseFactory == null) {
-            throw new OMAException("Unknown response type: '"
-                    + mResponseNode.getStrippedTag() + "'");
-        }
-        return responseFactory.buildResponse(mResponseNode);
-    }
-
-    public XMLNode getResponseNode() {
-        return mResponseNode;
-    }
-
-
-    /*
-    <xsd:element name="sppPostDevDataResponse">
-		<xsd:annotation>
-			<xsd:documentation>SOAP method response from SPP server.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:choice>
-				<xsd:element ref="sppError"/>
-				<xsd:element name="exec">
-					<xsd:annotation>
-						<xsd:documentation>Receipt of this element by a mobile device causes the following command to be executed.</xsd:documentation>
-					</xsd:annotation>
-					<xsd:complexType>
-						<xsd:choice>
-							<xsd:element name="launchBrowserToURI" type="httpsURIType">
-								<xsd:annotation>
-									<xsd:documentation>When the mobile device receives this command, it launches its default browser to the URI contained in this element.  The URI must use HTTPS as the protocol and must contain an FQDN.</xsd:documentation>
-								</xsd:annotation>
-							</xsd:element>
-							<xsd:element ref="getCertificate"/>
-							<xsd:element name="useClientCertTLS">
-								<xsd:annotation>
-									<xsd:documentation>Command to mobile to re-negotiate the TLS connection using a client certificate of the accepted type or Issuer to authenticate with the Subscription server.</xsd:documentation>
-								</xsd:annotation>
-								<xsd:complexType>
-									<xsd:sequence>
-										<xsd:element name="providerIssuerName" minOccurs="0"
-											maxOccurs="unbounded">
-											<xsd:complexType>
-												<xsd:attribute name="name" type="xsd:string">
-												<xsd:annotation>
-												<xsd:documentation>The issuer name of an acceptable provider-issued certificate.  The text of this element is formatted in accordance with the Issuer Name field in RFC-3280.  This element is present only when acceptProviderCerts is true.</xsd:documentation>
-												</xsd:annotation>
-												</xsd:attribute>
-												<xsd:anyAttribute namespace="##other"/>
-											</xsd:complexType>
-										</xsd:element>
-										<xsd:any namespace="##other" minOccurs="0"
-											maxOccurs="unbounded"/>
-									</xsd:sequence>
-									<xsd:attribute name="acceptMfgCerts" type="xsd:boolean"
-										use="optional" default="false">
-										<xsd:annotation>
-											<xsd:documentation>When this boolean is true, IEEE 802.1ar manufacturing certificates are acceptable for mobile device authentication.</xsd:documentation>
-										</xsd:annotation>
-									</xsd:attribute>
-									<xsd:attribute name="acceptProviderCerts" type="xsd:boolean"
-										use="optional" default="true">
-										<xsd:annotation>
-											<xsd:documentation>When this boolean is true, X509v3 certificates issued by providers identified in the providerIssuerName child element(s) are acceptable for mobile device authentication.</xsd:documentation>
-										</xsd:annotation>
-									</xsd:attribute>
-									<xsd:anyAttribute namespace="##other"/>
-								</xsd:complexType>
-							</xsd:element>
-							<xsd:element name="uploadMO" maxOccurs="unbounded">
-								<xsd:annotation>
-									<xsd:documentation>Command to mobile to upload the MO named in the moURN attribute to the SPP server.</xsd:documentation>
-								</xsd:annotation>
-								<xsd:complexType>
-									<xsd:attribute ref="moURN"/>
-								</xsd:complexType>
-							</xsd:element>
-							<xsd:any namespace="##other" maxOccurs="unbounded" minOccurs="0">
-								<xsd:annotation>
-									<xsd:documentation>Element to allow the addition of new commands in the future.</xsd:documentation>
-								</xsd:annotation>
-							</xsd:any>
-						</xsd:choice>
-						<xsd:anyAttribute namespace="##other"/>
-					</xsd:complexType>
-				</xsd:element>
-				<xsd:element name="addMO">
-					<xsd:annotation>
-						<xsd:documentation>This command causes an management object in the mobile devices management tree at the specified location to be added.  If there is already a management object at that location, the object is replaced.</xsd:documentation>
-					</xsd:annotation>
-					<xsd:complexType>
-						<xsd:simpleContent>
-							<xsd:extension base="xsd:string">
-								<xsd:attribute ref="managementTreeURI"/>
-								<xsd:attribute ref="moURN"/>
-							</xsd:extension>
-						</xsd:simpleContent>
-					</xsd:complexType>
-				</xsd:element>
-				<xsd:element maxOccurs="unbounded" name="updateNode">
-					<xsd:annotation>
-						<xsd:documentation>This command causes the update of an interior node and its child nodes (if any) at the location specified in the management tree URI attribute.  The content of this element is the MO node XML.</xsd:documentation>
-					</xsd:annotation>
-					<xsd:complexType>
-						<xsd:simpleContent>
-							<xsd:extension base="xsd:string">
-								<xsd:attribute ref="managementTreeURI"/>
-							</xsd:extension>
-						</xsd:simpleContent>
-					</xsd:complexType>
-				</xsd:element>
-				<xsd:element name="noMOUpdate">
-					<xsd:annotation>
-						<xsd:documentation>This response is used when there is no command to be executed nor update of any MO required.</xsd:documentation>
-					</xsd:annotation>
-				</xsd:element>
-				<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded">
-					<xsd:annotation>
-						<xsd:documentation>For vendor-specific extensions or future needs.</xsd:documentation>
-					</xsd:annotation>
-				</xsd:any>
-			</xsd:choice>
-			<xsd:attribute ref="sppVersion" use="required"/>
-			<xsd:attribute ref="sppStatus" use="required"/>
-			<xsd:attribute ref="moreCommands" use="optional"/>
-			<xsd:attribute ref="sessionID" use="required"/>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="sppUpdateResponse">
-		<xsd:annotation>
-			<xsd:documentation>SOAP method used by SPP client to confirm installation of MO addition or update.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="sppError" minOccurs="0"/>
-				<xsd:any namespace="##other" maxOccurs="unbounded" minOccurs="0"/>
-			</xsd:sequence>
-			<xsd:attribute ref="sppVersion" use="required"/>
-			<xsd:attribute ref="sppStatus" use="required"/>
-			<xsd:attribute ref="sessionID" use="required"/>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="sppExchangeComplete">
-		<xsd:annotation>
-			<xsd:documentation>SOAP method used by SPP server to end session.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element ref="sppError" minOccurs="0"/>
-				<xsd:any namespace="##other" maxOccurs="unbounded" minOccurs="0"/>
-			</xsd:sequence>
-			<xsd:attribute ref="sppVersion" use="required"/>
-			<xsd:attribute ref="sppStatus" use="required"/>
-			<xsd:attribute ref="sessionID" use="required"/>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="getCertificate">
-		<xsd:annotation>
-			<xsd:documentation>Command to mobile to initiate certificate enrollment or re-enrollment and is a container for metadata to enable enrollment.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:sequence>
-				<xsd:element name="enrollmentServerURI" type="httpsURIType">
-					<xsd:annotation>
-						<xsd:documentation>HTTPS URI of the server to be contacted to initiate certificate enrollment.  The URI must contain an FQDN.</xsd:documentation>
-					</xsd:annotation>
-				</xsd:element>
-				<xsd:element name="estUserID" minOccurs="0">
-					<xsd:annotation>
-						<xsd:documentation>Temporary userid used by an EST client to authenticate to the EST server using HTTP Digest authentication.  This element must be used for initial certificate enrollment; its use is optional for certificate re-enrollment.</xsd:documentation>
-					</xsd:annotation>
-					<xsd:simpleType>
-						<xsd:restriction base="xsd:string">
-							<xsd:maxLength value="255"/>
-						</xsd:restriction>
-					</xsd:simpleType>
-				</xsd:element>
-				<xsd:element name="estPassword" minOccurs="0">
-					<xsd:annotation>
-						<xsd:documentation>Temporary password used by an EST client to authenticate to the EST server using HTTP Digest authentication.  This element must be used for initial certificate enrollment; its use is optional for certificate re-enrollment.</xsd:documentation>
-					</xsd:annotation>
-					<xsd:simpleType>
-						<xsd:restriction base="xsd:base64Binary">
-							<xsd:maxLength value="340"/>
-						</xsd:restriction>
-					</xsd:simpleType>
-				</xsd:element>
-				<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded">
-					<xsd:annotation>
-						<xsd:documentation>For vendor-specific extensions or future needs.</xsd:documentation>
-					</xsd:annotation>
-				</xsd:any>
-			</xsd:sequence>
-			<xsd:attribute name="enrollmentProtocol" use="required">
-				<xsd:simpleType>
-					<xsd:restriction base="xsd:string">
-						<xsd:enumeration value="EST"/>
-						<xsd:enumeration value="Other"/>
-					</xsd:restriction>
-				</xsd:simpleType>
-			</xsd:attribute>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-	<xsd:element name="sppError">
-		<xsd:annotation>
-			<xsd:documentation>Error response.</xsd:documentation>
-		</xsd:annotation>
-		<xsd:complexType>
-			<xsd:attribute name="errorCode" use="required">
-				<xsd:simpleType>
-					<xsd:restriction base="xsd:string">
-						<xsd:enumeration value="SPP version not supported"/>
-						<xsd:enumeration value="One or more mandatory MOs not supported"/>
-						<xsd:enumeration value="Credentials cannot be provisioned at this time"/>
-						<xsd:enumeration value="Remediation cannot be completed at this time"/>
-						<xsd:enumeration value="Provisioning cannot be completed at this time"/>
-						<xsd:enumeration value="Continue to use existing certificate"/>
-						<xsd:enumeration value="Cookie invalid"/>
-						<xsd:enumeration value="No corresponding web-browser-connection Session ID"/>
-						<xsd:enumeration value="Permission denied"/>
-						<xsd:enumeration value="Command failed"/>
-						<xsd:enumeration value="MO addition or update failed"/>
-						<xsd:enumeration value="Device full"/>
-						<xsd:enumeration value="Bad management tree URI"/>
-						<xsd:enumeration value="Requested entity too large"/>
-						<xsd:enumeration value="Command not allowed"/>
-						<xsd:enumeration value="Command not executed due to user"/>
-						<xsd:enumeration value="Not found"/>
-						<xsd:enumeration value="Other"/>
-					</xsd:restriction>
-				</xsd:simpleType>
-			</xsd:attribute>
-			<xsd:anyAttribute namespace="##other"/>
-		</xsd:complexType>
-	</xsd:element>
-
-     */
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/SPVerifier.java b/packages/Osu/src/com/android/hotspot2/osu/SPVerifier.java
deleted file mode 100644
index f193b6a..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/SPVerifier.java
+++ /dev/null
@@ -1,330 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.util.Log;
-
-import com.android.anqp.HSIconFileElement;
-import com.android.anqp.I18Name;
-import com.android.anqp.IconInfo;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.asn1.Asn1Class;
-import com.android.hotspot2.asn1.Asn1Constructed;
-import com.android.hotspot2.asn1.Asn1Decoder;
-import com.android.hotspot2.asn1.Asn1Integer;
-import com.android.hotspot2.asn1.Asn1Object;
-import com.android.hotspot2.asn1.Asn1Octets;
-import com.android.hotspot2.asn1.Asn1Oid;
-import com.android.hotspot2.asn1.Asn1String;
-import com.android.hotspot2.asn1.OidMappings;
-import com.android.hotspot2.flow.OSUInfo;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.MessageDigest;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class SPVerifier {
-    public static final int OtherName = 0;
-    public static final int DNSName = 2;
-
-    private final OSUInfo mOSUInfo;
-
-    public SPVerifier(OSUInfo osuInfo) {
-        mOSUInfo = osuInfo;
-    }
-
-    /*
-    SEQUENCE:
-      [Context 0]:
-        SEQUENCE:
-          [Context 0]:                      -- LogotypeData
-            SEQUENCE:
-              SEQUENCE:
-                SEQUENCE:
-                  IA5String='image/png'
-                  SEQUENCE:
-                    SEQUENCE:
-                      SEQUENCE:
-                        OID=2.16.840.1.101.3.4.2.1
-                        NULL
-                      OCTET_STRING= cf aa 74 a8 ad af 85 82 06 c8 f5 b5 bf ee 45 72 8a ee ea bd 47 ab 50 d3 62 0c 92 c1 53 c3 4c 6b
-                  SEQUENCE:
-                    IA5String='http://www.r2-testbed.wi-fi.org/icon_orange_zxx.png'
-                SEQUENCE:
-                  INTEGER=4184
-                  INTEGER=-128
-                  INTEGER=61
-                  [Context 4]= 7a 78 78
-          [Context 0]:                      -- LogotypeData
-            SEQUENCE:
-              SEQUENCE:                     -- LogotypeImage
-                SEQUENCE:                   -- LogoTypeDetails
-                  IA5String='image/png'
-                  SEQUENCE:
-                    SEQUENCE:               -- HashAlgAndValue
-                      SEQUENCE:
-                        OID=2.16.840.1.101.3.4.2.1
-                        NULL
-                      OCTET_STRING= cb 35 5c ba 7a 21 59 df 8e 0a e1 d8 9f a4 81 9e 41 8f af 58 0c 08 d6 28 7f 66 22 98 13 57 95 8d
-                  SEQUENCE:
-                    IA5String='http://www.r2-testbed.wi-fi.org/icon_orange_eng.png'
-                SEQUENCE:                   -- LogotypeImageInfo
-                  INTEGER=11635
-                  INTEGER=-96
-                  INTEGER=76
-                  [Context 4]= 65 6e 67
-     */
-
-    private static class LogoTypeImage {
-        private final String mMimeType;
-        private final List<HashAlgAndValue> mHashes = new ArrayList<>();
-        private final List<String> mURIs = new ArrayList<>();
-        private final int mFileSize;
-        private final int mXsize;
-        private final int mYsize;
-        private final String mLanguage;
-
-        private LogoTypeImage(Asn1Constructed sequence) throws IOException {
-            Iterator<Asn1Object> children = sequence.getChildren().iterator();
-
-            Iterator<Asn1Object> logoTypeDetails =
-                    castObject(children.next(), Asn1Constructed.class).getChildren().iterator();
-            mMimeType = castObject(logoTypeDetails.next(), Asn1String.class).getString();
-
-            Asn1Constructed hashes = castObject(logoTypeDetails.next(), Asn1Constructed.class);
-            for (Asn1Object hash : hashes.getChildren()) {
-                mHashes.add(new HashAlgAndValue(castObject(hash, Asn1Constructed.class)));
-            }
-            Asn1Constructed urls = castObject(logoTypeDetails.next(), Asn1Constructed.class);
-            for (Asn1Object url : urls.getChildren()) {
-                mURIs.add(castObject(url, Asn1String.class).getString());
-            }
-
-            boolean imageInfoSet = false;
-            int fileSize = -1;
-            int xSize = -1;
-            int ySize = -1;
-            String language = null;
-
-            if (children.hasNext()) {
-                Iterator<Asn1Object> imageInfo =
-                        castObject(children.next(), Asn1Constructed.class).getChildren().iterator();
-
-                Asn1Object first = imageInfo.next();
-                if (first.getTag() == 0) {
-                    first = imageInfo.next();   // Ignore optional LogotypeImageType
-                }
-
-                fileSize = (int) castObject(first, Asn1Integer.class).getValue();
-                xSize = (int) castObject(imageInfo.next(), Asn1Integer.class).getValue();
-                ySize = (int) castObject(imageInfo.next(), Asn1Integer.class).getValue();
-                imageInfoSet = true;
-
-                if (imageInfo.hasNext()) {
-                    Asn1Object next = imageInfo.next();
-                    if (next.getTag() != 4) {
-                        next = imageInfo.hasNext() ? imageInfo.next() : null;   // Skip resolution
-                    }
-                    if (next != null && next.getTag() == 4) {
-                        language = new String(castObject(next, Asn1Octets.class).getOctets(),
-                                StandardCharsets.US_ASCII);
-                    }
-                }
-            }
-
-            if (imageInfoSet) {
-                mFileSize = complement(fileSize);
-                mXsize = complement(xSize);
-                mYsize = complement(ySize);
-            } else {
-                mFileSize = mXsize = mYsize = -1;
-            }
-            mLanguage = language;
-        }
-
-        private boolean verify(OSUInfo osuInfo) throws GeneralSecurityException, IOException {
-            IconInfo iconInfo = osuInfo.getIconInfo();
-            HSIconFileElement iconData = osuInfo.getIconFileElement();
-            if (!iconInfo.getIconType().equals(mMimeType) ||
-                    !iconInfo.getLanguage().equals(mLanguage) ||
-                    iconData.getIconData().length != mFileSize) {
-                return false;
-            }
-            for (HashAlgAndValue hash : mHashes) {
-                if (hash.getJCEName() != null) {
-                    MessageDigest digest = MessageDigest.getInstance(hash.getJCEName());
-                    byte[] computed = digest.digest(iconData.getIconData());
-                    if (!Arrays.equals(computed, hash.getHash())) {
-                        throw new IOException("Icon hash mismatch");
-                    } else {
-                        Log.d(OSUManager.TAG, "Icon verified with " + hash.getJCEName());
-                        return true;
-                    }
-                }
-            }
-            return false;
-        }
-
-        @Override
-        public String toString() {
-            return "LogoTypeImage{" +
-                    "MimeType='" + mMimeType + '\'' +
-                    ", hashes=" + mHashes +
-                    ", URIs=" + mURIs +
-                    ", fileSize=" + mFileSize +
-                    ", xSize=" + mXsize +
-                    ", ySize=" + mYsize +
-                    ", language='" + mLanguage + '\'' +
-                    '}';
-        }
-    }
-
-    private static class HashAlgAndValue {
-        private final String mJCEName;
-        private final byte[] mHash;
-
-        private HashAlgAndValue(Asn1Constructed sequence) throws IOException {
-            if (sequence.getChildren().size() != 2) {
-                throw new IOException("Bad HashAlgAndValue");
-            }
-            Iterator<Asn1Object> children = sequence.getChildren().iterator();
-            mJCEName = OidMappings.getJCEName(getFirstInner(children.next(), Asn1Oid.class));
-            mHash = castObject(children.next(), Asn1Octets.class).getOctets();
-        }
-
-        public String getJCEName() {
-            return mJCEName;
-        }
-
-        public byte[] getHash() {
-            return mHash;
-        }
-
-        @Override
-        public String toString() {
-            return "HashAlgAndValue{" +
-                    "JCEName='" + mJCEName + '\'' +
-                    ", hash=" + Utils.toHex(mHash) +
-                    '}';
-        }
-    }
-
-    private static int complement(int value) {
-        return value >= 0 ? value : (~value) + 1;
-    }
-
-    private static <T extends Asn1Object> T castObject(Asn1Object object, Class<T> klass)
-            throws IOException {
-        if (object.getClass() != klass) {
-            throw new IOException("Object is an " + object.getClass().getSimpleName() +
-                    " expected an " + klass.getSimpleName());
-        }
-        return klass.cast(object);
-    }
-
-    private static <T extends Asn1Object> T getFirstInner(Asn1Object container, Class<T> klass)
-            throws IOException {
-        if (container.getClass() != Asn1Constructed.class) {
-            throw new IOException("Not a container");
-        }
-        Iterator<Asn1Object> children = container.getChildren().iterator();
-        if (!children.hasNext()) {
-            throw new IOException("No content");
-        }
-        return castObject(children.next(), klass);
-    }
-
-    public void verify(X509Certificate osuCert) throws IOException, GeneralSecurityException {
-        if (osuCert == null) {
-            throw new IOException("No OSU cert found");
-        }
-
-        checkName(castObject(getExtension(osuCert, OidMappings.IdCeSubjectAltName),
-                Asn1Constructed.class));
-
-        List<LogoTypeImage> logos = getImageData(getExtension(osuCert, OidMappings.IdPeLogotype));
-        Log.d(OSUManager.TAG, "Logos: " + logos);
-        for (LogoTypeImage logoTypeImage : logos) {
-            if (logoTypeImage.verify(mOSUInfo)) {
-                return;
-            }
-        }
-        throw new IOException("Failed to match icon against any cert logo");
-    }
-
-    private static List<LogoTypeImage> getImageData(Asn1Object logoExtension) throws IOException {
-        Asn1Constructed logo = castObject(logoExtension, Asn1Constructed.class);
-        Asn1Constructed communityLogo = castObject(logo.getChildren().iterator().next(),
-                Asn1Constructed.class);
-        if (communityLogo.getTag() != 0) {
-            throw new IOException("Expected tag [0] for communityLogos");
-        }
-
-        List<LogoTypeImage> images = new ArrayList<>();
-        Asn1Constructed communityLogoSeq = castObject(communityLogo.getChildren().iterator().next(),
-                Asn1Constructed.class);
-        for (Asn1Object logoTypeData : communityLogoSeq.getChildren()) {
-            if (logoTypeData.getTag() != 0) {
-                throw new IOException("Expected tag [0] for LogotypeData");
-            }
-            for (Asn1Object logoTypeImage : castObject(logoTypeData.getChildren().iterator().next(),
-                    Asn1Constructed.class).getChildren()) {
-                // only read the image SEQUENCE and skip any audio [1] tags
-                if (logoTypeImage.getAsn1Class() == Asn1Class.Universal) {
-                    images.add(new LogoTypeImage(castObject(logoTypeImage, Asn1Constructed.class)));
-                }
-            }
-        }
-        return images;
-    }
-
-    private void checkName(Asn1Constructed altName) throws IOException {
-        Map<String, I18Name> friendlyNames = new HashMap<>();
-        for (Asn1Object name : altName.getChildren()) {
-            if (name.getAsn1Class() == Asn1Class.Context && name.getTag() == OtherName) {
-                Asn1Constructed otherName = (Asn1Constructed) name;
-                Iterator<Asn1Object> children = otherName.getChildren().iterator();
-                if (children.hasNext()) {
-                    Asn1Object oidObject = children.next();
-                    if (OidMappings.sIdWfaHotspotFriendlyName.equals(oidObject) &&
-                            children.hasNext()) {
-                        Asn1Constructed value = castObject(children.next(), Asn1Constructed.class);
-                        String text = castObject(value.getChildren().iterator().next(),
-                                Asn1String.class).getString();
-                        I18Name friendlyName = new I18Name(text);
-                        friendlyNames.put(friendlyName.getLanguage(), friendlyName);
-                    }
-                }
-            }
-        }
-        Log.d(OSUManager.TAG, "Friendly names: " + friendlyNames.values());
-        for (I18Name osuName : mOSUInfo.getOSUProvider().getNames()) {
-            I18Name friendlyName = friendlyNames.get(osuName.getLanguage());
-            if (!osuName.equals(friendlyName)) {
-                throw new IOException("Friendly name '" + osuName + " not in certificate");
-            }
-        }
-    }
-
-    private static Asn1Object getExtension(X509Certificate certificate, String extension)
-            throws GeneralSecurityException, IOException {
-        byte[] data = certificate.getExtensionValue(extension);
-        if (data == null) {
-            return null;
-        }
-        Asn1Octets octetString = (Asn1Octets) Asn1Decoder.decode(ByteBuffer.wrap(data)).
-                iterator().next();
-        Asn1Constructed sequence = castObject(Asn1Decoder.decode(
-                        ByteBuffer.wrap(octetString.getOctets())).iterator().next(),
-                Asn1Constructed.class);
-        Log.d(OSUManager.TAG, "Extension " + extension + ": " + sequence);
-        return sequence;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/UserInputListener.java b/packages/Osu/src/com/android/hotspot2/osu/UserInputListener.java
deleted file mode 100644
index ca30e3d..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/UserInputListener.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.net.Network;
-
-import java.net.URL;
-
-public interface UserInputListener {
-    /**
-     * Launch an appropriate application to handle user input and HTTP exchanges to the target
-     * URL. Under normal circumstances this implies that a web-browser is started and pointed at
-     * the target URL from which it is supposed to perform an initial HTTP GET operation.
-     * This call must not block beyond the time it takes to launch the user agent, i.e. must return
-     * well before the HTTP exchange terminates.
-     * @param target A fully encoded URL to which to send an initial HTTP GET and then handle
-     *               subsequent HTTP exchanges.
-     * @param endRedirect A URL to which the user agent will be redirected upon completion of
-     *                    the HTTP exchange. This parameter is for informational purposes only
-     *                    as the redirect to the URL is the responsibility of the remote server.
-     */
-    public void requestUserInput(URL target, Network network, URL endRedirect);
-
-    /**
-     * Notification that status of the OSU operation has changed. The implementation may choose to
-     * return a string that will be passed to the user agent. Please note that the string is
-     * passed as the payload of (the redirect) HTTP connection to the agent and must be formatted
-     * appropriately (e.g. as well formed HTML).
-     * Returning a null string on the initial status update of UserInputComplete or UserInputAborted
-     * will cause the local "redirect" web-server to terminate and any further strings returned will
-     * be ignored.
-     * If programmatic termination of the user agent is desired, it should be initiated from within
-     * the implementation of this method.
-     * @param status
-     * @param message
-     * @return
-     */
-    public String operationStatus(String spIdentity, OSUOperationStatus status, String message);
-
-    /**
-     * Notify the user that a de-authentication event is imminent.
-     * @param ess set to indicate that the de-authentication is for an ESS instead of a BSS
-     * @param delay delay the number of seconds that the user will have to wait before
-     *              reassociating with the BSS or ESS.
-     * @param url a URL to which to redirect the user
-     */
-    public void deAuthNotification(String spIdentity, boolean ess, int delay, URL url);
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/WiFiKeyManager.java b/packages/Osu/src/com/android/hotspot2/osu/WiFiKeyManager.java
deleted file mode 100644
index 54a3c4d..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/WiFiKeyManager.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package com.android.hotspot2.osu;
-
-import android.util.Log;
-
-import java.io.IOException;
-import java.net.Socket;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.Principal;
-import java.security.PrivateKey;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.net.ssl.X509KeyManager;
-import javax.security.auth.x500.X500Principal;
-
-public class WiFiKeyManager implements X509KeyManager {
-    private final KeyStore mKeyStore;
-    private final Map<X500Principal, String[]> mAliases = new HashMap<>();
-
-    public WiFiKeyManager(KeyStore keyStore) throws IOException {
-        mKeyStore = keyStore;
-    }
-
-    public void enableClientAuth(List<String> issuerNames) throws GeneralSecurityException,
-            IOException {
-
-        Set<X500Principal> acceptedIssuers = new HashSet<>();
-        for (String issuerName : issuerNames) {
-            acceptedIssuers.add(new X500Principal(issuerName));
-        }
-
-        Enumeration<String> aliases = mKeyStore.aliases();
-        while (aliases.hasMoreElements()) {
-            String alias = aliases.nextElement();
-            Certificate cert = mKeyStore.getCertificate(alias);
-            if ((cert instanceof X509Certificate) && mKeyStore.getKey(alias, null) != null) {
-                X509Certificate x509Certificate = (X509Certificate) cert;
-                X500Principal issuer = x509Certificate.getIssuerX500Principal();
-                if (acceptedIssuers.contains(issuer)) {
-                    mAliases.put(issuer, new String[]{alias, cert.getPublicKey().getAlgorithm()});
-                }
-            }
-        }
-
-        if (mAliases.isEmpty()) {
-            throw new IOException("No aliases match requested issuers: " + issuerNames);
-        }
-    }
-
-    private static class AliasEntry implements Comparable<AliasEntry> {
-        private final int mPreference;
-        private final String mAlias;
-
-        private AliasEntry(int preference, String alias) {
-            mPreference = preference;
-            mAlias = alias;
-        }
-
-        public int getPreference() {
-            return mPreference;
-        }
-
-        public String getAlias() {
-            return mAlias;
-        }
-
-        @Override
-        public int compareTo(AliasEntry other) {
-            return Integer.compare(getPreference(), other.getPreference());
-        }
-    }
-
-    @Override
-    public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
-
-        Map<String, Integer> keyPrefs = new HashMap<>(keyTypes.length);
-        int pref = 0;
-        for (String keyType : keyTypes) {
-            keyPrefs.put(keyType, pref++);
-        }
-
-        List<AliasEntry> aliases = new ArrayList<>();
-        if (issuers != null) {
-            for (Principal issuer : issuers) {
-                if (issuer instanceof X500Principal) {
-                    String[] aliasAndKey = mAliases.get((X500Principal) issuer);
-                    if (aliasAndKey != null) {
-                        Integer preference = keyPrefs.get(aliasAndKey[1]);
-                        if (preference != null) {
-                            aliases.add(new AliasEntry(preference, aliasAndKey[0]));
-                        }
-                    }
-                }
-            }
-        } else {
-            for (String[] aliasAndKey : mAliases.values()) {
-                Integer preference = keyPrefs.get(aliasAndKey[1]);
-                if (preference != null) {
-                    aliases.add(new AliasEntry(preference, aliasAndKey[0]));
-                }
-            }
-        }
-        Collections.sort(aliases);
-        return aliases.isEmpty() ? null : aliases.get(0).getAlias();
-    }
-
-    @Override
-    public String[] getClientAliases(String keyType, Principal[] issuers) {
-        List<String> aliases = new ArrayList<>();
-        if (issuers != null) {
-            for (Principal issuer : issuers) {
-                if (issuer instanceof X500Principal) {
-                    String[] aliasAndKey = mAliases.get((X500Principal) issuer);
-                    if (aliasAndKey != null) {
-                        aliases.add(aliasAndKey[0]);
-                    }
-                }
-            }
-        } else {
-            for (String[] aliasAndKey : mAliases.values()) {
-                aliases.add(aliasAndKey[0]);
-            }
-        }
-        return aliases.isEmpty() ? null : aliases.toArray(new String[aliases.size()]);
-    }
-
-    @Override
-    public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public String[] getServerAliases(String keyType, Principal[] issuers) {
-        throw new UnsupportedOperationException();
-    }
-
-    @Override
-    public X509Certificate[] getCertificateChain(String alias) {
-        try {
-            List<X509Certificate> certs = new ArrayList<>();
-            for (Certificate certificate : mKeyStore.getCertificateChain(alias)) {
-                if (certificate instanceof X509Certificate) {
-                    certs.add((X509Certificate) certificate);
-                }
-            }
-            return certs.toArray(new X509Certificate[certs.size()]);
-        } catch (KeyStoreException kse) {
-            Log.w(OSUManager.TAG, "Failed to retrieve certificates: " + kse);
-            return null;
-        }
-    }
-
-    @Override
-    public PrivateKey getPrivateKey(String alias) {
-        try {
-            return (PrivateKey) mKeyStore.getKey(alias, null);
-        } catch (GeneralSecurityException gse) {
-            Log.w(OSUManager.TAG, "Failed to retrieve private key: " + gse);
-            return null;
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/XMLParser.java b/packages/Osu/src/com/android/hotspot2/osu/XMLParser.java
deleted file mode 100644
index b23e555..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/XMLParser.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.android.hotspot2.osu;
-
-import com.android.hotspot2.omadm.XMLNode;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-public class XMLParser extends DefaultHandler {
-    private final SAXParser mParser;
-    private final InputSource mInputSource;
-
-    private XMLNode mRoot;
-    private XMLNode mCurrent;
-
-    public XMLParser(InputStream in) throws ParserConfigurationException, SAXException {
-        mParser = SAXParserFactory.newInstance().newSAXParser();
-        mInputSource = new InputSource(new BufferedReader(
-                new InputStreamReader(in, StandardCharsets.UTF_8)));
-    }
-
-    public XMLNode getRoot() throws SAXException, IOException {
-        mParser.parse(mInputSource, this);
-        return mRoot;
-    }
-
-    @Override
-    public void startElement(String uri, String localName, String qName, Attributes attributes)
-            throws SAXException {
-        XMLNode parent = mCurrent;
-
-        mCurrent = new XMLNode(mCurrent, qName, attributes);
-        //System.out.println("Added " + mCurrent.getTag() + ", atts " + mCurrent.getAttributes());
-
-        if (mRoot == null)
-            mRoot = mCurrent;
-        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);
-
-        try {
-            mCurrent.close();
-        } catch (IOException ioe) {
-            throw new SAXException("Failed to close element", ioe);
-        }
-
-        mCurrent = mCurrent.getParent();
-    }
-
-    @Override
-    public void characters(char[] ch, int start, int length) throws SAXException {
-        mCurrent.addText(ch, start, length);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/BrowserURI.java b/packages/Osu/src/com/android/hotspot2/osu/commands/BrowserURI.java
deleted file mode 100644
index 137dbc9..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/BrowserURI.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-import com.android.hotspot2.omadm.XMLNode;
-
-/*
-    <spp:sppPostDevDataResponse xmlns:spp="http://www.wi-fi.org/specifications/hotspot2dot0/v1.0/spp"
-                                spp:sessionID="D74A7B03005645DAA516191DEE77B94F" spp:sppStatus="OK"
-                                spp:sppVersion="1.0">
-        <spp:exec>
-            <spp:launchBrowserToURI>
-                https://subscription-server.r2-testbed-rks.wi-fi.org:8443/web/ruckuswireles/home/-/onlinesignup/subscriberDetails?Credentials=USERNAME_PASSWORD&amp;SessionID=D74A7B03005645DAA516191DEE77B94F&amp;RedirectURI=http://127.0.0.1:12345/index.htm&amp;UpdateMethod=SPP-ClientInitiated
-            </spp:launchBrowserToURI>
-        </spp:exec>
-    </spp:sppPostDevDataResponse>
- */
-
-public class BrowserURI implements OSUCommandData {
-    private final String mURI;
-
-    public BrowserURI(XMLNode commandNode) {
-        mURI = commandNode.getText();
-    }
-
-    public String getURI() {
-        return mURI;
-    }
-
-    @Override
-    public String toString() {
-        return "URI: " + mURI;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/ClientCertInfo.java b/packages/Osu/src/com/android/hotspot2/osu/commands/ClientCertInfo.java
deleted file mode 100644
index f877353..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/ClientCertInfo.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/*
-<xsd:element name="useClientCertTLS">
-    <xsd:annotation>
-        <xsd:documentation>Command to mobile to re-negotiate the TLS connection using a client certificate of the accepted type or Issuer to authenticate with the Subscription server.</xsd:documentation>
-    </xsd:annotation>
-    <xsd:complexType>
-        <xsd:sequence>
-            <xsd:element name="providerIssuerName" minOccurs="0"
-                maxOccurs="unbounded">
-                <xsd:complexType>
-                    <xsd:attribute name="name" type="xsd:string">
-                    <xsd:annotation>
-                    <xsd:documentation>The issuer name of an acceptable provider-issued certificate.  The text of this element is formatted in accordance with the Issuer Name field in RFC-3280.  This element is present only when acceptProviderCerts is true.</xsd:documentation>
-                    </xsd:annotation>
-                    </xsd:attribute>
-                    <xsd:anyAttribute namespace="##other"/>
-                </xsd:complexType>
-            </xsd:element>
-            <xsd:any namespace="##other" minOccurs="0"
-                maxOccurs="unbounded"/>
-        </xsd:sequence>
-        <xsd:attribute name="acceptMfgCerts" type="xsd:boolean"
-            use="optional" default="false">
-            <xsd:annotation>
-                <xsd:documentation>When this boolean is true, IEEE 802.1ar manufacturing certificates are acceptable for mobile device authentication.</xsd:documentation>
-            </xsd:annotation>
-        </xsd:attribute>
-        <xsd:attribute name="acceptProviderCerts" type="xsd:boolean"
-            use="optional" default="true">
-            <xsd:annotation>
-                <xsd:documentation>When this boolean is true, X509v3 certificates issued by providers identified in the providerIssuerName child element(s) are acceptable for mobile device authentication.</xsd:documentation>
-            </xsd:annotation>
-        </xsd:attribute>
-        <xsd:anyAttribute namespace="##other"/>
-    </xsd:complexType>
-</xsd:element>
- */
-
-public class ClientCertInfo implements OSUCommandData {
-    private final boolean mAcceptMfgCerts;
-    private final boolean mAcceptProviderCerts;
-    /*
-     * The issuer name of an acceptable provider-issued certificate.
-     * The text of this element is formatted in accordance with the Issuer Name field in RFC-3280.
-     * This element is present only when acceptProviderCerts is true.
-     */
-    private final List<String> mIssuerNames;
-
-    public ClientCertInfo(XMLNode commandNode) throws OMAException {
-        mAcceptMfgCerts = Boolean.parseBoolean(commandNode.getAttributeValue("acceptMfgCerts"));
-        mAcceptProviderCerts =
-                Boolean.parseBoolean(commandNode.getAttributeValue("acceptProviderCerts"));
-
-        if (mAcceptMfgCerts) {
-            mIssuerNames = new ArrayList<>();
-            for (XMLNode node : commandNode.getChildren()) {
-                if (node.getStrippedTag().equals("providerIssuerName")) {
-                    mIssuerNames.add(node.getAttributeValue("name"));
-                }
-            }
-        } else {
-            mIssuerNames = null;
-        }
-    }
-
-    public boolean doesAcceptMfgCerts() {
-        return mAcceptMfgCerts;
-    }
-
-    public boolean doesAcceptProviderCerts() {
-        return mAcceptProviderCerts;
-    }
-
-    public List<String> getIssuerNames() {
-        return mIssuerNames;
-    }
-
-    @Override
-    public String toString() {
-        return "ClientCertInfo{" +
-                "acceptMfgCerts=" + mAcceptMfgCerts +
-                ", acceptProviderCerts=" + mAcceptProviderCerts +
-                ", issuerNames=" + mIssuerNames +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/GetCertData.java b/packages/Osu/src/com/android/hotspot2/osu/commands/GetCertData.java
deleted file mode 100644
index 60a73fb..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/GetCertData.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-import android.util.Base64;
-
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.XMLNode;
-
-import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
-import java.util.Map;
-
-/*
-    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
-        <env:Header/>
-        <env:Body>
-            <spp:sppPostDevDataResponse xmlns:spp="http://www.wi-fi.org/specifications/hotspot2dot0/v1.0/spp"
-                                        spp:sessionID="A40103ACEDE94C45BA127A41239BD60F" spp:sppStatus="OK"
-                                        spp:sppVersion="1.0">
-                <spp:exec>
-                    <spp:getCertificate enrollmentProtocol="EST">
-                        <spp:enrollmentServerURI>https://osu-server.r2-testbed-rks.wi-fi.org:9446/.well-known/est
-                        </spp:enrollmentServerURI>
-                        <spp:estUserID>a88c4830-aafd-420b-b790-c08f457a0fa3</spp:estUserID>
-                        <spp:estPassword>cnVja3VzMTIzNA==</spp:estPassword>
-                    </spp:getCertificate>
-                </spp:exec>
-            </spp:sppPostDevDataResponse>
-        </env:Body>
-    </env:Envelope>
- */
-
-public class GetCertData implements OSUCommandData {
-    private final String mProtocol;
-    private final String mServer;
-    private final String mUserName;
-    private final byte[] mPassword;
-
-    public GetCertData(XMLNode commandNode) throws OMAException {
-        mProtocol = commandNode.getAttributeValue("enrollmentProtocol");
-
-        Map<String, String> values = new HashMap<>(3);
-        for (XMLNode node : commandNode.getChildren()) {
-            values.put(node.getStrippedTag(), node.getText());
-        }
-
-        mServer = values.get("enrollmentserveruri");
-        mUserName = values.get("estuserid");
-        mPassword = Base64.decode(values.get("estpassword"), Base64.DEFAULT);
-    }
-
-    public String getProtocol() {
-        return mProtocol;
-    }
-
-    public String getServer() {
-        return mServer;
-    }
-
-    public String getUserName() {
-        return mUserName;
-    }
-
-    public byte[] getPassword() {
-        return mPassword;
-    }
-
-    @Override
-    public String toString() {
-        return "GetCertData " +
-                "protocol='" + mProtocol + '\'' +
-                ", server='" + mServer + '\'' +
-                ", userName='" + mUserName + '\'' +
-                ", password='" + new String(mPassword, StandardCharsets.ISO_8859_1) + '\'';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/MOData.java b/packages/Osu/src/com/android/hotspot2/osu/commands/MOData.java
deleted file mode 100644
index aa83db0..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/MOData.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-import android.net.wifi.PasspointManagementObjectDefinition;
-
-import com.android.hotspot2.omadm.MOTree;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMAParser;
-import com.android.hotspot2.omadm.XMLNode;
-
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-
-public class MOData implements OSUCommandData {
-    private final String mBaseURI;
-    private final String mURN;
-    private final MOTree mMOTree;
-
-    public MOData(XMLNode root) {
-        mBaseURI = root.getAttributeValue("spp:managementTreeURI");
-        mURN = root.getAttributeValue("spp:moURN");
-        mMOTree = root.getMOTree();
-    }
-
-    public String getBaseURI() {
-        return mBaseURI;
-    }
-
-    public String getURN() {
-        return mURN;
-    }
-
-    public MOTree getMOTree() {
-        return mMOTree;
-    }
-
-    @Override
-    public String toString() {
-        return "Base URI: " + mBaseURI + ", MO: " + mMOTree;
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/MOURN.java b/packages/Osu/src/com/android/hotspot2/osu/commands/MOURN.java
deleted file mode 100644
index 46394ef..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/MOURN.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-/*
-<xsd:element name="uploadMO" maxOccurs="unbounded">
-    <xsd:annotation>
-        <xsd:documentation>Command to mobile to upload the MO named in the moURN attribute to the SPP server.</xsd:documentation>
-    </xsd:annotation>
-    <xsd:complexType>
-        <xsd:attribute ref="moURN"/>
-    </xsd:complexType>
-</xsd:element>
- */
-
-import com.android.hotspot2.omadm.XMLNode;
-
-public class MOURN implements OSUCommandData {
-    private final String mURN;
-
-    public MOURN(XMLNode root) {
-        mURN = root.getAttributeValue("spp:moURN");
-    }
-
-    public String getURN() {
-        return mURN;
-    }
-
-    @Override
-    public String toString() {
-        return "MOURN{" +
-                "URN='" + mURN + '\'' +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/commands/OSUCommandData.java b/packages/Osu/src/com/android/hotspot2/osu/commands/OSUCommandData.java
deleted file mode 100644
index 06f81bf..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/commands/OSUCommandData.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.android.hotspot2.osu.commands;
-
-/**
- * Marker interface
- */
-public interface OSUCommandData {
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/service/RedirectListener.java b/packages/Osu/src/com/android/hotspot2/osu/service/RedirectListener.java
deleted file mode 100644
index 105a96d..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/service/RedirectListener.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package com.android.hotspot2.osu.service;
-
-import android.util.Log;
-
-import com.android.hotspot2.flow.PlatformAdapter;
-import com.android.hotspot2.osu.OSUOperationStatus;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.URL;
-import java.nio.charset.StandardCharsets;
-import java.util.Random;
-
-public class RedirectListener extends Thread {
-    private static final long ThreadTimeout = 3000L;
-    private static final long UserTimeout = 3600000L;
-    private static final int MaxRetry = 5;
-    private static final String TAG = "OSULSN";
-
-    private static final String HTTPResponseHeader =
-            "HTTP/1.1 304 Not Modified\r\n" +
-                    "Server: dummy\r\n" +
-                    "Keep-Alive: timeout=500, max=5\r\n\r\n";
-
-    private static final String GoodBye =
-            "<html>" +
-                    "<head><title>Goodbye</title></head>" +
-                    "<body>" +
-                    "<h3>Killing browser...</h3>" +
-                    "</body>" +
-                    "</html>\r\n";
-
-    private final PlatformAdapter mPlatformAdapter;
-    private final String mSpName;
-    private final ServerSocket mServerSocket;
-    private final String mPath;
-    private final URL mURL;
-    private final Object mLock = new Object();
-
-    private boolean mListening;
-    private OSUOperationStatus mUserStatus;
-    private volatile boolean mAborted;
-
-    public RedirectListener(PlatformAdapter platformAdapter, String spName) throws IOException {
-        mPlatformAdapter = platformAdapter;
-        mSpName = spName;
-        mServerSocket = new ServerSocket(0, 5, InetAddress.getLocalHost());
-        Random rnd = new Random(System.currentTimeMillis());
-        mPath = "rnd" + Integer.toString(Math.abs(rnd.nextInt()), Character.MAX_RADIX);
-        mURL = new URL("http", mServerSocket.getInetAddress().getHostAddress(),
-                mServerSocket.getLocalPort(), mPath);
-
-        Log.d(TAG, "Redirect URL: " + mURL);
-        setName("HS20-Redirect-Listener");
-        setDaemon(true);
-    }
-
-    public void startService() throws IOException {
-        start();
-        synchronized (mLock) {
-            long bail = System.currentTimeMillis() + ThreadTimeout;
-            long remainder = ThreadTimeout;
-            while (remainder > 0 && !mListening) {
-                try {
-                    mLock.wait(remainder);
-                } catch (InterruptedException ie) {
-                    /**/
-                }
-                if (mListening) {
-                    break;
-                }
-                remainder = bail - System.currentTimeMillis();
-            }
-            if (!mListening) {
-                throw new IOException("Failed to start listener");
-            } else {
-                Log.d(TAG, "OSU Redirect listener running");
-            }
-        }
-    }
-
-    public boolean waitForUser() {
-        boolean success;
-        synchronized (mLock) {
-            long bail = System.currentTimeMillis() + UserTimeout;
-            long remainder = UserTimeout;
-            while (remainder > 0 && mUserStatus == null) {
-                try {
-                    mLock.wait(remainder);
-                } catch (InterruptedException ie) {
-                    /**/
-                }
-                if (mUserStatus != null) {
-                    break;
-                }
-                remainder = bail - System.currentTimeMillis();
-            }
-            success = mUserStatus == OSUOperationStatus.UserInputComplete;
-        }
-        abort();
-        return success;
-    }
-
-    public void abort() {
-        try {
-            synchronized (mLock) {
-                mUserStatus = OSUOperationStatus.UserInputAborted;
-                mLock.notifyAll();
-            }
-            mAborted = true;
-            mServerSocket.close();
-        } catch (IOException ioe) {
-            /**/
-        }
-    }
-
-    public URL getURL() {
-        return mURL;
-    }
-
-    @Override
-    public void run() {
-        int count = 0;
-        synchronized (mLock) {
-            mListening = true;
-            mLock.notifyAll();
-        }
-
-        boolean terminate = false;
-
-        for (; ; ) {
-            count++;
-            try (Socket instance = mServerSocket.accept()) {
-                try (BufferedReader in = new BufferedReader(
-                        new InputStreamReader(instance.getInputStream(), StandardCharsets.UTF_8))) {
-                    boolean detected = false;
-                    StringBuilder sb = new StringBuilder();
-                    String s;
-                    while ((s = in.readLine()) != null) {
-                        sb.append(s).append('\n');
-                        if (!detected && s.startsWith("GET")) {
-                            String[] segments = s.split(" ");
-                            if (segments.length == 3 &&
-                                    segments[2].startsWith("HTTP/") &&
-                                    segments[1].regionMatches(1, mPath, 0, mPath.length())) {
-                                detected = true;
-                            }
-                        }
-                        if (s.length() == 0) {
-                            break;
-                        }
-                    }
-                    Log.d(TAG, "Redirect receive: " + sb);
-                    String response = null;
-                    if (detected) {
-                        response = status(OSUOperationStatus.UserInputComplete);
-                        if (response == null) {
-                            response = GoodBye;
-                            terminate = true;
-                        }
-                    }
-                    try (BufferedWriter out = new BufferedWriter(
-                            new OutputStreamWriter(instance.getOutputStream(),
-                                    StandardCharsets.UTF_8))) {
-
-                        out.write(HTTPResponseHeader);
-                        if (response != null) {
-                            out.write(response);
-                        }
-                    }
-                    if (terminate) {
-                        break;
-                    } else if (count > MaxRetry) {
-                        status(OSUOperationStatus.UserInputAborted);
-                        break;
-                    }
-                }
-            } catch (IOException ioe) {
-                if (mAborted) {
-                    return;
-                } else if (count > MaxRetry) {
-                    status(OSUOperationStatus.UserInputAborted);
-                    break;
-                }
-            }
-        }
-    }
-
-    private String status(OSUOperationStatus status) {
-        Log.d(TAG, "User input status: " + status);
-        synchronized (mLock) {
-            mUserStatus = status;
-            mLock.notifyAll();
-        }
-        String message = (status == OSUOperationStatus.UserInputAborted) ?
-                "Browser closed" : null;
-
-        return mPlatformAdapter.notifyUser(status, message, mSpName);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/osu/service/RemediationHandler.java b/packages/Osu/src/com/android/hotspot2/osu/service/RemediationHandler.java
deleted file mode 100644
index e1c6af6..0000000
--- a/packages/Osu/src/com/android/hotspot2/osu/service/RemediationHandler.java
+++ /dev/null
@@ -1,585 +0,0 @@
-package com.android.hotspot2.osu.service;
-
-import android.app.AlarmManager;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.net.Network;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.os.IBinder;
-import android.os.RemoteException;
-import android.util.Log;
-
-import com.android.hotspot2.PasspointMatch;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.flow.FlowService;
-import com.android.hotspot2.omadm.MOManager;
-import com.android.hotspot2.omadm.MOTree;
-import com.android.hotspot2.omadm.OMAConstants;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.OMAParser;
-import com.android.hotspot2.osu.OSUManager;
-import com.android.hotspot2.pps.HomeSP;
-import com.android.hotspot2.pps.UpdateInfo;
-import com.android.hotspot2.flow.IFlowService;
-
-import org.xml.sax.SAXException;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import static com.android.hotspot2.pps.UpdateInfo.UpdateRestriction;
-
-public class RemediationHandler implements AlarmManager.OnAlarmListener {
-    private final Context mContext;
-    private final File mStateFile;
-
-    private final Map<String, PasspointConfig> mPasspointConfigs = new HashMap<>();
-    private final Map<String, List<RemediationEvent>> mUpdates = new HashMap<>();
-    private final LinkedList<PendingUpdate> mOutstanding = new LinkedList<>();
-
-    private WifiInfo mActiveWifiInfo;
-    private PasspointConfig mActivePasspointConfig;
-
-    public RemediationHandler(Context context, File stateFile) {
-        mContext = context;
-        mStateFile = stateFile;
-        Log.d(OSUManager.TAG, "State file: " + stateFile);
-        reloadAll(context, mPasspointConfigs, stateFile, mUpdates);
-        mActivePasspointConfig = getActivePasspointConfig();
-        calculateTimeout();
-    }
-
-    /**
-     * Network configs change: Re-evaluate set of HomeSPs and recalculate next time-out.
-     */
-    public void networkConfigChange() {
-        Log.d(OSUManager.TAG, "Networks changed");
-        mPasspointConfigs.clear();
-        mUpdates.clear();
-        Iterator<PendingUpdate> updates = mOutstanding.iterator();
-        while (updates.hasNext()) {
-            PendingUpdate update = updates.next();
-            if (!update.isWnmBased()) {
-                updates.remove();
-            }
-        }
-        reloadAll(mContext, mPasspointConfigs, mStateFile, mUpdates);
-        calculateTimeout();
-    }
-
-    /**
-     * Connected to new network: Try to rematch any outstanding remediation entries to the new
-     * config.
-     */
-    public void newConnection(WifiInfo newNetwork) {
-        mActivePasspointConfig = newNetwork != null ? getActivePasspointConfig() : null;
-        if (mActivePasspointConfig != null) {
-            Log.d(OSUManager.TAG, "New connection to "
-                    + mActivePasspointConfig.getHomeSP().getFQDN());
-        } else {
-            Log.d(OSUManager.TAG, "No passpoint connection");
-            return;
-        }
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        WifiInfo wifiInfo = wifiManager.getConnectionInfo();
-        Network network = wifiManager.getCurrentNetwork();
-
-        Iterator<PendingUpdate> updates = mOutstanding.iterator();
-        while (updates.hasNext()) {
-            PendingUpdate update = updates.next();
-            try {
-                if (update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) {
-                    update.remediate(network);
-                    updates.remove();
-                } else if (update.isWnmBased()) {
-                    Log.d(OSUManager.TAG, "WNM sender mismatches with BSS, cancelling remediation");
-                    // Drop WNM update if it doesn't match the connected network
-                    updates.remove();
-                }
-            } catch (IOException ioe) {
-                updates.remove();
-            }
-        }
-    }
-
-    /**
-     * Remediation timer fired: Iterate HomeSP and either pass on to remediation if there is a
-     * policy match or put on hold-off queue until a new network connection is made.
-     */
-    @Override
-    public void onAlarm() {
-        Log.d(OSUManager.TAG, "Remediation timer");
-        calculateTimeout();
-    }
-
-    /**
-     * Remediation frame received, either pass on to pre-remediation check right away or await
-     * network connection.
-     */
-    public void wnmReceived(long bssid, String url) {
-        PendingUpdate update = new PendingUpdate(bssid, url);
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        WifiInfo wifiInfo = wifiManager.getConnectionInfo();
-        try {
-            if (mActivePasspointConfig == null) {
-                Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
-                        "received, adding to outstanding remediations", url, bssid));
-                mOutstanding.addFirst(new PendingUpdate(bssid, url));
-            } else if (update.matches(wifiInfo, mActivePasspointConfig.getHomeSP())) {
-                Log.d(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
-                        "received, remediating now", url, bssid));
-                update.remediate(wifiManager.getCurrentNetwork());
-            } else {
-                Log.w(OSUManager.TAG, String.format("WNM remediation frame '%s' through %012x " +
-                        "does not meet restriction", url, bssid));
-            }
-        } catch (IOException ioe) {
-            Log.w(OSUManager.TAG, "Failed to remediate from WNM: " + ioe);
-        }
-    }
-
-    /**
-     * Callback to indicate that remediation has succeeded.
-     * @param fqdn The SPs FQDN
-     * @param policy set if this update was a policy update rather than a subscription update.
-     */
-    public void remediationDone(String fqdn, boolean policy) {
-        Log.d(OSUManager.TAG, "Remediation complete for " + fqdn);
-        long now = System.currentTimeMillis();
-        List<RemediationEvent> events = mUpdates.get(fqdn);
-        if (events == null) {
-            events = new ArrayList<>();
-            events.add(new RemediationEvent(fqdn, policy, now));
-            mUpdates.put(fqdn, events);
-        } else {
-            Iterator<RemediationEvent> eventsIterator = events.iterator();
-            while (eventsIterator.hasNext()) {
-                RemediationEvent event = eventsIterator.next();
-                if (event.isPolicy() == policy) {
-                    eventsIterator.remove();
-                }
-            }
-            events.add(new RemediationEvent(fqdn, policy, now));
-        }
-        saveUpdates(mStateFile, mUpdates);
-    }
-
-    public String getCurrentSpName() {
-        PasspointConfig config = getActivePasspointConfig();
-        return config != null ? config.getHomeSP().getFriendlyName() : "unknown";
-    }
-
-    private PasspointConfig getActivePasspointConfig() {
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        mActiveWifiInfo = wifiManager.getConnectionInfo();
-        if (mActiveWifiInfo == null) {
-            return null;
-        }
-
-        for (PasspointConfig passpointConfig : mPasspointConfigs.values()) {
-            if (passpointConfig.getWifiConfiguration().networkId
-                    == mActiveWifiInfo.getNetworkId()) {
-                return passpointConfig;
-            }
-        }
-        return null;
-    }
-
-    private void calculateTimeout() {
-        long now = System.currentTimeMillis();
-        long next = Long.MAX_VALUE;
-        WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-        Network network = wifiManager.getCurrentNetwork();
-
-        boolean newBaseTimes = false;
-        for (PasspointConfig passpointConfig : mPasspointConfigs.values()) {
-            HomeSP homeSP = passpointConfig.getHomeSP();
-
-            for (boolean policy : new boolean[] {false, true}) {
-                Long expiry = getNextUpdate(homeSP, policy, now);
-                Log.d(OSUManager.TAG, "Next remediation for " + homeSP.getFQDN()
-                        + (policy ? "/policy" : "/subscription")
-                        + " is " + toExpiry(expiry));
-                if (expiry == null || inProgress(homeSP, policy)) {
-                    continue;
-                } else if (expiry < 0) {
-                    next = now - expiry;
-                    newBaseTimes = true;
-                    continue;
-                }
-
-                if (expiry <= now) {
-                    String uri = policy ? homeSP.getPolicy().getPolicyUpdate().getURI()
-                            : homeSP.getSubscriptionUpdate().getURI();
-                    PendingUpdate update = new PendingUpdate(homeSP, uri, policy);
-                    try {
-                        if (update.matches(mActiveWifiInfo, homeSP)) {
-                            update.remediate(network);
-                        } else {
-                            Log.d(OSUManager.TAG, "Remediation for "
-                                    + homeSP.getFQDN() + " pending");
-                            mOutstanding.addLast(update);
-                        }
-                    } catch (IOException ioe) {
-                        Log.w(OSUManager.TAG, "Failed to remediate "
-                                + homeSP.getFQDN() + ": " + ioe);
-                    }
-                } else {
-                    next = Math.min(next, expiry);
-                }
-            }
-        }
-        if (newBaseTimes) {
-            saveUpdates(mStateFile, mUpdates);
-        }
-        Log.d(OSUManager.TAG, "Next time-out at " + toExpiry(next));
-        AlarmManager alarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
-        alarmManager.set(AlarmManager.RTC, next, "osu-remediation", this, null);
-    }
-
-    private static String toExpiry(Long time) {
-        if (time == null) {
-            return "n/a";
-        } else if (time < 0) {
-            return Utils.toHMS(-time) + " from now";
-        } else if (time > 0xffffffffffffL) {
-            return "infinity";
-        } else {
-            return Utils.toUTCString(time);
-        }
-    }
-
-    /**
-     * Get the next update time for the homeSP subscription or policy entry. Automatically add a
-     * wall time reference if it is missing.
-     * @param homeSP The HomeSP to check
-     * @param policy policy or subscription object.
-     * @return -interval if no wall time ref, null if n/a, otherwise wall time of next update.
-     */
-    private Long getNextUpdate(HomeSP homeSP, boolean policy, long now) {
-        long interval;
-        if (policy) {
-            interval = homeSP.getPolicy().getPolicyUpdate().getInterval();
-        } else if (homeSP.getSubscriptionUpdate() != null) {
-            interval = homeSP.getSubscriptionUpdate().getInterval();
-        } else {
-            return null;
-        }
-        if (interval < 0) {
-            return null;
-        }
-
-        RemediationEvent event = getMatchingEvent(mUpdates.get(homeSP.getFQDN()), policy);
-        if (event == null) {
-            List<RemediationEvent> events = mUpdates.get(homeSP.getFQDN());
-            if (events == null) {
-                events = new ArrayList<>();
-                mUpdates.put(homeSP.getFQDN(), events);
-            }
-            events.add(new RemediationEvent(homeSP.getFQDN(), policy, now));
-            return -interval;
-        }
-        return event.getLastUpdate() + interval;
-    }
-
-    private boolean inProgress(HomeSP homeSP, boolean policy) {
-        Iterator<PendingUpdate> updates = mOutstanding.iterator();
-        while (updates.hasNext()) {
-            PendingUpdate update = updates.next();
-            if (update.getHomeSP() != null
-                    && update.getHomeSP().getFQDN().equals(homeSP.getFQDN())) {
-                if (update.isPolicy() && !policy) {
-                    // Subscription updates takes precedence over policy updates
-                    updates.remove();
-                    return false;
-                } else {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    private static RemediationEvent getMatchingEvent(
-            List<RemediationEvent> events, boolean policy) {
-        if (events == null) {
-            return null;
-        }
-        for (RemediationEvent event : events) {
-            if (event.isPolicy() == policy) {
-                return event;
-            }
-        }
-        return null;
-    }
-
-    private static void reloadAll(Context context, Map<String, PasspointConfig> passpointConfigs,
-                                  File stateFile, Map<String, List<RemediationEvent>> updates) {
-
-        loadAllSps(context, passpointConfigs);
-        try {
-            loadUpdates(stateFile, updates);
-        } catch (IOException ioe) {
-            Log.w(OSUManager.TAG, "Failed to load updates file: " + ioe);
-        }
-
-        boolean change = false;
-        Iterator<Map.Entry<String, List<RemediationEvent>>> events = updates.entrySet().iterator();
-        while (events.hasNext()) {
-            Map.Entry<String, List<RemediationEvent>> event = events.next();
-            if (!passpointConfigs.containsKey(event.getKey())) {
-                events.remove();
-                change = true;
-            }
-        }
-        Log.d(OSUManager.TAG, "Updates: " + updates);
-        if (change) {
-            saveUpdates(stateFile, updates);
-        }
-    }
-
-    private static void loadAllSps(Context context, Map<String, PasspointConfig> passpointConfigs) {
-        WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        List<WifiConfiguration> configs = wifiManager.getPrivilegedConfiguredNetworks();
-        if (configs == null) {
-            return;
-        }
-        int count = 0;
-        for (WifiConfiguration config : configs) {
-            String moTree = config.getMoTree();
-            if (moTree != null) {
-                try {
-                    passpointConfigs.put(config.FQDN, new PasspointConfig(config));
-                    count++;
-                } catch (IOException | SAXException e) {
-                    Log.w(OSUManager.TAG, "Failed to parse MO: " + e);
-                }
-            }
-        }
-        Log.d(OSUManager.TAG, "Loaded " + count + " SPs");
-    }
-
-    private static void loadUpdates(File file, Map<String, List<RemediationEvent>> updates)
-            throws IOException {
-        try (BufferedReader in = new BufferedReader(new FileReader(file))) {
-            String line;
-            while ((line = in.readLine()) != null) {
-                try {
-                    RemediationEvent event = new RemediationEvent(line);
-                    List<RemediationEvent> events = updates.get(event.getFqdn());
-                    if (events == null) {
-                        events = new ArrayList<>();
-                        updates.put(event.getFqdn(), events);
-                    }
-                    events.add(event);
-                } catch (IOException | NumberFormatException e) {
-                    Log.w(OSUManager.TAG, "Bad line in " + file + ": '" + line + "': " + e);
-                }
-            }
-        }
-    }
-
-    private static void saveUpdates(File file, Map<String, List<RemediationEvent>> updates) {
-        try (BufferedWriter out = new BufferedWriter(new FileWriter(file, false))) {
-            for (List<RemediationEvent> events : updates.values()) {
-                for (RemediationEvent event : events) {
-                    Log.d(OSUManager.TAG, "Writing wall time ref for " + event);
-                    out.write(event.toString());
-                    out.newLine();
-                }
-            }
-        } catch (IOException ioe) {
-            Log.w(OSUManager.TAG, "Failed to save update state: " + ioe);
-        }
-    }
-
-    private static class PasspointConfig {
-        private final WifiConfiguration mWifiConfiguration;
-        private final MOTree mMOTree;
-        private final HomeSP mHomeSP;
-
-        private PasspointConfig(WifiConfiguration config) throws IOException, SAXException {
-            mWifiConfiguration = config;
-            OMAParser omaParser = new OMAParser();
-            mMOTree = omaParser.parse(config.getMoTree(), OMAConstants.PPS_URN);
-            List<HomeSP> spList = MOManager.buildSPs(mMOTree);
-            if (spList.size() != 1) {
-                throw new OMAException("Expected exactly one HomeSP, got " + spList.size());
-            }
-            mHomeSP = spList.iterator().next();
-        }
-
-        public WifiConfiguration getWifiConfiguration() {
-            return mWifiConfiguration;
-        }
-
-        public HomeSP getHomeSP() {
-            return mHomeSP;
-        }
-
-        public MOTree getMOTree() {
-            return mMOTree;
-        }
-    }
-
-    private static class RemediationEvent {
-        private final String mFqdn;
-        private final boolean mPolicy;
-        private final long mLastUpdate;
-
-        private RemediationEvent(String value) throws IOException {
-            String[] segments = value.split(" ");
-            if (segments.length != 3) {
-                throw new IOException("Bad line: '" + value + "'");
-            }
-            mFqdn = segments[0];
-            mPolicy = segments[1].equals("1");
-            mLastUpdate = Long.parseLong(segments[2]);
-        }
-
-        private RemediationEvent(String fqdn, boolean policy, long now) {
-            mFqdn = fqdn;
-            mPolicy = policy;
-            mLastUpdate = now;
-        }
-
-        public String getFqdn() {
-            return mFqdn;
-        }
-
-        public boolean isPolicy() {
-            return mPolicy;
-        }
-
-        public long getLastUpdate() {
-            return mLastUpdate;
-        }
-
-        @Override
-        public String toString() {
-            return String.format("%s %c %d", mFqdn, mPolicy ? '1' : '0', mLastUpdate);
-        }
-    }
-
-    private class PendingUpdate {
-        private final HomeSP mHomeSP;       // For time based updates
-        private final long mBssid;          // WNM based
-        private final String mUrl;          // WNM based
-        private final boolean mPolicy;
-
-        private PendingUpdate(HomeSP homeSP, String url, boolean policy) {
-            mHomeSP = homeSP;
-            mPolicy = policy;
-            mBssid = 0L;
-            mUrl = url;
-        }
-
-        private PendingUpdate(long bssid, String url) {
-            mBssid = bssid;
-            mUrl = url;
-            mHomeSP = null;
-            mPolicy = false;
-        }
-
-        private boolean matches(WifiInfo wifiInfo, HomeSP activeSP) throws IOException {
-            if (mHomeSP == null) {
-                // WNM initiated remediation, HomeSP restriction
-                Log.d(OSUManager.TAG, String.format("Checking applicability of %s to %012x\n",
-                        wifiInfo != null ? wifiInfo.getBSSID() : "-", mBssid));
-                return wifiInfo != null
-                        && Utils.parseMac(wifiInfo.getBSSID()) == mBssid
-                        && passesRestriction(activeSP);   // !!! b/28600780
-            } else {
-                return passesRestriction(mHomeSP);
-            }
-        }
-
-        private boolean passesRestriction(HomeSP restrictingSP)
-                throws IOException {
-            UpdateInfo updateInfo;
-            if (mPolicy) {
-                if (restrictingSP.getPolicy() == null) {
-                    throw new IOException("No policy object");
-                }
-                updateInfo = restrictingSP.getPolicy().getPolicyUpdate();
-            } else {
-                updateInfo = restrictingSP.getSubscriptionUpdate();
-            }
-
-            if (updateInfo.getUpdateRestriction() == UpdateRestriction.Unrestricted) {
-                return true;
-            }
-
-            PasspointMatch match = matchProviderWithCurrentNetwork(restrictingSP.getFQDN());
-            Log.d(OSUManager.TAG, "Current match for '" + restrictingSP.getFQDN()
-                    + "' is " + match + ", restriction " + updateInfo.getUpdateRestriction());
-            return match == PasspointMatch.HomeProvider
-                    || (match == PasspointMatch.RoamingProvider
-                    && updateInfo.getUpdateRestriction() == UpdateRestriction.RoamingPartner);
-        }
-
-        private void remediate(Network network) {
-            RemediationHandler.this.remediate(mHomeSP != null ? mHomeSP.getFQDN() : null,
-                    mUrl, mPolicy, network);
-        }
-
-        private HomeSP getHomeSP() {
-            return mHomeSP;
-        }
-
-        private boolean isPolicy() {
-            return mPolicy;
-        }
-
-        private boolean isWnmBased() {
-            return mHomeSP == null;
-        }
-
-        private PasspointMatch matchProviderWithCurrentNetwork(String fqdn) {
-            WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
-            return Utils.mapEnum(wifiManager.matchProviderWithCurrentNetwork(fqdn),
-                    PasspointMatch.class);
-        }
-    }
-
-    /**
-     * Initiate remediation
-     * @param spFqdn The FQDN of the current SP, not set for WNM based remediation
-     * @param url The URL of the remediation server
-     * @param policy Set if this is a policy update rather than a subscription update
-     * @param network The network to use for remediation
-     */
-    private void remediate(final String spFqdn, final String url,
-                           final boolean policy, final Network network) {
-        mContext.bindService(new Intent(mContext, FlowService.class), new ServiceConnection() {
-            @Override
-            public void onServiceConnected(ComponentName name, IBinder service) {
-                try {
-                    IFlowService fs = IFlowService.Stub.asInterface(service);
-                    fs.remediate(spFqdn, url, policy, network);
-                } catch (RemoteException re) {
-                    Log.e(OSUManager.TAG, "Caught re: " + re);
-                }
-            }
-
-            @Override
-            public void onServiceDisconnected(ComponentName name) {
-
-            }
-        }, Context.BIND_AUTO_CREATE);
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/Credential.java b/packages/Osu/src/com/android/hotspot2/pps/Credential.java
deleted file mode 100644
index 15f0dcf..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/Credential.java
+++ /dev/null
@@ -1,252 +0,0 @@
-package com.android.hotspot2.pps;
-
-import android.text.TextUtils;
-import android.util.Base64;
-
-import com.android.anqp.eap.EAPMethod;
-import com.android.hotspot2.IMSIParameter;
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.omadm.OMAException;
-
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-
-public class Credential {
-    public enum CertType {IEEE, x509v3}
-
-    public static final String CertTypeX509 = "x509v3";
-    public static final String CertTypeIEEE = "802.1ar";
-
-    private final long mCtime;
-    private final long mExpTime;
-    private final String mRealm;
-    private final boolean mCheckAAACert;
-
-    private final String mUserName;
-    private final String mPassword;
-    private final boolean mDisregardPassword;
-    private final boolean mMachineManaged;
-    private final String mSTokenApp;
-    private final boolean mShare;
-    private final EAPMethod mEAPMethod;
-
-    private final CertType mCertType;
-    private final byte[] mFingerPrint;
-
-    private final IMSIParameter mImsi;
-
-    public Credential(long ctime, long expTime, String realm, boolean checkAAACert,
-                      EAPMethod eapMethod, String userName, String password,
-                      boolean machineManaged, String stApp, boolean share) {
-        mCtime = ctime;
-        mExpTime = expTime;
-        mRealm = realm;
-        mCheckAAACert = checkAAACert;
-        mEAPMethod = eapMethod;
-        mUserName = userName;
-
-        if (!TextUtils.isEmpty(password)) {
-            byte[] pwOctets = Base64.decode(password, Base64.DEFAULT);
-            mPassword = new String(pwOctets, StandardCharsets.UTF_8);
-        } else {
-            mPassword = null;
-        }
-        mDisregardPassword = false;
-
-        mMachineManaged = machineManaged;
-        mSTokenApp = stApp;
-        mShare = share;
-
-        mCertType = null;
-        mFingerPrint = null;
-
-        mImsi = null;
-    }
-
-    public Credential(long ctime, long expTime, String realm, boolean checkAAACert,
-                      EAPMethod eapMethod, Credential.CertType certType, byte[] fingerPrint) {
-        mCtime = ctime;
-        mExpTime = expTime;
-        mRealm = realm;
-        mCheckAAACert = checkAAACert;
-        mEAPMethod = eapMethod;
-        mCertType = certType;
-        mFingerPrint = fingerPrint;
-
-        mUserName = null;
-        mPassword = null;
-        mDisregardPassword = false;
-        mMachineManaged = false;
-        mSTokenApp = null;
-        mShare = false;
-
-        mImsi = null;
-    }
-
-    public Credential(long ctime, long expTime, String realm, boolean checkAAACert,
-                      EAPMethod eapMethod, IMSIParameter imsi) {
-        mCtime = ctime;
-        mExpTime = expTime;
-        mRealm = realm;
-        mCheckAAACert = checkAAACert;
-        mEAPMethod = eapMethod;
-        mImsi = imsi;
-
-        mCertType = null;
-        mFingerPrint = null;
-
-        mUserName = null;
-        mPassword = null;
-        mDisregardPassword = false;
-        mMachineManaged = false;
-        mSTokenApp = null;
-        mShare = false;
-    }
-
-    public Credential(Credential other, String password) {
-        mCtime = other.mCtime;
-        mExpTime = other.mExpTime;
-        mRealm = other.mRealm;
-        mCheckAAACert = other.mCheckAAACert;
-        mUserName = other.mUserName;
-        mPassword = password;
-        mDisregardPassword = other.mDisregardPassword;
-        mMachineManaged = other.mMachineManaged;
-        mSTokenApp = other.mSTokenApp;
-        mShare = other.mShare;
-        mEAPMethod = other.mEAPMethod;
-        mCertType = other.mCertType;
-        mFingerPrint = other.mFingerPrint;
-        mImsi = other.mImsi;
-    }
-
-    public static CertType mapCertType(String certType) throws OMAException {
-        if (certType.equalsIgnoreCase(CertTypeX509)) {
-            return CertType.x509v3;
-        } else if (certType.equalsIgnoreCase(CertTypeIEEE)) {
-            return CertType.IEEE;
-        } else {
-            throw new OMAException("Invalid cert type: '" + certType + "'");
-        }
-    }
-
-    public EAPMethod getEAPMethod() {
-        return mEAPMethod;
-    }
-
-    public String getRealm() {
-        return mRealm;
-    }
-
-    public IMSIParameter getImsi() {
-        return mImsi;
-    }
-
-    public String getUserName() {
-        return mUserName;
-    }
-
-    public String getPassword() {
-        return mPassword;
-    }
-
-    public boolean hasDisregardPassword() {
-        return mDisregardPassword;
-    }
-
-    public CertType getCertType() {
-        return mCertType;
-    }
-
-    public byte[] getFingerPrint() {
-        return mFingerPrint;
-    }
-
-    public long getCtime() {
-        return mCtime;
-    }
-
-    public long getExpTime() {
-        return mExpTime;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-
-        Credential that = (Credential) o;
-
-        if (mCheckAAACert != that.mCheckAAACert) return false;
-        if (mCtime != that.mCtime) return false;
-        if (mExpTime != that.mExpTime) return false;
-        if (mMachineManaged != that.mMachineManaged) return false;
-        if (mShare != that.mShare) return false;
-        if (mCertType != that.mCertType) return false;
-        if (!mEAPMethod.equals(that.mEAPMethod)) return false;
-        if (!Arrays.equals(mFingerPrint, that.mFingerPrint)) return false;
-        if (!safeEquals(mImsi, that.mImsi)) {
-            return false;
-        }
-
-        if (!mDisregardPassword && !safeEquals(mPassword, that.mPassword)) {
-            return false;
-        }
-
-        if (!mRealm.equals(that.mRealm)) return false;
-        if (!safeEquals(mSTokenApp, that.mSTokenApp)) {
-            return false;
-        }
-        if (!safeEquals(mUserName, that.mUserName)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    private static boolean safeEquals(Object s1, Object s2) {
-        if (s1 == null) {
-            return s2 == null;
-        } else {
-            return s2 != null && s1.equals(s2);
-        }
-    }
-
-    @Override
-    public int hashCode() {
-        int result = (int) (mCtime ^ (mCtime >>> 32));
-        result = 31 * result + (int) (mExpTime ^ (mExpTime >>> 32));
-        result = 31 * result + mRealm.hashCode();
-        result = 31 * result + (mCheckAAACert ? 1 : 0);
-        result = 31 * result + (mUserName != null ? mUserName.hashCode() : 0);
-        result = 31 * result + (mPassword != null ? mPassword.hashCode() : 0);
-        result = 31 * result + (mMachineManaged ? 1 : 0);
-        result = 31 * result + (mSTokenApp != null ? mSTokenApp.hashCode() : 0);
-        result = 31 * result + (mShare ? 1 : 0);
-        result = 31 * result + mEAPMethod.hashCode();
-        result = 31 * result + (mCertType != null ? mCertType.hashCode() : 0);
-        result = 31 * result + (mFingerPrint != null ? Arrays.hashCode(mFingerPrint) : 0);
-        result = 31 * result + (mImsi != null ? mImsi.hashCode() : 0);
-        return result;
-    }
-
-    @Override
-    public String toString() {
-        return "Credential{" +
-                "mCtime=" + Utils.toUTCString(mCtime) +
-                ", mExpTime=" + Utils.toUTCString(mExpTime) +
-                ", mRealm='" + mRealm + '\'' +
-                ", mCheckAAACert=" + mCheckAAACert +
-                ", mUserName='" + mUserName + '\'' +
-                ", mPassword='" + mPassword + '\'' +
-                ", mDisregardPassword=" + mDisregardPassword +
-                ", mMachineManaged=" + mMachineManaged +
-                ", mSTokenApp='" + mSTokenApp + '\'' +
-                ", mShare=" + mShare +
-                ", mEAPMethod=" + mEAPMethod +
-                ", mCertType=" + mCertType +
-                ", mFingerPrint=" + Utils.toHexString(mFingerPrint) +
-                ", mImsi='" + mImsi + '\'' +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/DomainMatcher.java b/packages/Osu/src/com/android/hotspot2/pps/DomainMatcher.java
deleted file mode 100644
index 10768d6..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/DomainMatcher.java
+++ /dev/null
@@ -1,149 +0,0 @@
-package com.android.hotspot2.pps;
-
-import com.android.hotspot2.Utils;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-public class DomainMatcher {
-
-    public enum Match {None, Primary, Secondary}
-
-    private final Label mRoot;
-
-    private static class Label {
-        private final Map<String, Label> mSubDomains;
-        private final Match mMatch;
-
-        private Label(Match match) {
-            mMatch = match;
-            mSubDomains = match == Match.None ? new HashMap<String, Label>() : null;
-        }
-
-        private void addDomain(Iterator<String> labels, Match match) {
-            String labelName = labels.next();
-            if (labels.hasNext()) {
-                Label subLabel = new Label(Match.None);
-                mSubDomains.put(labelName, subLabel);
-                subLabel.addDomain(labels, match);
-            } else {
-                mSubDomains.put(labelName, new Label(match));
-            }
-        }
-
-        private Label getSubLabel(String labelString) {
-            return mSubDomains.get(labelString);
-        }
-
-        public Match getMatch() {
-            return mMatch;
-        }
-
-        private void toString(StringBuilder sb) {
-            if (mSubDomains != null) {
-                sb.append(".{");
-                for (Map.Entry<String, Label> entry : mSubDomains.entrySet()) {
-                    sb.append(entry.getKey());
-                    entry.getValue().toString(sb);
-                }
-                sb.append('}');
-            } else {
-                sb.append('=').append(mMatch);
-            }
-        }
-
-        @Override
-        public String toString() {
-            StringBuilder sb = new StringBuilder();
-            toString(sb);
-            return sb.toString();
-        }
-    }
-
-    public DomainMatcher(List<String> primary, List<List<String>> secondary) {
-        mRoot = new Label(Match.None);
-        for (List<String> secondaryLabel : secondary) {
-            mRoot.addDomain(secondaryLabel.iterator(), Match.Secondary);
-        }
-        // Primary overwrites secondary.
-        mRoot.addDomain(primary.iterator(), Match.Primary);
-    }
-
-    /**
-     * Check if domain is either a the same or a sub-domain of any of the domains in the domain tree
-     * in this matcher, i.e. all or or a sub-set of the labels in domain matches a path in the tree.
-     *
-     * @param domain Domain to be checked.
-     * @return None if domain is not a sub-domain, Primary if it matched one of the primary domains
-     * or Secondary if it matched on of the secondary domains.
-     */
-    public Match isSubDomain(List<String> domain) {
-
-        Label label = mRoot;
-        for (String labelString : domain) {
-            label = label.getSubLabel(labelString);
-            if (label == null) {
-                return Match.None;
-            } else if (label.getMatch() != Match.None) {
-                return label.getMatch();
-            }
-        }
-        return Match.None;  // Domain is a super domain
-    }
-
-    public static boolean arg2SubdomainOfArg1(List<String> arg1, List<String> arg2) {
-        if (arg2.size() < arg1.size()) {
-            return false;
-        }
-
-        Iterator<String> l1 = arg1.iterator();
-        Iterator<String> l2 = arg2.iterator();
-
-        while (l1.hasNext()) {
-            if (!l1.next().equals(l2.next())) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        return "Domain matcher " + mRoot;
-    }
-
-    private static final String[] TestDomains = {
-            "garbage.apple.com",
-            "apple.com",
-            "com",
-            "jan.android.google.com.",
-            "jan.android.google.com",
-            "android.google.com",
-            "google.com",
-            "jan.android.google.net.",
-            "jan.android.google.net",
-            "android.google.net",
-            "google.net",
-            "net.",
-            "."
-    };
-
-    public static void main(String[] args) {
-        DomainMatcher dm1 = new DomainMatcher(Utils.splitDomain("android.google.com"),
-                Collections.<List<String>>emptyList());
-        for (String domain : TestDomains) {
-            System.out.println(domain + ": " + dm1.isSubDomain(Utils.splitDomain(domain)));
-        }
-        List<List<String>> secondaries = new ArrayList<List<String>>();
-        secondaries.add(Utils.splitDomain("apple.com"));
-        secondaries.add(Utils.splitDomain("net"));
-        DomainMatcher dm2 = new DomainMatcher(Utils.splitDomain("android.google.com"), secondaries);
-        for (String domain : TestDomains) {
-            System.out.println(domain + ": " + dm2.isSubDomain(Utils.splitDomain(domain)));
-        }
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/HomeSP.java b/packages/Osu/src/com/android/hotspot2/pps/HomeSP.java
deleted file mode 100644
index cfbf9d1..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/HomeSP.java
+++ /dev/null
@@ -1,211 +0,0 @@
-package com.android.hotspot2.pps;
-
-import com.android.hotspot2.Utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class HomeSP {
-    private final Map<String, Long> mSSIDs;        // SSID, HESSID, [0,N]
-    private final String mFQDN;
-    private final DomainMatcher mDomainMatcher;
-    private final Set<String> mOtherHomePartners;
-    private final HashSet<Long> mRoamingConsortiums;    // [0,N]
-    private final Set<Long> mMatchAnyOIs;           // [0,N]
-    private final List<Long> mMatchAllOIs;          // [0,N]
-
-    private final Credential mCredential;
-
-    // Informational:
-    private final String mFriendlyName;             // [1]
-    private final String mIconURL;                  // [0,1]
-
-    private final Policy mPolicy;
-    private final int mCredentialPriority;
-    private final Map<String, String> mAAATrustRoots;
-    private final UpdateInfo mSubscriptionUpdate;
-    private final SubscriptionParameters mSubscriptionParameters;
-    private final int mUpdateIdentifier;
-
-    @Deprecated
-    public HomeSP(Map<String, Long> ssidMap,
-                   /*@NotNull*/ String fqdn,
-                   /*@NotNull*/ HashSet<Long> roamingConsortiums,
-                   /*@NotNull*/ Set<String> otherHomePartners,
-                   /*@NotNull*/ Set<Long> matchAnyOIs,
-                   /*@NotNull*/ List<Long> matchAllOIs,
-                   String friendlyName,
-                   String iconURL,
-                   Credential credential) {
-
-        mSSIDs = ssidMap;
-        List<List<String>> otherPartners = new ArrayList<>(otherHomePartners.size());
-        for (String otherPartner : otherHomePartners) {
-            otherPartners.add(Utils.splitDomain(otherPartner));
-        }
-        mOtherHomePartners = otherHomePartners;
-        mFQDN = fqdn;
-        mDomainMatcher = new DomainMatcher(Utils.splitDomain(fqdn), otherPartners);
-        mRoamingConsortiums = roamingConsortiums;
-        mMatchAnyOIs = matchAnyOIs;
-        mMatchAllOIs = matchAllOIs;
-        mFriendlyName = friendlyName;
-        mIconURL = iconURL;
-        mCredential = credential;
-
-        mPolicy = null;
-        mCredentialPriority = -1;
-        mAAATrustRoots = null;
-        mSubscriptionUpdate = null;
-        mSubscriptionParameters = null;
-        mUpdateIdentifier = -1;
-    }
-
-    public HomeSP(Map<String, Long> ssidMap,
-                   /*@NotNull*/ String fqdn,
-                   /*@NotNull*/ HashSet<Long> roamingConsortiums,
-                   /*@NotNull*/ Set<String> otherHomePartners,
-                   /*@NotNull*/ Set<Long> matchAnyOIs,
-                   /*@NotNull*/ List<Long> matchAllOIs,
-                   String friendlyName,
-                   String iconURL,
-                   Credential credential,
-
-                   Policy policy,
-                   int credentialPriority,
-                   Map<String, String> AAATrustRoots,
-                   UpdateInfo subscriptionUpdate,
-                   SubscriptionParameters subscriptionParameters,
-                   int updateIdentifier) {
-
-        mSSIDs = ssidMap;
-        List<List<String>> otherPartners = new ArrayList<>(otherHomePartners.size());
-        for (String otherPartner : otherHomePartners) {
-            otherPartners.add(Utils.splitDomain(otherPartner));
-        }
-        mOtherHomePartners = otherHomePartners;
-        mFQDN = fqdn;
-        mDomainMatcher = new DomainMatcher(Utils.splitDomain(fqdn), otherPartners);
-        mRoamingConsortiums = roamingConsortiums;
-        mMatchAnyOIs = matchAnyOIs;
-        mMatchAllOIs = matchAllOIs;
-        mFriendlyName = friendlyName;
-        mIconURL = iconURL;
-        mCredential = credential;
-
-        mPolicy = policy;
-        mCredentialPriority = credentialPriority;
-        mAAATrustRoots = AAATrustRoots;
-        mSubscriptionUpdate = subscriptionUpdate;
-        mSubscriptionParameters = subscriptionParameters;
-        mUpdateIdentifier = updateIdentifier;
-    }
-
-    public int getUpdateIdentifier() {
-        return mUpdateIdentifier;
-    }
-
-    public UpdateInfo getSubscriptionUpdate() {
-        return mSubscriptionUpdate;
-    }
-
-    public Policy getPolicy() {
-        return mPolicy;
-    }
-
-    private String imsiMatch(List<String> imsis, String mccMnc) {
-        if (mCredential.getImsi().matchesMccMnc(mccMnc)) {
-            for (String imsi : imsis) {
-                if (imsi.startsWith(mccMnc)) {
-                    return imsi;
-                }
-            }
-        }
-        return null;
-    }
-
-    public String getFQDN() {
-        return mFQDN;
-    }
-
-    public String getFriendlyName() {
-        return mFriendlyName;
-    }
-
-    public HashSet<Long> getRoamingConsortiums() {
-        return mRoamingConsortiums;
-    }
-
-    public Credential getCredential() {
-        return mCredential;
-    }
-
-    public Map<String, Long> getSSIDs() {
-        return mSSIDs;
-    }
-
-    public Collection<String> getOtherHomePartners() {
-        return mOtherHomePartners;
-    }
-
-    public Set<Long> getMatchAnyOIs() {
-        return mMatchAnyOIs;
-    }
-
-    public List<Long> getMatchAllOIs() {
-        return mMatchAllOIs;
-    }
-
-    public String getIconURL() {
-        return mIconURL;
-    }
-
-    public boolean deepEquals(HomeSP other) {
-        return mFQDN.equals(other.mFQDN) &&
-                mSSIDs.equals(other.mSSIDs) &&
-                mOtherHomePartners.equals(other.mOtherHomePartners) &&
-                mRoamingConsortiums.equals(other.mRoamingConsortiums) &&
-                mMatchAnyOIs.equals(other.mMatchAnyOIs) &&
-                mMatchAllOIs.equals(other.mMatchAllOIs) &&
-                mFriendlyName.equals(other.mFriendlyName) &&
-                Utils.compare(mIconURL, other.mIconURL) == 0 &&
-                mCredential.equals(other.mCredential);
-    }
-
-    @Override
-    public boolean equals(Object thatObject) {
-        if (this == thatObject) {
-            return true;
-        } else if (thatObject == null || getClass() != thatObject.getClass()) {
-            return false;
-        }
-
-        HomeSP that = (HomeSP) thatObject;
-        return mFQDN.equals(that.mFQDN);
-    }
-
-    @Override
-    public int hashCode() {
-        return mFQDN.hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return "HomeSP{" +
-                "SSIDs=" + mSSIDs +
-                ", FQDN='" + mFQDN + '\'' +
-                ", DomainMatcher=" + mDomainMatcher +
-                ", RoamingConsortiums={" + Utils.roamingConsortiumsToString(mRoamingConsortiums) +
-                '}' +
-                ", MatchAnyOIs={" + Utils.roamingConsortiumsToString(mMatchAnyOIs) + '}' +
-                ", MatchAllOIs={" + Utils.roamingConsortiumsToString(mMatchAllOIs) + '}' +
-                ", Credential=" + mCredential +
-                ", FriendlyName='" + mFriendlyName + '\'' +
-                ", IconURL='" + mIconURL + '\'' +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/Policy.java b/packages/Osu/src/com/android/hotspot2/pps/Policy.java
deleted file mode 100644
index 5180436..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/Policy.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package com.android.hotspot2.pps;
-
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.omadm.MOManager;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.OMANode;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static com.android.hotspot2.omadm.MOManager.TAG_Country;
-import static com.android.hotspot2.omadm.MOManager.TAG_DLBandwidth;
-import static com.android.hotspot2.omadm.MOManager.TAG_FQDN_Match;
-import static com.android.hotspot2.omadm.MOManager.TAG_IPProtocol;
-import static com.android.hotspot2.omadm.MOManager.TAG_MaximumBSSLoadValue;
-import static com.android.hotspot2.omadm.MOManager.TAG_MinBackhaulThreshold;
-import static com.android.hotspot2.omadm.MOManager.TAG_NetworkType;
-import static com.android.hotspot2.omadm.MOManager.TAG_PolicyUpdate;
-import static com.android.hotspot2.omadm.MOManager.TAG_PortNumber;
-import static com.android.hotspot2.omadm.MOManager.TAG_PreferredRoamingPartnerList;
-import static com.android.hotspot2.omadm.MOManager.TAG_Priority;
-import static com.android.hotspot2.omadm.MOManager.TAG_RequiredProtoPortTuple;
-import static com.android.hotspot2.omadm.MOManager.TAG_SPExclusionList;
-import static com.android.hotspot2.omadm.MOManager.TAG_SSID;
-import static com.android.hotspot2.omadm.MOManager.TAG_ULBandwidth;
-
-public class Policy {
-    private final List<PreferredRoamingPartner> mPreferredRoamingPartners;
-    private final List<MinBackhaul> mMinBackhaulThresholds;
-    private final UpdateInfo mPolicyUpdate;
-    private final List<String> mSPExclusionList;
-    private final Map<Integer, List<Integer>> mRequiredProtos;
-    private final int mMaxBSSLoad;
-
-    public Policy(OMANode node) throws OMAException {
-
-        OMANode rpNode = node.getChild(TAG_PreferredRoamingPartnerList);
-        if (rpNode == null) {
-            mPreferredRoamingPartners = null;
-        } else {
-            mPreferredRoamingPartners = new ArrayList<>(rpNode.getChildren().size());
-            for (OMANode instance : rpNode.getChildren()) {
-                if (instance.isLeaf()) {
-                    throw new OMAException("Not expecting leaf node in " +
-                            TAG_PreferredRoamingPartnerList);
-                }
-                mPreferredRoamingPartners.add(new PreferredRoamingPartner(instance));
-            }
-        }
-
-        OMANode bhtNode = node.getChild(TAG_MinBackhaulThreshold);
-        if (bhtNode == null) {
-            mMinBackhaulThresholds = null;
-        } else {
-            mMinBackhaulThresholds = new ArrayList<>(bhtNode.getChildren().size());
-            for (OMANode instance : bhtNode.getChildren()) {
-                if (instance.isLeaf()) {
-                    throw new OMAException("Not expecting leaf node in " +
-                            TAG_MinBackhaulThreshold);
-                }
-                mMinBackhaulThresholds.add(new MinBackhaul(instance));
-            }
-        }
-
-        mPolicyUpdate = new UpdateInfo(node.getChild(TAG_PolicyUpdate));
-
-        OMANode sxNode = node.getChild(TAG_SPExclusionList);
-        if (sxNode == null) {
-            mSPExclusionList = null;
-        } else {
-            mSPExclusionList = new ArrayList<>(sxNode.getChildren().size());
-            for (OMANode instance : sxNode.getChildren()) {
-                if (instance.isLeaf()) {
-                    throw new OMAException("Not expecting leaf node in " + TAG_SPExclusionList);
-                }
-                mSPExclusionList.add(MOManager.getString(instance, TAG_SSID));
-            }
-        }
-
-        OMANode rptNode = node.getChild(TAG_RequiredProtoPortTuple);
-        if (rptNode == null) {
-            mRequiredProtos = null;
-        } else {
-            mRequiredProtos = new HashMap<>(rptNode.getChildren().size());
-            for (OMANode instance : rptNode.getChildren()) {
-                if (instance.isLeaf()) {
-                    throw new OMAException("Not expecting leaf node in " +
-                            TAG_RequiredProtoPortTuple);
-                }
-                int protocol = (int) MOManager.getLong(instance, TAG_IPProtocol, null);
-                String[] portSegments = MOManager.getString(instance, TAG_PortNumber).split(",");
-                List<Integer> ports = new ArrayList<>(portSegments.length);
-                for (String portSegment : portSegments) {
-                    try {
-                        ports.add(Integer.parseInt(portSegment));
-                    } catch (NumberFormatException nfe) {
-                        throw new OMAException("Port is not a number: " + portSegment);
-                    }
-                }
-                mRequiredProtos.put(protocol, ports);
-            }
-        }
-
-        mMaxBSSLoad = (int) MOManager.getLong(node, TAG_MaximumBSSLoadValue, Long.MAX_VALUE);
-    }
-
-    public List<PreferredRoamingPartner> getPreferredRoamingPartners() {
-        return mPreferredRoamingPartners;
-    }
-
-    public List<MinBackhaul> getMinBackhaulThresholds() {
-        return mMinBackhaulThresholds;
-    }
-
-    public UpdateInfo getPolicyUpdate() {
-        return mPolicyUpdate;
-    }
-
-    public List<String> getSPExclusionList() {
-        return mSPExclusionList;
-    }
-
-    public Map<Integer, List<Integer>> getRequiredProtos() {
-        return mRequiredProtos;
-    }
-
-    public int getMaxBSSLoad() {
-        return mMaxBSSLoad;
-    }
-
-    private static class PreferredRoamingPartner {
-        private final List<String> mDomain;
-        private final Boolean mIncludeSubDomains;
-        private final int mPriority;
-        private final String mCountry;
-
-        private PreferredRoamingPartner(OMANode node)
-                throws OMAException {
-
-            String[] segments = MOManager.getString(node, TAG_FQDN_Match).split(",");
-            if (segments.length != 2) {
-                throw new OMAException("Bad FQDN match string: " + TAG_FQDN_Match);
-            }
-            mDomain = Utils.splitDomain(segments[0]);
-            mIncludeSubDomains = MOManager.getSelection(TAG_FQDN_Match, segments[1]);
-            mPriority = (int) MOManager.getLong(node, TAG_Priority, null);
-            mCountry = MOManager.getString(node, TAG_Country);
-        }
-
-        @Override
-        public String toString() {
-            return "PreferredRoamingPartner{" +
-                    "domain=" + mDomain +
-                    ", includeSubDomains=" + mIncludeSubDomains +
-                    ", priority=" + mPriority +
-                    ", country='" + mCountry + '\'' +
-                    '}';
-        }
-    }
-
-    private static class MinBackhaul {
-        private final Boolean mHome;
-        private final long mDL;
-        private final long mUL;
-
-        private MinBackhaul(OMANode node) throws OMAException {
-            mHome = MOManager.getSelection(node, TAG_NetworkType);
-            mDL = MOManager.getLong(node, TAG_DLBandwidth, Long.MAX_VALUE);
-            mUL = MOManager.getLong(node, TAG_ULBandwidth, Long.MAX_VALUE);
-        }
-
-        @Override
-        public String toString() {
-            return "MinBackhaul{" +
-                    "home=" + mHome +
-                    ", DL=" + mDL +
-                    ", UL=" + mUL +
-                    '}';
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "Policy{" +
-                "preferredRoamingPartners=" + mPreferredRoamingPartners +
-                ", minBackhaulThresholds=" + mMinBackhaulThresholds +
-                ", policyUpdate=" + mPolicyUpdate +
-                ", SPExclusionList=" + mSPExclusionList +
-                ", requiredProtos=" + mRequiredProtos +
-                ", maxBSSLoad=" + mMaxBSSLoad +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/SubscriptionParameters.java b/packages/Osu/src/com/android/hotspot2/pps/SubscriptionParameters.java
deleted file mode 100644
index e073ad7..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/SubscriptionParameters.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package com.android.hotspot2.pps;
-
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.omadm.MOManager;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.OMANode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static com.android.hotspot2.omadm.MOManager.TAG_CreationDate;
-import static com.android.hotspot2.omadm.MOManager.TAG_DataLimit;
-import static com.android.hotspot2.omadm.MOManager.TAG_ExpirationDate;
-import static com.android.hotspot2.omadm.MOManager.TAG_StartDate;
-import static com.android.hotspot2.omadm.MOManager.TAG_TimeLimit;
-import static com.android.hotspot2.omadm.MOManager.TAG_TypeOfSubscription;
-import static com.android.hotspot2.omadm.MOManager.TAG_UsageLimits;
-import static com.android.hotspot2.omadm.MOManager.TAG_UsageTimePeriod;
-
-public class SubscriptionParameters {
-    private final long mCDate;
-    private final long mXDate;
-    private final String mType;
-    private final List<Limit> mLimits;
-
-    public SubscriptionParameters(OMANode node) throws OMAException {
-        mCDate = MOManager.getTime(node.getChild(TAG_CreationDate));
-        mXDate = MOManager.getTime(node.getChild(TAG_ExpirationDate));
-        mType = MOManager.getString(node.getChild(TAG_TypeOfSubscription));
-
-        OMANode ulNode = node.getChild(TAG_UsageLimits);
-        if (ulNode == null) {
-            mLimits = null;
-        } else {
-            mLimits = new ArrayList<>(ulNode.getChildren().size());
-            for (OMANode instance : ulNode.getChildren()) {
-                if (instance.isLeaf()) {
-                    throw new OMAException("Not expecting leaf node in " +
-                            TAG_UsageLimits);
-                }
-                mLimits.add(new Limit(instance));
-            }
-        }
-
-    }
-
-    private static class Limit {
-        private final long mDataLimit;
-        private final long mStartDate;
-        private final long mTimeLimit;
-        private final long mUsageTimePeriod;
-
-        private Limit(OMANode node) throws OMAException {
-            mDataLimit = MOManager.getLong(node, TAG_DataLimit, Long.MAX_VALUE);
-            mStartDate = MOManager.getTime(node.getChild(TAG_StartDate));
-            mTimeLimit = MOManager.getLong(node, TAG_TimeLimit, Long.MAX_VALUE) *
-                    MOManager.IntervalFactor;
-            mUsageTimePeriod = MOManager.getLong(node, TAG_UsageTimePeriod, null);
-        }
-
-        @Override
-        public String toString() {
-            return "Limit{" +
-                    "dataLimit=" + mDataLimit +
-                    ", startDate=" + Utils.toUTCString(mStartDate) +
-                    ", timeLimit=" + mTimeLimit +
-                    ", usageTimePeriod=" + mUsageTimePeriod +
-                    '}';
-        }
-    }
-
-    @Override
-    public String toString() {
-        return "SubscriptionParameters{" +
-                "cDate=" + Utils.toUTCString(mCDate) +
-                ", xDate=" + Utils.toUTCString(mXDate) +
-                ", type='" + mType + '\'' +
-                ", limits=" + mLimits +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/pps/UpdateInfo.java b/packages/Osu/src/com/android/hotspot2/pps/UpdateInfo.java
deleted file mode 100644
index 645e1fa..0000000
--- a/packages/Osu/src/com/android/hotspot2/pps/UpdateInfo.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package com.android.hotspot2.pps;
-
-import android.util.Base64;
-
-import com.android.hotspot2.Utils;
-import com.android.hotspot2.omadm.MOManager;
-import com.android.hotspot2.omadm.OMAException;
-import com.android.hotspot2.omadm.OMANode;
-
-import java.nio.charset.StandardCharsets;
-
-import static com.android.hotspot2.omadm.MOManager.TAG_CertSHA256Fingerprint;
-import static com.android.hotspot2.omadm.MOManager.TAG_CertURL;
-import static com.android.hotspot2.omadm.MOManager.TAG_Password;
-import static com.android.hotspot2.omadm.MOManager.TAG_Restriction;
-import static com.android.hotspot2.omadm.MOManager.TAG_TrustRoot;
-import static com.android.hotspot2.omadm.MOManager.TAG_URI;
-import static com.android.hotspot2.omadm.MOManager.TAG_UpdateInterval;
-import static com.android.hotspot2.omadm.MOManager.TAG_UpdateMethod;
-import static com.android.hotspot2.omadm.MOManager.TAG_Username;
-import static com.android.hotspot2.omadm.MOManager.TAG_UsernamePassword;
-
-public class UpdateInfo {
-    public enum UpdateRestriction {HomeSP, RoamingPartner, Unrestricted}
-
-    public static final long NO_UPDATE = 0xffffffffL;
-
-    private final long mInterval;
-    private final boolean mSPPClientInitiated;
-    private final UpdateRestriction mUpdateRestriction;
-    private final String mURI;
-    private final String mUsername;
-    private final String mPassword;
-    private final String mCertURL;
-    private final String mCertFP;
-
-    public UpdateInfo(OMANode policyUpdate) throws OMAException {
-        long minutes = MOManager.getLong(policyUpdate, TAG_UpdateInterval, null);
-        mInterval = minutes == NO_UPDATE ? -1 : minutes * MOManager.IntervalFactor;
-        mSPPClientInitiated = MOManager.getSelection(policyUpdate, TAG_UpdateMethod);
-        mUpdateRestriction = MOManager.getSelection(policyUpdate, TAG_Restriction);
-        mURI = MOManager.getString(policyUpdate, TAG_URI);
-
-        OMANode unp = policyUpdate.getChild(TAG_UsernamePassword);
-        if (unp != null) {
-            mUsername = MOManager.getString(unp.getChild(TAG_Username));
-            String pw = MOManager.getString(unp.getChild(TAG_Password));
-            mPassword = new String(Base64.decode(pw.getBytes(StandardCharsets.US_ASCII),
-                    Base64.DEFAULT), StandardCharsets.UTF_8);
-        } else {
-            mUsername = null;
-            mPassword = null;
-        }
-
-        OMANode trustRoot = MOManager.getChild(policyUpdate, TAG_TrustRoot);
-        mCertURL = MOManager.getString(trustRoot, TAG_CertURL);
-        mCertFP = MOManager.getString(trustRoot, TAG_CertSHA256Fingerprint);
-    }
-
-    public long getInterval() {
-        return mInterval;
-    }
-
-    public boolean isSPPClientInitiated() {
-        return mSPPClientInitiated;
-    }
-
-    public UpdateRestriction getUpdateRestriction() {
-        return mUpdateRestriction;
-    }
-
-    public String getURI() {
-        return mURI;
-    }
-
-    public String getUsername() {
-        return mUsername;
-    }
-
-    public String getPassword() {
-        return mPassword;
-    }
-
-    public String getCertURL() {
-        return mCertURL;
-    }
-
-    public String getCertFP() {
-        return mCertFP;
-    }
-
-    @Override
-    public String toString() {
-        return "UpdateInfo{" +
-                "interval=" + Utils.toHMS(mInterval) +
-                ", SPPClientInitiated=" + mSPPClientInitiated +
-                ", updateRestriction=" + mUpdateRestriction +
-                ", URI='" + mURI + '\'' +
-                ", username='" + mUsername + '\'' +
-                ", password=" + mPassword +
-                ", certURL='" + mCertURL + '\'' +
-                ", certFP='" + mCertFP + '\'' +
-                '}';
-    }
-}
diff --git a/packages/Osu/src/com/android/hotspot2/utils/HTTPMessage.java b/packages/Osu/src/com/android/hotspot2/utils/HTTPMessage.java
deleted file mode 100644
index c675efd..0000000
--- a/packages/Osu/src/com/android/hotspot2/utils/HTTPMessage.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.android.hotspot2.utils;
-
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.util.Map;
-
-public interface HTTPMessage {
-    public static final String HTTPVersion = "HTTP/1.1";
-    public static final String AgentHeader = "User-Agent";
-    public static final String AgentName = "Android HS Client";
-    public static final String HostHeader = "Host";
-    public static final String AcceptHeader = "Accept";
-    public static final String LengthHeader = "Content-Length";
-    public static final String ContentTypeHeader = "Content-Type";
-    public static final String ContentLengthHeader = "Content-Length";
-    public static final String ContentEncodingHeader = "Content-Transfer-Encoding";
-    public static final String AuthHeader = "WWW-Authenticate";
-    public static final String AuthorizationHeader = "Authorization";
-
-    public static final String ContentTypeSOAP = "application/soap+xml";
-
-    public static final int RX_BUFFER = 32768;
-    public static final String CRLF = "\r\n";
-    public static final int BODY_SEPARATOR = 0x0d0a0d0a;
-    public static final int BODY_SEPARATOR_LENGTH = 4;
-
-    public enum Method {GET, PUT, POST}
-
-    public Map<String, String> getHeaders();
-
-    public InputStream getPayloadStream();
-
-    public ByteBuffer getPayload();
-
-    public ByteBuffer getBinaryPayload();
-}
diff --git a/packages/Osu/src/com/android/hotspot2/utils/HTTPRequest.java b/packages/Osu/src/com/android/hotspot2/utils/HTTPRequest.java
deleted file mode 100644
index e97c15a..0000000
--- a/packages/Osu/src/com/android/hotspot2/utils/HTTPRequest.java
+++ /dev/null
@@ -1,307 +0,0 @@
-package com.android.hotspot2.utils;
-
-import android.util.Base64;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.security.GeneralSecurityException;
-import java.security.MessageDigest;
-import java.security.SecureRandom;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-public class HTTPRequest implements HTTPMessage {
-    private static final Charset HeaderCharset = StandardCharsets.US_ASCII;
-    private static final int HTTPS_PORT = 443;
-
-    private final String mMethodLine;
-    private final Map<String, String> mHeaderFields;
-    private final byte[] mBody;
-
-    public HTTPRequest(Method method, URL url) {
-        this(null, null, method, url, null, false);
-    }
-
-    public HTTPRequest(String payload, Charset charset, Method method, URL url, String contentType,
-                       boolean base64) {
-        mBody = payload != null ? payload.getBytes(charset) : null;
-
-        mHeaderFields = new LinkedHashMap<>();
-        mHeaderFields.put(AgentHeader, AgentName);
-        if (url.getPort() != HTTPS_PORT) {
-            mHeaderFields.put(HostHeader, url.getHost() + ':' + url.getPort());
-        } else {
-            mHeaderFields.put(HostHeader, url.getHost());
-        }
-        mHeaderFields.put(AcceptHeader, "*/*");
-        if (payload != null) {
-            if (base64) {
-                mHeaderFields.put(ContentTypeHeader, contentType);
-                mHeaderFields.put(ContentEncodingHeader, "base64");
-            } else {
-                mHeaderFields.put(ContentTypeHeader, contentType + "; charset=" +
-                        charset.displayName().toLowerCase());
-            }
-            mHeaderFields.put(ContentLengthHeader, Integer.toString(mBody.length));
-        }
-
-        mMethodLine = method.name() + ' ' + url.getPath() + ' ' + HTTPVersion + CRLF;
-    }
-
-    public void doAuthenticate(HTTPResponse httpResponse, String userName, byte[] password,
-                               URL url, int sequence) throws IOException, GeneralSecurityException {
-        mHeaderFields.put(HTTPMessage.AuthorizationHeader,
-                generateAuthAnswer(httpResponse, userName, password, url, sequence));
-    }
-
-    private static String generateAuthAnswer(HTTPResponse httpResponse, String userName,
-                                             byte[] password, URL url, int sequence)
-            throws IOException, GeneralSecurityException {
-
-        String authRequestLine = httpResponse.getHeader(HTTPMessage.AuthHeader);
-        if (authRequestLine == null) {
-            throw new IOException("Missing auth line");
-        }
-        String[] tokens = authRequestLine.split("[ ,]+");
-        //System.out.println("Tokens: " + Arrays.toString(tokens));
-        if (tokens.length < 3 || !tokens[0].equalsIgnoreCase("digest")) {
-            throw new IOException("Bad " + HTTPMessage.AuthHeader + ": '" + authRequestLine + "'");
-        }
-
-        Map<String, String> itemMap = new HashMap<>();
-        for (int n = 1; n < tokens.length; n++) {
-            String s = tokens[n];
-            int split = s.indexOf('=');
-            if (split < 0) {
-                continue;
-            }
-            itemMap.put(s.substring(0, split).trim().toLowerCase(),
-                    unquote(s.substring(split + 1).trim()));
-        }
-
-        Set<String> qops = splitValue(itemMap.remove("qop"));
-        if (!qops.contains("auth")) {
-            throw new IOException("Unsupported quality of protection value(s): '" + qops + "'");
-        }
-        String algorithm = itemMap.remove("algorithm");
-        if (algorithm != null && !algorithm.equalsIgnoreCase("md5")) {
-            throw new IOException("Unsupported algorithm: '" + algorithm + "'");
-        }
-        String realm = itemMap.remove("realm");
-        String nonceText = itemMap.remove("nonce");
-        if (realm == null || nonceText == null) {
-            throw new IOException("realm and/or nonce missing: '" + authRequestLine + "'");
-        }
-        //System.out.println("Remaining tokens: " + itemMap);
-
-        byte[] cnonce = new byte[16];
-        SecureRandom prng = new SecureRandom();
-        prng.nextBytes(cnonce);
-
-        /*
-         * H(data) = MD5(data)
-         * KD(secret, data) = H(concat(secret, ":", data))
-         *
-         * A1 = unq(username-value) ":" unq(realm-value) ":" passwd
-         * A2 = Method ":" digest-uri-value
-         *
-         * response = KD ( H(A1), unq(nonce-value) ":" nc-value ":" unq(cnonce-value) ":"
-          * unq(qop-value) ":" H(A2) )
-         */
-
-        String nc = String.format("%08d", sequence);
-
-        /*
-         * This bears witness to the ingenuity of the emerging "web generation" and the authors of
-         * RFC-2617: Strings are treated as a sequence of octets in blind ignorance of character
-         * encoding, whereas octets strings apparently aren't "good enough" and expanded to
-         * "hex strings"...
-         * As a wild guess I apply UTF-8 below.
-         */
-        String passwordString = new String(password, StandardCharsets.UTF_8);
-        String cNonceString = bytesToHex(cnonce);
-
-        byte[] a1 = hash(userName, realm, passwordString);
-        byte[] a2 = hash("POST", url.getPath());
-        byte[] response = hash(a1, nonceText, nc, cNonceString, "auth", a2);
-
-        StringBuilder authLine = new StringBuilder();
-        authLine.append("Digest ")
-                .append("username=\"").append(userName).append("\", ")
-                .append("realm=\"").append(realm).append("\", ")
-                .append("nonce=\"").append(nonceText).append("\", ")
-                .append("uri=\"").append(url.getPath()).append("\", ")
-                .append("qop=\"auth\", ")
-                .append("nc=").append(nc).append(", ")
-                .append("cnonce=\"").append(cNonceString).append("\", ")
-                .append("response=\"").append(bytesToHex(response)).append('"');
-        String opaque = itemMap.get("opaque");
-        if (opaque != null) {
-            authLine.append(", \"").append(opaque).append('"');
-        }
-
-        return authLine.toString();
-    }
-
-    private static Set<String> splitValue(String value) {
-        Set<String> result = new HashSet<>();
-        if (value != null) {
-            for (String s : value.split(",")) {
-                result.add(s.trim());
-            }
-        }
-        return result;
-    }
-
-    private static byte[] hash(Object... objects) throws GeneralSecurityException {
-        MessageDigest hash = MessageDigest.getInstance("MD5");
-
-        //System.out.println("<Hash>");
-        boolean first = true;
-        for (Object object : objects) {
-            byte[] octets;
-            if (object.getClass() == String.class) {
-                //System.out.println("+= '" + object + "'");
-                octets = ((String) object).getBytes(StandardCharsets.UTF_8);
-            } else {
-                octets = bytesToHexBytes((byte[]) object);
-                //System.out.println("+= " + new String(octets, StandardCharsets.ISO_8859_1));
-            }
-            if (first) {
-                first = false;
-            } else {
-                hash.update((byte) ':');
-            }
-            hash.update(octets);
-        }
-        //System.out.println("</Hash>");
-        return hash.digest();
-    }
-
-    private static String unquote(String s) {
-        return s.startsWith("\"") ? s.substring(1, s.length() - 1) : s;
-    }
-
-    private static byte[] bytesToHexBytes(byte[] octets) {
-        return bytesToHex(octets).getBytes(StandardCharsets.ISO_8859_1);
-    }
-
-    private static String bytesToHex(byte[] octets) {
-        StringBuilder sb = new StringBuilder(octets.length * 2);
-        for (byte b : octets) {
-            sb.append(String.format("%02x", b & 0xff));
-        }
-        return sb.toString();
-    }
-
-    private byte[] buildHeader() {
-        StringBuilder header = new StringBuilder();
-        header.append(mMethodLine);
-        for (Map.Entry<String, String> entry : mHeaderFields.entrySet()) {
-            header.append(entry.getKey()).append(": ").append(entry.getValue()).append(CRLF);
-        }
-        header.append(CRLF);
-
-        //System.out.println("HTTP Request:");
-        StringBuilder sb2 = new StringBuilder();
-        sb2.append(header);
-        if (mBody != null) {
-            sb2.append(new String(mBody, StandardCharsets.ISO_8859_1));
-        }
-        //System.out.println(sb2);
-        //System.out.println("End HTTP Request.");
-
-        return header.toString().getBytes(HeaderCharset);
-    }
-
-    public void send(OutputStream out) throws IOException {
-        out.write(buildHeader());
-        if (mBody != null) {
-            out.write(mBody);
-        }
-        out.flush();
-    }
-
-    @Override
-    public Map<String, String> getHeaders() {
-        return Collections.unmodifiableMap(mHeaderFields);
-    }
-
-    @Override
-    public InputStream getPayloadStream() {
-        return mBody != null ? new ByteArrayInputStream(mBody) : null;
-    }
-
-    @Override
-    public ByteBuffer getPayload() {
-        return mBody != null ? ByteBuffer.wrap(mBody) : null;
-    }
-
-    @Override
-    public ByteBuffer getBinaryPayload() {
-        byte[] binary = Base64.decode(mBody, Base64.DEFAULT);
-        return ByteBuffer.wrap(binary);
-    }
-
-    public static void main(String[] args) throws GeneralSecurityException {
-        test("Mufasa", "testrealm@host.com", "Circle Of Life", "GET", "/dir/index.html",
-                "dcd98b7102dd2f0e8b11d0f600bfb0c093", "0a4f113b", "00000001", "auth",
-                "6629fae49393a05397450978507c4ef1");
-
-        // WWW-Authenticate: Digest realm="wi-fi.org", qop="auth",
-        // nonce="MTQzMTg1MTIxMzUyNzo0OGFhNGU5ZTg4Y2M4YmFhYzM2MzAwZDg5MGNiYTJlNw=="
-        // Authorization: Digest
-        //  username="1c7e1582-604d-4c00-b411-bb73735cbcb0"
-        //  realm="wi-fi.org"
-        //  nonce="MTQzMTg1MTIxMzUyNzo0OGFhNGU5ZTg4Y2M4YmFhYzM2MzAwZDg5MGNiYTJlNw=="
-        //  uri="/.well-known/est/simpleenroll"
-        //  cnonce="NzA3NDk0"
-        //  nc=00000001
-        //  qop="auth"
-        //  response="2c485d24076452e712b77f4e70776463"
-
-        String nonce = "MTQzMTg1MTIxMzUyNzo0OGFhNGU5ZTg4Y2M4YmFhYzM2MzAwZDg5MGNiYTJlNw==";
-        String cnonce = "NzA3NDk0";
-        test("1c7e1582-604d-4c00-b411-bb73735cbcb0", "wi-fi.org", "ruckus1234", "POST",
-                "/.well-known/est/simpleenroll",
-                /*new String(Base64.getDecoder().decode(nonce), StandardCharsets.ISO_8859_1)*/
-                nonce,
-                /*new String(Base64.getDecoder().decode(cnonce), StandardCharsets.ISO_8859_1)*/
-                cnonce, "00000001", "auth", "2c485d24076452e712b77f4e70776463");
-    }
-
-    private static void test(String user, String realm, String password, String method, String path,
-                             String nonce, String cnonce, String nc, String qop, String expect)
-            throws GeneralSecurityException {
-        byte[] a1 = hash(user, realm, password);
-        System.out.println("HA1: " + bytesToHex(a1));
-        byte[] a2 = hash(method, path);
-        System.out.println("HA2: " + bytesToHex(a2));
-        byte[] response = hash(a1, nonce, nc, cnonce, qop, a2);
-
-        StringBuilder authLine = new StringBuilder();
-        String responseString = bytesToHex(response);
-        authLine.append("Digest ")
-                .append("username=\"").append(user).append("\", ")
-                .append("realm=\"").append(realm).append("\", ")
-                .append("nonce=\"").append(nonce).append("\", ")
-                .append("uri=\"").append(path).append("\", ")
-                .append("qop=\"").append(qop).append("\", ")
-                .append("nc=").append(nc).append(", ")
-                .append("cnonce=\"").append(cnonce).append("\", ")
-                .append("response=\"").append(responseString).append('"');
-
-        System.out.println(authLine);
-        System.out.println("Success: " + responseString.equals(expect));
-    }
-}
\ No newline at end of file
diff --git a/packages/Osu/src/com/android/hotspot2/utils/HTTPResponse.java b/packages/Osu/src/com/android/hotspot2/utils/HTTPResponse.java
deleted file mode 100644
index b82814d..0000000
--- a/packages/Osu/src/com/android/hotspot2/utils/HTTPResponse.java
+++ /dev/null
@@ -1,181 +0,0 @@
-package com.android.hotspot2.utils;
-
-import android.util.Base64;
-import android.util.Log;
-
-import com.android.hotspot2.osu.OSUManager;
-
-import java.io.ByteArrayInputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-public class HTTPResponse implements HTTPMessage {
-    private final int mStatusCode;
-    private final Map<String, String> mHeaders = new LinkedHashMap<>();
-    private final ByteBuffer mBody;
-
-    private static final String csIndicator = "charset=";
-
-    public HTTPResponse(InputStream in) throws IOException {
-        int expected = Integer.MAX_VALUE;
-        int offset = 0;
-        int body = -1;
-        byte[] input = new byte[RX_BUFFER];
-
-        int statusCode = -1;
-        int bodyPattern = 0;
-
-        while (offset < expected) {
-            int amount = in.read(input, offset, input.length - offset);
-            if (amount < 0) {
-                throw new EOFException();
-            }
-
-            if (body < 0) {
-                for (int n = offset; n < offset + amount; n++) {
-                    bodyPattern = (bodyPattern << 8) | (input[n] & 0xff);
-                    if (bodyPattern == 0x0d0a0d0a) {
-                        body = n + 1;
-                        statusCode = parseHeader(input, body, mHeaders);
-                        expected = calculateLength(body, mHeaders);
-                        if (expected > input.length) {
-                            input = Arrays.copyOf(input, expected);
-                        }
-                        break;
-                    }
-                }
-            }
-            offset += amount;
-            if (offset < expected && offset == input.length) {
-                input = Arrays.copyOf(input, input.length * 2);
-            }
-        }
-        mStatusCode = statusCode;
-        mBody = ByteBuffer.wrap(input, body, expected - body);
-    }
-
-    private static int parseHeader(byte[] input, int body, Map<String, String> headers)
-            throws IOException {
-        String headerText = new String(input, 0, body - BODY_SEPARATOR_LENGTH,
-                StandardCharsets.ISO_8859_1);
-        //System.out.println("Received header: " + headerText);
-        Iterator<String> headerLines = Arrays.asList(headerText.split(CRLF)).iterator();
-        if (!headerLines.hasNext()) {
-            throw new IOException("Bad HTTP Request");
-        }
-
-        int statusCode;
-        String line0 = headerLines.next();
-        String[] status = line0.split(" ");
-        if (status.length != 3 || !"HTTP/1.1".equals(status[0])) {
-            throw new IOException("Bad HTTP Result: " + line0);
-        }
-        try {
-            statusCode = Integer.parseInt(status[1].trim());
-        } catch (NumberFormatException nfe) {
-            throw new IOException("Bad HTTP header line: '" + line0 + "'");
-        }
-
-        while (headerLines.hasNext()) {
-            String line = headerLines.next();
-            int keyEnd = line.indexOf(':');
-            if (keyEnd < 0) {
-                throw new IOException("Bad header line: '" + line + "'");
-            }
-            String key = line.substring(0, keyEnd).trim();
-            String value = line.substring(keyEnd + 1).trim();
-            headers.put(key, value);
-        }
-        return statusCode;
-    }
-
-    private static int calculateLength(int body, Map<String, String> headers) throws IOException {
-        String contentLength = headers.get(LengthHeader);
-        if (contentLength == null) {
-            throw new IOException("No " + LengthHeader);
-        }
-        try {
-            return body + Integer.parseInt(contentLength);
-        } catch (NumberFormatException nfe) {
-            throw new IOException("Bad " + LengthHeader + ": " + contentLength);
-        }
-    }
-
-    public int getStatusCode() {
-        return mStatusCode;
-    }
-
-    @Override
-    public Map<String, String> getHeaders() {
-        return Collections.unmodifiableMap(mHeaders);
-    }
-
-    public String getHeader(String key) {
-        return mHeaders.get(key);
-    }
-
-    @Override
-    public InputStream getPayloadStream() {
-        return new ByteArrayInputStream(mBody.array(), mBody.position(),
-                mBody.limit() - mBody.position());
-    }
-
-    @Override
-    public ByteBuffer getPayload() {
-        return mBody.duplicate();
-    }
-
-    @Override
-    public ByteBuffer getBinaryPayload() {
-        byte[] data = new byte[mBody.remaining()];
-        mBody.duplicate().get(data);
-        byte[] binary = Base64.decode(data, Base64.DEFAULT);
-        return ByteBuffer.wrap(binary);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Status: ").append(mStatusCode).append(CRLF);
-        for (Map.Entry<String, String> entry : mHeaders.entrySet()) {
-            sb.append(entry.getKey()).append(": ").append(entry.getValue()).append(CRLF);
-        }
-        sb.append(CRLF);
-        Charset charset;
-        try {
-            charset = Charset.forName(getCharset());
-        } catch (IllegalArgumentException iae) {
-            charset = StandardCharsets.ISO_8859_1;
-        }
-        sb.append(new String(mBody.array(), mBody.position(),
-                mBody.limit() - mBody.position(), charset));
-        return sb.toString();
-    }
-
-    public String getCharset() {
-        String contentType = mHeaders.get(ContentTypeHeader);
-        if (contentType == null) {
-            return null;
-        }
-        int csPos = contentType.indexOf(csIndicator);
-        return csPos < 0 ? null : contentType.substring(csPos + csIndicator.length()).trim();
-    }
-
-    private static boolean equals(byte[] b1, int offset, byte[] pattern) {
-        for (int n = 0; n < pattern.length; n++) {
-            if (b1[n + offset] != pattern[n]) {
-                return false;
-            }
-        }
-        return true;
-    }
-}
diff --git a/packages/Osu2/Android.mk b/packages/Osu2/Android.mk
deleted file mode 100644
index 7de8908..0000000
--- a/packages/Osu2/Android.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PROGUARD_ENABLED := disabled
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := Osu2
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_CERTIFICATE := platform
-LOCAL_PRIVILEGED_MODULE := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-include $(BUILD_PACKAGE)
-
-########################
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/packages/Osu2/AndroidManifest.xml b/packages/Osu2/AndroidManifest.xml
deleted file mode 100644
index 236b120b..0000000
--- a/packages/Osu2/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.osu">
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
-    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.INTERNET" />
-
-    <application
-    android:enabled="true"
-        android:icon="@mipmap/ic_launcher"
-        android:label="@string/app_name">
-        <activity android:name=".MainActivity" android:exported="true">
-        </activity>
-    </application>
-
-</manifest>
diff --git a/packages/Osu2/res/layout/activity_main.xml b/packages/Osu2/res/layout/activity_main.xml
deleted file mode 100644
index f9504c9..0000000
--- a/packages/Osu2/res/layout/activity_main.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-</LinearLayout>
diff --git a/packages/Osu2/res/mipmap-hdpi/ic_launcher.png b/packages/Osu2/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index cde69bc..0000000
--- a/packages/Osu2/res/mipmap-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu2/res/mipmap-mdpi/ic_launcher.png b/packages/Osu2/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index c133a0c..0000000
--- a/packages/Osu2/res/mipmap-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu2/res/mipmap-xhdpi/ic_launcher.png b/packages/Osu2/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index bfa42f0..0000000
--- a/packages/Osu2/res/mipmap-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu2/res/mipmap-xxhdpi/ic_launcher.png b/packages/Osu2/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index 324e72c..0000000
--- a/packages/Osu2/res/mipmap-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu2/res/mipmap-xxxhdpi/ic_launcher.png b/packages/Osu2/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index aee44e1..0000000
--- a/packages/Osu2/res/mipmap-xxxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/packages/Osu2/res/values-w820dp/dimens.xml b/packages/Osu2/res/values-w820dp/dimens.xml
deleted file mode 100644
index 63fc816..0000000
--- a/packages/Osu2/res/values-w820dp/dimens.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<resources>
-    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
-         (such as screen margins) for screens with more than 820dp of available width. This
-         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
-    <dimen name="activity_horizontal_margin">64dp</dimen>
-</resources>
diff --git a/packages/Osu2/res/values/colors.xml b/packages/Osu2/res/values/colors.xml
deleted file mode 100644
index 3ab3e9c..0000000
--- a/packages/Osu2/res/values/colors.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <color name="colorPrimary">#3F51B5</color>
-    <color name="colorPrimaryDark">#303F9F</color>
-    <color name="colorAccent">#FF4081</color>
-</resources>
diff --git a/packages/Osu2/res/values/dimens.xml b/packages/Osu2/res/values/dimens.xml
deleted file mode 100644
index 47c8224..0000000
--- a/packages/Osu2/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/Osu2/res/values/strings.xml b/packages/Osu2/res/values/strings.xml
deleted file mode 100644
index e5b1af6..0000000
--- a/packages/Osu2/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<resources>
-    <string name="app_name">Passpoint Online Sign-Up</string>
-</resources>
diff --git a/packages/Osu2/src/com/android/osu/Constants.java b/packages/Osu2/src/com/android/osu/Constants.java
deleted file mode 100644
index cd046d8..0000000
--- a/packages/Osu2/src/com/android/osu/Constants.java
+++ /dev/null
@@ -1,24 +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.osu;
-
-public final class Constants {
-    public static final String INTENT_EXTRA_COMMAND = "com.android.osu.extra.COMMAND";
-    public static final String INTENT_EXTRA_OSU_PROVIDER = "com.android.osu.extra.OSU_PROVIDER";
-
-    public static final String COMMAND_PROVISION = "Provision";
-}
\ No newline at end of file
diff --git a/packages/Osu2/src/com/android/osu/MainActivity.java b/packages/Osu2/src/com/android/osu/MainActivity.java
deleted file mode 100644
index 4e2136b..0000000
--- a/packages/Osu2/src/com/android/osu/MainActivity.java
+++ /dev/null
@@ -1,76 +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.osu;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.wifi.hotspot2.OsuProvider;
-import android.os.Bundle;
-import android.util.Log;
-
-/**
- * Main entry point for the OSU (Online Sign-Up) app.
- */
-public class MainActivity extends Activity {
-    private static final String TAG = "OSU_MainActivity";
-    private OsuService mService;
-
-    @Override
-    protected void onCreate(Bundle saveInstanceState) {
-        super.onCreate(saveInstanceState);
-
-        Intent intent = getIntent();
-        if (intent == null) {
-            Log.e(TAG, "Intent not provided");
-            finish();
-        }
-
-        if (!intent.hasExtra(Constants.INTENT_EXTRA_COMMAND)) {
-            Log.e(TAG, "Command not provided");
-            finish();
-        }
-
-        String command = intent.getStringExtra(Constants.INTENT_EXTRA_COMMAND);
-        switch (command) {
-            case Constants.COMMAND_PROVISION:
-                if (!startProvisionService(intent.getParcelableExtra(
-                        Constants.INTENT_EXTRA_OSU_PROVIDER))) {
-                    finish();
-                }
-                break;
-            default:
-                Log.e(TAG, "Unknown command: '" + command + "'");
-                finish();
-                break;
-        }
-    }
-
-    /**
-     * Start the {@link ProvisionService} to perform provisioning tasks.
-     *
-     * @return true if service is started
-     */
-    private boolean startProvisionService(OsuProvider provider) {
-        if (provider == null) {
-            Log.e(TAG, "OSU Provider not provided");
-            return false;
-        }
-        mService = new ProvisionService(this, provider);
-        mService.start();
-        return true;
-    }
-}
diff --git a/packages/Osu2/src/com/android/osu/NetworkConnection.java b/packages/Osu2/src/com/android/osu/NetworkConnection.java
deleted file mode 100644
index 9f5b929..0000000
--- a/packages/Osu2/src/com/android/osu/NetworkConnection.java
+++ /dev/null
@@ -1,206 +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.osu;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.net.Network;
-import android.net.NetworkInfo;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.text.TextUtils;
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * Responsible for setup/monitor on a Wi-Fi connection.
- */
-public class NetworkConnection {
-    private static final String TAG = "OSU_NetworkConnection";
-
-    private final WifiManager mWifiManager;
-    private final Callbacks mCallbacks;
-    private final int mNetworkId;
-    private boolean mConnected = false;
-
-    /**
-     * Callbacks on Wi-Fi connection state changes.
-     */
-    public interface Callbacks {
-        /**
-         * Invoked when network connection is established with IP connectivity.
-         *
-         * @param network {@link Network} associated with the connected network.
-         */
-        public void onConnected(Network network);
-
-        /**
-         * Invoked when the targeted network is disconnected.
-         */
-        public void onDisconnected();
-
-        /**
-         * Invoked when network connection is not established within the pre-defined timeout.
-         */
-        public void onTimeout();
-    }
-
-    /**
-     * Create an instance of {@link NetworkConnection} for the specified Wi-Fi network.
-     * The Wi-Fi network (specified by its SSID) will be added/enabled as part of this object
-     * creation.
-     *
-     * {@link #teardown} will need to be invoked once you're done with this connection,
-     * to remove the given Wi-Fi network from the framework.
-     *
-     * @param context The application context
-     * @param handler The handler to dispatch the processing of received broadcast intents
-     * @param ssid The SSID to connect to
-     * @param nai The network access identifier associated with the AP
-     * @param callbacks The callbacks to be invoked on network change events
-     * @throws IOException when failed to add/enable the specified Wi-Fi network
-     */
-    public NetworkConnection(Context context, Handler handler, WifiSsid ssid, String nai,
-            Callbacks callbacks) throws IOException {
-        mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
-        mCallbacks = callbacks;
-        mNetworkId = connect(ssid, nai);
-
-        // TODO(zqiu): setup alarm to timed out the connection attempt.
-
-        IntentFilter filter = new IntentFilter();
-        filter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        BroadcastReceiver receiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                String action = intent.getAction();
-                if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) {
-                    handleNetworkStateChanged(
-                            intent.getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO),
-                            intent.getParcelableExtra(WifiManager.EXTRA_WIFI_INFO));
-                }
-            }
-        };
-        // Provide a Handler so that the onReceive call will be run on the specified handler
-        // thread instead of the main thread.
-        context.registerReceiver(receiver, filter, null, handler);
-    }
-
-    /**
-     * Teardown the network connection by removing the network.
-     */
-    public void teardown() {
-        mWifiManager.removeNetwork(mNetworkId);
-    }
-
-    /**
-     * Connect to a OSU Wi-Fi network specified by the given SSID. The security type of the Wi-Fi
-     * network is either open or OSEN (OSU Server-only authenticated layer 2 Encryption Network).
-     * When network access identifier is provided, OSEN is used.
-     *
-     * @param ssid The SSID to connect to
-     * @param nai Network access identifier of the network
-     *
-     * @return unique ID associated with the network
-     * @throws IOException
-     */
-    private int connect(WifiSsid ssid, String nai) throws IOException {
-        WifiConfiguration config = new WifiConfiguration();
-        config.SSID = "\"" + ssid.toString() + "\"";
-        if (TextUtils.isEmpty(nai)) {
-            config.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
-        } else {
-            // TODO(zqiu): configuration setup for OSEN.
-        }
-        int networkId = mWifiManager.addNetwork(config);
-        if (networkId < 0) {
-            throw new IOException("Failed to add OSU network");
-        }
-        if (!mWifiManager.enableNetwork(networkId, true)) {
-            throw new IOException("Failed to enable OSU network");
-        }
-        return networkId;
-    }
-
-    /**
-     * Handle network state changed events.
-     *
-     * @param networkInfo {@link NetworkInfo} indicating the current network state
-     * @param wifiInfo {@link WifiInfo} associated with the current network when connected
-     */
-    private void handleNetworkStateChanged(NetworkInfo networkInfo, WifiInfo wifiInfo) {
-        if (networkInfo == null) {
-            Log.e(TAG, "NetworkInfo not provided for network state changed event");
-            return;
-        }
-        switch (networkInfo.getDetailedState()) {
-            case CONNECTED:
-                handleConnectedEvent(wifiInfo);
-                break;
-            case DISCONNECTED:
-                handleDisconnectedEvent();
-                break;
-            default:
-                Log.d(TAG, "Ignore uninterested state: " + networkInfo.getDetailedState());
-                break;
-        }
-    }
-
-    /**
-     * Handle network connected event.
-     *
-     * @param wifiInfo {@link WifiInfo} associated with the current connection
-     */
-    private void handleConnectedEvent(WifiInfo wifiInfo) {
-        if (mConnected) {
-            // No-op if already connected.
-            return;
-        }
-        if (wifiInfo == null) {
-            Log.e(TAG, "WifiInfo not provided for connected event");
-            return;
-        }
-        if (wifiInfo.getNetworkId() != mNetworkId) {
-            return;
-        }
-        Network network = mWifiManager.getCurrentNetwork();
-        if (network == null) {
-            Log.e(TAG, "Current network is not set");
-            return;
-        }
-        mConnected = true;
-        mCallbacks.onConnected(network);
-    }
-
-    /**
-     * Handle network disconnected event.
-     */
-    private void handleDisconnectedEvent() {
-        if (!mConnected) {
-            // No-op if not connected, most likely a disconnect event for a different network.
-            return;
-        }
-        mConnected = false;
-        mCallbacks.onDisconnected();
-    }
-}
diff --git a/packages/Osu2/src/com/android/osu/OsuService.java b/packages/Osu2/src/com/android/osu/OsuService.java
deleted file mode 100644
index 46a3c84..0000000
--- a/packages/Osu2/src/com/android/osu/OsuService.java
+++ /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 com.android.osu;
-
-/**
- * Abstraction for services that can be performed by the OSU app, such as provisioning,
- * subscription remediation, and etc.
- */
-public interface OsuService {
-    /**
-     * Start the service.
-     */
-    public void start();
-
-    /**
-     * Stop the service.
-     */
-    public void stop();
-}
diff --git a/packages/Osu2/src/com/android/osu/ProvisionService.java b/packages/Osu2/src/com/android/osu/ProvisionService.java
deleted file mode 100644
index b1d43b2..0000000
--- a/packages/Osu2/src/com/android/osu/ProvisionService.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.osu;
-
-import android.content.Context;
-import android.net.Network;
-import android.net.wifi.hotspot2.OsuProvider;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Looper;
-import android.os.Message;
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * Service responsible for performing Passpoint subscription provisioning tasks.
- * This service will run on a separate thread to avoid blocking on the Main thread.
- */
-public class ProvisionService implements OsuService {
-    private static final String TAG = "OSU_ProvisionService";
-    private static final int COMMAND_START = 1;
-    private static final int COMMAND_STOP = 2;
-
-    private final Context mContext;
-    private final HandlerThread mHandlerThread;
-    private final ServiceHandler mServiceHandler;
-    private final OsuProvider mProvider;
-
-    private boolean mStarted = false;
-    private NetworkConnection mNetworkConnection = null;
-
-    public ProvisionService(Context context, OsuProvider provider) {
-        mContext = context;
-        mProvider = provider;
-        mHandlerThread = new HandlerThread(TAG);
-        mHandlerThread.start();
-        mServiceHandler = new ServiceHandler(mHandlerThread.getLooper());
-    }
-
-    @Override
-    public void start() {
-        mServiceHandler.sendMessage(mServiceHandler.obtainMessage(COMMAND_START));
-    }
-
-    @Override
-    public void stop() {
-        mServiceHandler.sendMessage(mServiceHandler.obtainMessage(COMMAND_STOP));
-    }
-
-    /**
-     * Handler class for handling commands to the ProvisionService.
-     */
-    private final class ServiceHandler extends Handler {
-        public ServiceHandler(Looper looper) {
-            super(looper);
-        }
-
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case COMMAND_START:
-                    if (mStarted) {
-                        Log.e(TAG, "Service already started");
-                        return;
-                    }
-                    try {
-                        // Initiate network connection to the OSU AP.
-                        mNetworkConnection = new NetworkConnection(
-                                mContext, this, mProvider.getOsuSsid(),
-                                mProvider.getNetworkAccessIdentifier(), new NetworkCallbacks());
-                        mStarted = true;
-                    } catch (IOException e) {
-                        // TODO(zqiu): broadcast failure event via LocalBroadcastManager.
-                    }
-                    break;
-                case COMMAND_STOP:
-                    if (!mStarted) {
-                        Log.e(TAG, "Service not started");
-                        return;
-                    }
-                    Log.e(TAG, "Stop provision service");
-                    break;
-                default:
-                    Log.e(TAG, "Unknown command: " + msg.what);
-                    break;
-            }
-        }
-    }
-
-    private final class NetworkCallbacks implements NetworkConnection.Callbacks {
-        @Override
-        public void onConnected(Network network) {
-            Log.d(TAG, "Connected to OSU AP");
-        }
-
-        @Override
-        public void onDisconnected() {
-        }
-
-        @Override
-        public void onTimeout() {
-        }
-    }
-}
diff --git a/packages/Osu2/tests/Android.mk b/packages/Osu2/tests/Android.mk
deleted file mode 100644
index 23db7a9..0000000
--- a/packages/Osu2/tests/Android.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (C) 2017 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := tests
-LOCAL_CERTIFICATE := platform
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
-
-LOCAL_JACK_FLAGS := --multi-dex native
-
-LOCAL_PACKAGE_NAME := OsuTests
-LOCAL_PRIVATE_PLATFORM_APIS := true
-LOCAL_COMPATIBILITY_SUITE := device-tests
-
-LOCAL_INSTRUMENTATION_FOR := Osu2
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
-    android-support-test \
-    mockito-target-minus-junit4 \
-    frameworks-base-testutils
-
-# Code coverage puts us over the dex limit, so enable multi-dex for coverage-enabled builds
-ifeq (true,$(EMMA_INSTRUMENT))
-LOCAL_JACK_FLAGS := --multi-dex native
-LOCAL_DX_FLAGS := --multi-dex
-endif # EMMA_INSTRUMENT
-
-include $(BUILD_PACKAGE)
diff --git a/packages/Osu2/tests/AndroidManifest.xml b/packages/Osu2/tests/AndroidManifest.xml
deleted file mode 100644
index e22c112..0000000
--- a/packages/Osu2/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  ~ Copyright (C) 2017 The Android Open Source Project
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License
-  -->
-
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.osu.tests">
-
-    <application>
-        <uses-library android:name="android.test.runner" />
-        <activity android:label="OsuTestDummyLabel"
-                  android:name="OsuTestDummyName">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER"/>
-            </intent-filter>
-        </activity>
-    </application>
-
-    <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
-        android:targetPackage="com.android.osu"
-        android:label="OSU App Tests">
-    </instrumentation>
-
-</manifest>
diff --git a/packages/Osu2/tests/AndroidTest.xml b/packages/Osu2/tests/AndroidTest.xml
deleted file mode 100644
index 9514dab..0000000
--- a/packages/Osu2/tests/AndroidTest.xml
+++ /dev/null
@@ -1,30 +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.
--->
-<!-- This test config file is auto-generated. -->
-<configuration description="Runs OSU App Tests.">
-    <option name="test-suite-tag" value="apct" />
-    <option name="test-suite-tag" value="apct-instrumentation" />
-    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
-        <option name="cleanup-apks" value="true" />
-        <option name="test-file-name" value="Osu2.apk" />
-        <option name="test-file-name" value="OsuTests.apk" />
-    </target_preparer>
-
-    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
-        <option name="package" value="com.android.osu.tests" />
-        <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" />
-    </test>
-</configuration>
diff --git a/packages/Osu2/tests/README.md b/packages/Osu2/tests/README.md
deleted file mode 100644
index dbfa79c..0000000
--- a/packages/Osu2/tests/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# OSU Unit Tests
-This package contains unit tests for the OSU app 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.
-
-## Running Tests
-The easiest way to run tests is simply run
-
-```
-frameworks/base/packages/Osu2/tests/runtests.sh
-```
-
-`runtests.sh` will build the test project and all of its dependencies and push the APK to the
-connected device. It will then run the tests on the device.
-
-To enable syncing data to the device for first time after clean reflash:
-1. adb disable-verity
-2. adb reboot
-3. adb remount
-
-See below for a few example of options to limit which tests are run.
-See the
-[AndroidJUnitRunner Documentation](https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html)
-for more details on the supported options.
-
-```
-runtests.sh -e package com.android.osu
-runtests.sh -e class com.android.osu.NetworkConnectionTest
-```
-
-If you manually build and push the test APK to the device you can run tests using
-
-```
-adb shell am instrument -w 'com.android.osu.tests/android.support.test.runner.AndroidJUnitRunner'
-```
-
-## Adding Tests
-Tests can be added by adding classes to the src directory. JUnit4 style test cases can
-be written by simply annotating test methods with `org.junit.Test`.
-
-## Debugging Tests
-If you are trying to debug why tests are not doing what you expected, you can add android log
-statements and use logcat to view them. The beginning and end of every tests is automatically logged
-with the tag `TestRunner`.
diff --git a/packages/Osu2/tests/runtests.sh b/packages/Osu2/tests/runtests.sh
deleted file mode 100755
index 3513f5b..0000000
--- a/packages/Osu2/tests/runtests.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -z $ANDROID_BUILD_TOP ]; then
-  echo "You need to source and lunch before you can use this script"
-  exit 1
-fi
-
-echo "Running tests"
-
-set -e # fail early
-
-echo "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/packages/Osu2/tests"
-# NOTE Don't actually run the command above since this shell doesn't inherit functions from the
-#      caller.
-make -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk MODULES-IN-frameworks-base-packages-Osu2-tests
-
-set -x # print commands
-
-adb root
-adb wait-for-device
-
-adb install -r -g "$OUT/data/app/OsuTests/OsuTests.apk"
-
-adb shell am instrument -w "$@" 'com.android.osu.tests/android.support.test.runner.AndroidJUnitRunner'
diff --git a/packages/Osu2/tests/src/com/android/osu/NetworkConnectionTest.java b/packages/Osu2/tests/src/com/android/osu/NetworkConnectionTest.java
deleted file mode 100644
index 2753249..0000000
--- a/packages/Osu2/tests/src/com/android/osu/NetworkConnectionTest.java
+++ /dev/null
@@ -1,132 +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.osu;
-
-import static org.junit.Assert.assertEquals;
-import static org.mockito.Mockito.any;
-import static org.mockito.Mockito.eq;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.net.ConnectivityManager;
-import android.net.Network;
-import android.net.NetworkInfo;
-import android.net.wifi.WifiConfiguration;
-import android.net.wifi.WifiInfo;
-import android.net.wifi.WifiManager;
-import android.net.wifi.WifiSsid;
-import android.os.Handler;
-import android.test.suitebuilder.annotation.SmallTest;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mock;
-
-import java.io.IOException;
-
-/**
- * Unit tests for {@link com.android.osu.NetworkConnection}.
- */
-@SmallTest
-public class NetworkConnectionTest {
-    private static final String TEST_SSID = "TEST SSID";
-    private static final String TEST_SSID_WITH_QUOTES = "\"" + TEST_SSID + "\"";
-    private static final int TEST_NETWORK_ID = 1;
-
-    @Mock Context mContext;
-    @Mock Handler mHandler;
-    @Mock WifiManager mWifiManager;
-    @Mock NetworkConnection.Callbacks mCallbacks;
-
-    @Before
-    public void setUp() throws Exception {
-        initMocks(this);
-        when(mContext.getSystemService(Context.WIFI_SERVICE)).thenReturn(mWifiManager);
-    }
-
-    /**
-     * Verify that an IOException will be thrown when failed to add the network.
-     *
-     * @throws Exception
-     */
-    @Test(expected = IOException.class)
-    public void networkAddFailed() throws Exception {
-        when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(-1);
-        new NetworkConnection(mContext, mHandler, WifiSsid.createFromAsciiEncoded(TEST_SSID),
-                null, mCallbacks);
-    }
-
-    /**
-     * Verify that an IOException will be thrown when failed to enable the network.
-     *
-     * @throws Exception
-     */
-    @Test(expected = IOException.class)
-    public void networkEnableFailed() throws Exception {
-        when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(TEST_NETWORK_ID);
-        when(mWifiManager.enableNetwork(eq(TEST_NETWORK_ID), eq(true))).thenReturn(false);
-        new NetworkConnection(mContext, mHandler, WifiSsid.createFromAsciiEncoded(TEST_SSID),
-                null, mCallbacks);
-    }
-
-    /**
-     * Verify that the connection is established after receiving a
-     * WifiManager.NETWORK_STATE_CHANGED_ACTION intent indicating that we are connected.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void openNetworkConnectionEstablished() throws Exception {
-        when(mWifiManager.addNetwork(any(WifiConfiguration.class))).thenReturn(TEST_NETWORK_ID);
-        when(mWifiManager.enableNetwork(eq(TEST_NETWORK_ID), eq(true))).thenReturn(true);
-        NetworkConnection connection = new NetworkConnection(mContext, mHandler,
-                WifiSsid.createFromAsciiEncoded(TEST_SSID), null, mCallbacks);
-
-        // Verify the WifiConfiguration being added.
-        ArgumentCaptor<WifiConfiguration> wifiConfig =
-                ArgumentCaptor.forClass(WifiConfiguration.class);
-        verify(mWifiManager).addNetwork(wifiConfig.capture());
-        assertEquals(wifiConfig.getValue().SSID, TEST_SSID_WITH_QUOTES);
-
-        // Capture the BroadcastReceiver.
-        ArgumentCaptor<BroadcastReceiver> receiver =
-                ArgumentCaptor.forClass(BroadcastReceiver.class);
-        verify(mContext).registerReceiver(receiver.capture(), any(), any(), any());
-
-        // Setup intent.
-        Intent intent = new Intent(WifiManager.NETWORK_STATE_CHANGED_ACTION);
-        NetworkInfo networkInfo = new NetworkInfo(ConnectivityManager.TYPE_WIFI, 0, "WIFI", "");
-        networkInfo.setDetailedState(NetworkInfo.DetailedState.CONNECTED, "", "");
-        intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo);
-        WifiInfo wifiInfo = new WifiInfo();
-        wifiInfo.setNetworkId(TEST_NETWORK_ID);
-        intent.putExtra(WifiManager.EXTRA_WIFI_INFO, wifiInfo);
-
-        // Send intent to the receiver.
-        Network network = new Network(0);
-        when(mWifiManager.getCurrentNetwork()).thenReturn(network);
-        receiver.getValue().onReceive(mContext, intent);
-
-        // Verify we are connected.
-        verify(mCallbacks).onConnected(eq(network));
-    }
-}
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index b43e9ea..94cdb70 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth-oudiokanaalmodus"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Gebruik Bluetooth-oudiokodek\nKeuse: kanaalmodus"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth-oudio-LDAC-kodek: Speelgehalte"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Gebruik Bluetooth-LDAC-oudiokodek\nKeuse: speelgehalte"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Stroming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Private DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Kies private DNS-modus"</string>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index d510f1f..e9cc645 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"የብሉቱዝ ኦዲዮ ሰርጥ ሁነታ"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"የብሉቱዝ ኦዲዮ ኮዴክን አስጀምር\nምርጫ፦ የሰርጥ ሁነታ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"የብሉቱዝ ኦዲዮ LDAC ኮዴክ ይምረጡ፦ የመልሶ ማጫወት ጥራት"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"የብሉቱዝ ኦዲዮ LDAC ኮዴክ አስጀምር\nምርጫ፦ የመልሶ ማጫወት ጥራት"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ዥረት፦ <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"የግል ዲኤንኤስ"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"የግል ዲኤንኤስ ሁነታ ይምረጡ"</string>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index e2f3407..e16b210 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"وضع قناة صوت بلوتوث"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"اختيار برنامج ترميز الصوت لمشغّل\nالبلوتوث: وضع القناة"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"‏برنامج ترميز LDAC لصوت البلوتوث: جودة التشغيل"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"‏اختيار برنامج ترميز LDAC لصوت مشغّل\nالبلوتوث: جودة التشغيل"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"البث: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"نظام أسماء النطاقات الخاص"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"اختر وضع نظام أسماء النطاقات الخاص"</string>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index 914b693..77932fd 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ব্লুটুথ অডিঅ\' চ্চেনেল ম\'ড"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ব্লুটুথ অডিঅ\' ক\'ডেকৰ বাছনি\nআৰম্ভ কৰক: চ্চেনেল ম\'ড"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ব্লুটুথ অডিঅ’ LDAC ক’ডেক: পৰিৱেশনৰ মান"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ব্লুটুথ অডিঅ\' LDAC ক\'ডেকৰ বাছনি\nআৰম্ভ কৰক: পৰিবেশনৰ গুণাগুণ"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ষ্ট্ৰীম কৰি থকা হৈছে: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ব্যক্তিগত DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ব্যক্তিগত DNS ম\'ড বাছনি কৰক"</string>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index 7a73952..122a521 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth Audio Kanal Rejimi"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth Audio Kodek\nSeçimini aktiv edin: Kanal Rejimi"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Audio LDAC Kodeki:Oxutma Keyfiyyəti"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth Audio LDAC Kodek\nSeçimini aktiv edin: Oxutma Keyfiyyəti"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Bluetooth Audio LDAC\nCodec Seçimini aktiv edin: Oxutma Keyfiyyəti"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Canlı yayım: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Şəxsi DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Şəxsi DNS Rejimini Seçin"</string>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index e176362..07028e7 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Režim kanala za Bluetooth audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Izaberite Bluetooth audio kodek:\n režim kanala"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio kodek LDAC: kvalitet reprodukcije"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Izaberite Bluetooth audio LDAC kodek:\n kvalitet snimka"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Strimovanje: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privatni DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Izaberite režim privatnog DNS-a"</string>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 012515a..f820cee 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Канальны рэжым Bluetooth Audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Уключыць кодэк Bluetooth Audio\nВыбар: канальны рэжым"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Аўдыякодэк Bluetooth LDAC: якасць прайгравання"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Уключыць кодэк Bluetooth Audio LDAC\nВыбар: якасць прайгравання"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Перадача плынню: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Прыватная DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Выберыце рэжым прыватнай DNS"</string>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 4707b37..cf4d882 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Режим на канала на звука през Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Задействане на аудиокодек за Bluetooth\nИзбор: Режим на канала"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Кодек за звука през Bluetooth с технологията LDAC: Качество на възпроизвеждане"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Задействане на аудиокодек за Bluetooth с технологията LDAC\nИзбор: Качество на възпроизвеждане"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Поточно предаване: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Частен DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Изберете режим на частния DNS"</string>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index f338ba8..46ded74 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ব্লুটুথ অডিও চ্যানেল মোড"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ব্লুটুথ অডিও কোডেক ট্রিগার করুন\nএটি বেছে নেওয়া আছে: চ্যানেল মোড"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ব্লুটুথ অডিও LDAC কোডেক: প্লেব্যাক গুণমান"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ব্লুটুথ অডিও LDAC কোডেক ট্রিগার করুন\nএটি বেছে নেওয়া আছে: প্লেব্যাকের গুণমান"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"স্ট্রিমিং: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ব্যক্তিগত ডিএনএস"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ব্যক্তিগত ডিএনএস মোড বেছে নিন"</string>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 33f0d88..028ba9e 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Način Bluetooth audio kanala"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktivirajte Bluetooth Audio Codec\nOdabir: Način rada po kanalima"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Audio LDAC kodek: Kvalitet reprodukcije"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Aktivirajte Bluetooth Audio Codec\nOdabir: Kvalitet reprodukcije"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Prijenos: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privatni DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Odaberite način rada privatnog DNS-a"</string>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index b786ec6..666824d 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Mode de canal de l\'àudio per Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Activa el còdec d\'àudio per Bluetooth\nSelecció: mode de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Còdec LDAC d\'àudio per Bluetooth: qualitat de reproducció"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Activa el còdec d\'àudio per Bluetooth LDAC\nSelecció: qualitat de reproducció"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"S\'està reproduint en temps real: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privat"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecciona el mode de DNS privat"</string>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index fafe05c..35576f7 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth Audio – režim kanálu"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Spustit zvukový kodek Bluetooth\nVýběr: režim kanálu"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodek Bluetooth Audio LDAC: Kvalita přehrávání"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Spustit zvukový kodek Bluetooth LDAC\nVýběr: kvalita přehrávání"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streamování: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Soukromé DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Vyberte soukromý režim DNS"</string>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index 1ca9854..6308c8c 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Kanaltilstand for Bluetooth-lyd"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Udløs codec for Bluetooth-lyd\nValg: Kanaltilstand"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"LDAC-codec for Bluetooth-lyd: Afspilningskvalitet"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Udløs LDAC-codec for Bluetooth-lyd\nValg: Afspilningskvalitet"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streamer: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privat DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Vælg privat DNS-tilstand"</string>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index 86216c4..836a0e7 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modus des Bluetooth-Audiokanals"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth-Audio-Codec auslösen\nAuswahl: Kanalmodus"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth-Audio-LDAC-Codec: Wiedergabequalität"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth-Audio-LDAC-Codec auslösen\nAuswahl: Wiedergabequalität"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privates DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Privaten DNS-Modus auswählen"</string>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index 55442c3..fcffad7 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Λειτουργία καναλιού ήχου Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Ενεργοποίηση κωδικοποιητή ήχου Bluetooth\nΕπιλογή: Λειτουργία καναλιού"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Κωδικοποιητής LDAC ήχου Bluetooth: Ποιότητα αναπαραγωγής"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Ενεργοποίηση κωδικοποιητή LDAC ήχου Bluetooth\nΕπιλογή: Ποιότητα αναπαραγωγής"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Ροή: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Ιδιωτικό DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Επιλέξτε τη λειτουργία ιδιωτικού DNS"</string>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index b5e0f1b..d75bf16 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio channel mode"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Trigger Bluetooth Audio Codec\nSelection: Channel Mode"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio LDAC codec: Playback quality"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Trigger Bluetooth Audio LDAC Codec\nSelection: Playback Quality"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Private DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Select private DNS mode"</string>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index b5e0f1b..d75bf16 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio channel mode"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Trigger Bluetooth Audio Codec\nSelection: Channel Mode"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio LDAC codec: Playback quality"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Trigger Bluetooth Audio LDAC Codec\nSelection: Playback Quality"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Private DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Select private DNS mode"</string>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index b5e0f1b..d75bf16 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio channel mode"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Trigger Bluetooth Audio Codec\nSelection: Channel Mode"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio LDAC codec: Playback quality"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Trigger Bluetooth Audio LDAC Codec\nSelection: Playback Quality"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Private DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Select private DNS mode"</string>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index b5e0f1b..d75bf16 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio channel mode"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Trigger Bluetooth Audio Codec\nSelection: Channel Mode"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio LDAC codec: Playback quality"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Trigger Bluetooth Audio LDAC Codec\nSelection: Playback Quality"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Private DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Select private DNS mode"</string>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index ce35672..a42b8fa 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‎‎‏‏‎‎‎‏‎‎‎‏‏‏‏‎‏‎‎‎‏‏‏‎‏‎‎‏‎‎‏‎‏‎‏‎‏‏‏‎‎‎‏‎‎‎‎‏‎‎‎‏‎‏‏‏‎‎‏‏‎‎‎Bluetooth Audio Channel Mode‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‎‏‎‎‎‏‏‎‎‏‏‏‏‎‏‏‏‎‏‎‏‏‏‎‏‎‎‎‏‏‎‎‎‏‎‎‎‎‏‎‏‏‏‎‏‎‏‎‏‏‎‎‏‎‎‎‏‏‎‏‎Trigger Bluetooth Audio Codec‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Selection: Channel Mode‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‏‎‎‎‏‏‏‎‏‏‏‎‏‏‏‏‎‎‏‏‎‏‏‎‏‎‏‎‎‎‏‏‏‎‏‏‎‏‏‎‎‏‏‎‎‏‏‎‏‎‎‏‎‎‏‏‎‏‎Bluetooth Audio LDAC Codec: Playback Quality‎‏‎‎‏‎"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‏‎‏‏‎‏‎‎‏‏‎‎‏‏‏‏‎‎‎‏‏‏‎‏‎‎‏‏‏‎‏‎‏‏‏‎‎‏‏‎‏‎‏‎‎‏‏‎‏‎‎‎‏‏‎‎‏‎Trigger Bluetooth Audio LDAC Codec‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Selection: Playback Quality‎‏‎‎‏‎"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‏‏‏‏‏‏‎‏‎‏‏‎‎‎‏‎‎‎‎‎‎‎‎‎‎‏‎‎‎‏‏‏‎‏‎‏‏‏‏‎‏‏‎‎‎‏‎‎‎‎‎‎‎‎‏‎‏‏‎‏‏‎Trigger Bluetooth Audio LDAC‎‏‎‎‏‏‎\n‎‏‎‎‏‏‏‎Codec Selection: Playback Quality‎‏‎‎‏‎"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‎‎‏‎‏‎‎‎‏‏‎‏‏‏‎‏‏‎‏‏‎‎‏‎‎‏‏‏‏‎‏‏‏‏‏‎‏‎‏‏‏‎‏‏‎‏‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‎‎Streaming: ‎‏‎‎‏‏‎<xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>‎‏‎‎‏‏‏‎‎‏‎‎‏‎"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‎‏‏‎‎‏‏‎‏‎‏‏‎‏‎‏‎‏‎‏‎‎‏‏‎‏‎‎‎‏‎‏‎‎‎‎‏‎‎‎‎‏‎‎‏‏‏‏‎‎‎‏‎‏‏‎‎‏‏‎‎‏‎‎Private DNS‎‏‎‎‏‎"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‏‎‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‎‎‏‏‎‏‏‎‎‎‎‏‏‏‏‏‎‎‏‏‎‎‎‎‏‎‏‏‎‏‏‏‎‏‎‏‏‎‎‏‏‏‏‏‎‏‏‎Select Private DNS Mode‎‏‎‎‏‎"</string>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 608482e..2c93b46 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal del audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Activar el códec de audio por Bluetooth\nSelección: modo de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Códec del audio Bluetooth LDAC: calidad de reproducción"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Activar el códec LDAC de audio por Bluetooth\nSelección: calidad de reproducción"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Transmitiendo: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privado"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecciona el modo de DNS privado"</string>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 6d60899..fd8b7f3 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal de audio por Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Activar el códec de audio por Bluetooth\nSelección: modo de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Códec de audio LDAC de Bluetooth: calidad de reproducción"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Activar el códec LDAC de audio por Bluetooth\nSelección: calidad de reproducción"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Activar LDAC de audio por Bluetooth\nSelección de códec: calidad de reproducción"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privado"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecciona el modo de DNS privado"</string>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 3703805..235c6c1c 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetoothi heli kanalirežiim"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetoothi helikodeki käivitamine\nValik: kanalirežiim"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetoothi LDAC-helikodek: taasesituskvaliteet"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetoothi LDAC-helikodeki käivitamine\nValik: taasesituskvaliteet"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Voogesitus: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privaatne DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Privaatse DNS-režiimi valimine"</string>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 9a9212e..4c4f99f 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth bidezko audioaren kanalaren modua"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Abiarazi Bluetooth bidezko audio-kodeka\nHautapena: kanal modua"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audioaren LDAC kodeka: erreprodukzioaren kalitatea"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Abiarazi Bluetooth bidezko LDAC audio-kodeka\nHautapena: erreprodukzio-kalitatea"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Abiarazi Bluetooth bidezko LDAC\naudio-kodekaren hautapena: erreprodukzio-kalitatea"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Igortzean: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS pribatua"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Hautatu DNS pribatuaren modua"</string>
diff --git a/packages/SettingsLib/res/values-fa/arrays.xml b/packages/SettingsLib/res/values-fa/arrays.xml
index 05ae3bf..2baa632 100644
--- a/packages/SettingsLib/res/values-fa/arrays.xml
+++ b/packages/SettingsLib/res/values-fa/arrays.xml
@@ -25,7 +25,7 @@
     <item msgid="8934131797783724664">"اسکن کردن..."</item>
     <item msgid="8513729475867537913">"در حال اتصال…"</item>
     <item msgid="515055375277271756">"در حال راستی‌آزمایی..."</item>
-    <item msgid="1943354004029184381">"‏در حال دریافت آدرس IP..."</item>
+    <item msgid="1943354004029184381">"‏درحال دریافت نشانی IP…"</item>
     <item msgid="4221763391123233270">"متصل"</item>
     <item msgid="624838831631122137">"معلق"</item>
     <item msgid="7979680559596111948">"در حال قطع اتصال..."</item>
@@ -39,7 +39,7 @@
     <item msgid="8878186979715711006">"اسکن کردن..."</item>
     <item msgid="355508996603873860">"در حال اتصال به <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
     <item msgid="554971459996405634">"در حال راستی‌آزمایی با <xliff:g id="NETWORK_NAME">%1$s</xliff:g>..."</item>
-    <item msgid="7928343808033020343">"‏در حال دریافت آدرس IP از <xliff:g id="NETWORK_NAME">%1$s</xliff:g>..."</item>
+    <item msgid="7928343808033020343">"‏درحال دریافت نشانی IP از <xliff:g id="NETWORK_NAME">%1$s</xliff:g>…"</item>
     <item msgid="8937994881315223448">"متصل شد به <xliff:g id="NETWORK_NAME">%1$s</xliff:g>"</item>
     <item msgid="1330262655415760617">"معلق"</item>
     <item msgid="7698638434317271902">"اتصال قطع شد از <xliff:g id="NETWORK_NAME">%1$s</xliff:g>..."</item>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 28160e9..6f736d4 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"حالت کانال بلوتوث‌ صوتی"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"راه‌اندازی کدک صوتی بلوتوثی\nانتخاب: حالت کانال"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"‏کدک LDAC صوتی بلوتوث: کیفیت پخش"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"‏راه‌اندازی کدک LDAC صوتی بلوتوثی\nانتخاب: کیفیت پخش"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"پخش جریانی: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"‏DNS خصوصی"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"‏حالت DNS خصوصی را انتخاب کنید"</string>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index bea140e6..1971999 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth-äänen kanavatila"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Käynnistä Bluetooth-äänipakkaus\nValinta: kanavatila"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth-äänen LDAC-koodekki: Toiston laatu"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Käynnistä Bluetooth-äänen LDAC-pakkaus\nValinta: toiston laatu"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Striimaus: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Yksityinen DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Valitse yksityinen DNS-tila"</string>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index aa64b09..608baa8 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Mode de canal pour l\'audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Déclencher le codec audio Bluetooth\nSélection : mode Canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec audio Bluetooth LDAC : qualité de lecture"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Déclencher le codec audio Bluetooth LDAC\nSélection : qualité de lecture"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Diffusion : <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privé"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Sélectionnez le mode DNS privé"</string>
@@ -399,7 +400,7 @@
     <string name="disabled_by_admin_summary_text" msgid="6750513964908334617">"Contrôlé par l\'administrateur"</string>
     <string name="enabled_by_admin" msgid="5302986023578399263">"Activé par l\'administrateur"</string>
     <string name="disabled_by_admin" msgid="8505398946020816620">"Désactivé par l\'administrateur"</string>
-    <string name="disabled" msgid="9206776641295849915">"Désactivés"</string>
+    <string name="disabled" msgid="9206776641295849915">"Désactivée"</string>
     <string name="external_source_trusted" msgid="2707996266575928037">"Autorisée"</string>
     <string name="external_source_untrusted" msgid="2677442511837596726">"Non autorisée"</string>
     <string name="install_other_apps" msgid="6986686991775883017">"Installer applis inconnues"</string>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index acb326e..0bfbf8b 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Mode de chaîne de l\'audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Critère de sélection du codec audio\nBluetooth : mode de chaîne"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec audio Bluetooth LDAC : qualité de lecture"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Critère de sélection du codec audio \nBluetooth LDAC : qualité de la lecture"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Diffusion : <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privé"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Sélectionner le mode DNS privé"</string>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 59be991..dc98345 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canle de audio por Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Activar códec de audio por Bluetooth\nSelección: modo de canle"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Códec LDAC de audio por Bluetooth: calidade de reprodución"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Activar códec LDAC de audio por Bluetooth\nSelección: calidade de reprodución"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Reprodución en tempo real: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privado"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecciona o modo de DNS privado"</string>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index 5f21c55..e151bb4 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"બ્લૂટૂથ ઑડિઓ ચેનલ મોડ"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"બ્લૂટૂથ ઑડિઓ કોડેક\nપસંદગી ટ્રિગર કરો: ચૅનલ મોડ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"બ્લૂટૂથ ઑડિઓ LDAC કોડેક: પ્લેબૅક ગુણવત્તા"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"બ્લૂટૂથ ઑડિઓ LDAC કોડેક\nપસંદગી ટ્રિગર કરો: પ્લેબૅક ક્વૉલિટી"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"સ્ટ્રીમિંગ: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ખાનગી DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ખાનગી DNS મોડને પસંદ કરો"</string>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 09d7c1e..cdbbccc 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ब्लूटूथ ऑडियो चैनल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ब्लूटूथ ऑडियो कोडेक का\nयह विकल्प चालू करें: चैनल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ब्लूटूथ ऑडियो LDAC कोडेक: प्लेबैक क्वालिटी"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ब्लूटूथ ऑडियो एलडीएसी कोडेक का\nयह विकल्प चालू करें: प्लेबैक क्वालिटी"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"चलाया जा रहा है: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"निजी डीएनएस"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"निजी डीएनएस मोड चुनें"</string>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index b5a35c8..3d9d984 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Način kanala za Bluetooth Audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Pokreni odabir kodeka za Bluetooth\nAudio: način kanala"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodek za Bluetooth Audio LDAC: kvaliteta reprodukcije"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Pokreni odabir kodeka za Bluetooth Audio\nLDAC: kvaliteta reprodukcije"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Strujanje: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privatni DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Odaberite način privatnog DNS-a"</string>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index a031016..76a289e 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth hang – Csatornamód"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth-hangkodek aktiválása\nKiválasztás: Csatornamód"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth LDAC hangkodek: lejátszási minőség"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth LDAC hangkodek aktiválása\nKiválasztás: Lejátszási minőség"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streamelés: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privát DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"„Privát DNS” mód kiválasztása"</string>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index 790095f..e83e30c 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth աուդիո կապուղու ռեժիմը"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Գործարկել Bluetooth աուդիո կոդեկը\nԸնտրություն՝ կապուղու ռեժիմ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth աուդիո LDAC կոդեկ՝ նվագարկման որակ"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Գործարկել Bluetooth աուդիո LDAC կոդեկը\nԸնտրություն՝ նվագարկման որակ"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Հեռարձակում՝ <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Մասնավոր DNS սերվեր"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Ընտրեք անհատական DNS սերվերի ռեժիմը"</string>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 753af61..e8fbd83 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Mode Channel Audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktifkan Codec Audio Bluetooth\nPilihan: Mode Channel"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec LDAC Audio Bluetooth: Kualitas Pemutaran"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Aktifkan Codec LDAC Audio Bluetooth\nPilihan: Kualitas Pemutaran"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS Pribadi"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Pilih Mode DNS Pribadi"</string>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 159ddfc..8761731 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Hljóðrásarstilling Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Virkja Bluetooth-hljóðkóðara\nVal: hljóðrásarstilling"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth LDAC-hljóðkóðari: gæði spilunar"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Virkja Bluetooth LDAC-hljóðkóðara\nVal: gæði splunar"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streymi: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Lokað DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Velja lokaða DNS-stillingu"</string>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index dd8a1a4..6d0bcb6 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modalità canale audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Attiva il codec audio Bluetooth\nSelezione: Modalità canale"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec LDAC audio Bluetooth: qualità di riproduzione"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Attiva il codec LDAC audio Bluetooth\nSelezione: Qualità di riproduzione"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privato"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Seleziona modalità DNS privato"</string>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index 2833877..f028842 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"‏מצב של ערוץ אודיו ל-Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"‏הפעלת ‏Codec אודיו ל-Bluetooth\nבחירה: מצב ערוץ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"‏Codec אודיו LDAC ל-Bluetooth: איכות נגינה"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"‏הפעלת Codec אודיו LDAC ל-Bluetooth\nבחירה: איכות נגינה"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"סטרימינג: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"‏DNS פרטי"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"‏צריך לבחור במצב DNS פרטי"</string>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 4e09b9b..74b7beb 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth オーディオ チャンネル モード"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth オーディオ コーデックを起動\n選択: チャンネル モード"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth オーディオ LDAC コーデック: 再生音質"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth オーディオ LDAC コーデックを起動\n選択: 再生音質"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ストリーミング: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"プライベート DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"プライベート DNS モードを選択"</string>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 7ddcb4e..b364aba 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth აუდიოს არხის რეჟიმი"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth-ის აუდიო კოდეკის გაშვება\nარჩევანი: არხის რეჟიმი"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth აუდიოს LDAC კოდეკის დაკვრის ხარისხი"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth-ის აუდიო LDAC კოდეკის გაშვება\nარჩევანი: დაკვრის ხარისხი"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"სტრიმინგი: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"პირადი DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"აირჩიეთ პირადი DNS რეჟიმი"</string>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index f1406d6..5994038 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth аудиомазмұны бойынша арна режимі"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth аудиокодегін іске қосу\nТаңдау: арна режимі"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth LDAC аудиокодегі: ойнату сапасы"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth LDAC аудиокодегін іске қосу\nТаңдау: ойнату сапасы"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Трансляция: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Жеке DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Жеке DNS режимін таңдаңыз"</string>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 8227f1f9..a4cf0ba 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"មុខ​ងារ​រលកសញ្ញា​សំឡេង​ប៊្លូធូស"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ជំរុញ​ការជ្រើសរើស​កូឌិក​សំឡេង\nប៊្លូធូស៖ ប្រភេទ​សំឡេង"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"កូឌិកប្រភេទ LDAC នៃសំឡេង​ប៊្លូធូស៖ គុណភាព​ចាក់​សំឡេង"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ជំរុញ​ការជ្រើសរើស​កូឌិក​ប្រភេទ​ LDAC នៃសំឡេង​\nប៊្លូធូស៖ គុណភាព​ចាក់​សំឡេង"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"កំពុង​ចាក់៖ <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS ឯកជន"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ជ្រើសរើសមុខងារ DNS ឯកជន"</string>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index 59004b3..465d78f 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ಬ್ಲೂಟೂತ್ ಆಡಿಯೋ ಚಾನೆಲ್ ಮೋಡ್"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ಬ್ಲೂಟೂತ್ ಆಡಿಯೋ ಕೋಡೆಕ್ ಅನ್ನು ಟ್ರಿಗ್ಗರ್ ಮಾಡಿ\nಆಯ್ಕೆ: ಚಾನಲ್ ಮೋಡ್"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ಬ್ಲೂಟೂತ್‌ ಆಡಿಯೊ LDAC ಕೋಡೆಕ್: ಪ್ಲೇಬ್ಯಾಕ್ ಗುಣಮಟ್ಟ"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ಬ್ಲೂಟೂತ್ ಆಡಿಯೋ LDAC ಕೋಡೆಕ್ ಅನ್ನು ಟ್ರಿಗ್ಗರ್ ಮಾಡಿ\nಆಯ್ಕೆ: ಪ್ಲೇಬ್ಯಾಕ್ ಗುಣಮಟ್ಟ"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ಸ್ಟ್ರೀಮಿಂಗ್: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ಖಾಸಗಿ DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ಖಾಸಗಿ DNS ಮೋಡ್ ಆಯ್ಕೆಮಾಡಿ"</string>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 784dfa2..77d5a70 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"블루투스 오디오 채널 모드"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"블루투스 오디오 코덱 실행\n선택: 채널 모드"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"블루투스 오디오 LDAC 코덱: 재생 품질"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"블루투스 오디오 LDAC 코덱 실행\n선택: 재생 품질"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"스트리밍: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"비공개 DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"비공개 DNS 모드 선택"</string>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index 46816a8..ae8e394 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth аудио каналынын режими"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth Audio кодегин иштетүү\nТандоо: Канал режими"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth аудио LDAC кодеги: Ойнотуу сапаты"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth Audio кодегин иштетүү\nТандоо: Ойнотуу сапаты"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Трансляция: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Купуя DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Жеке DNS режимин тандаңыз"</string>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 1bad1b2..b43c0d8 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ໂໝດຊ່ອງສຽງ Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ເປີດໃຊ້ Bluetooth Audio Codec\nການເລືອກ: ໂໝດຊ່ອງ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Audio LDAC Codec: ຄຸນນະພາບການຫຼິ້ນ"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ເປີດໃຊ້ Bluetooth Audio LDAC Codec\nການເລືອກ: ຄຸນນະພາບການຫຼິ້ນ"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"ເປີດໃຊ້ Bluetooth Audio LDAC\nການເລືອກ Codec: ຄຸນນະພາບການຫຼິ້ນ"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS ສ່ວນຕົວ"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ເລືອກໂໝດ DNS ສ່ວນຕົວ"</string>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index 7ddd496..8969dc6 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"„Bluetooth“ garso kanalo režimas"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Suaktyvinti „Bluetooth“ garso kodeką\nPasirinkimas: kanalo režimas"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"„Bluetooth“ garso LDAC kodekas: atkūrimo kokybė"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Suaktyvinti „Bluetooth“ garso LDAC kodeką\nPasirinkimas: atkūrimo kokybė"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Srautinis perdavimas: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privatus DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Pasirinkite privataus DNS režimą"</string>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index ea92029..051cc83 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio kanāla režīms"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktivizēt Bluetooth audio kodeku\nAtlase: kanāla režīms"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth audio LDAC kodeks: atskaņošanas kvalitāte"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Aktivizēt Bluetooth audio LDAC kodeku\nAtlase: atskaņošanas kvalitāte"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Straumēšana: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privāts DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Atlasiet privāta DNS režīmu"</string>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index 627ea38..a6dc4e9 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Режим на канал за аудио преку Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Вклучете го аудио кодекот преку Bluetooth\nСелекција: режим на канал"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Кодек за LDAC-аудио преку Bluetooth: квалитет на репродукција"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Вклучете кодек за LDAC-аудио преку Bluetooth\nСелекција: квалитет на репродукција"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Емитување: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Приватен DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Изберете режим на приватен DNS"</string>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 48a15ae..242e58e 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth ഓഡിയോ ചാനൽ മോഡ്"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth Audio Codec\nSelection ട്രിഗ്ഗര്‍ ചെയ്യുക: ചാനൽ മോഡ്"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth ഓഡിയോ LDAC കോഡെക്: പ്ലേബാക്ക് ‌നിലവാരം"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth Audio LDAC Codec\nSelection ട്രിഗ്ഗര്‍ ചെയ്യുക: പ്ലേബാക്ക് ‌നിലവാരം"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"സ്ട്രീമിംഗ്: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"സ്വകാര്യ DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"സ്വകാര്യ DNS മോഡ് തിരഞ്ഞെടുക്കുക"</string>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 5b3cca6..491f20f 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth аудио сувгийн горим"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth-н аудио кодлогчийг өдөөх\nСонголт: Сувгийн горим"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Аудио LDAC Кодлогч: Тоглуулагчийн чанар"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth-н аудио LDAC кодлогчийг өдөөх\nСонголт: Тоглуулагчийн чанар"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Дамжуулж байна: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Хувийн DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Хувийн DNS Горимыг сонгох"</string>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index 142d60e..d71004b 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -59,7 +59,7 @@
     <string name="bluetooth_pairing" msgid="1426882272690346242">"जोडत आहे…"</string>
     <string name="bluetooth_connected_no_headset" msgid="616068069034994802">"कनेक्ट केले (फोन नाही)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_a2dp" msgid="3736431800395923868">"कनेक्ट केले (मीडिया नाही)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
-    <string name="bluetooth_connected_no_map" msgid="3200033913678466453">"कनेक्ट केले (संदेश अ‍ॅक्सेस नाही)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
+    <string name="bluetooth_connected_no_map" msgid="3200033913678466453">"कनेक्ट केले (मेसेज अ‍ॅक्सेस नाही)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_headset_no_a2dp" msgid="2047403011284187056">"कनेक्ट केले (फोन किंवा मीडिया नाही)<xliff:g id="ACTIVE_DEVICE">%1$s</xliff:g>"</string>
     <string name="bluetooth_connected_battery_level" msgid="5162924691231307748">"कनेक्ट केले, बॅटरी <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g><xliff:g id="ACTIVE_DEVICE">%2$s</xliff:g>"</string>
     <string name="bluetooth_connected_no_headset_battery_level" msgid="1610296229139400266">"कनेक्ट केले (फोन नाही), बॅटरी <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE">%1$s</xliff:g><xliff:g id="ACTIVE_DEVICE">%2$s</xliff:g>"</string>
@@ -76,7 +76,7 @@
     <string name="bluetooth_profile_pbap" msgid="5372051906968576809">"संपर्क सामायिकरण"</string>
     <string name="bluetooth_profile_pbap_summary" msgid="6605229608108852198">"संपर्क सामायिकरणासाठी वापरा"</string>
     <string name="bluetooth_profile_pan_nap" msgid="8429049285027482959">"इंटरनेट कनेक्शन शेअररण"</string>
-    <string name="bluetooth_profile_map" msgid="1019763341565580450">"मजकूर संदेश"</string>
+    <string name="bluetooth_profile_map" msgid="1019763341565580450">"मजकूर मेसेज"</string>
     <string name="bluetooth_profile_sap" msgid="5764222021851283125">"सिम प्रवेश"</string>
     <string name="bluetooth_profile_a2dp_high_quality" msgid="5444517801472820055">"HD ऑडिओ: <xliff:g id="CODEC_NAME">%1$s</xliff:g>"</string>
     <string name="bluetooth_profile_a2dp_high_quality_unknown_codec" msgid="8510588052415438887">"HD ऑडिओ"</string>
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ब्लूटूथ ऑडिओ चॅनेल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ब्लूटूथ ऑडिओ Codec ट्रिगर करा\nनिवड: चॅनेल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ब्लूटूथ ऑडिओ LDAC कोडेक: प्लेबॅक गुणवत्ता"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ब्लूटूथ ऑडिओ Codec ट्रिगर करा\nनिवड: प्लेबॅक गुणवत्ता"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"स्ट्रीमिंग: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"खाजगी DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"खाजगी DNS मोड निवडा"</string>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index cb2ccdb..5de4df4 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Mod Saluran Audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Cetuskan Codec Audio Bluetooth\nPilihan: Mod Saluran"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec LDAC Audio Bluetooth: Kualiti Main Balik"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Cetuskan Codec LDAC Audio Bluetooth\nPilihan: Kualiti Main Balik"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Penstriman: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS Peribadi"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Pilih Mod DNS Peribadi"</string>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 27a91f7..2079e442 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ဘလူးတုသ်အသံချန်နယ်မုဒ်"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ဘလူးတုသ် အသံ ကိုးဒက်ခ် ဖွင့်ခြင်း\nရွေးချယ်မှု- ချန်နယ်မုဒ်"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ဘလူးတုသ်အသံ LDAC ကိုးဒက်ခ်− နားထောင်ရန် အရည်အသွေး"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ဘလူးတုသ် အသံ LDAC ကိုးဒက်ခ် ဖွင့်ခြင်း\nရွေးချယ်မှု- ဖွင့်ရန် အရည်အသွေး"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"ဘလူးတုသ် အသံ LDAC ဖွင့်ခြင်း\nကိုးဒက်ခ် ရွေးချယ်မှု- ဖွင့်ရန် အရည်အသွေး"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"တိုက်ရိုက်လွှင့်နေသည်− <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"သီးသန့် DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"သီးသန့် DNS မုဒ်ကို ရွေးပါ"</string>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 9176d21..0c6e116 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Kanalmodus for Bluetooth-lyd"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Utløs kodek for Bluetooth-lyd\nValg: kanalmodus"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"LDAC-kodek for Bluetooth-lyd: avspillingskvalitet"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Utløs LDAC-kodek for Bluetooth-lyd\nValg: avspillingskvalitet"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Strømming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privat DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Velg Privat DNS-modus"</string>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index 983485e..af5f71d 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ब्लुटुथ अडियो च्यानलको मोड"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ब्लुटुथ अडियो कोडेक ट्रिगर गर्नुहोस्\nचयन: च्यानल मोड"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ब्लुटुथ अडियो LDAC कोडेक: प्लेब्याक गुणस्तर"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ब्लुटुथ अडियो LDAC कोडेक ट्रिगर गर्नुहोस्\nचयन: प्लेब्याकको गुणस्तर"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"स्ट्रिमिङ: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"निजी DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"निजी DNS मोड चयन गर्नुहोस्"</string>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index dc57bde..d5f0f99 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Kanaalmodus voor Bluetooth-audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Codec voor Bluetooth-audio activeren\nSelectie: Kanaalmodus"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"LDAC-codec voor Bluetooth-audio: afspeelkwaliteit"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"LDAC-codec voor Bluetooth-audio activeren\nSelectie: Afspeelkwaliteit"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privé-DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecteer de modus Privé-DNS"</string>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index bd5d488..6f480bd 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ବ୍ଲୁ-ଟୂଥ୍‍‌ ଅଡିଓ ଚ୍ୟାନେଲ୍‌ ମୋଡ୍"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ବ୍ଲୁ-ଟୂଥ୍‍ ଅଡିଓ କୋଡେକ୍\nସିଲେକ୍ସନ୍‌କୁ ଗତିଶୀଳ କରନ୍ତୁ: ଚ୍ୟାନେଲ୍ ମୋଡ୍"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ବ୍ଲୁ-ଟୂଥ୍‍‌ ଅଡିଓ LDAC କୋଡେକ୍‌: ପ୍ଲେବ୍ୟାକ୍‌ ଗୁଣବତ୍ତା"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ବ୍ଲୁ-ଟୂଥ୍‍ ଅଡିଓ LDAC କୋଡେକ୍\nସିଲେକ୍ସନ୍‌କୁ ଗତିଶୀଳ କରନ୍ତୁ: ପ୍ଲେବ୍ୟାକ୍ କ୍ୱାଲିଟୀ"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ଷ୍ଟ୍ରିମ୍ କରୁଛି: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ବ୍ୟକ୍ତିଗତ DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ବ୍ୟକ୍ତିଗତ DNS ମୋଡ୍‌ ବାଛନ୍ତୁ"</string>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index 0c9e1d4..3d8e256 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"ਬਲੂਟੁੱਥ ਆਡੀਓ ਚੈਨਲ ਮੋਡ"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ਬਲੂਟੁੱਥ ਆਡੀਓ ਕੋਡੇਕ\nਚੋਣ ਨੂੰ ਟ੍ਰਿਗਰ ਕਰੋ: ਚੈਨਲ ਮੋਡ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ਬਲੂਟੁੱਥ ਆਡੀਓ LDAC ਕੋਡੇਕ: ਪਲੇਬੈਕ ਕੁਆਲਿਟੀ"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ਬਲੂਟੁੱਥ ਆਡੀਓ LDAC ਕੋਡੇਕ\nਚੋਣ ਨੂੰ ਟ੍ਰਿਗਰ ਕਰੋ: ਪਲੇਬੈਕ ਕੁਆਲਿਟੀ"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ਸਟ੍ਰੀਮਿੰਗ: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ਨਿੱਜੀ DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ਨਿੱਜੀ DNS ਮੋਡ ਚੁਣੋ"</string>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index eeeb7ec..272eaff 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Dźwięk Bluetooth – tryb kanału"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Uruchom kodek dźwięku Bluetooth\nWybór: tryb kanału"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodek dźwięku Bluetooth LDAC: jakość odtwarzania"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Uruchom kodek dźwięku Bluetooth LDAC\nWybór: jakość odtwarzania"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Strumieniowe przesyłanie danych: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Prywatny DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Wybierz tryb prywatnego DNS"</string>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index c957f54..671e9a0 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal de áudio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Acionar codec de áudio Bluetooth\nSeleção: modo de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec de áudio Bluetooth LDAC: qualidade de reprodução"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Acionar codec de áudio Bluetooth LDAC\nSeleção: qualidade de reprodução"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS particular"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecione o modo DNS particular"</string>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index ad3be6d..daa2591 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal áudio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Acionar o codec de áudio Bluetooth\nSeleção: modo de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec LDAC de áudio Bluetooth: qualidade de reprodução"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Acionar o codec LDAC de áudio Bluetooth\nSeleção: qualidade de reprodução"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Acionar a seleção do codec LDAC de áudio\nBluetooth: Qualidade de reprodução"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Transmissão em fluxo contínuo: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privado"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecionar modo DNS privado"</string>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index c957f54..671e9a0 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modo de canal de áudio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Acionar codec de áudio Bluetooth\nSeleção: modo de canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec de áudio Bluetooth LDAC: qualidade de reprodução"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Acionar codec de áudio Bluetooth LDAC\nSeleção: qualidade de reprodução"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS particular"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selecione o modo DNS particular"</string>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index 45fa3ff..7d42a10 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Modul canal audio Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Declanșați codecul audio Bluetooth\nSelecție: modul Canal"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codecul LDAC audio pentru Bluetooth: calitatea redării"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Declanșați codecul LDAC audio pentru Bluetooth\nSelecție: calitatea redării"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Declanșați codecul LDAC audio pentru Bluetooth\nSelecție: calitatea redării"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Transmitere în flux: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS privat"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Selectați modul DNS privat"</string>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index 27cb94d..70ec388 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Режим аудиоканала Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Запустить аудиокодек для Bluetooth\nВыбор: режим канала"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Аудиокодек LDAC для Bluetooth: качество воспроизведения"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Запустить аудиокодек LDAC для Bluetooth\nВыбор: качество воспроизведения"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Потоковая передача: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Персональный DNS-сервер"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Выберите режим персонального DNS-сервера"</string>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 011dad8..42d0207 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"බ්ලූටූත් ශ්‍රව්‍ය නාලිකා ප්‍රකාරය"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"බ්ලූටූත් ශ්‍රව්‍ය කේතය ක්‍රියාරම්භ කරන්න\nතෝරා ගැනීම: නාලිකා ප්‍රකාරය"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"බ්ලූටූත් ශ්‍රව්‍ය LDAC පසුධාවන ගුණත්වය"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"බ්ලූටූත් ශ්‍රව්‍ය LDAC ක්‍රියාරම්භ කරන්න\nතෝරා ගැනීම: පසුධාවන ගුණත්වය"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ප්‍රවාහ කරමින්: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"පුද්ගලික DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"පුද්ගලික DNS ප්‍රකාරය තෝරන්න"</string>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index 8665c73..d50bee0 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth Audio – režim kanála"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Spustiť zvukový kodek Bluetooth\nVýber: režim kanála"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodek LDAC Bluetooth Audio: Kvalita prehrávania"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Spustiť zvukový kodek Bluetooth typu LDAC\nVýber: kvalita prehrávania"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streamovanie: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Súkromné DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Výber súkromného režimu DNS"</string>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index cae8bbd..e7d4ad7f 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Način zvočnega kanala prek Bluetootha"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Sproži zvočni kodek za Bluetooth\nIzbor: način kanala"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Zvočni kodek LDAC za Bluetooth: kakovost predvajanja"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Sproži zvočni kodek LDAC za Bluetooth\nIzbor: kakovost predvajanja"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Pretočno predvajanje: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Zasebni strežnik DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Izbira načina zasebnega strežnika DNS"</string>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index fef8acc..311b3fa 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Regjimi i kanalit Bluetooth Audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktivizo kodekun e audios me Bluetooth\nZgjedhja: Modaliteti i kanalit"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodeku LDAC i audios së Bluetooth-it: Cilësia e luajtjes"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Aktivizo kodekun LDAC të audios me Bluetooth\nZgjedhja: Cilësia e luajtjes"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Transmetimi: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS-ja private"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Zgjidh modalitetin e DNS-së private"</string>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index 7fe89f1..5603970 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Режим канала за Bluetooth аудио"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Изаберите Bluetooth аудио кодек:\n режим канала"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth аудио кодек LDAC: квалитет репродукције"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Изаберите Bluetooth аудио LDAC кодек:\n квалитет снимка"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Стримовање: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Приватни DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Изаберите режим приватног DNS-а"</string>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 18852d4..e4db922 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Kanalläge för Bluetooth-ljud"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Aktivera ljudkodek för Bluetooth\nVal: kanalläge"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth-ljud via LDAC-kodek: uppspelningskvalitet"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Aktivera Bluetooth-ljud via LDAC-kodek\nVal: uppspelningskvalitet"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Privat DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Välj läget Privat DNS"</string>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index 4924322..b124edd 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Hali ya Mkondo wa Sauti ya Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Weka Kodeki ya Sauti ya Bluetooth\nUteuzi: Hali ya Kituo"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Kodeki ya LDAC ya Sauti ya Bluetooth: Ubora wa Kucheza"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Weka Kodeki ya LDAC ya Sauti ya Bluetooth\nUteuzi: Ubora wa Video"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Kutiririsha: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS ya Faragha"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Chagua Hali ya DNS ya Faragha"</string>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index d089b80..e9e6075 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"புளூடூத் ஆடியோ சேனல் பயன்முறை"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"புளூடூத் ஆடியோ கோடெக்கைத் தொடங்கு\nதேர்வு: சேனல் பயன்முறை"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"புளூடூத் ஆடியோ LDAC கோடெக்: வீடியோவின் தரம்"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"புளூடூத் ஆடியோ LDAC கோடெக்கைத் தொடங்கு\nதேர்வு: வீடியோவின் தரம்"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ஸ்ட்ரீமிங்: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"தனிப்பட்ட DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"தனிப்பட்ட DNS பயன்முறையைத் தேர்ந்தெடுக்கவும்"</string>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index d65d3bc3..9ec0d6f 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"బ్లూటూత్ ఆడియో ఛానెల్ మోడ్"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"బ్లూటూత్ ఆడియో కోడెక్‌ని సక్రియం చేయండి\nఎంపిక: ఛానెల్ మోడ్"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"బ్లూటూత్ ఆడియో LDAC కోడెక్: ప్లేబ్యాక్ నాణ్యత"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"బ్లూటూత్ ఆడియో LDAC కోడెక్‌ని సక్రియం చేయండి\nఎంపిక: ప్లేబ్యాక్ నాణ్యత"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"ప్రసారం చేస్తోంది: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"ప్రైవేట్ DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"ప్రైవేట్ DNS మోడ్‌ను ఎంచుకోండి"</string>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index ff156ad..a9ab935 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"โหมดช่องสัญญาณเสียงบลูทูธ"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"ทริกเกอร์การเลือกตัวแปลงรหัส\nเสียงบลูทูธ: โหมดช่องสัญญาณ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"ตัวแปลงรหัสเสียงบลูทูธที่ใช้ LDAC: คุณภาพการเล่น"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"ทริกเกอร์การเลือกตัวแปลงรหัส\nเสียงบลูทูธที่ใช้ LDAC: คุณภาพการเล่น"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"สตรีมมิง: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS ส่วนตัว"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"เลือกโหมด DNS ส่วนตัว"</string>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 9473144..666fe83 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Channel Mode ng Bluetooth Audio"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"I-trigger ang Pagpili sa Audio Codec ng\nBluetooth: Channel Mode"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Audio LDAC Codec ng Bluetooth: Kalidad ng Pag-playback"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"I-trigger ang Pagpili sa Audio LDAC Codec ng\nBluetooth: Playback Quality"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Streaming: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Pribadong DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Pumili ng Pribadong DNS Mode"</string>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index b0d4c5c..fc3ecb6 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth Ses Kanalı Modu"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth Ses Codec\'i Tetikleme\nSeçimi: Kanal Modu"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Bluetooth Ses LDAC Codec\'i: Oynatma Kalitesi"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth Ses LDAC Codec\'i Tetikleme\nSeçimi: Oynatma Kalitesi"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Akış: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Gizli DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Gizli DNS Modunu Seçin"</string>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index f3e9bcb..b8133e5 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Режим каналу для аудіо Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Активувати кодек для аудіо Bluetooth\nВибір: режим каналу"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Кодек для аудіо Bluetooth LDAC: якість відтворення"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Активувати кодек для аудіо Bluetooth LDAC\nВибір: якість відтворення"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Трансляція: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Приватна DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Виберіть режим \"Приватна DNS\""</string>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index 32737a7f..28c72f7 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"بلوٹوتھ آڈیو چینل موڈ"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"بلوٹوتھ آڈیو کوڈیک کو ٹریگر کریں\nانتخاب: چینل موڈ"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"‏بلوٹوتھ آڈیو LDAC کوڈیک: پلے بیک کا معیار"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"‏بلوٹوتھ آڈیو LDAC کوڈیک کو ٹریگر کریں\nانتخاب: پلے بیک کا معیار"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"سلسلہ بندی: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"‏نجی DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"‏نجی DNS وضع منتخب کریں"</string>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index cb19229..9fd9cf5 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Bluetooth audio kanali rejimi"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Bluetooth orqali uzatish uchun audiokodek\nTanlash: kanal rejimi"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"LDAC audiokodeki bilan ijro etish sifati (Bluetooth orqali)"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Bluetooth orqali uzatish uchun LDAC audiokodeki\nTanlash: ijro etish sifati"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Translatsiya: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"Shaxsiy DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Shaxsiy DNS rejimini tanlang"</string>
@@ -431,7 +432,7 @@
     <string name="ims_reg_status_registered" msgid="933003316932739188">"Registratsiya qilingan"</string>
     <string name="ims_reg_status_not_registered" msgid="6529783773485229486">"Registratsiya qilinmagan"</string>
     <string name="status_unavailable" msgid="7862009036663793314">"Mavjud emas"</string>
-    <string name="wifi_status_mac_randomized" msgid="5589328382467438245">"MAC tasodifiy tanlandi"</string>
+    <string name="wifi_status_mac_randomized" msgid="5589328382467438245">"Tasodifiy MAC manzil"</string>
     <plurals name="wifi_tether_connected_summary" formatted="false" msgid="3871603864314407780">
       <item quantity="other">%1$d ta qurilma ulangan</item>
       <item quantity="one">%1$d ta qurilma ulangan</item>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index aeba035..92282dd 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Chế độ kênh âm thanh Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Kích hoạt chế độ chọn codec\nâm thanh Bluetooth: Chế độ kênh"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"Codec LDAC âm thanh Bluetooth: Chất lượng phát lại"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Kích hoạt chế độ chọn codec LDAC\nâm thanh Bluetooth: Chất lượng phát"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Truyền trực tuyến: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"DNS riêng"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Chọn chế độ DNS riêng"</string>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index de6ad17..2a3b82e 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"蓝牙音频声道模式"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"触发蓝牙音频编解码器\n选择:声道模式"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"蓝牙音频 LDAC 编解码器:播放质量"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"触发蓝牙音频 LDAC 编解码器\n选择:播放质量"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"正在流式传输:<xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"私人 DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"选择私人 DNS 模式"</string>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 4117035..c2a8c34 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"藍牙音訊聲道模式"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"觸發藍牙音訊編解碼器\n選項:聲道模式"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"藍牙音訊 LDAC 編解碼器:播放品質"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"觸發藍牙音訊 LDAC 編解碼器\n選項:播放品質"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"正在串流:<xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"不公開的網域名稱系統 (DNS)"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"選取不公開的網域名稱系統 (DNS) 模式"</string>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index d1fae07..477395d 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -224,7 +224,8 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"藍牙音訊聲道模式"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"觸發藍牙音訊轉碼器\n選項:聲道模式"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"藍牙音訊 LDAC 轉碼器:播放品質"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"觸發藍牙音訊 LDAC 轉碼器\n選項:播放品質"</string>
+    <!-- no translation found for bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title (6893955536658137179) -->
+    <skip />
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"串流中:<xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"私人 DNS"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"選取私人 DNS 模式"</string>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index 92c44f6..6784b34 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -224,7 +224,7 @@
     <string name="bluetooth_select_a2dp_codec_channel_mode" msgid="884855779449390540">"Imodi yesiteshi somsindo we-Bluetooth"</string>
     <string name="bluetooth_select_a2dp_codec_channel_mode_dialog_title" msgid="7234956835280563341">"Qalisa i-codec ye-bluetooth yomsindo\nUkukhethwa: Imodi yesiteshi"</string>
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality" msgid="3619694372407843405">"I-Bluetooth Audio LDAC Codec: Ikhwalithi yokudlala"</string>
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="7595776220458732825">"Qalisa i-codec ye-bluetooth yomsindo we-LDAC\nUkukhethwa: Ikhwalithi yokudlalwa"</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title" msgid="6893955536658137179">"Cupha ukhetho lwe-Bluetooth Audio LDAC\nCodec: Ikhwalithi yokudlala"</string>
     <string name="bluetooth_select_a2dp_codec_streaming_label" msgid="5347862512596240506">"Ukusakaza: <xliff:g id="STREAMING_PARAMETER">%1$s</xliff:g>"</string>
     <string name="select_private_dns_configuration_title" msgid="3700456559305263922">"I-DNS eyimfihlo"</string>
     <string name="select_private_dns_configuration_dialog_title" msgid="9221994415765826811">"Khetha imodi ye-DNS eyimfihlo"</string>
diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml
index cfcecbc..59e5cfb 100644
--- a/packages/SettingsLib/res/values/arrays.xml
+++ b/packages/SettingsLib/res/values/arrays.xml
@@ -250,19 +250,6 @@
         <item>Best Effort (Adaptive Bit Rate)</item>
     </string-array>
 
-    <!-- TODO: Enable for translation per b/73007419 -->
-    <!-- Summaries for Bluetooth Audio Active Device status. [CHAR LIMIT=50]-->
-    <string-array name="bluetooth_audio_active_device_summaries" translatable="false" >
-        <!-- Status message when the device is not Active. -->
-        <item></item>
-        <!-- Status message when the device is Active for Media and Phone. -->
-        <item>, active</item>
-        <!-- Status message when the device is Active for Media only. -->
-        <item>, active(media)</item>
-        <!-- Status message when the device is Active for Phone only. -->
-        <item>, active(phone)</item>
-    </string-array>
-
     <!-- Titles for logd limit size selection preference. [CHAR LIMIT=14] -->
     <string-array name="select_logd_size_titles">
         <item>Off</item>
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 50c9b5c..a46c3e6 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -566,7 +566,7 @@
     <!-- UI debug setting: Trigger Bluetooth Audio LDAC Playback Quality Selection -->
     <string name="bluetooth_select_a2dp_codec_ldac_playback_quality">Bluetooth Audio LDAC Codec: Playback Quality</string>
     <!-- UI debug setting: Select Bluetooth Audio LDAC Codec: LDAC Playback Quality -->
-    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title">Trigger Bluetooth Audio LDAC Codec\u000ASelection: Playback Quality</string>
+    <string name="bluetooth_select_a2dp_codec_ldac_playback_quality_dialog_title">Trigger Bluetooth Audio LDAC\u000ACodec Selection: Playback Quality</string>
 
     <!-- [CHAR LIMIT=NONE] Label for displaying Bluetooth Audio Codec Parameters while streaming -->
     <string name="bluetooth_select_a2dp_codec_streaming_label">Streaming: <xliff:g id="streaming_parameter">%1$s</xliff:g></string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java b/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java
index b98f27e..f14def1 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/EnableZenModeDialog.java
@@ -185,6 +185,7 @@
     @VisibleForTesting
     protected void bind(final Condition condition, final View row, final int rowId) {
         if (condition == null) throw new IllegalArgumentException("condition must not be null");
+
         final boolean enabled = condition.state == Condition.STATE_TRUE;
         final ConditionTag tag = row.getTag() != null ? (ConditionTag) row.getTag() :
                 new ConditionTag();
@@ -207,7 +208,6 @@
                     MetricsLogger.action(mContext,
                             MetricsProto.MetricsEvent.QS_DND_CONDITION_SELECT);
                     updateAlarmWarningText(tag.condition);
-                    announceConditionSelection(tag);
                 }
             }
         });
@@ -328,6 +328,7 @@
             boolean enabled, int rowId, Uri conditionId) {
         if (tag.lines == null) {
             tag.lines = row.findViewById(android.R.id.content);
+            tag.lines.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_POLITE);
         }
         if (tag.line1 == null) {
             tag.line1 = (TextView) row.findViewById(android.R.id.text1);
@@ -450,16 +451,6 @@
         bind(newCondition, row, rowId);
         updateAlarmWarningText(tag.condition);
         tag.rb.setChecked(true);
-        announceConditionSelection(tag);
-    }
-
-    private void announceConditionSelection(ConditionTag tag) {
-        // condition will always be priority-only
-        String modeText = mContext.getString(R.string.zen_interruption_level_priority);
-        if (tag.line1 != null) {
-            mZenRadioGroupContent.announceForAccessibility(mContext.getString(
-                    R.string.zen_mode_and_condition, modeText, tag.line1.getText()));
-        }
     }
 
     private void updateAlarmWarningText(Condition condition) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java b/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
index 7369ba8..adf49aa 100644
--- a/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/ZenDurationDialog.java
@@ -203,8 +203,14 @@
 
 
     private void setupUi(ConditionTag tag, View row) {
-        tag.lines = row.findViewById(android.R.id.content);
-        tag.line1 = (TextView) row.findViewById(android.R.id.text1);
+        if (tag.lines == null) {
+            tag.lines = row.findViewById(android.R.id.content);
+            tag.lines.setAccessibilityLiveRegion(View.ACCESSIBILITY_LIVE_REGION_POLITE);
+        }
+
+        if (tag.line1 == null) {
+            tag.line1 = (TextView) row.findViewById(android.R.id.text1);
+        }
 
         // text2 is not used in zen duration dialog
         row.findViewById(android.R.id.text2).setVisibility(View.GONE);
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index 1d3e521..32aafea 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -2935,7 +2935,7 @@
         }
 
         private final class UpgradeController {
-            private static final int SETTINGS_VERSION = 164;
+            private static final int SETTINGS_VERSION = 165;
 
             private final int mUserId;
 
@@ -3710,17 +3710,7 @@
                 }
 
                 if (currentVersion == 162) {
-                    // Version 162: Add a gesture for silencing phones
-                    final SettingsState settings = getGlobalSettingsLocked();
-                    final Setting currentSetting = settings.getSettingLocked(
-                            Global.SHOW_ZEN_UPGRADE_NOTIFICATION);
-                    if (!currentSetting.isNull()
-                            && TextUtils.equals("0", currentSetting.getValue())) {
-                        settings.insertSettingLocked(
-                                Global.SHOW_ZEN_UPGRADE_NOTIFICATION, "1",
-                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
-                    }
-
+                    // Version 162: REMOVED: Add a gesture for silencing phones
                     currentVersion = 163;
                 }
 
@@ -3742,6 +3732,21 @@
                     currentVersion = 164;
                 }
 
+                if (currentVersion == 164) {
+                    // Version 164: Add a gesture for silencing phones
+                    final SettingsState settings = getGlobalSettingsLocked();
+                    final Setting currentSetting = settings.getSettingLocked(
+                            Global.SHOW_ZEN_UPGRADE_NOTIFICATION);
+                    if (!currentSetting.isNull()
+                            && TextUtils.equals("0", currentSetting.getValue())) {
+                        settings.insertSettingLocked(
+                                Global.SHOW_ZEN_UPGRADE_NOTIFICATION, "1",
+                                null, true, SettingsState.SYSTEM_PACKAGE_NAME);
+                    }
+
+                    currentVersion = 165;
+                }
+
                 // vXXX: Add new settings above this point.
 
                 if (currentVersion != newVersion) {
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 9573b81..88edd12 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -208,6 +208,9 @@
     <!-- to read and change hvac values in a car -->
     <uses-permission android:name="android.car.permission.CONTROL_CAR_CLIMATE" />
 
+    <!-- Permission necessary to change car audio volume through CarAudioManager -->
+    <uses-permission android:name="android.car.permission.CAR_CONTROL_AUDIO_VOLUME" />
+
     <application
         android:name=".SystemUIApplication"
         android:persistent="true"
@@ -608,5 +611,6 @@
                 <action android:name="com.android.intent.action.SHOW_KEYBOARD_SHORTCUTS" />
             </intent-filter>
         </receiver>
+
     </application>
 </manifest>
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
index 9fdb00e..11bd98f 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_password_view.xml
@@ -49,6 +49,7 @@
          <EditText android:id="@+id/passwordEntry"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
+             android:contentDescription="@string/keyguard_accessibility_password"
              android:gravity="center_horizontal"
              android:singleLine="true"
              android:textStyle="normal"
diff --git a/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml b/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
index 3193101..87983b9 100644
--- a/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
+++ b/packages/SystemUI/res-keyguard/layout/keyguard_presentation.xml
@@ -20,39 +20,54 @@
 <!-- This is a view that shows general status information in Keyguard. -->
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/res-auto"
     android:id="@+id/presentation"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-
+    <!-- This is mostly keyguard_status_view.xml with minor modifications -->
     <com.android.keyguard.KeyguardStatusView
         android:id="@+id/clock"
         android:orientation="vertical"
-        android:layout_width="wrap_content"
+        android:layout_width="410dp"
         android:layout_height="wrap_content">
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal|top"
-            android:orientation="vertical"
-            android:focusable="true">
-            <TextClock
-                android:id="@+id/clock_view"
-                android:layout_width="wrap_content"
+            android:orientation="vertical">
+            <RelativeLayout
+                android:id="@+id/keyguard_clock_container"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center_horizontal|top"
-                android:textColor="?attr/wallpaperTextColor"
-                android:singleLine="true"
-                style="@style/widget_big_thin"
-                android:format12Hour="@string/keyguard_widget_12_hours_format"
-                android:format24Hour="@string/keyguard_widget_24_hours_format"
-                android:baselineAligned="true" />
-
-            <include layout="@layout/keyguard_status_area" />
+                android:layout_gravity="center_horizontal|top">
+                <TextClock
+                    android:id="@+id/clock_view"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_horizontal"
+                    android:layout_centerHorizontal="true"
+                    android:layout_alignParentTop="true"
+                    android:letterSpacing="0.03"
+                    android:textColor="?attr/wallpaperTextColor"
+                    android:singleLine="true"
+                    style="@style/widget_big_thin"
+                    android:format12Hour="@string/keyguard_widget_12_hours_format"
+                    android:format24Hour="@string/keyguard_widget_24_hours_format" />
+                <View
+                    android:id="@+id/clock_separator"
+                    android:layout_width="@dimen/widget_separator_width"
+                    android:layout_height="@dimen/widget_separator_thickness"
+                    android:layout_below="@id/clock_view"
+                    android:background="#f00"
+                    android:layout_centerHorizontal="true" />
+                <include layout="@layout/keyguard_status_area"
+                         android:id="@+id/keyguard_status_area"
+                         android:layout_width="match_parent"
+                         android:layout_height="wrap_content"
+                         android:layout_below="@id/clock_separator" />
+            </RelativeLayout>
             <ImageView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dip"
+                android:layout_marginTop="@dimen/widget_vertical_padding"
                 android:layout_gravity="center_horizontal"
                 android:src="@drawable/kg_security_lock_normal" />
         </LinearLayout>
diff --git a/packages/SystemUI/res-keyguard/values-ar/strings.xml b/packages/SystemUI/res-keyguard/values-ar/strings.xml
index 575b8be..7a46e34 100644
--- a/packages/SystemUI/res-keyguard/values-ar/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-ar/strings.xml
@@ -89,7 +89,7 @@
     <string name="kg_login_too_many_attempts" msgid="6604574268387867255">"محاولات النقش كثيرة جدًا"</string>
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8637788033282252027">"لقد كتبت رقم التعريف الشخصي بشكل غير صحيح <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="7724148763268377734">"لقد كتبت كلمة المرور بشكل غير صحيح <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="4820967667848302092">"لقد رسمت نقش إلغاء التأمين بطريقة غير صحيحة <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="4820967667848302092">"لقد رسمت نقش فتح القفل بطريقة غير صحيحة <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. \n\nأعد المحاولة خلال <xliff:g id="NUMBER_1">%2$d</xliff:g> ثانية."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="tablet" msgid="1629351522209932316">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> محاولة غير ناجحة أخرى، ستتم إعادة تعيين هذا الجهاز، ومن ثم يتم حذف جميع بياناته."</string>
     <string name="kg_failed_attempts_almost_at_wipe" product="default" msgid="3921998703529189931">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> محاولة غير ناجحة أخرى، ستتم إعادة تعيين هذا الهاتف، ومن ثم يتم حذف جميع بياناته."</string>
     <string name="kg_failed_attempts_now_wiping" product="tablet" msgid="4694232971224663735">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER">%d</xliff:g> مرة. ستتم إعادة تعيين هذا الجهاز، ومن ثم يتم حذف جميع بياناته."</string>
@@ -102,8 +102,8 @@
     <string name="kg_failed_attempts_almost_at_erase_profile" product="default" msgid="2162434417489128282">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد <xliff:g id="NUMBER_1">%2$d</xliff:g> محاولة غير ناجحة أخرى، ستتم إزالة الملف الشخصي للعمل، ومن ثم يتم حذف جميع بيانات الملف الشخصي."</string>
     <string name="kg_failed_attempts_now_erasing_profile" product="tablet" msgid="8966727588974691544">"أخطأت في محاولة إلغاء قفل الجهاز اللوحي <xliff:g id="NUMBER">%d</xliff:g> مرة. ستتم إزالة الملف الشخصي للعمل، ومن ثم يتم حذف جميع بياناته."</string>
     <string name="kg_failed_attempts_now_erasing_profile" product="default" msgid="8476407539834855">"أخطأت في محاولة إلغاء قفل الهاتف <xliff:g id="NUMBER">%d</xliff:g> مرة. ستتم إزالة الملف الشخصي للعمل، ومن ثم يتم حذف جميع بياناته."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="956706236554092172">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
-    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="8364140853305528449">"لقد رسمت نقش إلغاء التأمين بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="956706236554092172">"لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستطالَب بإلغاء تأمين الجهاز اللوحي باستخدام معلومات حساب بريد إلكتروني.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
+    <string name="kg_failed_attempts_almost_at_login" product="default" msgid="8364140853305528449">"لقد رسمت نقش فتح القفل بشكل غير صحيح <xliff:g id="NUMBER_0">%1$d</xliff:g> مرة. بعد إجراء <xliff:g id="NUMBER_1">%2$d</xliff:g> من المحاولات غير الناجحة الأخرى، ستُطالب بإلغاء تأمين الهاتف باستخدام حساب بريد إلكتروني لإلغاء تأمين الهاتف.\n\n أعد المحاولة خلال <xliff:g id="NUMBER_2">%3$d</xliff:g> ثانية."</string>
     <string name="kg_password_wrong_pin_code_pukked" msgid="3389829202093674267">"‏رمز \"رقم التعريف الشخصي\" لشريحة SIM غير صحيح، ويلزمك الاتصال الآن بمشغّل شبكة الجوّال لإلغاء قفل الجهاز."</string>
     <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="4314341367727055967">
       <item quantity="zero">‏رمز رقم التعريف الشخصي لشريحة SIM غير صحيح، ولم تتبق لديك أي محاولات (<xliff:g id="NUMBER_1">%d</xliff:g>).</item>
diff --git a/packages/SystemUI/res-keyguard/values-da/strings.xml b/packages/SystemUI/res-keyguard/values-da/strings.xml
index faec3e4..26e7b0b 100644
--- a/packages/SystemUI/res-keyguard/values-da/strings.xml
+++ b/packages/SystemUI/res-keyguard/values-da/strings.xml
@@ -21,13 +21,13 @@
 <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="3171996292755059205">"Nøglebeskyttelse"</string>
-    <string name="keyguard_password_enter_pin_code" msgid="3420548423949593123">"Indtast pinkoden"</string>
-    <string name="keyguard_password_enter_puk_code" msgid="670683628782925409">"Indtast PUK-koden og den nye pinkode til SIM-kortet"</string>
+    <string name="keyguard_password_enter_pin_code" msgid="3420548423949593123">"Angiv pinkoden"</string>
+    <string name="keyguard_password_enter_puk_code" msgid="670683628782925409">"Angiv PUK-koden og den nye pinkode til SIM-kortet"</string>
     <string name="keyguard_password_enter_puk_prompt" msgid="3747778500166059332">"PUK-kode til SIM-kort"</string>
     <string name="keyguard_password_enter_pin_prompt" msgid="8188243197504453830">"Ny pinkode til SIM-kortet"</string>
     <string name="keyguard_password_entry_touch_hint" msgid="5790410752696806482"><font size="17">"Tryk for at angive adgangskode"</font></string>
-    <string name="keyguard_password_enter_password_code" msgid="595980919238127672">"Indtast adgangskoden for at låse op"</string>
-    <string name="keyguard_password_enter_pin_password_code" msgid="7504123374204446086">"Indtast pinkoden for at låse op"</string>
+    <string name="keyguard_password_enter_password_code" msgid="595980919238127672">"Angiv adgangskoden for at låse op"</string>
+    <string name="keyguard_password_enter_pin_password_code" msgid="7504123374204446086">"Angiv pinkoden for at låse op"</string>
     <string name="keyguard_enter_your_pin" msgid="7152989016739952871">"Angiv din pinkode"</string>
     <string name="keyguard_enter_your_pattern" msgid="3915717164691787047">"Angiv dit mønster"</string>
     <string name="keyguard_enter_your_password" msgid="5761514484663983731">"Angiv din adgangskode"</string>
@@ -71,16 +71,16 @@
     <string name="kg_sim_pin_instructions" msgid="6389000973113699187">"Angiv pinkoden til SIM-kortet."</string>
     <string name="kg_sim_pin_instructions_multi" msgid="1643757228644271861">"Angiv pinkoden til SIM-kortet fra \"<xliff:g id="CARRIER">%1$s</xliff:g>\"."</string>
     <string name="kg_sim_lock_esim_instructions" msgid="4416732549172148542">"<xliff:g id="PREVIOUS_MSG">%1$s</xliff:g> Deaktiver eSIM for at bruge enheden uden mobiltjeneste."</string>
-    <string name="kg_pin_instructions" msgid="4069609316644030034">"Indtast pinkode"</string>
+    <string name="kg_pin_instructions" msgid="4069609316644030034">"Angiv pinkode"</string>
     <string name="kg_password_instructions" msgid="136952397352976538">"Angiv adgangskode"</string>
-    <string name="kg_puk_enter_puk_hint" msgid="2288964170039899277">"SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
-    <string name="kg_puk_enter_puk_hint_multi" msgid="1373131883510840794">"SIM-kortet fra \"<xliff:g id="CARRIER">%1$s</xliff:g>\" er nu deaktiveret. Indtast PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
-    <string name="kg_puk_enter_pin_hint" msgid="3137789674920391087">"Indtast den ønskede pinkode"</string>
+    <string name="kg_puk_enter_puk_hint" msgid="2288964170039899277">"SIM-kortet er nu deaktiveret. Angiv PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
+    <string name="kg_puk_enter_puk_hint_multi" msgid="1373131883510840794">"SIM-kortet fra \"<xliff:g id="CARRIER">%1$s</xliff:g>\" er nu deaktiveret. Angiv PUK-koden for at fortsætte. Kontakt mobilselskabet for at få flere oplysninger."</string>
+    <string name="kg_puk_enter_pin_hint" msgid="3137789674920391087">"Angiv den ønskede pinkode"</string>
     <string name="kg_enter_confirm_pin_hint" msgid="3089485999116759671">"Bekræft den ønskede pinkode"</string>
     <string name="kg_sim_unlock_progress_dialog_message" msgid="4471738151810900114">"Låser SIM-kortet op…"</string>
-    <string name="kg_invalid_sim_pin_hint" msgid="3057533256729513335">"Indtast en pinkode på mellem 4 og 8 tal."</string>
+    <string name="kg_invalid_sim_pin_hint" msgid="3057533256729513335">"Angiv en pinkode på mellem 4 og 8 tal."</string>
     <string name="kg_invalid_sim_puk_hint" msgid="6003602401368264144">"PUK-koden skal være på 8 tal eller mere."</string>
-    <string name="kg_invalid_puk" msgid="5399287873762592502">"Indtast den korrekte PUK-kode. Gentagne forsøg deaktiverer permanent SIM-kortet."</string>
+    <string name="kg_invalid_puk" msgid="5399287873762592502">"Angiv den korrekte PUK-kode. Gentagne forsøg deaktiverer permanent SIM-kortet."</string>
     <string name="kg_invalid_confirm_pin_hint" product="default" msgid="5672736555427444330">"Pinkoderne stemmer ikke overens"</string>
     <string name="kg_login_too_many_attempts" msgid="6604574268387867255">"Du har brugt for mange forsøg på at tegne mønsteret korrekt"</string>
     <string name="kg_too_many_failed_pin_attempts_dialog_message" msgid="8637788033282252027">"Du har indtastet en forkert pinkode <xliff:g id="NUMBER_0">%1$d</xliff:g> gange. \n\nPrøv igen om <xliff:g id="NUMBER_1">%2$d</xliff:g> sekunder."</string>
@@ -145,7 +145,7 @@
       <item quantity="other">Angiv pinkoden til SIM-kortet. Du har <xliff:g id="NUMBER_1">%d</xliff:g> forsøg tilbage.</item>
     </plurals>
     <plurals name="kg_password_default_puk_message" formatted="false" msgid="8744416410184198352">
-      <item quantity="one">SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Du har <xliff:g id="_NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt. Kontakt dit mobilselskab for at få flere oplysninger.</item>
-      <item quantity="other">SIM-kortet er nu deaktiveret. Indtast PUK-koden for at fortsætte. Du har <xliff:g id="_NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt. Kontakt dit mobilselskab for at få flere oplysninger.</item>
+      <item quantity="one">SIM-kortet er nu deaktiveret. Angiv PUK-koden for at fortsætte. Du har <xliff:g id="_NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt. Kontakt dit mobilselskab for at få flere oplysninger.</item>
+      <item quantity="other">SIM-kortet er nu deaktiveret. Angiv PUK-koden for at fortsætte. Du har <xliff:g id="_NUMBER_1">%d</xliff:g> forsøg tilbage, før SIM-kortet bliver permanent ubrugeligt. Kontakt dit mobilselskab for at få flere oplysninger.</item>
     </plurals>
 </resources>
diff --git a/packages/SystemUI/res-keyguard/values/dimens.xml b/packages/SystemUI/res-keyguard/values/dimens.xml
index 712b6e5..d628ca8 100644
--- a/packages/SystemUI/res-keyguard/values/dimens.xml
+++ b/packages/SystemUI/res-keyguard/values/dimens.xml
@@ -77,7 +77,7 @@
     <dimen name="password_char_padding">8dp</dimen>
 
     <!-- The vertical margin between the date and the owner info. -->
-    <dimen name="date_owner_info_margin">2dp</dimen>
+    <dimen name="date_owner_info_margin">4dp</dimen>
 
     <!-- The translation for disappearing security views after having solved them. -->
     <dimen name="disappear_y_translation">-32dp</dimen>
diff --git a/packages/SystemUI/res-keyguard/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml
index ed63089..513d848 100644
--- a/packages/SystemUI/res-keyguard/values/strings.xml
+++ b/packages/SystemUI/res-keyguard/values/strings.xml
@@ -120,6 +120,9 @@
 
     <!-- Accessibility description of the PIN password view. [CHAR_LIMIT=none] -->
     <string name="keyguard_accessibility_pin_area">PIN area</string>
+    <!-- Accessibility description of the normal password view. [CHAR_LIMIT=none] -->
+    <string name="keyguard_accessibility_password">Device password</string>
+
     <!-- Accessibility description of the SIM PIN password view. [CHAR_LIMIT=none] -->
     <string name="keyguard_accessibility_sim_pin_area">SIM PIN area</string>
     <!-- Accessibility description of the SIM PUK password view. [CHAR_LIMIT=none] -->
diff --git a/packages/SystemUI/res/drawable/car_ic_notification_2.xml b/packages/SystemUI/res/drawable/car_ic_notification_2.xml
deleted file mode 100644
index c74ae15..0000000
--- a/packages/SystemUI/res/drawable/car_ic_notification_2.xml
+++ /dev/null
@@ -1,31 +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
-  -->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
-    android:width="32dp"
-    android:height="38dp"
-    android:viewportWidth="32"
-    android:viewportHeight="38" >
-  <group
-      android:translateX="-6"
-      android:translateY="-3">
-    <path
-        android:pathData="M26.6195649,6.98115478 C31.5083629,8.85235985 34.9817444,13.6069337 34.9817444,19.1767606 L34.9817444,27.9542254 L38,27.9542254 L38,34.2161972 L6,34.2161972 L6,27.9542254 L9.01825558,27.9542254 L9.01825558,19.1767606 C9.01825558,13.6069337 12.4916371,8.85235985 17.3804351,6.98115478 C17.723241,4.726863 19.6609451,3 22,3 C24.3390549,3 26.276759,4.726863 26.6195649,6.98115478 Z M17.326572,36.3035211 L26.673428,36.3035211 C26.673428,38.8973148 24.581063,41 22,41 C19.418937,41 17.326572,38.8973148 17.326572,36.3035211 Z"
-        android:strokeColor="#00000000"
-        android:fillType="evenOdd"
-        android:fillColor="@color/car_grey_50" />
-  </group>
-</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_memory.xml b/packages/SystemUI/res/drawable/ic_memory.xml
new file mode 100644
index 0000000..ada36c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_memory.xml
@@ -0,0 +1,28 @@
+<!--
+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.
+-->
+<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:pathData="M16.0,5.0l-8.0,0.0l0.0,14.0l8.0,0.0z"
+        android:fillAlpha="0.5"
+        android:fillColor="#000000"/>
+    <path
+        android:pathData="M6,9 L6,7 L4,7 L4,5 L6,5 C6,3.9 6.9,3 8,3 L16,3 C17.1,3 18,3.9 18,5 L20,5 L20,7 L18,7 L18,9 L20,9 L20,11 L18,11 L18,13 L20,13 L20,15 L18,15 L18,17 L20,17 L20,19 L18,19 C18,20.1 17.1,21 16,21 L8,21 C6.9,21 6,20.1 6,19 L4,19 L4,17 L6,17 L6,15 L4,15 L4,13 L6,13 L6,11 L4,11 L4,9 L6,9 Z M16,19 L16,5 L8,5 L8,19 L16,19 Z"
+        android:fillColor="#000000"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/smart_reply_button_background.xml b/packages/SystemUI/res/drawable/smart_reply_button_background.xml
index c464ba6..93adaa0 100644
--- a/packages/SystemUI/res/drawable/smart_reply_button_background.xml
+++ b/packages/SystemUI/res/drawable/smart_reply_button_background.xml
@@ -21,9 +21,9 @@
     <item>
         <inset
             android:insetLeft="0dp"
-            android:insetTop="7dp"
+            android:insetTop="8dp"
             android:insetRight="0dp"
-            android:insetBottom="5dp">
+            android:insetBottom="8dp">
             <shape android:shape="rectangle">
                 <corners android:radius="8dp" />
                 <stroke android:width="1dp" android:color="@color/smart_reply_button_stroke" />
diff --git a/packages/SystemUI/res/layout/app_ops_info.xml b/packages/SystemUI/res/layout/app_ops_info.xml
index 74a4c6e..676301e 100644
--- a/packages/SystemUI/res/layout/app_ops_info.xml
+++ b/packages/SystemUI/res/layout/app_ops_info.xml
@@ -21,6 +21,8 @@
         android:layout_height="wrap_content"
         android:id="@+id/app_ops_info"
         android:clickable="true"
+        android:clipChildren="false"
+        android:clipToPadding="false"
         android:orientation="vertical"
         android:paddingStart="@*android:dimen/notification_content_margin_start"
         android:paddingEnd="@*android:dimen/notification_content_margin_end"
@@ -63,10 +65,10 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal"
         android:layout_marginTop="@dimen/notification_guts_button_spacing"
         android:layout_marginBottom="@dimen/notification_guts_button_spacing"
-        android:gravity="end" >
+        android:gravity="end"
+        android:orientation="horizontal">
 
         <TextView
             android:id="@+id/settings"
diff --git a/packages/SystemUI/res/layout/menu_ime.xml b/packages/SystemUI/res/layout/menu_ime.xml
index 5a0e767..1be3375 100644
--- a/packages/SystemUI/res/layout/menu_ime.xml
+++ b/packages/SystemUI/res/layout/menu_ime.xml
@@ -16,6 +16,7 @@
 
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:systemui="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/menu_container"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     >
diff --git a/packages/SystemUI/res/layout/notification_info.xml b/packages/SystemUI/res/layout/notification_info.xml
index b1cb6cf..88d19f4 100644
--- a/packages/SystemUI/res/layout/notification_info.xml
+++ b/packages/SystemUI/res/layout/notification_info.xml
@@ -16,25 +16,25 @@
 -->
 
 <com.android.systemui.statusbar.NotificationInfo
-        xmlns:android="http://schemas.android.com/apk/res/android"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:id="@+id/notification_guts"
-        android:clickable="true"
-        android:orientation="vertical"
-        android:paddingStart="@*android:dimen/notification_content_margin_start"
-        android:paddingEnd="@*android:dimen/notification_content_margin_end"
-        android:background="@color/notification_guts_bg_color"
-        android:theme="@*android:style/Theme.DeviceDefault.Light">
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/notification_guts"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:clickable="true"
+    android:clipChildren="false"
+    android:clipToPadding="false"
+    android:orientation="vertical"
+    android:background="@color/notification_guts_bg_color"
+    android:theme="@*android:style/Theme.DeviceDefault.Light">
 
     <!-- Package Info -->
     <RelativeLayout
         android:id="@+id/header"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_marginStart="@*android:dimen/notification_content_margin_start"
         android:clipChildren="false"
-        android:clipToPadding="false"
-        android:layout_marginTop="2dp" >
+        android:clipToPadding="false">
         <ImageView
             android:id="@+id/pkgicon"
             android:layout_width="@dimen/notification_guts_header_height"
@@ -72,18 +72,18 @@
             android:maxLines="1"
             android:layout_centerVertical="true"
             android:layout_toEndOf="@id/pkg_group_divider" />
+        <!-- 24 dp icon with 16 dp padding all around to mirror notification content margins -->
         <ImageButton
             android:id="@+id/info"
-            android:src="@drawable/ic_info"
-            android:tint="?android:attr/colorAccent"
-            android:layout_width="48dp"
-            android:layout_height="48dp"
-            android:padding="12dp"
-            android:layout_marginEnd="-12dp"
+            android:layout_width="56dp"
+            android:layout_height="56dp"
+            android:layout_alignParentEnd="true"
             android:layout_centerVertical="true"
-            android:contentDescription="@string/notification_more_settings"
             android:background="@drawable/ripple_drawable"
-            android:layout_alignParentEnd="true" />
+            android:contentDescription="@string/notification_more_settings"
+            android:padding="16dp"
+            android:src="@drawable/ic_info"
+            android:tint="?android:attr/colorAccent" />
     </RelativeLayout>
 
     <LinearLayout
@@ -91,13 +91,16 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginBottom="@dimen/notification_guts_button_spacing"
-        android:layout_marginTop="@*android:dimen/notification_header_padding_top"
+        android:clipChildren="false"
+        android:clipToPadding="false"
         android:orientation="vertical">
 
         <!-- Channel Info Block -->
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginStart="@*android:dimen/notification_content_margin_start"
+            android:layout_marginEnd="@*android:dimen/notification_content_margin_start"
             android:orientation="vertical">
             <!-- Channel Name -->
             <TextView
@@ -105,23 +108,24 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
-                android:layout_marginBottom="6dp"
-                style="@style/TextAppearance.NotificationInfo.Primary" />
+                style="@android:style/TextAppearance.Material.Notification.Title" />
             <!-- Question prompt -->
             <TextView
                 android:id="@+id/block_prompt"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                style="@style/TextAppearance.NotificationInfo.Secondary" />
+                style="@android:style/TextAppearance.Material.Notification" />
         </LinearLayout>
 
         <!-- Settings and Done buttons -->
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:orientation="horizontal"
             android:layout_marginTop="@dimen/notification_guts_button_spacing"
-            android:gravity="end" >
+            android:layout_marginStart="@dimen/notification_guts_button_side_margin"
+            android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
+            android:gravity="end"
+            android:orientation="horizontal">
 
             <!-- Optional link to app. Only appears if the channel is not disabled and the app
             asked for it -->
@@ -139,19 +143,21 @@
                 android:text="@string/inline_stop_button"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
                 style="@style/TextAppearance.NotificationInfo.Button"/>
             <TextView
                 android:id="@+id/minimize"
                 android:text="@string/inline_minimize_button"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
                 style="@style/TextAppearance.NotificationInfo.Button" />
             <TextView
                 android:id="@+id/keep"
                 android:text="@string/inline_keep_button"
                 android:layout_width="wrap_content"
                 android:layout_height="match_parent"
-                android:layout_marginEnd="-8dp"
+                android:layout_marginStart="@dimen/notification_guts_button_horizontal_spacing"
                 style="@style/TextAppearance.NotificationInfo.Button"/>
         </LinearLayout>
     </LinearLayout>
@@ -160,22 +166,25 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginBottom="@dimen/notification_guts_button_spacing"
-        android:layout_marginTop="@*android:dimen/notification_header_padding_top"
+        android:layout_marginTop="@dimen/notification_guts_button_spacing"
+        android:layout_marginStart="@dimen/notification_guts_button_side_margin"
+        android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
         android:visibility="gone"
         android:orientation="horizontal" >
         <TextView
             android:id="@+id/confirmation_text"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
             android:text="@string/notification_channel_disabled"
             style="@style/TextAppearance.NotificationInfo.Confirmation"/>
         <TextView
             android:id="@+id/undo"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text="@string/inline_undo"
             android:layout_alignParentEnd="true"
-            android:layout_marginEnd="-8dp"
+            android:layout_centerVertical="true"
+            android:text="@string/inline_undo"
             style="@style/TextAppearance.NotificationInfo.Button"/>
     </RelativeLayout>
 </com.android.systemui.statusbar.NotificationInfo>
diff --git a/packages/SystemUI/res/layout/notification_snooze.xml b/packages/SystemUI/res/layout/notification_snooze.xml
index 7476abd..ea6ef4c 100644
--- a/packages/SystemUI/res/layout/notification_snooze.xml
+++ b/packages/SystemUI/res/layout/notification_snooze.xml
@@ -50,13 +50,13 @@
 
         <TextView
             android:id="@+id/undo"
-            style="@style/TextAppearance.NotificationInfo.Button"
             android:layout_width="wrap_content"
-            android:layout_height="36dp"
-            android:layout_marginEnd="@*android:dimen/notification_content_margin_end"
+            android:layout_height="48dp"
+            android:layout_marginEnd="@dimen/notification_guts_button_side_margin"
             android:layout_alignParentEnd="true"
             android:layout_centerVertical="true"
-            android:text="@string/snooze_undo" />
+            android:text="@string/snooze_undo"
+            style="@style/TextAppearance.NotificationInfo.Button" />
     </RelativeLayout>
 
     <View
diff --git a/packages/SystemUI/res/layout/qs_paged_page.xml b/packages/SystemUI/res/layout/qs_paged_page.xml
index 25b1a2b..07f0c83 100644
--- a/packages/SystemUI/res/layout/qs_paged_page.xml
+++ b/packages/SystemUI/res/layout/qs_paged_page.xml
@@ -20,7 +20,7 @@
     android:id="@+id/tile_page"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingLeft="@dimen/notification_side_paddings"
-    android:paddingRight="@dimen/notification_side_paddings"
+    android:paddingStart="@dimen/notification_side_paddings"
+    android:paddingEnd="@dimen/notification_side_paddings"
     android:clipChildren="false"
     android:clipToPadding="false" />
diff --git a/packages/SystemUI/res/layout/smart_reply_button.xml b/packages/SystemUI/res/layout/smart_reply_button.xml
index 98e6e82..a490c4b 100644
--- a/packages/SystemUI/res/layout/smart_reply_button.xml
+++ b/packages/SystemUI/res/layout/smart_reply_button.xml
@@ -26,7 +26,7 @@
         android:paddingVertical="@dimen/smart_reply_button_padding_vertical"
         android:background="@drawable/smart_reply_button_background"
         android:gravity="center"
-        android:fontFamily="sans-serif-medium"
+        android:fontFamily="roboto-medium"
         android:textSize="@dimen/smart_reply_button_font_size"
         android:lineSpacingExtra="@dimen/smart_reply_button_line_spacing_extra"
         android:textColor="@color/smart_reply_button_text"
diff --git a/packages/SystemUI/res/layout/status_bar_notification_footer.xml b/packages/SystemUI/res/layout/status_bar_notification_footer.xml
index 22f1618..b4c2ba8 100644
--- a/packages/SystemUI/res/layout/status_bar_notification_footer.xml
+++ b/packages/SystemUI/res/layout/status_bar_notification_footer.xml
@@ -19,7 +19,8 @@
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingEnd="8dp"
+        android:paddingStart="4dp"
+        android:paddingEnd="4dp"
         android:visibility="gone">
     <FrameLayout
         android:id="@+id/content"
diff --git a/packages/SystemUI/res/layout/status_bar_wifi_group.xml b/packages/SystemUI/res/layout/status_bar_wifi_group.xml
index 482f780..c419b90 100644
--- a/packages/SystemUI/res/layout/status_bar_wifi_group.xml
+++ b/packages/SystemUI/res/layout/status_bar_wifi_group.xml
@@ -28,8 +28,8 @@
         android:id="@+id/wifi_group"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:paddingStart="2dp"
         android:gravity="center_vertical"
+        android:layout_marginStart="2.5dp"
     >
         <FrameLayout
                 android:id="@+id/inout_container"
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 1f135ae..f6daa7c 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Ontsluit"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Wat tans vir vingerafdruk"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ontsluit sonder om jou vingerafdruk te gebruik"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Stuur"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ontsluit"</string>
     <string name="phone_label" msgid="2320074140205331708">"maak foon oop"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batterybespaarder sal outomaties aanskakel wanneer battery onder <xliff:g id="PERCENTAGE">%d</xliff:g>%% is."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Instellings"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Het dit"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 977eb02..4b3c87e 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ክፈት"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"አሻራን በመጠባበቅ ላይ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"የጣት አሻራዎን ሳይጠቀሙ ይክፈቱ"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ላክ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ክፈት"</string>
     <string name="phone_label" msgid="2320074140205331708">"ስልክ ክፈት"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ባትሪ ልክ ከ<xliff:g id="PERCENTAGE">%d</xliff:g>%% በታች ሲሆን ባትሪ ቆጣቢ በራስ-ሰር ይበራል።"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ቅንብሮች"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ገባኝ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index bedb79f..91a33d6 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -83,8 +83,8 @@
     <string name="screenshot_failed_to_save_text" msgid="3041612585107107310">"يتعذر حفظ لقطة الشاشة لأن مساحة التخزين المتاحة محدودة."</string>
     <string name="screenshot_failed_to_capture_text" msgid="173674476457581486">"يحظر التطبيق أو تحظر مؤسستك التقاط لقطات شاشة"</string>
     <string name="usb_preference_title" msgid="6551050377388882787">"‏خيارات نقل الملفات عبر USB"</string>
-    <string name="use_mtp_button_title" msgid="4333504413563023626">"‏تحميل كمشغل وسائط (MTP)"</string>
-    <string name="use_ptp_button_title" msgid="7517127540301625751">"‏تحميل ككاميرا (PTP)"</string>
+    <string name="use_mtp_button_title" msgid="4333504413563023626">"‏تثبيت كمشغل وسائط (MTP)"</string>
+    <string name="use_ptp_button_title" msgid="7517127540301625751">"‏تثبيت ككاميرا (PTP)"</string>
     <string name="installer_cd_button_title" msgid="2312667578562201583">"‏تثبيت تطبيق Android File Transfer لـ Mac"</string>
     <string name="accessibility_back" msgid="567011538994429120">"رجوع"</string>
     <string name="accessibility_home" msgid="8217216074895377641">"الرئيسية"</string>
@@ -99,6 +99,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"إلغاء القفل"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"في انتظار بصمة الإصبع"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"إلغاء القفل دون استخدام بصمة إصبعك"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"إرسال"</string>
     <string name="unlock_label" msgid="8779712358041029439">"إلغاء القفل"</string>
     <string name="phone_label" msgid="2320074140205331708">"فتح الهاتف"</string>
@@ -879,4 +881,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"سيتم تفعيل ميزة \"توفير شحن البطارية\" عندما تنخفض البطارية عن <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"الإعدادات"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"حسنًا"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-as/strings.xml b/packages/SystemUI/res/values-as/strings.xml
index 51a5db8..61d7bb8 100644
--- a/packages/SystemUI/res/values-as/strings.xml
+++ b/packages/SystemUI/res/values-as/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"আনলক কৰক"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ফিংগাৰপ্ৰিণ্টৰ বাবে ৰৈ থকা হৈছে"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ফিংগাৰপ্ৰিণ্ট ব্যৱহাৰ নকৰাকৈ আনলক কৰক"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"পঠিয়াওক"</string>
     <string name="unlock_label" msgid="8779712358041029439">"আনলক কৰক"</string>
     <string name="phone_label" msgid="2320074140205331708">"ফ\'ন খোলক"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"বেটাৰি চ্চাৰ্জৰ স্তৰ <xliff:g id="PERCENTAGE">%d</xliff:g>%%তকৈ কম হোৱাৰ লগে লগে বেটাৰি সঞ্চয়কাৰী স্বয়ংক্ৰিয়ভাৱে অন হ’ব।"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ছেটিংবোৰ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"বুজি পালোঁ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-az/strings.xml b/packages/SystemUI/res/values-az/strings.xml
index 5de3c78..e7cd96d 100644
--- a/packages/SystemUI/res/values-az/strings.xml
+++ b/packages/SystemUI/res/values-az/strings.xml
@@ -95,6 +95,7 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Kiliddən çıxarın"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Barmaq izi gözlənilir"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Barmaq izi istifadə etmədən kilidi açın"</string>
+    <string name="accessibility_scanning_face" msgid="769545173211758586">"Üzün skan edilməsi"</string>
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Göndərin"</string>
     <string name="unlock_label" msgid="8779712358041029439">"kiliddən çıxarın"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefonu açın"</string>
@@ -851,4 +852,5 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batareya <xliff:g id="PERCENTAGE">%d</xliff:g>%%-dən aşağı düşdükdə Batareya Qənaəti avtomatik aktiv ediləcək."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ayarlar"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Anladım"</string>
+    <string name="heap_dump_tile_name" msgid="9141031328971226374">"Dump SysUI Heap"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 6bb9180..a0c33e7 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Otključajte"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čeka se otisak prsta"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Otključaj bez korišćenja otiska prsta"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Pošalji"</string>
     <string name="unlock_label" msgid="8779712358041029439">"otključaj"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvori telefon"</string>
@@ -858,4 +860,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Ušteda baterije će se automatski uključivati kada baterija padne ispod <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Podešavanja"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Važi"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-be/strings.xml b/packages/SystemUI/res/values-be/strings.xml
index cab65a3..2bb3a42 100644
--- a/packages/SystemUI/res/values-be/strings.xml
+++ b/packages/SystemUI/res/values-be/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Разблакiраваць"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Чаканне ўводу даных адбітка пальца"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Разблакіроўка без выкарыстання адбітка пальца"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Адправіць"</string>
     <string name="unlock_label" msgid="8779712358041029439">"разблакiраваць"</string>
     <string name="phone_label" msgid="2320074140205331708">"адкрыць тэлефон"</string>
@@ -867,4 +869,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Калі ўзровень зараду акумулятара знізіцца да <xliff:g id="PERCENTAGE">%d</xliff:g>%%, аўтаматычна ўключыцца рэжым эканоміі энергіі."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Налады"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Зразумела"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 1c61ac3..6b4f509 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Отключване"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Изчаква се отпечатък"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Отключете, без да използвате отпечатъка си"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Изпращане"</string>
     <string name="unlock_label" msgid="8779712358041029439">"отключване"</string>
     <string name="phone_label" msgid="2320074140205331708">"отваряне на телефона"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Режимът за запазване на батерията ще се включи автоматично, след като нивото й премине под <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Настройки"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Разбрах"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bn/strings.xml b/packages/SystemUI/res/values-bn/strings.xml
index 1cc8698..59ca389 100644
--- a/packages/SystemUI/res/values-bn/strings.xml
+++ b/packages/SystemUI/res/values-bn/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"আনলক করুন"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"আঙ্গুলের ছাপের জন্য অপেক্ষা করা হচ্ছে"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"আপনার আঙ্গুলের ছাপ ব্যবহার না করেই আনলক করুন"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"পাঠান"</string>
     <string name="unlock_label" msgid="8779712358041029439">"আনলক করুন"</string>
     <string name="phone_label" msgid="2320074140205331708">"ফোন খুলুন"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"চার্জ <xliff:g id="PERCENTAGE">%d</xliff:g>%%-এর নিচে চলে গেলে ব্যাটারি সেভার নিজে থেকেই চালু হয়ে যাবে।"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"সেটিংস"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"বুঝেছি"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bs/strings.xml b/packages/SystemUI/res/values-bs/strings.xml
index cdc2083..929b20c 100644
--- a/packages/SystemUI/res/values-bs/strings.xml
+++ b/packages/SystemUI/res/values-bs/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Otključaj"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čeka se otisak prsta"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Otključaj bez korištenja otiska prsta"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Pošalji"</string>
     <string name="unlock_label" msgid="8779712358041029439">"otključaj"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvori telefon"</string>
@@ -860,4 +862,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Kada je baterija ispod <xliff:g id="PERCENTAGE">%d</xliff:g>%%, Ušteda baterije se automatski uključuje."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Postavke"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Razumijem"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 95fe890..66a33c1 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloqueja"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"S\'està esperant l\'empremta digital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloqueja sense utilitzar l\'empremta digital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Envia"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloqueja"</string>
     <string name="phone_label" msgid="2320074140205331708">"obre el telèfon"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"L\'estalvi de bateria s\'activarà automàticament quan el nivell de bateria sigui inferior al <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Configuració"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"D\'acord"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 74861f3..408be3d 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Odemknout"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čeká se na použití otisku"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Odemknout bez otisku prstu"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Odeslat"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odemknout"</string>
     <string name="phone_label" msgid="2320074140205331708">"otevřít telefon"</string>
@@ -867,4 +869,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Spořič baterie se automaticky aktivuje, jakmile baterie klesne pod <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Nastavení"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Rozumím"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 973091c..f1b56a4 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås op"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Venter på fingeraftryk"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Lås op uden at bruge dit fingeraftryk"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås op"</string>
     <string name="phone_label" msgid="2320074140205331708">"åbn telefon"</string>
@@ -227,11 +229,11 @@
     <string name="accessibility_quick_settings_close" msgid="3115847794692516306">"Luk panelet."</string>
     <string name="accessibility_quick_settings_more_time" msgid="3659274935356197708">"Mere tid."</string>
     <string name="accessibility_quick_settings_less_time" msgid="2404728746293515623">"Mindre tid."</string>
-    <string name="accessibility_quick_settings_flashlight_off" msgid="4936432000069786988">"Lommelygten er slået fra."</string>
+    <string name="accessibility_quick_settings_flashlight_off" msgid="4936432000069786988">"Lommelygten er slukket."</string>
     <string name="accessibility_quick_settings_flashlight_unavailable" msgid="8012811023312280810">"Lommelygten er ikke tilgængelig."</string>
-    <string name="accessibility_quick_settings_flashlight_on" msgid="2003479320007841077">"Lommelygten er slået til."</string>
-    <string name="accessibility_quick_settings_flashlight_changed_off" msgid="3303701786768224304">"Lommelygten er slået fra."</string>
-    <string name="accessibility_quick_settings_flashlight_changed_on" msgid="6531793301533894686">"Lommelygten er slået til."</string>
+    <string name="accessibility_quick_settings_flashlight_on" msgid="2003479320007841077">"Lommelygten er tændt."</string>
+    <string name="accessibility_quick_settings_flashlight_changed_off" msgid="3303701786768224304">"Lommelygten er slukket."</string>
+    <string name="accessibility_quick_settings_flashlight_changed_on" msgid="6531793301533894686">"Lommelygten er tændt."</string>
     <string name="accessibility_quick_settings_color_inversion_changed_off" msgid="4406577213290173911">"Invertering af farver er slået fra."</string>
     <string name="accessibility_quick_settings_color_inversion_changed_on" msgid="6897462320184911126">"Invertering af farver er slået til."</string>
     <string name="accessibility_quick_settings_hotspot_changed_off" msgid="5004708003447561394">"Mobilhotspot er slået fra."</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batterisparefunktionen aktiveres automatisk, når batteriniveauet når under <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Indstillinger"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 23cba9f..712542e 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Entsperren"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Auf Fingerabdruck wird gewartet"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ohne Verwendung des Fingerabdrucks entsperren"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Senden"</string>
     <string name="unlock_label" msgid="8779712358041029439">"Entsperren"</string>
     <string name="phone_label" msgid="2320074140205331708">"Telefon öffnen"</string>
@@ -855,4 +857,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Der Energiesparmodus wird bei einem Akkustand von <xliff:g id="PERCENTAGE">%d</xliff:g>%% automatisch aktiviert."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Einstellungen"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index b23be28..cda3354 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Ξεκλείδωμα"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Αναμονή για δακτυλικό αποτύπωμα"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ξεκλείδωμα χωρίς τη χρήση του μοναδικού χαρακτηριστικού σας"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Αποστολή"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ξεκλείδωμα"</string>
     <string name="phone_label" msgid="2320074140205331708">"άνοιγμα τηλεφώνου"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Η Εξοικονόμηση μπαταρίας θα ενεργοποιηθεί αυτόματα μόλις η στάθμη της μπαταρίας φτάσει κάτω από <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ρυθμίσεις"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Το κατάλαβα"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rAU/strings.xml b/packages/SystemUI/res/values-en-rAU/strings.xml
index 1f08f2c..c9b530e 100644
--- a/packages/SystemUI/res/values-en-rAU/strings.xml
+++ b/packages/SystemUI/res/values-en-rAU/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Waiting for fingerprint"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Unlock without using your fingerprint"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Battery Saver will turn on automatically once battery goes below <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rCA/strings.xml b/packages/SystemUI/res/values-en-rCA/strings.xml
index d025c41..3b0439a 100644
--- a/packages/SystemUI/res/values-en-rCA/strings.xml
+++ b/packages/SystemUI/res/values-en-rCA/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Waiting for fingerprint"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Unlock without using your fingerprint"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Battery Saver will turn on automatically once battery goes below <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 1f08f2c..c9b530e 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Waiting for fingerprint"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Unlock without using your fingerprint"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Battery Saver will turn on automatically once battery goes below <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rIN/strings.xml b/packages/SystemUI/res/values-en-rIN/strings.xml
index 1f08f2c..c9b530e 100644
--- a/packages/SystemUI/res/values-en-rIN/strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Unlock"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Waiting for fingerprint"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Unlock without using your fingerprint"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"open phone"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Battery Saver will turn on automatically once battery goes below <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Settings"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rXC/strings.xml b/packages/SystemUI/res/values-en-rXC/strings.xml
index b6d3c18..774241c 100644
--- a/packages/SystemUI/res/values-en-rXC/strings.xml
+++ b/packages/SystemUI/res/values-en-rXC/strings.xml
@@ -95,6 +95,7 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‎‎‏‏‏‏‎‎‎‏‏‏‎‏‎‎‏‏‏‏‎‏‏‎‏‏‏‏‎‏‏‏‏‎‏‏‎‏‎‎‎‎‎‎‎‎‏‏‎‏‏‏‏‏‏‎‏‏‎‎‎Unlock‎‏‎‎‏‎"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‎‎‎‎‏‎‏‎‏‏‏‏‎‎‏‎‎‎‎‎‎‎‏‎‏‏‏‏‎‎‏‏‎‎‏‏‎‏‏‎‏‎‏‎‎‏‎‎‎‎‏‏‏‏‎‏‏‎‎‏‎‏‎Waiting for fingerprint‎‏‎‎‏‎"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‎‎‏‎‏‎‏‎‎‏‏‎‎‎‎‏‎‏‎‏‎‎‎‎‏‏‎‏‎‏‎‎‎‏‎‏‏‎‏‎‎‎‎‎‏‏‏‎‏‎‎‏‏‎‏‏‏‎‎Unlock without using your fingerprint‎‏‎‎‏‎"</string>
+    <string name="accessibility_scanning_face" msgid="769545173211758586">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‎‏‎‏‎‏‎‏‏‎‏‏‏‏‏‏‎‎‏‎‏‎‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‎‏‏‏‏‏‏‏‏‏‏‏‎‏‎‎Scanning face‎‏‎‎‏‎"</string>
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‎‏‎‏‏‏‏‎‎‏‎‎‎‏‏‏‏‎‏‎‏‏‏‎‏‎‎‏‎‎‎‎‎‎‎‎‎‏‎‏‎‎‎‏‏‎‎‎‏‎‎‎‏‏‎‎‎‏‏‎‏‎Send‎‏‎‎‏‎"</string>
     <string name="unlock_label" msgid="8779712358041029439">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‎‎‏‏‏‎‏‎‏‏‏‏‏‎‎‏‏‎‏‏‏‎‏‏‏‏‏‎‏‏‎‏‎‏‏‎‎‏‎‎‏‎‎‏‎‎‎‏‎‏‏‎‎‏‏‏‏‏‏‎unlock‎‏‎‎‏‎"</string>
     <string name="phone_label" msgid="2320074140205331708">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‎‎‎‎‎‏‏‎‎‏‎‏‎‎‎‏‏‏‏‎‎‏‎‎‎‏‏‎‏‏‎‎‎‏‏‏‎‎‎‎‎‏‎‎‎‏‏‎‏‎‎‏‏‏‏‏‏‎‎‎open phone‎‏‎‎‏‎"</string>
@@ -851,4 +852,5 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‎‎‏‏‎‎‎‎‏‎‎‎‏‏‏‎‎‏‏‎‎‏‎‎‎‎‏‏‎‎‎‎‎‏‏‎‎‏‎‏‏‎‎‏‎‏‏‏‏‏‎‏‎‎‎‏‏‎‏‎‏‏‎Battery Saver will turn on automatically once battery goes below ‎‏‎‎‏‏‎<xliff:g id="PERCENTAGE">%d</xliff:g>‎‏‎‎‏‏‏‎%%.‎‏‎‎‏‎"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‏‏‎‏‏‎‎‎‏‏‎‏‏‏‏‎‏‏‎‎‏‎‎‎‏‏‏‏‎‏‏‎‏‏‏‏‎‎‎‏‎‏‏‏‏‏‎‎‏‏‎‎‏‎‎‎‎‏‎Settings‎‏‎‎‏‎"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‎‏‎‎‏‎‏‎‏‏‏‏‏‎‎‏‎‏‎‏‎‏‎‏‏‎‏‏‏‎‎‎‏‏‎‏‏‎‏‏‏‎‏‎‏‎‏‎‏‏‎‎‏‎‏‎‏‎‎‎‎‏‎‎Got it‎‏‎‎‏‎"</string>
+    <string name="heap_dump_tile_name" msgid="9141031328971226374">"‎‏‎‎‎‎‎‏‎‏‏‏‎‎‎‎‎‏‎‎‏‎‎‎‎‏‏‏‏‏‏‏‏‏‏‏‏‏‎‏‏‎‏‏‎‏‏‎‏‏‏‎‏‏‏‏‎‎‎‏‏‏‏‏‏‏‏‏‏‎‎‎‎‎‎‏‎‏‏‏‏‏‏‏‏‎‏‎‎‎‎‎‏‏‎‎Dump SysUI Heap‎‏‎‎‏‎"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index caace9c..3e27009 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Esperando huella digital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquear sin utilizar la huella digital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"El Ahorro de batería se activará automáticamente cuando quede menos de <xliff:g id="PERCENTAGE">%d</xliff:g>%% de batería."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Configuración"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Entendido"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index fca9b612..3e56bff 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -95,6 +95,7 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Esperando huella digital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquear sin usar tu huella digital"</string>
+    <string name="accessibility_scanning_face" msgid="769545173211758586">"Escaneando cara"</string>
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
@@ -853,4 +854,5 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"El modo Ahorro de batería se activará automáticamente cuando quede menos de un <xliff:g id="PERCENTAGE">%d</xliff:g> %% de batería."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ajustes"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Entendido"</string>
+    <string name="heap_dump_tile_name" msgid="9141031328971226374">"Volcar pila de SysUI"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-et/strings.xml b/packages/SystemUI/res/values-et/strings.xml
index fa40bae..29ad9ee 100644
--- a/packages/SystemUI/res/values-et/strings.xml
+++ b/packages/SystemUI/res/values-et/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Luku avamine"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Sõrmejälje ootel"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ava sõrmejälge kasutamata"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Saada"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ava lukk"</string>
     <string name="phone_label" msgid="2320074140205331708">"ava telefon"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Kui aku tase langeb alla <xliff:g id="PERCENTAGE">%d</xliff:g>%%, lülitub akusäästja automaatselt sisse."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Seaded"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Selge"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml
index 42620fb..ebe624d 100644
--- a/packages/SystemUI/res/values-eu/strings.xml
+++ b/packages/SystemUI/res/values-eu/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desblokeatu"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Hatz-markaren zain"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desblokeatu hatz-markaren bidez"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Bidali"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desblokeatu"</string>
     <string name="phone_label" msgid="2320074140205331708">"ireki telefonoan"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Bateria-aurrezlea automatikoki aktibatuko da bateriaren %% <xliff:g id="PERCENTAGE">%d</xliff:g> gelditzen denean."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ezarpenak"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ados"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index 422315e..02142f3 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"باز کردن قفل"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"در انتظار اثرانگشت"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"باز کردن قفل بدون استفاده از اثر انگشت"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ارسال"</string>
     <string name="unlock_label" msgid="8779712358041029439">"بازکردن قفل"</string>
     <string name="phone_label" msgid="2320074140205331708">"باز کردن تلفن"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"وقتی شارژ باتری به زیر <xliff:g id="PERCENTAGE">%d</xliff:g>%% برسد، «بهینه‌سازی باتری» به‌طور خودکار روشن می‌شود."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"تنظیمات"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"متوجه شدم"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 9dde63f..46c0800 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Avaa lukitus"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Odotetaan sormenjälkeä"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Avaa lukitus jollakin muulla tavalla kuin sormenjäljellä"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Lähetä"</string>
     <string name="unlock_label" msgid="8779712358041029439">"avaa lukitus"</string>
     <string name="phone_label" msgid="2320074140205331708">"avaa puhelin"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Virransäästö käynnistyy automaattisesti, kun akun lataustaso on alle <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Asetukset"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Selvä"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 30da3ce..cd08b25 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Déverrouiller"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"En attente de l\'empreinte digitale"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Déverrouiller le système sans utiliser votre empreinte digitale"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Envoyer"</string>
     <string name="unlock_label" msgid="8779712358041029439">"déverrouiller"</string>
     <string name="phone_label" msgid="2320074140205331708">"Ouvrir le téléphone"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"La fonction Économie d\'énergie s\'activera automatiquement une fois que la pile sera en dessous de <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Paramètres"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 5381ab3..a375f415 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Déverrouiller"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Attente de l\'empreinte digitale"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Déverrouiller le système sans utiliser votre empreinte digitale"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Envoyer"</string>
     <string name="unlock_label" msgid="8779712358041029439">"déverrouiller"</string>
     <string name="phone_label" msgid="2320074140205331708">"ouvrir le téléphone"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"L\'économiseur de batterie s\'active automatiquement lorsque l\'autonomie de la batterie est inférieure à <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Paramètres"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-gl/strings.xml b/packages/SystemUI/res/values-gl/strings.xml
index 8d68042..d881b77 100644
--- a/packages/SystemUI/res/values-gl/strings.xml
+++ b/packages/SystemUI/res/values-gl/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Agardando pola impresión dixital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquea sen usar a túa impresión dixital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir teléfono"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Activarase automaticamente a función Aforro de batería en canto o nivel de carga sexa inferior ao <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Configuración"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"De acordo"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-gu/strings.xml b/packages/SystemUI/res/values-gu/strings.xml
index 08db027..8eb21f0 100644
--- a/packages/SystemUI/res/values-gu/strings.xml
+++ b/packages/SystemUI/res/values-gu/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"અનલૉક કરો"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ફિંગરપ્રિન્ટની રાહ જોઈ રહ્યાં છીએ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"તમારી ફિંગરપ્રિન્ટનો ઉપયોગ કર્યા વગર અનલૉક કરો"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"મોકલો"</string>
     <string name="unlock_label" msgid="8779712358041029439">"અનલૉક કરો"</string>
     <string name="phone_label" msgid="2320074140205331708">"ફોન ખોલો"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"બૅટરીનું સ્તર એકવાર <xliff:g id="PERCENTAGE">%d</xliff:g>%% કરતાં ઓછું થાય તે પછી બૅટરી સેવર આપમેળે ચાલુ થશે."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"સેટિંગ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"સમજાઈ ગયું"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hi/strings.xml b/packages/SystemUI/res/values-hi/strings.xml
index 21de268d..c19c782 100644
--- a/packages/SystemUI/res/values-hi/strings.xml
+++ b/packages/SystemUI/res/values-hi/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"अनलॉक करें"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"फ़िंगरप्रिंट का इंतज़ार हो रहा है"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"अपने फ़िंगरप्रिंट का इस्तेमाल किए बिना अनलॉक करें"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"भेजें"</string>
     <string name="unlock_label" msgid="8779712358041029439">"अनलॉक करें"</string>
     <string name="phone_label" msgid="2320074140205331708">"फ़ोन खोलें"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"बैटरी के <xliff:g id="PERCENTAGE">%d</xliff:g>%% से कम होने पर बैटरी सेवर अपने आप चालू हो जाएगा."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"सेटिंग"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ठीक है"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index bdb636e..fbf9a72 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Otključavanje"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čekanje na otisak prsta"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Otključavanje bez otiska prsta"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Pošalji"</string>
     <string name="unlock_label" msgid="8779712358041029439">"otključavanje"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvaranje telefona"</string>
@@ -858,4 +860,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Štednja baterije uključit će se automatski kad razina baterije padne ispod <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Postavke"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Shvaćam"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index bec5f38..d027cef 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Feloldás"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Várakozás az ujjlenyomatra"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Feloldás ujjlenyomat nélkül"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Küldés"</string>
     <string name="unlock_label" msgid="8779712358041029439">"feloldás"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefon megnyitása"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Az akkumulátorkímélő mód automatikusan bekapcsol, ha az akkumulátor töltöttsége <xliff:g id="PERCENTAGE">%d</xliff:g>%% alá esik."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Beállítások"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Értem"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hy/strings.xml b/packages/SystemUI/res/values-hy/strings.xml
index b2cd58c..3e8f216 100644
--- a/packages/SystemUI/res/values-hy/strings.xml
+++ b/packages/SystemUI/res/values-hy/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Ապակողպել"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Մատնահետքի սպասում"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ապակողպել չօգտագործելով մատնահետքը"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Ուղարկել"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ապակողպել"</string>
     <string name="phone_label" msgid="2320074140205331708">"բացել հեռախոսը"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Մարտկոցի տնտեսման ռեժիմն ավտոմատ կմիանա, երբ մարտկոցի լիցքը <xliff:g id="PERCENTAGE">%d</xliff:g>%%-ից պակասի:"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Կարգավորումներ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Եղավ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 2e3911b..e4989bc 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Buka kunci"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Menunggu sidik jari"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Buka kunci tanpa menggunakan sidik jari"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Kirim"</string>
     <string name="unlock_label" msgid="8779712358041029439">"buka kunci"</string>
     <string name="phone_label" msgid="2320074140205331708">"buka ponsel"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Penghemat Baterai akan aktif otomatis jika baterai kurang dari <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Setelan"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-is/strings.xml b/packages/SystemUI/res/values-is/strings.xml
index acb72af..4416645 100644
--- a/packages/SystemUI/res/values-is/strings.xml
+++ b/packages/SystemUI/res/values-is/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Taka úr lás"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Bíður eftir fingrafari"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Taka úr lás án þess að nota fingrafar"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Senda"</string>
     <string name="unlock_label" msgid="8779712358041029439">"taka úr lás"</string>
     <string name="phone_label" msgid="2320074140205331708">"opna síma"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Sjálfkrafa verður kveikt á rafhlöðusparnaði þegar hleðsla rafhlöðunnar fer niður fyrir <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Stillingar"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ég skil"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 60de47a..c12d0de 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Sblocca"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"In attesa dell\'impronta digitale"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Sblocca senza utilizzare l\'impronta digitale"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Invia"</string>
     <string name="unlock_label" msgid="8779712358041029439">"sblocca"</string>
     <string name="phone_label" msgid="2320074140205331708">"apri telefono"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Il Risparmio energetico verrà attivato automaticamente quando la carica della batteria sarà inferiore a <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Impostazioni"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 6f30f45..7aa123e 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ביטול נעילה"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ממתין לטביעת אצבע"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"בטל את הנעילה בלי להשתמש בטביעת האצבע"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"שליחה"</string>
     <string name="unlock_label" msgid="8779712358041029439">"בטל את הנעילה"</string>
     <string name="phone_label" msgid="2320074140205331708">"פתח את הטלפון"</string>
@@ -865,4 +867,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"מצב חיסכון בסוללה יופעל באופן אוטומטי כשרמת טעינת הסוללה תהיה נמוכה מ-<xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"הגדרות"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"הבנתי"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 8d7ac77..5009765 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ロック解除"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"指紋を待っています"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"指紋認証を使用せずにロック解除"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"送信"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ロック解除"</string>
     <string name="phone_label" msgid="2320074140205331708">"電話を起動"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"電池が <xliff:g id="PERCENTAGE">%d</xliff:g>%% を下回ると、バッテリー セーバーが自動的に ON になります。"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"設定"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ka/strings.xml b/packages/SystemUI/res/values-ka/strings.xml
index c72eec9..77bc203 100644
--- a/packages/SystemUI/res/values-ka/strings.xml
+++ b/packages/SystemUI/res/values-ka/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"განბლოკვა"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"თითის ანაბეჭდის მოლოდინში"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"თქვენი თითის ანაბეჭდის გარეშე განბლოკვა"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"გაგზავნა"</string>
     <string name="unlock_label" msgid="8779712358041029439">"განბლოკვა"</string>
     <string name="phone_label" msgid="2320074140205331708">"ტელეფონის გახსნა"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ბატარეის დამზოგი ავტომატურად ჩაირთვება, როცა ბატარეა ჩამოსცდება <xliff:g id="PERCENTAGE">%d</xliff:g>%%-ს."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"პარამეტრები"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"გასაგებია"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-kk/strings.xml b/packages/SystemUI/res/values-kk/strings.xml
index 8d14ae8..2acc8e1 100644
--- a/packages/SystemUI/res/values-kk/strings.xml
+++ b/packages/SystemUI/res/values-kk/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Бекітпесін ашу"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Саусақ ізі күтілуде"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Саусақ ізін пайдаланбай құлыпты ашу"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Жіберу"</string>
     <string name="unlock_label" msgid="8779712358041029439">"бекітпесін ашу"</string>
     <string name="phone_label" msgid="2320074140205331708">"телефонды ашу"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Батарея заряды <xliff:g id="PERCENTAGE">%d</xliff:g>%% деңгейінен төмендегенде, Battery Saver автоматты түрде қосылады."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Параметрлер"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Түсінікті"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-km/strings.xml b/packages/SystemUI/res/values-km/strings.xml
index 0414591..636c61f1 100644
--- a/packages/SystemUI/res/values-km/strings.xml
+++ b/packages/SystemUI/res/values-km/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ដោះ​​សោ"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"កំពុង​រង់ចាំ​ស្នាមម្រាមដៃ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ដោះសោដោយមិនបាច់ប្រើស្នាមម្រាមដៃរបស់អ្នក"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ផ្ញើ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ដោះ​សោ"</string>
     <string name="phone_label" msgid="2320074140205331708">"បើក​ទូរស័ព្ទ"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"កម្មវិធី​សន្សំ​ថ្ម​នឹង​បើក​ដោយ​ស្វ័យ​ប្រវត្តិ​ នៅពេល​ថ្ម​នៅ​សល់​តិច​ជាង <xliff:g id="PERCENTAGE">%d</xliff:g>%% ។"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ការកំណត់"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"យល់ហើយ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-kn/strings.xml b/packages/SystemUI/res/values-kn/strings.xml
index 32f3923..b844e53 100644
--- a/packages/SystemUI/res/values-kn/strings.xml
+++ b/packages/SystemUI/res/values-kn/strings.xml
@@ -32,7 +32,7 @@
     <string name="status_bar_no_notifications_title" msgid="4755261167193833213">"ಯಾವುದೇ ಅಧಿಸೂಚನೆಗಳಿಲ್ಲ"</string>
     <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"ಚಾಲ್ತಿಯಲ್ಲಿರುವ"</string>
     <string name="status_bar_latest_events_title" msgid="6594767438577593172">"ಅಧಿಸೂಚನೆಗಳು"</string>
-    <string name="battery_low_title" msgid="9187898087363540349">"ಬ್ಯಾಟರಿ ಸದ್ಯದಲ್ಲೇ ಮುಕ್ತಾಯವಾಗಬಹುದು"</string>
+    <string name="battery_low_title" msgid="9187898087363540349">"ಬ್ಯಾಟರಿ ಸದ್ಯದಲ್ಲೇ ಖಾಲಿಯಾಗಬಹುದು"</string>
     <string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಉಳಿದಿದೆ"</string>
     <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಬಾಕಿ ಉಳಿದಿದೆ, ನಿಮ್ಮ ಬಳಕೆಯ ಆಧಾರದ ಮೇಲೆ <xliff:g id="TIME">%s</xliff:g> ಉಳಿದಿದೆ"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> ಬಾಕಿ ಉಳಿದಿದೆ, <xliff:g id="TIME">%s</xliff:g> ಉಳಿದಿದೆ"</string>
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ಅನ್‌ಲಾಕ್"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ಫಿಂಗರ್ ಪ್ರಿಂಟ್ ನಿರೀಕ್ಷಿಸಲಾಗುತ್ತಿದೆ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ನಿಮ್ಮ ಬೆರಳಚ್ಚು ಬಳಸದೆಯೇ ಅನ್‌ಲಾಕ್ ಮಾಡಿ"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ಕಳುಹಿಸಿ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ಅನ್‌ಲಾಕ್ ಮಾಡು"</string>
     <string name="phone_label" msgid="2320074140205331708">"ಫೋನ್ ತೆರೆಯಿರಿ"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ಬ್ಯಾಟರಿ <xliff:g id="PERCENTAGE">%d</xliff:g>%% ಗಿಂತ ಕಡಿಮೆ ಆದಾಗ ಬ್ಯಾಟರಿ ಸೇವರ್‌ ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆನ್‌ ಆಗುತ್ತದೆ."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ಸೆಟ್ಟಿಂಗ್‌ಗಳು"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ಅರ್ಥವಾಯಿತು"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 8a6e8ed..f532ca0 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"잠금 해제"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"지문 대기 중"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"지문 파일을 사용하지 않고 잠금 해제"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"보내기"</string>
     <string name="unlock_label" msgid="8779712358041029439">"잠금 해제"</string>
     <string name="phone_label" msgid="2320074140205331708">"휴대전화 열기"</string>
@@ -857,4 +859,6 @@
     <skip />
     <string name="open_saver_setting_action" msgid="8314624730997322529">"설정"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"확인"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ky/strings.xml b/packages/SystemUI/res/values-ky/strings.xml
index 8fa013f..0851dfe 100644
--- a/packages/SystemUI/res/values-ky/strings.xml
+++ b/packages/SystemUI/res/values-ky/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Кулпусун ачуу"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Манжаңызды сенсорго коюңуз"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Манжа изиңизди колдонбостон эле кулпуну ачыңыз"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Жөнөтүү"</string>
     <string name="unlock_label" msgid="8779712358041029439">"кулпуну ачуу"</string>
     <string name="phone_label" msgid="2320074140205331708">"телефонду ачуу"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Батареянын деңгээли <xliff:g id="PERCENTAGE">%d</xliff:g>%% төмөндөгөндө, Батареяны үнөмдөгүч режими автоматтык түрдө күйөт."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Жөндөөлөр"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Түшүндүм"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lo/strings.xml b/packages/SystemUI/res/values-lo/strings.xml
index 5e2f869..658ce77 100644
--- a/packages/SystemUI/res/values-lo/strings.xml
+++ b/packages/SystemUI/res/values-lo/strings.xml
@@ -95,6 +95,7 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ປົດລັອກ"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ກຳລັງລໍຖ້າລາຍນິ້ວມື"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ປົດ​ລັອກ​ໂດຍ​ບໍ່​ມີ​ການ​ໃຊ້​ລາຍ​ນີ້ວ​ມື​ຂອງ​ທ່ານ"</string>
+    <string name="accessibility_scanning_face" msgid="769545173211758586">"ການສະແກນໜ້າ"</string>
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ສົ່ງ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ປົດລັອກ"</string>
     <string name="phone_label" msgid="2320074140205331708">"​ເປີດ​​ແປ້ນ​ໂທ​ລະ​ສັບ"</string>
@@ -851,4 +852,5 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ຕົວປະຢັດແບັດເຕີຣີຈະເປີດຂຶ້ນມາໂດຍອັດຕະໂນມັດເມື່ອແບັດເຕີຣີຕ່ຳກວ່າ <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ການຕັ້ງຄ່າ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ເຂົ້າໃຈແລ້ວ"</string>
+    <string name="heap_dump_tile_name" msgid="9141031328971226374">"Dump SysUI Heap"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 34d2c04..fce3260 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Atrakinti"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Laukiama kontrolinio kodo"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Atrakinti nenaudojant kontrolinio kodo"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Siųsti"</string>
     <string name="unlock_label" msgid="8779712358041029439">"atrakinti"</string>
     <string name="phone_label" msgid="2320074140205331708">"atidaryti telefoną"</string>
@@ -865,4 +867,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Akumuliatoriaus tausojimo priemonė bus įjungta automatiškai akumuliatoriaus įkrovai pasiekus mažiau nei <xliff:g id="PERCENTAGE">%d</xliff:g> proc."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Nustatymai"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Supratau"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 3c2661b..b65ca63 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Atbloķēt"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Tiek gaidīts pirksta nospiedums."</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Atbloķēt, neizmantojot pirksta nospiedumu"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Sūtīt"</string>
     <string name="unlock_label" msgid="8779712358041029439">"atbloķēt"</string>
     <string name="phone_label" msgid="2320074140205331708">"atvērt tālruni"</string>
@@ -862,4 +864,6 @@
     <skip />
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Iestatījumi"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Labi"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-mk/strings.xml b/packages/SystemUI/res/values-mk/strings.xml
index a9e37ea..5e15679 100644
--- a/packages/SystemUI/res/values-mk/strings.xml
+++ b/packages/SystemUI/res/values-mk/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Отклучување"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Се чека отпечаток"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Отклучете без да го користите вашиот отпечаток"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Испрати"</string>
     <string name="unlock_label" msgid="8779712358041029439">"отклучи"</string>
     <string name="phone_label" msgid="2320074140205331708">"отвори телефон"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Штедачот на батерија ќе се вклучи автоматски кога батеријата ќе падне под <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Поставки"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Сфатив"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ml/strings.xml b/packages/SystemUI/res/values-ml/strings.xml
index bbf51d9..9891a6f 100644
--- a/packages/SystemUI/res/values-ml/strings.xml
+++ b/packages/SystemUI/res/values-ml/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"അണ്‍ലോക്ക് ചെയ്യുക"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ഫിംഗർപ്രിന്റിനായി കാക്കുന്നു"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"നിങ്ങളുടെ ഫിംഗർപ്രിന്റ് ഉപയോഗിക്കാതെ അൺലോക്കുചെയ്യുക"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"അയയ്ക്കുക"</string>
     <string name="unlock_label" msgid="8779712358041029439">"അൺലോക്കുചെയ്യുക"</string>
     <string name="phone_label" msgid="2320074140205331708">"ഫോൺ തുറക്കുക"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ബാറ്ററി <xliff:g id="PERCENTAGE">%d</xliff:g>%%-ൽ താഴെയാകുമ്പോൾ, ബാറ്ററി ലാഭിക്കൽ സ്വമേധയാ ഓണാകും."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ക്രമീകരണം"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"മനസ്സിലായി"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-mn/strings.xml b/packages/SystemUI/res/values-mn/strings.xml
index 498f1f8..6dcfa0e 100644
--- a/packages/SystemUI/res/values-mn/strings.xml
+++ b/packages/SystemUI/res/values-mn/strings.xml
@@ -93,6 +93,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Тайлах"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Хурууны хээг хүлээж байна"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Хурууны хээ ашиглалгүйгээр түгжээг тайлаарай"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Илгээх"</string>
     <string name="unlock_label" msgid="8779712358041029439">"тайлах"</string>
     <string name="phone_label" msgid="2320074140205331708">"утас нээх"</string>
@@ -849,4 +851,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Батерей <xliff:g id="PERCENTAGE">%d</xliff:g>%%-с бага болсон үед Тэжээл хэмнэгч онцлог автоматаар асна."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Тохиргоо"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ойлголоо"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml
index 7be3e4d..5bcab04 100644
--- a/packages/SystemUI/res/values-mr/strings.xml
+++ b/packages/SystemUI/res/values-mr/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"अनलॉक करा"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"फिंगरप्रिंटची प्रतीक्षा करत आहे"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"तुमचे फिंगरप्रिंट न वापरता अनलॉक करा"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"पाठवा"</string>
     <string name="unlock_label" msgid="8779712358041029439">"अनलॉक करा"</string>
     <string name="phone_label" msgid="2320074140205331708">"फोन उघडा"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"बॅटरी <xliff:g id="PERCENTAGE">%d</xliff:g>%% पेक्षा खाली गेल्यास बॅटरी सेव्हर आपोआप सुरू होईल."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"सेटिंग्ज"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"समजले"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ms/strings.xml b/packages/SystemUI/res/values-ms/strings.xml
index 80c5beb..b18c0b43 100644
--- a/packages/SystemUI/res/values-ms/strings.xml
+++ b/packages/SystemUI/res/values-ms/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Buka kunci"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Menunggu cap jari"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Buka kunci tanpa menggunakan cap jari"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Hantar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"buka kunci"</string>
     <string name="phone_label" msgid="2320074140205331708">"buka telefon"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Penjimat Bateri akan dihidupkan secara automatik setelah kuasa bateri kurang daripada <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Tetapan"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-my/strings.xml b/packages/SystemUI/res/values-my/strings.xml
index b6699eb..81c5fbb 100644
--- a/packages/SystemUI/res/values-my/strings.xml
+++ b/packages/SystemUI/res/values-my/strings.xml
@@ -95,6 +95,7 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"သော့ဖွင့်ရန်"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"လက်ဗွေရာကို စောင့်နေပါသည်"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"လက်ဗွေရာ မသုံးဘဲ ဖွင့်ပါ"</string>
+    <string name="accessibility_scanning_face" msgid="769545173211758586">"မျက်နှာ စကင်ဖတ်နေသည်"</string>
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ပို့ရန်"</string>
     <string name="unlock_label" msgid="8779712358041029439">"သော့ဖွင့်ရန်"</string>
     <string name="phone_label" msgid="2320074140205331708">"ဖုန်းကို ဖွင့်ရန်"</string>
@@ -851,4 +852,5 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ဘက်ထရီ <xliff:g id="PERCENTAGE">%d</xliff:g>%% အောက် ရောက်သွားသည်နှင့် \'ဘက်ထရီ အားထိန်း\' အလိုအလျောက် ဖွင့်ပါမည်။"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ဆက်တင်များ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ရပါပြီ"</string>
+    <string name="heap_dump_tile_name" msgid="9141031328971226374">"SysUI အပုံ ပစ်ခြင်း"</string>
 </resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index f4faa78..b2d511a 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås opp"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Venger på fingeravtrykk"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Lås opp uten å bruke fingeravtrykk"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Send"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås opp"</string>
     <string name="phone_label" msgid="2320074140205331708">"åpne telefonen"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batterisparing slås på automatisk når batteriet er lavere enn <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Innstillinger"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Greit"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ne/strings.xml b/packages/SystemUI/res/values-ne/strings.xml
index 91c6908..9994bfe 100644
--- a/packages/SystemUI/res/values-ne/strings.xml
+++ b/packages/SystemUI/res/values-ne/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"खोल्नुहोस्"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"फिंगरप्रिन्ट कुर्दै"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"तपाईँको फिंगरप्रिन्ट बिना नै अनलक गर्नुहोस्"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"पठाउनुहोस्"</string>
     <string name="unlock_label" msgid="8779712358041029439">"खोल्नुहोस्"</string>
     <string name="phone_label" msgid="2320074140205331708">"फोन खोल्नुहोस्"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ब्याट्री <xliff:g id="PERCENTAGE">%d</xliff:g>%% भन्दा कम भएको बेला ब्याट्री सेभर स्वतः सक्रिय हुने छ।"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"सेटिङहरू"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"बुझेँ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 81934ab..2daf530 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Ontgrendelen"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Wachten op vingerafdruk"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Ontgrendelen zonder je vingerafdruk te gebruiken"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Verzenden"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ontgrendelen"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefoon openen"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batterijbesparing wordt automatisch ingeschakeld wanneer de batterijstatus lager is dan <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Instellingen"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-or/strings.xml b/packages/SystemUI/res/values-or/strings.xml
index 48cb53a..81ffffc 100644
--- a/packages/SystemUI/res/values-or/strings.xml
+++ b/packages/SystemUI/res/values-or/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ଅନଲକ୍‌ କରନ୍ତୁ"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ଆଙ୍ଗୁଠି ଚିହ୍ନ ପାଇଁ ଅପେକ୍ଷା କରିଛି"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ଆଙ୍ଗୁଠିଚିହ୍ନ ବ୍ୟବହାର ନକରି ଅନଲକ୍‍ କରନ୍ତୁ"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ପଠାନ୍ତୁ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ଅନଲକ୍‌"</string>
     <string name="phone_label" msgid="2320074140205331708">"ଫୋନ୍‌ ଖୋଲନ୍ତୁ"</string>
@@ -854,4 +856,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ଚାର୍ଜ <xliff:g id="PERCENTAGE">%d</xliff:g>%%ରୁ କମ୍‌ ହେଲେ ବ୍ୟାଟେରୀ ସେଭର୍‌ ଆପେ ଅନ୍‌ ହୋଇଯିବ।"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ସେଟିଙ୍ଗ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ବୁଝିଲି"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pa/strings.xml b/packages/SystemUI/res/values-pa/strings.xml
index a4c11aa..4b92ec4 100644
--- a/packages/SystemUI/res/values-pa/strings.xml
+++ b/packages/SystemUI/res/values-pa/strings.xml
@@ -32,8 +32,7 @@
     <string name="status_bar_no_notifications_title" msgid="4755261167193833213">"ਕੋਈ ਸੂਚਨਾਵਾਂ ਨਹੀਂ"</string>
     <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"ਜਾਰੀ"</string>
     <string name="status_bar_latest_events_title" msgid="6594767438577593172">"ਸੂਚਨਾਵਾਂ"</string>
-    <!-- no translation found for battery_low_title (9187898087363540349) -->
-    <skip />
+    <string name="battery_low_title" msgid="9187898087363540349">"ਬੈਟਰੀ ਛੇਤੀ ਹੀ ਖਤਮ ਹੋ ਸਕਦੀ ਹੈ"</string>
     <string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ"</string>
     <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ, ਤੁਹਾਡੀ ਵਰਤੋਂ ਦੇ ਆਧਾਰ \'ਤੇ ਲਗਭਗ <xliff:g id="TIME">%s</xliff:g> ਬਾਕੀ"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> ਬਾਕੀ, ਲਗਭਗ <xliff:g id="TIME">%s</xliff:g> ਬਾਕੀ"</string>
@@ -96,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ਅਣਲਾਕ ਕਰੋ"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ਫਿੰਗਰਪ੍ਰਿੰਟ ਦੀ ਉਡੀਕ ਹੋ ਰਹੀ ਹੈ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ਆਪਣਾ ਫਿੰਗਰਪ੍ਰਿੰਟ ਵਰਤੇ ਬਿਨਾਂ ਅਣਲਾਕ ਕਰੋ"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ਭੇਜੋ"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ਅਣਲਾਕ ਕਰੋ"</string>
     <string name="phone_label" msgid="2320074140205331708">"ਫ਼ੋਨ ਖੋਲ੍ਹੋ"</string>
@@ -852,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"ਬੈਟਰੀ ਦਾ ਪੱਧਰ <xliff:g id="PERCENTAGE">%d</xliff:g>%% ਤੋਂ ਘੱਟ ਹੋ ਜਾਣ \'ਤੇ ਬੈਟਰੀ ਸੇਵਰ ਸਵੈਚਲਿਤ ਤੌਰ \'ਤੇ ਚਾਲੂ ਹੋ ਜਾਵੇਗਾ।"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ਸੈਟਿੰਗਾਂ"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ਸਮਝ ਲਿਆ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 13aef18..e3db9e6 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Odblokuj"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Czekam na odcisk palca"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Odblokuj bez używania odcisku palca"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Wyślij"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odblokuj"</string>
     <string name="phone_label" msgid="2320074140205331708">"otwórz telefon"</string>
@@ -344,7 +346,7 @@
     <string name="quick_settings_cellular_detail_data_usage" msgid="1964260360259312002">"Użycie danych"</string>
     <string name="quick_settings_cellular_detail_remaining_data" msgid="722715415543541249">"Pozostały limit"</string>
     <string name="quick_settings_cellular_detail_over_limit" msgid="967669665390990427">"Przekroczono limit"</string>
-    <string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Wykorzystano: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
+    <string name="quick_settings_cellular_detail_data_used" msgid="1476810587475761478">"Wykorzyst.: <xliff:g id="DATA_USED">%s</xliff:g>"</string>
     <string name="quick_settings_cellular_detail_data_limit" msgid="56011158504994128">"Limit <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
     <string name="quick_settings_cellular_detail_data_warning" msgid="2440098045692399009">"Ostrzeżenie: <xliff:g id="DATA_LIMIT">%s</xliff:g>"</string>
     <string name="quick_settings_work_mode_label" msgid="7608026833638817218">"Profil do pracy"</string>
@@ -865,4 +867,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Oszczędzanie baterii włączy się automatycznie, gdy poziom naładowania baterii spadnie poniżej <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ustawienia"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index 516df16..ca35506 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Aguardando impressão digital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquear sem usar impressão digital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir telefone"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"O recurso \"Economia de bateria\" será ativado automaticamente depois que a bateria ficar abaixo de <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Configurações"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ok"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 072cc59..73410f2 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"A aguardar a impressão digital…"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquear sem utilizar a sua impressão digital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir telemóvel"</string>
@@ -613,8 +615,8 @@
       <item quantity="one">Esta aplicação está <xliff:g id="PERFORMING_ACTIVITY_0">%1$s</xliff:g>.</item>
     </plurals>
     <plurals name="notification_using" formatted="false" msgid="2211008461429037973">
-      <item quantity="other">a utilizar o(a) <xliff:g id="PERFORMING_ACTIVITY_1">%1$s</xliff:g> e o(a) <xliff:g id="PERFORMING_ACTIVITY_2">%2$s</xliff:g></item>
-      <item quantity="one">a utilizar o(a) <xliff:g id="PERFORMING_ACTIVITY_0">%1$s</xliff:g></item>
+      <item quantity="other">a utilizar: <xliff:g id="PERFORMING_ACTIVITY_1">%1$s</xliff:g> e: <xliff:g id="PERFORMING_ACTIVITY_2">%2$s</xliff:g></item>
+      <item quantity="one">a utilizar: <xliff:g id="PERFORMING_ACTIVITY_0">%1$s</xliff:g></item>
     </plurals>
     <string name="notification_appops_settings" msgid="1028328314935908050">"Definições"</string>
     <string name="notification_appops_ok" msgid="1156966426011011434">"OK"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"A Poupança de bateria é ativada automaticamente quando o nível de bateria está abaixo de <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Definições"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Compreendi"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 516df16..ca35506 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Desbloquear"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Aguardando impressão digital"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Desbloquear sem usar impressão digital"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Enviar"</string>
     <string name="unlock_label" msgid="8779712358041029439">"desbloquear"</string>
     <string name="phone_label" msgid="2320074140205331708">"abrir telefone"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"O recurso \"Economia de bateria\" será ativado automaticamente depois que a bateria ficar abaixo de <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Configurações"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ok"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 1a9f794..003c75e 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Deblocați"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Se așteaptă amprenta"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Deblocați fără amprentă"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Trimiteți"</string>
     <string name="unlock_label" msgid="8779712358041029439">"deblocați"</string>
     <string name="phone_label" msgid="2320074140205331708">"deschideți telefonul"</string>
@@ -860,4 +862,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Economisirea bateriei se va activa automat imediat ce bateria scade sub <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Setări"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index d5fc619..4bf74de 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Разблокировать."</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Отсканируйте отпечаток пальца"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Разблокировать без отпечатка пальца"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Отправить"</string>
     <string name="unlock_label" msgid="8779712358041029439">"Разблокировать."</string>
     <string name="phone_label" msgid="2320074140205331708">"Открыть телефон."</string>
@@ -871,4 +873,6 @@
     <skip />
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Открыть настройки"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"ОК"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-si/strings.xml b/packages/SystemUI/res/values-si/strings.xml
index 0cdc5ee..ea5cf67 100644
--- a/packages/SystemUI/res/values-si/strings.xml
+++ b/packages/SystemUI/res/values-si/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"අඟුල අරින්න"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"ඇඟිලි සලකුණ සඳහා බලා සිටිමින්"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ඔබේ ඇඟිලි සලකුණ භාවිත නොකර අගුළු අරින්න"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"යවන්න"</string>
     <string name="unlock_label" msgid="8779712358041029439">"අඟුල අරින්න"</string>
     <string name="phone_label" msgid="2320074140205331708">"දුරකථනය විවෘත කරන්න"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"බැටරිය <xliff:g id="PERCENTAGE">%d</xliff:g>%%ට වඩා අඩු වූ පසු බැටරි සුරැකුම ස්වයංක්‍රියව ක්‍රියාත්මක කරනු ඇත."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"සැකසීම්"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"තේරුණා"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 9a507fb..4b4789f 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Odomknúť"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čaká sa na odtlačok prsta"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Odomknúť bez použitia odtlačku"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Odoslať"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odomknúť"</string>
     <string name="phone_label" msgid="2320074140205331708">"otvoriť telefón"</string>
@@ -867,4 +869,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Keď batéria klesne pod <xliff:g id="PERCENTAGE">%d</xliff:g> %%, automaticky sa aktivujte Šetrič batérie."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Nastavenia"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Dobre"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index ac67646..5acf837 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Odkleni"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Čakanje na prstni odtis"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Odklepanje brez prstnega odtisa"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Pošlji"</string>
     <string name="unlock_label" msgid="8779712358041029439">"odkleni"</string>
     <string name="phone_label" msgid="2320074140205331708">"odpri telefon"</string>
@@ -871,4 +873,6 @@
     <skip />
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Nastavitve"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"V redu"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sq/strings.xml b/packages/SystemUI/res/values-sq/strings.xml
index 08471a1..b50020a 100644
--- a/packages/SystemUI/res/values-sq/strings.xml
+++ b/packages/SystemUI/res/values-sq/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Shkyç"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Në pritje për gjurmën e gishtit"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Shkyçe pa përdorur gjurmën e gishtit"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Dërgo"</string>
     <string name="unlock_label" msgid="8779712358041029439">"shkyç"</string>
     <string name="phone_label" msgid="2320074140205331708">"hap telefonin"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"\"Kursyesi i baterisë\" do të aktivizohet automatikisht kur bateria të jetë nën <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Cilësimet"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"E kuptova"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 12c860b..a2abcfe 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -96,6 +96,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Откључајте"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Чека се отисак прста"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Откључај без коришћења отиска прста"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Пошаљи"</string>
     <string name="unlock_label" msgid="8779712358041029439">"откључај"</string>
     <string name="phone_label" msgid="2320074140205331708">"отвори телефон"</string>
@@ -858,4 +860,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Уштеда батерије ће се аутоматски укључивати када батерија падне испод <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Подешавања"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Важи"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 43a7a37..347e759 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Lås upp"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Väntar på fingeravtryck"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Lås upp utan att använda fingeravtryck"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Skicka"</string>
     <string name="unlock_label" msgid="8779712358041029439">"lås upp"</string>
     <string name="phone_label" msgid="2320074140205331708">"öppna mobilen"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batterisparläget aktiveras automatiskt när batterinivån är under <xliff:g id="PERCENTAGE">%d</xliff:g> %%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Inställningar"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 6c6f3cc..56fcadd 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -32,7 +32,7 @@
     <string name="status_bar_no_notifications_title" msgid="4755261167193833213">"Hakuna arifa"</string>
     <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"Inaendelea"</string>
     <string name="status_bar_latest_events_title" msgid="6594767438577593172">"Arifa"</string>
-    <string name="battery_low_title" msgid="9187898087363540349">"Huenda chaji ya betri ikaisha baada ya muda mfupi"</string>
+    <string name="battery_low_title" msgid="9187898087363540349">"Huenda chaji itaisha hivi karibuni"</string>
     <string name="battery_low_percent_format" msgid="2900940511201380775">"Imebakisha <xliff:g id="PERCENTAGE">%s</xliff:g>"</string>
     <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"Imesalia <xliff:g id="PERCENTAGE">%s</xliff:g>, itadumu takribani <xliff:g id="TIME">%s</xliff:g> kulingana na jinsi unavyotumia"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"Imesalia <xliff:g id="PERCENTAGE">%s</xliff:g>, itadumu takribani <xliff:g id="TIME">%s</xliff:g>"</string>
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Fungua"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Inasubiri alama ya kidole"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Fungua bila kutumia kitambulisho chako"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Tuma"</string>
     <string name="unlock_label" msgid="8779712358041029439">"fungua"</string>
     <string name="phone_label" msgid="2320074140205331708">"fungua simu"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Kiokoa Betri kitawaka kiotomatiki baada ya chaji ya betri kufika chini ya <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Mipangilio"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Nimeelewa"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ta/strings.xml b/packages/SystemUI/res/values-ta/strings.xml
index 2236a56..db6a518 100644
--- a/packages/SystemUI/res/values-ta/strings.xml
+++ b/packages/SystemUI/res/values-ta/strings.xml
@@ -32,8 +32,7 @@
     <string name="status_bar_no_notifications_title" msgid="4755261167193833213">"அறிவிப்புகள் இல்லை"</string>
     <string name="status_bar_ongoing_events_title" msgid="1682504513316879202">"செயலில் இருக்கும்"</string>
     <string name="status_bar_latest_events_title" msgid="6594767438577593172">"அறிவிப்புகள்"</string>
-    <!-- no translation found for battery_low_title (9187898087363540349) -->
-    <skip />
+    <string name="battery_low_title" msgid="9187898087363540349">"பேட்டரி விரைவில் தீர்ந்துவிடக்கூடும்"</string>
     <string name="battery_low_percent_format" msgid="2900940511201380775">"<xliff:g id="PERCENTAGE">%s</xliff:g> உள்ளது"</string>
     <string name="battery_low_percent_format_hybrid" msgid="6838677459286775617">"<xliff:g id="PERCENTAGE">%s</xliff:g> பேட்டரி மீதமுள்ளது. உங்கள் உபயோகத்தைப் பொறுத்து, இதைச் சுமார் <xliff:g id="TIME">%s</xliff:g> மணி நேரத்திற்குப் பயன்படுத்தலாம்"</string>
     <string name="battery_low_percent_format_hybrid_short" msgid="9025795469949145586">"<xliff:g id="PERCENTAGE">%s</xliff:g> மீதமுள்ளது, இதைச் சுமார் <xliff:g id="TIME">%s</xliff:g> மணி நேரத்திற்குப் பயன்படுத்தலாம்"</string>
@@ -96,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"திற"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"கைரேகைக்காகக் காத்திருக்கிறது"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"உங்கள் கைரேகையைப் பயன்படுத்தாமல் திறக்கவும்"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"அனுப்பு"</string>
     <string name="unlock_label" msgid="8779712358041029439">"திற"</string>
     <string name="phone_label" msgid="2320074140205331708">"ஃபோனைத் திற"</string>
@@ -852,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"பேட்டரியின் அளவு <xliff:g id="PERCENTAGE">%d</xliff:g>%%க்குக் கீழ் குறையும்போது, பேட்டரி சேமிப்பான் தானாகவே ஆன் செய்யப்படும்."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"அமைப்புகள்"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"சரி"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml
index 2291802..3433e7b 100644
--- a/packages/SystemUI/res/values-te/strings.xml
+++ b/packages/SystemUI/res/values-te/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"అన్‌లాక్ చేయి"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"వేలిముద్ర కోసం వేచి ఉంది"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"మీ వేలిముద్రను ఉపయోగించకుండా అన్‌లాక్ చేయండి"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"పంపు"</string>
     <string name="unlock_label" msgid="8779712358041029439">"అన్‌లాక్ చేయి"</string>
     <string name="phone_label" msgid="2320074140205331708">"ఫోన్‌ను తెరువు"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"బ్యాటరీ <xliff:g id="PERCENTAGE">%d</xliff:g>%% కంటే తగ్గినప్పుడు బ్యాటరీ సేవర్ ఆటోమేటిక్‌గా ఆన్ అవుతుంది."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"సెట్టింగ్‌లు"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"అర్థమైంది"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 7ee7ed4..7fb42d6 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"ปลดล็อก"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"กำลังรอลายนิ้วมือ"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"ปลดล็อกโดยไม่ต้องใช้ลายนิ้วมือ"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"ส่ง"</string>
     <string name="unlock_label" msgid="8779712358041029439">"ปลดล็อก"</string>
     <string name="phone_label" msgid="2320074140205331708">"เปิดโทรศัพท์"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"โหมดประหยัดแบตเตอรี่จะเปิดโดยอัตโนมัติเมื่อแบตเตอรี่เหลือไม่ถึง <xliff:g id="PERCENTAGE">%d</xliff:g>%%"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"การตั้งค่า"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"รับทราบ"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index af97e74..7ff647e 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"I-unlock"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Naghihintay ng fingerprint"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"I-unlock nang hindi ginagamit ang iyong fingerprint"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Ipadala"</string>
     <string name="unlock_label" msgid="8779712358041029439">"i-unlock"</string>
     <string name="phone_label" msgid="2320074140205331708">"buksan ang telepono"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Awtomatikong mao-on ang Pangtipid sa Baterya kapag mas mababa na sa <xliff:g id="PERCENTAGE">%d</xliff:g>%% ang baterya."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Mga Setting"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 02d4cc1..1c30eed 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Kilidi aç"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Parmak izi bekleniyor"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Kilidi, parmak iziniz olmadan açın"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Gönder"</string>
     <string name="unlock_label" msgid="8779712358041029439">"kilidi aç"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefonu aç"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Pil %%<xliff:g id="PERCENTAGE">%d</xliff:g> düzeyinin altına düştüğünde Pil Tasarrufu otomatik olarak açılacaktır."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Ayarlar"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Anladım"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 1a7bbd2..0d9b2f6 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -97,6 +97,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Розблокувати"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Очікується відбиток пальця"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Розблокувати без цифрового відбитка"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Надіслати"</string>
     <string name="unlock_label" msgid="8779712358041029439">"розблокувати"</string>
     <string name="phone_label" msgid="2320074140205331708">"відкрити телефон"</string>
@@ -867,4 +869,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Режим економії заряду акумулятора вмикатиметься автоматично, коли рівень нижчий за <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Налаштування"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ur/strings.xml b/packages/SystemUI/res/values-ur/strings.xml
index 5533307..8b919de 100644
--- a/packages/SystemUI/res/values-ur/strings.xml
+++ b/packages/SystemUI/res/values-ur/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"غیر مقفل کریں"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"فنگر پرنٹ کا انتظار ہے"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"فنگر پرنٹ استعمال کیے بغیرغیر مقفل کریں"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"بھیجیں"</string>
     <string name="unlock_label" msgid="8779712358041029439">"غیر مقفل کریں"</string>
     <string name="phone_label" msgid="2320074140205331708">"فون کھولیں"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"بیٹری کے <xliff:g id="PERCENTAGE">%d</xliff:g>%% سے کم ہونے پر بیٹری سیور خودکار طور پر آن ہو جائے گا۔"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"ترتیبات"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"سمجھ آ گئی"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-uz/strings.xml b/packages/SystemUI/res/values-uz/strings.xml
index 50cddf6..e92b648 100644
--- a/packages/SystemUI/res/values-uz/strings.xml
+++ b/packages/SystemUI/res/values-uz/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Qulfdan chiqarish"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Barmoq izingizni skanerlang"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Barmoq izisiz qulfdan chiqarish"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Yuborish"</string>
     <string name="unlock_label" msgid="8779712358041029439">"qulfdan chiqarish"</string>
     <string name="phone_label" msgid="2320074140205331708">"telefonni ochish"</string>
@@ -503,21 +505,21 @@
     <string name="hidden_notifications_setup" msgid="41079514801976810">"Sozlash"</string>
     <string name="zen_mode_and_condition" msgid="4462471036429759903">"<xliff:g id="ZEN_MODE">%1$s</xliff:g>. <xliff:g id="EXIT_CONDITION">%2$s</xliff:g>"</string>
     <string name="volume_zen_end_now" msgid="6930243045593601084">"O‘chiring"</string>
-    <string name="accessibility_volume_settings" msgid="4915364006817819212">"Ovoz sozlamalari"</string>
+    <string name="accessibility_volume_settings" msgid="4915364006817819212">"Tovush sozlamalari"</string>
     <string name="accessibility_volume_expand" msgid="5946812790999244205">"Yoyish"</string>
     <string name="accessibility_volume_collapse" msgid="3609549593031810875">"Yig‘ish"</string>
     <string name="accessibility_output_chooser" msgid="8185317493017988680">"Audiochiqish qurilmasini almashtirish"</string>
     <string name="screen_pinning_title" msgid="3273740381976175811">"Ekran qadaldi"</string>
     <string name="screen_pinning_description" msgid="8909878447196419623">"Ekran yechilmaguncha u o‘zgarmas holatda qoladi. Uni yechish uchun “Orqaga” va “Umumiy ma’lumot” tugmalarini bosib turing."</string>
-    <string name="screen_pinning_description_recents_invisible" msgid="8281145542163727971">"Ekran yechilmaguncha u o‘zgarmas holatda qoladi. Uni yechish uchun Orqaga va Boshi tugmalarini bosib turing."</string>
+    <string name="screen_pinning_description_recents_invisible" msgid="8281145542163727971">"Ekran yechib olinmagunicha u mahkamlangan holatda qoladi. Uni yechish uchun Orqaga va Asosiy tugmalarni birga bosib turing."</string>
     <string name="screen_pinning_description_accessible" msgid="426190689254018656">"Ekran yechilmaguncha u o‘zgarmas holatda qoladi. Uni yechish uchun “Umumiy ma’lumot” tugmasini bosib turing."</string>
-    <string name="screen_pinning_description_recents_invisible_accessible" msgid="6134833683151189507">"Ekran yechilmaguncha u o‘zgarmas holatda qoladi. Uni yechish uchun Orqaga va Boshi tugmlarini bosib turing."</string>
+    <string name="screen_pinning_description_recents_invisible_accessible" msgid="6134833683151189507">"Ekran yechib olinmagunicha u mahkamlangan holatda qoladi. Uni yechish uchun Orqaga va Asosiy tugmlarni birga bosib turing."</string>
     <string name="screen_pinning_toast" msgid="2266705122951934150">"Bu ekrandan chiqish uchun Orqaga va Menyu tugmalarini bosib turing"</string>
     <string name="screen_pinning_toast_recents_invisible" msgid="8252402309499161281">"Bu ekrandan chiqish uchun Orqaga va Boshi tugmalarini bosib turing"</string>
     <string name="screen_pinning_positive" msgid="3783985798366751226">"OK"</string>
     <string name="screen_pinning_negative" msgid="3741602308343880268">"Yo‘q, kerakmas"</string>
     <string name="screen_pinning_start" msgid="1022122128489278317">"Ekran mahkamlandi"</string>
-    <string name="screen_pinning_exit" msgid="5187339744262325372">"Ekran olib tashlandi"</string>
+    <string name="screen_pinning_exit" msgid="5187339744262325372">"Ekran yechildi"</string>
     <string name="quick_settings_reset_confirmation_title" msgid="748792586749897883">"<xliff:g id="TILE_LABEL">%1$s</xliff:g> berkitilsinmi?"</string>
     <string name="quick_settings_reset_confirmation_message" msgid="2235970126803317374">"Keyingi safar sozlamalardan yoqilgan paydo bo‘ladi."</string>
     <string name="quick_settings_reset_confirmation_button" msgid="2660339101868367515">"Berkitish"</string>
@@ -775,7 +777,7 @@
     <string name="accessibility_quick_settings_collapse" msgid="1792625797142648105">"Tezkor sozlamalarni yopish."</string>
     <string name="accessibility_quick_settings_alarm_set" msgid="1863000242431528676">"Signal o‘rnatildi."</string>
     <string name="accessibility_quick_settings_user" msgid="1567445362870421770">"<xliff:g id="ID_1">%s</xliff:g> sifatida kirgansiz"</string>
-    <string name="data_connection_no_internet" msgid="4503302451650972989">"Internet yo‘q"</string>
+    <string name="data_connection_no_internet" msgid="4503302451650972989">"Internetga ulanmagan"</string>
     <string name="accessibility_quick_settings_open_details" msgid="4230931801728005194">"Tafsilotlarini ko‘rsatish."</string>
     <string name="accessibility_quick_settings_open_settings" msgid="7806613775728380737">"<xliff:g id="ID_1">%s</xliff:g> sozlamalarini ochish."</string>
     <string name="accessibility_quick_settings_edit" msgid="7839992848995240393">"Sozlamalar tartibini o‘zgartirish."</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Batareya quvvati <xliff:g id="PERCENTAGE">%d</xliff:g>%% ga tushganda, quvvat tejash rejimi avtomatik ravishda yoqiladi."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Sozlamalar"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 1d5109b..8f903c8 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Mở khóa"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Đang chờ vân tay"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Mở khóa không dùng vân tay của bạn"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Gửi"</string>
     <string name="unlock_label" msgid="8779712358041029439">"mở khóa"</string>
     <string name="phone_label" msgid="2320074140205331708">"mở điện thoại"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Trình tiết kiệm pin sẽ tự động bật khi mức pin thấp hơn <xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Cài đặt"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"OK"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 2a7717e..efb350b 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"解锁"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"正在等待提供指纹"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"不使用指纹解锁"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"发送"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解锁"</string>
     <string name="phone_label" msgid="2320074140205331708">"打开电话"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"一旦电池电量降到 <xliff:g id="PERCENTAGE">%d</xliff:g>%% 以下,省电模式就会自动开启。"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"设置"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"知道了"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 485e06d..6351859 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"解鎖"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"正在等待指紋"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"不使用指紋解鎖"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"傳送"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解鎖"</string>
     <string name="phone_label" msgid="2320074140205331708">"開啟電話"</string>
@@ -853,4 +855,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"省電模式將會在電量低於 <xliff:g id="PERCENTAGE">%d</xliff:g>%% 時自動開啟。"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"設定"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"知道了"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 12c2fc1..97647d0 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"解除鎖定"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"正在等候指紋"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"不使用指紋進行解鎖"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"傳送"</string>
     <string name="unlock_label" msgid="8779712358041029439">"解除鎖定"</string>
     <string name="phone_label" msgid="2320074140205331708">"開啟電話"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"節約耗電量模式會在電量低於 <xliff:g id="PERCENTAGE">%d</xliff:g>%% 時自動開啟。"</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"設定"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"我知道了"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 359c173..8c45f53 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -95,6 +95,8 @@
     <string name="accessibility_unlock_button" msgid="128158454631118828">"Vula"</string>
     <string name="accessibility_waiting_for_fingerprint" msgid="4808860050517462885">"Ilindele izigxivizo zeminwe"</string>
     <string name="accessibility_unlock_without_fingerprint" msgid="7541705575183694446">"Vula ngaphandle kokusebenzisa izigxivizo zakho zeminwe"</string>
+    <!-- no translation found for accessibility_scanning_face (769545173211758586) -->
+    <skip />
     <string name="accessibility_send_smart_reply" msgid="7766727839703044493">"Thumela"</string>
     <string name="unlock_label" msgid="8779712358041029439">"vula"</string>
     <string name="phone_label" msgid="2320074140205331708">"vula ifoni"</string>
@@ -851,4 +853,6 @@
     <string name="auto_saver_enabled_text" msgid="874711029884777579">"Isilondolozi sebhethri sizovuleka ngokuzenzakalelayo uma ibhethri lifika ngaphansi kuka-<xliff:g id="PERCENTAGE">%d</xliff:g>%%."</string>
     <string name="open_saver_setting_action" msgid="8314624730997322529">"Izilungiselelo"</string>
     <string name="auto_saver_okay_action" msgid="2701221740227683650">"Ngiyezwa"</string>
+    <!-- no translation found for heap_dump_tile_name (9141031328971226374) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values/attrs_car.xml b/packages/SystemUI/res/values/attrs_car.xml
index 99d2425..41e0786 100644
--- a/packages/SystemUI/res/values/attrs_car.xml
+++ b/packages/SystemUI/res/values/attrs_car.xml
@@ -63,4 +63,32 @@
         <attr name="hvacPropertyId" format="integer"/>
         <attr name="hvacTempFormat" format="string"/>
     </declare-styleable>
+
+    <declare-styleable name="carVolumeItems"/>
+    <declare-styleable name="carVolumeItems_item">
+        <!-- Align with AudioAttributes.USAGE_* -->
+        <attr name="usage">
+            <enum name="unknown" value="0"/>
+            <enum name="media" value="1"/>
+            <enum name="voice_communication" value="2"/>
+            <enum name="voice_communication_signalling" value="3"/>
+            <enum name="alarm" value="4"/>
+            <enum name="notification" value="5"/>
+            <enum name="notification_ringtone" value="6"/>
+            <enum name="notification_communication_request" value="7"/>
+            <enum name="notification_communication_instant" value="8"/>
+            <enum name="notification_communication_delayed" value="9"/>
+            <enum name="notification_event" value="10"/>
+            <enum name="assistance_accessibility" value="11"/>
+            <enum name="assistance_navigation_guidance" value="12"/>
+            <enum name="assistance_sonification" value="13"/>
+            <enum name="game" value="14"/>
+            <!-- hidden, do not use -->
+            <!-- enum name="virtual_source" value="15"/ -->
+            <enum name="assistant" value="16"/>
+        </attr>
+
+        <!-- Icon resource ids to render on UI -->
+        <attr name="icon" format="reference"/>
+    </declare-styleable>
 </resources>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index fd25c40..efcca63 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -95,7 +95,7 @@
     <color name="notification_gear_color">#ff757575</color>
 
     <!-- The "inside" of a notification, reached via longpress -->
-    <color name="notification_guts_bg_color">#eeeeee</color>
+    <color name="notification_guts_bg_color">#f8f9fa</color>
 
     <color name="assist_orb_color">#ffffff</color>
 
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 88e3331..251589b 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -383,6 +383,8 @@
     <item type="id" name="action_split_task_to_right" />
     <item type="id" name="action_split_task_to_top" />
 
+    <item type="id" name="action_toggle_overview"/>
+
     <!-- Whether or not the gear icon on notifications should be shown. The gear is shown when the
          the notification is not swiped enough to dismiss it. -->
     <bool name="config_showNotificationGear">true</bool>
@@ -491,4 +493,6 @@
          This name is in the ComponentName flattened format (package/class)  -->
     <string name="config_screenshotEditor" translatable="false"></string>
 
+    <!-- On debuggable builds, alert the user if SystemUI PSS goes over this number (in kb) -->
+    <integer name="watch_heap_limit">256000</integer>
 </resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 438d2f5..ad74725 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -158,8 +158,20 @@
     <!-- The space around a notification menu item  -->
     <dimen name="notification_menu_icon_padding">20dp</dimen>
 
-    <!-- The veritical space around the buttons in the inline settings -->
-    <dimen name="notification_guts_button_spacing">20dp</dimen>
+    <!-- The vertical space around the buttons in the inline settings -->
+    <dimen name="notification_guts_button_spacing">6dp</dimen>
+
+    <!-- Extra horizontal space for properly aligning guts buttons with the notification content -->
+    <dimen name="notification_guts_button_side_margin">8dp</dimen>
+
+    <!-- The vertical padding a notification guts button has to fulfill the 48dp touch target -->
+    <dimen name="notification_guts_button_vertical_padding">14dp</dimen>
+
+    <!-- The horizontal padding for notification guts buttons-->
+    <dimen name="notification_guts_button_horizontal_padding">8dp</dimen>
+
+    <!-- The horizontal space around the buttons in the inline settings -->
+    <dimen name="notification_guts_button_horizontal_spacing">8dp</dimen>
 
     <!-- The height of the header in inline settings -->
     <dimen name="notification_guts_header_height">24dp</dimen>
@@ -930,12 +942,13 @@
     <!-- Home button padding for sizing -->
     <dimen name="home_padding">16dp</dimen>
 
-    <!-- Smart reply button -->
+    <!-- Smart reply button. Total height 48dp, visible height 32dp. -->
     <dimen name="smart_reply_button_spacing">8dp</dimen>
-    <dimen name="smart_reply_button_padding_vertical">10dp</dimen>
-    <dimen name="smart_reply_button_padding_horizontal_single_line">16dp</dimen>
-    <dimen name="smart_reply_button_padding_horizontal_double_line">16dp</dimen>
-    <dimen name="smart_reply_button_min_height">32dp</dimen>
+    <dimen name="smart_reply_button_padding_vertical">14dp</dimen>
+    <!-- Note: The following two paddings need to be different until b/78876518 is fixed. -->
+    <dimen name="smart_reply_button_padding_horizontal_single_line">20dp</dimen>
+    <dimen name="smart_reply_button_padding_horizontal_double_line">19dp</dimen>
+    <dimen name="smart_reply_button_min_height">48dp</dimen>
     <dimen name="smart_reply_button_font_size">14sp</dimen>
     <dimen name="smart_reply_button_line_spacing_extra">6sp</dimen> <!-- Total line height 20sp. -->
 
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 697ab06..95ccc3c 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -240,6 +240,8 @@
     <string name="accessibility_waiting_for_fingerprint">Waiting for fingerprint</string>
     <!-- Accessibility action of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_unlock_without_fingerprint">Unlock without using your fingerprint</string>
+    <!-- Content description of the Trusted Face icon for accessibility. [CHAR LIMIT=NONE] -->
+    <string name="accessibility_scanning_face">Scanning face</string>
     <!-- Click action label for accessibility for the smart reply buttons (not shown on-screen).". [CHAR LIMIT=NONE] -->
     <string name="accessibility_send_smart_reply">Send</string>
     <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] -->
@@ -860,6 +862,9 @@
     <!-- Recents: Accessibility split to the right -->
     <string name="recents_accessibility_split_screen_right">Split screen to the right</string>
 
+    <!-- QuickStep: Accessibility to toggle overview [CHAR LIMIT=40] -->
+    <string name="quick_step_accessibility_toggle_overview">Toggle Overview</string>
+
     <!-- Expanded Status Bar Header: Battery Charged [CHAR LIMIT=40] -->
     <string name="expanded_header_battery_charged">Charged</string>
 
@@ -1358,6 +1363,13 @@
     <string name="volume_stream_content_description_vibrate_a11y">%1$s. Tap to set to vibrate.</string>
     <string name="volume_stream_content_description_mute_a11y">%1$s. Tap to mute.</string>
 
+    <!-- Hint for accessibility. For example: double tap to mute [CHAR_LIMIT=NONE] -->
+    <string name="volume_ringer_hint_mute">mute</string>
+    <!-- Hint for accessibility. For example: double tap to unmute [CHAR_LIMIT=NONE] -->
+    <string name="volume_ringer_hint_unmute">unmute</string>
+    <!-- Hint for accessibility. For example: double tap to vibrate [CHAR_LIMIT=NONE] -->
+    <string name="volume_ringer_hint_vibrate">vibrate</string>
+
     <string name="volume_dialog_title">%s volume controls</string>
 
     <string name="volume_dialog_ringer_guidance_ring">Calls and notifications will ring (<xliff:g id="volume level" example="56">%1$s</xliff:g>)</string>
@@ -1565,21 +1577,20 @@
     <!-- Notification: Control panel: Label that displays when the app's notifications cannot be blocked. -->
     <string name="notification_unblockable_desc">These notifications can\'t be turned off</string>
 
-    <string name="notification_appops_camera_active">camera</string>
-
-    <string name="notification_appops_microphone_active">microphone</string>
-
-    <string name="notification_appops_overlay_active">displaying over other apps on your screen</string>
-
-    <plurals name="notification_appops">
-        <item quantity="one">This app is <xliff:g id="performing activity" example="using the camera">%1$s</xliff:g>.</item>
-        <item quantity="other">This app is <xliff:g id="performing activity" example="using the camera">%1$s</xliff:g> and <xliff:g id="performing activity" example="using the microphone">%2$s</xliff:g>.</item>
-    </plurals>
-
-    <plurals name="notification_using">
-        <item quantity="one">using the <xliff:g id="performing activity" example="camera">%1$s</xliff:g></item>
-        <item quantity="other">using the <xliff:g id="performing activity" example="camera">%1$s</xliff:g> and <xliff:g id="performing activity" example="microphone">%2$s</xliff:g></item>
-    </plurals>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_camera">This app is using the camera.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_microphone">This app is using the microphone.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_overlay">This app is displaying over other apps on your screen.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_camera_mic">This app is using the microphone and camera.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_camera_overlay">This app is displaying over other apps on your screen and using the camera.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_mic_overlay">This app is displaying over other apps on your screen and using the microphone.</string>
+    <!-- Notification Inline controls: describes what the app is doing in the background [CHAR_LIMIT=NONE] -->
+    <string name="appops_camera_mic_overlay">This app is displaying over other apps on your screen and using the microphone and camera.</string>
 
     <string name="notification_appops_settings">Settings</string>
     <string name="notification_appops_ok">OK</string>
@@ -2225,4 +2236,9 @@
 
     <!-- URl of the webpage that explains battery saver. -->
     <string name="help_uri_battery_saver_learn_more_link_target" translatable="false"></string>
+
+    <!-- Name for a quick settings tile, used only by platform developers, to extract the SystemUI process memory and send it to another
+         app for debugging. Will not be seen by users. [CHAR LIMIT=20] -->
+    <string name="heap_dump_tile_name">Dump SysUI Heap</string>
+
 </resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 1e19534..c9b14dc 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -320,7 +320,7 @@
         <item name="wallpaperTextColor">@*android:color/primary_text_material_light</item>
         <item name="wallpaperTextColorSecondary">@*android:color/secondary_text_material_light</item>
         <item name="android:colorError">@*android:color/error_color_material_light</item>
-        <item name="android:colorControlHighlight">@*android:color/primary_text_material_light</item>
+        <item name="android:colorControlHighlight">#40000000</item>
         <item name="passwordStyle">@style/PasswordTheme.Light</item>
     </style>
 
@@ -483,8 +483,10 @@
         <item name="android:background">@drawable/btn_borderless_rect</item>
         <item name="android:gravity">center</item>
         <item name="android:focusable">true</item>
-        <item name="android:paddingStart">8dp</item>
-        <item name="android:paddingEnd">8dp</item>
+        <item name="android:paddingTop">@dimen/notification_guts_button_vertical_padding</item>
+        <item name="android:paddingBottom">@dimen/notification_guts_button_vertical_padding</item>
+        <item name="android:paddingLeft">@dimen/notification_guts_button_horizontal_padding</item>
+        <item name="android:paddingRight">@dimen/notification_guts_button_horizontal_padding</item>
     </style>
 
     <style name="TextAppearance.HeadsUpStatusBarText"
diff --git a/packages/SystemUI/res/xml/car_volume_items.xml b/packages/SystemUI/res/xml/car_volume_items.xml
new file mode 100644
index 0000000..742dfdd
--- /dev/null
+++ b/packages/SystemUI/res/xml/car_volume_items.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ *
+ * 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.
+*/
+-->
+
+<!--
+  Defines all possible items on car volume settings UI, keyed by usage.
+
+  This enables the CarSettings UI to associate VolumeGroups surfaced by
+  CarAudioManager.getVolumeGroupCount with renderable assets (ie: title, icon)
+  for presentation.
+
+  Order matters in this configuration. If one volume group contains multiple
+  audio usages, the first one appears in this file would be picked to be
+  presented on UI.
+
+  When overriding this configuration, please consult also the
+  car_volume_groups.xml, which is read by car audio service.
+-->
+<carVolumeItems xmlns:car="http://schemas.android.com/apk/res-auto">
+  <item car:usage="unknown"
+        car:icon="@drawable/car_ic_music"/>
+  <item car:usage="media"
+        car:icon="@drawable/car_ic_music"/>
+  <item car:usage="voice_communication"
+        car:icon="@*android:drawable/ic_audio_ring_notif"/>
+  <item car:usage="voice_communication_signalling"
+        car:icon="@*android:drawable/ic_audio_ring_notif"/>
+  <item car:usage="alarm"
+        car:icon="@*android:drawable/ic_audio_alarm"/>
+  <item car:usage="notification"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="notification_ringtone"
+        car:icon="@*android:drawable/ic_audio_ring_notif"/>
+  <item car:usage="notification_communication_request"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="notification_communication_instant"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="notification_communication_delayed"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="notification_event"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="assistance_accessibility"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="assistance_navigation_guidance"
+        car:icon="@drawable/car_ic_navigation"/>
+  <item car:usage="assistance_sonification"
+        car:icon="@drawable/car_ic_notification"/>
+  <item car:usage="game"
+        car:icon="@drawable/car_ic_music"/>
+  <item car:usage="assistant"
+        car:icon="@drawable/car_ic_music"/>
+</carVolumeItems>
+
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java
index e93e78d..952c8ae 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/MetricsLoggerCompat.java
@@ -17,10 +17,12 @@
 package com.android.systemui.shared.system;
 
 import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 
 public class MetricsLoggerCompat {
 
     private final MetricsLogger mMetricsLogger;
+    public static final int OVERVIEW_ACTIVITY = MetricsEvent.OVERVIEW_ACTIVITY;
 
     public MetricsLoggerCompat() {
         mMetricsLogger = new MetricsLogger();
@@ -37,4 +39,12 @@
     public void visible(int category) {
         mMetricsLogger.visible(category);
     }
+
+    public void hidden(int category) {
+        mMetricsLogger.hidden(category);
+    }
+
+    public void visibility(int category, boolean visible) {
+        mMetricsLogger.visibility(category, visible);
+    }
 }
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java
new file mode 100644
index 0000000..4a0f89b
--- /dev/null
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TonalCompat.java
@@ -0,0 +1,53 @@
+/*
+ * 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.systemui.shared.system;
+
+import android.app.WallpaperColors;
+import android.content.Context;
+
+import com.android.internal.colorextraction.ColorExtractor.GradientColors;
+import com.android.internal.colorextraction.types.Tonal;
+
+public class TonalCompat {
+
+    private final Tonal mTonal;
+
+    public TonalCompat(Context context) {
+        mTonal = new Tonal(context);
+    }
+
+    public ExtractionInfo extractDarkColors(WallpaperColors colors) {
+        GradientColors darkColors = new GradientColors();
+        mTonal.extractInto(colors, new GradientColors(), darkColors, new GradientColors());
+
+        ExtractionInfo result = new ExtractionInfo();
+        result.mainColor = darkColors.getMainColor();
+        result.secondaryColor = darkColors.getSecondaryColor();
+        result.supportsDarkText = darkColors.supportsDarkText();
+        if (colors != null) {
+            result.supportsDarkTheme =
+                    (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0;
+        }
+        return result;
+    }
+
+    public static class ExtractionInfo {
+        public int mainColor;
+        public int secondaryColor;
+        public boolean supportsDarkText;
+        public boolean supportsDarkTheme;
+    }
+}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
index 07b980e..ed2f831 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/WindowManagerWrapper.java
@@ -26,6 +26,10 @@
 import android.view.WindowManager;
 import android.view.WindowManagerGlobal;
 
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_RIGHT;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_BOTTOM;
+import static android.view.WindowManagerPolicyConstants.NAV_BAR_LEFT;
+
 import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecsFuture;
 import com.android.systemui.shared.recents.view.RecentsTransition;
 
@@ -58,6 +62,11 @@
     public static final int TRANSIT_KEYGUARD_OCCLUDE = WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
     public static final int TRANSIT_KEYGUARD_UNOCCLUDE = WindowManager.TRANSIT_KEYGUARD_UNOCCLUDE;
 
+    public static final int NAV_BAR_POS_INVALID = -1;
+    public static final int NAV_BAR_POS_LEFT = NAV_BAR_LEFT;
+    public static final int NAV_BAR_POS_RIGHT = NAV_BAR_RIGHT;
+    public static final int NAV_BAR_POS_BOTTOM = NAV_BAR_BOTTOM;
+
     public static final int ACTIVITY_TYPE_STANDARD = WindowConfiguration.ACTIVITY_TYPE_STANDARD;
 
     public static final int WINDOWING_MODE_UNDEFINED = WindowConfiguration.WINDOWING_MODE_UNDEFINED;
@@ -141,4 +150,20 @@
             Log.w(TAG, "Failed to set recents visibility");
         }
     }
+
+    /**
+     * @return The side of the screen where navigation bar is positioned.
+     * @see #NAV_BAR_POS_RIGHT
+     * @see #NAV_BAR_POS_LEFT
+     * @see #NAV_BAR_POS_BOTTOM
+     * @see #NAV_BAR_POS_INVALID
+     */
+    public int getNavBarPosition() {
+        try {
+            return WindowManagerGlobal.getWindowManagerService().getNavBarPosition();
+        } catch (RemoteException e) {
+            Log.w(TAG, "Failed to get nav bar position");
+        }
+        return NAV_BAR_POS_INVALID;
+    }
 }
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
index 7cc37c4..81cf3ae 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPasswordView.java
@@ -140,12 +140,6 @@
         mImm.hideSoftInputFromWindow(getWindowToken(), 0);
     }
 
-    @Override
-    public void reset() {
-        super.reset();
-        mPasswordEntry.requestFocus();
-    }
-
     private void updateSwitchImeButton() {
         // If there's more than one IME, enable the IME switcher button
         final boolean wasVisible = mSwitchImeButton.getVisibility() == View.VISIBLE;
@@ -193,8 +187,6 @@
         // Set selected property on so the view can send accessibility events.
         mPasswordEntry.setSelected(true);
 
-        mPasswordEntry.requestFocus();
-
         mSwitchImeButton = findViewById(R.id.switch_ime_button);
         mSwitchImeButton.setOnClickListener(new OnClickListener() {
             @Override
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
index 1d3f9a1..a2befef 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPinBasedInputView.java
@@ -23,13 +23,16 @@
 import android.view.MotionEvent;
 import android.view.View;
 
+import com.android.internal.annotations.VisibleForTesting;
+
 /**
  * A Pin based Keyguard input view
  */
 public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
         implements View.OnKeyListener, View.OnTouchListener {
 
-    protected PasswordTextView mPasswordEntry;
+    @VisibleForTesting
+    PasswordTextView mPasswordEntry;
     private View mOkButton;
     private View mDeleteButton;
     private View mButton0;
@@ -52,12 +55,6 @@
     }
 
     @Override
-    public void reset() {
-        mPasswordEntry.requestFocus();
-        super.reset();
-    }
-
-    @Override
     protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) {
         // send focus to the password field
         return mPasswordEntry.requestFocus(direction, previouslyFocusedRect);
@@ -238,6 +235,12 @@
     }
 
     @Override
+    public void onResume(int reason) {
+        super.onResume(reason);
+        mPasswordEntry.requestFocus();
+    }
+
+    @Override
     public boolean onTouch(View v, MotionEvent event) {
         if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
             doHapticKeyClick();
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
index c31cea2..f066e34 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceView.java
@@ -57,6 +57,7 @@
 
 import androidx.slice.Slice;
 import androidx.slice.SliceItem;
+import androidx.slice.SliceManager;
 import androidx.slice.core.SliceQuery;
 import androidx.slice.widget.ListContent;
 import androidx.slice.widget.RowContent;
@@ -145,17 +146,13 @@
     }
 
     private void showSlice() {
-        if (mPulsing) {
+        if (mPulsing || mSlice == null) {
             mTitle.setVisibility(GONE);
             mRow.setVisibility(GONE);
             mContentChangeListener.accept(getLayoutTransition() != null);
             return;
         }
 
-        if (mSlice == null) {
-            return;
-        }
-
         ListContent lc = new ListContent(getContext(), mSlice);
         mHasHeader = lc.hasHeader();
         List<SliceItem> subItems = lc.getRowItems();
@@ -170,18 +167,6 @@
             SliceItem mainTitle = header.getTitleItem();
             CharSequence title = mainTitle != null ? mainTitle.getText() : null;
             mTitle.setText(title);
-
-            // Check if we're already ellipsizing the text.
-            // We're going to figure out the best possible line break if not.
-            Layout layout = mTitle.getLayout();
-            if (layout != null){
-                final int lineCount = layout.getLineCount();
-                if (lineCount > 0) {
-                    if (layout.getEllipsisCount(lineCount - 1) == 0) {
-                        mTitle.setText(findBestLineBreak(title));
-                    }
-                }
-            }
         }
 
         mClickActions.clear();
@@ -385,6 +370,32 @@
         mIconSize = mContext.getResources().getDimensionPixelSize(R.dimen.widget_icon_size);
     }
 
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+
+        // Find best ellipsis strategy for the title.
+        // Done on onMeasure since TextView#getLayout needs a measure pass to calculate its bounds.
+        Layout layout = mTitle.getLayout();
+        if (layout != null) {
+            final int lineCount = layout.getLineCount();
+            if (lineCount > 0) {
+                if (layout.getEllipsisCount(lineCount - 1) == 0) {
+                    CharSequence title = mTitle.getText();
+                    CharSequence bestLineBreak = findBestLineBreak(title);
+                    if (!TextUtils.equals(title, bestLineBreak)) {
+                        mTitle.setText(bestLineBreak);
+                    }
+                }
+            }
+        }
+    }
+
+    public void refresh() {
+        Slice slice = SliceManager.getInstance(getContext()).bindSlice(mKeyguardSliceUri);
+        onChanged(slice);
+    }
+
     public static class Row extends LinearLayout {
 
         /**
@@ -446,10 +457,11 @@
         @Override
         protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
             int width = MeasureSpec.getSize(widthMeasureSpec);
-            for (int i = 0; i < getChildCount(); i++) {
+            int childCount = getChildCount();
+            for (int i = 0; i < childCount; i++) {
                 View child = getChildAt(i);
                 if (child instanceof KeyguardSliceButton) {
-                    ((KeyguardSliceButton) child).setMaxWidth(width / 2);
+                    ((KeyguardSliceButton) child).setMaxWidth(width / childCount);
                 }
             }
             super.onMeasure(widthMeasureSpec, heightMeasureSpec);
@@ -477,12 +489,10 @@
     @VisibleForTesting
     static class KeyguardSliceButton extends Button implements
             ConfigurationController.ConfigurationListener {
-        private final Context mContext;
 
         public KeyguardSliceButton(Context context) {
             super(context, null /* attrs */, 0 /* styleAttr */,
                     com.android.keyguard.R.style.TextAppearance_Keyguard_Secondary);
-            mContext = context;
             onDensityOrFontScaleChanged();
             setEllipsize(TruncateAt.END);
         }
@@ -501,9 +511,20 @@
 
         @Override
         public void onDensityOrFontScaleChanged() {
-            int horizontalPadding = (int) mContext.getResources()
-                    .getDimension(R.dimen.widget_horizontal_padding);
-            setPadding(horizontalPadding / 2, 0, horizontalPadding / 2, 0);
+            updatePadding();
+        }
+
+        @Override
+        public void setText(CharSequence text, BufferType type) {
+            super.setText(text, type);
+            updatePadding();
+        }
+
+        private void updatePadding() {
+            boolean hasText = !TextUtils.isEmpty(getText());
+            int horizontalPadding = (int) getContext().getResources()
+                    .getDimension(R.dimen.widget_horizontal_padding) / 2;
+            setPadding(horizontalPadding, 0, horizontalPadding * (hasText ? 1 : -1), 0);
             setCompoundDrawablePadding((int) mContext.getResources()
                     .getDimension(R.dimen.widget_icon_padding));
         }
@@ -519,6 +540,7 @@
                 Drawable bottom) {
             super.setCompoundDrawables(left, top, right, bottom);
             updateDrawableColors();
+            updatePadding();
         }
 
         private void updateDrawableColors() {
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
index ce34d0b..f6b5d69 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusView.java
@@ -82,14 +82,14 @@
 
         @Override
         public void onTimeChanged() {
-            refresh();
+            refreshTime();
         }
 
         @Override
         public void onKeyguardVisibilityChanged(boolean showing) {
             if (showing) {
                 if (DEBUG) Slog.v(TAG, "refresh statusview showing:" + showing);
-                refresh();
+                refreshTime();
                 updateOwnerInfo();
                 updateLogoutView();
             }
@@ -107,7 +107,7 @@
 
         @Override
         public void onUserSwitchComplete(int userId) {
-            refresh();
+            refreshFormat();
             updateOwnerInfo();
             updateLogoutView();
         }
@@ -164,7 +164,9 @@
     protected void onFinishInflate() {
         super.onFinishInflate();
         mLogoutView = findViewById(R.id.logout);
-        mLogoutView.setOnClickListener(this::onLogoutClicked);
+        if (mLogoutView != null) {
+            mLogoutView.setOnClickListener(this::onLogoutClicked);
+        }
 
         mClockView = findViewById(R.id.clock_view);
         mClockView.setShowCurrentUserTime(true);
@@ -184,7 +186,7 @@
 
         boolean shouldMarquee = KeyguardUpdateMonitor.getInstance(mContext).isDeviceInteractive();
         setEnableMarquee(shouldMarquee);
-        refresh();
+        refreshFormat();
         updateOwnerInfo();
         updateLogoutView();
         updateDark();
@@ -285,16 +287,25 @@
         }
     }
 
-    public void refreshTime() {
+    public void dozeTimeTick() {
+        refreshTime();
+        mKeyguardSlice.refresh();
+    }
+
+    private void refreshTime() {
         mClockView.refresh();
     }
 
-    private void refresh() {
+    private void refreshFormat() {
         Patterns.update(mContext);
-        refreshTime();
+        mClockView.setFormat12Hour(Patterns.clockView12);
+        mClockView.setFormat24Hour(Patterns.clockView24);
     }
 
     public int getLogoutButtonHeight() {
+        if (mLogoutView == null) {
+            return 0;
+        }
         return mLogoutView.getVisibility() == VISIBLE ? mLogoutView.getHeight() : 0;
     }
 
@@ -303,6 +314,9 @@
     }
 
     private void updateLogoutView() {
+        if (mLogoutView == null) {
+            return;
+        }
         mLogoutView.setVisibility(shouldShowLogout() ? VISIBLE : GONE);
         // Logout button will stay in language of user 0 if we don't set that manually.
         mLogoutView.setText(mContext.getResources().getString(
@@ -338,6 +352,11 @@
     }
 
     @Override
+    public void onLocaleListChanged() {
+        refreshFormat();
+    }
+
+    @Override
     public boolean hasOverlappingRendering() {
         return false;
     }
@@ -384,7 +403,9 @@
 
     private void updateDark() {
         boolean dark = mDarkAmount == 1;
-        mLogoutView.setAlpha(dark ? 0 : 1);
+        if (mLogoutView != null) {
+            mLogoutView.setAlpha(dark ? 0 : 1);
+        }
         if (mOwnerInfo != null) {
             boolean hasText = !TextUtils.isEmpty(mOwnerInfo.getText());
             mOwnerInfo.setVisibility(hasText && mDarkAmount != 1 ? VISIBLE : GONE);
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 7d19784..beb3c53 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -247,10 +247,14 @@
                 getDependency(LeakDetector.class),
                 getDependency(LEAK_REPORT_EMAIL)));
 
-        mProviders.put(GarbageMonitor.class, () -> new GarbageMonitor(
-                getDependency(BG_LOOPER),
-                getDependency(LeakDetector.class),
-                getDependency(LeakReporter.class)));
+        mProviders.put(
+                GarbageMonitor.class,
+                () ->
+                        new GarbageMonitor(
+                                mContext,
+                                getDependency(BG_LOOPER),
+                                getDependency(LeakDetector.class),
+                                getDependency(LeakReporter.class)));
 
         mProviders.put(TunerService.class, () ->
                 new TunerServiceImpl(mContext));
diff --git a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
index 282a8f1..9307c22 100644
--- a/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/OverviewProxyService.java
@@ -66,6 +66,7 @@
     public static final String TAG_OPS = "OverviewProxyService";
     public static final boolean DEBUG_OVERVIEW_PROXY = false;
     private static final long BACKOFF_MILLIS = 5000;
+    private static final long DEFERRED_CALLBACK_MILLIS = 5000;
 
     private final Context mContext;
     private final Handler mHandler;
@@ -162,6 +163,12 @@
         }
     };
 
+    private final Runnable mDeferredConnectionCallback = () -> {
+        Log.w(TAG_OPS, "Binder supposed established connection but actual connection to service "
+            + "timed out, trying again");
+        internalConnectToCurrentUser();
+    };
+
     private final BroadcastReceiver mLauncherStateChangedReceiver = new BroadcastReceiver() {
         @Override
         public void onReceive(Context context, Intent intent) {
@@ -181,22 +188,33 @@
     private final ServiceConnection mOverviewServiceConnection = new ServiceConnection() {
         @Override
         public void onServiceConnected(ComponentName name, IBinder service) {
-            if (service != null) {
-                mConnectionBackoffAttempts = 0;
-                mOverviewProxy = IOverviewProxy.Stub.asInterface(service);
-                // Listen for launcher's death
-                try {
-                    service.linkToDeath(mOverviewServiceDeathRcpt, 0);
-                } catch (RemoteException e) {
-                    Log.e(TAG_OPS, "Lost connection to launcher service", e);
-                }
-                try {
-                    mOverviewProxy.onBind(mSysUiProxy);
-                } catch (RemoteException e) {
-                    Log.e(TAG_OPS, "Failed to call onBind()", e);
-                }
-                notifyConnectionChanged();
+            mHandler.removeCallbacks(mDeferredConnectionCallback);
+            mConnectionBackoffAttempts = 0;
+            mOverviewProxy = IOverviewProxy.Stub.asInterface(service);
+            // Listen for launcher's death
+            try {
+                service.linkToDeath(mOverviewServiceDeathRcpt, 0);
+            } catch (RemoteException e) {
+                Log.e(TAG_OPS, "Lost connection to launcher service", e);
             }
+            try {
+                mOverviewProxy.onBind(mSysUiProxy);
+            } catch (RemoteException e) {
+                Log.e(TAG_OPS, "Failed to call onBind()", e);
+            }
+            notifyConnectionChanged();
+        }
+
+        @Override
+        public void onNullBinding(ComponentName name) {
+            Log.w(TAG_OPS, "Null binding of '" + name + "', try reconnecting");
+            internalConnectToCurrentUser();
+        }
+
+        @Override
+        public void onBindingDied(ComponentName name) {
+            Log.w(TAG_OPS, "Binding died of '" + name + "', try reconnecting");
+            internalConnectToCurrentUser();
         }
 
         @Override
@@ -262,6 +280,9 @@
 
         // If user has not setup yet or already connected, do not try to connect
         if (!mDeviceProvisionedController.isCurrentUserSetup() || !isEnabled()) {
+            Log.v(TAG_OPS, "Cannot attempt connection, is setup "
+                + mDeviceProvisionedController.isCurrentUserSetup() + ", is enabled "
+                + isEnabled());
             return;
         }
         mHandler.removeCallbacks(mConnectionRunnable);
@@ -275,11 +296,16 @@
         } catch (SecurityException e) {
             Log.e(TAG_OPS, "Unable to bind because of security error", e);
         }
-        if (!bound) {
+        if (bound) {
+            // Ensure that connection has been established even if it thinks it is bound
+            mHandler.postDelayed(mDeferredConnectionCallback, DEFERRED_CALLBACK_MILLIS);
+        } else {
             // Retry after exponential backoff timeout
             final long timeoutMs = (long) Math.scalb(BACKOFF_MILLIS, mConnectionBackoffAttempts);
             mHandler.postDelayed(mConnectionRunnable, timeoutMs);
             mConnectionBackoffAttempts++;
+            Log.w(TAG_OPS, "Failed to connect on attempt " + mConnectionBackoffAttempts
+                    + " will try again in " + timeoutMs + "ms");
         }
     }
 
@@ -351,6 +377,10 @@
         pw.print("  isCurrentUserSetup="); pw.println(mDeviceProvisionedController
                 .isCurrentUserSetup());
         pw.print("  isConnected="); pw.println(mOverviewProxy != null);
+        pw.print("  mRecentsComponentName="); pw.println(mRecentsComponentName);
+        pw.print("  mIsEnabled="); pw.println(isEnabled());
+        pw.print("  mInteractionFlags="); pw.println(mInteractionFlags);
+        pw.print("  mQuickStepIntent="); pw.println(mQuickStepIntent);
     }
 
     public interface OverviewProxyListener {
diff --git a/packages/SystemUI/src/com/android/systemui/Prefs.java b/packages/SystemUI/src/com/android/systemui/Prefs.java
index f595d77..a7163bb 100644
--- a/packages/SystemUI/src/com/android/systemui/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/Prefs.java
@@ -94,6 +94,8 @@
         String OVERVIEW_OPENED_FROM_HOME_COUNT = "OverviewOpenedFromHomeCount";
         String HAS_SEEN_RECENTS_SWIPE_UP_ONBOARDING = "HasSeenRecentsSwipeUpOnboarding";
         String HAS_SEEN_RECENTS_QUICK_SCRUB_ONBOARDING = "HasSeenRecentsQuickScrubOnboarding";
+        String HAS_DISMISSED_RECENTS_QUICK_SCRUB_ONBOARDING_ONCE =
+                "HasDismissedRecentsQuickScrubOnboardingOnce";
         String SEEN_RINGER_GUIDANCE_COUNT = "RingerGuidanceCount";
         String QS_TILE_SPECS_REVEALED = "QsTileSpecsRevealed";
         String QS_HAS_TURNED_OFF_MOBILE_DATA = "QsHasTurnedOffMobileData";
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index a7975d7..ea3f95e 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -344,8 +344,8 @@
             } else if (GLOBAL_ACTION_KEY_SETTINGS.equals(actionKey)) {
                 mItems.add(getSettingsAction());
             } else if (GLOBAL_ACTION_KEY_LOCKDOWN.equals(actionKey)) {
-                if (Settings.Secure.getInt(mContext.getContentResolver(),
-                            Settings.Secure.LOCKDOWN_IN_POWER_MENU, 0) != 0
+                if (Settings.Secure.getIntForUser(mContext.getContentResolver(),
+                            Settings.Secure.LOCKDOWN_IN_POWER_MENU, 0, getCurrentUser().id) != 0
                         && shouldDisplayLockdown()) {
                     mItems.add(getLockdownAction());
                     mHasLockdownButton = true;
@@ -1380,6 +1380,15 @@
             mHardwareLayout = HardwareUiLayout.get(mListView);
             mHardwareLayout.setOutsideTouchListener(view -> dismiss());
             setTitle(R.string.global_actions);
+            mListView.setAccessibilityDelegate(new View.AccessibilityDelegate() {
+                @Override
+                public boolean dispatchPopulateAccessibilityEvent(
+                        View host, AccessibilityEvent event) {
+                    // Populate the title here, just as Activity does
+                    event.getText().add(mContext.getString(R.string.global_actions));
+                    return true;
+                }
+            });
         }
 
         private void updateList() {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
index d81b32b..c5e66f9 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardSliceProvider.java
@@ -18,6 +18,7 @@
 
 import android.app.ActivityManager;
 import android.app.AlarmManager;
+import android.app.NotificationManager;
 import android.content.BroadcastReceiver;
 import android.content.ContentResolver;
 import android.content.Context;
@@ -28,13 +29,16 @@
 import android.icu.text.DisplayContext;
 import android.net.Uri;
 import android.os.Handler;
-import android.os.SystemClock;
+import android.provider.Settings;
+import android.service.notification.ZenModeConfig;
 import android.text.TextUtils;
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.NextAlarmController;
 import com.android.systemui.statusbar.policy.NextAlarmControllerImpl;
+import com.android.systemui.statusbar.policy.ZenModeController;
+import com.android.systemui.statusbar.policy.ZenModeControllerImpl;
 
 import java.util.Date;
 import java.util.Locale;
@@ -49,12 +53,13 @@
  * Simple Slice provider that shows the current date.
  */
 public class KeyguardSliceProvider extends SliceProvider implements
-        NextAlarmController.NextAlarmChangeCallback {
+        NextAlarmController.NextAlarmChangeCallback, ZenModeController.Callback {
 
     public static final String KEYGUARD_SLICE_URI = "content://com.android.systemui.keyguard/main";
     public static final String KEYGUARD_DATE_URI = "content://com.android.systemui.keyguard/date";
     public static final String KEYGUARD_NEXT_ALARM_URI =
             "content://com.android.systemui.keyguard/alarm";
+    public static final String KEYGUARD_DND_URI = "content://com.android.systemui.keyguard/dnd";
 
     /**
      * Only show alarms that will ring within N hours.
@@ -62,22 +67,23 @@
     @VisibleForTesting
     static final int ALARM_VISIBILITY_HOURS = 12;
 
-    private final Date mCurrentTime = new Date();
     protected final Uri mSliceUri;
     protected final Uri mDateUri;
     protected final Uri mAlarmUri;
+    protected final Uri mDndUri;
+    private final Date mCurrentTime = new Date();
     private final Handler mHandler;
+    private final AlarmManager.OnAlarmListener mUpdateNextAlarm = this::updateNextAlarm;
+    private ZenModeController mZenModeController;
     private String mDatePattern;
     private DateFormat mDateFormat;
     private String mLastText;
     private boolean mRegistered;
-    private boolean mRegisteredEveryMinute;
     private String mNextAlarm;
     private NextAlarmController mNextAlarmController;
     protected AlarmManager mAlarmManager;
     protected ContentResolver mContentResolver;
     private AlarmManager.AlarmClockInfo mNextAlarmInfo;
-    private final AlarmManager.OnAlarmListener mUpdateNextAlarm = this::updateNextAlarm;
 
     /**
      * Receiver responsible for time ticking and updating the date format.
@@ -112,6 +118,7 @@
         mSliceUri = Uri.parse(KEYGUARD_SLICE_URI);
         mDateUri = Uri.parse(KEYGUARD_DATE_URI);
         mAlarmUri = Uri.parse(KEYGUARD_NEXT_ALARM_URI);
+        mDndUri = Uri.parse(KEYGUARD_DND_URI);
     }
 
     @Override
@@ -119,6 +126,7 @@
         ListBuilder builder = new ListBuilder(getContext(), mSliceUri);
         builder.addRow(new RowBuilder(builder, mDateUri).setTitle(mLastText));
         addNextAlarm(builder);
+        addZenMode(builder);
         return builder.build();
     }
 
@@ -134,18 +142,53 @@
         builder.addRow(alarmRowBuilder);
     }
 
+    /**
+     * Add zen mode (DND) icon to slice if it's enabled.
+     * @param builder The slice builder.
+     */
+    protected void addZenMode(ListBuilder builder) {
+        if (!isDndSuppressingNotifications()) {
+            return;
+        }
+        RowBuilder dndBuilder = new RowBuilder(builder, mDndUri)
+                .addEndItem(Icon.createWithResource(getContext(), R.drawable.stat_sys_dnd));
+        builder.addRow(dndBuilder);
+    }
+
+    /**
+     * Return true if DND is enabled suppressing notifications.
+     */
+    protected boolean isDndSuppressingNotifications() {
+        boolean suppressingNotifications = (mZenModeController.getConfig().suppressedVisualEffects
+                & NotificationManager.Policy.SUPPRESSED_EFFECT_NOTIFICATION_LIST) != 0;
+        return mZenModeController.getZen() != Settings.Global.ZEN_MODE_OFF
+                && suppressingNotifications;
+    }
+
     @Override
     public boolean onCreateSliceProvider() {
         mAlarmManager = getContext().getSystemService(AlarmManager.class);
         mContentResolver = getContext().getContentResolver();
         mNextAlarmController = new NextAlarmControllerImpl(getContext());
         mNextAlarmController.addCallback(this);
+        mZenModeController = new ZenModeControllerImpl(getContext(), mHandler);
+        mZenModeController.addCallback(this);
         mDatePattern = getContext().getString(R.string.system_ui_aod_date_pattern);
-        registerClockUpdate(false /* everyMinute */);
+        registerClockUpdate();
         updateClock();
         return true;
     }
 
+    @Override
+    public void onZenChanged(int zen) {
+        mContentResolver.notifyChange(mSliceUri, null /* observer */);
+    }
+
+    @Override
+    public void onConfigChanged(ZenModeConfig config) {
+        mContentResolver.notifyChange(mSliceUri, null /* observer */);
+    }
+
     private void updateNextAlarm() {
         if (withinNHours(mNextAlarmInfo, ALARM_VISIBILITY_HOURS)) {
             String pattern = android.text.format.DateFormat.is24HourFormat(getContext(),
@@ -170,22 +213,13 @@
     /**
      * Registers a broadcast receiver for clock updates, include date, time zone and manually
      * changing the date/time via the settings app.
-     *
-     * @param everyMinute {@code true} if you also want updates every minute.
      */
-    protected void registerClockUpdate(boolean everyMinute) {
+    private void registerClockUpdate() {
         if (mRegistered) {
-            if (mRegisteredEveryMinute == everyMinute) {
-                return;
-            } else {
-                unregisterClockUpdate();
-            }
+            return;
         }
 
         IntentFilter filter = new IntentFilter();
-        if (everyMinute) {
-            filter.addAction(Intent.ACTION_TIME_TICK);
-        }
         filter.addAction(Intent.ACTION_DATE_CHANGED);
         filter.addAction(Intent.ACTION_TIME_CHANGED);
         filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
@@ -193,15 +227,6 @@
         getContext().registerReceiver(mIntentReceiver, filter, null /* permission*/,
                 null /* scheduler */);
         mRegistered = true;
-        mRegisteredEveryMinute = everyMinute;
-    }
-
-    protected void unregisterClockUpdate() {
-        if (!mRegistered) {
-            return;
-        }
-        getContext().unregisterReceiver(mIntentReceiver);
-        mRegistered = false;
     }
 
     @VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
index 6d46e85..45d63e0 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
@@ -93,7 +93,8 @@
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         final int numTiles = mRecords.size();
-        final int width = MeasureSpec.getSize(widthMeasureSpec) - mPaddingLeft - mPaddingRight;
+        final int width = MeasureSpec.getSize(widthMeasureSpec)
+                - getPaddingStart() - getPaddingEnd();
         final int numRows = (numTiles + mColumns - 1) / mColumns;
         mCellWidth = (width - mSidePadding * 2 - (mCellMarginHorizontal * mColumns)) / mColumns;
 
@@ -140,16 +141,8 @@
 
             final TileRecord record = mRecords.get(i);
             final int top = getRowTop(row);
-            final int right;
-            final int left;
-            if (isRtl) {
-                right = w - getColumnStart(column);
-                left = right - mCellWidth;
-            } else {
-                left = getColumnStart(column);
-                right = left + mCellWidth;
-            }
-
+            final int left = getColumnStart(isRtl ? mColumns - column - 1 : column);
+            final int right = left + mCellWidth;
             record.tileView.layout(left, top, right, top + record.tileView.getMeasuredHeight());
         }
     }
@@ -159,6 +152,7 @@
     }
 
     private int getColumnStart(int column) {
-        return column * (mCellWidth + mCellMarginHorizontal) + mCellMarginHorizontal + mPaddingLeft;
+        return getPaddingStart() + mSidePadding + mCellMarginHorizontal / 2 +
+                column *  (mCellWidth + mCellMarginHorizontal);
     }
 }
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 441d29b..5adeec3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -67,6 +67,10 @@
     private static final long EDIT_ID = 10000;
     private static final long DIVIDER_ID = 20000;
 
+    private static final int ACTION_NONE = 0;
+    private static final int ACTION_ADD = 1;
+    private static final int ACTION_MOVE = 2;
+
     private final Context mContext;
 
     private final Handler mHandler = new Handler();
@@ -82,7 +86,7 @@
     private List<TileInfo> mAllTiles;
 
     private Holder mCurrentDrag;
-    private boolean mAccessibilityMoving;
+    private int mAccessibilityAction = ACTION_NONE;
     private int mAccessibilityFromIndex;
     private QSTileHost mHost;
 
@@ -172,7 +176,7 @@
 
     @Override
     public int getItemViewType(int position) {
-        if (mAccessibilityMoving && position == mEditIndex - 1) {
+        if (mAccessibilityAction == ACTION_ADD && position == mEditIndex - 1) {
             return TYPE_ACCESSIBLE_DROP;
         }
         if (position == mTileDividerIndex) {
@@ -266,18 +270,18 @@
         if (position > mEditIndex) {
             info.state.contentDescription = mContext.getString(
                     R.string.accessibility_qs_edit_add_tile_label, info.state.label);
-        } else if (mAccessibilityMoving) {
+        } else if (mAccessibilityAction != ACTION_NONE) {
             info.state.contentDescription = mContext.getString(
                     R.string.accessibility_qs_edit_position_label, position + 1);
         } else {
             info.state.contentDescription = mContext.getString(
                     R.string.accessibility_qs_edit_tile_label, position + 1, info.state.label);
         }
-        holder.mTileView.onStateChanged(info.state);
+        holder.mTileView.handleStateChanged(info.state);
         holder.mTileView.setShowAppLabel(position > mEditIndex && !info.isSystem);
 
         if (mAccessibilityManager.isTouchExplorationEnabled()) {
-            final boolean selectable = !mAccessibilityMoving || position < mEditIndex;
+            final boolean selectable = mAccessibilityAction == ACTION_NONE || position < mEditIndex;
             holder.mTileView.setClickable(selectable);
             holder.mTileView.setFocusable(selectable);
             holder.mTileView.setImportantForAccessibility(selectable
@@ -288,13 +292,13 @@
                     @Override
                     public void onClick(View v) {
                         int position = holder.getAdapterPosition();
-                        if (mAccessibilityMoving) {
+                        if (mAccessibilityAction != ACTION_NONE) {
                             selectPosition(position, v);
                         } else {
                             if (position < mEditIndex && canRemoveTiles()) {
                                 showAccessibilityDialog(position, v);
                             } else {
-                                startAccessibleDrag(position);
+                                startAccessibleAdd(position);
                             }
                         }
                     }
@@ -302,21 +306,21 @@
             }
         }
     }
-    
+
     private boolean canRemoveTiles() {
         return mCurrentSpecs.size() > MIN_NUM_TILES;
     }
 
     private void selectPosition(int position, View v) {
-        // Remove the placeholder.
-        mAccessibilityMoving = false;
-        mTiles.remove(mEditIndex--);
-        notifyItemRemoved(mEditIndex - 1);
-        // Don't remove items when the last position is selected.
-        if (position == mEditIndex) position--;
-
+        if (mAccessibilityAction == ACTION_ADD) {
+            // Remove the placeholder.
+            mTiles.remove(mEditIndex--);
+            notifyItemRemoved(mEditIndex);
+            // Don't remove items when the last position is selected.
+            if (position == mEditIndex - 1) position--;
+        }
+        mAccessibilityAction = ACTION_NONE;
         move(mAccessibilityFromIndex, position, v);
-
         notifyDataSetChanged();
     }
 
@@ -331,7 +335,7 @@
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
                         if (which == 0) {
-                            startAccessibleDrag(position);
+                            startAccessibleMove(position);
                         } else {
                             move(position, info.isSystem ? mEditIndex : mTileDividerIndex, v);
                             notifyItemChanged(mTileDividerIndex);
@@ -345,12 +349,18 @@
         dialog.show();
     }
 
-    private void startAccessibleDrag(int position) {
-        mAccessibilityMoving = true;
-        mNeedsFocus = true;
+    private void startAccessibleAdd(int position) {
         mAccessibilityFromIndex = position;
+        mAccessibilityAction = ACTION_ADD;
         // Add placeholder for last slot.
         mTiles.add(mEditIndex++, null);
+        mNeedsFocus = true;
+        notifyDataSetChanged();
+    }
+
+    private void startAccessibleMove(int position) {
+        mAccessibilityFromIndex = position;
+        mAccessibilityAction = ACTION_MOVE;
         notifyDataSetChanged();
     }
 
@@ -365,30 +375,26 @@
         CharSequence fromLabel = mTiles.get(from).state.label;
         move(from, to, mTiles);
         updateDividerLocations();
-        CharSequence announcement;
         if (to >= mEditIndex) {
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_REMOVE_SPEC,
                     strip(mTiles.get(to)));
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_REMOVE,
                     from);
-            announcement = mContext.getString(R.string.accessibility_qs_edit_tile_removed,
-                    fromLabel);
         } else if (from >= mEditIndex) {
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_ADD_SPEC,
                     strip(mTiles.get(to)));
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_ADD,
                     to);
-            announcement = mContext.getString(R.string.accessibility_qs_edit_tile_added,
-                    fromLabel, (to + 1));
+            v.announceForAccessibility(mContext.getString(R.string.accessibility_qs_edit_tile_added,
+                    fromLabel, (to + 1)));
         } else {
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_MOVE_SPEC,
                     strip(mTiles.get(to)));
             MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_QS_EDIT_MOVE,
                     to);
-            announcement = mContext.getString(R.string.accessibility_qs_edit_tile_moved,
-                    fromLabel, (to + 1));
+            v.announceForAccessibility(mContext.getString(R.string.accessibility_qs_edit_tile_moved,
+                    fromLabel, (to + 1)));
         }
-        v.announceForAccessibility(announcement);
         saveSpecs(mHost);
         return true;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 9593b0f..53a576d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -24,6 +24,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.graphics.drawable.Drawable;
+import android.os.Build;
 import android.os.Handler;
 import android.service.quicksettings.TileService;
 import android.text.TextUtils;
@@ -37,8 +38,10 @@
 import com.android.systemui.qs.QSTileHost;
 import com.android.systemui.qs.external.CustomTile;
 import com.android.systemui.qs.tileimpl.QSTileImpl.DrawableIcon;
+import com.android.systemui.util.leak.GarbageMonitor;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 
@@ -68,7 +71,6 @@
         // Enqueue jobs to fetch every system tile and then ever package tile.
         addStockTiles(host);
         addPackageTiles(host);
-        // TODO: Live?
     }
 
     public boolean isFinished() {
@@ -77,10 +79,14 @@
 
     private void addStockTiles(QSTileHost host) {
         String possible = mContext.getString(R.string.quick_settings_tiles_stock);
-        String[] possibleTiles = possible.split(",");
+        final ArrayList<String> possibleTiles = new ArrayList<>();
+        possibleTiles.addAll(Arrays.asList(possible.split(",")));
+        if (Build.IS_DEBUGGABLE) {
+            possibleTiles.add(GarbageMonitor.MemoryTile.TILE_SPEC);
+        }
+
         final ArrayList<QSTile> tilesToAdd = new ArrayList<>();
-        for (int i = 0; i < possibleTiles.length; i++) {
-            final String spec = possibleTiles[i];
+        for (String spec : possibleTiles) {
             final QSTile tile = host.createTile(spec);
             if (tile == null) {
                 continue;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
index 8d48890..ac7ef5d 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
@@ -15,6 +15,7 @@
 package com.android.systemui.qs.tileimpl;
 
 import android.content.Context;
+import android.os.Build;
 import android.util.Log;
 import android.view.ContextThemeWrapper;
 
@@ -41,6 +42,7 @@
 import com.android.systemui.qs.tiles.WifiTile;
 import com.android.systemui.qs.tiles.WorkModeTile;
 import com.android.systemui.qs.QSTileHost;
+import com.android.systemui.util.leak.GarbageMonitor;
 
 public class QSFactoryImpl implements QSFactory {
 
@@ -60,30 +62,58 @@
     }
 
     private QSTileImpl createTileInternal(String tileSpec) {
-        if (tileSpec.equals("wifi")) return new WifiTile(mHost);
-        else if (tileSpec.equals("bt")) return new BluetoothTile(mHost);
-        else if (tileSpec.equals("cell")) return new CellularTile(mHost);
-        else if (tileSpec.equals("dnd")) return new DndTile(mHost);
-        else if (tileSpec.equals("inversion")) return new ColorInversionTile(mHost);
-        else if (tileSpec.equals("airplane")) return new AirplaneModeTile(mHost);
-        else if (tileSpec.equals("work")) return new WorkModeTile(mHost);
-        else if (tileSpec.equals("rotation")) return new RotationLockTile(mHost);
-        else if (tileSpec.equals("flashlight")) return new FlashlightTile(mHost);
-        else if (tileSpec.equals("location")) return new LocationTile(mHost);
-        else if (tileSpec.equals("cast")) return new CastTile(mHost);
-        else if (tileSpec.equals("hotspot")) return new HotspotTile(mHost);
-        else if (tileSpec.equals("user")) return new UserTile(mHost);
-        else if (tileSpec.equals("battery")) return new BatterySaverTile(mHost);
-        else if (tileSpec.equals("saver")) return new DataSaverTile(mHost);
-        else if (tileSpec.equals("night")) return new NightDisplayTile(mHost);
-        else if (tileSpec.equals("nfc")) return new NfcTile(mHost);
-        // Intent tiles.
-        else if (tileSpec.startsWith(IntentTile.PREFIX)) return IntentTile.create(mHost, tileSpec);
-        else if (tileSpec.startsWith(CustomTile.PREFIX)) return CustomTile.create(mHost, tileSpec);
-        else {
-            Log.w(TAG, "Bad tile spec: " + tileSpec);
-            return null;
+        // Stock tiles.
+        switch (tileSpec) {
+            case "wifi":
+                return new WifiTile(mHost);
+            case "bt":
+                return new BluetoothTile(mHost);
+            case "cell":
+                return new CellularTile(mHost);
+            case "dnd":
+                return new DndTile(mHost);
+            case "inversion":
+                return new ColorInversionTile(mHost);
+            case "airplane":
+                return new AirplaneModeTile(mHost);
+            case "work":
+                return new WorkModeTile(mHost);
+            case "rotation":
+                return new RotationLockTile(mHost);
+            case "flashlight":
+                return new FlashlightTile(mHost);
+            case "location":
+                return new LocationTile(mHost);
+            case "cast":
+                return new CastTile(mHost);
+            case "hotspot":
+                return new HotspotTile(mHost);
+            case "user":
+                return new UserTile(mHost);
+            case "battery":
+                return new BatterySaverTile(mHost);
+            case "saver":
+                return new DataSaverTile(mHost);
+            case "night":
+                return new NightDisplayTile(mHost);
+            case "nfc":
+                return new NfcTile(mHost);
         }
+
+        // Intent tiles.
+        if (tileSpec.startsWith(IntentTile.PREFIX)) return IntentTile.create(mHost, tileSpec);
+        if (tileSpec.startsWith(CustomTile.PREFIX)) return CustomTile.create(mHost, tileSpec);
+
+        // Debug tiles.
+        if (Build.IS_DEBUGGABLE) {
+            if (tileSpec.equals(GarbageMonitor.MemoryTile.TILE_SPEC)) {
+                return new GarbageMonitor.MemoryTile(mHost);
+            }
+        }
+
+        // Broken tiles.
+        Log.w(TAG, "Bad tile spec: " + tileSpec);
+        return null;
     }
 
     @Override
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 63be4b7..c7191f8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NightDisplayTile.java
@@ -45,8 +45,8 @@
      * Pattern for {@link java.time.format.DateTimeFormatter} used to approximate the time to the
      * nearest hour and add on the AM/PM indicator.
      */
-    private static final String HOUR_MINUTE_DATE_TIME_PATTERN = "h a";
-    private static final String APPROXIMATE_HOUR_DATE_TIME_PATTERN = "h:m a";
+    private static final String PATTERN_HOUR = "h a";
+    private static final String PATTERN_HOUR_MINUTE = "h:mm a";
 
 
     private ColorDisplayController mController;
@@ -142,9 +142,7 @@
                 // Choose between just showing the hour or also showing the minutes (based on the
                 // user-selected toggle time). This helps reduce how much space the label takes.
                 toggleTimeFormat = DateTimeFormatter.ofPattern(
-                        toggleTime.getMinute() == 0
-                                ? HOUR_MINUTE_DATE_TIME_PATTERN
-                                : APPROXIMATE_HOUR_DATE_TIME_PATTERN);
+                        toggleTime.getMinute() == 0 ? PATTERN_HOUR : PATTERN_HOUR_MINUTE);
 
                 return mContext.getString(toggleTimeStringRes, toggleTime.format(toggleTimeFormat));
 
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
index ffa1444..31933d0 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsOnboarding.java
@@ -19,6 +19,7 @@
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
 
+import static com.android.systemui.Prefs.Key.HAS_DISMISSED_RECENTS_QUICK_SCRUB_ONBOARDING_ONCE;
 import static com.android.systemui.Prefs.Key.HAS_SEEN_RECENTS_QUICK_SCRUB_ONBOARDING;
 import static com.android.systemui.Prefs.Key.HAS_SEEN_RECENTS_SWIPE_UP_ONBOARDING;
 import static com.android.systemui.Prefs.Key.OVERVIEW_OPENED_COUNT;
@@ -66,7 +67,7 @@
 
     private static final String TAG = "RecentsOnboarding";
     private static final boolean RESET_PREFS_FOR_DEBUG = false;
-    private static final boolean ONBOARDING_ENABLED = false;
+    private static final boolean ONBOARDING_ENABLED = true;
     private static final long SHOW_DELAY_MS = 500;
     private static final long SHOW_HIDE_DURATION_MS = 300;
     // Show swipe-up tips after opening overview from home this number of times.
@@ -76,9 +77,6 @@
     // After explicitly dismissing, show again after launching this number of apps for swipe-up
     // tips.
     private static final int SWIPE_UP_SHOW_ON_APP_LAUNCH_AFTER_DISMISS = 5;
-    // After explicitly dismissing, show again after launching this number of apps for QuickScrub
-    // tips.
-    private static final int QUICK_SCRUB_SHOW_ON_APP_LAUNCH_AFTER_DISMISS = 10;
 
     private final Context mContext;
     private final WindowManager mWindowManager;
@@ -99,7 +97,7 @@
     private boolean mHasDismissedSwipeUpTip;
     private boolean mHasDismissedQuickScrubTip;
     private int mNumAppsLaunchedSinceSwipeUpTipDismiss;
-    private int mNumAppsLaunchedSinceQuickScrubTipDismiss;
+    private int mOverviewOpenedCountSinceQuickScrubTipDismiss;
 
     private final SysUiTaskStackChangeListener mTaskListener = new SysUiTaskStackChangeListener() {
         @Override
@@ -145,10 +143,9 @@
                 } else {
                     if (getOpenedOverviewCount() >= QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
                         if (mHasDismissedQuickScrubTip) {
-                            mNumAppsLaunchedSinceQuickScrubTipDismiss++;
-                            if (mNumAppsLaunchedSinceQuickScrubTipDismiss
-                                    == QUICK_SCRUB_SHOW_ON_APP_LAUNCH_AFTER_DISMISS) {
-                                mNumAppsLaunchedSinceQuickScrubTipDismiss = 0;
+                            if (mOverviewOpenedCountSinceQuickScrubTipDismiss
+                                    == QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
+                                mOverviewOpenedCountSinceQuickScrubTipDismiss = 0;
                                 show(R.string.recents_quick_scrub_onboarding);
                             }
                         } else {
@@ -166,14 +163,19 @@
             new OverviewProxyService.OverviewProxyListener() {
                 @Override
                 public void onOverviewShown(boolean fromHome) {
-                    boolean alreadySeenRecentsOnboarding = hasSeenSwipeUpOnboarding();
-                    if (!alreadySeenRecentsOnboarding && !fromHome) {
+                    if (!hasSeenSwipeUpOnboarding() && !fromHome) {
                         setHasSeenSwipeUpOnboarding(true);
                     }
                     if (fromHome) {
                         setOpenedOverviewFromHomeCount(getOpenedOverviewFromHomeCount() + 1);
                     }
                     setOpenedOverviewCount(getOpenedOverviewCount() + 1);
+
+                    if (getOpenedOverviewCount() >= QUICK_SCRUB_SHOW_ON_OVERVIEW_OPENED_COUNT) {
+                        if (mHasDismissedQuickScrubTip) {
+                            mOverviewOpenedCountSinceQuickScrubTipDismiss++;
+                        }
+                    }
                 }
 
                 @Override
@@ -191,7 +193,11 @@
         public void onViewAttachedToWindow(View view) {
             if (view == mLayout) {
                 mLayoutAttachedToWindow = true;
-                mHasDismissedSwipeUpTip = false;
+                if (view.getTag().equals(R.string.recents_swipe_up_onboarding)) {
+                    mHasDismissedSwipeUpTip = false;
+                } else {
+                    mHasDismissedQuickScrubTip = false;
+                }
             }
         }
 
@@ -199,6 +205,17 @@
         public void onViewDetachedFromWindow(View view) {
             if (view == mLayout) {
                 mLayoutAttachedToWindow = false;
+                if (view.getTag().equals(R.string.recents_quick_scrub_onboarding)) {
+                    mHasDismissedQuickScrubTip = true;
+                    if (hasDismissedQuickScrubOnboardingOnce()) {
+                        // If user dismisses the quick scrub tip twice, we consider user has seen it
+                        // and do not show it again.
+                        setHasSeenQuickScrubOnboarding(true);
+                    } else {
+                        setHasDismissedQuickScrubOnboardingOnce(true);
+                    }
+                    mOverviewOpenedCountSinceQuickScrubTipDismiss = 0;
+                }
             }
         }
     };
@@ -228,15 +245,6 @@
             if (v.getTag().equals(R.string.recents_swipe_up_onboarding)) {
                 mHasDismissedSwipeUpTip = true;
                 mNumAppsLaunchedSinceSwipeUpTipDismiss = 0;
-            } else {
-                if (mHasDismissedQuickScrubTip) {
-                    // If user dismisses the quick scrub tip twice, we consider user has seen it
-                    // and do not show it again.
-                    setHasSeenQuickScrubOnboarding(true);
-                } else {
-                    mHasDismissedQuickScrubTip = true;
-                }
-                mNumAppsLaunchedSinceQuickScrubTipDismiss = 0;
             }
         });
 
@@ -252,6 +260,7 @@
         if (RESET_PREFS_FOR_DEBUG) {
             setHasSeenSwipeUpOnboarding(false);
             setHasSeenQuickScrubOnboarding(false);
+            setHasDismissedQuickScrubOnboardingOnce(false);
             setOpenedOverviewCount(0);
             setOpenedOverviewFromHomeCount(0);
         }
@@ -289,7 +298,7 @@
         mHasDismissedSwipeUpTip = false;
         mHasDismissedQuickScrubTip = false;
         mNumAppsLaunchedSinceSwipeUpTipDismiss = 0;
-        mNumAppsLaunchedSinceQuickScrubTipDismiss = 0;
+        mOverviewOpenedCountSinceQuickScrubTipDismiss = 0;
         hide(false);
     }
 
@@ -303,11 +312,15 @@
         if (!shouldShow()) {
             return;
         }
+        if (mLayoutAttachedToWindow) {
+            hide(false);
+        }
         mDismissView.setTag(stringRes);
+        mLayout.setTag(stringRes);
         mTextView.setText(stringRes);
         // Only show in portrait.
         int orientation = mContext.getResources().getConfiguration().orientation;
-        if (!mLayoutAttachedToWindow && orientation == Configuration.ORIENTATION_PORTRAIT) {
+        if (orientation == Configuration.ORIENTATION_PORTRAIT) {
             mLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
 
             mWindowManager.addView(mLayout, getWindowLayoutParams());
@@ -348,11 +361,11 @@
                         .withLayer()
                         .setDuration(SHOW_HIDE_DURATION_MS)
                         .setInterpolator(new AccelerateInterpolator())
-                        .withEndAction(() -> mWindowManager.removeView(mLayout))
+                        .withEndAction(() -> mWindowManager.removeViewImmediate(mLayout))
                         .start();
             } else {
                 mLayout.animate().cancel();
-                mWindowManager.removeView(mLayout);
+                mWindowManager.removeViewImmediate(mLayout);
             }
         }
     }
@@ -400,6 +413,16 @@
         }
     }
 
+    private boolean hasDismissedQuickScrubOnboardingOnce() {
+        return Prefs.getBoolean(mContext, HAS_DISMISSED_RECENTS_QUICK_SCRUB_ONBOARDING_ONCE, false);
+    }
+
+    private void setHasDismissedQuickScrubOnboardingOnce(
+            boolean hasDismissedQuickScrubOnboardingOnce) {
+        Prefs.putBoolean(mContext, HAS_DISMISSED_RECENTS_QUICK_SCRUB_ONBOARDING_ONCE,
+                hasDismissedQuickScrubOnboardingOnce);
+    }
+
     private int getOpenedOverviewFromHomeCount() {
         return Prefs.getInt(mContext, OVERVIEW_OPENED_FROM_HOME_COUNT, 0);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 1149ad1..c8ee8735 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -21,6 +21,8 @@
 import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
 import static android.view.PointerIcon.TYPE_HORIZONTAL_DOUBLE_ARROW;
 import static android.view.PointerIcon.TYPE_VERTICAL_DOUBLE_ARROW;
+import static android.view.WindowManager.DOCKED_LEFT;
+import static android.view.WindowManager.DOCKED_RIGHT;
 
 import android.animation.Animator;
 import android.animation.AnimatorListenerAdapter;
@@ -364,14 +366,7 @@
         if (mStableInsets.isEmpty()) {
             SystemServicesProxy.getInstance(mContext).getStableInsets(mStableInsets);
         }
-        int position = (int) (mState.mRatioPositionBeforeMinimized *
-                (isHorizontalDivision() ? mDisplayHeight : mDisplayWidth));
-        mSnapAlgorithm = null;
-        initializeSnapAlgorithm();
-
-        // Set the snap target before minimized but do not save until divider is attached and not
-        // minimized because it does not know its minimized state yet.
-        mSnapTargetBeforeMinimized = mSnapAlgorithm.calculateNonDismissingSnapTarget(position);
+        repositionSnapTargetBeforeMinimized();
     }
 
     public WindowManagerProxy getWindowManagerProxy() {
@@ -381,15 +376,15 @@
     public Rect getNonMinimizedSplitScreenSecondaryBounds() {
         calculateBoundsForPosition(mSnapTargetBeforeMinimized.position,
                 DockedDividerUtils.invertDockSide(mDockSide), mOtherTaskRect);
+        mOtherTaskRect.bottom -= mStableInsets.bottom;
         switch (mDockSide) {
             case WindowManager.DOCKED_LEFT:
+                mOtherTaskRect.top += mStableInsets.top;
                 mOtherTaskRect.right -= mStableInsets.right;
                 break;
             case WindowManager.DOCKED_RIGHT:
-                mOtherTaskRect.left -= mStableInsets.left;
-                break;
-            case WindowManager.DOCKED_TOP:
-                mOtherTaskRect.bottom -= mStableInsets.bottom;
+                mOtherTaskRect.top += mStableInsets.top;
+                mOtherTaskRect.left += mStableInsets.left;
                 break;
         }
         return mOtherTaskRect;
@@ -878,9 +873,36 @@
     }
 
     public void notifyDockSideChanged(int newDockSide) {
+        int oldDockSide = mDockSide;
         mDockSide = newDockSide;
         mMinimizedShadow.setDockSide(mDockSide);
         requestLayout();
+
+        // Update the snap position to the new docked side with correct insets
+        SystemServicesProxy.getInstance(mContext).getStableInsets(mStableInsets);
+        mMinimizedSnapAlgorithm = null;
+        initializeSnapAlgorithm();
+
+        if (oldDockSide == DOCKED_LEFT && mDockSide == DOCKED_RIGHT
+                || oldDockSide == DOCKED_RIGHT && mDockSide == DOCKED_LEFT) {
+            repositionSnapTargetBeforeMinimized();
+        }
+
+        // Landscape to seascape rotation requires minimized to resize docked app correctly
+        if (mHomeStackResizable && mDockedStackMinimized) {
+            resizeStack(mMinimizedSnapAlgorithm.getMiddleTarget());
+        }
+    }
+
+    private void repositionSnapTargetBeforeMinimized() {
+        int position = (int) (mState.mRatioPositionBeforeMinimized *
+                (isHorizontalDivision() ? mDisplayHeight : mDisplayWidth));
+        mSnapAlgorithm = null;
+        initializeSnapAlgorithm();
+
+        // Set the snap target before minimized but do not save until divider is attached and not
+        // minimized because it does not know its minimized state yet.
+        mSnapTargetBeforeMinimized = mSnapAlgorithm.calculateNonDismissingSnapTarget(position);
     }
 
     private void updateDisplayInfo() {
@@ -962,6 +984,12 @@
         if (mHomeStackResizable && mIsInMinimizeInteraction) {
             calculateBoundsForPosition(mSnapTargetBeforeMinimized.position, mDockSide,
                     mDockedTaskRect);
+
+            // Move a right-docked-app to line up with the divider while dragging it
+            if (mDockSide == DOCKED_RIGHT) {
+                mDockedTaskRect.offset(Math.max(position, mStableInsets.left - mDividerSize)
+                        - mDockedTaskRect.left + mDividerSize, 0);
+            }
             calculateBoundsForPosition(mSnapTargetBeforeMinimized.position,
                     DockedDividerUtils.invertDockSide(mDockSide), mOtherTaskRect);
             mWindowManagerProxy.resizeDockedStack(mDockedRect, mDockedTaskRect, mDockedTaskRect,
@@ -976,6 +1004,12 @@
                 calculateBoundsForPosition(isHorizontalDivision() ? mDisplayHeight : mDisplayWidth,
                         mDockSide, mDockedTaskRect);
             }
+
+            // Move a docked app if from the right in position with the divider up to insets
+            if (mDockSide == DOCKED_RIGHT) {
+                mDockedTaskRect.offset(Math.max(position,
+                        mStableInsets.left) - mDockedTaskRect.left, 0);
+            }
             calculateBoundsForPosition(taskPosition, DockedDividerUtils.invertDockSide(mDockSide),
                     mOtherTaskRect);
             mWindowManagerProxy.resizeDockedStack(mDockedRect, mDockedTaskRect, null,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/AppOpsInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/AppOpsInfo.java
index 322a529..cfc4da4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/AppOpsInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/AppOpsInfo.java
@@ -109,7 +109,7 @@
 
     private void bindPrompt() {
         final TextView prompt = findViewById(R.id.prompt);
-        prompt.setText(getPromptString());
+        prompt.setText(getPrompt());
     }
 
     private void bindButtons() {
@@ -121,41 +121,30 @@
         ok.setOnClickListener(mOnOk);
     }
 
-    private String getPromptString() {
-        String cameraString =
-                mContext.getResources().getString(R.string.notification_appops_camera_active);
-        String micString =
-                mContext.getResources().getString(R.string.notification_appops_microphone_active);
-        String overlayString =
-                mContext.getResources().getString(R.string.notification_appops_overlay_active);
-        String using = null;
-        String promptString;
-        if (mAppOps.contains(AppOpsManager.OP_CAMERA)
-                && mAppOps.contains(AppOpsManager.OP_RECORD_AUDIO)) {
-            using = mContext.getResources().getQuantityString(
-                    R.plurals.notification_using, 2, micString, cameraString);
-        } else if (mAppOps.contains(AppOpsManager.OP_CAMERA)) {
-            using = mContext.getResources().getQuantityString(
-                    R.plurals.notification_using, 1, cameraString);
-        } else if (mAppOps.contains(AppOpsManager.OP_RECORD_AUDIO)){
-            using = mContext.getResources().getQuantityString(
-                    R.plurals.notification_using, 1, micString);
-        }
-
-        if (mAppOps.contains(AppOpsManager.OP_SYSTEM_ALERT_WINDOW)) {
-            if (using != null) {
-                promptString = mContext.getResources().getQuantityString(
-                        R.plurals.notification_appops, 2, overlayString, using);
+    private String getPrompt() {
+        if (mAppOps == null || mAppOps.size() == 0) {
+            return "";
+        } else if (mAppOps.size() == 1) {
+            if (mAppOps.contains(AppOpsManager.OP_CAMERA)) {
+                return mContext.getString(R.string.appops_camera);
+            } else if (mAppOps.contains(AppOpsManager.OP_RECORD_AUDIO)) {
+                return mContext.getString(R.string.appops_microphone);
             } else {
-                promptString = mContext.getResources().getQuantityString(
-                        R.plurals.notification_appops, 1, overlayString);
+                return mContext.getString(R.string.appops_overlay);
+            }
+        } else if (mAppOps.size() == 2) {
+            if (mAppOps.contains(AppOpsManager.OP_CAMERA)) {
+                if (mAppOps.contains(AppOpsManager.OP_RECORD_AUDIO)) {
+                    return mContext.getString(R.string.appops_camera_mic);
+                } else {
+                    return mContext.getString(R.string.appops_camera_overlay);
+                }
+            } else {
+                return mContext.getString(R.string.appops_mic_overlay);
             }
         } else {
-            promptString = mContext.getResources().getQuantityString(
-                    R.plurals.notification_appops, 1, using);
+            return mContext.getString(R.string.appops_camera_mic_overlay);
         }
-
-        return promptString;
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 42c774e..27fa48a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -76,6 +76,7 @@
 import com.android.systemui.statusbar.notification.AboveShelfChangedListener;
 import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
 import com.android.systemui.statusbar.notification.HybridNotificationView;
+import com.android.systemui.statusbar.notification.NotificationCounters;
 import com.android.systemui.statusbar.notification.NotificationInflater;
 import com.android.systemui.statusbar.notification.NotificationUtils;
 import com.android.systemui.statusbar.notification.NotificationViewWrapper;
@@ -1252,6 +1253,8 @@
                 Dependency.get(NotificationBlockingHelperManager.class);
         boolean isBlockingHelperShown = manager.perhapsShowBlockingHelper(this, mMenuRow);
 
+        Dependency.get(MetricsLogger.class).count(NotificationCounters.NOTIFICATION_DISMISSED, 1);
+
         // Continue with dismiss since we don't want the blocking helper to be directly associated
         // with a certain notification.
         performDismiss(fromAccessibility);
@@ -1632,6 +1635,7 @@
                 mTranslateableViews.get(i).setTranslationX(0);
             }
             invalidateOutline();
+            getEntry().expandedIcon.setScrollX(0);
         }
 
         mMenuRow.resetMenu();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
index df6a977..29c3ebd 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
@@ -58,6 +58,7 @@
     @Override
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
         final int givenSize = MeasureSpec.getSize(heightMeasureSpec);
+        final int viewHorizontalPadding = getPaddingStart() + getPaddingEnd();
         int ownMaxHeight = Integer.MAX_VALUE;
         int heightMode = MeasureSpec.getMode(heightMeasureSpec);
         if (heightMode != MeasureSpec.UNSPECIFIED && givenSize != 0) {
@@ -80,8 +81,8 @@
                         ? MeasureSpec.makeMeasureSpec(ownMaxHeight, MeasureSpec.EXACTLY)
                         : MeasureSpec.makeMeasureSpec(layoutParams.height, MeasureSpec.EXACTLY);
                 }
-                child.measure(
-                        getChildMeasureSpec(widthMeasureSpec, 0 /* padding */, layoutParams.width),
+                child.measure(getChildMeasureSpec(
+                        widthMeasureSpec, viewHorizontalPadding, layoutParams.width),
                         childHeightSpec);
                 int childHeight = child.getMeasuredHeight();
                 maxChildHeight = Math.max(maxChildHeight, childHeight);
@@ -94,7 +95,7 @@
         newHeightSpec = MeasureSpec.makeMeasureSpec(ownHeight, MeasureSpec.EXACTLY);
         for (View child : mMatchParentViews) {
             child.measure(getChildMeasureSpec(
-                    widthMeasureSpec, 0 /* padding */, child.getLayoutParams().width),
+                    widthMeasureSpec, viewHorizontalPadding, child.getLayoutParams().width),
                     newHeightSpec);
         }
         mMatchParentViews.clear();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 5477468..285f639 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -315,8 +315,7 @@
      * @return The extra height needed.
      */
     private int getExtraRemoteInputHeight(RemoteInputView remoteInput) {
-        if (remoteInput != null && remoteInput.getVisibility() == VISIBLE
-                && remoteInput.isActive()) {
+        if (remoteInput != null && (remoteInput.isActive() || remoteInput.isSending())) {
             return getResources().getDimensionPixelSize(
                     com.android.internal.R.dimen.notification_content_margin);
         }
@@ -1705,7 +1704,10 @@
         if (mHeadsUpChild == null) {
             viewType = VISIBLE_TYPE_CONTRACTED;
         }
-        return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput);
+        // The headsUp remote input quickly switches to the expanded one, so lets also include that
+        // one
+        return getViewHeight(viewType) + getExtraRemoteInputHeight(mHeadsUpRemoteInput)
+                + getExtraRemoteInputHeight(mExpandedRemoteInput);
     }
 
     public void setRemoteInputVisible(boolean remoteInputVisible) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
index b442bb4..419e262 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationData.java
@@ -16,6 +16,11 @@
 
 package com.android.systemui.statusbar;
 
+import static android.app.Notification.CATEGORY_ALARM;
+import static android.app.Notification.CATEGORY_CALL;
+import static android.app.Notification.CATEGORY_EVENT;
+import static android.app.Notification.CATEGORY_MESSAGE;
+import static android.app.Notification.CATEGORY_REMINDER;
 import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_AMBIENT;
 import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
 import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_NOTIFICATION_LIST;
@@ -52,6 +57,7 @@
 import com.android.systemui.statusbar.phone.NotificationGroupManager;
 import com.android.systemui.statusbar.phone.StatusBar;
 import com.android.systemui.statusbar.policy.HeadsUpManager;
+import com.android.systemui.statusbar.policy.ZenModeController;
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -68,6 +74,7 @@
     private final Environment mEnvironment;
     private HeadsUpManager mHeadsUpManager;
 
+    final ZenModeController mZen = Dependency.get(ZenModeController.class);
     final ForegroundServiceController mFsc = Dependency.get(ForegroundServiceController.class);
 
     public static final class Entry {
@@ -474,6 +481,10 @@
     }
 
     protected boolean isExemptFromDndVisualSuppression(Entry entry) {
+        if (isNotificationBlockedByPolicy(entry.notification.getNotification())) {
+            return false;
+        }
+
         if ((entry.notification.getNotification().flags
                 & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
             return true;
@@ -487,6 +498,26 @@
         return false;
     }
 
+    /**
+     * Categories that are explicitly called out on DND settings screens are always blocked, if
+     * DND has flagged them, even if they are foreground or system notifications that might
+     * otherwise visually bypass DND.
+     */
+    protected boolean isNotificationBlockedByPolicy(Notification n) {
+        if (isCategory(CATEGORY_CALL, n)
+                || isCategory(CATEGORY_MESSAGE, n)
+                || isCategory(CATEGORY_ALARM, n)
+                || isCategory(CATEGORY_EVENT, n)
+                || isCategory(CATEGORY_REMINDER, n)) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean isCategory(String category, Notification n) {
+        return Objects.equals(n.category, category);
+    }
+
     public int getImportance(String key) {
         if (mRankingMap != null) {
             getRanking(key, mTmpRanking);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
index bc572a2..0cc6137 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationGuts.java
@@ -30,6 +30,7 @@
 import android.view.accessibility.AccessibilityEvent;
 import android.widget.FrameLayout;
 
+import com.android.internal.annotations.VisibleForTesting;
 import com.android.systemui.Dependency;
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
@@ -270,7 +271,8 @@
 
 
     /** Animates out the guts view via either a fade or a circular reveal. */
-    private void animateClose(int x, int y, boolean shouldDoCircularReveal) {
+    @VisibleForTesting
+    void animateClose(int x, int y, boolean shouldDoCircularReveal) {
         if (shouldDoCircularReveal) {
             // Circular reveal originating at (x, y)
             if (x == -1 || y == -1) {
@@ -340,7 +342,8 @@
         }
     }
 
-    private void setExposed(boolean exposed, boolean needsFalsingProtection) {
+    @VisibleForTesting
+    void setExposed(boolean exposed, boolean needsFalsingProtection) {
         final boolean wasExposed = mExposed;
         mExposed = exposed;
         mNeedsFalsingProtection = needsFalsingProtection;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
index 6a1740c..ec49f43 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationInfo.java
@@ -54,17 +54,20 @@
 import com.android.systemui.Dependency;
 import com.android.systemui.Interpolators;
 import com.android.systemui.R;
+import com.android.systemui.statusbar.notification.NotificationCounters;
 
 import java.util.List;
 
 /**
- * The guts of a notification revealed when performing a long press.
+ * The guts of a notification revealed when performing a long press. This also houses the blocking
+ * helper affordance that allows a user to keep/stop notifications after swiping one away.
  */
 public class NotificationInfo extends LinearLayout implements NotificationGuts.GutsContent {
     private static final String TAG = "InfoGuts";
 
     private INotificationManager mINotificationManager;
     private PackageManager mPm;
+    private MetricsLogger mMetricsLogger;
 
     private String mPackageName;
     private String mAppName;
@@ -84,17 +87,27 @@
     private OnAppSettingsClickListener mAppSettingsClickListener;
     private NotificationGuts mGutsContainer;
 
-    /** Whether this view is being shown as part of the blocking helper */
+    /** Whether this view is being shown as part of the blocking helper. */
     private boolean mIsForBlockingHelper;
     private boolean mNegativeUserSentiment;
 
-    private OnClickListener mOnKeepShowing = this::closeControls;
+    /** Counter tag that describes how the user exit or quit out of this view. */
+    private String mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_DISMISSED;
+
+    private OnClickListener mOnKeepShowing = v -> {
+        mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_KEEP_SHOWING;
+        closeControls(v);
+    };
 
     private OnClickListener mOnStopOrMinimizeNotifications = v -> {
+        mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_STOP_NOTIFICATIONS;
         swapContent(false);
     };
 
     private OnClickListener mOnUndo = v -> {
+        // Reset exit counter that we'll log and record an undo event separately (not an exit event)
+        mExitReasonCounter = NotificationCounters.BLOCKING_HELPER_DISMISSED;
+        logBlockingHelperCounter(NotificationCounters.BLOCKING_HELPER_UNDO);
         swapContent(true);
     };
 
@@ -151,6 +164,7 @@
             boolean isUserSentimentNegative)
             throws RemoteException {
         mINotificationManager = iNotificationManager;
+        mMetricsLogger = Dependency.get(MetricsLogger.class);
         mPackageName = pkg;
         mNumUniqueChannelsInRow = numUniqueChannelsInRow;
         mSbn = sbn;
@@ -183,6 +197,8 @@
         bindHeader();
         bindPrompt();
         bindButtons();
+
+        logBlockingHelperCounter(NotificationCounters.BLOCKING_HELPER_SHOWN);
     }
 
     private void bindHeader() throws RemoteException {
@@ -235,6 +251,8 @@
             final int appUidF = mAppUid;
             settingsButton.setOnClickListener(
                     (View view) -> {
+                        logBlockingHelperCounter(
+                                NotificationCounters.BLOCKING_HELPER_NOTIF_SETTINGS);
                         mOnSettingsClickListener.onClick(view,
                                 mNumUniqueChannelsInRow > 1 ? null : mSingleNotificationChannel,
                                 appUidF);
@@ -269,6 +287,13 @@
         }
     }
 
+    @VisibleForTesting
+    void logBlockingHelperCounter(String counterTag) {
+        if (mIsForBlockingHelper) {
+            mMetricsLogger.count(counterTag, 1);
+        }
+    }
+
     private boolean hasImportanceChanged() {
         return mSingleNotificationChannel != null && mStartingUserImportance != mChosenImportance;
     }
@@ -437,25 +462,15 @@
      */
     @VisibleForTesting
     void closeControls(View v) {
-        if (mIsForBlockingHelper) {
-            NotificationBlockingHelperManager manager =
-                    Dependency.get(NotificationBlockingHelperManager.class);
-            manager.dismissCurrentBlockingHelper();
-
-            // Since this won't get a callback via gutsContainer.closeControls, save the new
-            // importance values immediately.
-            saveImportance();
-        } else {
-            int[] parentLoc = new int[2];
-            int[] targetLoc = new int[2];
-            mGutsContainer.getLocationOnScreen(parentLoc);
-            v.getLocationOnScreen(targetLoc);
-            final int centerX = v.getWidth() / 2;
-            final int centerY = v.getHeight() / 2;
-            final int x = targetLoc[0] - parentLoc[0] + centerX;
-            final int y = targetLoc[1] - parentLoc[1] + centerY;
-            mGutsContainer.closeControls(x, y, true /* save */, false /* force */);
-        }
+        int[] parentLoc = new int[2];
+        int[] targetLoc = new int[2];
+        mGutsContainer.getLocationOnScreen(parentLoc);
+        v.getLocationOnScreen(targetLoc);
+        final int centerX = v.getWidth() / 2;
+        final int centerY = v.getHeight() / 2;
+        final int x = targetLoc[0] - parentLoc[0] + centerX;
+        final int y = targetLoc[1] - parentLoc[1] + centerY;
+        mGutsContainer.closeControls(x, y, true /* save */, false /* force */);
     }
 
     @Override
@@ -480,6 +495,7 @@
         if (save) {
             saveImportance();
         }
+        logBlockingHelperCounter(mExitReasonCounter);
         return false;
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index cfc69a8..b0d5536 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -165,6 +165,16 @@
         return mSpinning.containsKey(key);
     }
 
+    /**
+     * Same as {@link #isSpinning}, but also verifies that the token is the same
+     * @param key the key that is spinning
+     * @param token the token that needs to be the same
+     * @return if this key with a given token is spinning
+     */
+    public boolean isSpinning(String key, Object token) {
+        return mSpinning.get(key) == token;
+    }
+
     private void apply(NotificationData.Entry entry) {
         mDelegate.setRemoteInputActive(entry, isRemoteInputActive(entry));
         boolean remoteInputActive = isRemoteInputActive();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
index 5748ec9b..19980a2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java
@@ -211,6 +211,11 @@
         //TODO: May not be needed. Mobile is always expected to be visible (not a dot)
     }
 
+    @Override
+    public int getVisibleState() {
+        return 0;
+    }
+
     @VisibleForTesting
     public MobileIconState getState() {
         return mState;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
index bf94c1f..ca00a5a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java
@@ -146,6 +146,11 @@
         }
     }
 
+    @Override
+    public int getVisibleState() {
+        return mVisibleState;
+    }
+
     private void init() {
         int dualToneLightTheme = Utils.getThemeAttr(mContext, R.attr.lightIconTheme);
         int dualToneDarkTheme = Utils.getThemeAttr(mContext, R.attr.darkIconTheme);
@@ -191,6 +196,7 @@
     }
 
     private void updateState(WifiIconState state) {
+        setContentDescription(state.contentDescription);
         if (mState.resId != state.resId && state.resId >= 0) {
             NeutralGoodDrawable drawable = NeutralGoodDrawable
                     .create(mLightContext, mDarkContext, state.resId);
@@ -212,6 +218,7 @@
     }
 
     private void initViewState() {
+        setContentDescription(mState.contentDescription);
         if (mState.resId >= 0) {
             NeutralGoodDrawable drawable = NeutralGoodDrawable.create(
                     mLightContext, mDarkContext, mState.resId);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusIconDisplayable.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusIconDisplayable.java
index 6383816..b831b86 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusIconDisplayable.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusIconDisplayable.java
@@ -23,6 +23,7 @@
     void setStaticDrawableColor(int color);
     void setDecorColor(int color);
     void setVisibleState(int state);
+    int getVisibleState();
     boolean isIconVisible();
     default boolean isIconBlocked() {
         return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java b/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
index 5768fa2..68e47f7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/car/UserGridRecyclerView.java
@@ -28,6 +28,8 @@
 import android.graphics.Bitmap;
 import android.os.AsyncTask;
 import android.os.UserHandle;
+import android.support.v4.graphics.drawable.RoundedBitmapDrawable;
+import android.support.v4.graphics.drawable.RoundedBitmapDrawableFactory;
 import android.support.v7.widget.RecyclerView;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
@@ -193,7 +195,10 @@
         @Override
         public void onBindViewHolder(UserAdapterViewHolder holder, int position) {
             UserRecord userRecord = mUsers.get(position);
-            holder.mUserAvatarImageView.setImageBitmap(getUserRecordIcon(userRecord));
+            RoundedBitmapDrawable circleIcon = RoundedBitmapDrawableFactory.create(mRes,
+                getUserRecordIcon(userRecord));
+            circleIcon.setCircular(true);
+            holder.mUserAvatarImageView.setImageDrawable(circleIcon);
             holder.mUserNameTextView.setText(userRecord.mInfo.name);
             holder.mView.setOnClickListener(v -> {
                 if (userRecord == null) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCounters.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCounters.java
new file mode 100644
index 0000000..9a12e8b
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationCounters.java
@@ -0,0 +1,44 @@
+/*
+ * 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.systemui.statusbar.notification;
+
+/**
+ * Constants for counter tags for Notification-related actions/views.
+ */
+public class NotificationCounters {
+    /** Counter tag for notification dismissal. */
+    public static final String NOTIFICATION_DISMISSED = "notification_dismissed";
+
+    /** Counter tag for when the blocking helper is shown to the user. */
+    public static final String BLOCKING_HELPER_SHOWN = "blocking_helper_shown";
+    /** Counter tag for when the blocking helper is dismissed via a miscellaneous interaction. */
+    public static final String BLOCKING_HELPER_DISMISSED = "blocking_helper_dismissed";
+    /** Counter tag for when the user hits 'stop notifications' in the blocking helper. */
+    public static final String BLOCKING_HELPER_STOP_NOTIFICATIONS =
+            "blocking_helper_stop_notifications";
+    /** Counter tag for when the user hits 'keep showing' in the blocking helper. */
+    public static final String BLOCKING_HELPER_KEEP_SHOWING =
+            "blocking_helper_keep_showing";
+    /**
+     * Counter tag for when the user hits undo in context of the blocking helper - this can happen
+     * multiple times per view.
+     */
+    public static final String BLOCKING_HELPER_UNDO = "blocking_helper_undo";
+    /** Counter tag for when the user hits the notification settings icon in the blocking helper. */
+    public static final String BLOCKING_HELPER_NOTIF_SETTINGS =
+            "blocking_helper_notif_settings";
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java
index c9dcc5c..2a47fe0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java
@@ -227,7 +227,9 @@
             if (mUiOffloadThread == null) {
                 mUiOffloadThread = Dependency.get(UiOffloadThread.class);
             }
-            mUiOffloadThread.submit(() -> pendingIntent.registerCancelListener(listener));
+            if (view.isAttachedToWindow()) {
+                mUiOffloadThread.submit(() -> pendingIntent.registerCancelListener(listener));
+            }
             view.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
                 @Override
                 public void onViewAttachedToWindow(View v) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
index fc8ceb6..8ede224 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
@@ -530,6 +530,7 @@
 
     protected void reset() {
         mTransformedView = null;
+        mTransformInfo = null;
         mSameAsAny = false;
         mTransformationEndX = UNDEFINED;
         mTransformationEndY = UNDEFINED;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
index 7284ee8..fb94756 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ButtonDispatcher.java
@@ -14,8 +14,13 @@
 
 package com.android.systemui.statusbar.phone;
 
+import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
+import android.animation.ValueAnimator;
 import android.view.View;
 
+import android.view.View.AccessibilityDelegate;
+import com.android.systemui.Interpolators;
 import com.android.systemui.plugins.statusbar.phone.NavBarButtonProvider.ButtonInterface;
 import com.android.systemui.statusbar.policy.KeyButtonDrawable;
 
@@ -26,6 +31,8 @@
  * multiples of the same nav bar icon appearing.
  */
 public class ButtonDispatcher {
+    private final static int FADE_DURATION_IN = 150;
+    private final static int FADE_DURATION_OUT = 100;
 
     private final ArrayList<View> mViews = new ArrayList<>();
 
@@ -36,13 +43,25 @@
     private View.OnLongClickListener mLongClickListener;
     private View.OnHoverListener mOnHoverListener;
     private Boolean mLongClickable;
-    private Integer mAlpha;
+    private Float mAlpha;
     private Float mDarkIntensity;
     private Integer mVisibility = -1;
     private Boolean mDelayTouchFeedback;
     private KeyButtonDrawable mImageDrawable;
     private View mCurrentView;
     private boolean mVertical;
+    private ValueAnimator mFadeAnimator;
+    private AccessibilityDelegate mAccessibilityDelegate;
+
+    private final ValueAnimator.AnimatorUpdateListener mAlphaListener = animation ->
+            setAlpha((float) animation.getAnimatedValue());
+
+    private final AnimatorListenerAdapter mFadeListener = new AnimatorListenerAdapter() {
+        @Override
+        public void onAnimationEnd(Animator animation) {
+            setVisibility(getAlpha() == 1 ? View.VISIBLE : View.INVISIBLE);
+        }
+    };
 
     public ButtonDispatcher(int id) {
         mId = id;
@@ -64,19 +83,25 @@
         if (mAlpha != null) {
             view.setAlpha(mAlpha);
         }
-        if (mDarkIntensity != null) {
-            ((ButtonInterface) view).setDarkIntensity(mDarkIntensity);
-        }
-        if (mVisibility != null) {
+        if (mVisibility != null && mVisibility != -1) {
             view.setVisibility(mVisibility);
         }
-        if (mImageDrawable != null) {
-            ((ButtonInterface) view).setImageDrawable(mImageDrawable);
+        if (mAccessibilityDelegate != null) {
+            view.setAccessibilityDelegate(mAccessibilityDelegate);
         }
-        if (mDelayTouchFeedback != null) {
-            ((ButtonInterface) view).setDelayTouchFeedback(mDelayTouchFeedback);
+        if (view instanceof ButtonInterface) {
+            final ButtonInterface button = (ButtonInterface) view;
+            if (mDarkIntensity != null) {
+                button.setDarkIntensity(mDarkIntensity);
+            }
+            if (mImageDrawable != null) {
+                button.setImageDrawable(mImageDrawable);
+            }
+            if (mDelayTouchFeedback != null) {
+                button.setDelayTouchFeedback(mDelayTouchFeedback);
+            }
+            button.setVertical(mVertical);
         }
-        ((ButtonInterface) view).setVertical(mVertical);
     }
 
     public int getId() {
@@ -99,7 +124,9 @@
         mImageDrawable = drawable;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ButtonInterface) mViews.get(i)).setImageDrawable(mImageDrawable);
+            if (mViews.get(i) instanceof ButtonInterface) {
+                ((ButtonInterface) mViews.get(i)).setImageDrawable(mImageDrawable);
+            }
         }
     }
 
@@ -116,11 +143,13 @@
         // This seems to be an instantaneous thing, so not going to persist it.
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ButtonInterface) mViews.get(i)).abortCurrentGesture();
+            if (mViews.get(i) instanceof ButtonInterface) {
+                ((ButtonInterface) mViews.get(i)).abortCurrentGesture();
+            }
         }
     }
 
-    public void setAlpha(int alpha) {
+    public void setAlpha(float alpha) {
         mAlpha = alpha;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
@@ -132,7 +161,9 @@
         mDarkIntensity = darkIntensity;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ButtonInterface) mViews.get(i)).setDarkIntensity(darkIntensity);
+            if (mViews.get(i) instanceof ButtonInterface) {
+                ((ButtonInterface) mViews.get(i)).setDarkIntensity(darkIntensity);
+            }
         }
     }
 
@@ -140,7 +171,9 @@
         mDelayTouchFeedback = delay;
         final int N = mViews.size();
         for (int i = 0; i < N; i++) {
-            ((ButtonInterface) mViews.get(i)).setDelayTouchFeedback(delay);
+            if (mViews.get(i) instanceof ButtonInterface) {
+                ((ButtonInterface) mViews.get(i)).setDelayTouchFeedback(delay);
+            }
         }
     }
 
@@ -184,6 +217,14 @@
         }
     }
 
+    public void setAccessibilityDelegate(AccessibilityDelegate delegate) {
+        mAccessibilityDelegate = delegate;
+        final int N = mViews.size();
+        for (int i = 0; i < N; i++) {
+            mViews.get(i).setAccessibilityDelegate(delegate);
+        }
+    }
+
     public void setClickable(boolean clickable) {
         abortCurrentGesture();
         final int N = mViews.size();
@@ -192,6 +233,19 @@
         }
     }
 
+    public void animateFade(boolean in) {
+        if (mFadeAnimator != null) {
+            mFadeAnimator.cancel();
+        }
+        mFadeAnimator = ValueAnimator.ofFloat(getAlpha(), in ? 1 : 0);
+        mFadeAnimator.setDuration(in? FADE_DURATION_IN : FADE_DURATION_OUT);
+        mFadeAnimator.setInterpolator(in ? Interpolators.ALPHA_IN : Interpolators.ALPHA_OUT);
+        mFadeAnimator.addListener(mFadeListener);
+        mFadeAnimator.addUpdateListener(mAlphaListener);
+        mFadeAnimator.start();
+        setVisibility(View.VISIBLE);
+    }
+
     public ArrayList<View> getViews() {
         return mViews;
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
index 9fcb090..ee83250 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragment.java
@@ -212,7 +212,7 @@
     }
 
     public void hideClock(boolean animate) {
-        animateHide(mClockView, animate);
+        animateHiddenState(mClockView, View.GONE, animate);
     }
 
     public void showClock(boolean animate) {
@@ -240,21 +240,29 @@
     }
 
     /**
-     * Hides a view.
+     * Animate a view to INVISIBLE or GONE
      */
-    private void animateHide(final View v, boolean animate) {
+    private void animateHiddenState(final View v, int state, boolean animate) {
         v.animate().cancel();
         if (!animate) {
             v.setAlpha(0f);
-            v.setVisibility(View.INVISIBLE);
+            v.setVisibility(state);
             return;
         }
+
         v.animate()
                 .alpha(0f)
                 .setDuration(160)
                 .setStartDelay(0)
                 .setInterpolator(Interpolators.ALPHA_OUT)
-                .withEndAction(() -> v.setVisibility(View.INVISIBLE));
+                .withEndAction(() -> v.setVisibility(state));
+    }
+
+    /**
+     * Hides a view.
+     */
+    private void animateHide(final View v, boolean animate) {
+        animateHiddenState(v, View.INVISIBLE, animate);
     }
 
     /**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
index 824960e..46b4078 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java
@@ -24,6 +24,7 @@
 import android.view.Gravity;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
 import android.widget.LinearLayout;
 
 import com.android.internal.statusbar.StatusBarIcon;
@@ -56,7 +57,14 @@
         mIconSize = iconSize;
         mColor = DarkIconDispatcher.DEFAULT_ICON_TINT;
 
+        if (statusIcons instanceof StatusIconContainer) {
+            setShouldRestrictIcons(((StatusIconContainer) statusIcons).isRestrictingIcons());
+        } else {
+            setShouldRestrictIcons(false);
+        }
         setLayoutParams(mStatusIcons.getLayoutParams());
+        setPadding(mStatusIcons.getPaddingLeft(),mStatusIcons.getPaddingTop(),
+                mStatusIcons.getPaddingRight(), mStatusIcons.getPaddingBottom());
         setOrientation(mStatusIcons.getOrientation());
         setGravity(Gravity.CENTER_VERTICAL); // no LL.getGravity()
         ViewGroup p = (ViewGroup) mStatusIcons.getParent();
@@ -77,6 +85,7 @@
         for (int i = 0; i < getChildCount(); i++) {
             StatusIconDisplayable child = (StatusIconDisplayable) getChildAt(i);
             child.setStaticDrawableColor(mColor);
+            child.setDecorColor(mColor);
         }
     }
 
@@ -189,11 +198,12 @@
         }
         StatusBarIcon icon = new StatusBarIcon(iconPkg, UserHandle.SYSTEM, iconId, 0, 0, "Demo");
         icon.visible = true;
-        StatusBarIconView v = new StatusBarIconView(getContext(), null, null);
+        StatusBarIconView v = new StatusBarIconView(getContext(), slot, null, false);
         v.setTag(slot);
         v.set(icon);
         v.setStaticDrawableColor(mColor);
-        addView(v, 0, new LinearLayout.LayoutParams(mIconSize, mIconSize));
+        v.setDecorColor(mColor);
+        addView(v, 0, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, mIconSize));
     }
 
     public void addDemoWifiView(WifiIconState state) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
index 903b813..182293f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpTouchHelper.java
@@ -23,6 +23,7 @@
 import com.android.systemui.Gefingerpoken;
 import com.android.systemui.statusbar.ExpandableNotificationRow;
 import com.android.systemui.statusbar.ExpandableView;
+import com.android.systemui.statusbar.NotificationData;
 import com.android.systemui.statusbar.stack.NotificationStackScrollLayout;
 
 /**
@@ -80,6 +81,14 @@
                     mPickedChild = (ExpandableNotificationRow) child;
                     mTouchingHeadsUpView = !mStackScroller.isExpanded()
                             && mPickedChild.isHeadsUp() && mPickedChild.isPinned();
+                } else if (child == null && !mStackScroller.isExpanded()) {
+                    // We might touch above the visible heads up child, but then we still would
+                    // like to capture it.
+                    NotificationData.Entry topEntry = mHeadsUpManager.getTopEntry();
+                    if (topEntry != null && topEntry.row.isPinned()) {
+                        mPickedChild = topEntry.row;
+                        mTouchingHeadsUpView = true;
+                    }
                 }
                 break;
             case MotionEvent.ACTION_POINTER_UP:
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
index 3e01aec..f134151 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java
@@ -54,6 +54,8 @@
 
     private static final String TAG = "KeyguardBouncer";
     static final float ALPHA_EXPANSION_THRESHOLD = 0.95f;
+    private static final float EXPANSION_HIDDEN = 1f;
+    private static final float EXPANSION_VISIBLE = 0f;
 
     protected final Context mContext;
     protected final ViewMediatorCallback mCallback;
@@ -71,10 +73,15 @@
                 }
             };
     private final Runnable mRemoveViewRunnable = this::removeView;
+    protected KeyguardHostView mKeyguardView;
+    private final Runnable mResetRunnable = ()-> {
+        if (mKeyguardView != null) {
+            mKeyguardView.reset();
+        }
+    };
 
     private int mStatusBarHeight;
-    private float mExpansion;
-    protected KeyguardHostView mKeyguardView;
+    private float mExpansion = EXPANSION_HIDDEN;
     protected ViewGroup mRoot;
     private boolean mShowingSoon;
     private int mBouncerPromptReason;
@@ -96,7 +103,7 @@
     }
 
     public void show(boolean resetSecuritySelection) {
-        show(resetSecuritySelection, true /* notifyFalsing */);
+        show(resetSecuritySelection, true /* animated */);
     }
 
     /**
@@ -120,8 +127,7 @@
         // Later, at the end of the animation, when the bouncer is at the top of the screen,
         // onFullyShown() will be called and FalsingManager will stop recording touches.
         if (animated) {
-            mFalsingManager.onBouncerShown();
-            setExpansion(0);
+            setExpansion(EXPANSION_VISIBLE);
         }
 
         if (resetSecuritySelection) {
@@ -152,6 +158,7 @@
         mShowingSoon = true;
 
         // Split up the work over multiple frames.
+        DejankUtils.removeCallbacks(mResetRunnable);
         DejankUtils.postAfterTraversal(mShowRunnable);
 
         mCallback.onBouncerVisiblityChanged(true /* shown */);
@@ -181,6 +188,7 @@
                 mRoot.setVisibility(View.INVISIBLE);
             }
             mFalsingManager.onBouncerHidden();
+            DejankUtils.postAfterTraversal(mResetRunnable);
         }
     }
 
@@ -210,6 +218,9 @@
                 mKeyguardView.requestLayout();
             }
             mShowingSoon = false;
+            if (mExpansion == EXPANSION_VISIBLE) {
+                mKeyguardView.onResume();
+            }
             StatsLog.write(StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED,
                 StatsLog.KEYGUARD_BOUNCER_STATE_CHANGED__STATE__SHOWN);
         }
@@ -303,7 +314,7 @@
 
     public boolean isShowing() {
         return (mShowingSoon || (mRoot != null && mRoot.getVisibility() == View.VISIBLE))
-                && mExpansion == 0 && !isAnimatingAway();
+                && mExpansion == EXPANSION_VISIBLE && !isAnimatingAway();
     }
 
     /**
@@ -337,10 +348,10 @@
             mKeyguardView.setTranslationY(fraction * mKeyguardView.getHeight());
         }
 
-        if (fraction == 0 && oldExpansion != 0) {
+        if (fraction == EXPANSION_VISIBLE && oldExpansion != EXPANSION_VISIBLE) {
             onFullyShown();
             mExpansionCallback.onFullyShown();
-        } else if (fraction == 1 && oldExpansion != 0) {
+        } else if (fraction == EXPANSION_HIDDEN && oldExpansion != EXPANSION_HIDDEN) {
             onFullyHidden();
             mExpansionCallback.onFullyHidden();
         }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissHandler.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissHandler.java
index 759a0d1..76ddca4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissHandler.java
@@ -23,7 +23,9 @@
 
 /** Executes actions that require the screen to be unlocked. */
 public interface KeyguardDismissHandler {
-    /** Executes an action that requres the screen to be unlocked. */
-    void dismissKeyguardThenExecute(
-            OnDismissAction action, @Nullable Runnable cancelAction, boolean afterKeyguardGone);
+    /**
+     * Executes an action that requres the screen to be unlocked, showing the keyguard if
+     * necessary. Does not close the notification shade (in case it was open).
+     */
+    void executeWhenUnlocked(OnDismissAction action);
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissUtil.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissUtil.java
index c38b0b6..d676692 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissUtil.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardDismissUtil.java
@@ -40,14 +40,13 @@
      * <p>Must be called after {@link #setDismissHandler}.
      */
     @Override
-    public void dismissKeyguardThenExecute(
-            OnDismissAction action, Runnable cancelAction, boolean afterKeyguardGone) {
+    public void executeWhenUnlocked(OnDismissAction action) {
         KeyguardDismissHandler dismissHandler = mDismissHandler;
         if (dismissHandler == null) {
             Log.wtf(TAG, "KeyguardDismissHandler not set.");
             action.onDismiss();
             return;
         }
-        dismissHandler.dismissKeyguardThenExecute(action, cancelAction, afterKeyguardGone);
+        dismissHandler.executeWhenUnlocked(action);
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
index 264f574..4b66ee5a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java
@@ -55,6 +55,7 @@
     private final UnlockMethodCache mUnlockMethodCache;
     private AccessibilityController mAccessibilityController;
     private boolean mHasFingerPrintIcon;
+    private boolean mHasFaceUnlockIcon;
     private int mDensity;
 
     private final Runnable mDrawOffTimeout = () -> update(true /* forceUpdate */);
@@ -130,6 +131,7 @@
         }
         int state = getState();
         boolean anyFingerprintIcon = state == STATE_FINGERPRINT || state == STATE_FINGERPRINT_ERROR;
+        mHasFaceUnlockIcon = state == STATE_FACE_UNLOCK;
         boolean useAdditionalPadding = anyFingerprintIcon;
         boolean trustHidden = anyFingerprintIcon;
         if (state != mLastState || mDeviceInteractive != mLastDeviceInteractive
@@ -179,6 +181,11 @@
             setRestingAlpha(
                     anyFingerprintIcon ? 1f : KeyguardAffordanceHelper.SWIPE_RESTING_ALPHA_AMOUNT);
             setImageDrawable(icon, false);
+            if (mHasFaceUnlockIcon) {
+                announceForAccessibility(getContext().getString(
+                    R.string.accessibility_scanning_face));
+            }
+
             mHasFingerPrintIcon = anyFingerprintIcon;
             if (animation != null && isAnim) {
                 animation.forceAnimationOnUI();
@@ -228,6 +235,11 @@
             info.addAction(unlock);
             info.setHintText(getContext().getString(
                     R.string.accessibility_waiting_for_fingerprint));
+        } else if (mHasFaceUnlockIcon){
+            //Avoid 'button' to be spoken for scanning face
+            info.setClassName(LockIcon.class.getName());
+            info.setContentDescription(getContext().getString(
+                R.string.accessibility_scanning_face));
         }
     }
 
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
index a0df558..18e8775 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarGestureHelper.java
@@ -74,6 +74,7 @@
     private boolean mDownOnRecents;
     private VelocityTracker mVelocityTracker;
     private boolean mIsInScreenPinning;
+    private boolean mNotificationsVisibleOnDown;
 
     private boolean mDockWindowEnabled;
     private boolean mDockWindowTouchSlopExceeded;
@@ -108,6 +109,7 @@
     public boolean onInterceptTouchEvent(MotionEvent event) {
         if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
             mIsInScreenPinning = mNavigationBarView.inScreenPinning();
+            mNotificationsVisibleOnDown = !mStatusBar.isPresenterFullyCollapsed();
         }
         if (!canHandleGestures()) {
             return false;
@@ -274,7 +276,7 @@
 
     private boolean canHandleGestures() {
         return !mIsInScreenPinning && !mStatusBar.isKeyguardShowing()
-                && mStatusBar.isPresenterFullyCollapsed();
+                && !mNotificationsVisibleOnDown;
     }
 
     private int calculateDragMode() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
index 91cf8f0..4885c2f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarInflaterView.java
@@ -168,10 +168,10 @@
         }
     }
 
-    public void setButtonDispatchers(SparseArray<ButtonDispatcher> buttonDisatchers) {
-        mButtonDispatchers = buttonDisatchers;
-        for (int i = 0; i < buttonDisatchers.size(); i++) {
-            initiallyFill(buttonDisatchers.valueAt(i));
+    public void setButtonDispatchers(SparseArray<ButtonDispatcher> buttonDispatchers) {
+        mButtonDispatchers = buttonDispatchers;
+        for (int i = 0; i < buttonDispatchers.size(); i++) {
+            initiallyFill(buttonDispatchers.valueAt(i));
         }
     }
 
@@ -220,7 +220,8 @@
             // and will only happen once.
             if (parent.getChildAt(i).getId() == buttonDispatcher.getId()) {
                 buttonDispatcher.addView(parent.getChildAt(i));
-            } else if (parent.getChildAt(i) instanceof ViewGroup) {
+            }
+            if (parent.getChildAt(i) instanceof ViewGroup) {
                 addAll(buttonDispatcher, (ViewGroup) parent.getChildAt(i));
             }
         }
@@ -411,7 +412,8 @@
             final int indexOfKey = mButtonDispatchers.indexOfKey(v.getId());
             if (indexOfKey >= 0) {
                 mButtonDispatchers.valueAt(indexOfKey).addView(v);
-            } else if (v instanceof ViewGroup) {
+            }
+            if (v instanceof ViewGroup) {
                 final ViewGroup viewGroup = (ViewGroup)v;
                 final int N = viewGroup.getChildCount();
                 for (int i = 0; i < N; i++) {
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 6dbe9f8..533d5ec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -36,8 +36,10 @@
 import android.graphics.Rect;
 import android.graphics.drawable.AnimatedVectorDrawable;
 import android.graphics.drawable.Drawable;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.os.RemoteException;
 import android.os.SystemProperties;
 import android.support.annotation.ColorInt;
 import android.util.AttributeSet;
@@ -51,6 +53,8 @@
 import android.view.ViewGroup;
 import android.view.WindowInsets;
 import android.view.WindowManager;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.FrameLayout;
 
@@ -60,11 +64,14 @@
 import com.android.systemui.OverviewProxyService;
 import com.android.systemui.R;
 import com.android.systemui.RecentsComponent;
+import com.android.systemui.SysUiServiceProvider;
 import com.android.systemui.plugins.PluginListener;
 import com.android.systemui.plugins.PluginManager;
 import com.android.systemui.plugins.statusbar.phone.NavGesture;
 import com.android.systemui.plugins.statusbar.phone.NavGesture.GestureHelper;
+import com.android.systemui.recents.Recents;
 import com.android.systemui.recents.RecentsOnboarding;
+import com.android.systemui.shared.recents.IOverviewProxy;
 import com.android.systemui.shared.system.ActivityManagerWrapper;
 import com.android.systemui.shared.system.NavigationBarCompat;
 import com.android.systemui.shared.system.WindowManagerWrapper;
@@ -124,6 +131,7 @@
 
     private GestureHelper mGestureHelper;
     private final DeadZone mDeadZone;
+    private boolean mDeadZoneConsuming = false;
     private final NavigationBarTransitions mBarTransitions;
     private final OverviewProxyService mOverviewProxyService;
 
@@ -230,6 +238,34 @@
         }
     }
 
+    private final AccessibilityDelegate mQuickStepAccessibilityDelegate
+            = new AccessibilityDelegate() {
+        private AccessibilityAction mToggleOverviewAction;
+
+        @Override
+        public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+            super.onInitializeAccessibilityNodeInfo(host, info);
+            if (mToggleOverviewAction == null) {
+                mToggleOverviewAction = new AccessibilityAction(R.id.action_toggle_overview,
+                    getContext().getString(R.string.quick_step_accessibility_toggle_overview));
+            }
+            info.addAction(mToggleOverviewAction);
+        }
+
+        @Override
+        public boolean performAccessibilityAction(View host, int action, Bundle args) {
+            switch (action) {
+                case R.id.action_toggle_overview:
+                    SysUiServiceProvider.getComponent(getContext(), Recents.class)
+                            .toggleRecentApps();
+                    break;
+                default:
+                    return super.performAccessibilityAction(host, action, args);
+            }
+            return true;
+        }
+    };
+
     public NavigationBarView(Context context, AttributeSet attrs) {
         super(context, attrs);
 
@@ -260,6 +296,8 @@
                 new ButtonDispatcher(R.id.accessibility_button));
         mButtonDispatchers.put(R.id.rotate_suggestion,
                 new ButtonDispatcher(R.id.rotate_suggestion));
+        mButtonDispatchers.put(R.id.menu_container,
+                new ButtonDispatcher(R.id.menu_container));
         mDeadZone = new DeadZone(this);
     }
 
@@ -289,8 +327,7 @@
 
     @Override
     public boolean onInterceptTouchEvent(MotionEvent event) {
-        if (mDeadZone.onTouchEvent(event)) {
-            // Consumed the touch event
+        if (shouldDeadZoneConsumeTouchEvents(event)) {
             return true;
         }
         switch (event.getActionMasked()) {
@@ -312,8 +349,7 @@
 
     @Override
     public boolean onTouchEvent(MotionEvent event) {
-        if (mDeadZone.onTouchEvent(event)) {
-            // Consumed the touch event
+        if (shouldDeadZoneConsumeTouchEvents(event)) {
             return true;
         }
         if (mGestureHelper.onTouchEvent(event)) {
@@ -322,6 +358,26 @@
         return super.onTouchEvent(event);
     }
 
+    private boolean shouldDeadZoneConsumeTouchEvents(MotionEvent event) {
+        if (mDeadZone.onTouchEvent(event) || mDeadZoneConsuming) {
+            switch (event.getActionMasked()) {
+                case MotionEvent.ACTION_DOWN:
+                    // Allow gestures starting in the deadzone to be slippery
+                    setSlippery(true);
+                    mDeadZoneConsuming = true;
+                    break;
+                case MotionEvent.ACTION_CANCEL:
+                case MotionEvent.ACTION_UP:
+                    // When a gesture started in the deadzone is finished, restore slippery state
+                    updateSlippery();
+                    mDeadZoneConsuming = false;
+                    break;
+            }
+            return true;
+        }
+        return false;
+    }
+
     public @NavigationBarCompat.HitTarget int getDownHitTarget() {
         return mDownHitTarget;
     }
@@ -368,6 +424,10 @@
         return mButtonDispatchers.get(R.id.rotate_suggestion);
     }
 
+    public ButtonDispatcher getMenuContainer() {
+        return mButtonDispatchers.get(R.id.menu_container);
+    }
+
     public SparseArray<ButtonDispatcher> getButtonDispatchers() {
         return mButtonDispatchers;
     }
@@ -673,12 +733,14 @@
     }
 
     public void updateStates() {
+        final boolean showSwipeUpUI = mOverviewProxyService.shouldShowSwipeUpUI();
         updateSlippery();
         reloadNavIcons();
         updateNavButtonIcons();
         setUpSwipeUpOnboarding(isQuickStepSwipeUpEnabled());
-        WindowManagerWrapper.getInstance().setNavBarVirtualKeyHapticFeedbackEnabled(
-                !mOverviewProxyService.shouldShowSwipeUpUI());
+        WindowManagerWrapper.getInstance().setNavBarVirtualKeyHapticFeedbackEnabled(!showSwipeUpUI);
+        getHomeButton().setAccessibilityDelegate(
+                showSwipeUpUI ? mQuickStepAccessibilityDelegate : null);
     }
 
     private void updateSlippery() {
@@ -796,6 +858,10 @@
 
     public boolean isRotateButtonVisible() { return mShowRotateButton; }
 
+    public void setMenuContainerVisibility(boolean visible) {
+        getMenuContainer().animateFade(visible);
+    }
+
     @Override
     public void onFinishInflate() {
         mNavigationInflaterView = (NavigationBarInflaterView) findViewById(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index b650944..b475b64 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -2267,7 +2267,7 @@
     }
 
     public void onScreenTurningOn() {
-        mKeyguardStatusView.refreshTime();
+        mKeyguardStatusView.dozeTimeTick();
     }
 
     @Override
@@ -2690,7 +2690,7 @@
     }
 
     public void dozeTimeTick() {
-        mKeyguardStatusView.refreshTime();
+        mKeyguardStatusView.dozeTimeTick();
         mKeyguardBottomArea.dozeTimeTick();
         if (mDarkAmount > 0) {
             positionClockAndNotifications();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
index 6b0ac94..d9ba313 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java
@@ -327,7 +327,7 @@
                 - mNavigationBarView.getPaddingTop();
         final int x1, x2, y1, y2;
         if (mIsVertical) {
-            x1 = (width - mTrackThickness) / 2 + mNavigationBarView.getPaddingStart();
+            x1 = (width - mTrackThickness) / 2 + mNavigationBarView.getPaddingLeft();
             x2 = x1 + mTrackThickness;
             y1 = mDragPositive ? height / 2 : mTrackPadding;
             y2 = y1 + height / 2 - mTrackPadding;
@@ -401,6 +401,10 @@
             mDarkTrackColor = mContext.getColor(R.color.quick_step_track_background_dark);
             mTrackAnimator.setFloatValues(0, 1);
             mTrackAnimator.start();
+
+            // Hide menu buttons on nav bar until quick scrub has ended
+            mNavigationBarView.setMenuContainerVisibility(false /* visible */);
+
             try {
                 mOverviewEventSender.getProxy().onQuickScrubStart();
                 if (DEBUG_OVERVIEW_PROXY) {
@@ -416,6 +420,10 @@
     private void endQuickScrub(boolean animate) {
         if (mQuickScrubActive || mDragScrubActive) {
             animateEnd();
+
+            // Restore the nav bar menu buttons visibility
+            mNavigationBarView.setMenuContainerVisibility(true /* visible */);
+
             if (mQuickScrubActive) {
                 try {
                     mOverviewEventSender.getProxy().onQuickScrubEnd();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
index d6b45d6..ae93d98 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java
@@ -92,7 +92,7 @@
     /**
      * Default alpha value for most scrims.
      */
-    public static final float GRADIENT_SCRIM_ALPHA = 0.70f;
+    public static final float GRADIENT_SCRIM_ALPHA = 0.45f;
     /**
      * A scrim varies its opacity based on a busyness factor, for example
      * how many notifications are currently visible.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
index bbdaa99..1c5df58 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimState.java
@@ -60,7 +60,7 @@
         @Override
         public float getBehindAlpha(float busynessFactor) {
             return MathUtils.map(0 /* start */, 1 /* stop */,
-                   ScrimController.GRADIENT_SCRIM_ALPHA, ScrimController.GRADIENT_SCRIM_ALPHA_BUSY,
+                   mScrimBehindAlphaKeyguard, ScrimController.GRADIENT_SCRIM_ALPHA_BUSY,
                    busynessFactor);
         }
     },
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 1d640880..061677c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -24,6 +24,8 @@
 import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_ASLEEP;
 import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_AWAKE;
 import static com.android.systemui.keyguard.WakefulnessLifecycle.WAKEFULNESS_WAKING;
+import static com.android.systemui.shared.system.WindowManagerWrapper.NAV_BAR_POS_LEFT;
+import static com.android.systemui.shared.system.WindowManagerWrapper.NAV_BAR_POS_INVALID;
 import static com.android.systemui.statusbar.NotificationLockscreenUserManager
         .NOTIFICATION_UNLOCKED_BY_WORK_CHALLENGE_ACTION;
 import static com.android.systemui.statusbar.NotificationLockscreenUserManager.PERMISSION_SELF;
@@ -178,6 +180,7 @@
 import com.android.systemui.recents.events.activity.AppTransitionFinishedEvent;
 import com.android.systemui.recents.events.activity.UndockingTaskEvent;
 import com.android.systemui.recents.misc.SystemServicesProxy;
+import com.android.systemui.shared.system.WindowManagerWrapper;
 import com.android.systemui.stackdivider.Divider;
 import com.android.systemui.stackdivider.WindowManagerProxy;
 import com.android.systemui.statusbar.ActivatableNotificationView;
@@ -207,14 +210,12 @@
 import com.android.systemui.statusbar.NotificationViewHierarchyManager;
 import com.android.systemui.statusbar.RemoteInputController;
 import com.android.systemui.statusbar.ScrimView;
-import com.android.systemui.statusbar.SignalClusterView;
 import com.android.systemui.statusbar.StatusBarState;
 import com.android.systemui.statusbar.VibratorHelper;
 import com.android.systemui.statusbar.notification.AboveShelfObserver;
 import com.android.systemui.statusbar.notification.ActivityLaunchAnimator;
 import com.android.systemui.statusbar.notification.VisualStabilityManager;
 import com.android.systemui.statusbar.phone.UnlockMethodCache.OnUnlockMethodChangedListener;
-import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
 import com.android.systemui.statusbar.policy.BrightnessMirrorController;
@@ -1307,8 +1308,7 @@
 
         mKeyguardViewMediatorCallback = keyguardViewMediator.getViewMediatorCallback();
         mLightBarController.setFingerprintUnlockController(mFingerprintUnlockController);
-        Dependency.get(KeyguardDismissUtil.class).setDismissHandler(
-                this::dismissKeyguardThenExecute);
+        Dependency.get(KeyguardDismissUtil.class).setDismissHandler(this::executeWhenUnlocked);
         Trace.endSection();
     }
 
@@ -1339,8 +1339,15 @@
         }
         int dockSide = WindowManagerProxy.getInstance().getDockSide();
         if (dockSide == WindowManager.DOCKED_INVALID) {
-            return mRecents.splitPrimaryTask(NavigationBarGestureHelper.DRAG_MODE_NONE,
-                    ActivityManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT, null, metricsDockAction);
+            final int navbarPos = WindowManagerWrapper.getInstance().getNavBarPosition();
+            if (navbarPos == NAV_BAR_POS_INVALID) {
+                return false;
+            }
+            int createMode = navbarPos == NAV_BAR_POS_LEFT
+                    ? ActivityManager.SPLIT_SCREEN_CREATE_MODE_BOTTOM_OR_RIGHT
+                    : ActivityManager.SPLIT_SCREEN_CREATE_MODE_TOP_OR_LEFT;
+            return mRecents.splitPrimaryTask(NavigationBarGestureHelper.DRAG_MODE_NONE, createMode,
+                    null, metricsDockAction);
         } else {
             Divider divider = getComponent(Divider.class);
             if (divider != null && divider.isMinimized() && !divider.isHomeStackResizable()) {
@@ -1896,6 +1903,13 @@
             }
         }
 
+        if (!panelsEnabled()) {
+            if (DEBUG) {
+                Log.d(TAG, "No peeking: disabled panel : " + sbn.getKey());
+            }
+            return false;
+        }
+
         if (sbn.getNotification().fullScreenIntent != null) {
             if (mAccessibilityManager.isTouchExplorationEnabled()) {
                 if (DEBUG) Log.d(TAG, "No peeking: accessible fullscreen: " + sbn.getKey());
@@ -3050,6 +3064,13 @@
         }
     }
 
+    private void executeWhenUnlocked(OnDismissAction action) {
+        if (mStatusBarKeyguardViewManager.isShowing()) {
+            mLeaveOpenOnKeyguardHide = true;
+        }
+        dismissKeyguardThenExecute(action, null /* cancelAction */, false /* afterKeyguardGone */);
+    }
+
     protected void dismissKeyguardThenExecute(OnDismissAction action, boolean afterKeyguardGone) {
         dismissKeyguardThenExecute(action, null /* cancelRunnable */, afterKeyguardGone);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusIconContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusIconContainer.java
index c97c8eb..4538977 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusIconContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusIconContainer.java
@@ -30,12 +30,12 @@
 import android.util.Log;
 
 import android.view.View;
-import android.view.ViewGroup;
 import com.android.keyguard.AlphaOptimizedLinearLayout;
 import com.android.systemui.R;
 import com.android.systemui.statusbar.StatusIconDisplayable;
+import com.android.systemui.statusbar.stack.AnimationFilter;
+import com.android.systemui.statusbar.stack.AnimationProperties;
 import com.android.systemui.statusbar.stack.ViewState;
-import java.lang.ref.WeakReference;
 import java.util.ArrayList;
 
 /**
@@ -50,8 +50,8 @@
     private static final boolean DEBUG = false;
     private static final boolean DEBUG_OVERFLOW = false;
     // Max 5 status icons including battery
-    private static final int MAX_ICONS = 4;
-    private static final int MAX_DOTS = 3;
+    private static final int MAX_ICONS = 7;
+    private static final int MAX_DOTS = 1;
 
     private int mDotPadding;
     private int mStaticDotDiameter;
@@ -73,19 +73,23 @@
 
     public StatusIconContainer(Context context, AttributeSet attrs) {
         super(context, attrs);
+        initDimens();
+        setWillNotDraw(!DEBUG_OVERFLOW);
     }
 
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-        setWillNotDraw(!DEBUG_OVERFLOW);
-        initDimens();
     }
 
     public void setShouldRestrictIcons(boolean should) {
         mShouldRestrictIcons = should;
     }
 
+    public boolean isRestrictingIcons() {
+        return mShouldRestrictIcons;
+    }
+
     private void initDimens() {
         // This is the same value that StatusBarIconView uses
         mIconDotFrameWidth = getResources().getDimensionPixelSize(
@@ -93,7 +97,7 @@
         mDotPadding = getResources().getDimensionPixelSize(R.dimen.overflow_icon_dot_padding);
         int radius = getResources().getDimensionPixelSize(R.dimen.overflow_dot_radius);
         mStaticDotDiameter = 2 * radius;
-        mUnderflowWidth = mIconDotFrameWidth + 2 * (mStaticDotDiameter + mDotPadding);
+        mUnderflowWidth = mIconDotFrameWidth + (MAX_DOTS - 1) * (mStaticDotDiameter + mDotPadding);
     }
 
     @Override
@@ -189,6 +193,7 @@
     public void onViewAdded(View child) {
         super.onViewAdded(child);
         StatusIconState vs = new StatusIconState();
+        vs.justAdded = true;
         child.setTag(R.id.status_bar_view_state_tag, vs);
     }
 
@@ -208,9 +213,8 @@
         float contentStart = getPaddingStart();
         int childCount = getChildCount();
         // Underflow === don't show content until that index
-        int firstUnderflowIndex = -1;
-        if (DEBUG) android.util.Log.d(TAG, "calculateIconTransitions: start=" + translationX
-                + " width=" + width);
+        if (DEBUG) android.util.Log.d(TAG, "calculateIconTranslations: start=" + translationX
+                + " width=" + width + " underflow=" + mNeedsUnderflow);
 
         // Collect all of the states which want to be visible
         for (int i = childCount - 1; i >= 0; i--) {
@@ -231,13 +235,13 @@
             translationX -= getViewTotalWidth(child);
         }
 
-        // Show either 1-4 dots, or 3 dots + overflow
+        // Show either 1-MAX_ICONS icons, or (MAX_ICONS - 1) icons + overflow
         int totalVisible = mLayoutStates.size();
         int maxVisible = totalVisible <= MAX_ICONS ? MAX_ICONS : MAX_ICONS - 1;
 
         mUnderflowStart = 0;
         int visible = 0;
-        firstUnderflowIndex = -1;
+        int firstUnderflowIndex = -1;
         for (int i = totalVisible - 1; i >= 0; i--) {
             StatusIconState state = mLayoutStates.get(i);
             // Allow room for underflow if we found we need it in onMeasure
@@ -320,14 +324,52 @@
     public static class StatusIconState extends ViewState {
         /// StatusBarIconView.STATE_*
         public int visibleState = STATE_ICON;
+        public boolean justAdded = true;
 
         @Override
         public void applyToView(View view) {
-            if (view instanceof  StatusIconDisplayable) {
-                StatusIconDisplayable icon = (StatusIconDisplayable) view;
-                icon.setVisibleState(visibleState);
+            if (!(view instanceof StatusIconDisplayable)) {
+                return;
             }
-            super.applyToView(view);
+            StatusIconDisplayable icon = (StatusIconDisplayable) view;
+            AnimationProperties animationProperties = null;
+            boolean animate = false;
+
+            if (justAdded) {
+                super.applyToView(view);
+                animationProperties = ADD_ICON_PROPERTIES;
+                animate = true;
+            } else if (icon.getVisibleState() != visibleState) {
+                animationProperties = DOT_ANIMATION_PROPERTIES;
+                animate = true;
+            }
+
+            icon.setVisibleState(visibleState);
+            if (animate) {
+                animateTo(view, animationProperties);
+            } else {
+                super.applyToView(view);
+            }
+
+            justAdded = false;
         }
     }
+
+    private static final AnimationProperties ADD_ICON_PROPERTIES = new AnimationProperties() {
+        private AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha();
+
+        @Override
+        public AnimationFilter getAnimationFilter() {
+            return mAnimationFilter;
+        }
+    }.setDuration(200).setDelay(50);
+
+    private static final AnimationProperties DOT_ANIMATION_PROPERTIES = new AnimationProperties() {
+        private AnimationFilter mAnimationFilter = new AnimationFilter().animateX();
+
+        @Override
+        public AnimationFilter getAnimationFilter() {
+            return mAnimationFilter;
+        }
+    }.setDuration(200);
 }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
index 6a8d3a5..48a9fb6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SystemUIDialog.java
@@ -20,6 +20,7 @@
 import android.app.Dialog;
 import android.content.BroadcastReceiver;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.UserHandle;
@@ -30,6 +31,7 @@
 import com.android.systemui.R;
 import com.android.systemui.statusbar.policy.KeyguardMonitor;
 
+
 /**
  * Base class for dialogs that should appear over panels and keyguard.
  */
@@ -99,24 +101,40 @@
     }
 
     public static void registerDismissListener(Dialog dialog) {
-        boolean[] registered = new boolean[1];
-        Context context = dialog.getContext();
-        final BroadcastReceiver mReceiver = new BroadcastReceiver() {
-            @Override
-            public void onReceive(Context context, Intent intent) {
-                if (dialog != null) {
-                    dialog.dismiss();
-                }
-            }
-        };
-        context.registerReceiverAsUser(mReceiver, UserHandle.CURRENT,
-                new IntentFilter(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), null, null);
-        registered[0] = true;
-        dialog.setOnDismissListener(d -> {
-            if (registered[0]) {
-                context.unregisterReceiver(mReceiver);
-                registered[0] = false;
-            }
-        });
+        DismissReceiver dismissReceiver = new DismissReceiver(dialog);
+        dismissReceiver.register();
     }
-}
+
+    private static class DismissReceiver extends BroadcastReceiver implements OnDismissListener {
+        private static final IntentFilter INTENT_FILTER = new IntentFilter();
+        static {
+            INTENT_FILTER.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
+            INTENT_FILTER.addAction(Intent.ACTION_SCREEN_OFF);
+        }
+
+        private final Dialog mDialog;
+        private boolean mRegistered;
+
+        DismissReceiver(Dialog dialog) {
+            mDialog = dialog;
+        }
+
+        void register() {
+            mDialog.getContext()
+                    .registerReceiverAsUser(this, UserHandle.CURRENT, INTENT_FILTER, null, null);
+            mRegistered = true;
+        }
+
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            mDialog.dismiss();
+        }
+
+        @Override
+        public void onDismiss(DialogInterface dialog) {
+            if (mRegistered) {
+                mDialog.getContext().unregisterReceiver(this);
+                mRegistered = false;
+            }
+        }
+    }}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index a794e19..59bf982 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -285,12 +285,12 @@
         if (mWrapper != null) {
             mWrapper.setRemoteInputVisible(true);
         }
-        mController.addRemoteInput(mEntry, mToken);
         mEditText.setInnerFocusable(true);
         mEditText.mShowImeOnInputConnection = true;
         mEditText.setText(mEntry.remoteInputText);
         mEditText.setSelection(mEditText.getText().length());
         mEditText.requestFocus();
+        mController.addRemoteInput(mEntry, mToken);
         updateSendButton();
     }
 
@@ -466,6 +466,10 @@
         }
     }
 
+    public boolean isSending() {
+        return getVisibility() == VISIBLE && mController.isSpinning(mEntry.key, mToken);
+    }
+
     /**
      * An EditText that changes appearance based on whether it's focusable and becomes
      * un-focusable whenever the user navigates away from it or it becomes invisible.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
index b4fa2e8..351868d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
@@ -183,8 +183,7 @@
         };
 
         b.setOnClickListener(view -> {
-            mKeyguardDismissUtil.dismissKeyguardThenExecute(
-                    action, null /* cancelAction */, false /* afterKeyguardGone */);
+            mKeyguardDismissUtil.executeWhenUnlocked(action);
         });
 
         b.setAccessibilityDelegate(new AccessibilityDelegate() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
index a9da239..339c115 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
@@ -122,7 +122,7 @@
 
     @Override
     public int getZen() {
-        return mModeSetting.getValue();
+        return mZenMode;
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 5275e27..7370c4c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -2415,16 +2415,10 @@
      * Update the background bounds to the new desired bounds
      */
     private void updateBackgroundBounds() {
-        if (mAmbientState.isPanelFullWidth()) {
-            mBackgroundBounds.left = 0;
-            mBackgroundBounds.right = getWidth();
-        } else {
-            getLocationInWindow(mTempInt2);
-            mBackgroundBounds.left = mTempInt2[0];
-            mBackgroundBounds.right = mTempInt2[0] + getWidth();
-        }
-        mBackgroundBounds.left += mSidePaddings;
-        mBackgroundBounds.right -= mSidePaddings;
+        getLocationInWindow(mTempInt2);
+        mBackgroundBounds.left = mTempInt2[0] + mSidePaddings;
+        mBackgroundBounds.right = mTempInt2[0] + getWidth() - mSidePaddings;
+
         if (!mIsExpanded) {
             mBackgroundBounds.top = 0;
             mBackgroundBounds.bottom = 0;
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/DumpTruck.java b/packages/SystemUI/src/com/android/systemui/util/leak/DumpTruck.java
new file mode 100644
index 0000000..2995eba
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/DumpTruck.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.systemui.util.leak;
+
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Build;
+import android.support.v4.content.FileProvider;
+import android.util.Log;
+
+import com.android.systemui.Dependency;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+/**
+ * Utility class for dumping, compressing, sending, and serving heap dump files.
+ *
+ * <p>Unlike the Internet, this IS a big truck you can dump something on.
+ */
+public class DumpTruck {
+    private static final String FILEPROVIDER_AUTHORITY = "com.android.systemui.fileprovider";
+    private static final String FILEPROVIDER_PATH = "leak";
+
+    private static final String TAG = "DumpTruck";
+    private static final int BUFSIZ = 512 * 1024; // 512K
+
+    private final Context context;
+    private Uri hprofUri;
+    final StringBuilder body = new StringBuilder();
+
+    public DumpTruck(Context context) {
+        this.context = context;
+    }
+
+    /**
+     * Capture memory for the given processes and zip them up for sharing.
+     *
+     * @param pids
+     * @return this, for chaining
+     */
+    public DumpTruck captureHeaps(int[] pids) {
+        final GarbageMonitor gm = Dependency.get(GarbageMonitor.class);
+
+        final File dumpDir = new File(context.getCacheDir(), FILEPROVIDER_PATH);
+        dumpDir.mkdirs();
+        hprofUri = null;
+
+        body.setLength(0);
+        body.append("Build: ").append(Build.DISPLAY).append("\n\nProcesses:\n");
+
+        final ArrayList<String> paths = new ArrayList<String>();
+        final int myPid = android.os.Process.myPid();
+
+        final int[] pids_copy = Arrays.copyOf(pids, pids.length);
+        for (int pid : pids_copy) {
+            body.append("  pid ").append(pid);
+            if (gm != null) {
+                GarbageMonitor.ProcessMemInfo info = gm.getMemInfo(pid);
+                if (info != null) {
+                    body.append(":")
+                            .append(" up=")
+                            .append(info.getUptime())
+                            .append(" pss=")
+                            .append(info.currentPss)
+                            .append(" uss=")
+                            .append(info.currentUss);
+                }
+            }
+            if (pid == myPid) {
+                final String path =
+                        new File(dumpDir, String.format("heap-%d.ahprof", pid)).getPath();
+                Log.v(TAG, "Dumping memory info for process " + pid + " to " + path);
+                try {
+                    android.os.Debug.dumpHprofData(path); // will block
+                    paths.add(path);
+                    body.append(" (hprof attached)");
+                } catch (IOException e) {
+                    Log.e(TAG, "error dumping memory:", e);
+                    body.append("\n** Could not dump heap: \n").append(e.toString()).append("\n");
+                }
+            }
+            body.append("\n");
+        }
+
+        try {
+            final String zipfile =
+                    new File(dumpDir, String.format("hprof-%d.zip", System.currentTimeMillis()))
+                            .getCanonicalPath();
+            if (DumpTruck.zipUp(zipfile, paths)) {
+                final File pathFile = new File(zipfile);
+                hprofUri = FileProvider.getUriForFile(context, FILEPROVIDER_AUTHORITY, pathFile);
+            }
+        } catch (IOException e) {
+            Log.e(TAG, "unable to zip up heapdumps", e);
+            body.append("\n** Could not zip up files: \n").append(e.toString()).append("\n");
+        }
+
+        return this;
+    }
+
+    /**
+     * Get the Uri of the current heap dump. Be sure to call captureHeaps first.
+     *
+     * @return Uri to the dump served by the SystemUI file provider
+     */
+    public Uri getDumpUri() {
+        return hprofUri;
+    }
+
+    /**
+     * Get an ACTION_SEND intent suitable for startActivity() or attaching to a Notification.
+     *
+     * @return share intent
+     */
+    public Intent createShareIntent() {
+        Intent shareIntent = new Intent(Intent.ACTION_SEND);
+        shareIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+        shareIntent.putExtra(Intent.EXTRA_SUBJECT, "SystemUI memory dump");
+
+        shareIntent.putExtra(Intent.EXTRA_TEXT, body.toString());
+
+        if (hprofUri != null) {
+            shareIntent.setType("application/zip");
+            shareIntent.putExtra(Intent.EXTRA_STREAM, hprofUri);
+        }
+        return shareIntent;
+    }
+
+    private static boolean zipUp(String zipfilePath, ArrayList<String> paths) {
+        try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipfilePath))) {
+            final byte[] buf = new byte[BUFSIZ];
+
+            for (String filename : paths) {
+                try (InputStream is = new BufferedInputStream(new FileInputStream(filename))) {
+                    ZipEntry entry = new ZipEntry(filename);
+                    zos.putNextEntry(entry);
+                    int len;
+                    while (0 < (len = is.read(buf, 0, BUFSIZ))) {
+                        zos.write(buf, 0, len);
+                    }
+                    zos.closeEntry();
+                }
+            }
+            return true;
+        } catch (IOException e) {
+            Log.e(TAG, "error zipping up profile data", e);
+        }
+        return false;
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java b/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java
index 021f9c4..b2cc269 100644
--- a/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java
+++ b/packages/SystemUI/src/com/android/systemui/util/leak/GarbageMonitor.java
@@ -16,88 +16,469 @@
 
 package com.android.systemui.util.leak;
 
+import static com.android.internal.logging.MetricsLogger.VIEW_UNKNOWN;
 
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.ColorStateList;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
 import android.os.Build;
+import android.os.Debug;
 import android.os.Handler;
 import android.os.Looper;
+import android.os.Message;
+import android.os.Process;
 import android.os.SystemProperties;
 import android.provider.Settings;
-import android.support.annotation.VisibleForTesting;
+import android.service.quicksettings.Tile;
+import android.text.format.DateUtils;
+import android.util.Log;
+import android.util.LongSparseArray;
 
 import com.android.systemui.Dependency;
+import com.android.systemui.R;
 import com.android.systemui.SystemUI;
+import com.android.systemui.plugins.qs.QSTile;
+import com.android.systemui.qs.QSHost;
+import com.android.systemui.qs.tileimpl.QSTileImpl;
+
+import java.util.ArrayList;
 
 public class GarbageMonitor {
+    private static final boolean LEAK_REPORTING_ENABLED =
+            Build.IS_DEBUGGABLE
+                    && SystemProperties.getBoolean("debug.enable_leak_reporting", false);
+    private static final String FORCE_ENABLE_LEAK_REPORTING = "sysui_force_enable_leak_reporting";
+
+    private static final boolean HEAP_TRACKING_ENABLED = Build.IS_DEBUGGABLE;
+    private static final boolean ENABLE_AM_HEAP_LIMIT = true; // use ActivityManager.setHeapLimit
 
     private static final String TAG = "GarbageMonitor";
 
-    private static final long GARBAGE_INSPECTION_INTERVAL = 5 * 60 * 1000; // 5min
+    private static final long GARBAGE_INSPECTION_INTERVAL =
+            15 * DateUtils.MINUTE_IN_MILLIS; // 15 min
+    private static final long HEAP_TRACK_INTERVAL = 1 * DateUtils.MINUTE_IN_MILLIS; // 1 min
+
+    private static final int DO_GARBAGE_INSPECTION = 1000;
+    private static final int DO_HEAP_TRACK = 3000;
+
     private static final int GARBAGE_ALLOWANCE = 5;
 
     private final Handler mHandler;
     private final TrackedGarbage mTrackedGarbage;
     private final LeakReporter mLeakReporter;
+    private final Context mContext;
+    private final ActivityManager mAm;
+    private MemoryTile mQSTile;
+    private DumpTruck mDumpTruck;
 
-    public GarbageMonitor(Looper bgLooper, LeakDetector leakDetector,
+    private final LongSparseArray<ProcessMemInfo> mData = new LongSparseArray<>();
+    private final ArrayList<Long> mPids = new ArrayList<>();
+    private int[] mPidsArray = new int[1];
+
+    private long mHeapLimit;
+
+    public GarbageMonitor(
+            Context context,
+            Looper bgLooper,
+            LeakDetector leakDetector,
             LeakReporter leakReporter) {
-        mHandler = bgLooper != null ? new Handler(bgLooper): null;
+        mContext = context.getApplicationContext();
+        mAm = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+
+        mHandler = new BackgroundHeapCheckHandler(bgLooper);
+
         mTrackedGarbage = leakDetector.getTrackedGarbage();
         mLeakReporter = leakReporter;
+
+        mDumpTruck = new DumpTruck(mContext);
+
+        if (ENABLE_AM_HEAP_LIMIT) {
+            mHeapLimit = mContext.getResources().getInteger(R.integer.watch_heap_limit);
+        }
     }
 
-    public void start() {
+    public void startLeakMonitor() {
         if (mTrackedGarbage == null) {
             return;
         }
 
-        scheduleInspectGarbage(this::inspectGarbage);
+        mHandler.sendEmptyMessage(DO_GARBAGE_INSPECTION);
     }
 
-    @VisibleForTesting
-    void scheduleInspectGarbage(Runnable runnable) {
-        mHandler.postDelayed(runnable, GARBAGE_INSPECTION_INTERVAL);
+    public void startHeapTracking() {
+        startTrackingProcess(
+                android.os.Process.myPid(), mContext.getPackageName(), System.currentTimeMillis());
+        mHandler.sendEmptyMessage(DO_HEAP_TRACK);
     }
 
-    private void inspectGarbage() {
+    private boolean gcAndCheckGarbage() {
         if (mTrackedGarbage.countOldGarbage() > GARBAGE_ALLOWANCE) {
             Runtime.getRuntime().gc();
-
-            // Allow some time to for ReferenceQueue to catch up.
-            scheduleReinspectGarbage(this::reinspectGarbageAfterGc);
+            return true;
         }
-        scheduleInspectGarbage(this::inspectGarbage);
+        return false;
     }
 
-    @VisibleForTesting
-    void scheduleReinspectGarbage(Runnable runnable) {
-        mHandler.postDelayed(runnable, (long) 100);
-    }
-
-    private void reinspectGarbageAfterGc() {
+    void reinspectGarbageAfterGc() {
         int count = mTrackedGarbage.countOldGarbage();
         if (count > GARBAGE_ALLOWANCE) {
             mLeakReporter.dumpLeak(count);
         }
     }
 
+    public ProcessMemInfo getMemInfo(int pid) {
+        return mData.get(pid);
+    }
+
+    public int[] getTrackedProcesses() {
+        return mPidsArray;
+    }
+
+    public void startTrackingProcess(long pid, String name, long start) {
+        synchronized (mPids) {
+            if (mPids.contains(pid)) return;
+
+            mPids.add(pid);
+            updatePidsArrayL();
+
+            mData.put(pid, new ProcessMemInfo(pid, name, start));
+        }
+    }
+
+    private void updatePidsArrayL() {
+        final int N = mPids.size();
+        mPidsArray = new int[N];
+        StringBuffer sb = new StringBuffer("Now tracking processes: ");
+        for (int i = 0; i < N; i++) {
+            final int p = mPids.get(i).intValue();
+            mPidsArray[i] = p;
+            sb.append(p);
+            sb.append(" ");
+        }
+        Log.v(TAG, sb.toString());
+    }
+
+    private void update() {
+        synchronized (mPids) {
+            Debug.MemoryInfo[] dinfos = mAm.getProcessMemoryInfo(mPidsArray);
+            for (int i = 0; i < dinfos.length; i++) {
+                Debug.MemoryInfo dinfo = dinfos[i];
+                if (i > mPids.size()) {
+                    Log.e(TAG, "update: unknown process info received: " + dinfo);
+                    break;
+                }
+                final long pid = mPids.get(i).intValue();
+                final ProcessMemInfo info = mData.get(pid);
+                info.head = (info.head + 1) % info.pss.length;
+                info.pss[info.head] = info.currentPss = dinfo.getTotalPss();
+                info.uss[info.head] = info.currentUss = dinfo.getTotalPrivateDirty();
+                if (info.currentPss > info.max) info.max = info.currentPss;
+                if (info.currentUss > info.max) info.max = info.currentUss;
+                if (info.currentPss == 0) {
+                    Log.v(TAG, "update: pid " + pid + " has pss=0, it probably died");
+                    mData.remove(pid);
+                }
+            }
+            for (int i = mPids.size() - 1; i >= 0; i--) {
+                final long pid = mPids.get(i).intValue();
+                if (mData.get(pid) == null) {
+                    mPids.remove(i);
+                    updatePidsArrayL();
+                }
+            }
+        }
+        if (mQSTile != null) mQSTile.update();
+    }
+
+    private void setTile(MemoryTile tile) {
+        mQSTile = tile;
+        if (tile != null) tile.update();
+    }
+
+    private static String formatBytes(long b) {
+        String[] SUFFIXES = {"B", "K", "M", "G", "T"};
+        int i;
+        for (i = 0; i < SUFFIXES.length; i++) {
+            if (b < 1024) break;
+            b /= 1024;
+        }
+        return b + SUFFIXES[i];
+    }
+
+    private void dumpHprofAndShare() {
+        final Intent share = mDumpTruck.captureHeaps(getTrackedProcesses()).createShareIntent();
+        mContext.startActivity(share);
+    }
+
+    private static class MemoryIconDrawable extends Drawable {
+        long pss, limit;
+        final Drawable baseIcon;
+        final Paint paint = new Paint();
+        final float dp;
+
+        MemoryIconDrawable(Context context) {
+            baseIcon = context.getDrawable(R.drawable.ic_memory).mutate();
+            dp = context.getResources().getDisplayMetrics().density;
+            paint.setColor(QSTileImpl.getColorForState(context, Tile.STATE_ACTIVE));
+        }
+
+        public void setPss(long pss) {
+            if (pss != this.pss) {
+                this.pss = pss;
+                invalidateSelf();
+            }
+        }
+
+        public void setLimit(long limit) {
+            if (limit != this.limit) {
+                this.limit = limit;
+                invalidateSelf();
+            }
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            baseIcon.draw(canvas);
+
+            if (limit > 0 && pss > 0) {
+                float frac = Math.min(1f, (float) pss / limit);
+
+                final Rect bounds = getBounds();
+                canvas.translate(bounds.left + 8 * dp, bounds.top + 5 * dp);
+                //android:pathData="M16.0,5.0l-8.0,0.0l0.0,14.0l8.0,0.0z"
+                canvas.drawRect(0, 14 * dp * (1 - frac), 8 * dp + 1, 14 * dp + 1, paint);
+            }
+        }
+
+        @Override
+        public void setBounds(int left, int top, int right, int bottom) {
+            super.setBounds(left, top, right, bottom);
+            baseIcon.setBounds(left, top, right, bottom);
+        }
+
+        @Override
+        public int getIntrinsicHeight() {
+            return baseIcon.getIntrinsicHeight();
+        }
+
+        @Override
+        public int getIntrinsicWidth() {
+            return baseIcon.getIntrinsicWidth();
+        }
+
+        @Override
+        public void setAlpha(int i) {
+            baseIcon.setAlpha(i);
+        }
+
+        @Override
+        public void setColorFilter(ColorFilter colorFilter) {
+            baseIcon.setColorFilter(colorFilter);
+            paint.setColorFilter(colorFilter);
+        }
+
+        @Override
+        public void setTint(int tint) {
+            super.setTint(tint);
+            baseIcon.setTint(tint);
+        }
+
+        @Override
+        public void setTintList(ColorStateList tint) {
+            super.setTintList(tint);
+            baseIcon.setTintList(tint);
+        }
+
+        @Override
+        public void setTintMode(PorterDuff.Mode tintMode) {
+            super.setTintMode(tintMode);
+            baseIcon.setTintMode(tintMode);
+        }
+
+        @Override
+        public int getOpacity() {
+            return PixelFormat.TRANSLUCENT;
+        }
+    }
+
+    private static class MemoryGraphIcon extends QSTile.Icon {
+        long pss, limit;
+
+        public void setPss(long pss) {
+            this.pss = pss;
+        }
+
+        public void setHeapLimit(long limit) {
+            this.limit = limit;
+        }
+
+        @Override
+        public Drawable getDrawable(Context context) {
+            final MemoryIconDrawable drawable = new MemoryIconDrawable(context);
+            drawable.setPss(pss);
+            drawable.setLimit(limit);
+            return drawable;
+        }
+    }
+
+    public static class MemoryTile extends QSTileImpl<QSTile.State> {
+        public static final String TILE_SPEC = "dbg:mem";
+
+        private final GarbageMonitor gm;
+        private ProcessMemInfo pmi;
+
+        public MemoryTile(QSHost host) {
+            super(host);
+            gm = Dependency.get(GarbageMonitor.class);
+        }
+
+        @Override
+        public State newTileState() {
+            return new QSTile.State();
+        }
+
+        @Override
+        public Intent getLongClickIntent() {
+            return new Intent();
+        }
+
+        @Override
+        protected void handleClick() {
+            getHost().collapsePanels();
+            mHandler.post(gm::dumpHprofAndShare);
+        }
+
+        @Override
+        public int getMetricsCategory() {
+            return VIEW_UNKNOWN;
+        }
+
+        @Override
+        public void handleSetListening(boolean listening) {
+            if (gm != null) gm.setTile(listening ? this : null);
+
+            final ActivityManager am = mContext.getSystemService(ActivityManager.class);
+            if (listening && gm.mHeapLimit > 0) {
+                am.setWatchHeapLimit(1024 * gm.mHeapLimit); // why is this in bytes?
+            } else {
+                am.clearWatchHeapLimit();
+            }
+        }
+
+        @Override
+        public CharSequence getTileLabel() {
+            return getState().label;
+        }
+
+        @Override
+        protected void handleUpdateState(State state, Object arg) {
+            pmi = gm.getMemInfo(Process.myPid());
+            final MemoryGraphIcon icon = new MemoryGraphIcon();
+            icon.setHeapLimit(gm.mHeapLimit);
+            if (pmi != null) {
+                icon.setPss(pmi.currentPss);
+                state.label = mContext.getString(R.string.heap_dump_tile_name);
+                state.secondaryLabel =
+                        String.format(
+                                "pss: %s / %s",
+                                formatBytes(pmi.currentPss * 1024),
+                                formatBytes(gm.mHeapLimit * 1024));
+            } else {
+                icon.setPss(0);
+                state.label = "Dump SysUI";
+                state.secondaryLabel = null;
+            }
+            state.icon = icon;
+        }
+
+        public void update() {
+            refreshState();
+        }
+
+        public long getPss() {
+            return pmi != null ? pmi.currentPss : 0;
+        }
+
+        public long getHeapLimit() {
+            return gm != null ? gm.mHeapLimit : 0;
+        }
+    }
+
+    public static class ProcessMemInfo {
+        public long pid;
+        public String name;
+        public long startTime;
+        public long currentPss, currentUss;
+        public long[] pss = new long[256];
+        public long[] uss = new long[256];
+        public long max = 1;
+        public int head = 0;
+
+        public ProcessMemInfo(long pid, String name, long start) {
+            this.pid = pid;
+            this.name = name;
+            this.startTime = start;
+        }
+
+        public long getUptime() {
+            return System.currentTimeMillis() - startTime;
+        }
+    }
+
     public static class Service extends SystemUI {
-
-        // TODO(b/35345376): Turn this back on for debuggable builds after known leak fixed.
-        private static final boolean ENABLED = Build.IS_DEBUGGABLE
-                && SystemProperties.getBoolean("debug.enable_leak_reporting", false);
-        private static final String FORCE_ENABLE = "sysui_force_garbage_monitor";
-
         private GarbageMonitor mGarbageMonitor;
 
         @Override
         public void start() {
-            boolean forceEnable = Settings.Secure.getInt(mContext.getContentResolver(),
-                    FORCE_ENABLE, 0) != 0;
-            if (!ENABLED && !forceEnable) {
-                return;
-            }
+            boolean forceEnable =
+                    Settings.Secure.getInt(
+                                    mContext.getContentResolver(), FORCE_ENABLE_LEAK_REPORTING, 0)
+                            != 0;
             mGarbageMonitor = Dependency.get(GarbageMonitor.class);
-            mGarbageMonitor.start();
+            if (LEAK_REPORTING_ENABLED || forceEnable) {
+                mGarbageMonitor.startLeakMonitor();
+            }
+            if (HEAP_TRACKING_ENABLED || forceEnable) {
+                mGarbageMonitor.startHeapTracking();
+            }
+        }
+    }
+
+    private class BackgroundHeapCheckHandler extends Handler {
+        BackgroundHeapCheckHandler(Looper onLooper) {
+            super(onLooper);
+            if (Looper.getMainLooper().equals(onLooper)) {
+                throw new RuntimeException(
+                        "BackgroundHeapCheckHandler may not run on the ui thread");
+            }
+        }
+
+        @Override
+        public void handleMessage(Message m) {
+            switch (m.what) {
+                case DO_GARBAGE_INSPECTION:
+                    if (gcAndCheckGarbage()) {
+                        postDelayed(GarbageMonitor.this::reinspectGarbageAfterGc, 100);
+                    }
+
+                    removeMessages(DO_GARBAGE_INSPECTION);
+                    sendEmptyMessageDelayed(DO_GARBAGE_INSPECTION, GARBAGE_INSPECTION_INTERVAL);
+                    break;
+
+                case DO_HEAP_TRACK:
+                    update();
+                    removeMessages(DO_HEAP_TRACK);
+                    sendEmptyMessageDelayed(DO_HEAP_TRACK, HEAP_TRACK_INTERVAL);
+                    break;
+            }
         }
     }
 }
diff --git a/packages/SystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
index f1a7183..8034345 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/CarVolumeDialogImpl.java
@@ -19,23 +19,34 @@
 import android.animation.Animator;
 import android.animation.AnimatorInflater;
 import android.animation.AnimatorSet;
+import android.annotation.DrawableRes;
 import android.annotation.Nullable;
 import android.app.Dialog;
 import android.app.KeyguardManager;
+import android.car.Car;
+import android.car.CarNotConnectedException;
+import android.car.media.CarAudioManager;
+import android.car.media.ICarVolumeCallback;
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.ServiceConnection;
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
 import android.graphics.Color;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.PixelFormat;
 import android.graphics.drawable.Drawable;
-import android.media.AudioManager;
-import android.media.AudioSystem;
+import android.media.AudioAttributes;
 import android.os.Debug;
 import android.os.Handler;
+import android.os.IBinder;
 import android.os.Looper;
 import android.os.Message;
+import android.util.AttributeSet;
 import android.util.Log;
-import android.util.SparseBooleanArray;
+import android.util.SparseArray;
+import android.util.Xml;
 import android.view.ContextThemeWrapper;
 import android.view.Gravity;
 import android.view.MotionEvent;
@@ -53,626 +64,533 @@
 import androidx.car.widget.PagedListView;
 import androidx.car.widget.SeekbarListItem;
 
+import java.util.Iterator;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
-import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.plugins.VolumeDialog;
-import com.android.systemui.plugins.VolumeDialogController;
-import com.android.systemui.plugins.VolumeDialogController.State;
-import com.android.systemui.plugins.VolumeDialogController.StreamState;
 
 /**
  * Car version of the volume dialog.
  *
- * A client of VolumeDialogControllerImpl and its state model.
- *
  * Methods ending in "H" must be called on the (ui) handler.
  */
 public class CarVolumeDialogImpl implements VolumeDialog {
-    private static final String TAG = Util.logTag(CarVolumeDialogImpl.class);
+  private static final String TAG = Util.logTag(CarVolumeDialogImpl.class);
 
-    private static final long USER_ATTEMPT_GRACE_PERIOD = 1000;
+  private static final String XML_TAG_VOLUME_ITEMS = "carVolumeItems";
+  private static final String XML_TAG_VOLUME_ITEM = "item";
+  private static final int HOVERING_TIMEOUT = 16000;
+  private static final int NORMAL_TIMEOUT = 3000;
+  private static final int LISTVIEW_ANIMATION_DURATION_IN_MILLIS = 250;
+  private static final int DISMISS_DELAY_IN_MILLIS = 50;
+  private static final int ARROW_FADE_IN_START_DELAY_IN_MILLIS = 100;
 
-    private final Context mContext;
-    private final H mHandler = new H();
-    private final VolumeDialogController mController;
-    private final AudioManager mAudioManager;
+  private final Context mContext;
+  private final H mHandler = new H();
 
-    private Window mWindow;
-    private CustomDialog mDialog;
-    private PagedListView mListView;
-    private ListItemAdapter mPagedListAdapter;
-    private final List<ListItem> mVolumeLineItems = new ArrayList<>();
-    private final List<VolumeRow> mRows = new ArrayList<>();
-    private ConfigurableTexts mConfigurableTexts;
-    private final SparseBooleanArray mDynamic = new SparseBooleanArray();
-    private final KeyguardManager mKeyguard;
-    private final Object mSafetyWarningLock = new Object();
+  private Window mWindow;
+  private CustomDialog mDialog;
+  private PagedListView mListView;
+  private ListItemAdapter mPagedListAdapter;
+  // All the volume items.
+  private final SparseArray<VolumeItem> mVolumeItems = new SparseArray<>();
+  // Available volume items in car audio manager.
+  private final List<VolumeItem> mAvailableVolumeItems = new ArrayList<>();
+  // Volume items in the PagedListView.
+  private final List<ListItem> mVolumeLineItems = new ArrayList<>();
+  private final KeyguardManager mKeyguard;
 
-    private boolean mShowing;
+  private Car mCar;
+  private CarAudioManager mCarAudioManager;
 
-    private boolean mAutomute = VolumePrefs.DEFAULT_ENABLE_AUTOMUTE;
-    private boolean mSilentMode = VolumePrefs.DEFAULT_ENABLE_SILENT_MODE;
-    private State mState;
-    private SafetyWarningDialog mSafetyWarning;
-    private boolean mHovering = false;
-    private boolean mExpanded;
+  private boolean mHovering;
+  private boolean mShowing;
+  private boolean mExpanded;
 
-    public CarVolumeDialogImpl(Context context) {
-        mContext = new ContextThemeWrapper(context, com.android.systemui.R.style.qs_theme);
-        mController = Dependency.get(VolumeDialogController.class);
-        mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
-        mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+  public CarVolumeDialogImpl(Context context) {
+    mContext = new ContextThemeWrapper(context, com.android.systemui.R.style.qs_theme);
+    mKeyguard = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+    mCar = Car.createCar(mContext, mServiceConnection);
+  }
+
+  public void init(int windowType, Callback callback) {
+    initDialog();
+
+    mCar.connect();
+  }
+
+  @Override
+  public void destroy() {
+    mHandler.removeCallbacksAndMessages(null);
+
+    cleanupAudioManager();
+    // unregisterVolumeCallback is not being called when disconnect car, so we manually cleanup
+    // audio manager beforehand.
+    mCar.disconnect();
+  }
+
+  private void initDialog() {
+    loadAudioUsageItems();
+    mVolumeLineItems.clear();
+    mDialog = new CustomDialog(mContext);
+
+    mHovering = false;
+    mShowing = false;
+    mExpanded = false;
+    mWindow = mDialog.getWindow();
+    mWindow.requestFeature(Window.FEATURE_NO_TITLE);
+    mWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+    mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND
+        | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
+    mWindow.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+        | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+        | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
+        | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
+        | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
+        | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
+    mWindow.setType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY);
+    mWindow.setWindowAnimations(com.android.internal.R.style.Animation_Toast);
+    final WindowManager.LayoutParams lp = mWindow.getAttributes();
+    lp.format = PixelFormat.TRANSLUCENT;
+    lp.setTitle(VolumeDialogImpl.class.getSimpleName());
+    lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
+    lp.windowAnimations = -1;
+    mWindow.setAttributes(lp);
+    mWindow.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+
+    mDialog.setCanceledOnTouchOutside(true);
+    mDialog.setContentView(R.layout.car_volume_dialog);
+    mDialog.setOnShowListener(dialog -> {
+      mListView.setTranslationY(-mListView.getHeight());
+      mListView.setAlpha(0);
+      mListView.animate()
+          .alpha(1)
+          .translationY(0)
+          .setDuration(LISTVIEW_ANIMATION_DURATION_IN_MILLIS)
+          .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator())
+          .start();
+    });
+    mListView = (PagedListView) mWindow.findViewById(R.id.volume_list);
+    mListView.setOnHoverListener((v, event) -> {
+      int action = event.getActionMasked();
+      mHovering = (action == MotionEvent.ACTION_HOVER_ENTER)
+          || (action == MotionEvent.ACTION_HOVER_MOVE);
+      rescheduleTimeoutH();
+      return true;
+    });
+
+    mPagedListAdapter = new ListItemAdapter(mContext, new ListProvider(mVolumeLineItems),
+        BackgroundStyle.PANEL);
+    mListView.setAdapter(mPagedListAdapter);
+    mListView.setMaxPages(PagedListView.UNLIMITED_PAGES);
+  }
+
+  public void show(int reason) {
+    mHandler.obtainMessage(H.SHOW, reason, 0).sendToTarget();
+  }
+
+  public void dismiss(int reason) {
+    mHandler.obtainMessage(H.DISMISS, reason, 0).sendToTarget();
+  }
+
+  private void showH(int reason) {
+    if (D.BUG) {
+      Log.d(TAG, "showH r=" + Events.DISMISS_REASONS[reason]);
     }
 
-    public void init(int windowType, Callback callback) {
-        initDialog();
+    mHandler.removeMessages(H.SHOW);
+    mHandler.removeMessages(H.DISMISS);
+    rescheduleTimeoutH();
+    // Refresh the data set before showing.
+    mPagedListAdapter.notifyDataSetChanged();
+    if (mShowing) {
+      return;
+    }
+    mShowing = true;
 
-        mController.addCallback(mControllerCallbackH, mHandler);
-        mController.getState();
+    mDialog.show();
+    Events.writeEvent(mContext, Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
+  }
+
+  protected void rescheduleTimeoutH() {
+    mHandler.removeMessages(H.DISMISS);
+    final int timeout = computeTimeoutH();
+    mHandler.sendMessageDelayed(mHandler
+        .obtainMessage(H.DISMISS, Events.DISMISS_REASON_TIMEOUT, 0), timeout);
+
+    if (D.BUG) {
+      Log.d(TAG, "rescheduleTimeout " + timeout + " " + Debug.getCaller());
+    }
+  }
+
+  private int computeTimeoutH() {
+    return mHovering ? HOVERING_TIMEOUT : NORMAL_TIMEOUT;
+  }
+
+  protected void dismissH(int reason) {
+    if (D.BUG) {
+      Log.d(TAG, "dismissH r=" + Events.DISMISS_REASONS[reason]);
+    }
+
+    mHandler.removeMessages(H.DISMISS);
+    mHandler.removeMessages(H.SHOW);
+    if (!mShowing) {
+      return;
+    }
+
+    mListView.animate().cancel();
+    mShowing = false;
+
+    mListView.setTranslationY(0);
+    mListView.setAlpha(1);
+    mListView.animate()
+        .alpha(0)
+        .translationY(-mListView.getHeight())
+        .setDuration(LISTVIEW_ANIMATION_DURATION_IN_MILLIS)
+        .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator())
+        .withEndAction(() -> mHandler.postDelayed(() -> {
+          if (D.BUG) {
+            Log.d(TAG, "mDialog.dismiss()");
+          }
+          mDialog.dismiss();
+        }, DISMISS_DELAY_IN_MILLIS))
+        .start();
+
+    Events.writeEvent(mContext, Events.EVENT_DISMISS_DIALOG, reason);
+  }
+
+  public void dump(PrintWriter writer) {
+    writer.println(VolumeDialogImpl.class.getSimpleName() + " state:");
+    writer.print("  mShowing: "); writer.println(mShowing);
+  }
+
+  private void loadAudioUsageItems() {
+    try (XmlResourceParser parser = mContext.getResources().getXml(R.xml.car_volume_items)) {
+      AttributeSet attrs = Xml.asAttributeSet(parser);
+      int type;
+      // Traverse to the first start tag
+      while ((type=parser.next()) != XmlResourceParser.END_DOCUMENT
+          && type != XmlResourceParser.START_TAG) {
+      }
+
+      if (!XML_TAG_VOLUME_ITEMS.equals(parser.getName())) {
+        throw new RuntimeException("Meta-data does not start with carVolumeItems tag");
+      }
+      int outerDepth = parser.getDepth();
+      int rank = 0;
+      while ((type=parser.next()) != XmlResourceParser.END_DOCUMENT
+          && (type != XmlResourceParser.END_TAG || parser.getDepth() > outerDepth)) {
+        if (type == XmlResourceParser.END_TAG) {
+          continue;
+        }
+        if (XML_TAG_VOLUME_ITEM.equals(parser.getName())) {
+          TypedArray item = mContext.getResources().obtainAttributes(
+              attrs, R.styleable.carVolumeItems_item);
+          int usage = item.getInt(R.styleable.carVolumeItems_item_usage, -1);
+          if (usage >= 0) {
+            VolumeItem volumeItem = new VolumeItem();
+            volumeItem.usage = usage;
+            volumeItem.rank = rank;
+            volumeItem.icon = item.getResourceId(R.styleable.carVolumeItems_item_icon, 0);
+            mVolumeItems.put(usage, volumeItem);
+            rank++;
+          }
+          item.recycle();
+        }
+      }
+    } catch (XmlPullParserException | IOException e) {
+      Log.e(TAG, "Error parsing volume groups configuration", e);
+    }
+  }
+
+  private VolumeItem getVolumeItemForUsages(int[] usages) {
+    int rank = Integer.MAX_VALUE;
+    VolumeItem result = null;
+    for (int usage : usages) {
+      VolumeItem volumeItem = mVolumeItems.get(usage);
+      if (volumeItem.rank < rank) {
+        rank = volumeItem.rank;
+        result = volumeItem;
+      }
+    }
+    return result;
+  }
+
+  private static int getSeekbarValue(CarAudioManager carAudioManager, int volumeGroupId) {
+    try {
+      return carAudioManager.getGroupVolume(volumeGroupId);
+    } catch (CarNotConnectedException e) {
+      Log.e(TAG, "Car is not connected!", e);
+    }
+    return 0;
+  }
+
+  private static int getMaxSeekbarValue(CarAudioManager carAudioManager, int volumeGroupId) {
+    try {
+      return carAudioManager.getGroupMaxVolume(volumeGroupId);
+    } catch (CarNotConnectedException e) {
+      Log.e(TAG, "Car is not connected!", e);
+    }
+    return 0;
+  }
+
+  private SeekbarListItem addSeekbarListItem(VolumeItem volumeItem, int volumeGroupId,
+      int supplementalIconId, @Nullable View.OnClickListener supplementalIconOnClickListener) {
+    SeekbarListItem listItem = new SeekbarListItem(mContext);
+    listItem.setMax(getMaxSeekbarValue(mCarAudioManager, volumeGroupId));
+    int progress = getSeekbarValue(mCarAudioManager, volumeGroupId);
+    listItem.setProgress(progress);
+    listItem.setOnSeekBarChangeListener(
+        new CarVolumeDialogImpl.VolumeSeekBarChangeListener(volumeGroupId, mCarAudioManager));
+    listItem.setPrimaryActionIcon(mContext.getResources().getDrawable(volumeItem.icon));
+    if (supplementalIconId != 0) {
+      Drawable supplementalIcon = mContext.getResources().getDrawable(supplementalIconId);
+      listItem.setSupplementalIcon(supplementalIcon, true,
+          supplementalIconOnClickListener);
+    } else {
+      listItem.setSupplementalEmptyIcon(true);
+    }
+
+    mVolumeLineItems.add(listItem);
+    volumeItem.listItem = listItem;
+    volumeItem.progress = progress;
+    return listItem;
+  }
+
+  private VolumeItem findVolumeItem(SeekbarListItem targetItem) {
+    for (int i = 0; i < mVolumeItems.size(); ++i) {
+      VolumeItem volumeItem = mVolumeItems.valueAt(i);
+      if (volumeItem.listItem == targetItem) {
+        return volumeItem;
+      }
+    }
+    return null;
+  }
+
+  private void cleanupAudioManager() {
+    try {
+      mCarAudioManager.unregisterVolumeCallback(mVolumeChangeCallback.asBinder());
+    } catch (CarNotConnectedException e) {
+      Log.e(TAG, "Car is not connected!", e);
+    }
+    mVolumeLineItems.clear();
+    mCarAudioManager = null;
+  }
+
+  private final class H extends Handler {
+    private static final int SHOW = 1;
+    private static final int DISMISS = 2;
+
+    public H() {
+      super(Looper.getMainLooper());
     }
 
     @Override
-    public void destroy() {
-        mController.removeCallback(mControllerCallbackH);
-        mHandler.removeCallbacksAndMessages(null);
+    public void handleMessage(Message msg) {
+      switch (msg.what) {
+        case SHOW:
+          showH(msg.arg1);
+          break;
+        case DISMISS:
+          dismissH(msg.arg1);
+          break;
+        default:
+      }
+    }
+  }
+
+  private final class CustomDialog extends Dialog implements DialogInterface {
+    public CustomDialog(Context context) {
+      super(context, com.android.systemui.R.style.qs_theme);
     }
 
-    private void initDialog() {
-        mRows.clear();
-        mVolumeLineItems.clear();
-        mDialog = new CustomDialog(mContext);
+    @Override
+    public boolean dispatchTouchEvent(MotionEvent ev) {
+      rescheduleTimeoutH();
+      return super.dispatchTouchEvent(ev);
+    }
 
-        mConfigurableTexts = new ConfigurableTexts(mContext);
-        mHovering = false;
-        mShowing = false;
+    @Override
+    protected void onStart() {
+      super.setCanceledOnTouchOutside(true);
+      super.onStart();
+    }
+
+    @Override
+    protected void onStop() {
+      super.onStop();
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+      if (isShowing()) {
+        if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
+          dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE);
+          return true;
+        }
+      }
+      return false;
+    }
+  }
+
+  private final class ExpandIconListener implements View.OnClickListener {
+    @Override
+    public void onClick(final View v) {
+      mExpanded = !mExpanded;
+      Animator inAnimator;
+      if (mExpanded) {
+        for (int groupId = 0; groupId < mAvailableVolumeItems.size(); ++groupId) {
+          // Adding the items which are not coming from the default item.
+          VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
+          if (volumeItem.defaultItem) {
+            // Set progress here due to the progress of seekbar may not be updated.
+            volumeItem.listItem.setProgress(volumeItem.progress);
+          } else {
+            addSeekbarListItem(volumeItem, groupId, 0, null);
+          }
+        }
+        inAnimator = AnimatorInflater.loadAnimator(
+            mContext, R.anim.car_arrow_fade_in_rotate_up);
+      } else {
+        // Only keeping the default stream if it is not expended.
+        Iterator itr = mVolumeLineItems.iterator();
+        while (itr.hasNext()) {
+          SeekbarListItem seekbarListItem = (SeekbarListItem) itr.next();
+          VolumeItem volumeItem = findVolumeItem(seekbarListItem);
+          if (!volumeItem.defaultItem) {
+            itr.remove();
+          } else {
+            // Set progress here due to the progress of seekbar may not be updated.
+            seekbarListItem.setProgress(volumeItem.progress);
+          }
+        }
+        inAnimator = AnimatorInflater.loadAnimator(
+            mContext, R.anim.car_arrow_fade_in_rotate_down);
+      }
+
+      Animator outAnimator = AnimatorInflater.loadAnimator(
+          mContext, R.anim.car_arrow_fade_out);
+      inAnimator.setStartDelay(ARROW_FADE_IN_START_DELAY_IN_MILLIS);
+      AnimatorSet animators = new AnimatorSet();
+      animators.playTogether(outAnimator, inAnimator);
+      animators.setTarget(v);
+      animators.start();
+      mPagedListAdapter.notifyDataSetChanged();
+    }
+  }
+
+  private final class VolumeSeekBarChangeListener implements OnSeekBarChangeListener {
+    private final int mVolumeGroupId;
+    private final CarAudioManager mCarAudioManager;
+
+    private VolumeSeekBarChangeListener(int volumeGroupId, CarAudioManager carAudioManager) {
+      mVolumeGroupId = volumeGroupId;
+      mCarAudioManager = carAudioManager;
+    }
+
+    @Override
+    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+      if (!fromUser) {
+        // For instance, if this event is originated from AudioService,
+        // we can ignore it as it has already been handled and doesn't need to be
+        // sent back down again.
+        return;
+      }
+      try {
+        if (mCarAudioManager == null) {
+          Log.w(TAG, "Ignoring volume change event because the car isn't connected");
+          return;
+        }
+        mAvailableVolumeItems.get(mVolumeGroupId).progress = progress;
+        mCarAudioManager.setGroupVolume(mVolumeGroupId, progress, 0);
+      } catch (CarNotConnectedException e) {
+        Log.e(TAG, "Car is not connected!", e);
+      }
+    }
+
+    @Override
+    public void onStartTrackingTouch(SeekBar seekBar) {}
+
+    @Override
+    public void onStopTrackingTouch(SeekBar seekBar) {}
+  }
+
+  private final ICarVolumeCallback mVolumeChangeCallback = new ICarVolumeCallback.Stub() {
+    @Override
+    public void onGroupVolumeChanged(int groupId) {
+      VolumeItem volumeItem = mAvailableVolumeItems.get(groupId);
+      int value = getSeekbarValue(mCarAudioManager, groupId);
+      // Do not update the progress if it is the same as before. When car audio manager sets its
+      // group volume caused by the seekbar progress changed, it also triggers this callback.
+      // Updating the seekbar at the same time could block the continuous seeking.
+      if (value != volumeItem.progress) {
+        volumeItem.listItem.setProgress(value);
+        volumeItem.progress = value;
+        show(Events.SHOW_REASON_VOLUME_CHANGED);
+      }
+    }
+
+    @Override
+    public void onMasterMuteChanged() {
+      // ignored
+    }
+  };
+
+  private final ServiceConnection mServiceConnection = new ServiceConnection() {
+    @Override
+    public void onServiceConnected(ComponentName name, IBinder service) {
+      try {
         mExpanded = false;
-        mWindow = mDialog.getWindow();
-        mWindow.requestFeature(Window.FEATURE_NO_TITLE);
-        mWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
-        mWindow.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND
-            | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR);
-        mWindow.addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
-            | WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
-            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
-            | WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
-            | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
-            | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
-        mWindow.setType(WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY);
-        mWindow.setWindowAnimations(com.android.internal.R.style.Animation_Toast);
-        final WindowManager.LayoutParams lp = mWindow.getAttributes();
-        lp.format = PixelFormat.TRANSLUCENT;
-        lp.setTitle(VolumeDialogImpl.class.getSimpleName());
-        lp.gravity = Gravity.TOP | Gravity.CENTER_HORIZONTAL;
-        lp.windowAnimations = -1;
-        mWindow.setAttributes(lp);
-        mWindow.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        mCarAudioManager = (CarAudioManager) mCar.getCarManager(Car.AUDIO_SERVICE);
+        int volumeGroupCount = mCarAudioManager.getVolumeGroupCount();
+        // Populates volume slider items from volume groups to UI.
+        for (int groupId = 0; groupId < volumeGroupCount; groupId++) {
+          VolumeItem volumeItem = getVolumeItemForUsages(
+              mCarAudioManager.getUsagesForVolumeGroupId(groupId));
+          mAvailableVolumeItems.add(volumeItem);
+          // The first one is the default item.
+          if (groupId == 0) {
+            volumeItem.defaultItem = true;
+            addSeekbarListItem(volumeItem, groupId, R.drawable.car_ic_keyboard_arrow_down,
+                new ExpandIconListener());
+          }
+        }
 
-        mDialog.setCanceledOnTouchOutside(true);
-        mDialog.setContentView(R.layout.car_volume_dialog);
-        mDialog.setOnShowListener(dialog -> {
-            mListView.setTranslationY(-mListView.getHeight());
-            mListView.setAlpha(0);
-            mListView.animate()
-                .alpha(1)
-                .translationY(0)
-                .setDuration(300)
-                .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator())
-                .start();
-        });
-        mListView = (PagedListView) mWindow.findViewById(R.id.volume_list);
-        mListView.setOnHoverListener((v, event) -> {
-            int action = event.getActionMasked();
-            mHovering = (action == MotionEvent.ACTION_HOVER_ENTER)
-                || (action == MotionEvent.ACTION_HOVER_MOVE);
-            rescheduleTimeoutH();
-            return true;
-        });
-
-        addSeekbarListItem(addVolumeRow(AudioManager.STREAM_MUSIC, R.drawable.car_ic_music,
-            R.drawable.car_ic_keyboard_arrow_down, true, true),
-            new ExpandIconListener());
-        // We map AudioManager.STREAM_RING to a navigation icon for demo.
-        addVolumeRow(AudioManager.STREAM_RING, R.drawable.car_ic_navigation, 0,
-            true, false);
-        addVolumeRow(AudioManager.STREAM_NOTIFICATION, R.drawable.car_ic_notification_2, 0,
-            true, false);
-
-        mPagedListAdapter = new ListItemAdapter(mContext, new ListProvider(mVolumeLineItems),
-            BackgroundStyle.PANEL);
-        mListView.setAdapter(mPagedListAdapter);
-        mListView.setMaxPages(PagedListView.UNLIMITED_PAGES);
+        // If list is already initiated, update its content.
+        if (mPagedListAdapter != null) {
+          mPagedListAdapter.notifyDataSetChanged();
+        }
+        mCarAudioManager.registerVolumeCallback(mVolumeChangeCallback.asBinder());
+      } catch (CarNotConnectedException e) {
+        Log.e(TAG, "Car is not connected!", e);
+      }
     }
 
-    public void setStreamImportant(int stream, boolean important) {
-        mHandler.obtainMessage(H.SET_STREAM_IMPORTANT, stream, important ? 1 : 0).sendToTarget();
+    /**
+     * This does not get called when service is properly disconnected.
+     * So we need to also handle cleanups in destroy().
+     */
+    @Override
+    public void onServiceDisconnected(ComponentName name) {
+      cleanupAudioManager();
     }
+  };
 
-    public void setAutomute(boolean automute) {
-        if (mAutomute == automute) {
-            return;
-        }
-        mAutomute = automute;
-        mHandler.sendEmptyMessage(H.RECHECK_ALL);
-    }
-
-    public void setSilentMode(boolean silentMode) {
-        if (mSilentMode == silentMode) {
-            return;
-        }
-        mSilentMode = silentMode;
-        mHandler.sendEmptyMessage(H.RECHECK_ALL);
-    }
-
-    private VolumeRow addVolumeRow(int stream, int primaryActionIcon, int supplementalIcon,
-        boolean important, boolean defaultStream) {
-        VolumeRow volumeRow = new VolumeRow();
-        volumeRow.stream = stream;
-        volumeRow.primaryActionIcon = primaryActionIcon;
-        volumeRow.supplementalIcon = supplementalIcon;
-        volumeRow.important = important;
-        volumeRow.defaultStream = defaultStream;
-        volumeRow.listItem = null;
-        mRows.add(volumeRow);
-        return volumeRow;
-    }
-
-    private SeekbarListItem addSeekbarListItem(
-        VolumeRow volumeRow, @Nullable View.OnClickListener supplementalIconOnClickListener) {
-        int volumeMax = mAudioManager.getStreamMaxVolume(volumeRow.stream);
-        int currentVolume = mAudioManager.getStreamVolume(volumeRow.stream);
-        SeekbarListItem listItem =
-            new SeekbarListItem(mContext, volumeMax, currentVolume,
-                new VolumeSeekBarChangeListener(volumeRow), null);
-        Drawable primaryIcon = mContext.getResources().getDrawable(volumeRow.primaryActionIcon);
-        listItem.setPrimaryActionIcon(primaryIcon);
-        if (volumeRow.supplementalIcon != 0) {
-            Drawable supplementalIcon = mContext.getResources()
-                .getDrawable(volumeRow.supplementalIcon);
-            listItem.setSupplementalIcon(supplementalIcon, true,
-                supplementalIconOnClickListener);
-        } else {
-            listItem.setSupplementalEmptyIcon(true);
-        }
-
-        mVolumeLineItems.add(listItem);
-        volumeRow.listItem = listItem;
-
-        return listItem;
-    }
-
-    private static int getImpliedLevel(SeekBar seekBar, int progress) {
-        final int m = seekBar.getMax();
-        final int n = m / 100 - 1;
-        final int level = progress == 0 ? 0
-            : progress == m ? (m / 100) : (1 + (int)((progress / (float) m) * n));
-        return level;
-    }
-
-    public void show(int reason) {
-        mHandler.obtainMessage(H.SHOW, reason, 0).sendToTarget();
-    }
-
-    public void dismiss(int reason) {
-        mHandler.obtainMessage(H.DISMISS, reason, 0).sendToTarget();
-    }
-
-    private void showH(int reason) {
-        if (D.BUG) Log.d(TAG, "showH r=" + Events.DISMISS_REASONS[reason]);
-        mHandler.removeMessages(H.SHOW);
-        mHandler.removeMessages(H.DISMISS);
-        rescheduleTimeoutH();
-        if (mShowing) return;
-        mShowing = true;
-
-        mDialog.show();
-        Events.writeEvent(mContext, Events.EVENT_SHOW_DIALOG, reason, mKeyguard.isKeyguardLocked());
-        mController.notifyVisible(true);
-    }
-
-    protected void rescheduleTimeoutH() {
-        mHandler.removeMessages(H.DISMISS);
-        final int timeout = computeTimeoutH();
-        mHandler.sendMessageDelayed(mHandler
-            .obtainMessage(H.DISMISS, Events.DISMISS_REASON_TIMEOUT, 0), timeout);
-        if (D.BUG) Log.d(TAG, "rescheduleTimeout " + timeout + " " + Debug.getCaller());
-        mController.userActivity();
-    }
-
-    private int computeTimeoutH() {
-        if (mHovering) return 16000;
-        if (mSafetyWarning != null) return 5000;
-        return 3000;
-    }
-
-    protected void dismissH(int reason) {
-        mHandler.removeMessages(H.DISMISS);
-        mHandler.removeMessages(H.SHOW);
-        if (!mShowing) return;
-        mListView.animate().cancel();
-        mShowing = false;
-
-        mListView.setTranslationY(0);
-        mListView.setAlpha(1);
-        mListView.animate()
-            .alpha(0)
-            .translationY(-mListView.getHeight())
-            .setDuration(250)
-            .setInterpolator(new SystemUIInterpolators.LogAccelerateInterpolator())
-            .withEndAction(() -> mHandler.postDelayed(() -> {
-                if (D.BUG) Log.d(TAG, "mDialog.dismiss()");
-                mDialog.dismiss();
-            }, 50))
-            .start();
-
-        Events.writeEvent(mContext, Events.EVENT_DISMISS_DIALOG, reason);
-        mController.notifyVisible(false);
-        synchronized (mSafetyWarningLock) {
-            if (mSafetyWarning != null) {
-                if (D.BUG) Log.d(TAG, "SafetyWarning dismissed");
-                mSafetyWarning.dismiss();
-            }
-        }
-    }
-
-    private void trimObsoleteH() {
-        int initialVolumeItemSize = mVolumeLineItems.size();
-        for (int i = mRows.size() - 1; i >= 0; i--) {
-            final VolumeRow row = mRows.get(i);
-            if (row.ss == null || !row.ss.dynamic) continue;
-            if (!mDynamic.get(row.stream)) {
-                mRows.remove(i);
-                mVolumeLineItems.remove(row.listItem);
-            }
-        }
-
-        if (mVolumeLineItems.size() != initialVolumeItemSize) {
-            mPagedListAdapter.notifyDataSetChanged();
-        }
-    }
-
-    private void onStateChangedH(State state) {
-        mState = state;
-        mDynamic.clear();
-        // add any new dynamic rows
-        for (int i = 0; i < state.states.size(); i++) {
-            final int stream = state.states.keyAt(i);
-            final StreamState ss = state.states.valueAt(i);
-            if (!ss.dynamic) {
-                continue;
-            }
-            mDynamic.put(stream, true);
-            if (findRow(stream) == null) {
-                VolumeRow row = addVolumeRow(stream, R.drawable.ic_volume_remote,
-                    0, true,false);
-                if (mExpanded) {
-                    addSeekbarListItem(row, null);
-                }
-            }
-        }
-
-        for (VolumeRow row : mRows) {
-            updateVolumeRowH(row);
-        }
-    }
-
-    private void updateVolumeRowH(VolumeRow row) {
-        if (D.BUG) Log.d(TAG, "updateVolumeRowH s=" + row.stream);
-        if (mState == null) {
-            return;
-        }
-        final StreamState ss = mState.states.get(row.stream);
-        if (ss == null) {
-            return;
-        }
-        row.ss = ss;
-        if (ss.level == row.requestedLevel) {
-            row.requestedLevel = -1;
-        }
-        // TODO: update Seekbar progress and change the mute icon if necessary.
-    }
-
-    private VolumeRow findRow(int stream) {
-        for (VolumeRow row : mRows) {
-            if (row.stream == stream) {
-                return row;
-            }
-        }
-        return null;
-    }
-
-    private VolumeRow findRow(SeekbarListItem targetItem) {
-        for (VolumeRow row : mRows) {
-            if (row.listItem == targetItem) {
-                return row;
-            }
-        }
-        return null;
-    }
-
-    public void dump(PrintWriter writer) {
-        writer.println(VolumeDialogImpl.class.getSimpleName() + " state:");
-        writer.print("  mShowing: "); writer.println(mShowing);
-        writer.print("  mDynamic: "); writer.println(mDynamic);
-        writer.print("  mAutomute: "); writer.println(mAutomute);
-        writer.print("  mSilentMode: "); writer.println(mSilentMode);
-    }
-
-    private void recheckH(VolumeRow row) {
-        if (row == null) {
-            if (D.BUG) Log.d(TAG, "recheckH ALL");
-            trimObsoleteH();
-            for (VolumeRow r : mRows) {
-                updateVolumeRowH(r);
-            }
-        } else {
-            if (D.BUG) Log.d(TAG, "recheckH " + row.stream);
-            updateVolumeRowH(row);
-        }
-    }
-
-    private void setStreamImportantH(int stream, boolean important) {
-        for (VolumeRow row : mRows) {
-            if (row.stream == stream) {
-                row.important = important;
-                return;
-            }
-        }
-    }
-
-    private void showSafetyWarningH(int flags) {
-        if ((flags & (AudioManager.FLAG_SHOW_UI | AudioManager.FLAG_SHOW_UI_WARNINGS)) != 0
-            || mShowing) {
-            synchronized (mSafetyWarningLock) {
-                if (mSafetyWarning != null) {
-                    return;
-                }
-                mSafetyWarning = new SafetyWarningDialog(mContext, mController.getAudioManager()) {
-                    @Override
-                    protected void cleanUp() {
-                        synchronized (mSafetyWarningLock) {
-                            mSafetyWarning = null;
-                        }
-                        recheckH(null);
-                    }
-                };
-                mSafetyWarning.show();
-            }
-            recheckH(null);
-        }
-        rescheduleTimeoutH();
-    }
-
-    private final VolumeDialogController.Callbacks mControllerCallbackH
-            = new VolumeDialogController.Callbacks() {
-        @Override
-        public void onShowRequested(int reason) {
-            showH(reason);
-        }
-
-        @Override
-        public void onDismissRequested(int reason) {
-            dismissH(reason);
-        }
-
-        @Override
-        public void onScreenOff() {
-            dismissH(Events.DISMISS_REASON_SCREEN_OFF);
-        }
-
-        @Override
-        public void onStateChanged(State state) {
-            onStateChangedH(state);
-        }
-
-        @Override
-        public void onLayoutDirectionChanged(int layoutDirection) {
-            mListView.setLayoutDirection(layoutDirection);
-        }
-
-        @Override
-        public void onConfigurationChanged() {
-            mDialog.dismiss();
-            initDialog();
-            mConfigurableTexts.update();
-        }
-
-        @Override
-        public void onShowVibrateHint() {
-            if (mSilentMode) {
-                mController.setRingerMode(AudioManager.RINGER_MODE_SILENT, false);
-            }
-        }
-
-        @Override
-        public void onShowSilentHint() {
-            if (mSilentMode) {
-                mController.setRingerMode(AudioManager.RINGER_MODE_NORMAL, false);
-            }
-        }
-
-        @Override
-        public void onShowSafetyWarning(int flags) {
-            showSafetyWarningH(flags);
-        }
-
-        @Override
-        public void onAccessibilityModeChanged(Boolean showA11yStream) {
-        }
-    };
-
-    private final class H extends Handler {
-        private static final int SHOW = 1;
-        private static final int DISMISS = 2;
-        private static final int RECHECK = 3;
-        private static final int RECHECK_ALL = 4;
-        private static final int SET_STREAM_IMPORTANT = 5;
-        private static final int RESCHEDULE_TIMEOUT = 6;
-        private static final int STATE_CHANGED = 7;
-
-        public H() {
-            super(Looper.getMainLooper());
-        }
-
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case SHOW: showH(msg.arg1); break;
-                case DISMISS: dismissH(msg.arg1); break;
-                case RECHECK: recheckH((VolumeRow) msg.obj); break;
-                case RECHECK_ALL: recheckH(null); break;
-                case SET_STREAM_IMPORTANT: setStreamImportantH(msg.arg1, msg.arg2 != 0); break;
-                case RESCHEDULE_TIMEOUT: rescheduleTimeoutH(); break;
-                case STATE_CHANGED: onStateChangedH(mState); break;
-            }
-        }
-    }
-
-    private final class CustomDialog extends Dialog implements DialogInterface {
-        public CustomDialog(Context context) {
-            super(context, com.android.systemui.R.style.qs_theme);
-        }
-
-        @Override
-        public boolean dispatchTouchEvent(MotionEvent ev) {
-            rescheduleTimeoutH();
-            return super.dispatchTouchEvent(ev);
-        }
-
-        @Override
-        protected void onStart() {
-            super.setCanceledOnTouchOutside(true);
-            super.onStart();
-        }
-
-        @Override
-        protected void onStop() {
-            super.onStop();
-            mHandler.sendEmptyMessage(H.RECHECK_ALL);
-        }
-
-        @Override
-        public boolean onTouchEvent(MotionEvent event) {
-            if (isShowing()) {
-                if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {
-                    dismissH(Events.DISMISS_REASON_TOUCH_OUTSIDE);
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    private final class VolumeSeekBarChangeListener implements OnSeekBarChangeListener {
-        private final VolumeRow mRow;
-
-        private VolumeSeekBarChangeListener(VolumeRow volumeRow) {
-            mRow = volumeRow;
-        }
-
-        @Override
-        public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
-            if (mRow.ss == null) {
-                return;
-            }
-            if (D.BUG) {
-                Log.d(TAG, AudioSystem.streamToString(mRow.stream)
-                    + " onProgressChanged " + progress + " fromUser=" + fromUser);
-            }
-            if (!fromUser) {
-                return;
-            }
-            if (mRow.ss.levelMin > 0) {
-                final int minProgress = mRow.ss.levelMin;
-                if (progress < minProgress) {
-                    seekBar.setProgress(minProgress);
-                    progress = minProgress;
-                }
-            }
-            final int userLevel = getImpliedLevel(seekBar, progress);
-            if (mRow.ss.level != userLevel || mRow.ss.muted && userLevel > 0) {
-                if (mRow.requestedLevel != userLevel) {
-                    mController.setStreamVolume(mRow.stream, userLevel);
-                    mRow.requestedLevel = userLevel;
-                    Events.writeEvent(mContext, Events.EVENT_TOUCH_LEVEL_CHANGED, mRow.stream,
-                        userLevel);
-                }
-            }
-        }
-
-        @Override
-        public void onStartTrackingTouch(SeekBar seekBar) {
-            if (D.BUG) {
-                Log.d(TAG, "onStartTrackingTouch"+ " " + mRow.stream);
-            }
-            mController.setActiveStream(mRow.stream);
-        }
-
-        @Override
-        public void onStopTrackingTouch(SeekBar seekBar) {
-            if (D.BUG) {
-                Log.d(TAG, "onStopTrackingTouch"+ " " + mRow.stream);
-            }
-            final int userLevel = getImpliedLevel(seekBar, seekBar.getProgress());
-            Events.writeEvent(mContext, Events.EVENT_TOUCH_LEVEL_DONE, mRow.stream, userLevel);
-            if (mRow.ss.level != userLevel) {
-                mHandler.sendMessageDelayed(mHandler.obtainMessage(H.RECHECK, mRow),
-                    USER_ATTEMPT_GRACE_PERIOD);
-            }
-        }
-    }
-
-    private final class ExpandIconListener implements View.OnClickListener {
-        @Override
-        public void onClick(final View v) {
-            mExpanded = !mExpanded;
-            Animator inAnimator;
-            if (mExpanded) {
-                for (VolumeRow row : mRows) {
-                    // Adding the items which are not coming from default stream.
-                    if (!row.defaultStream) {
-                        addSeekbarListItem(row, null);
-                    }
-                }
-                inAnimator = AnimatorInflater.loadAnimator(
-                    mContext, R.anim.car_arrow_fade_in_rotate_up);
-            } else {
-                // Only keeping the default stream if it is not expended.
-                Iterator itr = mVolumeLineItems.iterator();
-                while (itr.hasNext()) {
-                    SeekbarListItem item = (SeekbarListItem) itr.next();
-                    VolumeRow row = findRow(item);
-                    if (!row.defaultStream) {
-                        itr.remove();
-                    }
-                }
-                inAnimator = AnimatorInflater.loadAnimator(
-                    mContext, R.anim.car_arrow_fade_in_rotate_down);
-            }
-
-            Animator outAnimator = AnimatorInflater.loadAnimator(
-                mContext, R.anim.car_arrow_fade_out);
-            inAnimator.setStartDelay(100);
-            AnimatorSet animators = new AnimatorSet();
-            animators.playTogether(outAnimator, inAnimator);
-            animators.setTarget(v);
-            animators.start();
-            mPagedListAdapter.notifyDataSetChanged();
-        }
-    }
-
-    private static class VolumeRow {
-        private int stream;
-        private StreamState ss;
-        private boolean important;
-        private boolean defaultStream;
-        private int primaryActionIcon;
-        private int supplementalIcon;
-        private SeekbarListItem listItem;
-        private int requestedLevel = -1;  // pending user-requested level via progress changed
-    }
-}
\ No newline at end of file
+  /**
+   * Wrapper class which contains information of each volume group.
+   */
+  private static class VolumeItem {
+    private @AudioAttributes.AttributeUsage int usage;
+    private int rank;
+    private boolean defaultItem = false;
+    private @DrawableRes int icon;
+    private SeekbarListItem listItem;
+    private int progress;
+  }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
index 6e5b548..dd55264 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogComponent.java
@@ -103,11 +103,7 @@
     }
 
     private VolumeDialog createCarDefault() {
-        CarVolumeDialogImpl impl = new CarVolumeDialogImpl(mContext);
-        impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
-        impl.setAutomute(true);
-        impl.setSilentMode(false);
-        return impl;
+        return new CarVolumeDialogImpl(mContext);
     }
 
     @Override
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
index d7aedc4..b0e40fc 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java
@@ -71,6 +71,7 @@
 import android.view.WindowManager;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager.AccessibilityServicesStateChangeListener;
+import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.animation.DecelerateInterpolator;
 import android.widget.FrameLayout;
 import android.widget.ImageButton;
@@ -627,35 +628,32 @@
             switch (mState.ringerModeInternal) {
                 case AudioManager.RINGER_MODE_VIBRATE:
                     mRingerIcon.setImageResource(R.drawable.ic_volume_ringer_vibrate);
+                    addAccessibilityDescription(mRingerIcon, RINGER_MODE_VIBRATE,
+                            mContext.getString(R.string.volume_ringer_hint_mute));
                     mRingerIcon.setTag(Events.ICON_STATE_VIBRATE);
                     break;
                 case AudioManager.RINGER_MODE_SILENT:
                     mRingerIcon.setImageResource(R.drawable.ic_volume_ringer_mute);
-                    mRingerIcon.setContentDescription(mContext.getString(
-                            R.string.volume_stream_content_description_unmute,
-                            getStreamLabelH(ss)));
                     mRingerIcon.setTag(Events.ICON_STATE_MUTE);
+                    addAccessibilityDescription(mRingerIcon, RINGER_MODE_SILENT,
+                            mContext.getString(R.string.volume_ringer_hint_unmute));
                     break;
                 case AudioManager.RINGER_MODE_NORMAL:
                 default:
                     boolean muted = (mAutomute && ss.level == 0) || ss.muted;
                     if (!isZenMuted && muted) {
                         mRingerIcon.setImageResource(R.drawable.ic_volume_ringer_mute);
-                        mRingerIcon.setContentDescription(mContext.getString(
-                                R.string.volume_stream_content_description_unmute,
-                                getStreamLabelH(ss)));
+                        addAccessibilityDescription(mRingerIcon, RINGER_MODE_NORMAL,
+                                mContext.getString(R.string.volume_ringer_hint_unmute));
                         mRingerIcon.setTag(Events.ICON_STATE_MUTE);
                     } else {
                         mRingerIcon.setImageResource(R.drawable.ic_volume_ringer);
                         if (mController.hasVibrator()) {
-                            mRingerIcon.setContentDescription(mContext.getString(
-                                    mShowA11yStream
-                                            ? R.string.volume_stream_content_description_vibrate_a11y
-                                            : R.string.volume_stream_content_description_vibrate,
-                                    getStreamLabelH(ss)));
-
+                            addAccessibilityDescription(mRingerIcon, RINGER_MODE_NORMAL,
+                                    mContext.getString(R.string.volume_ringer_hint_vibrate));
                         } else {
-                            mRingerIcon.setContentDescription(getStreamLabelH(ss));
+                            addAccessibilityDescription(mRingerIcon, RINGER_MODE_NORMAL,
+                                    mContext.getString(R.string.volume_ringer_hint_mute));
                         }
                         mRingerIcon.setTag(Events.ICON_STATE_UNMUTE);
                     }
@@ -664,6 +662,31 @@
         }
     }
 
+    private void addAccessibilityDescription(View view, int currState, String hintLabel) {
+        int currStateResId;
+        switch (currState) {
+            case RINGER_MODE_SILENT:
+                currStateResId = R.string.volume_ringer_status_silent;
+                break;
+            case RINGER_MODE_VIBRATE:
+                currStateResId = R.string.volume_ringer_status_vibrate;
+                break;
+            case RINGER_MODE_NORMAL:
+            default:
+                currStateResId = R.string.volume_ringer_status_normal;
+        }
+
+        view.setContentDescription(mContext.getString(currStateResId));
+
+        view.setAccessibilityDelegate(new AccessibilityDelegate() {
+            public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+                super.onInitializeAccessibilityNodeInfo(host, info);
+                info.addAction(new AccessibilityNodeInfo.AccessibilityAction(
+                                AccessibilityNodeInfo.ACTION_CLICK, hintLabel));
+            }
+        });
+    }
+
     /**
      * Toggles enable state of views in a VolumeRow (not including seekbar or icon)
      * Hides/shows zen icon
@@ -742,8 +765,11 @@
             updateVolumeRowH(row);
         }
         updateRingerH();
-        mWindow.setTitle(mContext.getString(R.string.volume_dialog_title,
-                getStreamLabelH(getActiveRow().ss)));
+        mWindow.setTitle(composeWindowTitle());
+    }
+
+    CharSequence composeWindowTitle() {
+        return mContext.getString(R.string.volume_dialog_title, getStreamLabelH(getActiveRow().ss));
     }
 
     private void updateVolumeRowH(VolumeRow row) {
@@ -1214,6 +1240,13 @@
         }
 
         @Override
+        public boolean dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) {
+            // Activities populate their title here. Follow that example.
+            event.getText().add(composeWindowTitle());
+            return true;
+        }
+
+        @Override
         public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child,
                 AccessibilityEvent event) {
             rescheduleTimeoutH();
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinBasedInputViewTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinBasedInputViewTest.java
new file mode 100644
index 0000000..e79c9d0
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardPinBasedInputViewTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.keyguard;
+
+import static org.mockito.Mockito.verify;
+
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper.RunWithLooper;
+import android.view.LayoutInflater;
+
+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)
+@RunWithLooper(setAsMainLooper = true)
+public class KeyguardPinBasedInputViewTest extends SysuiTestCase {
+
+    @Mock
+    private PasswordTextView mPasswordTextView;
+    private KeyguardPinBasedInputView mKeyguardPinView;
+
+    @Before
+    public void setup() {
+        MockitoAnnotations.initMocks(this);
+        LayoutInflater inflater = LayoutInflater.from(getContext());
+        mKeyguardPinView =
+                (KeyguardPinBasedInputView) inflater.inflate(R.layout.keyguard_pin_view, null);
+        mKeyguardPinView.mPasswordEntry = mPasswordTextView;
+    }
+
+    @Test
+    public void onResume_requestsFocus() {
+        mKeyguardPinView.onResume(KeyguardSecurityView.SCREEN_ON);
+        verify(mPasswordTextView).requestFocus();
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
index 9a28657..17a4fbc 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSliceViewTest.java
@@ -21,9 +21,6 @@
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper.RunWithLooper;
 import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.MeasureSpec;
-import android.view.ViewGroup;
 
 import com.android.systemui.SysuiTestCase;
 import com.android.systemui.keyguard.KeyguardSliceProvider;
@@ -35,6 +32,7 @@
 
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import androidx.slice.SliceProvider;
 import androidx.slice.SliceSpecs;
@@ -58,12 +56,24 @@
     @Test
     public void showSlice_notifiesListener() {
         ListBuilder builder = new ListBuilder(getContext(), mSliceUri);
-        boolean[] notified = {false};
+        AtomicBoolean notified = new AtomicBoolean();
         mKeyguardSliceView.setContentChangeListener((hasHeader)-> {
-            notified[0] = true;
+            notified.set(true);
         });
         mKeyguardSliceView.onChanged(builder.build());
-        Assert.assertTrue("Listener should be notified about slice changes.", notified[0]);
+        Assert.assertTrue("Listener should be notified about slice changes.",
+                notified.get());
+    }
+
+    @Test
+    public void showSlice_emptySliceNotifiesListener() {
+        AtomicBoolean notified = new AtomicBoolean();
+        mKeyguardSliceView.setContentChangeListener((hasHeader)-> {
+            notified.set(true);
+        });
+        mKeyguardSliceView.onChanged(null);
+        Assert.assertTrue("Listener should be notified about slice changes.",
+                notified.get());
     }
 
     @Test
@@ -80,6 +90,17 @@
     }
 
     @Test
+    public void refresh_replacesSliceContentAndNotifiesListener() {
+        AtomicBoolean notified = new AtomicBoolean();
+        mKeyguardSliceView.setContentChangeListener((hasHeader)-> {
+            notified.set(true);
+        });
+        mKeyguardSliceView.refresh();
+        Assert.assertTrue("Listener should be notified about slice changes.",
+                notified.get());
+    }
+
+    @Test
     public void getTextColor_whiteTextWhenAOD() {
         // Set text color to red since the default is white and test would always pass
         mKeyguardSliceView.setTextColor(Color.RED);
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java
new file mode 100644
index 0000000..1d8de2f
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardStatusViewTest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.keyguard;
+
+import static org.mockito.Mockito.verify;
+
+import android.test.suitebuilder.annotation.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper.RunWithLooper;
+import android.view.LayoutInflater;
+import android.widget.TextClock;
+
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+
+@SmallTest
+@RunWithLooper(setAsMainLooper = true)
+@RunWith(AndroidTestingRunner.class)
+public class KeyguardStatusViewTest extends SysuiTestCase {
+
+    @Mock
+    KeyguardSliceView mKeyguardSlice;
+    @Mock
+    TextClock mClockView;
+    @InjectMocks
+    KeyguardStatusView mKeyguardStatusView;
+
+    @Before
+    public void setUp() {
+        LayoutInflater layoutInflater = LayoutInflater.from(getContext());
+        mKeyguardStatusView =
+                (KeyguardStatusView) layoutInflater.inflate(R.layout.keyguard_status_view, null);
+        org.mockito.MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void dozeTimeTick_updatesSlice() {
+        mKeyguardStatusView.dozeTimeTick();
+        verify(mKeyguardSlice).refresh();
+    }
+
+    @Test
+    public void dozeTimeTick_updatesClock() {
+        mKeyguardStatusView.dozeTimeTick();
+        verify(mClockView).refresh();
+    }
+
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
index 7d49c4d..46e2bfb 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
@@ -19,21 +19,25 @@
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyString;
 import static org.mockito.ArgumentMatchers.eq;
+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 androidx.slice.Slice;
+import static org.mockito.Mockito.when;
 
 import android.app.AlarmManager;
 import android.content.ContentResolver;
 import android.content.Intent;
 import android.net.Uri;
-import android.os.Handler;
+import android.provider.Settings;
 import android.support.test.filters.SmallTest;
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
 import android.testing.TestableLooper.RunWithLooper;
+import android.util.Log;
 
 import com.android.systemui.SysuiTestCase;
+import com.android.systemui.statusbar.policy.ZenModeController;
 
 import org.junit.Assert;
 import org.junit.Before;
@@ -43,12 +47,14 @@
 import org.mockito.MockitoAnnotations;
 
 import java.util.Arrays;
-import java.util.concurrent.TimeUnit;
 import java.util.HashSet;
+import java.util.concurrent.TimeUnit;
 
+import androidx.slice.Slice;
 import androidx.slice.SliceItem;
 import androidx.slice.SliceProvider;
 import androidx.slice.SliceSpecs;
+import androidx.slice.builders.ListBuilder;
 import androidx.slice.core.SliceQuery;
 
 @SmallTest
@@ -61,10 +67,12 @@
     @Mock
     private AlarmManager mAlarmManager;
     private TestableKeyguardSliceProvider mProvider;
+    private boolean mIsZenMode;
 
     @Before
     public void setup() {
         MockitoAnnotations.initMocks(this);
+        mIsZenMode = false;
         mProvider = new TestableKeyguardSliceProvider();
         mProvider.attachInfo(getContext(), null);
         SliceProvider.setSpecs(new HashSet<>(Arrays.asList(SliceSpecs.LIST)));
@@ -77,13 +85,6 @@
     }
 
     @Test
-    public void unregisterClockUpdate() {
-        mProvider.unregisterClockUpdate();
-        Assert.assertFalse("Clock updates should have been unregistered.",
-                mProvider.isRegistered());
-    }
-
-    @Test
     public void returnsValidSlice() {
         Slice slice = mProvider.onBindSlice(mProvider.getUri());
         SliceItem text = SliceQuery.find(slice, android.app.slice.SliceItem.FORMAT_TEXT,
@@ -128,14 +129,27 @@
         verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null));
     }
 
+    @Test
+    public void onZenChanged_updatesSlice() {
+        mProvider.onZenChanged(Settings.Global.ZEN_MODE_ALARMS);
+        verify(mContentResolver).notifyChange(eq(mProvider.getUri()), eq(null));
+    }
+
+    @Test
+    public void addZenMode_addedToSlice() {
+        ListBuilder listBuilder = spy(new ListBuilder(getContext(), mProvider.getUri()));
+        mProvider.addZenMode(listBuilder);
+        verify(listBuilder, never()).addRow(any(ListBuilder.RowBuilder.class));
+
+        mIsZenMode = true;
+        mProvider.addZenMode(listBuilder);
+        verify(listBuilder).addRow(any(ListBuilder.RowBuilder.class));
+    }
+
     private class TestableKeyguardSliceProvider extends KeyguardSliceProvider {
         int mCleanDateFormatInvokations;
         private int mCounter;
 
-        TestableKeyguardSliceProvider() {
-            super(new Handler(TestableLooper.get(KeyguardSliceProviderTest.this).getLooper()));
-        }
-
         Uri getUri() {
             return mSliceUri;
         }
@@ -149,6 +163,11 @@
         }
 
         @Override
+        protected boolean isDndSuppressingNotifications() {
+            return mIsZenMode;
+        }
+
+        @Override
         void cleanDateFormat() {
             super.cleanDateFormat();
             mCleanDateFormatInvokations++;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
index ab042d4..2a4a5ad 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ExpandableNotificationRowTest.java
@@ -298,4 +298,13 @@
 
         assertEquals(3, mGroupRow.getNumUniqueChannels());
     }
+
+    @Test
+    public void testIconScrollXAfterTranslationAndReset() throws Exception {
+        mGroupRow.setTranslation(50);
+        assertEquals(50, -mGroupRow.getEntry().expandedIcon.getScrollX());
+
+        mGroupRow.resetTranslation();
+        assertEquals(0, mGroupRow.getEntry().expandedIcon.getScrollX());
+    }
 }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationDataTest.java
index d3c3746..8bdaff9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationDataTest.java
@@ -18,6 +18,11 @@
 
 import static android.app.AppOpsManager.OP_ACCEPT_HANDOVER;
 import static android.app.AppOpsManager.OP_CAMERA;
+import static android.app.Notification.CATEGORY_ALARM;
+import static android.app.Notification.CATEGORY_CALL;
+import static android.app.Notification.CATEGORY_EVENT;
+import static android.app.Notification.CATEGORY_MESSAGE;
+import static android.app.Notification.CATEGORY_REMINDER;
 
 import static junit.framework.Assert.assertEquals;
 
@@ -312,6 +317,40 @@
         assertFalse(mNotificationData.shouldSuppressAmbient(entry));
     }
 
+    @Test
+    public void testIsNotExemptFromDndVisualSuppression_hiddenCategories() {
+        initStatusBarNotification(false);
+        when(mMockStatusBarNotification.getKey()).thenReturn(
+                TEST_EXEMPT_DND_VISUAL_SUPPRESSION_KEY);
+        NotificationData.Entry entry = new NotificationData.Entry(mMockStatusBarNotification);
+        entry.mIsSystemNotification = true;
+        when(mMockStatusBarNotification.getNotification()).thenReturn(
+                new Notification.Builder(mContext, "").setCategory(CATEGORY_CALL).build());
+
+        assertFalse(mNotificationData.isExemptFromDndVisualSuppression(entry));
+        assertTrue(mNotificationData.shouldSuppressAmbient(entry));
+
+        when(mMockStatusBarNotification.getNotification()).thenReturn(
+                new Notification.Builder(mContext, "").setCategory(CATEGORY_REMINDER).build());
+
+        assertFalse(mNotificationData.isExemptFromDndVisualSuppression(entry));
+
+        when(mMockStatusBarNotification.getNotification()).thenReturn(
+                new Notification.Builder(mContext, "").setCategory(CATEGORY_ALARM).build());
+
+        assertFalse(mNotificationData.isExemptFromDndVisualSuppression(entry));
+
+        when(mMockStatusBarNotification.getNotification()).thenReturn(
+                new Notification.Builder(mContext, "").setCategory(CATEGORY_EVENT).build());
+
+        assertFalse(mNotificationData.isExemptFromDndVisualSuppression(entry));
+
+        when(mMockStatusBarNotification.getNotification()).thenReturn(
+                new Notification.Builder(mContext, "").setCategory(CATEGORY_MESSAGE).build());
+
+        assertFalse(mNotificationData.isExemptFromDndVisualSuppression(entry));
+    }
+
     private void initStatusBarNotification(boolean allowDuringSetup) {
         Bundle bundle = new Bundle();
         bundle.putBoolean(Notification.EXTRA_ALLOW_DURING_SETUP, allowDuringSetup);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
index b0530c8..65fd7f5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationInfoTest.java
@@ -33,9 +33,12 @@
 import static org.mockito.Mockito.anyBoolean;
 import static org.mockito.Mockito.anyInt;
 import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.doCallRealMethod;
+import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.eq;
 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 static org.mockito.Mockito.when;
@@ -44,7 +47,6 @@
 import android.app.Notification;
 import android.app.NotificationChannel;
 import android.app.NotificationChannelGroup;
-import android.app.NotificationManager;
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
@@ -52,7 +54,7 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.graphics.drawable.Drawable;
-import android.os.Looper;
+import android.os.IBinder;
 import android.os.UserHandle;
 import android.service.notification.StatusBarNotification;
 import android.test.suitebuilder.annotation.SmallTest;
@@ -65,6 +67,7 @@
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.android.internal.logging.MetricsLogger;
 import com.android.systemui.Dependency;
 import com.android.systemui.R;
 import com.android.systemui.SysuiTestCase;
@@ -100,7 +103,7 @@
     private StatusBarNotification mSbn;
 
     @Rule public MockitoRule mockito = MockitoJUnit.rule();
-    private Looper mLooper;
+    @Mock private MetricsLogger mMetricsLogger;
     @Mock private INotificationManager mMockINotificationManager;
     @Mock private PackageManager mMockPackageManager;
     @Mock private NotificationBlockingHelperManager mBlockingHelperManager;
@@ -112,6 +115,7 @@
                 mBlockingHelperManager);
         mTestableLooper = TestableLooper.get(this);
         mDependency.injectTestDependency(Dependency.BG_LOOPER, mTestableLooper.getLooper());
+        mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
         // Inflate the layout
         final LayoutInflater layoutInflater = LayoutInflater.from(mContext);
         mNotificationInfo = (NotificationInfo) layoutInflater.inflate(R.layout.notification_info,
@@ -301,6 +305,24 @@
     }
 
     @Test
+    public void testLogBlockingHelperCounter_doesntLogForNormalGutsView() throws Exception {
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false);
+        mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent");
+        verify(mMetricsLogger, times(0)).count(anyString(), anyInt());
+    }
+
+    @Test
+    public void testLogBlockingHelperCounter_logsForBlockingHelper() throws Exception {
+        // Bind notification logs an event, so this counts as one invocation for the metrics logger.
+        mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
+                TEST_PACKAGE_NAME, mNotificationChannel, 1, mSbn, null, null, null, false, true,
+                true);
+        mNotificationInfo.logBlockingHelperCounter("HowCanNotifsBeRealIfAppsArent");
+        verify(mMetricsLogger, times(2)).count(anyString(), anyInt());
+    }
+
+    @Test
     public void testOnClickListenerPassesNullChannelForBundle() throws Exception {
         final CountDownLatch latch = new CountDownLatch(1);
         mNotificationInfo.bindNotification(mMockPackageManager, mMockINotificationManager,
@@ -471,6 +493,13 @@
                 false /* isNonblockable */, true /* isForBlockingHelper */,
                 true /* isUserSentimentNegative */);
 
+        NotificationGuts guts = spy(new NotificationGuts(mContext, null));
+        when(guts.getWindowToken()).thenReturn(mock(IBinder.class));
+        doNothing().when(guts).animateClose(anyInt(), anyInt(), anyBoolean());
+        doNothing().when(guts).setExposed(anyBoolean(), anyBoolean());
+        guts.setGutsContent(mNotificationInfo);
+        mNotificationInfo.setGutsParent(guts);
+
         mNotificationInfo.findViewById(R.id.keep).performClick();
 
         verify(mBlockingHelperManager).dismissCurrentBlockingHelper();
@@ -495,6 +524,9 @@
                 false /* isNonblockable */,
                 true /* isForBlockingHelper */,
                 false /* isUserSentimentNegative */);
+        NotificationGuts guts = mock(NotificationGuts.class);
+        doCallRealMethod().when(guts).closeControls(anyInt(), anyInt(), anyBoolean(), anyBoolean());
+        mNotificationInfo.setGutsParent(guts);
 
         mNotificationInfo.closeControls(mNotificationInfo);
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
index 9e8fa22..231cdf5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CollapsedStatusBarFragmentTest.java
@@ -121,7 +121,7 @@
         fragment.initNotificationIconArea(mMockNotificiationAreaController);
         fragment.disable(StatusBarManager.DISABLE_CLOCK, 0, false);
 
-        assertEquals(View.INVISIBLE, mFragment.getView().findViewById(R.id.clock).getVisibility());
+        assertEquals(View.GONE, mFragment.getView().findViewById(R.id.clock).getVisibility());
 
         fragment.disable(0, 0, false);
 
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardPresentationTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardPresentationTest.java
new file mode 100644
index 0000000..5429153
--- /dev/null
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardPresentationTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.systemui.statusbar.phone;
+
+import android.support.test.filters.SmallTest;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.view.LayoutInflater;
+import android.view.View;
+
+import com.android.systemui.R;
+import com.android.systemui.SysuiTestCase;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SmallTest
+@RunWith(AndroidTestingRunner.class)
+@TestableLooper.RunWithLooper(setAsMainLooper = true)
+public class KeyguardPresentationTest extends SysuiTestCase {
+    @Test
+    public void testInflation_doesntCrash() {
+        LayoutInflater inflater = LayoutInflater.from(getContext());
+        inflater.inflate(R.layout.keyguard_presentation, null);
+    }
+}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index d3cb5a6..37e0005 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -443,6 +443,30 @@
     }
 
     @Test
+    public void testPeek_disabledStatusBar() {
+        Notification n = new Notification.Builder(getContext(), "a").build();
+        StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n,
+                UserHandle.of(0), null, 0);
+        NotificationData.Entry entry = new NotificationData.Entry(sbn);
+        mStatusBar.disable(StatusBarManager.DISABLE_EXPAND, 0, false /* animate */);
+
+        assertFalse("The panel shouldn't allow peek while disabled",
+                mStatusBar.shouldPeek(entry, sbn));
+    }
+
+    @Test
+    public void testPeek_disabledNotificationShade() {
+        Notification n = new Notification.Builder(getContext(), "a").build();
+        StatusBarNotification sbn = new StatusBarNotification("a", "a", 0, "a", 0, 0, n,
+                UserHandle.of(0), null, 0);
+        NotificationData.Entry entry = new NotificationData.Entry(sbn);
+        mStatusBar.disable(0, StatusBarManager.DISABLE2_NOTIFICATION_SHADE, false /* animate */);
+
+        assertFalse("The panel shouldn't allow peek while notitifcation shade disabled",
+                mStatusBar.shouldPeek(entry, sbn));
+    }
+
+    @Test
     public void testLogHidden() {
         try {
             mStatusBar.handleVisibleToUserChanged(false);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java
index 99c06e6..f3d79fd 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SmartReplyViewTest.java
@@ -87,8 +87,7 @@
         MockitoAnnotations.initMocks(this);
         mReceiver = new BlockingQueueIntentReceiver();
         mContext.registerReceiver(mReceiver, new IntentFilter(TEST_ACTION));
-        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(
-            (action, cancelAction, afterKeyguardGone) -> action.onDismiss());
+        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(action -> action.onDismiss());
 
         mContainer = new View(mContext, null);
         mView = SmartReplyView.inflate(mContext, null);
@@ -130,12 +129,7 @@
 
     @Test
     public void testSendSmartReply_keyguardCancelled() throws InterruptedException {
-        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(
-            (action, cancelAction, afterKeyguardGone) -> {
-                if (cancelAction != null) {
-                    cancelAction.run();
-                }
-            });
+        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(action -> {});
         setRepliesFromRemoteInput(TEST_CHOICES);
 
         mView.getChildAt(2).performClick();
@@ -146,8 +140,7 @@
     @Test
     public void testSendSmartReply_waitsForKeyguard() throws InterruptedException {
         AtomicReference<OnDismissAction> actionRef = new AtomicReference<>();
-        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(
-            (action, cancelAction, afterKeyguardGone) -> actionRef.set(action));
+        mDependency.get(KeyguardDismissUtil.class).setDismissHandler(actionRef::set);
         setRepliesFromRemoteInput(TEST_CHOICES);
 
         mView.getChildAt(2).performClick();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java b/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java
index a3b258f..c095472 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/util/leak/GarbageMonitorTest.java
@@ -16,16 +16,18 @@
 
 package com.android.systemui.util.leak;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+import android.content.Context;
+import android.os.Looper;
 import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnit4;
+import android.testing.AndroidTestingRunner;
+import android.testing.TestableLooper;
+import android.testing.TestableLooper.RunWithLooper;
 
 import com.android.systemui.SysuiTestCase;
 
@@ -34,7 +36,8 @@
 import org.junit.runner.RunWith;
 
 @SmallTest
-@RunWith(AndroidJUnit4.class)
+@RunWith(AndroidTestingRunner.class)
+@RunWithLooper
 public class GarbageMonitorTest extends SysuiTestCase {
 
     private LeakReporter mLeakReporter;
@@ -45,14 +48,17 @@
     public void setup() {
         mTrackedGarbage = mock(TrackedGarbage.class);
         mLeakReporter = mock(LeakReporter.class);
-        mGarbageMonitor = new TestableGarbageMonitor(
-                new LeakDetector(null, mTrackedGarbage, null),
-                mLeakReporter);
+        mGarbageMonitor =
+                new TestableGarbageMonitor(
+                        mContext,
+                        TestableLooper.get(this).getLooper(),
+                        new LeakDetector(null, mTrackedGarbage, null),
+                        mLeakReporter);
     }
 
     @Test
     public void testCallbacks_getScheduled() {
-        mGarbageMonitor.start();
+        mGarbageMonitor.startLeakMonitor();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
@@ -62,7 +68,7 @@
     public void testNoGarbage_doesntDump() {
         when(mTrackedGarbage.countOldGarbage()).thenReturn(0);
 
-        mGarbageMonitor.start();
+        mGarbageMonitor.startLeakMonitor();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
@@ -74,7 +80,7 @@
     public void testALittleGarbage_doesntDump() {
         when(mTrackedGarbage.countOldGarbage()).thenReturn(4);
 
-        mGarbageMonitor.start();
+        mGarbageMonitor.startLeakMonitor();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
         mGarbageMonitor.runCallbacksOnce();
@@ -86,7 +92,7 @@
     public void testTransientGarbage_doesntDump() {
         when(mTrackedGarbage.countOldGarbage()).thenReturn(100);
 
-        mGarbageMonitor.start();
+        mGarbageMonitor.startLeakMonitor();
         mGarbageMonitor.runInspectCallback();
 
         when(mTrackedGarbage.countOldGarbage()).thenReturn(0);
@@ -100,56 +106,34 @@
     public void testLotsOfPersistentGarbage_dumps() {
         when(mTrackedGarbage.countOldGarbage()).thenReturn(100);
 
-        mGarbageMonitor.start();
+        mGarbageMonitor.startLeakMonitor();
         mGarbageMonitor.runCallbacksOnce();
 
         verify(mLeakReporter).dumpLeak(anyInt());
     }
 
     private static class TestableGarbageMonitor extends GarbageMonitor {
-        Runnable mInspectCallback;
-        Runnable mReinspectCallback;
-
-        public TestableGarbageMonitor(LeakDetector leakDetector,
+        public TestableGarbageMonitor(
+                Context context,
+                Looper looper,
+                LeakDetector leakDetector,
                 LeakReporter leakReporter) {
-            super(null /* bgLooper */, leakDetector, leakReporter);
-        }
-
-        @Override
-        void scheduleInspectGarbage(Runnable runnable) {
-            assertNull("must not have more than one pending inspect callback", mInspectCallback);
-            mInspectCallback = runnable;
+            super(context, looper, leakDetector, leakReporter);
         }
 
         void runInspectCallback() {
-            assertNotNull("expected an inspect callback to be scheduled", mInspectCallback);
-            Runnable callback = mInspectCallback;
-            mInspectCallback = null;
-            callback.run();
-        }
-
-        @Override
-        void scheduleReinspectGarbage(Runnable runnable) {
-            assertNull("must not have more than one reinspect callback", mReinspectCallback);
-            mReinspectCallback = runnable;
+            startLeakMonitor();
         }
 
         void runReinspectCallback() {
-            assertNotNull("expected a reinspect callback to be scheduled", mInspectCallback);
-            maybeRunReinspectCallback();
-        }
-
-        void maybeRunReinspectCallback() {
-            Runnable callback = mReinspectCallback;
-            mReinspectCallback = null;
-            if (callback != null) {
-                callback.run();
-            }
+            reinspectGarbageAfterGc();
         }
 
         void runCallbacksOnce() {
+            // Note that TestableLooper doesn't currently support delayed messages so we need to run
+            // callbacks explicitly.
             runInspectCallback();
-            maybeRunReinspectCallback();
+            runReinspectCallback();
         }
     }
 }
\ No newline at end of file
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index e33ef1f..1541231 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -3967,6 +3967,7 @@
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // NOTE: starting on OS P, it also added the following field:
     // Tag FIELD_FLAGS - Flags used to start the session
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SESSION_STARTED = 906;
 
     // An autofill request was processed by a service
@@ -3980,6 +3981,7 @@
     // Type TYPE_CLOSE: Service returned a null response.
     // Tag FIELD_AUTOFILL_NUM_FIELD_CLASSIFICATION_IDS: if service requested field classification,
     // number of entries field ids in the request.
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_REQUEST = 907;
 
     // Tag of a field for a package of an autofill service
@@ -3998,6 +4000,7 @@
     // Tag FIELD_AUTOFILL_NUM_DATASETS: The number of datasets shown
     // NOTE: starting on OS P, it also added the following field:
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_FILL_UI = 910;
 
     // Tag of a field for the length of the filter text
@@ -4005,12 +4008,17 @@
 
     // An autofill authentication succeeded
     // Package: Package of app that was autofilled
+    // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_AUTHENTICATED = 912;
 
     // An activity was autofilled and all values could be applied
     // Package: Package of app that is autofilled
     // Tag FIELD_AUTOFILL_NUM_VALUES: Number of values that were suggested to be autofilled
     // Tag FIELD_AUTOFILL_NUM_VIEWS_FILLED: Number of views that could be filled
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_DATASET_APPLIED = 913;
 
     // Tag of a field for the number values to be filled in
@@ -4027,6 +4035,7 @@
     // Tag FIELD_AUTOFILL_NUM_IDS: The number of ids that are saved
     // NOTE: starting on OS P, it also added the following field:
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_UI = 916;
 
     // Tag of a field for the number of saveable ids
@@ -4038,10 +4047,14 @@
     // Type TYPE_FAILURE: The request failed
     // Package: Package of app that was autofilled
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_DATA_SAVE_REQUEST = 918;
 
     // An auto-fill session was finished
     // Package: Package of app that was autofilled
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SESSION_FINISHED = 919;
 
     // meta-event: a reader has checkpointed the log here.
@@ -4167,6 +4180,8 @@
     // Package: Real package of the app being autofilled
     // Tag FIELD_AUTOFILL_SERVICE: Package of the autofill service that processed the request
     // TAG FIELD_AUTOFILL_FORGED_COMPONENT_NAME: Component name being forged
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_FORGED_COMPONENT_ATTEMPT = 948;
 
     // FIELD - The component that an app tried tro forged.
@@ -4624,6 +4639,8 @@
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_PREVIOUS_LENGTH: the previous length of the value
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_VALUE_RESET = 1124;
 
     // Tag of AUTOFILL_VALUE_RESET
@@ -4634,18 +4651,24 @@
     // Package: Package of app that was autofilled
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_DATASET_AUTHENTICATED = 1126;
 
     // An autofill service provided an invalid dataset authentication
     // Package: Package of app that was autofilled
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_INVALID_DATASET_AUTHENTICATION = 1127;
 
     // An autofill service provided an invalid authentication extra
     // Package: Package of app that was autofilled
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_INVALID_AUTHENTICATION = 1128;
 
     // An autofill service used a custom description (using RemoteViews) in the autofill save UI
@@ -4653,6 +4676,8 @@
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_SAVE_TYPE: Type of save object passed by the service
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_CUSTOM_DESCRIPTION = 1129;
 
     // FIELD - Type of save object passed by the service when the Save UI is shown
@@ -4664,6 +4689,8 @@
     // OS: O MR
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_SAVE_TYPE: Type of save object passed by the service
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_CUSTOM_SUBTITLE = 1131;
 
     // User tapped a link in the custom description of the autofill save UI provided by an autofill service
@@ -4674,6 +4701,8 @@
     // Type TYPE_FAILURE: The link could not launc an activity
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_SAVE_TYPE: Type of save object passed by the service
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_LINK_TAPPED = 1132;
 
     // Result of the validation on save when an autofill service provided a validator
@@ -4684,6 +4713,8 @@
     // Type TYPE_DISMISS: The validation failed
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_SAVE_TYPE: Type of save object passed by the service
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_VALIDATION = 1133;
 
     // Result of an operation in the autofill save UI after the user tapped a link in the custom description
@@ -4693,6 +4724,8 @@
     // Type TYPE_OPEN: The autofill save UI was restored
     // Type TYPE_DISMISS: The autofill save UI was destroyed
     // Type TYPE_FAILURE: An invalid opperation was reported by the app's AutofillManager
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_PENDING_SAVE_UI_OPERATION = 1134;
 
     // Autofill service called API that disables itself
@@ -4705,6 +4738,8 @@
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Package: Package of the autofill service
     // OS: O MR
+    // NOTE: starting on OS P, it also added the following field:
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_UI_LATENCY = 1136;
 
     // Action: the snooze leave-behind was shown after the user clicked the snooze icon
@@ -4872,12 +4907,14 @@
     // Package: Package of app that is autofilled
     // OS: P
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_EXPLICIT_SAVE_TRIGGER_DEFINITION = 1228;
 
     // The autofill context was commited when the user clicked a view explicitly marked by the
     // service as committing it
     // Package: Package of app that is autofilled
     // OS: P
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SAVE_EXPLICITLY_TRIGGERED = 1229;
 
     // OPEN: Settings > Network & Internet > Mobile network > Wi-Fi calling
@@ -4890,6 +4927,7 @@
     // OS: P
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SERVICE_DISABLED_APP = 1231;
 
     // An autofill service asked to disable autofill for a given activity.
@@ -4898,6 +4936,7 @@
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_CLASS_NAME: Class name of the activity that is being disabled for autofill
     // Tag FIELD_AUTOFILL_DURATION: duration (in ms) that autofill will be disabled
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_SERVICE_DISABLED_ACTIVITY = 1232;
 
     // ACTION: Stop an app and turn on background check
@@ -5109,6 +5148,7 @@
     // OS: P
     // Tag FIELD_AUTOFILL_SERVICE: Package of service that processed the request
     // Tag FIELD_AUTOFILL_MATCH_SCORE: Average score of the matches, in the range of 0 to 100
+    // Type FIELD_AUTOFILL_COMPAT_MODE: package is being autofilled on compatibility mode.
     AUTOFILL_FIELD_CLASSIFICATION_MATCHES = 1273;
 
     // Tag used to report autofill field classification scores
@@ -5717,6 +5757,67 @@
     // OS: P
     SETTINGS_ZEN_NOTIFICATIONS = 1400;
 
+    // An event category for slices.
+    // OPEN: Slice became visible.
+    // CLOSE: Slice became invisible.
+    // ACTION: Slice was tapped.
+    SLICE = 1401;
+
+    // The authority part of the slice URI
+    FIELD_SLICE_AUTHORITY = 1402;
+
+    // The path part of the slice URI
+    FIELD_SLICE_PATH = 1403;
+
+    // The authority part of the subslice URI
+    FIELD_SUBSLICE_AUTHORITY = 1404;
+
+    // The path part of the subslice URI
+    FIELD_SUBSLICE_PATH = 1405;
+
+    // OPEN: DND onboarding activity > don't update button
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_ZEN_ONBOARDING_KEEP_CURRENT_SETTINGS = 1406;
+
+    // ACTION: Storage initialization wizard initialization choice of external/portable
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_INIT_EXTERNAL = 1407;
+
+    // ACTION: Storage initialization wizard initialization choice of internal/adoptable
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_INIT_INTERNAL = 1408;
+
+    // ACTION: Storage initialization wizard benchmark fast choice of continue
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_BENCHMARK_FAST_CONTINUE = 1409;
+
+    // ACTION: Storage initialization wizard benchmark slow choice of continue
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_BENCHMARK_SLOW_CONTINUE = 1410;
+
+    // ACTION: Storage initialization wizard benchmark slow choice of abort
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_BENCHMARK_SLOW_ABORT = 1411;
+
+    // ACTION: Storage initialization wizard migration choice of now
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_MIGRATE_NOW = 1412;
+
+    // ACTION: Storage initialization wizard migration choice of later
+    // CATEGORY: SETTINGS
+    // OS: P
+    ACTION_STORAGE_MIGRATE_LATER = 1413;
+
+    // Tag used to report whether an activity is being autofilled  on compatibility mode.
+    FIELD_AUTOFILL_COMPAT_MODE = 1414;
+
     // ---- End P Constants, all P constants go above this line ----
     // Add new aosp constants above this line.
     // END OF AOSP CONSTANTS
diff --git a/proto/src/wifi.proto b/proto/src/wifi.proto
index 9a8361e..8fa6b3e 100644
--- a/proto/src/wifi.proto
+++ b/proto/src/wifi.proto
@@ -435,6 +435,21 @@
 
   // Wi-Fi RTT metrics
   optional WifiRttLog wifi_rtt_log = 110;
+
+  // Flag which indicates if Connected MAC Randomization is enabled
+  optional bool is_mac_randomization_on = 111 [default = false];
+
+  // Number of radio mode changes to MCC (Multi channel concurrency).
+  optional int32 num_radio_mode_change_to_mcc = 112;
+
+  // Number of radio mode changes to SCC (Single channel concurrency).
+  optional int32 num_radio_mode_change_to_scc = 113;
+
+  // Number of radio mode changes to SBS (Single band simultaneous).
+  optional int32 num_radio_mode_change_to_sbs = 114;
+
+  // Number of radio mode changes to DBS (Dual band simultaneous).
+  optional int32 num_radio_mode_change_to_dbs = 115;
 }
 
 // Information that gets logged for every WiFi connection.
@@ -748,6 +763,9 @@
     // The NetworkAgent score for wifi has changed in a way that may impact
     // connectivity
     TYPE_SCORE_BREACH = 16;
+
+    // Framework changed Sta interface MAC address
+    TYPE_MAC_CHANGE = 17;
   }
 
   enum FrameworkDisconnectReason {
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
index 3253f2e..51c0488 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerService.java
@@ -219,6 +219,8 @@
                     final String activePackageName = getActiveAutofillServicePackageName();
                     if (packageName.equals(activePackageName)) {
                         removeCachedServiceLocked(getChangingUserId());
+                    } else {
+                        handlePackageUpdateLocked(packageName);
                     }
                 }
             }
@@ -250,6 +252,8 @@
                                 return true;
                             }
                             removeCachedServiceLocked(getChangingUserId());
+                        } else {
+                          handlePackageUpdateLocked(pkg);
                         }
                     }
                 }
@@ -274,6 +278,14 @@
                 }
                 return serviceComponent.getPackageName();
             }
+
+            @GuardedBy("mLock")
+            private void handlePackageUpdateLocked(String packageName) {
+                final int size = mServicesCache.size();
+                for (int i = 0; i < size; i++) {
+                    mServicesCache.valueAt(i).handlePackageUpdateLocked(packageName);
+                }
+            }
         };
 
         // package changes
diff --git a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
index 0bb29a7..6ff9539 100644
--- a/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
+++ b/services/autofill/java/com/android/server/autofill/AutofillManagerServiceImpl.java
@@ -504,7 +504,7 @@
             sessionId = sRandom.nextInt();
         } while (sessionId == NO_SESSION || mSessions.indexOfKey(sessionId) >= 0);
 
-        assertCallerLocked(componentName);
+        assertCallerLocked(componentName, compatMode);
 
         final Session newSession = new Session(this, mUi, mContext, mHandler, mUserId, mLock,
                 sessionId, uid, activityToken, appCallbackToken, hasCallback, mUiLatencyHistory,
@@ -518,7 +518,7 @@
     /**
      * Asserts the component is owned by the caller.
      */
-    private void assertCallerLocked(@NonNull ComponentName componentName) {
+    private void assertCallerLocked(@NonNull ComponentName componentName, boolean compatMode) {
         final String packageName = componentName.getPackageName();
         final PackageManager pm = mContext.getPackageManager();
         final int callingUid = Binder.getCallingUid();
@@ -536,7 +536,7 @@
                     + ") passed component (" + componentName + ") owned by UID " + packageUid);
             mMetricsLogger.write(
                     Helper.newLogMaker(MetricsEvent.AUTOFILL_FORGED_COMPONENT_ATTEMPT,
-                            callingPackage, getServicePackageName())
+                            callingPackage, getServicePackageName(), compatMode)
                     .addTaggedData(MetricsEvent.FIELD_AUTOFILL_FORGED_COMPONENT_NAME,
                             componentName == null ? "null" : componentName.flattenToShortString()));
 
@@ -626,9 +626,25 @@
     }
 
     @GuardedBy("mLock")
+    void handlePackageUpdateLocked(String packageName) {
+        final ServiceInfo serviceInfo = mFieldClassificationStrategy.getServiceInfo();
+        if (serviceInfo != null && serviceInfo.packageName.equals(packageName)) {
+            resetExtServiceLocked();
+        }
+    }
+
+    @GuardedBy("mLock")
+    void resetExtServiceLocked() {
+        if (sVerbose) Slog.v(TAG, "reset autofill service.");
+        mFieldClassificationStrategy.reset();
+    }
+
+    @GuardedBy("mLock")
     void destroyLocked() {
         if (sVerbose) Slog.v(TAG, "destroyLocked()");
 
+        resetExtServiceLocked();
+
         final int numSessions = mSessions.size();
         final ArraySet<RemoteFillService> remoteFillServices = new ArraySet<>(numSessions);
         for (int i = 0; i < numSessions; i++) {
@@ -758,10 +774,10 @@
             @Nullable ArrayList<String> changedDatasetIds,
             @Nullable ArrayList<AutofillId> manuallyFilledFieldIds,
             @Nullable ArrayList<ArrayList<String>> manuallyFilledDatasetIds,
-            @NonNull String appPackageName) {
+            @NonNull String appPackageName, boolean compatMode) {
         logContextCommittedLocked(sessionId, clientState, selectedDatasets, ignoredDatasets,
                 changedFieldIds, changedDatasetIds, manuallyFilledFieldIds,
-                manuallyFilledDatasetIds, null, null, appPackageName);
+                manuallyFilledDatasetIds, null, null, appPackageName, compatMode);
     }
 
     @GuardedBy("mLock")
@@ -774,7 +790,7 @@
             @Nullable ArrayList<ArrayList<String>> manuallyFilledDatasetIds,
             @Nullable ArrayList<AutofillId> detectedFieldIdsList,
             @Nullable ArrayList<FieldClassification> detectedFieldClassificationsList,
-            @NonNull String appPackageName) {
+            @NonNull String appPackageName, boolean compatMode) {
         if (isValidEventLocked("logDatasetNotSelected()", sessionId)) {
             if (sVerbose) {
                 Slog.v(TAG, "logContextCommitted() with FieldClassification: id=" + sessionId
@@ -784,7 +800,8 @@
                         + ", changedDatasetIds=" + changedDatasetIds
                         + ", manuallyFilledFieldIds=" + manuallyFilledFieldIds
                         + ", detectedFieldIds=" + detectedFieldIdsList
-                        + ", detectedFieldClassifications=" + detectedFieldClassificationsList);
+                        + ", detectedFieldClassifications=" + detectedFieldClassificationsList
+                        + ", compatMode=" + compatMode);
             }
             AutofillId[] detectedFieldsIds = null;
             FieldClassification[] detectedFieldClassifications = null;
@@ -811,7 +828,7 @@
                 final int averageScore = (int) ((totalScore * 100) / totalSize);
                 mMetricsLogger.write(Helper
                         .newLogMaker(MetricsEvent.AUTOFILL_FIELD_CLASSIFICATION_MATCHES,
-                                appPackageName, getServicePackageName())
+                                appPackageName, getServicePackageName(), compatMode)
                         .setCounterValue(numberFields)
                         .addTaggedData(MetricsEvent.FIELD_AUTOFILL_MATCH_SCORE,
                                 averageScore));
@@ -1106,7 +1123,7 @@
     /**
      * Called by {@link Session} when service asked to disable autofill for an app.
      */
-    void disableAutofillForApp(@NonNull String packageName, long duration) {
+    void disableAutofillForApp(@NonNull String packageName, long duration, boolean compatMode) {
         synchronized (mLock) {
             if (mDisabledApps == null) {
                 mDisabledApps = new ArrayMap<>(1);
@@ -1119,7 +1136,7 @@
             mDisabledApps.put(packageName, expiration);
             int intDuration = duration > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) duration;
             mMetricsLogger.write(Helper.newLogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_APP,
-                    packageName, getServicePackageName())
+                    packageName, getServicePackageName(), compatMode)
                     .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
         }
     }
@@ -1127,7 +1144,8 @@
     /**
      * Called by {@link Session} when service asked to disable autofill an app.
      */
-    void disableAutofillForActivity(@NonNull ComponentName componentName, long duration) {
+    void disableAutofillForActivity(@NonNull ComponentName componentName, long duration,
+            boolean compatMode) {
         synchronized (mLock) {
             if (mDisabledActivities == null) {
                 mDisabledActivities = new ArrayMap<>(1);
@@ -1144,7 +1162,8 @@
             mMetricsLogger.write(new LogMaker(MetricsEvent.AUTOFILL_SERVICE_DISABLED_ACTIVITY)
                     .setComponentName(componentName)
                     .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, getServicePackageName())
-                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration));
+                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_DURATION, intDuration)
+                    .addTaggedData(MetricsEvent.FIELD_AUTOFILL_COMPAT_MODE, compatMode ? 1 : 0));
         }
     }
 
diff --git a/services/autofill/java/com/android/server/autofill/FieldClassificationStrategy.java b/services/autofill/java/com/android/server/autofill/FieldClassificationStrategy.java
index da52201..9bec856 100644
--- a/services/autofill/java/com/android/server/autofill/FieldClassificationStrategy.java
+++ b/services/autofill/java/com/android/server/autofill/FieldClassificationStrategy.java
@@ -83,7 +83,7 @@
     }
 
     @Nullable
-    private ServiceInfo getServiceInfo() {
+    ServiceInfo getServiceInfo() {
         final String packageName =
                 mContext.getPackageManager().getServicesSystemSharedLibraryPackageName();
         if (packageName == null) {
@@ -119,6 +119,18 @@
         return name;
     }
 
+    void reset() {
+        synchronized (mLock) {
+            if (mServiceConnection != null) {
+                if (sDebug) Slog.d(TAG, "reset(): unbinding service.");
+                mContext.unbindService(mServiceConnection);
+                mServiceConnection = null;
+            } else {
+                if (sDebug) Slog.d(TAG, "reset(): service is not bound. Do nothing.");
+            }
+        }
+    }
+
     /**
      * Run a command, starting the service connection if necessary.
      */
diff --git a/services/autofill/java/com/android/server/autofill/Helper.java b/services/autofill/java/com/android/server/autofill/Helper.java
index 78526f5..5372d0c 100644
--- a/services/autofill/java/com/android/server/autofill/Helper.java
+++ b/services/autofill/java/com/android/server/autofill/Helper.java
@@ -21,7 +21,6 @@
 import android.app.assist.AssistStructure;
 import android.app.assist.AssistStructure.ViewNode;
 import android.metrics.LogMaker;
-import android.os.Bundle;
 import android.service.autofill.Dataset;
 import android.util.ArrayMap;
 import android.util.ArraySet;
@@ -35,10 +34,7 @@
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.LinkedList;
-import java.util.Objects;
-import java.util.Set;
 
 public final class Helper {
 
@@ -119,6 +115,13 @@
         return log;
     }
 
+    @NonNull
+    public static LogMaker newLogMaker(int category, String packageName,
+            String servicePackageName, boolean compatMode) {
+        return newLogMaker(category, packageName, servicePackageName)
+                .addTaggedData(MetricsEvent.FIELD_AUTOFILL_COMPAT_MODE, compatMode ? 1 : 0);
+    }
+
     public static void printlnRedactedText(@NonNull PrintWriter pw, @Nullable CharSequence text) {
         if (text == null) {
             pw.println("null");
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index c055060..88a679b 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -644,9 +644,10 @@
                 Slog.d(TAG, message.toString());
             }
             if ((flags & FillResponse.FLAG_DISABLE_ACTIVITY_ONLY) != 0) {
-                mService.disableAutofillForActivity(mComponentName, disableDuration);
+                mService.disableAutofillForActivity(mComponentName, disableDuration, mCompatMode);
             } else {
-                mService.disableAutofillForApp(mComponentName.getPackageName(), disableDuration);
+                mService.disableAutofillForApp(mComponentName.getPackageName(), disableDuration,
+                        mCompatMode);
             }
             sessionFinishedState = AutofillManager.STATE_DISABLED_BY_SERVICE;
         }
@@ -1251,7 +1252,7 @@
             mService.logContextCommittedLocked(id, mClientState, mSelectedDatasetIds,
                     ignoredDatasets, changedFieldIds, changedDatasetIds,
                     manuallyFilledFieldIds, manuallyFilledDatasetIds,
-                    mComponentName.getPackageName());
+                    mComponentName.getPackageName(), mCompatMode);
         }
     }
 
@@ -1306,7 +1307,7 @@
                 mService.logContextCommittedLocked(id, mClientState, mSelectedDatasetIds,
                         ignoredDatasets, changedFieldIds, changedDatasetIds,
                         manuallyFilledFieldIds, manuallyFilledDatasetIds,
-                        mComponentName.getPackageName());
+                        mComponentName.getPackageName(), mCompatMode);
                 return;
             }
             final Scores scores = result.getParcelable(EXTRA_SCORES);
@@ -1371,7 +1372,7 @@
             mService.logContextCommittedLocked(id, mClientState, mSelectedDatasetIds,
                     ignoredDatasets, changedFieldIds, changedDatasetIds, manuallyFilledFieldIds,
                     manuallyFilledDatasetIds, detectedFieldIds, detectedFieldClassifications,
-                    mComponentName.getPackageName());
+                    mComponentName.getPackageName(), mCompatMode);
         });
 
         fcStrategy.getScores(callback, algorithm, algorithmArgs, currentValues, userValues);
@@ -1602,7 +1603,7 @@
                 getUiForShowing().showSaveUi(mService.getServiceLabel(), mService.getServiceIcon(),
                         mService.getServicePackageName(), saveInfo, this,
                         mComponentName.getPackageName(), this,
-                        mPendingSaveUi);
+                        mPendingSaveUi, mCompatMode);
                 if (client != null) {
                     try {
                         client.setSaveUiState(id, true);
@@ -2080,7 +2081,7 @@
 
         getUiForShowing().showFillUi(filledId, response, filterText,
                 mService.getServicePackageName(), mComponentName.getPackageName(),
-                mService.getServiceLabel(), mService.getServiceIcon(), this);
+                mService.getServiceLabel(), mService.getServiceIcon(), this, mCompatMode);
 
         synchronized (mLock) {
             if (mUiShownTime == 0) {
@@ -2717,7 +2718,8 @@
     }
 
     private LogMaker newLogMaker(int category, String servicePackageName) {
-        return Helper.newLogMaker(category, mComponentName.getPackageName(), servicePackageName);
+        return Helper.newLogMaker(category, mComponentName.getPackageName(), servicePackageName,
+                mCompatMode);
     }
 
     private void writeLog(int category) {
diff --git a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
index ee18dc2..811d87be 100644
--- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
@@ -170,13 +170,14 @@
     public void showFillUi(@NonNull AutofillId focusedId, @NonNull FillResponse response,
             @Nullable String filterText, @Nullable String servicePackageName,
             @NonNull String packageName, @NonNull CharSequence serviceLabel,
-            @NonNull Drawable serviceIcon, @NonNull AutoFillUiCallback callback) {
+            @NonNull Drawable serviceIcon, @NonNull AutoFillUiCallback callback, boolean compatMode) {
         if (sDebug) {
             final int size = filterText == null ? 0 : filterText.length();
             Slog.d(TAG, "showFillUi(): id=" + focusedId + ", filter=" + size + " chars");
         }
-        final LogMaker log =
-                Helper.newLogMaker(MetricsEvent.AUTOFILL_FILL_UI, packageName, servicePackageName)
+        final LogMaker log = Helper
+                .newLogMaker(MetricsEvent.AUTOFILL_FILL_UI, packageName, servicePackageName,
+                        compatMode)
                 .addTaggedData(MetricsEvent.FIELD_AUTOFILL_FILTERTEXT_LEN,
                         filterText == null ? 0 : filterText.length())
                 .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_DATASETS,
@@ -262,14 +263,16 @@
     public void showSaveUi(@NonNull CharSequence serviceLabel, @NonNull Drawable serviceIcon,
             @Nullable String servicePackageName, @NonNull SaveInfo info,
             @NonNull ValueFinder valueFinder, @NonNull String packageName,
-            @NonNull AutoFillUiCallback callback, @NonNull PendingUi pendingSaveUi) {
+            @NonNull AutoFillUiCallback callback, @NonNull PendingUi pendingSaveUi,
+            boolean compatMode) {
         if (sVerbose) Slog.v(TAG, "showSaveUi() for " + packageName + ": " + info);
         int numIds = 0;
         numIds += info.getRequiredIds() == null ? 0 : info.getRequiredIds().length;
         numIds += info.getOptionalIds() == null ? 0 : info.getOptionalIds().length;
 
-        final LogMaker log =
-                Helper.newLogMaker(MetricsEvent.AUTOFILL_SAVE_UI, packageName, servicePackageName)
+        final LogMaker log = Helper
+                .newLogMaker(MetricsEvent.AUTOFILL_SAVE_UI, packageName, servicePackageName,
+                        compatMode)
                 .addTaggedData(MetricsEvent.FIELD_AUTOFILL_NUM_IDS, numIds);
 
         mHandler.post(() -> {
@@ -319,7 +322,7 @@
                     }
                     mMetricsLogger.write(log);
                 }
-            });
+            }, compatMode);
         });
     }
 
diff --git a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
index 80903c1..fa2a0d9 100644
--- a/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
+++ b/services/autofill/java/com/android/server/autofill/ui/SaveUi.java
@@ -60,6 +60,7 @@
 import com.android.internal.logging.MetricsLogger;
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.server.UiThread;
+import com.android.server.autofill.Helper;
 
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -134,6 +135,7 @@
     private final PendingUi mPendingUi;
     private final String mServicePackageName;
     private final String mPackageName;
+    private final boolean mCompatMode;
 
     private boolean mDestroyed;
 
@@ -141,12 +143,14 @@
            @NonNull CharSequence serviceLabel, @NonNull Drawable serviceIcon,
            @Nullable String servicePackageName, @NonNull String packageName,
            @NonNull SaveInfo info, @NonNull ValueFinder valueFinder,
-           @NonNull OverlayControl overlayControl, @NonNull OnSaveListener listener) {
+           @NonNull OverlayControl overlayControl, @NonNull OnSaveListener listener,
+           boolean compatMode) {
         mPendingUi= pendingUi;
         mListener = new OneTimeListener(listener);
         mOverlayControl = overlayControl;
         mServicePackageName = servicePackageName;
         mPackageName = packageName;
+        mCompatMode = compatMode;
 
         context = new ContextThemeWrapper(context, THEME_ID);
         final LayoutInflater inflater = LayoutInflater.from(context);
@@ -409,14 +413,12 @@
     }
 
     private LogMaker newLogMaker(int category, int saveType) {
-        return newLogMaker(category)
+        return Helper.newLogMaker(category, mPackageName, mServicePackageName, mCompatMode)
                 .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SAVE_TYPE, saveType);
     }
 
     private LogMaker newLogMaker(int category) {
-        return new LogMaker(category)
-                .setPackageName(mPackageName)
-                .addTaggedData(MetricsEvent.FIELD_AUTOFILL_SERVICE, mServicePackageName);
+        return Helper.newLogMaker(category, mPackageName, mServicePackageName, mCompatMode);
     }
 
     private void writeLog(int category, int saveType) {
@@ -505,6 +507,7 @@
         pw.print(prefix); pw.print("pendingUi: "); pw.println(mPendingUi);
         pw.print(prefix); pw.print("service: "); pw.println(mServicePackageName);
         pw.print(prefix); pw.print("app: "); pw.println(mPackageName);
+        pw.print(prefix); pw.print("compat mode: "); pw.println(mCompatMode);
 
         final View view = mDialog.getWindow().getDecorView();
         final int[] loc = view.getLocationOnScreen();
diff --git a/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java b/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
index 821cca1..44edabc 100644
--- a/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
+++ b/services/backup/java/com/android/server/backup/fullbackup/PerformAdbBackupTask.java
@@ -421,7 +421,7 @@
 
                 // after the app's agent runs to handle its private filesystem
                 // contents, back up any OBB content it has on its behalf.
-                if (mIncludeObbs) {
+                if (mIncludeObbs && !isSharedStorage) {
                     boolean obbOkay = obbConnection.backupObbs(pkg, out);
                     if (!obbOkay) {
                         throw new RuntimeException("Failure writing OBB stack for " + pkg);
diff --git a/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java b/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
index 90baea0..cc7304a 100644
--- a/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
+++ b/services/backup/java/com/android/server/backup/internal/PerformBackupTask.java
@@ -629,6 +629,8 @@
             mFullBackupTask.unregisterTask();
             switch (mStatus) {
                 case BackupTransport.TRANSPORT_OK:
+                case BackupTransport.TRANSPORT_QUOTA_EXCEEDED:
+                case BackupTransport.TRANSPORT_PACKAGE_REJECTED:
                     BackupObserverUtils.sendBackupFinished(mObserver,
                             BackupManager.SUCCESS);
                     break;
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index d818bd6..13503e6 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.java
@@ -48,6 +48,7 @@
 import android.util.AtomicFile;
 import android.util.Slog;
 import android.util.SparseArray;
+import android.util.SparseBooleanArray;
 import android.util.SparseIntArray;
 import android.util.TimeUtils;
 import android.util.Xml;
@@ -108,6 +109,9 @@
     // Write at most every 30 minutes.
     static final long WRITE_DELAY = DEBUG ? 1000 : 30*60*1000;
 
+    // How long we want for a drop in uid state to settle before applying it.
+    static final long STATE_SETTLE_TIME = 10*1000;
+
     // Constant meaning that any UID should be matched when dispatching callbacks
     private static final int UID_ANY = -2;
 
@@ -162,13 +166,6 @@
             "rc",       // UID_STATE_CACHED
     };
 
-    static final String[] MODE_NAMES = new String[] {
-            "allow",        // MODE_ALLOWED
-            "ignore",       // MODE_IGNORED
-            "deny",         // MODE_ERRORED
-            "default",      // MODE_DEFAULT
-    };
-
     Context mContext;
     final AtomicFile mFile;
     final Handler mHandler;
@@ -194,6 +191,8 @@
     @VisibleForTesting
     final SparseArray<UidState> mUidStates = new SparseArray<>();
 
+    long mLastUptime;
+
     /*
      * These are app op restrictions imposed per user from various parties.
      */
@@ -202,11 +201,17 @@
     @VisibleForTesting
     static final class UidState {
         public final int uid;
+
         public int state = UID_STATE_CACHED;
+        public int pendingState = UID_STATE_CACHED;
+        public long pendingStateCommitTime;
+
         public int startNesting;
         public ArrayMap<String, Ops> pkgOps;
         public SparseIntArray opModes;
 
+        public SparseBooleanArray foregroundOps;
+
         public UidState(int uid) {
             this.uid = uid;
         }
@@ -220,6 +225,32 @@
             return (pkgOps == null || pkgOps.isEmpty())
                     && (opModes == null || opModes.size() <= 0);
         }
+
+        int evalMode(int mode) {
+            if (mode == AppOpsManager.MODE_FOREGROUND) {
+                return state <= UID_STATE_FOREGROUND_SERVICE
+                        ? AppOpsManager.MODE_ALLOWED : AppOpsManager.MODE_IGNORED;
+            }
+            return mode;
+        }
+
+        public void evalForegroundOps() {
+            SparseBooleanArray which = null;
+            if (pkgOps != null) {
+                for (int i = pkgOps.size() - 1; i >= 0; i--) {
+                    Ops ops = pkgOps.valueAt(i);
+                    for (int j = ops.size() - 1; j >= 0; j--) {
+                        if (ops.valueAt(j).mode == AppOpsManager.MODE_FOREGROUND) {
+                            if (which == null) {
+                                which = new SparseBooleanArray();
+                            }
+                            which.put(ops.keyAt(j), true);
+                        }
+                    }
+                }
+            }
+            foregroundOps = which;
+        }
     }
 
     final static class Ops extends SparseArray<Op> {
@@ -267,6 +298,10 @@
             }
             return false;
         }
+
+        int getMode() {
+            return uidState.evalMode(mode);
+        }
     }
 
     final SparseArray<ArraySet<ModeCallback>> mOpModeWatchers = new SparseArray<>();
@@ -575,7 +610,16 @@
         synchronized (this) {
             final UidState uidState = getUidStateLocked(uid, true);
             final int newState = PROCESS_STATE_TO_UID_STATE[procState];
-            if (uidState != null && uidState.state != newState) {
+            if (uidState != null && uidState.pendingState != newState) {
+                if (newState < uidState.state) {
+                    // We are moving to a more important state, always do it immediately.
+                    uidState.state = newState;
+                    uidState.pendingStateCommitTime = 0;
+                } else if (uidState.pendingStateCommitTime == 0) {
+                    // We are moving to a less important state for the first time,
+                    // delay the application for a bit.
+                    uidState.pendingStateCommitTime = SystemClock.uptimeMillis() + STATE_SETTLE_TIME;
+                }
                 if (uidState.startNesting != 0) {
                     // There is some actively running operation...  need to find it
                     // and appropriately update its state.
@@ -585,13 +629,13 @@
                         for (int j = ops.size() - 1; j >= 0; j--) {
                             final Op op = ops.valueAt(j);
                             if (op.startNesting > 0) {
-                                op.time[uidState.state] = now;
+                                op.time[uidState.pendingState] = now;
                                 op.time[newState] = now;
                             }
                         }
                     }
                 }
-                uidState.state = newState;
+                uidState.pendingState = newState;
             }
         }
     }
@@ -887,6 +931,9 @@
             if (op != null) {
                 if (op.mode != mode) {
                     op.mode = mode;
+                    if (uidState != null) {
+                        uidState.evalForegroundOps();
+                    }
                     ArraySet<ModeCallback> cbs = mOpModeWatchers.get(code);
                     if (cbs != null) {
                         if (repCbs == null) {
@@ -1046,6 +1093,7 @@
 
                 Map<String, Ops> packages = uidState.pkgOps;
                 Iterator<Map.Entry<String, Ops>> it = packages.entrySet().iterator();
+                boolean uidChanged = false;
                 while (it.hasNext()) {
                     Map.Entry<String, Ops> ent = it.next();
                     String packageName = ent.getKey();
@@ -1060,6 +1108,7 @@
                                 && curOp.mode != AppOpsManager.opToDefaultMode(curOp.op)) {
                             curOp.mode = AppOpsManager.opToDefaultMode(curOp.op);
                             changed = true;
+                            uidChanged = true;
                             callbacks = addCallbacks(callbacks, curOp.op, curOp.uid, packageName,
                                     mOpModeWatchers.get(curOp.op));
                             callbacks = addCallbacks(callbacks, curOp.op, curOp.uid, packageName,
@@ -1076,6 +1125,9 @@
                 if (uidState.isDefault()) {
                     mUidStates.remove(uidState.uid);
                 }
+                if (uidChanged) {
+                    uidState.evalForegroundOps();
+                }
             }
 
             if (changed) {
@@ -1197,7 +1249,7 @@
             if (op == null) {
                 return AppOpsManager.opToDefaultMode(code);
             }
-            return op.mode;
+            return op.mode == AppOpsManager.MODE_FOREGROUND ? AppOpsManager.MODE_ALLOWED : op.mode;
         }
     }
 
@@ -1352,9 +1404,9 @@
             // If there is a non-default per UID policy (we set UID op mode only if
             // non-default) it takes over, otherwise use the per package policy.
             if (uidState.opModes != null && uidState.opModes.indexOfKey(switchCode) >= 0) {
-                final int uidMode = uidState.opModes.get(switchCode);
+                final int uidMode = uidState.evalMode(uidState.opModes.get(switchCode));
                 if (uidMode != AppOpsManager.MODE_ALLOWED) {
-                    if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + op.mode + " for code "
+                    if (DEBUG) Slog.d(TAG, "noteOperation: uid reject #" + uidMode + " for code "
                             + switchCode + " (" + code + ") uid " + uid + " package "
                             + packageName);
                     op.rejectTime[uidState.state] = System.currentTimeMillis();
@@ -1362,12 +1414,13 @@
                 }
             } else {
                 final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, true) : op;
-                if (switchOp.mode != AppOpsManager.MODE_ALLOWED) {
-                    if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + op.mode + " for code "
+                final int mode = switchOp.getMode();
+                if (mode != AppOpsManager.MODE_ALLOWED) {
+                    if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + mode + " for code "
                             + switchCode + " (" + code + ") uid " + uid + " package "
                             + packageName);
                     op.rejectTime[uidState.state] = System.currentTimeMillis();
-                    return switchOp.mode;
+                    return mode;
                 }
             }
             if (DEBUG) Slog.d(TAG, "noteOperation: allowing code " + code + " uid " + uid
@@ -1458,10 +1511,10 @@
             // If there is a non-default per UID policy (we set UID op mode only if
             // non-default) it takes over, otherwise use the per package policy.
             if (uidState.opModes != null && uidState.opModes.indexOfKey(switchCode) >= 0) {
-                final int uidMode = uidState.opModes.get(switchCode);
+                final int uidMode = uidState.evalMode(uidState.opModes.get(switchCode));
                 if (uidMode != AppOpsManager.MODE_ALLOWED
                         && (!startIfModeDefault || uidMode != AppOpsManager.MODE_DEFAULT)) {
-                    if (DEBUG) Slog.d(TAG, "noteOperation: reject #" + op.mode + " for code "
+                    if (DEBUG) Slog.d(TAG, "noteOperation: uid reject #" + uidMode + " for code "
                             + switchCode + " (" + code + ") uid " + uid + " package "
                             + resolvedPackageName);
                     op.rejectTime[uidState.state] = System.currentTimeMillis();
@@ -1469,13 +1522,14 @@
                 }
             } else {
                 final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, true) : op;
-                if (switchOp.mode != AppOpsManager.MODE_ALLOWED
-                        && (!startIfModeDefault || switchOp.mode != AppOpsManager.MODE_DEFAULT)) {
-                    if (DEBUG) Slog.d(TAG, "startOperation: reject #" + op.mode + " for code "
+                final int mode = switchOp.getMode();
+                if (mode != AppOpsManager.MODE_ALLOWED
+                        && (!startIfModeDefault || mode != AppOpsManager.MODE_DEFAULT)) {
+                    if (DEBUG) Slog.d(TAG, "startOperation: reject #" + mode + " for code "
                             + switchCode + " (" + code + ") uid " + uid + " package "
                             + resolvedPackageName);
                     op.rejectTime[uidState.state] = System.currentTimeMillis();
-                    return switchOp.mode;
+                    return mode;
                 }
             }
             if (DEBUG) Slog.d(TAG, "startOperation: allowing code " + code + " uid " + uid
@@ -1642,6 +1696,19 @@
             }
             uidState = new UidState(uid);
             mUidStates.put(uid, uidState);
+        } else {
+            if (uidState.pendingStateCommitTime != 0) {
+                if (uidState.pendingStateCommitTime < mLastUptime) {
+                    uidState.state = uidState.pendingState;
+                    uidState.pendingStateCommitTime = 0;
+                } else {
+                    mLastUptime = SystemClock.uptimeMillis();
+                    if (uidState.pendingStateCommitTime < mLastUptime) {
+                        uidState.state = uidState.pendingState;
+                        uidState.pendingStateCommitTime = 0;
+                    }
+                }
+            }
         }
         return uidState;
     }
@@ -1870,6 +1937,7 @@
             if (uidState.pkgOps == null) {
                 continue;
             }
+            boolean changed = false;
             for (int j = 0; j < uidState.pkgOps.size(); j++) {
                 Ops ops = uidState.pkgOps.valueAt(j);
                 if (ops != null) {
@@ -1879,9 +1947,13 @@
                                 AppOpsManager.OP_RUN_ANY_IN_BACKGROUND);
                         copy.mode = op.mode;
                         ops.put(AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, copy);
+                        changed = true;
                     }
                 }
             }
+            if (changed) {
+                uidState.evalForegroundOps();
+            }
         }
     }
 
@@ -2077,6 +2149,10 @@
                 XmlUtils.skipCurrentTag(parser);
             }
         }
+        UidState uidState = getUidStateLocked(uid, false);
+        if (uidState != null) {
+            uidState.evalForegroundOps();
+        }
     }
 
     void writeState() {
@@ -2152,12 +2228,12 @@
                                 out.attribute(null, "m", Integer.toString(op.getMode()));
                             }
                             for (int k = 0; k < _NUM_UID_STATE; k++) {
-                                final long time = op.getTimeFor(k);
+                                final long time = op.getLastTimeFor(k);
                                 if (time != 0) {
                                     out.attribute(null, UID_STATE_TIME_ATTRS[k],
                                             Long.toString(time));
                                 }
-                                final long rejectTime = op.getRejectTimeFor(k);
+                                final long rejectTime = op.getLastRejectTimeFor(k);
                                 if (rejectTime != 0) {
                                     out.attribute(null, UID_STATE_REJECT_ATTRS[k],
                                             Long.toString(rejectTime));
@@ -2229,7 +2305,7 @@
             dumpCommandHelp(pw);
         }
 
-        private int strOpToOp(String op, PrintWriter err) {
+        static private int strOpToOp(String op, PrintWriter err) {
             try {
                 return AppOpsManager.strOpToOp(op);
             } catch (IllegalArgumentException e) {
@@ -2247,8 +2323,8 @@
         }
 
         int strModeToMode(String modeStr, PrintWriter err) {
-            for (int i = MODE_NAMES.length - 1; i >= 0; i--) {
-                if (MODE_NAMES[i].equals(modeStr)) {
+            for (int i = AppOpsManager.MODE_NAMES.length - 1; i >= 0; i--) {
+                if (AppOpsManager.MODE_NAMES[i].equals(modeStr)) {
                     return i;
                 }
             }
@@ -2470,7 +2546,7 @@
                     if (ops == null || ops.size() <= 0) {
                         pw.println("No operations.");
                         if (shell.op > AppOpsManager.OP_NONE && shell.op < AppOpsManager._NUM_OP) {
-                            pw.println("Default mode: " + AppOpsManager.modeToString(
+                            pw.println("Default mode: " + AppOpsManager.modeToName(
                                     AppOpsManager.opToDefaultMode(shell.op)));
                         }
                         return 0;
@@ -2482,7 +2558,7 @@
                             AppOpsManager.OpEntry ent = entries.get(j);
                             pw.print(AppOpsManager.opToName(ent.getOp()));
                             pw.print(": ");
-                            pw.print(AppOpsManager.modeToString(ent.getMode()));
+                            pw.print(AppOpsManager.modeToName(ent.getMode()));
                             if (ent.getTime() != 0) {
                                 pw.print("; time=");
                                 TimeUtils.formatDuration(now - ent.getTime(), pw);
@@ -2636,7 +2712,10 @@
 
     private void dumpHelp(PrintWriter pw) {
         pw.println("AppOps service (appops) dump options:");
-        pw.println("  none");
+        pw.println("  -h");
+        pw.println("    Print this help text.");
+        pw.println("  --op [OP]");
+        pw.println("    Limit output to data associated with the given app op code.");
     }
 
     private void dumpTimesLocked(PrintWriter pw, String firstPrefix, String prefix, long[] times,
@@ -2671,6 +2750,8 @@
     protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
         if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw)) return;
 
+        int dumpOp = -1;
+
         if (args != null) {
             for (int i=0; i<args.length; i++) {
                 String arg = args[i];
@@ -2679,6 +2760,16 @@
                     return;
                 } else if ("-a".equals(arg)) {
                     // dump all data
+                } else if ("--op".equals(arg)) {
+                    i++;
+                    if (i >= args.length) {
+                        pw.println("No argument for --op option");
+                        return;
+                    }
+                    dumpOp = Shell.strOpToOp(args[i], pw);
+                    if (dumpOp < 0) {
+                        return;
+                    }
                 } else if (arg.length() > 0 && arg.charAt(0) == '-'){
                     pw.println("Unknown option: " + arg);
                     return;
@@ -2693,13 +2784,21 @@
             pw.println("Current AppOps Service state:");
             final long now = System.currentTimeMillis();
             final long nowElapsed = SystemClock.elapsedRealtime();
+            final long nowUptime = SystemClock.uptimeMillis();
             final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
             final Date date = new Date();
             boolean needSep = false;
             if (mOpModeWatchers.size() > 0) {
                 needSep = true;
-                pw.println("  Op mode watchers:");
+                boolean printedHeader = false;
                 for (int i=0; i<mOpModeWatchers.size(); i++) {
+                    if (dumpOp >= 0 && dumpOp != mOpModeWatchers.keyAt(i)) {
+                        continue;
+                    }
+                    if (!printedHeader) {
+                        pw.println("  Op mode watchers:");
+                        printedHeader = true;
+                    }
                     pw.print("    Op "); pw.print(AppOpsManager.opToName(mOpModeWatchers.keyAt(i)));
                     pw.println(":");
                     ArraySet<ModeCallback> callbacks = mOpModeWatchers.valueAt(i);
@@ -2722,7 +2821,7 @@
                     }
                 }
             }
-            if (mModeWatchers.size() > 0) {
+            if (mModeWatchers.size() > 0 && dumpOp < 0) {
                 needSep = true;
                 pw.println("  All op mode watchers:");
                 for (int i=0; i<mModeWatchers.size(); i++) {
@@ -2733,12 +2832,19 @@
             }
             if (mActiveWatchers.size() > 0) {
                 needSep = true;
-                pw.println("  All op active watchers:");
+                boolean printedHeader = false;
                 for (int i = 0; i < mActiveWatchers.size(); i++) {
                     final SparseArray<ActiveCallback> activeWatchers = mActiveWatchers.valueAt(i);
                     if (activeWatchers.size() <= 0) {
                         continue;
                     }
+                    if (dumpOp >= 0 && activeWatchers.indexOfKey(dumpOp) < 0) {
+                        continue;
+                    }
+                    if (!printedHeader) {
+                        pw.println("  All op active watchers:");
+                        printedHeader = true;
+                    }
                     pw.print("    ");
                     pw.print(Integer.toHexString(System.identityHashCode(
                             mActiveWatchers.keyAt(i))));
@@ -2746,6 +2852,9 @@
                     pw.print("        [");
                     final int opCount = activeWatchers.size();
                     for (i = 0; i < opCount; i++) {
+                        if (i > 0) {
+                            pw.print(' ');
+                        }
                         pw.print(AppOpsManager.opToName(activeWatchers.keyAt(i)));
                         if (i < opCount - 1) {
                             pw.print(',');
@@ -2758,15 +2867,30 @@
             }
             if (mClients.size() > 0) {
                 needSep = true;
-                pw.println("  Clients:");
+                boolean printedHeader = false;
                 for (int i=0; i<mClients.size(); i++) {
-                    pw.print("    "); pw.print(mClients.keyAt(i)); pw.println(":");
+                    boolean printedClient = false;
                     ClientState cs = mClients.valueAt(i);
-                    pw.print("      "); pw.println(cs);
                     if (cs.mStartedOps.size() > 0) {
-                        pw.println("      Started ops:");
+                        boolean printedStarted = false;
                         for (int j=0; j<cs.mStartedOps.size(); j++) {
                             Op op = cs.mStartedOps.get(j);
+                            if (dumpOp >= 0 && op.op != dumpOp) {
+                                continue;
+                            }
+                            if (!printedHeader) {
+                                pw.println("  Clients:");
+                                printedHeader = true;
+                            }
+                            if (!printedClient) {
+                                pw.print("    "); pw.print(mClients.keyAt(i)); pw.println(":");
+                                pw.print("      "); pw.println(cs);
+                                printedClient = true;
+                            }
+                            if (!printedStarted) {
+                                pw.println("      Started ops:");
+                                printedStarted = true;
+                            }
                             pw.print("        "); pw.print("uid="); pw.print(op.uid);
                             pw.print(" pkg="); pw.print(op.packageName);
                             pw.print(" op="); pw.println(AppOpsManager.opToName(op.op));
@@ -2774,7 +2898,7 @@
                     }
                 }
             }
-            if (mAudioRestrictions.size() > 0) {
+            if (mAudioRestrictions.size() > 0 && dumpOp < 0) {
                 boolean printedHeader = false;
                 for (int o=0; o<mAudioRestrictions.size(); o++) {
                     final String op = AppOpsManager.opToName(mAudioRestrictions.keyAt(o));
@@ -2789,7 +2913,7 @@
                         pw.print("    "); pw.print(op);
                         pw.print(" usage="); pw.print(AudioAttributes.usageToString(usage));
                         Restriction r = restrictions.valueAt(i);
-                        pw.print(": mode="); pw.println(MODE_NAMES[r.mode]);
+                        pw.print(": mode="); pw.println(AppOpsManager.modeToName(r.mode));
                         if (!r.exceptionPackages.isEmpty()) {
                             pw.println("      Exceptions:");
                             for (int j=0; j<r.exceptionPackages.size(); j++) {
@@ -2804,38 +2928,83 @@
             }
             for (int i=0; i<mUidStates.size(); i++) {
                 UidState uidState = mUidStates.valueAt(i);
+                final SparseIntArray opModes = uidState.opModes;
+                final ArrayMap<String, Ops> pkgOps = uidState.pkgOps;
+
+                if (dumpOp >= 0) {
+                    boolean hasOp = uidState.opModes != null
+                            && uidState.opModes.indexOfKey(dumpOp) >= 0;
+                    if (pkgOps != null) {
+                        for (int pkgi = 0; !hasOp && pkgi < pkgOps.size(); pkgi++) {
+                            Ops ops = pkgOps.valueAt(pkgi);
+                            if (ops != null && ops.indexOfKey(dumpOp) >= 0) {
+                                hasOp = true;
+                                continue;
+                            }
+                        }
+                    }
+                    if (!hasOp) {
+                        continue;
+                    }
+                }
 
                 pw.print("  Uid "); UserHandle.formatUid(pw, uidState.uid); pw.println(":");
                 pw.print("    state=");
                 pw.println(UID_STATE_NAMES[uidState.state]);
+                if (uidState.state != uidState.pendingState) {
+                    pw.print("    pendingState=");
+                    pw.println(UID_STATE_NAMES[uidState.pendingState]);
+                }
+                if (uidState.pendingStateCommitTime != 0) {
+                    pw.print("    pendingStateCommitTime=");
+                    TimeUtils.formatDuration(uidState.pendingStateCommitTime, nowUptime, pw);
+                    pw.println();
+                }
                 if (uidState.startNesting != 0) {
                     pw.print("    startNesting=");
                     pw.println(uidState.startNesting);
                 }
+                if (uidState.foregroundOps != null) {
+                    pw.println("    foregroundOps:");
+                    for (int j = 0; j < uidState.foregroundOps.size(); j++) {
+                        pw.print("    ");
+                        pw.println(AppOpsManager.opToName(uidState.foregroundOps.keyAt(j)));
+                    }
+                }
                 needSep = true;
 
-                SparseIntArray opModes = uidState.opModes;
                 if (opModes != null) {
                     final int opModeCount = opModes.size();
                     for (int j = 0; j < opModeCount; j++) {
                         final int code = opModes.keyAt(j);
                         final int mode = opModes.valueAt(j);
+                        if (dumpOp >= 0 && dumpOp != code) {
+                            continue;
+                        }
                         pw.print("      "); pw.print(AppOpsManager.opToName(code));
-                        pw.print(": mode="); pw.println(MODE_NAMES[mode]);
+                        pw.print(": mode="); pw.println(AppOpsManager.modeToName(mode));
                     }
                 }
 
-                ArrayMap<String, Ops> pkgOps = uidState.pkgOps;
                 if (pkgOps == null) {
                     continue;
                 }
 
-                for (Ops ops : pkgOps.values()) {
-                    pw.print("    Package "); pw.print(ops.packageName); pw.println(":");
+                for (int pkgi = 0; pkgi < pkgOps.size(); pkgi++) {
+                    Ops ops = pkgOps.valueAt(pkgi);
+                    boolean printedPackage = false;
                     for (int j=0; j<ops.size(); j++) {
                         Op op = ops.valueAt(j);
+                        if (dumpOp >= 0 && dumpOp != op.op) {
+                            continue;
+                        }
+                        if (!printedPackage) {
+                            pw.print("    Package "); pw.print(ops.packageName); pw.println(":");
+                            printedPackage = true;
+                        }
                         pw.print("      "); pw.print(AppOpsManager.opToName(op.op));
-                        pw.print(" ("); pw.print(MODE_NAMES[op.mode]); pw.println("): ");
+                        pw.print(" ("); pw.print(AppOpsManager.modeToName(op.mode));
+                        pw.println("): ");
                         dumpTimesLocked(pw,
                                 "          Access: ",
                                 "                  ", op.time, now, sdf, date);
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 99944625..72f9d74 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -132,6 +132,7 @@
 import com.android.internal.net.VpnConfig;
 import com.android.internal.net.VpnInfo;
 import com.android.internal.net.VpnProfile;
+import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.AsyncChannel;
 import com.android.internal.util.DumpUtils;
 import com.android.internal.util.IndentingPrintWriter;
@@ -1992,13 +1993,6 @@
         return ret;
     }
 
-    private boolean argsContain(String[] args, String target) {
-        for (String arg : args) {
-            if (target.equals(arg)) return true;
-        }
-        return false;
-    }
-
     private void dumpNetworkDiagnostics(IndentingPrintWriter pw) {
         final List<NetworkDiagnostics> netDiags = new ArrayList<NetworkDiagnostics>();
         final long DIAG_TIME_MS = 5000;
@@ -2027,10 +2021,10 @@
         if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
         if (asProto) return;
 
-        if (argsContain(args, DIAG_ARG)) {
+        if (ArrayUtils.contains(args, DIAG_ARG)) {
             dumpNetworkDiagnostics(pw);
             return;
-        } else if (argsContain(args, TETHERING_ARG)) {
+        } else if (ArrayUtils.contains(args, TETHERING_ARG)) {
             mTethering.dump(fd, pw, args);
             return;
         }
@@ -2098,7 +2092,7 @@
         pw.println();
         mMultipathPolicyTracker.dump(pw);
 
-        if (argsContain(args, SHORT_ARG) == false) {
+        if (ArrayUtils.contains(args, SHORT_ARG) == false) {
             pw.println();
             synchronized (mValidationLogs) {
                 pw.println("mValidationLogs (most recent first):");
diff --git a/services/core/java/com/android/server/EventLogTags.logtags b/services/core/java/com/android/server/EventLogTags.logtags
index 2465ba2..d869734 100644
--- a/services/core/java/com/android/server/EventLogTags.logtags
+++ b/services/core/java/com/android/server/EventLogTags.logtags
@@ -33,10 +33,11 @@
 # It logs the time remaining before the device would've normally gone to sleep without the request.
 2731 power_soft_sleep_requested (savedwaketimems|2)
 # Power save state has changed. See BatterySaverController.java for the details.
-2739 battery_saver_mode (prevOffOrOn|1|5),(nowOffOrOn|1|5),(interactive|1|5),(features|3|5)
+2739 battery_saver_mode (prevOffOrOn|1|5),(nowOffOrOn|1|5),(interactive|1|5),(features|3|5),(reason|1|5)
 27390 battery_saving_stats (batterySaver|1|5),(interactive|1|5),(doze|1|5),(delta_duration|2|3),(delta_battery_drain|1|1),(delta_battery_drain_percent|1|6),(total_duration|2|3),(total_battery_drain|1|1),(total_battery_drain_percent|1|6)
 # Note when the user activity timeout has been overriden by ActivityManagerService
 27391 user_activity_timeout_override (override|2|3)
+27392 battery_saver_setting (threshold|1)
 
 #
 # Leave IDs through 2740 for more power logs (2730 used by battery_discharge above)
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index 6c35bda..00302b2 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -2541,11 +2541,6 @@
         synchronized (mLock) {
             mLocalUnlockedUsers = ArrayUtils.appendInt(mLocalUnlockedUsers, userId);
         }
-        if (userId == UserHandle.USER_SYSTEM) {
-            String propertyName = "sys.user." + userId + ".ce_available";
-            Slog.d(TAG, "Setting property: " + propertyName + "=true");
-            SystemProperties.set(propertyName, "true");
-        }
     }
 
     @Override
@@ -2685,7 +2680,8 @@
         }
 
         // Ignore requests to create directories if CE storage is not available
-        if (!SystemProperties.getBoolean(propertyName, false)) {
+        if ((userId == UserHandle.USER_SYSTEM)
+                && !SystemProperties.getBoolean(propertyName, false)) {
             throw new IllegalStateException("Failed to prepare " + appPath);
         }
 
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 41f413d..607db4e 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -117,10 +117,10 @@
             return (onSubscriptionsChangedListenerCallback != null);
         }
 
-        boolean canReadPhoneState() {
+        boolean canReadCallLog() {
             try {
-                return TelephonyPermissions.checkReadPhoneState(
-                        context, subId, callerPid, callerUid, callingPackage, "listen");
+                return TelephonyPermissions.checkReadCallLog(
+                        context, subId, callerPid, callerUid, callingPackage);
             } catch (SecurityException e) {
                 return false;
             }
@@ -667,8 +667,8 @@
     }
 
     private String getCallIncomingNumber(Record record, int phoneId) {
-        // Hide the number if record's process can't currently read phone state.
-        return record.canReadPhoneState() ? mCallIncomingNumber[phoneId] : "";
+        // Only reveal the incoming number if the record has read call log permission.
+        return record.canReadCallLog() ? mCallIncomingNumber[phoneId] : "";
     }
 
     private Record add(IBinder binder) {
@@ -729,13 +729,13 @@
         }
     }
 
-    public void notifyCallState(int state, String incomingNumber) {
+    public void notifyCallState(int state, String phoneNumber) {
         if (!checkNotifyPermission("notifyCallState()")) {
             return;
         }
 
         if (VDBG) {
-            log("notifyCallState: state=" + state + " incomingNumber=" + incomingNumber);
+            log("notifyCallState: state=" + state + " phoneNumber=" + phoneNumber);
         }
 
         synchronized (mRecords) {
@@ -743,8 +743,10 @@
                 if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_CALL_STATE) &&
                         (r.subId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID)) {
                     try {
-                        String incomingNumberOrEmpty = r.canReadPhoneState() ? incomingNumber : "";
-                        r.callback.onCallStateChanged(state, incomingNumberOrEmpty);
+                        // Ensure the listener has read call log permission; if they do not return
+                        // an empty phone number.
+                        String phoneNumberOrEmpty = r.canReadCallLog() ? phoneNumber : "";
+                        r.callback.onCallStateChanged(state, phoneNumberOrEmpty);
                     } catch (RemoteException ex) {
                         mRemoveList.add(r.binder);
                     }
@@ -755,7 +757,7 @@
 
         // Called only by Telecomm to communicate call state across different phone accounts. So
         // there is no need to add a valid subId or slotId.
-        broadcastCallStateChanged(state, incomingNumber,
+        broadcastCallStateChanged(state, phoneNumber,
                 SubscriptionManager.INVALID_PHONE_INDEX,
                 SubscriptionManager.INVALID_SUBSCRIPTION_ID);
     }
@@ -1571,9 +1573,6 @@
         Intent intent = new Intent(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
         intent.putExtra(PhoneConstants.STATE_KEY,
                 PhoneConstantConversions.convertCallState(state).toString());
-        if (!TextUtils.isEmpty(incomingNumber)) {
-            intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, incomingNumber);
-        }
 
         // If a valid subId was specified, we should fire off a subId-specific state
         // change intent and include the subId.
@@ -1589,13 +1588,20 @@
         // Wakeup apps for the (SUBSCRIPTION_)PHONE_STATE broadcast.
         intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
 
+        Intent intentWithPhoneNumber = new Intent(intent);
+        if (!TextUtils.isEmpty(incomingNumber)) {
+            intentWithPhoneNumber.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, incomingNumber);
+        }
         // Send broadcast twice, once for apps that have PRIVILEGED permission and once for those
         // that have the runtime one
-        mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
+        mContext.sendBroadcastAsUser(intentWithPhoneNumber, UserHandle.ALL,
                 android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
         mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
                 android.Manifest.permission.READ_PHONE_STATE,
                 AppOpsManager.OP_READ_PHONE_STATE);
+        mContext.sendBroadcastAsUserMultiplePermissions(intentWithPhoneNumber, UserHandle.ALL,
+                new String[] { android.Manifest.permission.READ_PHONE_STATE,
+                        android.Manifest.permission.READ_CALL_LOG});
     }
 
     private void broadcastDataConnectionStateChanged(int state,
diff --git a/services/core/java/com/android/server/TextServicesManagerService.java b/services/core/java/com/android/server/TextServicesManagerService.java
index 26a8cf7..f24d8cd 100644
--- a/services/core/java/com/android/server/TextServicesManagerService.java
+++ b/services/core/java/com/android/server/TextServicesManagerService.java
@@ -71,6 +71,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+import java.util.function.Predicate;
 
 public class TextServicesManagerService extends ITextServicesManager.Stub {
     private static final String TAG = TextServicesManagerService.class.getSimpleName();
@@ -396,10 +397,7 @@
                     final String packageName = sci.getPackageName();
                     final int change = isPackageDisappearing(packageName);
                     if (DBG) Slog.d(TAG, "Changing package name: " + packageName);
-                    if (// Package disappearing
-                            change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE
-                                    // Package modified
-                                    || isPackageModified(packageName)) {
+                    if (change == PACKAGE_PERMANENT_CHANGE || change == PACKAGE_TEMPORARY_CHANGE) {
                         SpellCheckerInfo availSci =
                                 findAvailSystemSpellCheckerLocked(packageName, tsd);
                         // Set the spell checker settings if different than before
@@ -885,6 +883,11 @@
             }
             synchronized (mLock) {
                 mListeners.unregister(listener);
+                final IBinder scListenerBinder = listener.asBinder();
+                final Predicate<SessionRequest> removeCondition =
+                        request -> request.mScListener.asBinder() == scListenerBinder;
+                mPendingSessionRequests.removeIf(removeCondition);
+                mOnGoingSessionRequests.removeIf(removeCondition);
                 cleanLocked();
             }
         }
@@ -934,6 +937,7 @@
             if (mUnbindCalled) {
                 return;
             }
+            mListeners.register(request.mScListener);
             if (!mConnected) {
                 mPendingSessionRequests.add(request);
                 return;
@@ -959,7 +963,6 @@
                 if (mOnGoingSessionRequests.remove(request)) {
                     try {
                         request.mTsListener.onServiceConnected(newSession);
-                        mListeners.register(request.mScListener);
                     } catch (RemoteException e) {
                         // Technically this can happen if the spell checker client app is already
                         // dead.  We can just forget about this request; the request is already
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index 2e258c1..f749fe7 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -92,6 +92,7 @@
 
     public static final List<String> HAL_INTERFACES_OF_INTEREST = Arrays.asList(
         "android.hardware.audio@2.0::IDevicesFactory",
+        "android.hardware.audio@4.0::IDevicesFactory",
         "android.hardware.bluetooth@1.0::IBluetoothHci",
         "android.hardware.camera.provider@2.4::ICameraProvider",
         "android.hardware.graphics.composer@2.1::IComposer",
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index f413639..b32ece7 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -108,6 +108,8 @@
 
     private static final boolean LOG_SERVICE_START_STOP = false;
 
+    private static final boolean SHOW_DUNGEON_NOTIFICATION = false;
+
     // How long we wait for a service to finish executing.
     static final int SERVICE_TIMEOUT = 20*1000;
 
@@ -942,6 +944,10 @@
             smap.mActiveForegroundAppsChanged = false;
         }
 
+        if (!SHOW_DUNGEON_NOTIFICATION) {
+            return;
+        }
+
         final NotificationManager nm = (NotificationManager) mAm.mContext.getSystemService(
                 Context.NOTIFICATION_SERVICE);
         final Context context = mAm.mContext;
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index 193d3f4..a8e63f6 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -5049,9 +5049,20 @@
     public final int startActivityAsUser(IApplicationThread caller, String callingPackage,
             Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
             int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId) {
+        return startActivityAsUser(caller, callingPackage, intent, resolvedType, resultTo,
+                resultWho, requestCode, startFlags, profilerInfo, bOptions, userId,
+                true /*validateIncomingUser*/);
+    }
+
+    public final int startActivityAsUser(IApplicationThread caller, String callingPackage,
+            Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
+            int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId,
+            boolean validateIncomingUser) {
         enforceNotIsolatedCaller("startActivity");
-        userId = mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
-                userId, false, ALLOW_FULL_ONLY, "startActivity", null);
+
+        userId = mActivityStartController.checkTargetUser(userId, validateIncomingUser,
+                Binder.getCallingPid(), Binder.getCallingUid(), "startActivityAsUser");
+
         // TODO: Switch to user app stacks here.
         return mActivityStartController.obtainStarter(intent, "startActivityAsUser")
                 .setCaller(caller)
@@ -26344,6 +26355,16 @@
         }
 
         @Override
+        public int startActivityAsUser(IApplicationThread caller, String callerPacakge,
+                Intent intent, Bundle options, int userId) {
+            return ActivityManagerService.this.startActivityAsUser(
+                    caller, callerPacakge, intent,
+                    intent.resolveTypeIfNeeded(mContext.getContentResolver()),
+                    null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, options, userId,
+                    false /*validateIncomingUser*/);
+        }
+
+        @Override
         public int getUidProcessState(int uid) {
             return getUidState(uid);
         }
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 16c5969..e73f42f 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -1626,6 +1626,10 @@
         if (parent != null) {
             parent.onActivityStateChanged(this, state, reason);
         }
+
+        if (state == STOPPING) {
+            mWindowContainerController.notifyAppStopping();
+        }
     }
 
     ActivityState getState() {
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index e86850e..a85df03 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -17,6 +17,7 @@
 package com.android.server.am;
 
 import static android.app.ITaskStackListener.FORCED_RESIZEABLE_REASON_SPLIT_SCREEN;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
@@ -1784,6 +1785,14 @@
             final int otherWindowingMode = other.getWindowingMode();
 
             if (otherWindowingMode == WINDOWING_MODE_FULLSCREEN) {
+                // In this case the home stack isn't resizeable even though we are in split-screen
+                // mode. We still want the primary splitscreen stack to be visible as there will be
+                // a slight hint of it in the status bar area above the non-resizeable home
+                // activity.
+                if (windowingMode == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY
+                        && other.getActivityType() == ACTIVITY_TYPE_HOME) {
+                    return true;
+                }
                 if (other.isStackTranslucent(starting)) {
                     // Can be visible behind a translucent fullscreen stack.
                     continue;
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index b1ca64e..4ace689 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -1315,10 +1315,6 @@
         return aInfo;
     }
 
-    ResolveInfo resolveIntent(Intent intent, String resolvedType, int userId) {
-        return resolveIntent(intent, resolvedType, userId, 0, Binder.getCallingUid());
-    }
-
     ResolveInfo resolveIntent(Intent intent, String resolvedType, int userId, int flags,
             int filterCallingUid) {
         synchronized (mService) {
@@ -1330,9 +1326,19 @@
                             || (intent.getFlags() & Intent.FLAG_ACTIVITY_MATCH_EXTERNAL) != 0) {
                     modifiedFlags |= PackageManager.MATCH_INSTANT;
                 }
-                return mService.getPackageManagerInternalLocked().resolveIntent(
-                        intent, resolvedType, modifiedFlags, userId, true, filterCallingUid);
 
+                // In order to allow cross-profile lookup, we clear the calling identity here.
+                // Note the binder identity won't affect the result, but filterCallingUid will.
+
+                // Cross-user/profile call check are done at the entry points
+                // (e.g. AMS.startActivityAsUser).
+                final long token = Binder.clearCallingIdentity();
+                try {
+                    return mService.getPackageManagerInternalLocked().resolveIntent(
+                            intent, resolvedType, modifiedFlags, userId, true, filterCallingUid);
+                } finally {
+                    Binder.restoreCallingIdentity(token);
+                }
             } finally {
                 Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);
             }
@@ -2409,6 +2415,16 @@
                 if (stack.isCompatible(windowingMode, activityType)) {
                     return stack;
                 }
+                if (windowingMode == WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY
+                        && display.getSplitScreenPrimaryStack() == stack
+                        && candidateTask == stack.topTask()) {
+                    // This is a special case when we try to launch an activity that is currently on
+                    // top of split-screen primary stack, but is targeting split-screen secondary.
+                    // In this case we don't want to move it to another stack.
+                    // TODO(b/78788972): Remove after differentiating between preferred and required
+                    // launch options.
+                    return stack;
+                }
             }
         }
 
diff --git a/services/core/java/com/android/server/am/ActivityStartController.java b/services/core/java/com/android/server/am/ActivityStartController.java
index 31ccf35..5e29d10 100644
--- a/services/core/java/com/android/server/am/ActivityStartController.java
+++ b/services/core/java/com/android/server/am/ActivityStartController.java
@@ -233,7 +233,7 @@
      * ensures {@code targetUserId} is a real user ID and not a special user ID such as
      * {@link android.os.UserHandle#USER_ALL}, etc.
      */
-    private int checkTargetUser(int targetUserId, boolean validateIncomingUser,
+    int checkTargetUser(int targetUserId, boolean validateIncomingUser,
             int realCallingPid, int realCallingUid, String reason) {
         if (validateIncomingUser) {
             return mService.mUserController.handleIncomingUser(realCallingPid, realCallingUid,
diff --git a/services/core/java/com/android/server/am/ActivityStartInterceptor.java b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
index 5b6b508..8c3ff34 100644
--- a/services/core/java/com/android/server/am/ActivityStartInterceptor.java
+++ b/services/core/java/com/android/server/am/ActivityStartInterceptor.java
@@ -203,7 +203,7 @@
         mResolvedType = null;
 
         final UserInfo parent = mUserManager.getProfileParent(mUserId);
-        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id);
+        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id, 0, mRealCallingUid);
         mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
         return true;
     }
@@ -223,9 +223,11 @@
 
         final UserInfo parent = mUserManager.getProfileParent(mUserId);
         if (parent != null) {
-            mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id);
+            mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id, 0,
+                    mRealCallingUid);
         } else {
-            mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId);
+            mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId, 0,
+                    mRealCallingUid);
         }
         mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
         return true;
@@ -244,7 +246,8 @@
         final Intent moreDetailsIntent = new Intent(Intent.ACTION_SHOW_SUSPENDED_APP_DETAILS)
                 .setPackage(suspendingPackage);
         final String requiredPermission = Manifest.permission.SEND_SHOW_SUSPENDED_APP_DETAILS;
-        final ResolveInfo resolvedInfo = mSupervisor.resolveIntent(moreDetailsIntent, null, userId);
+        final ResolveInfo resolvedInfo = mSupervisor.resolveIntent(moreDetailsIntent, null, userId,
+                0, mRealCallingUid);
         if (resolvedInfo != null && resolvedInfo.activityInfo != null
                 && requiredPermission.equals(resolvedInfo.activityInfo.permission)) {
             moreDetailsIntent.putExtra(Intent.EXTRA_PACKAGE_NAME, suspendedPackage)
@@ -276,7 +279,7 @@
         mCallingPid = mRealCallingPid;
         mCallingUid = mRealCallingUid;
         mResolvedType = null;
-        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, 0);
+        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId, 0, mRealCallingUid);
         mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
         return true;
     }
@@ -309,7 +312,7 @@
         }
 
         final UserInfo parent = mUserManager.getProfileParent(mUserId);
-        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id);
+        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, parent.id, 0, mRealCallingUid);
         mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
         return true;
     }
@@ -362,7 +365,7 @@
         mCallingUid = mRealCallingUid;
         mResolvedType = null;
 
-        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId);
+        mRInfo = mSupervisor.resolveIntent(mIntent, mResolvedType, mUserId, 0, mRealCallingUid);
         mAInfo = mSupervisor.resolveActivity(mIntent, mRInfo, mStartFlags, null /*profilerInfo*/);
         return true;
     }
diff --git a/services/core/java/com/android/server/am/ActivityStarter.java b/services/core/java/com/android/server/am/ActivityStarter.java
index 7ff7d9a..fb4107c 100644
--- a/services/core/java/com/android/server/am/ActivityStarter.java
+++ b/services/core/java/com/android/server/am/ActivityStarter.java
@@ -791,7 +791,7 @@
                 callingUid = realCallingUid;
                 callingPid = realCallingPid;
 
-                rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId);
+                rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId, 0, realCallingUid);
                 aInfo = mSupervisor.resolveActivity(intent, rInfo, startFlags,
                         null /*profilerInfo*/);
 
@@ -952,6 +952,9 @@
         mSupervisor.getActivityMetricsLogger().notifyActivityLaunching();
         boolean componentSpecified = intent.getComponent() != null;
 
+        final int realCallingPid = Binder.getCallingPid();
+        final int realCallingUid = Binder.getCallingUid();
+
         // Save a copy in case ephemeral needs it
         final Intent ephemeralIntent = new Intent(intent);
         // Don't modify the client's object!
@@ -969,7 +972,8 @@
             componentSpecified = false;
         }
 
-        ResolveInfo rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId);
+        ResolveInfo rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId,
+                0 /* matchFlags */, realCallingUid);
         if (rInfo == null) {
             UserInfo userInfo = mSupervisor.getUserInfo(userId);
             if (userInfo != null && userInfo.isManagedProfile()) {
@@ -991,7 +995,7 @@
                     rInfo = mSupervisor.resolveIntent(intent, resolvedType, userId,
                             PackageManager.MATCH_DIRECT_BOOT_AWARE
                                     | PackageManager.MATCH_DIRECT_BOOT_UNAWARE,
-                            Binder.getCallingUid());
+                            realCallingUid);
                 }
             }
         }
@@ -999,8 +1003,6 @@
         ActivityInfo aInfo = mSupervisor.resolveActivity(intent, rInfo, startFlags, profilerInfo);
 
         synchronized (mService) {
-            final int realCallingPid = Binder.getCallingPid();
-            final int realCallingUid = Binder.getCallingUid();
             int callingPid;
             if (callingUid >= 0) {
                 callingPid = -1;
@@ -1073,7 +1075,8 @@
                         callingUid = Binder.getCallingUid();
                         callingPid = Binder.getCallingPid();
                         componentSpecified = true;
-                        rInfo = mSupervisor.resolveIntent(intent, null /*resolvedType*/, userId);
+                        rInfo = mSupervisor.resolveIntent(intent, null /*resolvedType*/, userId,
+                                0 /* matchFlags */, realCallingUid);
                         aInfo = rInfo != null ? rInfo.activityInfo : null;
                         if (aInfo != null) {
                             aInfo = mService.getActivityInfoForUser(aInfo, userId);
diff --git a/services/core/java/com/android/server/am/CarUserSwitchingDialog.java b/services/core/java/com/android/server/am/CarUserSwitchingDialog.java
index 1149e87..7599afa 100644
--- a/services/core/java/com/android/server/am/CarUserSwitchingDialog.java
+++ b/services/core/java/com/android/server/am/CarUserSwitchingDialog.java
@@ -20,33 +20,41 @@
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
 import android.graphics.Color;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.PixelFormat;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
+import android.graphics.Rect;
+import android.graphics.RectF;
 import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
 import android.os.UserManager;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.TextView;
 import com.android.internal.R;
-import com.android.server.pm.UserManagerService;
-import java.io.FileDescriptor;
+
 
 /**
  * Dialog to show when a user switch it about to happen for the car. The intent is to snapshot the
  * screen immediately after the dialog shows so that the user is informed that something is
  * happening in the background rather than just freeze the screen and not know if the user-switch
  * affordance was being handled.
- *
  */
 final class CarUserSwitchingDialog extends UserSwitchingDialog {
+
     private static final String TAG = "ActivityManagerCarUserSwitchingDialog";
 
     public CarUserSwitchingDialog(ActivityManagerService service, Context context, UserInfo oldUser,
-        UserInfo newUser, boolean aboveSystem, String switchingFromSystemUserMessage,
-        String switchingToSystemUserMessage) {
+            UserInfo newUser, boolean aboveSystem, String switchingFromSystemUserMessage,
+            String switchingToSystemUserMessage) {
         super(service, context, oldUser, newUser, aboveSystem, switchingFromSystemUserMessage,
-            switchingToSystemUserMessage);
+                switchingToSystemUserMessage);
 
         getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
     }
@@ -58,18 +66,104 @@
         Resources res = getContext().getResources();
         // Custom view due to alignment and font size requirements
         View view = LayoutInflater.from(getContext()).inflate(R.layout.car_user_switching_dialog,
-            null);
+                null);
 
         UserManager userManager =
                 (UserManager) getContext().getSystemService(Context.USER_SERVICE);
         Bitmap bitmap = userManager.getUserIcon(mNewUser.id);
         if (bitmap != null) {
+            CircleFramedDrawable drawable = CircleFramedDrawable.getInstance(bitmap,
+                    res.getDimension(R.dimen.car_fullscreen_user_pod_image_avatar_height));
             ((ImageView) view.findViewById(R.id.user_loading_avatar))
-                    .setImageBitmap(bitmap);
+                    .setImageDrawable(drawable);
         }
 
         ((TextView) view.findViewById(R.id.user_loading))
-            .setText(res.getString(R.string.car_loading_profile));
+                .setText(res.getString(R.string.car_loading_profile));
         setView(view);
     }
+
+    /**
+     * Converts the user icon to a circularly clipped one.  This is used in the User Picker and
+     * Settings.
+     */
+    static class CircleFramedDrawable extends Drawable {
+
+        private final Bitmap mBitmap;
+        private final int mSize;
+        private final Paint mPaint;
+
+        private float mScale;
+        private Rect mSrcRect;
+        private RectF mDstRect;
+
+        public static CircleFramedDrawable getInstance(Bitmap icon, float iconSize) {
+            CircleFramedDrawable instance = new CircleFramedDrawable(icon, (int) iconSize);
+            return instance;
+        }
+
+        public CircleFramedDrawable(Bitmap icon, int size) {
+            super();
+            mSize = size;
+
+            mBitmap = Bitmap.createBitmap(mSize, mSize, Bitmap.Config.ARGB_8888);
+            final Canvas canvas = new Canvas(mBitmap);
+
+            final int width = icon.getWidth();
+            final int height = icon.getHeight();
+            final int square = Math.min(width, height);
+
+            final Rect cropRect = new Rect((width - square) / 2, (height - square) / 2,
+                    square, square);
+            final RectF circleRect = new RectF(0f, 0f, mSize, mSize);
+
+            final Path fillPath = new Path();
+            fillPath.addArc(circleRect, 0f, 360f);
+
+            canvas.drawColor(0, PorterDuff.Mode.CLEAR);
+
+            // opaque circle
+            mPaint = new Paint();
+            mPaint.setAntiAlias(true);
+            mPaint.setColor(Color.BLACK);
+            mPaint.setStyle(Paint.Style.FILL);
+            canvas.drawPath(fillPath, mPaint);
+
+            // mask in the icon where the bitmap is opaque
+            mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));
+            canvas.drawBitmap(icon, cropRect, circleRect, mPaint);
+
+            // prepare paint for frame drawing
+            mPaint.setXfermode(null);
+
+            mScale = 1f;
+
+            mSrcRect = new Rect(0, 0, mSize, mSize);
+            mDstRect = new RectF(0, 0, mSize, mSize);
+        }
+
+        @Override
+        public void draw(Canvas canvas) {
+            final float inside = mScale * mSize;
+            final float pad = (mSize - inside) / 2f;
+
+            mDstRect.set(pad, pad, mSize - pad, mSize - pad);
+            canvas.drawBitmap(mBitmap, mSrcRect, mDstRect, null);
+        }
+
+        @Override
+        public int getOpacity() {
+            return PixelFormat.TRANSLUCENT;
+        }
+
+        @Override
+        public void setAlpha(int alpha) {
+            // Needed to implement abstract method.  Do nothing.
+        }
+
+        @Override
+        public void setColorFilter(ColorFilter colorFilter) {
+            // Needed to implement abstract method.  Do nothing.
+        }
+    }
 }
diff --git a/services/core/java/com/android/server/am/RecentsAnimation.java b/services/core/java/com/android/server/am/RecentsAnimation.java
index b5047ae..a88f408 100644
--- a/services/core/java/com/android/server/am/RecentsAnimation.java
+++ b/services/core/java/com/android/server/am/RecentsAnimation.java
@@ -238,7 +238,9 @@
 
                     final ActivityStack targetStack = mDefaultDisplay.getStack(
                             WINDOWING_MODE_UNDEFINED, mTargetActivityType);
-                    final ActivityRecord targetActivity = targetStack.getTopActivity();
+                    final ActivityRecord targetActivity = targetStack != null
+                            ? targetStack.getTopActivity()
+                            : null;
                     if (DEBUG) Slog.d(TAG, "onAnimationFinished(): targetStack=" + targetStack
                             + " targetActivity=" + targetActivity
                             + " mRestoreTargetBehindStack=" + mRestoreTargetBehindStack);
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 7298983..36e5340 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -399,6 +399,13 @@
 
     private final boolean mUseFixedVolume;
 
+    /**
+    * Default stream type used for volume control in the absence of playback
+    * e.g. user on homescreen, no app playing anything, presses hardware volume buttons, this
+    *    stream type is controlled.
+    */
+   protected static final int DEFAULT_VOL_STREAM_NO_PLAYBACK = AudioSystem.STREAM_MUSIC;
+
     private final AudioSystem.ErrorCallback mAudioSystemCallback = new AudioSystem.ErrorCallback() {
         public void onError(int error) {
             switch (error) {
@@ -518,6 +525,8 @@
     private static final int SCO_STATE_ACTIVE_INTERNAL = 3;
     // SCO audio deactivation request waiting for headset service to connect
     private static final int SCO_STATE_DEACTIVATE_REQ = 5;
+    // SCO audio deactivation in progress, waiting for Bluetooth audio intent
+    private static final int SCO_STATE_DEACTIVATING = 6;
 
     // SCO audio state is active due to an action in BT handsfree (either voice recognition or
     // in call audio)
@@ -2698,9 +2707,13 @@
         }
 
         public void binderDied() {
+            int oldModeOwnerPid = 0;
             int newModeOwnerPid = 0;
             synchronized(mSetModeDeathHandlers) {
                 Log.w(TAG, "setMode() client died");
+                if (!mSetModeDeathHandlers.isEmpty()) {
+                    oldModeOwnerPid = mSetModeDeathHandlers.get(0).getPid();
+                }
                 int index = mSetModeDeathHandlers.indexOf(this);
                 if (index < 0) {
                     Log.w(TAG, "unregistered setMode() client died");
@@ -2709,8 +2722,8 @@
                 }
             }
             // when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
-            // SCO connections not started by the application changing the mode
-            if (newModeOwnerPid != 0) {
+            // SCO connections not started by the application changing the mode when pid changes
+            if ((newModeOwnerPid != oldModeOwnerPid) && (newModeOwnerPid != 0)) {
                 final long ident = Binder.clearCallingIdentity();
                 disconnectBluetoothSco(newModeOwnerPid);
                 Binder.restoreCallingIdentity(ident);
@@ -2754,17 +2767,21 @@
             return;
         }
 
+        int oldModeOwnerPid = 0;
         int newModeOwnerPid = 0;
         synchronized(mSetModeDeathHandlers) {
+            if (!mSetModeDeathHandlers.isEmpty()) {
+                oldModeOwnerPid = mSetModeDeathHandlers.get(0).getPid();
+            }
             if (mode == AudioSystem.MODE_CURRENT) {
                 mode = mMode;
             }
             newModeOwnerPid = setModeInt(mode, cb, Binder.getCallingPid(), callingPackage);
         }
         // when entering RINGTONE, IN_CALL or IN_COMMUNICATION mode, clear all
-        // SCO connections not started by the application changing the mode
-        if (newModeOwnerPid != 0) {
-             disconnectBluetoothSco(newModeOwnerPid);
+        // SCO connections not started by the application changing the mode when pid changes
+        if ((newModeOwnerPid != oldModeOwnerPid) && (newModeOwnerPid != 0)) {
+            disconnectBluetoothSco(newModeOwnerPid);
         }
     }
 
@@ -3180,28 +3197,17 @@
     }
 
     public void setBluetoothScoOnInt(boolean on, String eventSource) {
-        if (DEBUG_DEVICES) {
-            Log.d(TAG, "setBluetoothScoOnInt: " + on + " " + eventSource);
-        }
+        Log.i(TAG, "setBluetoothScoOnInt: " + on + " " + eventSource);
         if (on) {
             // do not accept SCO ON if SCO audio is not connected
             synchronized (mScoClients) {
-                if (mBluetoothHeadset != null) {
-                    if (mBluetoothHeadsetDevice == null) {
-                        BluetoothDevice activeDevice = mBluetoothHeadset.getActiveDevice();
-                        if (activeDevice != null) {
-                            // setBtScoActiveDevice() might trigger resetBluetoothSco() which
-                            // will call setBluetoothScoOnInt(false, "resetBluetoothSco")
-                            setBtScoActiveDevice(activeDevice);
-                        }
-                    }
-                    if (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
-                            != BluetoothHeadset.STATE_AUDIO_CONNECTED) {
-                        mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
-                        Log.w(TAG, "setBluetoothScoOnInt(true) failed because "
-                                + mBluetoothHeadsetDevice + " is not in audio connected mode");
-                        return;
-                    }
+                if ((mBluetoothHeadset != null)
+                        && (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+                            != BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
+                    mForcedUseForCommExt = AudioSystem.FORCE_BT_SCO;
+                    Log.w(TAG, "setBluetoothScoOnInt(true) failed because "
+                            + mBluetoothHeadsetDevice + " is not in audio connected mode");
+                    return;
                 }
             }
             mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
@@ -3381,9 +3387,8 @@
         public int totalCount() {
             synchronized(mScoClients) {
                 int count = 0;
-                int size = mScoClients.size();
-                for (int i = 0; i < size; i++) {
-                    count += mScoClients.get(i).getCount();
+                for (ScoClient mScoClient : mScoClients) {
+                    count += mScoClient.getCount();
                 }
                 return count;
             }
@@ -3391,128 +3396,161 @@
 
         private void requestScoState(int state, int scoAudioMode) {
             checkScoAudioState();
-            if (totalCount() == 0) {
-                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.
-                    synchronized(mSetModeDeathHandlers) {
-                        if ((mSetModeDeathHandlers.isEmpty() ||
-                                mSetModeDeathHandlers.get(0).getPid() == mCreatorPid) &&
-                                (mScoAudioState == SCO_STATE_INACTIVE ||
-                                 mScoAudioState == SCO_STATE_DEACTIVATE_REQ)) {
-                            if (mScoAudioState == SCO_STATE_INACTIVE) {
-                                mScoAudioMode = scoAudioMode;
-                                if (scoAudioMode == SCO_MODE_UNDEFINED) {
-                                    if (mBluetoothHeadsetDevice != null) {
-                                        mScoAudioMode = new Integer(Settings.Global.getInt(
-                                                                mContentResolver,
-                                                                "bluetooth_sco_channel_"+
-                                                                mBluetoothHeadsetDevice.getAddress(),
-                                                                SCO_MODE_VIRTUAL_CALL));
-                                        if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) {
-                                            mScoAudioMode = SCO_MODE_VIRTUAL_CALL;
-                                        }
-                                    } else {
-                                        mScoAudioMode = SCO_MODE_RAW;
-                                    }
-                                }
-                                if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
-                                    boolean status = false;
-                                    if (mScoAudioMode == SCO_MODE_RAW) {
-                                        status = mBluetoothHeadset.connectAudio();
-                                    } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
-                                        status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
-                                                                            mBluetoothHeadsetDevice);
-                                    } else if (mScoAudioMode == SCO_MODE_VR) {
-                                        status = mBluetoothHeadset.startVoiceRecognition(
-                                                                           mBluetoothHeadsetDevice);
-                                    }
-
-                                    if (status) {
-                                        mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
-                                    } else {
-                                        broadcastScoConnectionState(
-                                                AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                                    }
-                                } else if (getBluetoothHeadset()) {
-                                    mScoAudioState = SCO_STATE_ACTIVATE_REQ;
-                                }
-                            } else {
-                                mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
-                                broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTED);
-                            }
-                        } else {
-                            broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
-                        }
+            int clientCount = totalCount();
+            if (clientCount != 0) {
+                Log.i(TAG, "requestScoState: state=" + state + ", scoAudioMode=" + scoAudioMode
+                        + ", clientCount=" + clientCount);
+                return;
+            }
+            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.
+                synchronized(mSetModeDeathHandlers) {
+                    int modeOwnerPid =  mSetModeDeathHandlers.isEmpty()
+                            ? 0 : mSetModeDeathHandlers.get(0).getPid();
+                    if (modeOwnerPid != 0 && (modeOwnerPid != mCreatorPid)) {
+                        Log.w(TAG, "requestScoState: audio mode is not NORMAL and modeOwnerPid "
+                                + modeOwnerPid + " != creatorPid " + mCreatorPid);
+                        broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                        return;
                     }
-                } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED &&
-                              (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL ||
-                               mScoAudioState == SCO_STATE_ACTIVATE_REQ)) {
-                    if (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL) {
-                        if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null) {
-                            boolean status = false;
-                            if (mScoAudioMode == SCO_MODE_RAW) {
-                                status = mBluetoothHeadset.disconnectAudio();
-                            } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
-                                status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
-                                                                        mBluetoothHeadsetDevice);
-                            } else if (mScoAudioMode == SCO_MODE_VR) {
-                                        status = mBluetoothHeadset.stopVoiceRecognition(
-                                                                      mBluetoothHeadsetDevice);
+                    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(mContentResolver,
+                                            "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);
+                                }
+                                break;
+                            }
+                            if (mBluetoothHeadsetDevice == null) {
+                                Log.w(TAG, "requestScoState: no active device while connecting,"
+                                        + " mScoAudioMode=" + mScoAudioMode);
+                                broadcastScoConnectionState(
+                                        AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                                break;
+                            }
+                            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);
+                            }
+                            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;
+                        default:
+                            Log.w(TAG, "requestScoState: failed to connect in state "
+                                    + mScoAudioState + ", scoAudioMode=" + scoAudioMode);
+                            broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
+                            break;
 
-                            if (!status) {
+                    }
+                }
+            } 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);
                             }
-                        } else if (getBluetoothHeadset()) {
-                            mScoAudioState = SCO_STATE_DEACTIVATE_REQ;
+                            break;
                         }
-                    } else {
+                        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:
                         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);
+                        break;
                 }
             }
         }
     }
 
     private void checkScoAudioState() {
-        if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null &&
-                mScoAudioState == SCO_STATE_INACTIVE &&
-                mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
-                != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
-            mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+        synchronized (mScoClients) {
+            if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null &&
+                    mScoAudioState == SCO_STATE_INACTIVE &&
+                    mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+                            != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) {
+                mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+            }
         }
     }
 
+
     private ScoClient getScoClient(IBinder cb, boolean create) {
         synchronized(mScoClients) {
-            ScoClient client = null;
-            int size = mScoClients.size();
-            for (int i = 0; i < size; i++) {
-                client = mScoClients.get(i);
-                if (client.getBinder() == cb)
-                    return client;
+            for (ScoClient existingClient : mScoClients) {
+                if (existingClient.getBinder() == cb) {
+                    return existingClient;
+                }
             }
             if (create) {
-                client = new ScoClient(cb);
-                mScoClients.add(client);
+                ScoClient newClient = new ScoClient(cb);
+                mScoClients.add(newClient);
+                return newClient;
             }
-            return client;
+            return null;
         }
     }
 
     public void clearAllScoClients(int exceptPid, boolean stopSco) {
         synchronized(mScoClients) {
             ScoClient savedClient = null;
-            int size = mScoClients.size();
-            for (int i = 0; i < size; i++) {
-                ScoClient cl = mScoClients.get(i);
+            for (ScoClient cl : mScoClients) {
                 if (cl.getPid() != exceptPid) {
                     cl.clearCount(stopSco);
                 } else {
@@ -3549,10 +3587,17 @@
                     mScoAudioState == SCO_STATE_DEACTIVATE_EXT_REQ) {
                 if (mBluetoothHeadsetDevice != null) {
                     if (mBluetoothHeadset != null) {
-                        if (!mBluetoothHeadset.stopVoiceRecognition(
-                                mBluetoothHeadsetDevice)) {
-                            sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED,
-                                    SENDMSG_REPLACE, 0, 0, null, 0);
+                        boolean status = disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                mBluetoothHeadsetDevice, SCO_MODE_RAW)
+                                || disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                mBluetoothHeadsetDevice, SCO_MODE_VIRTUAL_CALL)
+                                || disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                mBluetoothHeadsetDevice, SCO_MODE_VR);
+                        if (status) {
+                            mScoAudioState = SCO_STATE_DEACTIVATING;
+                        } else {
+                            clearAllScoClients(exceptPid, false);
+                            mScoAudioState = SCO_STATE_INACTIVE;
                         }
                     } else if (mScoAudioState == SCO_STATE_ACTIVE_EXTERNAL &&
                             getBluetoothHeadset()) {
@@ -3565,6 +3610,34 @@
         }
     }
 
+    private static boolean disconnectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset,
+            BluetoothDevice device, int scoAudioMode) {
+        switch (scoAudioMode) {
+            case SCO_MODE_RAW:
+                return bluetoothHeadset.disconnectAudio();
+            case SCO_MODE_VIRTUAL_CALL:
+                return bluetoothHeadset.stopScoUsingVirtualVoiceCall();
+            case SCO_MODE_VR:
+                return bluetoothHeadset.stopVoiceRecognition(device);
+            default:
+                return false;
+        }
+    }
+
+    private static boolean connectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset,
+            BluetoothDevice device, int scoAudioMode) {
+        switch (scoAudioMode) {
+            case SCO_MODE_RAW:
+                return bluetoothHeadset.connectAudio();
+            case SCO_MODE_VIRTUAL_CALL:
+                return bluetoothHeadset.startScoUsingVirtualVoiceCall();
+            case SCO_MODE_VR:
+                return bluetoothHeadset.startVoiceRecognition(device);
+            default:
+                return false;
+        }
+    }
+
     private void resetBluetoothSco() {
         synchronized(mScoClients) {
             clearAllScoClients(0, false);
@@ -3622,11 +3695,9 @@
         return result;
     }
 
-    void setBtScoActiveDevice(BluetoothDevice btDevice) {
-        if (DEBUG_DEVICES) {
-            Log.d(TAG, "setBtScoActiveDevice(" + btDevice + ")");
-        }
+    private void setBtScoActiveDevice(BluetoothDevice btDevice) {
         synchronized (mScoClients) {
+            Log.i(TAG, "setBtScoActiveDevice: " + mBluetoothHeadsetDevice + " -> " + btDevice);
             final BluetoothDevice previousActiveDevice = mBluetoothHeadsetDevice;
             if (!Objects.equals(btDevice, previousActiveDevice)) {
                 if (!handleBtScoActiveDeviceChange(previousActiveDevice, false)) {
@@ -3706,37 +3777,36 @@
                         boolean status = false;
                         if (mBluetoothHeadsetDevice != null) {
                             switch (mScoAudioState) {
-                            case SCO_STATE_ACTIVATE_REQ:
-                                mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
-                                if (mScoAudioMode == SCO_MODE_RAW) {
-                                    status = mBluetoothHeadset.connectAudio();
-                                } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
-                                    status = mBluetoothHeadset.startScoUsingVirtualVoiceCall(
-                                                                        mBluetoothHeadsetDevice);
-                                } else if (mScoAudioMode == SCO_MODE_VR) {
-                                    status = mBluetoothHeadset.startVoiceRecognition(
-                                                                      mBluetoothHeadsetDevice);
-                                }
-                                break;
-                            case SCO_STATE_DEACTIVATE_REQ:
-                                if (mScoAudioMode == SCO_MODE_RAW) {
-                                    status = mBluetoothHeadset.disconnectAudio();
-                                } else if (mScoAudioMode == SCO_MODE_VIRTUAL_CALL) {
-                                    status = mBluetoothHeadset.stopScoUsingVirtualVoiceCall(
-                                                                        mBluetoothHeadsetDevice);
-                                } else if (mScoAudioMode == SCO_MODE_VR) {
-                                    status = mBluetoothHeadset.stopVoiceRecognition(
-                                                                      mBluetoothHeadsetDevice);
-                                }
-                                break;
-                            case SCO_STATE_DEACTIVATE_EXT_REQ:
-                                status = mBluetoothHeadset.stopVoiceRecognition(
-                                        mBluetoothHeadsetDevice);
+                                case SCO_STATE_ACTIVATE_REQ:
+                                    status = connectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                            mBluetoothHeadsetDevice, mScoAudioMode);
+                                    if (status) {
+                                        mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+                                    }
+                                    break;
+                                case SCO_STATE_DEACTIVATE_REQ:
+                                    status = disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                            mBluetoothHeadsetDevice, mScoAudioMode);
+                                    if (status) {
+                                        mScoAudioState = SCO_STATE_DEACTIVATING;
+                                    }
+                                    break;
+                                case SCO_STATE_DEACTIVATE_EXT_REQ:
+                                    status = disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                            mBluetoothHeadsetDevice, SCO_MODE_RAW) ||
+                                            disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                            mBluetoothHeadsetDevice, SCO_MODE_VIRTUAL_CALL) ||
+                                            disconnectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                            mBluetoothHeadsetDevice, SCO_MODE_VR);
+                                    if (status) {
+                                        mScoAudioState = SCO_STATE_DEACTIVATING;
+                                    }
+                                    break;
                             }
                         }
                         if (!status) {
-                            sendMsg(mAudioHandler, MSG_BT_HEADSET_CNCT_FAILED,
-                                    SENDMSG_REPLACE, 0, 0, null, 0);
+                            mScoAudioState = SCO_STATE_INACTIVE;
+                            broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED);
                         }
                     }
                 }
@@ -4285,9 +4355,11 @@
                         Log.v(TAG, "getActiveStreamType: Forcing STREAM_NOTIFICATION stream active");
                     return AudioSystem.STREAM_NOTIFICATION;
                 } else {
-                    if (DEBUG_VOL)
-                        Log.v(TAG, "getActiveStreamType: Forcing STREAM_MUSIC b/c default");
-                    return AudioSystem.STREAM_MUSIC;
+                    if (DEBUG_VOL) {
+                        Log.v(TAG, "getActiveStreamType: Forcing DEFAULT_VOL_STREAM_NO_PLAYBACK("
+                                + DEFAULT_VOL_STREAM_NO_PLAYBACK + ") b/c default");
+                    }
+                    return DEFAULT_VOL_STREAM_NO_PLAYBACK;
                 }
             } else if (
                     wasStreamActiveRecently(AudioSystem.STREAM_NOTIFICATION, sStreamOverrideDelayMs)) {
@@ -4327,8 +4399,11 @@
                     if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: Forcing STREAM_RING");
                     return AudioSystem.STREAM_RING;
                 } else {
-                    if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: using STREAM_MUSIC as default");
-                    return AudioSystem.STREAM_MUSIC;
+                    if (DEBUG_VOL) {
+                        Log.v(TAG, "getActiveStreamType: Forcing DEFAULT_VOL_STREAM_NO_PLAYBACK("
+                                + DEFAULT_VOL_STREAM_NO_PLAYBACK + ") b/c default");
+                    }
+                    return DEFAULT_VOL_STREAM_NO_PLAYBACK;
                 }
             }
             break;
@@ -6301,33 +6376,47 @@
                     if (!mScoClients.isEmpty() &&
                             (mScoAudioState == SCO_STATE_ACTIVE_INTERNAL ||
                              mScoAudioState == SCO_STATE_ACTIVATE_REQ ||
-                             mScoAudioState == SCO_STATE_DEACTIVATE_REQ)) {
+                             mScoAudioState == SCO_STATE_DEACTIVATE_REQ ||
+                             mScoAudioState == SCO_STATE_DEACTIVATING)) {
                         broadcast = true;
                     }
                     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_DEACTIVATE_EXT_REQ) {
-                            mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
-                        }
-                        break;
-                    case BluetoothHeadset.STATE_AUDIO_DISCONNECTED:
-                        scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED;
-                        mScoAudioState = SCO_STATE_INACTIVE;
-                        clearAllScoClients(0, false);
-                        break;
-                    case BluetoothHeadset.STATE_AUDIO_CONNECTING:
-                        if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
-                            mScoAudioState != SCO_STATE_DEACTIVATE_REQ &&
-                            mScoAudioState != SCO_STATE_DEACTIVATE_EXT_REQ) {
-                            mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
-                        }
-                    default:
-                        // do not broadcast CONNECTING or invalid state
-                        broadcast = false;
-                        break;
+                        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_DEACTIVATE_EXT_REQ) {
+                                mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+                            }
+                            setBluetoothScoOn(true);
+                            break;
+                        case BluetoothHeadset.STATE_AUDIO_DISCONNECTED:
+                            setBluetoothScoOn(false);
+                            scoAudioState = AudioManager.SCO_AUDIO_STATE_DISCONNECTED;
+                            // startBluetoothSco called after stopBluetoothSco
+                            if (mScoAudioState == SCO_STATE_ACTIVATE_REQ) {
+                                if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null
+                                        && connectBluetoothScoAudioHelper(mBluetoothHeadset,
+                                        mBluetoothHeadsetDevice, mScoAudioMode)) {
+                                    mScoAudioState = SCO_STATE_ACTIVE_INTERNAL;
+                                    broadcast = false;
+                                    break;
+                                }
+                            }
+                            // Tear down SCO if disconnected from external
+                            clearAllScoClients(0, mScoAudioState == SCO_STATE_ACTIVE_INTERNAL);
+                            mScoAudioState = SCO_STATE_INACTIVE;
+                            break;
+                        case BluetoothHeadset.STATE_AUDIO_CONNECTING:
+                            if (mScoAudioState != SCO_STATE_ACTIVE_INTERNAL &&
+                                mScoAudioState != SCO_STATE_DEACTIVATE_REQ &&
+                                mScoAudioState != SCO_STATE_DEACTIVATE_EXT_REQ) {
+                                mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL;
+                            }
+                        default:
+                            // do not broadcast CONNECTING or invalid state
+                            broadcast = false;
+                            break;
                     }
                 }
                 if (broadcast) {
@@ -7210,7 +7299,7 @@
                 return false;
             }
             boolean suppress = false;
-            if (resolvedStream == AudioSystem.STREAM_RING && mController != null) {
+            if (resolvedStream == DEFAULT_VOL_STREAM_NO_PLAYBACK && mController != null) {
                 final long now = SystemClock.uptimeMillis();
                 if ((flags & AudioManager.FLAG_SHOW_UI) != 0 && !mVisible) {
                     // ui will become visible
diff --git a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
index f427819..ac74598 100644
--- a/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
+++ b/services/core/java/com/android/server/connectivity/IpConnectivityMetrics.java
@@ -20,6 +20,7 @@
 import android.net.ConnectivityMetricsEvent;
 import android.net.IIpConnectivityMetrics;
 import android.net.INetdEventCallback;
+import android.net.ip.IpClient;
 import android.net.metrics.ApfProgramEvent;
 import android.net.metrics.IpConnectivityLog;
 import android.os.Binder;
@@ -269,10 +270,12 @@
         // Dump the rolling buffer of metrics event and pretty print events using a human readable
         // format. Also print network dns/connect statistics and default network event time series.
         static final String CMD_LIST = "list";
-        // By default any other argument will fall into the default case which is remapped to the
-        // "list" command. This includes most notably bug reports collected by dumpsys.cpp with
-        // the "-a" argument.
-        static final String CMD_DEFAULT = CMD_LIST;
+        // Dump all IpClient logs ("ipclient").
+        static final String CMD_IPCLIENT = IpClient.DUMP_ARG;
+        // By default any other argument will fall into the default case which is the equivalent
+        // of calling both the "list" and "ipclient" commands. This includes most notably bug
+        // reports collected by dumpsys.cpp with the "-a" argument.
+        static final String CMD_DEFAULT = "";
 
         @Override
         public int logEvent(ConnectivityMetricsEvent event) {
@@ -292,9 +295,20 @@
                 case CMD_PROTO:
                     cmdListAsProto(pw);
                     return;
-                case CMD_LIST: // fallthrough
+                case CMD_IPCLIENT: {
+                    final String[] ipclientArgs = ((args != null) && (args.length > 1))
+                            ? Arrays.copyOfRange(args, 1, args.length)
+                            : null;
+                    IpClient.dumpAllLogs(pw, ipclientArgs);
+                    return;
+                }
+                case CMD_LIST:
+                    cmdList(pw);
+                    return;
                 default:
                     cmdList(pw);
+                    pw.println("");
+                    IpClient.dumpAllLogs(pw, null);
                     return;
             }
         }
diff --git a/services/core/java/com/android/server/content/ContentService.java b/services/core/java/com/android/server/content/ContentService.java
index e840a29..03d8f39 100644
--- a/services/core/java/com/android/server/content/ContentService.java
+++ b/services/core/java/com/android/server/content/ContentService.java
@@ -1279,7 +1279,9 @@
                 case Process.SYSTEM_UID:
                     break; // Okay
                 default:
-                    throw new SecurityException("Invalid extras specified.");
+                    final String msg = "Invalid extras specified.";
+                    Log.w(TAG, msg + " requestsync -f/-F needs to run on 'adb shell'");
+                    throw new SecurityException(msg);
             }
         }
     }
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index f403953..0425844 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -316,7 +316,7 @@
         return true;
     }
 
-    private void resetShortTermModel() {
+    public void resetShortTermModel() {
         mBrightnessMapper.clearUserDataPoints();
         mShortTermModelValid = true;
         mShortTermModelAnchor = -1;
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 46e883c..3b35d02 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -774,14 +774,8 @@
             brightness = mScreenBrightnessForVr;
         }
 
-        boolean setBrightnessToOverride = false;
         if (brightness < 0 && mPowerRequest.screenBrightnessOverride > 0) {
             brightness = mPowerRequest.screenBrightnessOverride;
-            // If there's a screen brightness override, we want to reset the brightness to it
-            // whenever the user changes it, to communicate that these changes aren't taking
-            // effect. However, for a nicer user experience, we don't do it here, but rather after
-            // the temporary brightness has been taken into account.
-            setBrightnessToOverride = true;
         }
 
         final boolean autoBrightnessEnabledInDoze =
@@ -804,12 +798,6 @@
             brightnessIsTemporary = true;
         }
 
-        // Reset the brightness to the screen brightness override to communicate to the user that
-        // her changes aren't taking effect.
-        if (setBrightnessToOverride && !brightnessIsTemporary) {
-            putScreenBrightnessSetting(brightness);
-        }
-
         final boolean autoBrightnessAdjustmentChanged = updateAutoBrightnessAdjustment();
         if (autoBrightnessAdjustmentChanged) {
             mTemporaryAutoBrightnessAdjustment = Float.NaN;
@@ -1452,6 +1440,9 @@
         if (userSwitch) {
             // Don't treat user switches as user initiated change.
             mCurrentScreenBrightnessSetting = mPendingScreenBrightnessSetting;
+            if (mAutomaticBrightnessController != null) {
+                mAutomaticBrightnessController.resetShortTermModel();
+            }
         }
         mPendingAutoBrightnessAdjustment = getAutoBrightnessAdjustmentSetting();
         // We don't bother with a pending variable for VR screen brightness since we just
diff --git a/services/core/java/com/android/server/fingerprint/ClientMonitor.java b/services/core/java/com/android/server/fingerprint/ClientMonitor.java
index 4100a9a..b935ba2 100644
--- a/services/core/java/com/android/server/fingerprint/ClientMonitor.java
+++ b/services/core/java/com/android/server/fingerprint/ClientMonitor.java
@@ -80,7 +80,7 @@
         mGroupId = groupId;
         mIsRestricted = restricted;
         mOwner = owner;
-        mSuccessVibrationEffect = getSuccessVibrationEffect(context);
+        mSuccessVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
         mErrorVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK);
         try {
             if (token != null) {
@@ -239,25 +239,4 @@
             vibrator.vibrate(mErrorVibrationEffect, FINGERPRINT_SONFICATION_ATTRIBUTES);
         }
     }
-
-    private static VibrationEffect getSuccessVibrationEffect(Context ctx) {
-        int[] arr = ctx.getResources().getIntArray(
-                com.android.internal.R.array.config_longPressVibePattern);
-        final long[] vibePattern;
-        if (arr == null || arr.length == 0) {
-            vibePattern = DEFAULT_SUCCESS_VIBRATION_PATTERN;
-        } else {
-            vibePattern = new long[arr.length];
-            for (int i = 0; i < arr.length; i++) {
-                vibePattern[i] = arr[i];
-            }
-        }
-        if (vibePattern.length == 1) {
-            return VibrationEffect.createOneShot(
-                    vibePattern[0], VibrationEffect.DEFAULT_AMPLITUDE);
-        } else {
-            return VibrationEffect.createWaveform(vibePattern, -1);
-        }
-    }
-
 }
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index 64750b0..4e6307d 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -1887,9 +1887,26 @@
                         GPS_CAPABILITY_MEASUREMENTS));
                 mGnssNavigationMessageProvider.onCapabilitiesUpdated(hasCapability(
                         GPS_CAPABILITY_NAV_MESSAGES));
+                restartRequests();
             }
         });
-   }
+    }
+
+    private void restartRequests() {
+        Log.i(TAG, "restartRequests");
+
+        restartLocationRequest();
+        mGnssMeasurementsProvider.resumeIfStarted();
+        mGnssNavigationMessageProvider.resumeIfStarted();
+        mGnssBatchingProvider.resumeIfStarted();
+        mGnssGeofenceProvider.resumeIfStarted();
+    }
+
+    private void restartLocationRequest() {
+        if (DEBUG) Log.d(TAG, "restartLocationRequest");
+        mStarted = false;
+        updateRequirements();
+    }
 
     /**
      * Called from native code to inform us the hardware year.
@@ -1909,6 +1926,23 @@
         mHardwareModelName = modelName;
     }
 
+    /**
+     * Called from native code to inform us GNSS HAL service died.
+     */
+    private void reportGnssServiceDied() {
+        if (DEBUG) Log.d(TAG, "reportGnssServiceDied");
+        mHandler.post(() -> {
+            class_init_native();
+            native_init_once();
+            if (isEnabled()) {
+                // re-calls native_init() and other setup.
+                handleEnable();
+                // resend configuration into the restarted HAL service.
+                reloadGpsProperties(mContext, mProperties);
+            }
+        });
+    }
+
     public interface GnssSystemInfoProvider {
         /**
          * Returns the year of underlying GPS hardware.
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index ec3949f..bf17798 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -16,6 +16,7 @@
 
 package com.android.server.notification;
 
+import static android.app.Notification.FLAG_FOREGROUND_SERVICE;
 import static android.app.NotificationManager.ACTION_APP_BLOCK_STATE_CHANGED;
 import static android.app.NotificationManager.ACTION_NOTIFICATION_CHANNEL_BLOCK_STATE_CHANGED;
 import static android.app.NotificationManager.ACTION_NOTIFICATION_CHANNEL_GROUP_BLOCK_STATE_CHANGED;
@@ -710,7 +711,7 @@
                 StatusBarNotification sbn = r.sbn;
                 cancelNotification(callingUid, callingPid, sbn.getPackageName(), sbn.getTag(),
                         sbn.getId(), Notification.FLAG_AUTO_CANCEL,
-                        Notification.FLAG_FOREGROUND_SERVICE, false, r.getUserId(),
+                        FLAG_FOREGROUND_SERVICE, false, r.getUserId(),
                         REASON_CLICK, nv.rank, nv.count, null);
                 nv.recycle();
                 reportUserInteraction(r);
@@ -754,7 +755,7 @@
                 }
             }
             cancelNotification(callingUid, callingPid, pkg, tag, id, 0,
-                    Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE,
+                    Notification.FLAG_ONGOING_EVENT | FLAG_FOREGROUND_SERVICE,
                     true, userId, REASON_CANCEL, nv.rank, nv.count,null);
             nv.recycle();
         }
@@ -985,7 +986,7 @@
                     cancelNotification(record.sbn.getUid(), record.sbn.getInitialPid(),
                             record.sbn.getPackageName(), record.sbn.getTag(),
                             record.sbn.getId(), 0,
-                            Notification.FLAG_FOREGROUND_SERVICE, true, record.getUserId(),
+                            FLAG_FOREGROUND_SERVICE, true, record.getUserId(),
                             REASON_TIMEOUT, null);
                 }
             }
@@ -2084,7 +2085,7 @@
             // Don't allow client applications to cancel foreground service notis or autobundled
             // summaries.
             final int mustNotHaveFlags = isCallingUidSystem() ? 0 :
-                    (Notification.FLAG_FOREGROUND_SERVICE | Notification.FLAG_AUTOGROUP_SUMMARY);
+                    (FLAG_FOREGROUND_SERVICE | Notification.FLAG_AUTOGROUP_SUMMARY);
             cancelNotification(Binder.getCallingUid(), Binder.getCallingPid(), pkg, tag, id, 0,
                     mustNotHaveFlags, false, userId, REASON_APP_CANCEL, null);
         }
@@ -2099,7 +2100,7 @@
             // Calling from user space, don't allow the canceling of actively
             // running foreground services.
             cancelAllNotificationsInt(Binder.getCallingUid(), Binder.getCallingPid(),
-                    pkg, null, 0, Notification.FLAG_FOREGROUND_SERVICE, true, userId,
+                    pkg, null, 0, FLAG_FOREGROUND_SERVICE, true, userId,
                     REASON_APP_CANCEL_ALL, null);
         }
 
@@ -2685,7 +2686,7 @@
         private void cancelNotificationFromListenerLocked(ManagedServiceInfo info,
                 int callingUid, int callingPid, String pkg, String tag, int id, int userId) {
             cancelNotification(callingUid, callingPid, pkg, tag, id, 0,
-                    Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE,
+                    Notification.FLAG_ONGOING_EVENT | FLAG_FOREGROUND_SERVICE,
                     true,
                     userId, REASON_LISTENER_CANCEL, info);
         }
@@ -3876,7 +3877,9 @@
                     for (int j = 0; j < listenerSize; j++) {
                         if (i > 0) pw.print(',');
                         final ManagedServiceInfo listener = listeners.valueAt(i);
-                        pw.print(listener.component);
+                        if (listener != null) {
+                            pw.print(listener.component);
+                        }
                     }
                 }
                 pw.println(')');
@@ -3962,7 +3965,7 @@
             // FLAG_FOREGROUND_SERVICE, we have to revert to the flags we received
             // initially *and* force remove FLAG_FOREGROUND_SERVICE.
             sbn.getNotification().flags =
-                    (r.mOriginalFlags & ~Notification.FLAG_FOREGROUND_SERVICE);
+                    (r.mOriginalFlags & ~FLAG_FOREGROUND_SERVICE);
             mRankingHelper.sort(mNotificationList);
             mListeners.notifyPostedLocked(r, r);
         }
@@ -4048,17 +4051,29 @@
         final NotificationRecord r = new NotificationRecord(getContext(), n, channel);
         r.setIsAppImportanceLocked(mRankingHelper.getIsAppImportanceLocked(pkg, callingUid));
 
-        if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0
-                && (channel.getUserLockedFields() & NotificationChannel.USER_LOCKED_IMPORTANCE) == 0
-                && (r.getImportance() == IMPORTANCE_MIN || r.getImportance() == IMPORTANCE_NONE)) {
-            // Increase the importance of foreground service notifications unless the user had an
-            // opinion otherwise
-            if (TextUtils.isEmpty(channelId)
-                    || NotificationChannel.DEFAULT_CHANNEL_ID.equals(channelId)) {
-                r.setImportance(IMPORTANCE_LOW, "Bumped for foreground service");
-            } else {
-                channel.setImportance(IMPORTANCE_LOW);
-                mRankingHelper.updateNotificationChannel(pkg, notificationUid, channel, false);
+        if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
+            final boolean fgServiceShown = channel.isFgServiceShown();
+            if (((channel.getUserLockedFields() & NotificationChannel.USER_LOCKED_IMPORTANCE) == 0
+                        || !fgServiceShown)
+                    && (r.getImportance() == IMPORTANCE_MIN
+                            || r.getImportance() == IMPORTANCE_NONE)) {
+                // Increase the importance of foreground service notifications unless the user had
+                // an opinion otherwise (and the channel hasn't yet shown a fg service).
+                if (TextUtils.isEmpty(channelId)
+                        || NotificationChannel.DEFAULT_CHANNEL_ID.equals(channelId)) {
+                    r.setImportance(IMPORTANCE_LOW, "Bumped for foreground service");
+                } else {
+                    channel.setImportance(IMPORTANCE_LOW);
+                    if (!fgServiceShown) {
+                        channel.unlockFields(NotificationChannel.USER_LOCKED_IMPORTANCE);
+                        channel.setFgServiceShown(true);
+                    }
+                    mRankingHelper.updateNotificationChannel(pkg, notificationUid, channel, false);
+                    r.updateNotificationChannel(channel);
+                }
+            } else if (!fgServiceShown && !TextUtils.isEmpty(channelId)
+                    && !NotificationChannel.DEFAULT_CHANNEL_ID.equals(channelId)) {
+                channel.setFgServiceShown(true);
                 r.updateNotificationChannel(channel);
             }
         }
@@ -4429,7 +4444,7 @@
                         mUsageStats.registerUpdatedByApp(r, old);
                         // Make sure we don't lose the foreground service state.
                         notification.flags |=
-                                old.getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE;
+                                old.getNotification().flags & FLAG_FOREGROUND_SERVICE;
                         r.isUpdate = true;
                         r.setInterruptive(isVisuallyInterruptive(old, r));
                     }
@@ -4438,7 +4453,7 @@
 
                     // Ensure if this is a foreground service that the proper additional
                     // flags are set.
-                    if ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
+                    if ((notification.flags & FLAG_FOREGROUND_SERVICE) != 0) {
                         notification.flags |= Notification.FLAG_ONGOING_EVENT
                                 | Notification.FLAG_NO_CLEAR;
                     }
@@ -4506,6 +4521,13 @@
         if (oldN.extras == null || newN.extras == null) {
             return false;
         }
+
+        // Ignore visual interruptions from foreground services because users
+        // consider them one 'session'. Count them for everything else.
+        if (r != null && (r.sbn.getNotification().flags & FLAG_FOREGROUND_SERVICE) != 0) {
+            return false;
+        }
+
         if (!Objects.equals(oldN.extras.get(Notification.EXTRA_TITLE),
                 newN.extras.get(Notification.EXTRA_TITLE))) {
             return true;
@@ -5805,7 +5827,7 @@
             final StatusBarNotification childSbn = childR.sbn;
             if ((childSbn.isGroup() && !childSbn.getNotification().isGroupSummary()) &&
                     childR.getGroupKey().equals(parentNotification.getGroupKey())
-                    && (childR.getFlags() & Notification.FLAG_FOREGROUND_SERVICE) == 0
+                    && (childR.getFlags() & FLAG_FOREGROUND_SERVICE) == 0
                     && (flagChecker == null || flagChecker.apply(childR.getFlags()))) {
                 EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, childSbn.getId(),
                         childSbn.getTag(), userId, 0, 0, reason, listenerName);
diff --git a/services/core/java/com/android/server/notification/RankingHelper.java b/services/core/java/com/android/server/notification/RankingHelper.java
index febce31..7f141ee 100644
--- a/services/core/java/com/android/server/notification/RankingHelper.java
+++ b/services/core/java/com/android/server/notification/RankingHelper.java
@@ -116,17 +116,12 @@
     private final ArrayMap<String, Record> mRecords = new ArrayMap<>(); // pkg|uid => Record
     private final ArrayMap<String, NotificationRecord> mProxyByGroupTmp = new ArrayMap<>();
     private final ArrayMap<String, Record> mRestoredWithoutUids = new ArrayMap<>(); // pkg => Record
-    private final ArrayMap<Pair<String, Integer>, Boolean> mSystemAppCache = new ArrayMap<>();
 
     private final Context mContext;
     private final RankingHandler mRankingHandler;
     private final PackageManager mPm;
     private SparseBooleanArray mBadgingEnabled;
 
-    private Signature[] mSystemSignature;
-    private String mPermissionControllerPackageName;
-    private String mServicesSystemSharedLibPackageName;
-    private String mSharedSystemSharedLibPackageName;
     private boolean mAreChannelsBypassingDnd;
     private ZenModeHelper mZenModeHelper;
 
@@ -161,7 +156,6 @@
             }
         }
 
-        getSignatures();
         updateChannelsBypassingDnd();
     }
 
@@ -623,7 +617,6 @@
         if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(channel.getId())) {
             throw new IllegalArgumentException("Reserved id");
         }
-        final boolean isSystemApp = isSystemPackage(pkg, uid);
         NotificationChannel existing = r.channels.get(channel.getId());
         // Keep most of the existing settings
         if (existing != null && fromTargetApp) {
@@ -651,7 +644,7 @@
 
             // system apps and dnd access apps can bypass dnd if the user hasn't changed any
             // fields on the channel yet
-            if (existing.getUserLockedFields() == 0 && (isSystemApp || hasDndAccess)) {
+            if (existing.getUserLockedFields() == 0 && hasDndAccess) {
                 boolean bypassDnd = channel.canBypassDnd();
                 existing.setBypassDnd(bypassDnd);
 
@@ -669,7 +662,7 @@
         }
 
         // Reset fields that apps aren't allowed to set.
-        if (fromTargetApp && !(isSystemApp || hasDndAccess)) {
+        if (fromTargetApp && !hasDndAccess) {
             channel.setBypassDnd(r.priority == Notification.PRIORITY_MAX);
         }
         if (fromTargetApp) {
@@ -695,65 +688,6 @@
         channel.unlockFields(channel.getUserLockedFields());
     }
 
-    /**
-     * Determine whether a package is a "system package", in which case certain things (like
-     * bypassing DND) should be allowed.
-     */
-    private boolean isSystemPackage(String pkg, int uid) {
-        Pair<String, Integer> app = new Pair(pkg, uid);
-        if (mSystemAppCache.containsKey(app)) {
-            return mSystemAppCache.get(app);
-        }
-
-        PackageInfo pi;
-        try {
-            pi = mPm.getPackageInfoAsUser(
-                    pkg, PackageManager.GET_SIGNATURES, UserHandle.getUserId(uid));
-        } catch (NameNotFoundException e) {
-            Slog.w(TAG, "Can't find pkg", e);
-            return false;
-        }
-        boolean isSystem = (mSystemSignature[0] != null
-                && mSystemSignature[0].equals(getFirstSignature(pi)))
-                || pkg.equals(mPermissionControllerPackageName)
-                || pkg.equals(mServicesSystemSharedLibPackageName)
-                || pkg.equals(mSharedSystemSharedLibPackageName)
-                || pkg.equals(PrintManager.PRINT_SPOOLER_PACKAGE_NAME)
-                || isDeviceProvisioningPackage(pkg);
-        mSystemAppCache.put(app, isSystem);
-        return isSystem;
-    }
-
-    private Signature getFirstSignature(PackageInfo pkg) {
-        if (pkg != null && pkg.signatures != null && pkg.signatures.length > 0) {
-            return pkg.signatures[0];
-        }
-        return null;
-    }
-
-    private Signature getSystemSignature() {
-        try {
-            final PackageInfo sys = mPm.getPackageInfoAsUser(
-                    "android", PackageManager.GET_SIGNATURES, UserHandle.USER_SYSTEM);
-            return getFirstSignature(sys);
-        } catch (NameNotFoundException e) {
-        }
-        return null;
-    }
-
-    private boolean isDeviceProvisioningPackage(String packageName) {
-        String deviceProvisioningPackage = mContext.getResources().getString(
-                com.android.internal.R.string.config_deviceProvisioningPackage);
-        return deviceProvisioningPackage != null && deviceProvisioningPackage.equals(packageName);
-    }
-
-    private void getSignatures() {
-        mSystemSignature = new Signature[]{getSystemSignature()};
-        mPermissionControllerPackageName = mPm.getPermissionControllerPackageName();
-        mServicesSystemSharedLibPackageName = mPm.getServicesSystemSharedLibraryPackageName();
-        mSharedSystemSharedLibPackageName = mPm.getSharedSystemSharedLibraryPackageName();
-    }
-
     @Override
     public void updateNotificationChannel(String pkg, int uid, NotificationChannel updatedChannel,
             boolean fromUser) {
diff --git a/services/core/java/com/android/server/notification/ZenModeHelper.java b/services/core/java/com/android/server/notification/ZenModeHelper.java
index 156f702..658c7f1 100644
--- a/services/core/java/com/android/server/notification/ZenModeHelper.java
+++ b/services/core/java/com/android/server/notification/ZenModeHelper.java
@@ -173,18 +173,6 @@
         }
     }
 
-    public boolean shouldSuppressWhenScreenOff() {
-        synchronized (mConfig) {
-            return !mConfig.allowWhenScreenOff;
-        }
-    }
-
-    public boolean shouldSuppressWhenScreenOn() {
-        synchronized (mConfig) {
-            return !mConfig.allowWhenScreenOn;
-        }
-    }
-
     public void addCallback(Callback callback) {
         mCallbacks.add(callback);
     }
@@ -592,14 +580,12 @@
             return;
         }
         pw.printf("allow(alarms=%b,media=%b,system=%b,calls=%b,callsFrom=%s,repeatCallers=%b,"
-                + "messages=%b,messagesFrom=%s,"
-                + "events=%b,reminders=%b,whenScreenOff=%b,whenScreenOn=%b)\n",
+                + "messages=%b,messagesFrom=%s,events=%b,reminders=%b)\n",
                 config.allowAlarms, config.allowMedia, config.allowSystem,
                 config.allowCalls, ZenModeConfig.sourceToString(config.allowCallsFrom),
                 config.allowRepeatCallers, config.allowMessages,
                 ZenModeConfig.sourceToString(config.allowMessagesFrom),
-                config.allowEvents, config.allowReminders, config.allowWhenScreenOff,
-                config.allowWhenScreenOn);
+                config.allowEvents, config.allowReminders);
         pw.printf(" disallow(visualEffects=%s)\n", config.suppressedVisualEffects);
         pw.print(prefix); pw.print("  manualRule="); pw.println(config.manualRule);
         if (config.automaticRules.isEmpty()) return;
@@ -1185,7 +1171,7 @@
 
     private void showZenUpgradeNotification(int zen) {
         final boolean showNotification = mIsBootComplete
-                && zen == Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS
+                && zen != Global.ZEN_MODE_OFF
                 && Settings.Global.getInt(mContext.getContentResolver(),
                 Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, 0) != 0;
 
@@ -1204,17 +1190,20 @@
                 mContext.getResources().getString(R.string.global_action_settings));
         int title = R.string.zen_upgrade_notification_title;
         int content = R.string.zen_upgrade_notification_content;
+        int drawable = R.drawable.ic_zen_24dp;
         if (NotificationManager.Policy.areAllVisualEffectsSuppressed(
                 getNotificationPolicy().suppressedVisualEffects)) {
             title = R.string.zen_upgrade_notification_visd_title;
             content = R.string.zen_upgrade_notification_visd_content;
+            drawable = R.drawable.ic_dnd_block_notifications;
         }
+
         Intent onboardingIntent = new Intent(Settings.ZEN_MODE_ONBOARDING);
         onboardingIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
         return new Notification.Builder(mContext, SystemNotificationChannels.DO_NOT_DISTURB)
                 .setAutoCancel(true)
                 .setSmallIcon(R.drawable.ic_settings_24dp)
-                .setLargeIcon(Icon.createWithResource(mContext, R.drawable.ic_zen_24dp))
+                .setLargeIcon(Icon.createWithResource(mContext, drawable))
                 .setContentTitle(mContext.getResources().getString(title))
                 .setContentText(mContext.getResources().getString(content))
                 .setContentIntent(PendingIntent.getActivity(mContext, 0, onboardingIntent,
diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
index fd51be5..8562572 100644
--- a/services/core/java/com/android/server/om/OverlayManagerService.java
+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
@@ -389,11 +389,16 @@
                     final PackageInfo pi = mPackageManager.getPackageInfo(packageName, userId,
                             false);
                     if (pi != null) {
+                        /*
+                         * Only update overlay settings when an overlay becomes enabled or disabled.
+                         * Enabling or disabling components of a target should not change the
+                         * target's overlays. Since, overlays do not have components, this will only
+                         * update overlay settings if an overlay package becomes enabled or
+                         * disabled.
+                         */
                         mPackageManager.cachePackageInfo(packageName, userId, pi);
                         if (pi.isOverlayPackage()) {
                             mImpl.onOverlayPackageChanged(packageName, userId);
-                        } else {
-                            mImpl.onTargetPackageChanged(packageName, userId);
                         }
                     }
                 }
diff --git a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
index c57f97b..bb36ab1 100644
--- a/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
+++ b/services/core/java/com/android/server/om/OverlayManagerServiceImpl.java
@@ -212,16 +212,6 @@
         }
     }
 
-    void onTargetPackageChanged(@NonNull final String packageName, final int userId) {
-        if (DEBUG) {
-            Slog.d(TAG, "onTargetPackageChanged packageName=" + packageName + " userId=" + userId);
-        }
-
-        if (updateAllOverlaysForTarget(packageName, userId, 0)) {
-            mListener.onOverlaysChanged(packageName, userId);
-        }
-    }
-
     void onTargetPackageUpgrading(@NonNull final String packageName, final int userId) {
         if (DEBUG) {
             Slog.d(TAG, "onTargetPackageUpgrading packageName=" + packageName + " userId="
diff --git a/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java b/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
index 2007a0e..97f6aa2 100644
--- a/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
+++ b/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
@@ -19,8 +19,10 @@
 import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
 
 import android.annotation.UserIdInt;
+import android.app.ActivityManagerInternal;
 import android.app.ActivityOptions;
 import android.app.AppOpsManager;
+import android.app.IApplicationThread;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -71,6 +73,7 @@
 
     @Override
     public void startActivityAsUser(
+            IApplicationThread caller,
             String callingPackage,
             ComponentName component,
             UserHandle user) throws RemoteException {
@@ -107,15 +110,12 @@
         launchIntent.setPackage(component.getPackageName());
         verifyActivityCanHandleIntentAndExported(launchIntent, component, callingUid, user);
 
-        final long ident = mInjector.clearCallingIdentity();
-        try {
-            launchIntent.setPackage(null);
-            launchIntent.setComponent(component);
-            mContext.startActivityAsUser(launchIntent,
-                    ActivityOptions.makeOpenCrossProfileAppsAnimation().toBundle(), user);
-        } finally {
-            mInjector.restoreCallingIdentity(ident);
-        }
+        launchIntent.setPackage(null);
+        launchIntent.setComponent(component);
+        mInjector.getActivityManagerInternal().startActivityAsUser(
+                caller, callingPackage, launchIntent,
+                ActivityOptions.makeOpenCrossProfileAppsAnimation().toBundle(),
+                user.getIdentifier());
     }
 
     private List<UserHandle> getTargetUserProfilesUnchecked(
@@ -236,6 +236,11 @@
         public AppOpsManager getAppOpsManager() {
             return mContext.getSystemService(AppOpsManager.class);
         }
+
+        @Override
+        public ActivityManagerInternal getActivityManagerInternal() {
+            return LocalServices.getService(ActivityManagerInternal.class);
+        }
     }
 
     @VisibleForTesting
@@ -258,5 +263,6 @@
 
         AppOpsManager getAppOpsManager();
 
+        ActivityManagerInternal getActivityManagerInternal();
     }
 }
diff --git a/services/core/java/com/android/server/pm/InstantAppResolver.java b/services/core/java/com/android/server/pm/InstantAppResolver.java
index dbf0940..d0a3757 100644
--- a/services/core/java/com/android/server/pm/InstantAppResolver.java
+++ b/services/core/java/com/android/server/pm/InstantAppResolver.java
@@ -16,6 +16,8 @@
 
 package com.android.server.pm;
 
+import static android.content.Intent.FLAG_ACTIVITY_MATCH_EXTERNAL;
+
 import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_INSTANT_APP_RESOLUTION_PHASE_ONE;
 import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_INSTANT_APP_RESOLUTION_PHASE_TWO;
 import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_INSTANT_APP_LAUNCH_TOKEN;
@@ -366,6 +368,7 @@
         final Intent failureIntent = new Intent(origIntent);
         boolean requiresSecondPhase = false;
         failureIntent.setFlags(failureIntent.getFlags() | Intent.FLAG_IGNORE_EPHEMERAL);
+        failureIntent.setFlags(failureIntent.getFlags() & ~Intent.FLAG_ACTIVITY_MATCH_EXTERNAL);
         failureIntent.setLaunchToken(token);
         ArrayList<AuxiliaryResolveInfo.AuxiliaryFilter> filters = null;
         boolean isWebIntent = origIntent.isWebIntent();
@@ -408,6 +411,10 @@
         if (filters != null && !filters.isEmpty()) {
             return new AuxiliaryResolveInfo(token, requiresSecondPhase, failureIntent, filters);
         }
+        // if the match external flag is set, return an empty resolve info
+        if ((origIntent.getFlags() & FLAG_ACTIVITY_MATCH_EXTERNAL) != 0) {
+            return new AuxiliaryResolveInfo(token, false, failureIntent, null /* filters */);
+        }
         // Hash or filter mis-match; no instant apps for this domain.
         return null;
     }
diff --git a/services/core/java/com/android/server/pm/LauncherAppsService.java b/services/core/java/com/android/server/pm/LauncherAppsService.java
index 595de9e..feac8e6 100644
--- a/services/core/java/com/android/server/pm/LauncherAppsService.java
+++ b/services/core/java/com/android/server/pm/LauncherAppsService.java
@@ -21,6 +21,7 @@
 import android.app.ActivityManager;
 import android.app.ActivityManagerInternal;
 import android.app.AppGlobals;
+import android.app.IApplicationThread;
 import android.app.PendingIntent;
 import android.content.ComponentName;
 import android.content.Context;
@@ -560,7 +561,7 @@
         }
 
         @Override
-        public void startActivityAsUser(String callingPackage,
+        public void startActivityAsUser(IApplicationThread caller, String callingPackage,
                 ComponentName component, Rect sourceBounds,
                 Bundle opts, UserHandle user) throws RemoteException {
             if (!canAccessProfile(user.getIdentifier(), "Cannot start activity")) {
@@ -574,6 +575,8 @@
                     | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
             launchIntent.setPackage(component.getPackageName());
 
+            boolean canLaunch = false;
+
             final int callingUid = injectBinderCallingUid();
             long ident = Binder.clearCallingIdentity();
             try {
@@ -604,35 +607,42 @@
                         // this component so ok to launch.
                         launchIntent.setPackage(null);
                         launchIntent.setComponent(component);
-                        mContext.startActivityAsUser(launchIntent, opts, user);
-                        return;
+                        canLaunch = true;
+                        break;
                     }
                 }
-                throw new SecurityException("Attempt to launch activity without "
-                        + " category Intent.CATEGORY_LAUNCHER " + component);
+                if (!canLaunch) {
+                    throw new SecurityException("Attempt to launch activity without "
+                            + " category Intent.CATEGORY_LAUNCHER " + component);
+                }
             } finally {
                 Binder.restoreCallingIdentity(ident);
             }
+            mActivityManagerInternal.startActivityAsUser(caller, callingPackage,
+                    launchIntent, opts, user.getIdentifier());
         }
 
         @Override
-        public void showAppDetailsAsUser(String callingPackage, ComponentName component,
+        public void showAppDetailsAsUser(IApplicationThread caller,
+                String callingPackage, ComponentName component,
                 Rect sourceBounds, Bundle opts, UserHandle user) throws RemoteException {
             if (!canAccessProfile(user.getIdentifier(), "Cannot show app details")) {
                 return;
             }
 
+            final Intent intent;
             long ident = Binder.clearCallingIdentity();
             try {
                 String packageName = component.getPackageName();
-                Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
+                intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
                         Uri.fromParts("package", packageName, null));
                 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
                 intent.setSourceBounds(sourceBounds);
-                mContext.startActivityAsUser(intent, opts, user);
             } finally {
                 Binder.restoreCallingIdentity(ident);
             }
+            mActivityManagerInternal.startActivityAsUser(caller, callingPackage,
+                    intent, opts, user.getIdentifier());
         }
 
         /** Checks if user is a profile of or same as listeningUser.
diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java
index f7a0215..fa934fe 100644
--- a/services/core/java/com/android/server/pm/PackageInstallerSession.java
+++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java
@@ -17,7 +17,6 @@
 package com.android.server.pm;
 
 import static android.content.pm.PackageManager.INSTALL_FAILED_ABORTED;
-import static android.content.pm.PackageManager.INSTALL_FAILED_BAD_DEX_METADATA;
 import static android.content.pm.PackageManager.INSTALL_FAILED_CONTAINER_ERROR;
 import static android.content.pm.PackageManager.INSTALL_FAILED_INSUFFICIENT_STORAGE;
 import static android.content.pm.PackageManager.INSTALL_FAILED_INTERNAL_ERROR;
@@ -74,6 +73,7 @@
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.RevocableFileDescriptor;
+import android.os.SystemProperties;
 import android.os.UserHandle;
 import android.os.storage.StorageManager;
 import android.system.ErrnoException;
@@ -111,9 +111,9 @@
 import java.io.FileFilter;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.security.cert.CertificateException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
@@ -154,6 +154,8 @@
     private static final String ATTR_NAME = "name";
     private static final String ATTR_INSTALL_REASON = "installRason";
 
+    private static final String PROPERTY_NAME_INHERIT_NATIVE = "pi.inherit_native_on_dont_kill";
+
     // TODO: enforce INSTALL_ALLOW_TEST
     // TODO: enforce INSTALL_ALLOW_DOWNGRADE
 
@@ -255,6 +257,8 @@
     @GuardedBy("mLock")
     private final List<String> mResolvedInstructionSets = new ArrayList<>();
     @GuardedBy("mLock")
+    private final List<String> mResolvedNativeLibPaths = new ArrayList<>();
+    @GuardedBy("mLock")
     private File mInheritedFilesBase;
 
     private static final FileFilter sAddedFilter = new FileFilter() {
@@ -971,6 +975,26 @@
                         final File oatDir = new File(toDir, "oat");
                         createOatDirs(mResolvedInstructionSets, oatDir);
                     }
+                    // pre-create lib dirs for linking if necessary
+                    if (!mResolvedNativeLibPaths.isEmpty()) {
+                        for (String libPath : mResolvedNativeLibPaths) {
+                            // "/lib/arm64" -> ["lib", "arm64"]
+                            final int splitIndex = libPath.lastIndexOf('/');
+                            if (splitIndex < 0 || splitIndex >= libPath.length() - 1) {
+                                Slog.e(TAG, "Skipping native library creation for linking due to "
+                                        + "invalid path: " + libPath);
+                                continue;
+                            }
+                            final String libDirPath = libPath.substring(1, splitIndex);
+                            final File libDir = new File(toDir, libDirPath);
+                            if (!libDir.exists()) {
+                                NativeLibraryHelper.createNativeLibrarySubdir(libDir);
+                            }
+                            final String archDirPath = libPath.substring(splitIndex + 1);
+                            NativeLibraryHelper.createNativeLibrarySubdir(
+                                    new File(libDir, archDirPath));
+                        }
+                    }
                     linkFiles(fromFiles, toDir, mInheritedFilesBase);
                 } else {
                     // TODO: this should delegate to DCS so the system process
@@ -988,7 +1012,7 @@
         computeProgressLocked(true);
 
         // Unpack native libraries
-        extractNativeLibraries(mResolvedStageDir, params.abiOverride);
+        extractNativeLibraries(mResolvedStageDir, params.abiOverride, mayInheritNativeLibs());
 
         // We've reached point of no return; call into PMS to install the stage.
         // Regardless of success or failure we always destroy session.
@@ -1028,6 +1052,17 @@
     }
 
     /**
+     * Returns true if the session should attempt to inherit any existing native libraries already
+     * extracted at the current install location. This is necessary to prevent double loading of
+     * native libraries already loaded by the running app.
+     */
+    private boolean mayInheritNativeLibs() {
+        return SystemProperties.getBoolean(PROPERTY_NAME_INHERIT_NATIVE, true) &&
+                params.mode == SessionParams.MODE_INHERIT_EXISTING &&
+                (params.installFlags & PackageManager.DONT_KILL_APP) != 0;
+    }
+
+    /**
      * Validate install by confirming that all application packages are have
      * consistent package name, version code, and signing certificates.
      * <p>
@@ -1249,6 +1284,38 @@
                     }
                 }
             }
+
+            // Inherit native libraries for DONT_KILL sessions.
+            if (mayInheritNativeLibs() && removeSplitList.isEmpty()) {
+                File[] libDirs = new File[]{
+                        new File(packageInstallDir, NativeLibraryHelper.LIB_DIR_NAME),
+                        new File(packageInstallDir, NativeLibraryHelper.LIB64_DIR_NAME)};
+                for (File libDir : libDirs) {
+                    if (!libDir.exists() || !libDir.isDirectory()) {
+                        continue;
+                    }
+                    final List<File> libDirsToInherit = new LinkedList<>();
+                    for (File archSubDir : libDir.listFiles()) {
+                        if (!archSubDir.isDirectory()) {
+                            continue;
+                        }
+                        String relLibPath;
+                        try {
+                            relLibPath = getRelativePath(archSubDir, packageInstallDir);
+                        } catch (IOException e) {
+                            Slog.e(TAG, "Skipping linking of native library directory!", e);
+                            // shouldn't be possible, but let's avoid inheriting these to be safe
+                            libDirsToInherit.clear();
+                            break;
+                        }
+                        if (!mResolvedNativeLibPaths.contains(relLibPath)) {
+                            mResolvedNativeLibPaths.add(relLibPath);
+                        }
+                        libDirsToInherit.addAll(Arrays.asList(archSubDir.listFiles()));
+                    }
+                    mResolvedInheritedFiles.addAll(libDirsToInherit);
+                }
+            }
         }
     }
 
@@ -1374,11 +1441,13 @@
         Slog.d(TAG, "Copied " + fromFiles.size() + " files into " + toDir);
     }
 
-    private static void extractNativeLibraries(File packageDir, String abiOverride)
+    private static void extractNativeLibraries(File packageDir, String abiOverride, boolean inherit)
             throws PackageManagerException {
-        // Always start from a clean slate
         final File libDir = new File(packageDir, NativeLibraryHelper.LIB_DIR_NAME);
-        NativeLibraryHelper.removeNativeBinariesFromDirLI(libDir, true);
+        if (!inherit) {
+            // Start from a clean slate
+            NativeLibraryHelper.removeNativeBinariesFromDirLI(libDir, true);
+        }
 
         NativeLibraryHelper.Handle handle = null;
         try {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index bb1f5c0..84e9d02 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -88,11 +88,11 @@
 import static android.os.storage.StorageManager.FLAG_STORAGE_DE;
 import static android.system.OsConstants.O_CREAT;
 import static android.system.OsConstants.O_RDWR;
+
 import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_MANAGED_PROFILE;
 import static com.android.internal.app.IntentForwarderActivity.FORWARD_INTENT_TO_PARENT;
 import static com.android.internal.content.NativeLibraryHelper.LIB64_DIR_NAME;
 import static com.android.internal.content.NativeLibraryHelper.LIB_DIR_NAME;
-import static com.android.internal.util.ArrayUtils.appendElement;
 import static com.android.internal.util.ArrayUtils.appendInt;
 import static com.android.server.pm.InstructionSets.getAppDexInstructionSets;
 import static com.android.server.pm.InstructionSets.getDexCodeInstructionSet;
@@ -275,7 +275,6 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.app.IMediaContainerService;
 import com.android.internal.app.ResolverActivity;
-import com.android.internal.app.SuspendedAppActivity;
 import com.android.internal.content.NativeLibraryHelper;
 import com.android.internal.content.PackageHelper;
 import com.android.internal.logging.MetricsLogger;
@@ -411,7 +410,7 @@
     static final boolean DEBUG_DOMAIN_VERIFICATION = false;
     private static final boolean DEBUG_BACKUP = false;
     public static final boolean DEBUG_INSTALL = false;
-    public static final boolean DEBUG_REMOVE = true;
+    public static final boolean DEBUG_REMOVE = false;
     private static final boolean DEBUG_BROADCASTS = false;
     private static final boolean DEBUG_SHOW_INFO = false;
     private static final boolean DEBUG_PACKAGE_INFO = false;
@@ -8429,7 +8428,7 @@
 
                 // Delete invalid userdata apps
                 if ((scanFlags & SCAN_AS_SYSTEM) == 0 &&
-                        errorCode == PackageManager.INSTALL_FAILED_INVALID_APK) {
+                        errorCode != PackageManager.INSTALL_SUCCEEDED) {
                     logCriticalInfo(Log.WARN,
                             "Deleting invalid package at " + parseResult.scanFile);
                     removeCodePathLI(parseResult.scanFile);
@@ -14031,13 +14030,10 @@
                             + Manifest.permission.MANAGE_USERS);
         }
         final int callingUid = Binder.getCallingUid();
-        mPermissionManager.enforceCrossUserPermission(callingUid, userId,
-                true /* requireFullPermission */, true /* checkShell */,
-                "setPackagesSuspended for user " + userId);
-        if (callingUid != Process.ROOT_UID &&
-                !UserHandle.isSameApp(getPackageUid(callingPackage, 0, userId), callingUid)) {
-            throw new IllegalArgumentException("CallingPackage " + callingPackage + " does not"
-                    + " belong to calling app id " + UserHandle.getAppId(callingUid));
+        if (callingUid != Process.ROOT_UID && callingUid != Process.SYSTEM_UID
+                && getPackageUid(callingPackage, 0, userId) != callingUid) {
+            throw new SecurityException("Calling package " + callingPackage + " in user "
+                    + userId + " does not belong to calling uid " + callingUid);
         }
         if (!PLATFORM_PACKAGE_NAME.equals(callingPackage)
                 && mProtectedPackages.getDeviceOwnerOrProfileOwnerPackage(userId) != null) {
@@ -14164,9 +14160,19 @@
         }
     }
 
-    void onSuspendingPackageRemoved(String packageName, int removedForUser) {
-        final int[] userIds = (removedForUser == UserHandle.USER_ALL) ? sUserManager.getUserIds()
-                : new int[] {removedForUser};
+    /**
+     * Immediately unsuspends any packages suspended by the given package. To be called
+     * when such a package's data is cleared or it is removed from the device.
+     *
+     * <p><b>Should not be used on a frequent code path</b> as it flushes state to disk
+     * synchronously
+     *
+     * @param packageName The package holding {@link Manifest.permission#SUSPEND_APPS} permission
+     * @param affectedUser The user for which the changes are taking place.
+     */
+    void unsuspendForSuspendingPackage(String packageName, int affectedUser) {
+        final int[] userIds = (affectedUser == UserHandle.USER_ALL) ? sUserManager.getUserIds()
+                : new int[] {affectedUser};
         for (int userId : userIds) {
             List<String> affectedPackages = new ArrayList<>();
             synchronized (mPackages) {
@@ -14183,6 +14189,8 @@
                         new String[affectedPackages.size()]);
                 sendMyPackageSuspendedOrUnsuspended(packageArray, false, null, userId);
                 sendPackagesSuspendedForUser(packageArray, userId, false, null);
+                // Write package restrictions immediately to avoid an inconsistent state.
+                mSettings.writePackageRestrictionsLPr(userId);
             }
         }
     }
@@ -16403,22 +16411,6 @@
         }
     }
 
-    @Override
-    public List<String> getPreviousCodePaths(String packageName) {
-        final int callingUid = Binder.getCallingUid();
-        final List<String> result = new ArrayList<>();
-        if (getInstantAppPackageName(callingUid) != null) {
-            return result;
-        }
-        final PackageSetting ps = mSettings.mPackages.get(packageName);
-        if (ps != null
-                && ps.oldCodePaths != null
-                && !filterAppAccessLPr(ps, callingUid, UserHandle.getUserId(callingUid))) {
-            result.addAll(ps.oldCodePaths);
-        }
-        return result;
-    }
-
     private void replaceNonSystemPackageLIF(PackageParser.Package deletedPackage,
             PackageParser.Package pkg, final @ParseFlags int parseFlags,
             final @ScanFlags int scanFlags, UserHandle user, int[] allUsers,
@@ -18774,7 +18766,7 @@
 
         final int userId = user == null ? UserHandle.USER_ALL : user.getIdentifier();
         if (ps.getPermissionsState().hasPermission(Manifest.permission.SUSPEND_APPS, userId)) {
-            onSuspendingPackageRemoved(packageName, userId);
+            unsuspendForSuspendingPackage(packageName, userId);
         }
 
 
@@ -18915,10 +18907,10 @@
                     true /*notLaunched*/,
                     false /*hidden*/,
                     false /*suspended*/,
-                    null, /*suspendingPackage*/
-                    null, /*dialogMessage*/
-                    null, /*suspendedAppExtras*/
-                    null, /*suspendedLauncherExtras*/
+                    null /*suspendingPackage*/,
+                    null /*dialogMessage*/,
+                    null /*suspendedAppExtras*/,
+                    null /*suspendedLauncherExtras*/,
                     false /*instantApp*/,
                     false /*virtualPreload*/,
                     null /*lastDisableAppCaller*/,
@@ -19105,6 +19097,10 @@
                         if (dsm != null) {
                             dsm.checkMemory();
                         }
+                        if (checkPermission(Manifest.permission.SUSPEND_APPS, packageName, userId)
+                                == PERMISSION_GRANTED) {
+                            unsuspendForSuspendingPackage(packageName, userId);
+                        }
                     }
                 } else {
                     succeeded = false;
@@ -22462,9 +22458,13 @@
         }
         final String volumeUuid = pkg.volumeUuid;
         final String packageName = pkg.packageName;
-        final ApplicationInfo app = (ps == null)
+
+        ApplicationInfo app = (ps == null)
                 ? pkg.applicationInfo
                 : PackageParser.generateApplicationInfo(pkg, 0, ps.readUserState(userId), userId);
+        if (app == null) {
+            app = pkg.applicationInfo;
+        }
 
         final int appId = UserHandle.getAppId(app.uid);
 
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 898ecf3..5c6338d 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -734,10 +734,10 @@
                                 true /*notLaunched*/,
                                 false /*hidden*/,
                                 false /*suspended*/,
-                                null, /*suspendingPackage*/
-                                null, /*dialogMessage*/
-                                null, /*suspendedAppExtras*/
-                                null, /*suspendedLauncherExtras*/
+                                null /*suspendingPackage*/,
+                                null /*dialogMessage*/,
+                                null /*suspendedAppExtras*/,
+                                null /*suspendedLauncherExtras*/,
                                 instantApp,
                                 virtualPreload,
                                 null /*lastDisableAppCaller*/,
@@ -844,7 +844,12 @@
         }
         // If what we are scanning is a system (and possibly privileged) package,
         // then make it so, regardless of whether it was previously installed only
-        // in the data partition.
+        // in the data partition. Reset first.
+        pkgSetting.pkgFlags &= ~ApplicationInfo.FLAG_SYSTEM;
+        pkgSetting.pkgPrivateFlags &= ~(ApplicationInfo.PRIVATE_FLAG_PRIVILEGED
+                | ApplicationInfo.PRIVATE_FLAG_OEM
+                | ApplicationInfo.PRIVATE_FLAG_VENDOR
+                | ApplicationInfo.PRIVATE_FLAG_PRODUCT);
         pkgSetting.pkgFlags |= pkgFlags & ApplicationInfo.FLAG_SYSTEM;
         pkgSetting.pkgPrivateFlags |=
                 pkgPrivateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
@@ -1629,10 +1634,10 @@
                                 false /*notLaunched*/,
                                 false /*hidden*/,
                                 false /*suspended*/,
-                                null, /*suspendingPackage*/
-                                null, /*dialogMessage*/
-                                null, /*suspendedAppExtras*/
-                                null, /*suspendedLauncherExtras*/
+                                null /*suspendingPackage*/,
+                                null /*dialogMessage*/,
+                                null /*suspendedAppExtras*/,
+                                null /*suspendedLauncherExtras*/,
                                 false /*instantApp*/,
                                 false /*virtualPreload*/,
                                 null /*lastDisableAppCaller*/,
diff --git a/services/core/java/com/android/server/pm/UserDataPreparer.java b/services/core/java/com/android/server/pm/UserDataPreparer.java
index 96c102b..045a295 100644
--- a/services/core/java/com/android/server/pm/UserDataPreparer.java
+++ b/services/core/java/com/android/server/pm/UserDataPreparer.java
@@ -24,6 +24,8 @@
 import android.os.FileUtils;
 import android.os.storage.StorageManager;
 import android.os.storage.VolumeInfo;
+import android.os.SystemProperties;
+import android.os.UserHandle;
 import android.system.ErrnoException;
 import android.system.Os;
 import android.system.OsConstants;
@@ -96,6 +98,14 @@
             }
 
             mInstaller.createUserData(volumeUuid, userId, userSerial, flags);
+
+            // CE storage is available after they are prepared.
+            if ((flags & StorageManager.FLAG_STORAGE_CE) != 0 &&
+                    (userId == UserHandle.USER_SYSTEM)) {
+                String propertyName = "sys.user." + userId + ".ce_available";
+                Slog.d(TAG, "Setting property: " + propertyName + "=true");
+                SystemProperties.set(propertyName, "true");
+            }
         } catch (Exception e) {
             logCriticalInfo(Log.WARN, "Destroying user " + userId + " on volume " + volumeUuid
                     + " because we failed to prepare: " + e);
@@ -103,7 +113,8 @@
 
             if (allowRecover) {
                 // Try one last time; if we fail again we're really in trouble
-                prepareUserDataLI(volumeUuid, userId, userSerial, flags, false);
+                prepareUserDataLI(volumeUuid, userId, userSerial,
+                    flags | StorageManager.FLAG_STORAGE_DE, false);
             }
         }
     }
diff --git a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
index 4055a47..c9aa1ef 100644
--- a/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java
@@ -841,6 +841,14 @@
             }
         }
 
+        // There is no real "marker" interface to identify the shared storage backup, it is
+        // hardcoded in BackupManagerService.SHARED_BACKUP_AGENT_PACKAGE.
+        PackageParser.Package sharedStorageBackupPackage = getSystemPackage(
+                "com.android.sharedstoragebackup");
+        if (sharedStorageBackupPackage != null) {
+            grantRuntimePermissions(sharedStorageBackupPackage, STORAGE_PERMISSIONS, true, userId);
+        }
+
         if (mPermissionGrantedCallback != null) {
             mPermissionGrantedCallback.onDefaultRuntimePermissionsGranted(userId);
         }
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 f659225..d3526f7 100644
--- a/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
+++ b/services/core/java/com/android/server/pm/permission/PermissionManagerService.java
@@ -1953,7 +1953,7 @@
                     UserManager.DISALLOW_DEBUGGING_FEATURES, callingUid, userId);
         }
         if (userId == UserHandle.getUserId(callingUid)) return;
-        if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
+        if (callingUid != Process.SYSTEM_UID && callingUid != Process.ROOT_UID) {
             if (requireFullPermission) {
                 mContext.enforceCallingOrSelfPermission(
                         android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, message);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 1d5b1a3..18f3434 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -234,6 +234,7 @@
 import android.util.proto.ProtoOutputStream;
 import android.view.Display;
 import android.view.DisplayCutout;
+import android.view.DisplayInfo;
 import android.view.Gravity;
 import android.view.HapticFeedbackConstants;
 import android.view.IApplicationToken;
@@ -7191,14 +7192,35 @@
     }
 
     @Override
-    public boolean isDockSideAllowed(int dockSide) {
+    public boolean isDockSideAllowed(int dockSide, int originalDockSide, int displayWidth,
+            int displayHeight, int displayRotation) {
+        final int barPosition = navigationBarPosition(displayWidth, displayHeight, displayRotation);
+        return isDockSideAllowed(dockSide, originalDockSide, barPosition, mNavigationBarCanMove);
+    }
 
-        // We do not allow all dock sides at which the navigation bar touches the docked stack.
-        if (!mNavigationBarCanMove) {
-            return dockSide == DOCKED_TOP || dockSide == DOCKED_LEFT || dockSide == DOCKED_RIGHT;
-        } else {
-            return dockSide == DOCKED_TOP || dockSide == DOCKED_LEFT;
+    @VisibleForTesting
+    static boolean isDockSideAllowed(int dockSide, int originalDockSide,
+            int navBarPosition, boolean navigationBarCanMove) {
+        if (dockSide == DOCKED_TOP) {
+            return true;
         }
+
+        if (navigationBarCanMove) {
+            // Only allow the dockside opposite to the nav bar position in landscape
+            return dockSide == DOCKED_LEFT && navBarPosition == NAV_BAR_RIGHT
+                    || dockSide == DOCKED_RIGHT && navBarPosition == NAV_BAR_LEFT;
+        }
+
+        // Side is the same as original side
+        if (dockSide == originalDockSide) {
+            return true;
+        }
+
+        // Only if original docked side was top in portrait will allow left for landscape
+        if (dockSide == DOCKED_LEFT && originalDockSide == DOCKED_TOP) {
+            return true;
+        }
+        return false;
     }
 
     void sendCloseSystemWindows() {
diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
index ccbf502..8690a83 100644
--- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java
+++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java
@@ -1706,11 +1706,19 @@
             DisplayCutout displayCutout, Rect outInsets);
 
     /**
+     * @param displayRotation the current display rotation
+     * @param displayWidth the current display width
+     * @param displayHeight the current display height
+     * @param dockSide the dockside asking if allowed
+     * @param originalDockSide the side that was original docked to in split screen
      * @return True if a specified {@param dockSide} is allowed on the current device, or false
      *         otherwise. It is guaranteed that at least one dock side for a particular orientation
      *         is allowed, so for example, if DOCKED_RIGHT is not allowed, DOCKED_LEFT is allowed.
+     *         If navigation bar is movable then the docked side would bias towards the
+     *         {@param originalDockSide}.
      */
-    public boolean isDockSideAllowed(int dockSide);
+    public boolean isDockSideAllowed(int dockSide, int originalDockSide, int displayWidth,
+            int displayHeight, int displayRotation);
 
     /**
      * Called when the configuration has changed, and it's safe to load new values from resources.
diff --git a/services/core/java/com/android/server/power/Notifier.java b/services/core/java/com/android/server/power/Notifier.java
index 20283a7..a492672 100644
--- a/services/core/java/com/android/server/power/Notifier.java
+++ b/services/core/java/com/android/server/power/Notifier.java
@@ -719,13 +719,14 @@
      * Plays the wireless charging sound for both wireless and non-wireless charging
      */
     private void playChargingStartedSound() {
-        // TODO (b/77912907): add back charging sound enabled check & default to charging sounds ON
+        final boolean enabled = Settings.Global.getInt(mContext.getContentResolver(),
+                Settings.Global.CHARGING_SOUNDS_ENABLED, 1) != 0;
         final boolean dndOff = Settings.Global.getInt(mContext.getContentResolver(),
                 Settings.Global.ZEN_MODE, Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS)
                 == Settings.Global.ZEN_MODE_OFF;
         final String soundPath = Settings.Global.getString(mContext.getContentResolver(),
                 Settings.Global.CHARGING_STARTED_SOUND);
-        if (dndOff && soundPath != null) {
+        if (enabled && dndOff && soundPath != null) {
             final Uri soundUri = Uri.parse("file://" + soundPath);
             if (soundUri != null) {
                 final Ringtone sfx = RingtoneManager.getRingtone(mContext, soundUri);
diff --git a/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java b/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
index c527533..cb84cf3 100644
--- a/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
+++ b/services/core/java/com/android/server/power/batterysaver/BatterySaverController.java
@@ -90,6 +90,16 @@
      */
     private final Plugin[] mPlugins;
 
+    public static final int REASON_AUTOMATIC_ON = 0;
+    public static final int REASON_AUTOMATIC_OFF = 1;
+    public static final int REASON_MANUAL_ON = 2;
+    public static final int REASON_MANUAL_OFF = 3;
+    public static final int REASON_STICKY_RESTORE = 4;
+    public static final int REASON_INTERACTIVE_CHANGED = 5;
+    public static final int REASON_POLICY_CHANGED = 6;
+    public static final int REASON_PLUGGED_IN = 7;
+    public static final int REASON_SETTING_CHANGED = 8;
+
     /**
      * Plugin interface. All methods are guaranteed to be called on the same (handler) thread.
      */
@@ -113,7 +123,8 @@
                         return; // No need to send it if not enabled.
                     }
                     // Don't send the broadcast, because we never did so in this case.
-                    mHandler.postStateChanged(/*sendBroadcast=*/ false);
+                    mHandler.postStateChanged(/*sendBroadcast=*/ false,
+                            REASON_INTERACTIVE_CHANGED);
                     break;
                 case Intent.ACTION_BATTERY_CHANGED:
                     synchronized (mLock) {
@@ -184,7 +195,7 @@
         if (!isEnabled()) {
             return; // No need to send it if not enabled.
         }
-        mHandler.postStateChanged(/*sendBroadcast=*/ true);
+        mHandler.postStateChanged(/*sendBroadcast=*/ true, REASON_POLICY_CHANGED);
     }
 
     private class MyHandler extends Handler {
@@ -199,9 +210,9 @@
             super(looper);
         }
 
-        public void postStateChanged(boolean sendBroadcast) {
+        public void postStateChanged(boolean sendBroadcast, int reason) {
             obtainMessage(MSG_STATE_CHANGED, sendBroadcast ?
-                    ARG_SEND_BROADCAST : ARG_DONT_SEND_BROADCAST, 0).sendToTarget();
+                    ARG_SEND_BROADCAST : ARG_DONT_SEND_BROADCAST, reason).sendToTarget();
         }
 
         public void postSystemReady() {
@@ -212,7 +223,9 @@
         public void dispatchMessage(Message msg) {
             switch (msg.what) {
                 case MSG_STATE_CHANGED:
-                    handleBatterySaverStateChanged(msg.arg1 == ARG_SEND_BROADCAST);
+                    handleBatterySaverStateChanged(
+                            msg.arg1 == ARG_SEND_BROADCAST,
+                            msg.arg2);
                     break;
 
                 case MSG_SYSTEM_READY:
@@ -227,14 +240,14 @@
     /**
      * Called by {@link PowerManagerService} to update the battery saver stete.
      */
-    public void enableBatterySaver(boolean enable) {
+    public void enableBatterySaver(boolean enable, int reason) {
         synchronized (mLock) {
             if (mEnabled == enable) {
                 return;
             }
             mEnabled = enable;
 
-            mHandler.postStateChanged(/*sendBroadcast=*/ true);
+            mHandler.postStateChanged(/*sendBroadcast=*/ true, reason);
         }
     }
 
@@ -275,7 +288,7 @@
      * - When battery saver is on the interactive state changes.
      * - When battery saver is on the battery saver policy changes.
      */
-    void handleBatterySaverStateChanged(boolean sendBroadcast) {
+    void handleBatterySaverStateChanged(boolean sendBroadcast, int reason) {
         final LowPowerModeListener[] listeners;
 
         final boolean enabled;
@@ -287,7 +300,8 @@
                     mPreviouslyEnabled ? 1 : 0, // Previously off or on.
                     mEnabled ? 1 : 0, // Now off or on.
                     isInteractive ?  1 : 0, // Device interactive state.
-                    mEnabled ? mBatterySaverPolicy.toEventLogString() : "");
+                    mEnabled ? mBatterySaverPolicy.toEventLogString() : "",
+                    reason);
             mPreviouslyEnabled = mEnabled;
 
             listeners = mListeners.toArray(new LowPowerModeListener[mListeners.size()]);
diff --git a/services/core/java/com/android/server/power/batterysaver/BatterySaverStateMachine.java b/services/core/java/com/android/server/power/batterysaver/BatterySaverStateMachine.java
index 2860521..b9f31b1 100644
--- a/services/core/java/com/android/server/power/batterysaver/BatterySaverStateMachine.java
+++ b/services/core/java/com/android/server/power/batterysaver/BatterySaverStateMachine.java
@@ -18,6 +18,7 @@
 import android.content.ContentResolver;
 import android.content.Context;
 import android.database.ContentObserver;
+import android.os.Handler;
 import android.os.UserHandle;
 import android.provider.Settings;
 import android.provider.Settings.Global;
@@ -27,6 +28,7 @@
 import com.android.internal.annotations.GuardedBy;
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.os.BackgroundThread;
+import com.android.server.EventLogTags;
 import com.android.server.power.BatterySaverPolicy;
 import com.android.server.power.BatterySaverStateMachineProto;
 
@@ -95,6 +97,18 @@
     @GuardedBy("mLock")
     private boolean mBatterySaverSnoozing;
 
+    /**
+     * Last reason passed to {@link #enableBatterySaverLocked}.
+     */
+    @GuardedBy("mLock")
+    private int mLastChangedIntReason;
+
+    /**
+     * Last reason passed to {@link #enableBatterySaverLocked}.
+     */
+    @GuardedBy("mLock")
+    private String mLastChangedStrReason;
+
     private final ContentObserver mSettingsObserver = new ContentObserver(null) {
         @Override
         public void onChange(boolean selfChange) {
@@ -149,11 +163,25 @@
         });
     }
 
+    /**
+     * Run a {@link Runnable} on a background handler.
+     */
     @VisibleForTesting
     void runOnBgThread(Runnable r) {
         BackgroundThread.getHandler().post(r);
     }
 
+    /**
+     * Run a {@link Runnable} on a background handler, but lazily. If the same {@link Runnable},
+     * it'll be first removed before a new one is posted.
+     */
+    @VisibleForTesting
+    void runOnBgThreadLazy(Runnable r, int delayMillis) {
+        final Handler h = BackgroundThread.getHandler();
+        h.removeCallbacks(r);
+        h.postDelayed(r, delayMillis);
+    }
+
     void refreshSettingsLocked() {
         final ContentResolver cr = mContext.getContentResolver();
 
@@ -199,14 +227,23 @@
         mSettingBatterySaverEnabledSticky = batterySaverEnabledSticky;
         mSettingBatterySaverTriggerThreshold = batterySaverTriggerThreshold;
 
+        if (thresholdChanged) {
+            // To avoid spamming the event log, we throttle logging here.
+            runOnBgThreadLazy(mThresholdChangeLogger, 2000);
+        }
+
         if (enabledChanged) {
             final String reason = batterySaverEnabled
                     ? "Global.low_power changed to 1" : "Global.low_power changed to 0";
             enableBatterySaverLocked(/*enable=*/ batterySaverEnabled, /*manual=*/ true,
-                    reason);
+                    BatterySaverController.REASON_SETTING_CHANGED, reason);
         }
     }
 
+    private final Runnable mThresholdChangeLogger = () -> {
+        EventLogTags.writeBatterySaverSetting(mSettingBatterySaverTriggerThreshold);
+    };
+
     /**
      * {@link com.android.server.power.PowerManagerService} calls it when battery state changes.
      *
@@ -257,18 +294,26 @@
         }
         if (mIsPowered) {
             updateSnoozingLocked(false, "Plugged in");
-            enableBatterySaverLocked(/*enable=*/ false, /*manual=*/ false, "Plugged in");
+            enableBatterySaverLocked(/*enable=*/ false, /*manual=*/ false,
+                    BatterySaverController.REASON_PLUGGED_IN,
+                    "Plugged in");
 
         } else if (mSettingBatterySaverEnabledSticky) {
             // Re-enable BS.
-            enableBatterySaverLocked(/*enable=*/ true, /*manual=*/ true, "Sticky restore");
+            enableBatterySaverLocked(/*enable=*/ true, /*manual=*/ true,
+                    BatterySaverController.REASON_STICKY_RESTORE,
+                    "Sticky restore");
 
         } else if (mIsBatteryLevelLow) {
             if (!mBatterySaverSnoozing && isAutoBatterySaverConfigured()) {
-                enableBatterySaverLocked(/*enable=*/ true, /*manual=*/ false, "Auto ON");
+                enableBatterySaverLocked(/*enable=*/ true, /*manual=*/ false,
+                        BatterySaverController.REASON_AUTOMATIC_ON,
+                        "Auto ON");
             }
         } else { // Battery not low
-            enableBatterySaverLocked(/*enable=*/ false, /*manual=*/ false, "Auto OFF");
+            enableBatterySaverLocked(/*enable=*/ false, /*manual=*/ false,
+                    BatterySaverController.REASON_AUTOMATIC_OFF,
+                    "Auto OFF");
         }
     }
 
@@ -284,6 +329,8 @@
         }
         synchronized (mLock) {
             enableBatterySaverLocked(/*enable=*/ enabled, /*manual=*/ true,
+                    (enabled ? BatterySaverController.REASON_MANUAL_ON
+                            : BatterySaverController.REASON_MANUAL_OFF),
                     (enabled ? "Manual ON" : "Manual OFF"));
         }
     }
@@ -292,10 +339,11 @@
      * Actually enable / disable battery saver. Write the new state to the global settings
      * and propagate it to {@link #mBatterySaverController}.
      */
-    private void enableBatterySaverLocked(boolean enable, boolean manual, String reason) {
+    private void enableBatterySaverLocked(boolean enable, boolean manual, int intReason,
+            String strReason) {
         if (DEBUG) {
             Slog.d(TAG, "enableBatterySaver: enable=" + enable + " manual=" + manual
-                    + " reason=" + reason);
+                    + " reason=" + strReason + "(" + intReason + ")");
         }
         final boolean wasEnabled = mBatterySaverController.isEnabled();
 
@@ -309,6 +357,8 @@
             if (DEBUG) Slog.d(TAG, "Can't enable: isPowered");
             return;
         }
+        mLastChangedIntReason = intReason;
+        mLastChangedStrReason = strReason;
 
         if (manual) {
             if (enable) {
@@ -330,12 +380,12 @@
             mSettingBatterySaverEnabledSticky = enable;
             putGlobalSetting(Global.LOW_POWER_MODE_STICKY, enable ? 1 : 0);
         }
-        mBatterySaverController.enableBatterySaver(enable);
+        mBatterySaverController.enableBatterySaver(enable, intReason);
 
         if (DEBUG) {
             Slog.d(TAG, "Battery saver: Enabled=" + enable
                     + " manual=" + manual
-                    + " reason=" + reason);
+                    + " reason=" + strReason + "(" + intReason + ")");
         }
     }
 
@@ -365,6 +415,11 @@
             pw.print("  Enabled=");
             pw.println(mBatterySaverController.isEnabled());
 
+            pw.print("  mLastChangedIntReason=");
+            pw.println(mLastChangedIntReason);
+            pw.print("  mLastChangedStrReason=");
+            pw.println(mLastChangedStrReason);
+
             pw.print("  mBootCompleted=");
             pw.println(mBootCompleted);
             pw.print("  mSettingsLoaded=");
diff --git a/services/core/java/com/android/server/stats/StatsCompanionService.java b/services/core/java/com/android/server/stats/StatsCompanionService.java
index d1b48480..8214aad 100644
--- a/services/core/java/com/android/server/stats/StatsCompanionService.java
+++ b/services/core/java/com/android/server/stats/StatsCompanionService.java
@@ -426,7 +426,7 @@
                     return;
                 }
                 try {
-                  sStatsd.informDeviceShutdown(true);
+                  sStatsd.informDeviceShutdown();
                 } catch (Exception e) {
                     Slog.w(TAG, "Failed to inform statsd of a shutdown event.", e);
                 }
diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java
index d84fbc5..faa197e 100644
--- a/services/core/java/com/android/server/vr/VrManagerService.java
+++ b/services/core/java/com/android/server/vr/VrManagerService.java
@@ -1327,9 +1327,14 @@
 
     public void setVr2dDisplayProperties(
         Vr2dDisplayProperties compatDisplayProp) {
-        if (mVr2dDisplay != null) {
-            mVr2dDisplay.setVirtualDisplayProperties(compatDisplayProp);
-            return;
+        final long token = Binder.clearCallingIdentity();
+        try {
+            if (mVr2dDisplay != null) {
+                mVr2dDisplay.setVirtualDisplayProperties(compatDisplayProp);
+                return;
+            }
+        } finally {
+            Binder.restoreCallingIdentity(token);
         }
         Slog.w(TAG, "Vr2dDisplay is null!");
     }
@@ -1345,10 +1350,13 @@
     private void setAndBindCompositor(ComponentName componentName) {
         final int userId = UserHandle.getCallingUserId();
         final long token = Binder.clearCallingIdentity();
-        synchronized (mLock) {
-            updateCompositorServiceLocked(userId, componentName);
+        try {
+            synchronized (mLock) {
+                updateCompositorServiceLocked(userId, componentName);
+            }
+        } finally {
+            Binder.restoreCallingIdentity(token);
         }
-        Binder.restoreCallingIdentity(token);
     }
 
     private void updateCompositorServiceLocked(int userId, ComponentName componentName) {
diff --git a/services/core/java/com/android/server/wm/AppWindowContainerController.java b/services/core/java/com/android/server/wm/AppWindowContainerController.java
index 165a409..644e3c3 100644
--- a/services/core/java/com/android/server/wm/AppWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/AppWindowContainerController.java
@@ -671,6 +671,17 @@
         }
     }
 
+    public void notifyAppStopping() {
+        synchronized(mWindowMap) {
+            if (mContainer == null) {
+                Slog.w(TAG_WM, "Attempted to notify stopping on non-existing app token: "
+                        + mToken);
+                return;
+            }
+            mContainer.detachChildren();
+        }
+    }
+
     public void notifyAppStopped() {
         synchronized(mWindowMap) {
             if (mContainer == null) {
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index a9560e6..966ca41 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -913,12 +913,16 @@
         // try and clean up it's child surfaces. We need to prevent this from
         // happening, so we sever the children, transfering their ownership
         // from the client it-self to the parent surface (owned by us).
+        detachChildren();
+
+        mPendingRelaunchCount++;
+    }
+
+    void detachChildren() {
         for (int i = mChildren.size() - 1; i >= 0; i--) {
             final WindowState w = mChildren.get(i);
             w.mWinAnimator.detachChildren();
         }
-
-        mPendingRelaunchCount++;
     }
 
     void finishRelaunching() {
diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java
index 38fb30e..c0dc750 100644
--- a/services/core/java/com/android/server/wm/DisplayContent.java
+++ b/services/core/java/com/android/server/wm/DisplayContent.java
@@ -393,6 +393,8 @@
     /** Temporary float array to retrieve 3x3 matrix values. */
     private final float[] mTmpFloats = new float[9];
 
+    private MagnificationSpec mMagnificationSpec;
+
     private final Consumer<WindowState> mUpdateWindowsForAnimator = w -> {
         WindowStateAnimator winAnimator = w.mWinAnimator;
         final AppWindowToken atoken = w.mAppToken;
@@ -1508,6 +1510,10 @@
         return (stack != null && stack.isVisible()) ? stack : null;
     }
 
+    boolean hasSplitScreenPrimaryStack() {
+        return getSplitScreenPrimaryStack() != null;
+    }
+
     /**
      * Like {@link #getSplitScreenPrimaryStack}, but also returns the stack if it's currently
      * not visible.
@@ -1611,6 +1617,18 @@
         mService.mWindowsChanged = true;
     }
 
+    /**
+     * In split-screen mode we process the IME containers above the docked divider
+     * rather than directly above their target.
+     */
+    private boolean skipTraverseChild(WindowContainer child) {
+        if (child == mImeWindowsContainers && mService.mInputMethodTarget != null
+                && !hasSplitScreenPrimaryStack()) {
+            return true;
+        }
+        return false;
+    }
+
     @Override
     boolean forAllWindows(ToBooleanFunction<WindowState> callback, boolean traverseTopToBottom) {
         // Special handling so we can process IME windows with #forAllImeWindows above their IME
@@ -1618,11 +1636,10 @@
         if (traverseTopToBottom) {
             for (int i = mChildren.size() - 1; i >= 0; --i) {
                 final DisplayChildWindowContainer child = mChildren.get(i);
-                if (child == mImeWindowsContainers && mService.mInputMethodTarget != null) {
-                    // In this case the Ime windows will be processed above their target so we skip
-                    // here.
+                if (skipTraverseChild(child)) {
                     continue;
                 }
+
                 if (child.forAllWindows(callback, traverseTopToBottom)) {
                     return true;
                 }
@@ -1631,11 +1648,10 @@
             final int count = mChildren.size();
             for (int i = 0; i < count; i++) {
                 final DisplayChildWindowContainer child = mChildren.get(i);
-                if (child == mImeWindowsContainers && mService.mInputMethodTarget != null) {
-                    // In this case the Ime windows will be processed above their target so we skip
-                    // here.
+                if (skipTraverseChild(child)) {
                     continue;
                 }
+
                 if (child.forAllWindows(callback, traverseTopToBottom)) {
                     return true;
                 }
@@ -3837,10 +3853,22 @@
     }
 
     void applyMagnificationSpec(MagnificationSpec spec) {
+        if (spec.scale != 1.0) {
+            mMagnificationSpec = spec;
+        } else {
+            mMagnificationSpec = null;
+        }
+
         applyMagnificationSpec(getPendingTransaction(), spec);
         getPendingTransaction().apply();
     }
 
+    void reapplyMagnificationSpec() {
+        if (mMagnificationSpec != null) {
+            applyMagnificationSpec(getPendingTransaction(), mMagnificationSpec);
+        }
+    }
+
     @Override
     void onParentSet() {
         // Since we are the top of the SurfaceControl hierarchy here
diff --git a/services/core/java/com/android/server/wm/DockedStackDividerController.java b/services/core/java/com/android/server/wm/DockedStackDividerController.java
index 2cd2ef1..39a3629 100644
--- a/services/core/java/com/android/server/wm/DockedStackDividerController.java
+++ b/services/core/java/com/android/server/wm/DockedStackDividerController.java
@@ -170,7 +170,7 @@
             final int orientation = mTmpRect2.width() <= mTmpRect2.height()
                     ? ORIENTATION_PORTRAIT
                     : ORIENTATION_LANDSCAPE;
-            final int dockSide = TaskStack.getDockSideUnchecked(mTmpRect, mTmpRect2, orientation);
+            final int dockSide = getDockSide(mTmpRect, mTmpRect2, orientation);
             final int position = DockedDividerUtils.calculatePositionForBounds(mTmpRect, dockSide,
                     getContentWidth());
 
@@ -191,6 +191,39 @@
         return (int) (minWidth / mDisplayContent.getDisplayMetrics().density);
     }
 
+    /**
+     * Get the current docked side. Determined by its location of {@param bounds} within
+     * {@param displayRect} but if both are the same, it will try to dock to each side and determine
+     * if allowed in its respected {@param orientation}.
+     *
+     * @param bounds bounds of the docked task to get which side is docked
+     * @param displayRect bounds of the display that contains the docked task
+     * @param orientation the origination of device
+     * @return current docked side
+     */
+    int getDockSide(Rect bounds, Rect displayRect, int orientation) {
+        if (orientation == Configuration.ORIENTATION_PORTRAIT) {
+            // Portrait mode, docked either at the top or the bottom.
+            final int diff = (displayRect.bottom - bounds.bottom) - (bounds.top - displayRect.top);
+            if (diff > 0) {
+                return DOCKED_TOP;
+            } else if (diff < 0) {
+                return DOCKED_BOTTOM;
+            }
+            return canPrimaryStackDockTo(DOCKED_TOP) ? DOCKED_TOP : DOCKED_BOTTOM;
+        } else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
+            // Landscape mode, docked either on the left or on the right.
+            final int diff = (displayRect.right - bounds.right) - (bounds.left - displayRect.left);
+            if (diff > 0) {
+                return DOCKED_LEFT;
+            } else if (diff < 0) {
+                return DOCKED_RIGHT;
+            }
+            return canPrimaryStackDockTo(DOCKED_LEFT) ? DOCKED_LEFT : DOCKED_RIGHT;
+        }
+        return DOCKED_INVALID;
+    }
+
     void getHomeStackBoundsInDockedMode(Rect outBounds) {
         final DisplayInfo di = mDisplayContent.getDisplayInfo();
         mService.mPolicy.getStableInsetsLw(di.rotation, di.logicalWidth, di.logicalHeight,
@@ -203,10 +236,20 @@
             outBounds.set(0, mTaskHeightInMinimizedMode + dividerSize + mTmpRect.top,
                     di.logicalWidth, di.logicalHeight);
         } else {
-            // In landscape append the left position with the statusbar height to match the
+            // In landscape also inset the left/right side with the statusbar height to match the
             // minimized size height in portrait mode.
-            outBounds.set(mTaskHeightInMinimizedMode + dividerSize + mTmpRect.left + mTmpRect.top,
-                    0, di.logicalWidth, di.logicalHeight);
+            final TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
+            final int primaryTaskWidth = mTaskHeightInMinimizedMode + dividerSize + mTmpRect.top;
+            int left = mTmpRect.left;
+            int right = di.logicalWidth - mTmpRect.right;
+            if (stack != null) {
+                if (stack.getDockSide() == DOCKED_LEFT) {
+                    left += primaryTaskWidth;
+                } else if (stack.getDockSide() == DOCKED_RIGHT) {
+                    right -= primaryTaskWidth;
+                }
+            }
+            outBounds.set(left, 0, right, di.logicalHeight);
         }
     }
 
@@ -365,7 +408,7 @@
     }
 
     void positionDockedStackedDivider(Rect frame) {
-        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStack();
+        TaskStack stack = mDisplayContent.getSplitScreenPrimaryStackIgnoringVisibility();
         if (stack == null) {
             // Unfortunately we might end up with still having a divider, even though the underlying
             // stack was already removed. This is because we are on AM thread and the removal of the
@@ -420,21 +463,9 @@
      * @return true if the side provided is valid
      */
     boolean canPrimaryStackDockTo(int dockSide) {
-        if (mService.mPolicy.isDockSideAllowed(dockSide)) {
-            // Side is the same as original side
-            if (dockSide == mOriginalDockedSide) {
-                return true;
-            }
-            // Special rule that the top in portrait is always valid
-            if (dockSide == DOCKED_TOP) {
-                return true;
-            }
-            // Only if original docked side was top in portrait will allow left side for landscape
-            if (dockSide == DOCKED_LEFT && mOriginalDockedSide == DOCKED_TOP) {
-                return true;
-            }
-        }
-        return false;
+        final DisplayInfo di = mDisplayContent.getDisplayInfo();
+        return mService.mPolicy.isDockSideAllowed(dockSide, mOriginalDockedSide, di.logicalWidth,
+                di.logicalHeight, di.rotation);
     }
 
     void notifyDockedStackExistsChanged(boolean exists) {
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 85e4ac7..553b4fe 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -79,7 +79,7 @@
     public @interface ReorderMode {}
 
     private final WindowManagerService mService;
-    private final IRecentsAnimationRunner mRunner;
+    private IRecentsAnimationRunner mRunner;
     private final RecentsAnimationCallbacks mCallbacks;
     private final ArrayList<TaskAnimationAdapter> mPendingAnimations = new ArrayList<>();
     private final int mDisplayId;
@@ -426,7 +426,10 @@
             removeAnimation(taskAdapter);
         }
 
+        // Clear references to the runner
         unlinkToDeathOfRunner();
+        mRunner = null;
+
         // Clear associated input consumers
         mService.mInputMonitor.updateInputWindowsLw(true /*force*/);
         mService.destroyInputConsumer(INPUT_CONSUMER_RECENTS_ANIMATION);
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 018765d..891ee2e 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -1462,27 +1462,7 @@
         }
         dc.getBounds(mTmpRect);
         final int orientation = dc.getConfiguration().orientation;
-        return getDockSideUnchecked(bounds, mTmpRect, orientation);
-    }
-
-    static int getDockSideUnchecked(Rect bounds, Rect displayRect, int orientation) {
-        if (orientation == Configuration.ORIENTATION_PORTRAIT) {
-            // Portrait mode, docked either at the top or the bottom.
-            if (bounds.top - displayRect.top <= displayRect.bottom - bounds.bottom) {
-                return DOCKED_TOP;
-            } else {
-                return DOCKED_BOTTOM;
-            }
-        } else if (orientation == Configuration.ORIENTATION_LANDSCAPE) {
-            // Landscape mode, docked either on the left or on the right.
-            if (bounds.left - displayRect.left <= displayRect.right - bounds.right) {
-                return DOCKED_LEFT;
-            } else {
-                return DOCKED_RIGHT;
-            }
-        } else {
-            return DOCKED_INVALID;
-        }
+        return dc.getDockedDividerController().getDockSide(bounds, mTmpRect, orientation);
     }
 
     boolean hasTaskForUser(int userId) {
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 86aed47..c710c97 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -808,6 +808,8 @@
     void onParentSet() {
         super.onParentSet();
         setDrawnStateEvaluated(false /*evaluated*/);
+
+        getDisplayContent().reapplyMagnificationSpec();
     }
 
     @Override
@@ -3995,32 +3997,33 @@
         return false;
     }
 
+    private boolean applyImeWindowsIfNeeded(ToBooleanFunction<WindowState> callback,
+            boolean traverseTopToBottom) {
+        // If this window is the current IME target, so we need to process the IME windows
+        // directly above it. The exception is if we are in split screen
+        // in which case we process the IME at the DisplayContent level to
+        // ensure it is above the docked divider.
+        if (isInputMethodTarget() && !inSplitScreenWindowingMode()) {
+            if (getDisplayContent().forAllImeWindows(callback, traverseTopToBottom)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     private boolean applyInOrderWithImeWindows(ToBooleanFunction<WindowState> callback,
             boolean traverseTopToBottom) {
         if (traverseTopToBottom) {
-            if (isInputMethodTarget()) {
-                // This window is the current IME target, so we need to process the IME windows
-                // directly above it.
-                if (getDisplayContent().forAllImeWindows(callback, traverseTopToBottom)) {
-                    return true;
-                }
-            }
-            if (callback.apply(this)) {
+            if (applyImeWindowsIfNeeded(callback, traverseTopToBottom)
+                    || callback.apply(this)) {
                 return true;
             }
         } else {
-            if (callback.apply(this)) {
+            if (callback.apply(this)
+                    || applyImeWindowsIfNeeded(callback, traverseTopToBottom)) {
                 return true;
             }
-            if (isInputMethodTarget()) {
-                // This window is the current IME target, so we need to process the IME windows
-                // directly above it.
-                if (getDisplayContent().forAllImeWindows(callback, traverseTopToBottom)) {
-                    return true;
-                }
-            }
         }
-
         return false;
     }
 
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index a3428f0..4a6587b 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1287,6 +1287,12 @@
         if (!shown)
             return false;
 
+        // If we had a preserved surface it's no longer needed, and it may be harmful
+        // if we are transparent.
+        if (mPendingDestroySurface != null && mDestroyPreservedSurfaceUponRedraw) {
+            mPendingDestroySurface.mSurfaceControl.hide();
+        }
+
         return true;
     }
 
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index a3a7e1e..b47dbfa 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -38,6 +38,7 @@
 #include <pthread.h>
 #include <string.h>
 #include <cinttypes>
+#include <iomanip>
 
 static jobject mCallbacksObj = NULL;
 
@@ -64,6 +65,7 @@
 static jmethodID method_reportMeasurementData;
 static jmethodID method_reportNavigationMessages;
 static jmethodID method_reportLocationBatch;
+static jmethodID method_reportGnssServiceDied;
 
 /*
  * Save a pointer to JavaVm to attach/detach threads executing
@@ -120,10 +122,10 @@
 {
     // hidl_death_recipient interface
     virtual void serviceDied(uint64_t cookie, const wp<IBase>& who) override {
-      // TODO(b/37460011): implement a better death recovery mechanism without
-      // crashing system server process as described in go//treble-gnss-death
-      LOG_ALWAYS_FATAL("Abort due to IGNSS hidl service failure,"
-            " restarting system server");
+        ALOGE("IGNSS hidl service failed, trying to recover...");
+
+        JNIEnv* env = android::AndroidRuntime::getJNIEnv();
+        env->CallVoidMethod(mCallbacksObj, method_reportGnssServiceDied);
     }
 };
 
@@ -1177,6 +1179,7 @@
             clazz,
             "reportLocationBatch",
             "([Landroid/location/Location;)V");
+    method_reportGnssServiceDied = env->GetMethodID(clazz, "reportGnssServiceDied", "()V");
 
     /*
      * Save a pointer to JVM.
@@ -1690,25 +1693,25 @@
                           << " satellites:: " << std::endl;
         }
 
-        internalState << "constellation: 1=GPS, 2=SBAS, 3=GLO, 4=QZSS, 5=BDS, 6=GAL; "
-                      << "ephemerisType: 0=Eph, 1=Alm, 2=?; "
-                      << "ephemerisSource: 0=Demod, 1=Supl, 2=Server, 3=?; "
-                      << "ephemerisHealth: 0=Good, 1=Bad, 2=?" << std::endl;
+        internalState << "constell: 1=GPS, 2=SBAS, 3=GLO, 4=QZSS, 5=BDS, 6=GAL; "
+                      << "ephType: 0=Eph, 1=Alm, 2=Unk; "
+                      << "ephSource: 0=Demod, 1=Supl, 2=Server, 3=Unk; "
+                      << "ephHealth: 0=Good, 1=Bad, 2=Unk" << std::endl;
         for (size_t i = 0; i < data.satelliteDataArray.size(); i++) {
-            internalState << "svid: " << data.satelliteDataArray[i].svid
-                          << ", constellation: "
+            internalState << "constell: "
                           << static_cast<uint32_t>(data.satelliteDataArray[i].constellation)
-                          << ", ephemerisType: "
-                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisType)
-                          << ", ephemerisSource: "
-                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisSource)
-                          << ", ephemerisHealth: "
-                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisHealth)
-                          << ", serverPredictionIsAvailable: "
+                          << ", svid: " << std::setw(3) << data.satelliteDataArray[i].svid
+                          << ", serverPredAvail: "
                           << data.satelliteDataArray[i].serverPredictionIsAvailable
-                          << ", serverPredictionAgeSeconds: "
+                          << ", serverPredAgeSec: " << std::setw(7)
                           << data.satelliteDataArray[i].serverPredictionAgeSeconds
-                          << ", ephemerisAgeSeconds: "
+                          << ", ephType: "
+                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisType)
+                          << ", ephSource: "
+                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisSource)
+                          << ", ephHealth: "
+                          << static_cast<uint32_t>(data.satelliteDataArray[i].ephemerisHealth)
+                          << ", ephAgeSec: " << std::setw(7)
                           << data.satelliteDataArray[i].ephemerisAgeSeconds << std::endl;
         }
     }
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 94f8f38..ab93a8a 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3944,6 +3944,7 @@
             if (metrics.quality != quality) {
                 metrics.quality = quality;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4055,6 +4056,7 @@
             if (metrics.length != length) {
                 metrics.length = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4079,6 +4081,7 @@
             if (ap.passwordHistoryLength != length) {
                 ap.passwordHistoryLength = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
         }
         if (SecurityLog.isLoggingEnabled()) {
@@ -4280,6 +4283,7 @@
             if (metrics.upperCase != length) {
                 metrics.upperCase = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4302,6 +4306,7 @@
             if (metrics.lowerCase != length) {
                 metrics.lowerCase = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4327,6 +4332,7 @@
             if (metrics.letters != length) {
                 metrics.letters = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4352,6 +4358,7 @@
             if (metrics.numeric != length) {
                 metrics.numeric = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4377,6 +4384,7 @@
             if (metrics.symbols != length) {
                 ap.minimumPasswordMetrics.symbols = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -4402,6 +4410,7 @@
             if (metrics.nonLetter != length) {
                 ap.minimumPasswordMetrics.nonLetter = length;
                 updatePasswordValidityCheckpointLocked(userId, parent);
+                saveSettingsLocked(userId);
             }
             maybeLogPasswordComplexitySet(who, userId, parent, metrics);
         }
@@ -6087,6 +6096,7 @@
             synchronized (getLockObject()) {
                 policy.mFailedPasswordAttempts = 0;
                 updatePasswordValidityCheckpointLocked(userId, /* parent */ false);
+                saveSettingsLocked(userId);
                 updatePasswordExpirationsLocked(userId);
                 setExpirationAlarmCheckLocked(mContext, userId, /* parent */ false);
 
diff --git a/services/net/java/android/net/ip/IpClient.java b/services/net/java/android/net/ip/IpClient.java
index d6999dd..63ae09a 100644
--- a/services/net/java/android/net/ip/IpClient.java
+++ b/services/net/java/android/net/ip/IpClient.java
@@ -54,6 +54,7 @@
 
 import com.android.internal.annotations.VisibleForTesting;
 import com.android.internal.R;
+import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.IndentingPrintWriter;
 import com.android.internal.util.IState;
 import com.android.internal.util.Preconditions;
@@ -74,6 +75,7 @@
 import java.util.List;
 import java.util.Set;
 import java.util.StringJoiner;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
@@ -100,6 +102,36 @@
     private static final Class[] sMessageClasses = { IpClient.class, DhcpClient.class };
     private static final SparseArray<String> sWhatToString =
             MessageUtils.findMessageNames(sMessageClasses);
+    // Two static concurrent hashmaps of interface name to logging classes.
+    // One holds StateMachine logs and the other connectivity packet logs.
+    private static final ConcurrentHashMap<String, SharedLog> sSmLogs = new ConcurrentHashMap<>();
+    private static final ConcurrentHashMap<String, LocalLog> sPktLogs = new ConcurrentHashMap<>();
+
+    // If |args| is non-empty, assume it's a list of interface names for which
+    // we should print IpClient logs (filter out all others).
+    public static void dumpAllLogs(PrintWriter writer, String[] args) {
+        for (String ifname : sSmLogs.keySet()) {
+            if (!ArrayUtils.isEmpty(args) && !ArrayUtils.contains(args, ifname)) continue;
+
+            writer.println(String.format("--- BEGIN %s ---", ifname));
+
+            final SharedLog smLog = sSmLogs.get(ifname);
+            if (smLog != null) {
+                writer.println("State machine log:");
+                smLog.dump(null, writer, null);
+            }
+
+            writer.println("");
+
+            final LocalLog pktLog = sPktLogs.get(ifname);
+            if (pktLog != null) {
+                writer.println("Connectivity packet log:");
+                pktLog.readOnlyLocalLog().dump(null, writer, null);
+            }
+
+            writer.println(String.format("--- END %s ---", ifname));
+        }
+    }
 
     /**
      * Callbacks for handling IpClient events.
@@ -680,8 +712,10 @@
         mShutdownLatch = new CountDownLatch(1);
         mNwService = deps.getNMS();
 
-        mLog = new SharedLog(MAX_LOG_RECORDS, mTag);
-        mConnectivityPacketLog = new LocalLog(MAX_PACKET_RECORDS);
+        sSmLogs.putIfAbsent(mInterfaceName, new SharedLog(MAX_LOG_RECORDS, mTag));
+        mLog = sSmLogs.get(mInterfaceName);
+        sPktLogs.putIfAbsent(mInterfaceName, new LocalLog(MAX_PACKET_RECORDS));
+        mConnectivityPacketLog = sPktLogs.get(mInterfaceName);
         mMsgStateLogger = new MessageHandlingLogger();
 
         // TODO: Consider creating, constructing, and passing in some kind of
diff --git a/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java b/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java
index 949c504..b1dad5a 100644
--- a/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java
+++ b/services/robotests/src/com/android/server/backup/PerformBackupTaskTest.java
@@ -419,7 +419,7 @@
         runTask(task);
 
         verify(mObserver).onResult(PACKAGE_1, BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
-        verify(mObserver).backupFinished(BackupManager.ERROR_TRANSPORT_ABORTED);
+        verify(mObserver).backupFinished(BackupManager.SUCCESS);
     }
 
     @Test
@@ -467,8 +467,7 @@
 
         verify(mObserver).onResult(PACKAGE_1, BackupManager.SUCCESS);
         verify(mObserver).onResult(PACKAGE_2, BackupManager.ERROR_TRANSPORT_PACKAGE_REJECTED);
-        // TODO: Should we return the status of the last?
-        verify(mObserver).backupFinished(BackupManager.ERROR_TRANSPORT_ABORTED);
+        verify(mObserver).backupFinished(BackupManager.SUCCESS);
     }
 
     @Test
@@ -488,7 +487,7 @@
         runTask(task);
 
         verify(mObserver).onResult(PACKAGE_1, BackupManager.ERROR_TRANSPORT_QUOTA_EXCEEDED);
-        verify(mObserver).backupFinished(BackupManager.ERROR_TRANSPORT_ABORTED);
+        verify(mObserver).backupFinished(BackupManager.SUCCESS);
         verify(agentMock.agent).onQuotaExceeded(anyLong(), anyLong());
     }
 
diff --git a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java b/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
index 9daea1a..1415ada 100644
--- a/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
+++ b/services/tests/servicestests/src/com/android/server/am/ActivityStackSupervisorTests.java
@@ -19,51 +19,44 @@
 import static android.app.ActivityManager.START_DELIVERED_TO_TOP;
 import static android.app.ActivityManager.START_TASK_TO_FRONT;
 import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
-import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
 import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
+import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY;
 import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
-
 import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
 import static android.content.pm.ActivityInfo.FLAG_ALWAYS_FOCUSABLE;
 import static android.content.pm.ActivityInfo.FLAG_SHOW_WHEN_LOCKED;
+
 import static com.android.server.am.ActivityStack.REMOVE_TASK_MODE_DESTROYING;
+import static com.android.server.am.ActivityStackSupervisor
+        .MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
+
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
+import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Matchers.anyInt;
+import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.reset;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.mock;
-import static org.mockito.ArgumentMatchers.any;
-
-import android.app.ActivityManager;
+import android.app.ActivityOptions;
 import android.app.WaitResult;
-import android.content.ComponentName;
-import android.content.res.Configuration;
 import android.graphics.Rect;
-import android.hardware.display.DisplayManager;
 import android.platform.test.annotations.Presubmit;
 import android.support.test.filters.MediumTest;
 import android.support.test.runner.AndroidJUnit4;
 import android.util.SparseIntArray;
 
-import org.junit.runner.RunWith;
 import org.junit.Before;
 import org.junit.Test;
-
+import org.junit.runner.RunWith;
 import org.mockito.invocation.InvocationOnMock;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static com.android.server.am.ActivityStackSupervisor.MATCH_TASK_IN_STACKS_OR_RECENT_TASKS_AND_RESTORE;
 
 /**
  * Tests for the {@link ActivityStackSupervisor} class.
@@ -378,4 +371,28 @@
         assertEquals(showWhenLockedActivity, mService.mStackSupervisor.topRunningActivityLocked(
                 true /* considerKeyguardState */));
     }
+
+    /**
+     * Verify that split-screen primary stack will be chosen if activity is launched that targets
+     * split-screen secondary, but a matching existing instance is found on top of split-screen
+     * primary stack.
+     */
+    @Test
+    public void testSplitScreenPrimaryChosenWhenTopActivityLaunchedToSecondary() throws Exception {
+        // Create primary split-screen stack with a task and an activity.
+        final ActivityStack primaryStack = mService.mStackSupervisor.getDefaultDisplay()
+                .createStack(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD,
+                        true /* onTop */);
+        final TaskRecord task = new TaskBuilder(mSupervisor).setStack(primaryStack).build();
+        final ActivityRecord r = new ActivityBuilder(mService).setTask(task).build();
+
+        // Find a launch stack for the top activity in split-screen primary, while requesting
+        // split-screen secondary.
+        final ActivityOptions options = ActivityOptions.makeBasic();
+        options.setLaunchWindowingMode(WINDOWING_MODE_FULLSCREEN_OR_SPLIT_SCREEN_SECONDARY);
+        final ActivityStack result = mSupervisor.getLaunchStack(r, options, task, true /* onTop */);
+
+        // Assert that the primary stack is returned.
+        assertEquals(primaryStack, result);
+    }
 }
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
index b76064b..1acecfc 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
@@ -4259,7 +4259,14 @@
 
         // Drain ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED broadcasts as part of
         // reportPasswordChanged()
-        verify(mContext.spiedContext, times(3)).sendBroadcastAsUser(
+        // This broadcast should be sent 4 times:
+        // * Twice from calls to DevicePolicyManagerService.updatePasswordExpirationsLocked,
+        //   once for each affected user, in DevicePolicyManagerService.reportPasswordChanged.
+        // * Twice from calls to DevicePolicyManagerService.saveSettingsLocked
+        //   in DevicePolicyManagerService.reportPasswordChanged, once with the userId
+        //   the password change is relevant to and another with the credential owner of said
+        //   userId.
+        verify(mContext.spiedContext, times(4)).sendBroadcastAsUser(
                 MockUtils.checkIntentAction(
                         DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED),
                 MockUtils.checkUserHandle(userHandle));
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
index e2ba4d5..213961c 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmMockContext.java
@@ -254,6 +254,12 @@
     }
 
     @Override
+    public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions) {
+        spiedContext.sendBroadcastAsUserMultiplePermissions(intent, user, receiverPermissions);
+    }
+
+    @Override
     public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
         spiedContext.sendBroadcast(intent, receiverPermission, options);
     }
diff --git a/services/tests/servicestests/src/com/android/server/pm/CrossProfileAppsServiceImplTest.java b/services/tests/servicestests/src/com/android/server/pm/CrossProfileAppsServiceImplTest.java
index c69437dc..33acc44 100644
--- a/services/tests/servicestests/src/com/android/server/pm/CrossProfileAppsServiceImplTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/CrossProfileAppsServiceImplTest.java
@@ -13,7 +13,9 @@
 import static org.mockito.Mockito.when;
 import static org.testng.Assert.assertThrows;
 
+import android.app.ActivityManagerInternal;
 import android.app.AppOpsManager;
+import android.app.IApplicationThread;
 import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
@@ -68,10 +70,13 @@
     private PackageManagerInternal mPackageManagerInternal;
     @Mock
     private AppOpsManager mAppOpsManager;
+    @Mock
+    private ActivityManagerInternal mActivityManagerInternal;
 
     private TestInjector mTestInjector;
     private ActivityInfo mActivityInfo;
     private CrossProfileAppsServiceImpl mCrossProfileAppsServiceImpl;
+    private IApplicationThread mIApplicationThread;
 
     private SparseArray<Boolean> mUserEnabled = new SparseArray<>();
 
@@ -200,15 +205,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_ONE,
                                 ACTIVITY_COMPONENT,
                                 UserHandle.of(PRIMARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -219,15 +227,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_ONE,
                                 ACTIVITY_COMPONENT,
                                 UserHandle.of(PROFILE_OF_PRIMARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -236,15 +247,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_TWO,
                                 ACTIVITY_COMPONENT,
                                 UserHandle.of(PROFILE_OF_PRIMARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -255,15 +269,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_ONE,
                                 ACTIVITY_COMPONENT,
                                 UserHandle.of(PROFILE_OF_PRIMARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -272,15 +289,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_ONE,
                                 new ComponentName(PACKAGE_TWO, "test"),
                                 UserHandle.of(PROFILE_OF_PRIMARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -289,15 +309,18 @@
                 SecurityException.class,
                 () ->
                         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                                mIApplicationThread,
                                 PACKAGE_ONE,
                                 ACTIVITY_COMPONENT,
                                 UserHandle.of(SECONDARY_USER)));
 
-        verify(mContext, never())
+        verify(mActivityManagerInternal, never())
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        anyString(),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        any(UserHandle.class));
+                        anyInt());
     }
 
     @Test
@@ -305,15 +328,18 @@
         mTestInjector.setCallingUserId(PROFILE_OF_PRIMARY_USER);
 
         mCrossProfileAppsServiceImpl.startActivityAsUser(
+                mIApplicationThread,
                 PACKAGE_ONE,
                 ACTIVITY_COMPONENT,
                 UserHandle.of(PRIMARY_USER));
 
-        verify(mContext)
+        verify(mActivityManagerInternal)
                 .startActivityAsUser(
+                        nullable(IApplicationThread.class),
+                        eq(PACKAGE_ONE),
                         any(Intent.class),
                         nullable(Bundle.class),
-                        eq(UserHandle.of(PRIMARY_USER)));
+                        eq(PRIMARY_USER));
     }
 
     private void mockAppsInstalled(String packageName, int user, boolean installed) {
@@ -401,5 +427,10 @@
         public AppOpsManager getAppOpsManager() {
             return mAppOpsManager;
         }
+
+        @Override
+        public ActivityManagerInternal getActivityManagerInternal() {
+            return mActivityManagerInternal;
+        }
     }
 }
diff --git a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
index 64637f4..30665b5 100644
--- a/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/policy/PhoneWindowManagerTest.java
@@ -28,12 +28,19 @@
 import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
 import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
 import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD;
+import static android.view.WindowManager.DOCKED_BOTTOM;
+import static android.view.WindowManager.DOCKED_LEFT;
+import static android.view.WindowManager.DOCKED_RIGHT;
+import static android.view.WindowManager.DOCKED_TOP;
 
+import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_LEFT;
 import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_BOTTOM;
 import static com.android.server.policy.WindowManagerPolicy.NAV_BAR_RIGHT;
 
 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.graphics.PixelFormat;
 import android.platform.test.annotations.Presubmit;
@@ -194,4 +201,53 @@
                 PhoneWindowManager.updateLightNavigationBarLw(0, opaqueDarkNavBar,
                         opaqueDarkNavBar, imeDrawLightNavBar, imeDrawLightNavBar));
     }
+
+    @Test
+    public void testIsDockSideAllowedDockTop() throws Exception {
+        // Docked top is always allowed
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_TOP, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                true /* navigationBarCanMove */));
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_TOP, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+    }
+
+    @Test
+    public void testIsDockSideAllowedDockBottom() throws Exception {
+        // Cannot dock bottom
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_BOTTOM, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                true /* navigationBarCanMove */));
+    }
+
+    @Test
+    public void testIsDockSideAllowedNavigationBarMovable() throws Exception {
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                true /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_LEFT, NAV_BAR_LEFT,
+                true /* navigationBarCanMove */));
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_LEFT, NAV_BAR_RIGHT,
+                true /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                true /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_LEFT, NAV_BAR_RIGHT,
+                true /* navigationBarCanMove */));
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_LEFT, NAV_BAR_LEFT,
+                true /* navigationBarCanMove */));
+    }
+
+    @Test
+    public void testIsDockSideAllowedNavigationBarNotMovable() throws Exception {
+        // Navigation bar is not movable such as tablets
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_TOP, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_LEFT, DOCKED_RIGHT, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_LEFT, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+        assertFalse(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_TOP, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+        assertTrue(PhoneWindowManager.isDockSideAllowed(DOCKED_RIGHT, DOCKED_RIGHT, NAV_BAR_BOTTOM,
+                false /* navigationBarCanMove */));
+    }
 }
diff --git a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
index 1367f58..62fe6b2 100644
--- a/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
+++ b/services/tests/servicestests/src/com/android/server/power/batterysaver/BatterySaverStateMachineTest.java
@@ -17,6 +17,7 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.mockito.ArgumentMatchers.anyBoolean;
+import static org.mockito.ArgumentMatchers.anyInt;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -144,6 +145,11 @@
         void runOnBgThread(Runnable r) {
             r.run();
         }
+
+        @Override
+        void runOnBgThreadLazy(Runnable r, int delayMillis) {
+            r.run();
+        }
     }
 
     @Before
@@ -153,7 +159,7 @@
         mMockBatterySaverController = mock(BatterySaverController.class);
 
         doAnswer((inv) -> mDevice.batterySaverEnabled = inv.getArgument(0))
-                .when(mMockBatterySaverController).enableBatterySaver(anyBoolean());
+                .when(mMockBatterySaverController).enableBatterySaver(anyBoolean(), anyInt());
         when(mMockBatterySaverController.isEnabled())
                 .thenAnswer((inv) -> mDevice.batterySaverEnabled);
 
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 c2a0ccf..dee2556 100644
--- a/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
+++ b/services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
@@ -46,6 +46,7 @@
 import static org.mockito.Mockito.mock;
 
 import android.app.usage.UsageEvents;
+import android.app.usage.UsageStatsManagerInternal;
 import android.appwidget.AppWidgetManager;
 import android.content.Context;
 import android.content.ContextWrapper;
@@ -74,6 +75,8 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 /**
  * Unit test for AppStandbyController.
@@ -101,6 +104,8 @@
     private static final long WORKING_SET_THRESHOLD = 12 * HOUR_MS;
     private static final long FREQUENT_THRESHOLD = 24 * HOUR_MS;
     private static final long RARE_THRESHOLD = 48 * HOUR_MS;
+    // Short STABLE_CHARGING_THRESHOLD for testing purposes
+    private static final long STABLE_CHARGING_THRESHOLD = 2000;
 
     private MyInjector mInjector;
     private AppStandbyController mController;
@@ -209,7 +214,8 @@
             return "screen_thresholds=0/0/0/" + HOUR_MS + ",elapsed_thresholds=0/"
                     + WORKING_SET_THRESHOLD + "/"
                     + FREQUENT_THRESHOLD + "/"
-                    + RARE_THRESHOLD;
+                    + RARE_THRESHOLD + ","
+                    + "stable_charging_threshold=" + STABLE_CHARGING_THRESHOLD;
         }
 
         // Internal methods
@@ -276,6 +282,10 @@
         return controller;
     }
 
+    private long getCurrentTime() {
+        return TimeUnit.NANOSECONDS.toMillis(System.nanoTime());
+    }
+
     @Before
     public void setUp() throws Exception {
         MyContextWrapper myContext = new MyContextWrapper(InstrumentationRegistry.getContext());
@@ -284,21 +294,101 @@
         setChargingState(mController, false);
     }
 
+    private class TestParoleListener extends UsageStatsManagerInternal.AppIdleStateChangeListener {
+        private boolean mOnParole = false;
+        private CountDownLatch mLatch;
+        private long mLastParoleChangeTime;
+
+        public boolean getParoleState() {
+            synchronized (this) {
+                return mOnParole;
+            }
+        }
+
+        public void rearmLatch() {
+            synchronized (this) {
+                mLatch = new CountDownLatch(1);
+            }
+        }
+
+        public void awaitOnLatch(long time) throws Exception {
+            mLatch.await(time, TimeUnit.MILLISECONDS);
+        }
+
+        public long getLastParoleChangeTime() {
+            synchronized (this) {
+                return mLastParoleChangeTime;
+            }
+        }
+
+        @Override
+        public void onAppIdleStateChanged(String packageName, int userId, boolean idle,
+                int bucket, int reason) {
+        }
+
+        @Override
+        public void onParoleStateChanged(boolean isParoleOn) {
+            synchronized (this) {
+                // Only record information if it is being looked for
+                if (mLatch.getCount() > 0) {
+                    mOnParole = isParoleOn;
+                    mLastParoleChangeTime = getCurrentTime();
+                    mLatch.countDown();
+                }
+            }
+        }
+    }
+
     @Test
     public void testCharging() throws Exception {
-        setChargingState(mController, true);
-        mInjector.mElapsedRealtime = RARE_THRESHOLD + 1;
-        assertFalse(mController.isAppIdleFilteredOrParoled(PACKAGE_1, USER_ID,
-                mInjector.mElapsedRealtime, false));
+        long startTime;
+        TestParoleListener paroleListener = new TestParoleListener();
+        long marginOfError = 200;
 
-        setChargingState(mController, false);
-        mInjector.mElapsedRealtime = 2 * RARE_THRESHOLD + 2;
-        mController.checkIdleStates(USER_ID);
-        assertTrue(mController.isAppIdleFilteredOrParoled(PACKAGE_1, USER_ID,
-                mInjector.mElapsedRealtime, false));
+        // Charging
+        paroleListener.rearmLatch();
+        mController.addListener(paroleListener);
+        startTime = getCurrentTime();
         setChargingState(mController, true);
-        assertFalse(mController.isAppIdleFilteredOrParoled(PACKAGE_1,USER_ID,
-                mInjector.mElapsedRealtime, false));
+        paroleListener.awaitOnLatch(STABLE_CHARGING_THRESHOLD * 3 / 2);
+        assertTrue(paroleListener.mOnParole);
+        // Parole will only be granted after device has been charging for a sufficient amount of
+        // time.
+        assertEquals(STABLE_CHARGING_THRESHOLD,
+                paroleListener.getLastParoleChangeTime() - startTime,
+                marginOfError);
+
+        // Discharging
+        paroleListener.rearmLatch();
+        startTime = getCurrentTime();
+        setChargingState(mController, false);
+        mController.checkIdleStates(USER_ID);
+        paroleListener.awaitOnLatch(STABLE_CHARGING_THRESHOLD * 3 / 2);
+        assertFalse(paroleListener.getParoleState());
+        // Parole should be revoked immediately
+        assertEquals(0,
+                paroleListener.getLastParoleChangeTime() - startTime,
+                marginOfError);
+
+        // Brief Charging
+        paroleListener.rearmLatch();
+        setChargingState(mController, true);
+        setChargingState(mController, false);
+        // Device stopped charging before the stable charging threshold.
+        // Parole should not be granted at the end of the threshold
+        paroleListener.awaitOnLatch(STABLE_CHARGING_THRESHOLD * 3 / 2);
+        assertFalse(paroleListener.getParoleState());
+
+        // Charging Again
+        paroleListener.rearmLatch();
+        startTime = getCurrentTime();
+        setChargingState(mController, true);
+        paroleListener.awaitOnLatch(STABLE_CHARGING_THRESHOLD * 3 / 2);
+        assertTrue(paroleListener.getParoleState());
+        assertTrue(paroleListener.mOnParole);
+        assertEquals(STABLE_CHARGING_THRESHOLD,
+                paroleListener.getLastParoleChangeTime() - startTime,
+                marginOfError);
     }
 
     private void assertTimeout(AppStandbyController controller, long elapsedTime, int bucket) {
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 1c2d538..013c672 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -552,7 +552,8 @@
     }
 
     @Override
-    public boolean isDockSideAllowed(int dockSide) {
+    public boolean isDockSideAllowed(int dockSide, int originalDockSide, int displayWidth,
+            int displayHeight, int displayRotation) {
         return false;
     }
 
diff --git a/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
new file mode 100644
index 0000000..e076399
--- /dev/null
+++ b/services/tests/servicestests/src/com/android/server/wm/WindowContainerTraversalTests.java
@@ -0,0 +1,63 @@
+/*
+ * 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.server.wm;
+
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
+import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
+import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
+import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Matchers.eq;
+
+import android.platform.test.annotations.Presubmit;
+import android.support.test.filters.SmallTest;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.mockito.Mock;
+
+import java.util.function.Consumer;
+
+/**
+ * Tests for {@link WindowContainer#forAllWindows} and various implementations.
+ */
+@SmallTest
+@Presubmit
+@RunWith(AndroidJUnit4.class)
+public class WindowContainerTraversalTests extends WindowTestsBase {
+
+    @Test
+    public void testDockedDividerPosition() throws Exception {
+        final WindowState splitScreenWindow = createWindowOnStack(null,
+                WINDOWING_MODE_SPLIT_SCREEN_PRIMARY, ACTIVITY_TYPE_STANDARD, TYPE_BASE_APPLICATION,
+                mDisplayContent, "splitScreenWindow");
+        final WindowState splitScreenSecondaryWindow = createWindowOnStack(null,
+                WINDOWING_MODE_SPLIT_SCREEN_SECONDARY, ACTIVITY_TYPE_STANDARD,
+                TYPE_BASE_APPLICATION, mDisplayContent, "splitScreenSecondaryWindow");
+
+        sWm.mInputMethodTarget = splitScreenWindow;
+
+        Consumer<WindowState> c = mock(Consumer.class);
+        mDisplayContent.forAllWindows(c, false);
+
+        verify(c).accept(eq(mDockedDividerWindow));
+        verify(c).accept(eq(mImeWindow));
+    }
+}
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 eb1c997..376cc64 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -16,6 +16,7 @@
 
 package com.android.server.notification;
 
+import static android.app.Notification.FLAG_FOREGROUND_SERVICE;
 import static android.app.NotificationManager.EXTRA_BLOCKED_STATE;
 import static android.app.NotificationManager.IMPORTANCE_HIGH;
 import static android.app.NotificationManager.IMPORTANCE_LOW;
@@ -528,7 +529,7 @@
                 PKG, new ParceledListSlice(Arrays.asList(channel)));
 
         final StatusBarNotification sbn = generateNotificationRecord(channel).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         waitForIdle();
@@ -556,11 +557,34 @@
         assertEquals(IMPORTANCE_NONE,
                 mBinderService.getNotificationChannel(PKG, channel.getId()).getImportance());
 
-        final StatusBarNotification sbn = generateNotificationRecord(channel).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        StatusBarNotification sbn = generateNotificationRecord(channel).sbn;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         waitForIdle();
+        // The first time a foreground service notification is shown, we allow the channel
+        // to be updated to allow it to be seen.
+        assertEquals(1, mBinderService.getActiveNotifications(sbn.getPackageName()).length);
+        assertEquals(IMPORTANCE_LOW,
+                mService.getNotificationRecord(sbn.getKey()).getImportance());
+        assertEquals(IMPORTANCE_LOW,
+                mBinderService.getNotificationChannel(PKG, channel.getId()).getImportance());
+        mBinderService.cancelNotificationWithTag(PKG, "tag", sbn.getId(), sbn.getUserId());
+        waitForIdle();
+
+        update = new NotificationChannel("blockedbyuser", "name", IMPORTANCE_NONE);
+        update.setFgServiceShown(true);
+        mBinderService.updateNotificationChannelForPackage(PKG, mUid, update);
+        waitForIdle();
+        assertEquals(IMPORTANCE_NONE,
+                mBinderService.getNotificationChannel(PKG, channel.getId()).getImportance());
+
+        sbn = generateNotificationRecord(channel).sbn;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
+        mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
+                sbn.getId(), sbn.getNotification(), sbn.getUserId());
+        waitForIdle();
+        // The second time it is shown, we keep the user's preference.
         assertEquals(0, mBinderService.getActiveNotifications(sbn.getPackageName()).length);
         assertNull(mService.getNotificationRecord(sbn.getKey()));
         assertEquals(IMPORTANCE_NONE,
@@ -601,7 +625,7 @@
         mBinderService.setNotificationsEnabledForPackage(PKG, mUid, false);
 
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         waitForIdle();
@@ -759,7 +783,7 @@
     @Test
     public void testCancelAllNotifications_IgnoreForegroundService() throws Exception {
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         mBinderService.cancelAllNotifications(PKG, sbn.getUserId());
@@ -773,7 +797,7 @@
     @Test
     public void testCancelAllNotifications_IgnoreOtherPackages() throws Exception {
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         mBinderService.cancelAllNotifications("other_pkg_name", sbn.getUserId());
@@ -901,7 +925,7 @@
     @Test
     public void testRemoveForegroundServiceFlag_ImmediatelyAfterEnqueue() throws Exception {
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
-        sbn.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        sbn.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", null,
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         mInternalService.removeForegroundServiceFlagFromNotification(PKG, sbn.getId(),
@@ -909,14 +933,14 @@
         waitForIdle();
         StatusBarNotification[] notifs =
                 mBinderService.getActiveNotifications(sbn.getPackageName());
-        assertEquals(0, notifs[0].getNotification().flags & Notification.FLAG_FOREGROUND_SERVICE);
+        assertEquals(0, notifs[0].getNotification().flags & FLAG_FOREGROUND_SERVICE);
     }
 
     @Test
     public void testCancelAfterSecondEnqueueDoesNotSpecifyForegroundFlag() throws Exception {
         final StatusBarNotification sbn = generateNotificationRecord(null).sbn;
         sbn.getNotification().flags =
-                Notification.FLAG_ONGOING_EVENT | Notification.FLAG_FOREGROUND_SERVICE;
+                Notification.FLAG_ONGOING_EVENT | FLAG_FOREGROUND_SERVICE;
         mBinderService.enqueueNotificationWithTag(PKG, "opPkg", "tag",
                 sbn.getId(), sbn.getNotification(), sbn.getUserId());
         sbn.getNotification().flags = Notification.FLAG_ONGOING_EVENT;
@@ -937,7 +961,7 @@
                 mTestNotificationChannel, 2, "group", false);
         final NotificationRecord child2 = generateNotificationRecord(
                 mTestNotificationChannel, 3, "group", false);
-        child2.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        child2.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         final NotificationRecord newGroup = generateNotificationRecord(
                 mTestNotificationChannel, 4, "group2", false);
         mService.addNotification(parent);
@@ -960,7 +984,7 @@
                 mTestNotificationChannel, 2, "group", false);
         final NotificationRecord child2 = generateNotificationRecord(
                 mTestNotificationChannel, 3, "group", false);
-        child2.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        child2.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         final NotificationRecord newGroup = generateNotificationRecord(
                 mTestNotificationChannel, 4, "group2", false);
         mService.addNotification(parent);
@@ -984,7 +1008,7 @@
                 mTestNotificationChannel, 2, "group", false);
         final NotificationRecord child2 = generateNotificationRecord(
                 mTestNotificationChannel, 3, "group", false);
-        child2.getNotification().flags |= Notification.FLAG_FOREGROUND_SERVICE;
+        child2.getNotification().flags |= FLAG_FOREGROUND_SERVICE;
         final NotificationRecord newGroup = generateNotificationRecord(
                 mTestNotificationChannel, 4, "group2", false);
         mService.addNotification(parent);
@@ -2187,7 +2211,6 @@
     @Test
     public void testReadPolicyXml_readApprovedServicesFromXml() throws Exception {
         final String upgradeXml = "<notification-policy version=\"1\">"
-                + "<zen></zen>"
                 + "<ranking></ranking>"
                 + "<enabled_listeners>"
                 + "<service_listing approved=\"test\" user=\"0\" primary=\"true\" />"
@@ -2215,7 +2238,6 @@
     @Test
     public void testReadPolicyXml_readApprovedServicesFromSettings() throws Exception {
         final String preupgradeXml = "<notification-policy version=\"1\">"
-                + "<zen></zen>"
                 + "<ranking></ranking>"
                 + "</notification-policy>";
         mService.readPolicyXml(
@@ -2257,7 +2279,7 @@
                 NotificationChannel.DEFAULT_CHANNEL_ID)
                 .setContentTitle("foo")
                 .setSmallIcon(android.R.drawable.sym_def_app_icon)
-                .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true)
+                .setFlag(FLAG_FOREGROUND_SERVICE, true)
                 .setPriority(Notification.PRIORITY_MIN);
 
         StatusBarNotification sbn = new StatusBarNotification(preOPkg, preOPkg, 9, "tag", preOUid,
@@ -2272,7 +2294,7 @@
         nb = new Notification.Builder(mContext)
                 .setContentTitle("foo")
                 .setSmallIcon(android.R.drawable.sym_def_app_icon)
-                .setFlag(Notification.FLAG_FOREGROUND_SERVICE, true)
+                .setFlag(FLAG_FOREGROUND_SERVICE, true)
                 .setPriority(Notification.PRIORITY_MIN);
 
         sbn = new StatusBarNotification(preOPkg, preOPkg, 9, "tag", preOUid,
@@ -2670,6 +2692,26 @@
     }
 
     @Test
+    public void testVisualDifference_foreground() {
+        Notification.Builder nb1 = new Notification.Builder(mContext, "")
+                .setContentTitle("foo");
+        StatusBarNotification sbn1 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
+                nb1.build(), new UserHandle(mUid), null, 0);
+        NotificationRecord r1 =
+                new NotificationRecord(mContext, sbn1, mock(NotificationChannel.class));
+
+        Notification.Builder nb2 = new Notification.Builder(mContext, "")
+                .setFlag(FLAG_FOREGROUND_SERVICE, true)
+                .setContentTitle("bar");
+        StatusBarNotification sbn2 = new StatusBarNotification(PKG, PKG, 0, "tag", mUid, 0,
+                nb2.build(), new UserHandle(mUid), null, 0);
+        NotificationRecord r2 =
+                new NotificationRecord(mContext, sbn2, mock(NotificationChannel.class));
+
+        assertFalse(mService.isVisuallyInterruptive(r1, r2));
+    }
+
+    @Test
     public void testVisualDifference_diffTitle() {
         Notification.Builder nb1 = new Notification.Builder(mContext, "")
                 .setContentTitle("foo");
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationTest.java
index d846d21..36ec221 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationTest.java
@@ -336,6 +336,90 @@
     }
 
     @Test
+    public void testRemoteViews_layoutChange() {
+        RemoteViews a = mock(RemoteViews.class);
+        when(a.getLayoutId()).thenReturn(234);
+        RemoteViews b = mock(RemoteViews.class);
+        when(b.getLayoutId()).thenReturn(189);
+
+        Notification.Builder n1 = new Notification.Builder(mContext, "test").setContent(a);
+        Notification.Builder n2 = new Notification.Builder(mContext, "test").setContent(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomBigContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomBigContentView(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+    }
+
+    @Test
+    public void testRemoteViews_layoutSame() {
+        RemoteViews a = mock(RemoteViews.class);
+        when(a.getLayoutId()).thenReturn(234);
+        RemoteViews b = mock(RemoteViews.class);
+        when(b.getLayoutId()).thenReturn(234);
+
+        Notification.Builder n1 = new Notification.Builder(mContext, "test").setContent(a);
+        Notification.Builder n2 = new Notification.Builder(mContext, "test").setContent(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomBigContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomBigContentView(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+    }
+
+    @Test
+    public void testRemoteViews_sequenceChange() {
+        RemoteViews a = mock(RemoteViews.class);
+        when(a.getLayoutId()).thenReturn(234);
+        when(a.getSequenceNumber()).thenReturn(1);
+        RemoteViews b = mock(RemoteViews.class);
+        when(b.getLayoutId()).thenReturn(234);
+        when(b.getSequenceNumber()).thenReturn(2);
+
+        Notification.Builder n1 = new Notification.Builder(mContext, "test").setContent(a);
+        Notification.Builder n2 = new Notification.Builder(mContext, "test").setContent(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomBigContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomBigContentView(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(b);
+        assertTrue(Notification.areRemoteViewsChanged(n1, n2));
+    }
+
+    @Test
+    public void testRemoteViews_sequenceSame() {
+        RemoteViews a = mock(RemoteViews.class);
+        when(a.getLayoutId()).thenReturn(234);
+        when(a.getSequenceNumber()).thenReturn(1);
+        RemoteViews b = mock(RemoteViews.class);
+        when(b.getLayoutId()).thenReturn(234);
+        when(b.getSequenceNumber()).thenReturn(1);
+
+        Notification.Builder n1 = new Notification.Builder(mContext, "test").setContent(a);
+        Notification.Builder n2 = new Notification.Builder(mContext, "test").setContent(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomBigContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomBigContentView(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+
+        n1 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(a);
+        n2 = new Notification.Builder(mContext, "test").setCustomHeadsUpContentView(b);
+        assertFalse(Notification.areRemoteViewsChanged(n1, n2));
+    }
+
+    @Test
     public void testActionsDifferent_null() {
         Notification n1 = new Notification.Builder(mContext, "test")
                 .build();
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
index 8183a74..8905950 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/RankingHelperTest.java
@@ -1714,13 +1714,13 @@
     }
 
     @Test
-    public void testAndroidPkgCanBypassDnd_creation() {
+    public void testAndroidPkgCannotBypassDnd_creation() {
         NotificationChannel test = new NotificationChannel("A", "a", IMPORTANCE_LOW);
         test.setBypassDnd(true);
 
         mHelper.createNotificationChannel(SYSTEM_PKG, SYSTEM_UID, test, true, false);
 
-        assertTrue(mHelper.getNotificationChannel(SYSTEM_PKG, SYSTEM_UID, "A", false)
+        assertFalse(mHelper.getNotificationChannel(SYSTEM_PKG, SYSTEM_UID, "A", false)
                 .canBypassDnd());
     }
 
@@ -1745,7 +1745,7 @@
     }
 
     @Test
-    public void testAndroidPkgCanBypassDnd_update() throws Exception {
+    public void testAndroidPkgCannotBypassDnd_update() throws Exception {
         NotificationChannel test = new NotificationChannel("A", "a", IMPORTANCE_LOW);
         mHelper.createNotificationChannel(SYSTEM_PKG, SYSTEM_UID, test, true, false);
 
@@ -1753,11 +1753,8 @@
         update.setBypassDnd(true);
         mHelper.createNotificationChannel(SYSTEM_PKG, SYSTEM_UID, update, true, false);
 
-        assertTrue(mHelper.getNotificationChannel(SYSTEM_PKG, SYSTEM_UID, "A", false)
+        assertFalse(mHelper.getNotificationChannel(SYSTEM_PKG, SYSTEM_UID, "A", false)
                 .canBypassDnd());
-
-        // setup + 1st check
-        verify(mPm, times(2)).getPackageInfoAsUser(any(), anyInt(), anyInt());
     }
 
     @Test
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
index d02a983..afc1263 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/ZenModeHelperTest.java
@@ -17,6 +17,9 @@
 package com.android.server.notification;
 
 import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_BADGE;
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_FULL_SCREEN_INTENT;
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_LIGHTS;
+import static android.app.NotificationManager.Policy.SUPPRESSED_EFFECT_PEEK;
 
 import static junit.framework.Assert.assertFalse;
 import static junit.framework.Assert.assertEquals;
@@ -569,8 +572,6 @@
         mZenModeHelperSpy.mConfig.allowMessages = true;
         mZenModeHelperSpy.mConfig.allowEvents = true;
         mZenModeHelperSpy.mConfig.allowRepeatCallers= true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOff = true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOn = true;
         mZenModeHelperSpy.mConfig.suppressedVisualEffects = SUPPRESSED_EFFECT_BADGE;
         mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
         mZenModeHelperSpy.mConfig.manualRule.component = new ComponentName("a", "a");
@@ -593,8 +594,6 @@
         mZenModeHelperSpy.mConfig.allowMessages = true;
         mZenModeHelperSpy.mConfig.allowEvents = true;
         mZenModeHelperSpy.mConfig.allowRepeatCallers= true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOff = true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOn = true;
         mZenModeHelperSpy.mConfig.suppressedVisualEffects = SUPPRESSED_EFFECT_BADGE;
         mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
         mZenModeHelperSpy.mConfig.manualRule.zenMode =
@@ -645,6 +644,115 @@
     }
 
     @Test
+    public void testMigrateSuppressedVisualEffects_oneExistsButOff() throws Exception {
+        String xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOff=\"false\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        XmlPullParser parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(0, mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+
+        xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOn=\"false\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(0, mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+    }
+
+    @Test
+    public void testMigrateSuppressedVisualEffects_bothExistButOff() throws Exception {
+        String xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOff=\"false\" visualScreenOn=\"false\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        XmlPullParser parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(0, mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+    }
+
+    @Test
+    public void testMigrateSuppressedVisualEffects_bothExistButOn() throws Exception {
+        String xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOff=\"true\" visualScreenOn=\"true\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        XmlPullParser parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(SUPPRESSED_EFFECT_FULL_SCREEN_INTENT
+                | SUPPRESSED_EFFECT_LIGHTS
+                | SUPPRESSED_EFFECT_PEEK,
+                mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+
+        xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOff=\"false\" visualScreenOn=\"true\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(SUPPRESSED_EFFECT_PEEK, mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+
+        xml = "<zen version=\"6\" user=\"0\">\n"
+                + "<allow calls=\"false\" repeatCallers=\"false\" messages=\"true\" "
+                + "reminders=\"false\" events=\"false\" callsFrom=\"1\" messagesFrom=\"2\" "
+                + "visualScreenOff=\"true\" visualScreenOn=\"false\" alarms=\"true\" "
+                + "media=\"true\" system=\"false\" />\n"
+                + "<disallow visualEffects=\"511\" />"
+                + "</zen>";
+
+        parser = Xml.newPullParser();
+        parser.setInput(new BufferedInputStream(
+                new ByteArrayInputStream(xml.getBytes())), null);
+        parser.nextTag();
+        mZenModeHelperSpy.readXml(parser, false);
+
+        assertEquals(SUPPRESSED_EFFECT_FULL_SCREEN_INTENT | SUPPRESSED_EFFECT_LIGHTS,
+                mZenModeHelperSpy.mConfig.suppressedVisualEffects);
+    }
+
+    @Test
     public void testReadXmlResetDefaultRules() throws Exception {
         setupZenConfig();
 
@@ -705,16 +813,6 @@
         setupZenConfigMaintained();
     }
 
-    @Test
-    public void testPolicyReadsSuppressedEffects() {
-        mZenModeHelperSpy.mConfig.allowWhenScreenOff = true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOn = true;
-        mZenModeHelperSpy.mConfig.suppressedVisualEffects = SUPPRESSED_EFFECT_BADGE;
-
-        NotificationManager.Policy policy = mZenModeHelperSpy.getNotificationPolicy();
-        assertEquals(SUPPRESSED_EFFECT_BADGE, policy.suppressedVisualEffects);
-    }
-
     private void setupZenConfig() {
         mZenModeHelperSpy.mZenMode = Settings.Global.ZEN_MODE_IMPORTANT_INTERRUPTIONS;
         mZenModeHelperSpy.mConfig.allowAlarms = false;
@@ -725,8 +823,6 @@
         mZenModeHelperSpy.mConfig.allowMessages = true;
         mZenModeHelperSpy.mConfig.allowEvents = true;
         mZenModeHelperSpy.mConfig.allowRepeatCallers= true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOff = true;
-        mZenModeHelperSpy.mConfig.allowWhenScreenOn = true;
         mZenModeHelperSpy.mConfig.suppressedVisualEffects = SUPPRESSED_EFFECT_BADGE;
         mZenModeHelperSpy.mConfig.manualRule = new ZenModeConfig.ZenRule();
         mZenModeHelperSpy.mConfig.manualRule.zenMode =
@@ -746,8 +842,6 @@
         assertTrue(mZenModeHelperSpy.mConfig.allowMessages);
         assertTrue(mZenModeHelperSpy.mConfig.allowEvents);
         assertTrue(mZenModeHelperSpy.mConfig.allowRepeatCallers);
-        assertTrue(mZenModeHelperSpy.mConfig.allowWhenScreenOff);
-        assertTrue(mZenModeHelperSpy.mConfig.allowWhenScreenOn);
         assertEquals(SUPPRESSED_EFFECT_BADGE, mZenModeHelperSpy.mConfig.suppressedVisualEffects);
     }
 }
diff --git a/services/usage/java/com/android/server/usage/AppStandbyController.java b/services/usage/java/com/android/server/usage/AppStandbyController.java
index 97c5ac9..08b0496 100644
--- a/services/usage/java/com/android/server/usage/AppStandbyController.java
+++ b/services/usage/java/com/android/server/usage/AppStandbyController.java
@@ -192,6 +192,7 @@
     /** Check the state of one app: arg1 = userId, arg2 = uid, obj = (String) packageName */
     static final int MSG_CHECK_PACKAGE_IDLE_STATE = 11;
     static final int MSG_REPORT_EXEMPTED_SYNC_START = 12;
+    static final int MSG_UPDATE_STABLE_CHARGING= 13;
 
     long mCheckIdleIntervalMillis;
     long mAppIdleParoleIntervalMillis;
@@ -213,10 +214,13 @@
     long mExemptedSyncAdapterTimeoutMillis;
     /** Maximum time a system interaction should keep the buckets elevated. */
     long mSystemInteractionTimeoutMillis;
+    /** The length of time phone must be charging before considered stable enough to run jobs  */
+    long mStableChargingThresholdMillis;
 
     volatile boolean mAppIdleEnabled;
     boolean mAppIdleTempParoled;
     boolean mCharging;
+    boolean mChargingStable;
     private long mLastAppIdleParoledTime;
     private boolean mSystemServicesReady = false;
     // There was a system update, defaults need to be initialized after services are ready
@@ -297,7 +301,7 @@
         mPackageManager = mContext.getPackageManager();
         mDeviceStateReceiver = new DeviceStateReceiver();
 
-        IntentFilter deviceStates = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
+        IntentFilter deviceStates = new IntentFilter(BatteryManager.ACTION_CHARGING);
         deviceStates.addAction(BatteryManager.ACTION_DISCHARGING);
         deviceStates.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED);
         mContext.registerReceiver(mDeviceStateReceiver, deviceStates);
@@ -405,6 +409,27 @@
         synchronized (mAppIdleLock) {
             if (mCharging != charging) {
                 mCharging = charging;
+                if (DEBUG) Slog.d(TAG, "Setting mCharging to " + charging);
+                if (charging) {
+                    if (DEBUG) {
+                        Slog.d(TAG, "Scheduling MSG_UPDATE_STABLE_CHARGING  delay = "
+                                + mStableChargingThresholdMillis);
+                    }
+                    mHandler.sendEmptyMessageDelayed(MSG_UPDATE_STABLE_CHARGING,
+                            mStableChargingThresholdMillis);
+                } else {
+                    mHandler.removeMessages(MSG_UPDATE_STABLE_CHARGING);
+                    updateChargingStableState();
+                }
+            }
+        }
+    }
+
+    void updateChargingStableState() {
+        synchronized (mAppIdleLock) {
+            if (mChargingStable != mCharging) {
+                if (DEBUG) Slog.d(TAG, "Setting mChargingStable to " + mCharging);
+                mChargingStable = mCharging;
                 postParoleStateChanged();
             }
         }
@@ -431,7 +456,8 @@
     boolean isParoledOrCharging() {
         if (!mAppIdleEnabled) return true;
         synchronized (mAppIdleLock) {
-            return mAppIdleTempParoled || mCharging;
+            // Only consider stable charging when determining charge state.
+            return mAppIdleTempParoled || mChargingStable;
         }
     }
 
@@ -1371,11 +1397,15 @@
         pw.print("mAppIdleEnabled="); pw.print(mAppIdleEnabled);
         pw.print(" mAppIdleTempParoled="); pw.print(mAppIdleTempParoled);
         pw.print(" mCharging="); pw.print(mCharging);
+        pw.print(" mChargingStable="); pw.print(mChargingStable);
         pw.print(" mLastAppIdleParoledTime=");
         TimeUtils.formatDuration(mLastAppIdleParoledTime, pw);
         pw.println();
         pw.print("mScreenThresholds="); pw.println(Arrays.toString(mAppStandbyScreenThresholds));
         pw.print("mElapsedThresholds="); pw.println(Arrays.toString(mAppStandbyElapsedThresholds));
+        pw.print("mStableChargingThresholdMillis=");
+        TimeUtils.formatDuration(mStableChargingThresholdMillis, pw);
+        pw.println();
     }
 
     /**
@@ -1549,7 +1579,7 @@
 
                 case MSG_PAROLE_STATE_CHANGED:
                     if (DEBUG) Slog.d(TAG, "Parole state: " + mAppIdleTempParoled
-                            + ", Charging state:" + mCharging);
+                            + ", Charging state:" + mChargingStable);
                     informParoleStateChanged();
                     break;
                 case MSG_CHECK_PACKAGE_IDLE_STATE:
@@ -1561,6 +1591,10 @@
                     reportExemptedSyncStart((String) msg.obj, msg.arg1);
                     break;
 
+                case MSG_UPDATE_STABLE_CHARGING:
+                    updateChargingStableState();
+                    break;
+
                 default:
                     super.handleMessage(msg);
                     break;
@@ -1572,11 +1606,16 @@
     private class DeviceStateReceiver extends BroadcastReceiver {
         @Override
         public void onReceive(Context context, Intent intent) {
-            final String action = intent.getAction();
-            if (Intent.ACTION_BATTERY_CHANGED.equals(action)) {
-                setChargingState(intent.getIntExtra("plugged", 0) != 0);
-            } else if (PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED.equals(action)) {
-                onDeviceIdleModeChanged();
+            switch (intent.getAction()) {
+                case BatteryManager.ACTION_CHARGING:
+                    setChargingState(true);
+                    break;
+                case BatteryManager.ACTION_DISCHARGING:
+                    setChargingState(false);
+                    break;
+                case PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED:
+                    onDeviceIdleModeChanged();
+                    break;
             }
         }
     }
@@ -1620,9 +1659,11 @@
          */
         @Deprecated
         private static final String KEY_IDLE_DURATION_OLD = "idle_duration";
-
+        @Deprecated
         private static final String KEY_IDLE_DURATION = "idle_duration2";
+        @Deprecated
         private static final String KEY_WALLCLOCK_THRESHOLD = "wallclock_threshold";
+
         private static final String KEY_PAROLE_INTERVAL = "parole_interval";
         private static final String KEY_PAROLE_WINDOW = "parole_window";
         private static final String KEY_PAROLE_DURATION = "parole_duration";
@@ -1638,12 +1679,14 @@
         private static final String KEY_EXEMPTED_SYNC_HOLD_DURATION = "exempted_sync_duration";
         private static final String KEY_SYSTEM_INTERACTION_HOLD_DURATION =
                 "system_interaction_duration";
+        private static final String KEY_STABLE_CHARGING_THRESHOLD = "stable_charging_threshold";
         public static final long DEFAULT_STRONG_USAGE_TIMEOUT = 1 * ONE_HOUR;
         public static final long DEFAULT_NOTIFICATION_TIMEOUT = 12 * ONE_HOUR;
         public static final long DEFAULT_SYSTEM_UPDATE_TIMEOUT = 2 * ONE_HOUR;
         public static final long DEFAULT_SYSTEM_INTERACTION_TIMEOUT = 10 * ONE_MINUTE;
         public static final long DEFAULT_SYNC_ADAPTER_TIMEOUT = 10 * ONE_MINUTE;
         public static final long DEFAULT_EXEMPTED_SYNC_TIMEOUT = 10 * ONE_MINUTE;
+        public static final long DEFAULT_STABLE_CHARGING_THRESHOLD = 10 * ONE_MINUTE;
 
         private final KeyValueListParser mParser = new KeyValueListParser(',');
 
@@ -1733,6 +1776,9 @@
                 mSystemInteractionTimeoutMillis = mParser.getDurationMillis
                         (KEY_SYSTEM_INTERACTION_HOLD_DURATION,
                                 COMPRESS_TIME ? ONE_MINUTE : DEFAULT_SYSTEM_INTERACTION_TIMEOUT);
+                mStableChargingThresholdMillis = mParser.getDurationMillis
+                        (KEY_STABLE_CHARGING_THRESHOLD,
+                                COMPRESS_TIME ? ONE_MINUTE : DEFAULT_STABLE_CHARGING_THRESHOLD);
             }
         }
 
diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
index cd524a5..13e3069 100644
--- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java
@@ -46,6 +46,10 @@
 import android.hardware.soundtrigger.SoundTrigger.ModuleProperties;
 import android.hardware.soundtrigger.SoundTrigger.RecognitionConfig;
 import android.hardware.soundtrigger.SoundTrigger.SoundModel;
+import android.media.AudioAttributes;
+import android.media.AudioFormat;
+import android.media.AudioRecord;
+import android.media.MediaRecorder;
 import android.media.soundtrigger.ISoundTriggerDetectionService;
 import android.media.soundtrigger.ISoundTriggerDetectionServiceClient;
 import android.media.soundtrigger.SoundTriggerDetectionService;
@@ -654,8 +658,45 @@
         }
     }
 
-    private interface Operation {
-        void run(int opId, ISoundTriggerDetectionService service) throws RemoteException;
+    /**
+     * A single operation run in a {@link RemoteSoundTriggerDetectionService}.
+     *
+     * <p>Once the remote service is connected either setup + execute or setup + stop is executed.
+     */
+    private static class Operation {
+        private interface ExecuteOp {
+            void run(int opId, ISoundTriggerDetectionService service) throws RemoteException;
+        }
+
+        private final @Nullable Runnable mSetupOp;
+        private final @NonNull ExecuteOp mExecuteOp;
+        private final @Nullable Runnable mDropOp;
+
+        private Operation(@Nullable Runnable setupOp, @NonNull ExecuteOp executeOp,
+                @Nullable Runnable cancelOp) {
+            mSetupOp = setupOp;
+            mExecuteOp = executeOp;
+            mDropOp = cancelOp;
+        }
+
+        private void setup() {
+            if (mSetupOp != null) {
+                mSetupOp.run();
+            }
+        }
+
+        void run(int opId, @NonNull ISoundTriggerDetectionService service) throws RemoteException {
+            setup();
+            mExecuteOp.run(opId, service);
+        }
+
+        void drop() {
+            setup();
+
+            if (mDropOp != null) {
+                mDropOp.run();
+            }
+        }
     }
 
     /**
@@ -902,6 +943,10 @@
         private void runOrAddOperation(Operation op) {
             synchronized (mRemoteServiceLock) {
                 if (mIsDestroyed || mDestroyOnceRunningOpsDone) {
+                    Slog.w(TAG, mPuuid + ": Dropped operation as already destroyed or marked for "
+                            + "destruction");
+
+                    op.drop();
                     return;
                 }
 
@@ -922,9 +967,15 @@
 
                     int opsAdded = mNumOps.getOpsAdded();
                     if (mNumOps.getOpsAdded() >= opsAllowed) {
-                        if (DEBUG || opsAllowed + 10 > opsAdded) {
-                            Slog.w(TAG, mPuuid + ": Dropped operation as too many operations were "
-                                    + "run in last 24 hours");
+                        try {
+                            if (DEBUG || opsAllowed + 10 > opsAdded) {
+                                Slog.w(TAG, mPuuid + ": Dropped operation as too many operations "
+                                        + "were run in last 24 hours");
+                            }
+
+                            op.drop();
+                        } catch (Exception e) {
+                            Slog.e(TAG, mPuuid + ": Could not drop operation", e);
                         }
                     } else {
                         mNumOps.addOp(currentTime);
@@ -972,34 +1023,87 @@
                     + ")");
         }
 
+        /**
+         * Create an AudioRecord enough for starting and releasing the data buffered for the event.
+         *
+         * @param event The event that was received
+         * @return The initialized AudioRecord
+         */
+        private @NonNull AudioRecord createAudioRecordForEvent(
+                @NonNull SoundTrigger.GenericRecognitionEvent event) {
+            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());
+
+            return new AudioRecord(attributes, captureFormat, bufferSize,
+                    event.getCaptureSession());
+        }
+
         @Override
         public void onGenericSoundTriggerDetected(SoundTrigger.GenericRecognitionEvent event) {
             if (DEBUG) Slog.v(TAG, mPuuid + ": Generic sound trigger event: " + event);
 
-            runOrAddOperation((opId, service) -> {
-                if (!mRecognitionConfig.allowMultipleTriggers) {
-                    synchronized (mCallbacksLock) {
-                        mCallbacks.remove(mPuuid.getUuid());
-                    }
-                    mDestroyOnceRunningOpsDone = true;
-                }
+            runOrAddOperation(new Operation(
+                    // always execute:
+                    () -> {
+                        if (!mRecognitionConfig.allowMultipleTriggers) {
+                            // Unregister this remoteService once op is done
+                            synchronized (mCallbacksLock) {
+                                mCallbacks.remove(mPuuid.getUuid());
+                            }
+                            mDestroyOnceRunningOpsDone = true;
+                        }
+                    },
+                    // execute if not throttled:
+                    (opId, service) -> service.onGenericRecognitionEvent(mPuuid, opId, event),
+                    // execute if throttled:
+                    () -> {
+                        if (event.isCaptureAvailable()) {
+                            AudioRecord capturedData = createAudioRecordForEvent(event);
 
-                service.onGenericRecognitionEvent(mPuuid, opId, 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();
+                        }
+                    }));
         }
 
         @Override
         public void onError(int status) {
             if (DEBUG) Slog.v(TAG, mPuuid + ": onError: " + status);
 
-            runOrAddOperation((opId, service) -> {
-                synchronized (mCallbacksLock) {
-                    mCallbacks.remove(mPuuid.getUuid());
-                }
-                mDestroyOnceRunningOpsDone = true;
-
-                service.onError(mPuuid, opId, status);
-            });
+            runOrAddOperation(
+                    new Operation(
+                            // always execute:
+                            () -> {
+                                // Unregister this remoteService once op is done
+                                synchronized (mCallbacksLock) {
+                                    mCallbacks.remove(mPuuid.getUuid());
+                                }
+                                mDestroyOnceRunningOpsDone = true;
+                            },
+                            // execute if not throttled:
+                            (opId, service) -> service.onError(mPuuid, opId, status),
+                            // nothing to do if throttled
+                            null));
         }
 
         @Override
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java
index f1653ce..f2438b8 100644
--- a/telephony/java/android/provider/Telephony.java
+++ b/telephony/java/android/provider/Telephony.java
@@ -2900,12 +2900,30 @@
          * @hide
          */
         public static final int OWNED_BY_DPC = 0;
+
         /**
          * Possible value for the OWNED_BY field.
          * APN is owned by other sources.
          * @hide
          */
         public static final int OWNED_BY_OTHERS = 1;
+
+        /**
+         * The APN set id. When the user manually selects an APN or the framework sets an APN as
+         * preferred, all APNs with the same set id as the selected APN should be prioritized over
+         * APNs in other sets.
+         * @hide
+         */
+        public static final String APN_SET_ID = "apn_set_id";
+
+        /**
+         * Possible value for the APN_SET_ID field. By default APNs will not belong to a set. If the
+         * user manually selects an APN with no set set, there is no need to prioritize any specific
+         * APN set ids.
+         * @hide
+         */
+        public static final int NO_SET_SET = 0;
+
     }
 
     /**
diff --git a/telephony/java/android/telephony/PhoneStateListener.java b/telephony/java/android/telephony/PhoneStateListener.java
index 006d7ab9..c2e779e 100644
--- a/telephony/java/android/telephony/PhoneStateListener.java
+++ b/telephony/java/android/telephony/PhoneStateListener.java
@@ -444,7 +444,7 @@
      * Callback invoked when device call state changes.
      * @param state call state
      * @param phoneNumber call phone number. If application does not have
-     * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} permission or carrier
+     * {@link android.Manifest.permission#READ_CALL_LOG READ_CALL_LOG} permission or carrier
      * privileges (see {@link TelephonyManager#hasCarrierPrivileges}), an empty string will be
      * passed as an argument.
      *
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 01fb299..5a77a9f 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -334,10 +334,12 @@
      *
      * <p>
      * The {@link #EXTRA_STATE} extra indicates the new call state.
-     * If the new state is RINGING, a second extra
-     * {@link #EXTRA_INCOMING_NUMBER} provides the incoming phone number as
-     * a String.
-     *
+     * If a receiving app has {@link android.Manifest.permission#READ_CALL_LOG} permission, a second
+     * extra {@link #EXTRA_INCOMING_NUMBER} provides the phone number for incoming and outoing calls
+     * as a String.  Note: If the receiving app has
+     * {@link android.Manifest.permission#READ_CALL_LOG} and
+     * {@link android.Manifest.permission#READ_PHONE_STATE} permission, it will receive the
+     * broadcast twice; one with the phone number and another without it.
      * <p class="note">
      * This was a {@link android.content.Context#sendStickyBroadcast sticky}
      * broadcast in version 1.0, but it is no longer sticky.
diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java
index 1dda6bf..90e9880 100644
--- a/telephony/java/com/android/ims/ImsConfig.java
+++ b/telephony/java/com/android/ims/ImsConfig.java
@@ -35,7 +35,6 @@
     private static final String TAG = "ImsConfig";
     private boolean DBG = true;
     private final IImsConfig miConfig;
-    private Context mContext;
 
     /**
      * Broadcast action: the feature enable status was changed
@@ -541,14 +540,12 @@
         public static final int WIFI_PREFERRED = 2;
     }
 
-    public ImsConfig(IImsConfig iconfig, Context context) {
-        if (DBG) Rlog.d(TAG, "ImsConfig created");
+    public ImsConfig(IImsConfig iconfig) {
         miConfig = iconfig;
-        mContext = context;
     }
 
     /**
-     * @deprecated see {@link #getInt(int)} instead.
+     * @deprecated see {@link #getConfigInt(int)} instead.
      */
     public int getProvisionedValue(int item) throws ImsException {
         return getConfigInt(item);
diff --git a/telephony/java/com/android/internal/telephony/TelephonyPermissions.java b/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
index a182f2b..bbe38b7 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyPermissions.java
@@ -15,6 +15,9 @@
  */
 package com.android.internal.telephony;
 
+import static android.content.pm.PackageManager.PERMISSION_GRANTED;
+
+import android.Manifest;
 import android.app.AppOpsManager;
 import android.content.Context;
 import android.content.pm.PackageManager;
@@ -75,7 +78,7 @@
     /**
      * Check whether the app with the given pid/uid can read phone state.
      *
-    * <p>This method behaves in one of the following ways:
+     * <p>This method behaves in one of the following ways:
      * <ul>
      *   <li>return true: if the caller has the READ_PRIVILEGED_PHONE_STATE permission, the
      *       READ_PHONE_STATE runtime permission, or carrier privileges on the given subId.
@@ -132,6 +135,40 @@
     }
 
     /**
+     * Check whether the app with the given pid/uid can read the call log.
+     * @return {@code true} if the specified app has the read call log permission and AppOpp granted
+     *      to it, {@code false} otherwise.
+     */
+    public static boolean checkReadCallLog(
+            Context context, int subId, int pid, int uid, String callingPackage) {
+        return checkReadCallLog(
+                context, TELEPHONY_SUPPLIER, subId, pid, uid, callingPackage);
+    }
+
+    @VisibleForTesting
+    public static boolean checkReadCallLog(
+            Context context, Supplier<ITelephony> telephonySupplier, int subId, int pid, int uid,
+            String callingPackage) {
+
+        if (context.checkPermission(Manifest.permission.READ_CALL_LOG, pid, uid)
+                != PERMISSION_GRANTED) {
+            // If we don't have the runtime permission, but do have carrier privileges, that
+            // suffices for being able to see the call phone numbers.
+            if (SubscriptionManager.isValidSubscriptionId(subId)) {
+                enforceCarrierPrivilege(telephonySupplier, subId, uid, "readCallLog");
+                return true;
+            }
+            return false;
+        }
+
+        // We have READ_CALL_LOG permission, so return true as long as the AppOps bit hasn't been
+        // revoked.
+        AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
+        return appOps.noteOp(AppOpsManager.OP_READ_CALL_LOG, uid, callingPackage) ==
+                AppOpsManager.MODE_ALLOWED;
+    }
+
+    /**
      * Returns whether the caller can read phone numbers.
      *
      * <p>Besides apps with the ability to read phone state per {@link #checkReadPhoneState}, the
@@ -204,7 +241,7 @@
     public static void enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(
             Context context, int subId, String message) {
         if (context.checkCallingOrSelfPermission(android.Manifest.permission.MODIFY_PHONE_STATE) ==
-                PackageManager.PERMISSION_GRANTED) {
+                PERMISSION_GRANTED) {
             return;
         }
 
diff --git a/test-mock/src/android/test/mock/MockContext.java b/test-mock/src/android/test/mock/MockContext.java
index 4dfd050..9d260eb 100644
--- a/test-mock/src/android/test/mock/MockContext.java
+++ b/test-mock/src/android/test/mock/MockContext.java
@@ -364,6 +364,13 @@
     }
 
     /** @hide */
+    @Override
+    public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions) {
+        throw new UnsupportedOperationException();
+    }
+
+    /** @hide */
     @SystemApi
     @Override
     public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
diff --git a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
index 4ca175f..6ce66f0 100644
--- a/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
+++ b/tests/AppLaunch/src/com/android/tests/applaunch/AppLaunch.java
@@ -98,7 +98,7 @@
     private static final String LAUNCH_FILE = "applaunch.txt";
     private static final String TRACE_SUB_DIRECTORY = "atrace_logs";
     private static final String DEFAULT_TRACE_CATEGORIES =
-            "sched,freq,gfx,view,dalvik,webview,input,wm,disk,am,wm,binder_driver,hal";
+            "sched,freq,gfx,view,dalvik,webview,input,wm,disk,am,wm,binder_driver,hal,ss";
     private static final String DEFAULT_TRACE_BUFFER_SIZE = "20000";
     private static final String DEFAULT_TRACE_DUMP_INTERVAL = "10";
     private static final String TRIAL_LAUNCH = "TRIAL_LAUNCH";
diff --git a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
index fc46b9c..788924b 100644
--- a/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
+++ b/tests/net/java/com/android/internal/net/NetworkStatsFactoryTest.java
@@ -116,20 +116,6 @@
     }
 
     @Test
-    public void testNetworkStatsSummary() throws Exception {
-        stageFile(R.raw.net_dev_typical, file("net/dev"));
-
-        final NetworkStats stats = mFactory.readNetworkStatsIfaceDev();
-        assertEquals(6, stats.size());
-        assertStatsEntry(stats, "lo", UID_ALL, SET_ALL, TAG_NONE, 8308L, 8308L);
-        assertStatsEntry(stats, "rmnet0", UID_ALL, SET_ALL, TAG_NONE, 1507570L, 489339L);
-        assertStatsEntry(stats, "ifb0", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
-        assertStatsEntry(stats, "ifb1", UID_ALL, SET_ALL, TAG_NONE, 52454L, 0L);
-        assertStatsEntry(stats, "sit0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
-        assertStatsEntry(stats, "ip6tnl0", UID_ALL, SET_ALL, TAG_NONE, 0L, 0L);
-    }
-
-    @Test
     public void testNetworkStatsSingle() throws Exception {
         stageFile(R.raw.xt_qtaguid_iface_typical, file("net/xt_qtaguid/iface_stat_all"));
 
diff --git a/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java b/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
index 2166240..25bd7c0 100644
--- a/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
+++ b/tests/utils/testutils/java/com/android/internal/util/test/BroadcastInterceptingContext.java
@@ -175,6 +175,12 @@
     }
 
     @Override
+    public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
+            String[] receiverPermissions) {
+        sendBroadcast(intent);
+    }
+
+    @Override
     public void sendBroadcastAsUser(Intent intent, UserHandle user) {
         sendBroadcast(intent);
     }
diff --git a/tools/aapt2/ResourceParser.cpp b/tools/aapt2/ResourceParser.cpp
index 19c6c31..7f48544 100644
--- a/tools/aapt2/ResourceParser.cpp
+++ b/tools/aapt2/ResourceParser.cpp
@@ -598,10 +598,13 @@
       // If no inner element exists, represent a unique identifier
       out_resource->value = util::make_unique<Id>();
     } else {
-      // If an inner element exists, the inner element must be a reference to
-      // another resource id
       Reference* ref = ValueCast<Reference>(out_resource->value.get());
-      if (!ref || ref->name.value().type != ResourceType::kId) {
+      if (ref && !ref->name && !ref->id) {
+        // A null reference also means there is no inner element when ids are in the form:
+        //    <id name="name"/>
+        out_resource->value = util::make_unique<Id>();
+      } else if (!ref || ref->name.value().type != ResourceType::kId) {
+        // If an inner element exists, the inner element must be a reference to another resource id
         diag_->Error(DiagMessage(out_resource->source)
                          << "<" << parser->element_name()
                          << "> inner element must either be a resource reference or empty");
diff --git a/tools/aapt2/ResourceParser_test.cpp b/tools/aapt2/ResourceParser_test.cpp
index c12b9fa..41b4041 100644
--- a/tools/aapt2/ResourceParser_test.cpp
+++ b/tools/aapt2/ResourceParser_test.cpp
@@ -944,20 +944,30 @@
   ASSERT_THAT(test::GetValue<Id>(&table_, "id/bar"), NotNull());
   ASSERT_THAT(test::GetValue<Id>(&table_, "id/baz"), NotNull());
 
+  input = R"(
+    <id name="foo2">@id/bar</id>
+    <id name="bar2"/>
+    <id name="baz2"></id>)";
+  ASSERT_TRUE(TestParse(input));
+
+  ASSERT_THAT(test::GetValue<Reference>(&table_, "id/foo2"), NotNull());
+  ASSERT_THAT(test::GetValue<Id>(&table_, "id/bar2"), NotNull());
+  ASSERT_THAT(test::GetValue<Id>(&table_, "id/baz2"), NotNull());
+
   // Reject attribute references
-  input = R"(<item name="foo2" type="id">?attr/bar"</item>)";
+  input = R"(<item name="foo3" type="id">?attr/bar"</item>)";
   ASSERT_FALSE(TestParse(input));
 
   // Reject non-references
-  input = R"(<item name="foo3" type="id">0x7f010001</item>)";
+  input = R"(<item name="foo4" type="id">0x7f010001</item>)";
   ASSERT_FALSE(TestParse(input));
-  input = R"(<item name="foo4" type="id">@drawable/my_image</item>)";
+  input = R"(<item name="foo5" type="id">@drawable/my_image</item>)";
   ASSERT_FALSE(TestParse(input));
-  input = R"(<item name="foo5" type="id"><string name="biz"></string></item>)";
+  input = R"(<item name="foo6" type="id"><string name="biz"></string></item>)";
   ASSERT_FALSE(TestParse(input));
 
   // Ids that reference other resource ids cannot be public
-  input = R"(<public name="foo6" type="id">@id/bar6</item>)";
+  input = R"(<public name="foo7" type="id">@id/bar7</item>)";
   ASSERT_FALSE(TestParse(input));
 }
 
diff --git a/tools/aapt2/format/binary/XmlFlattener.cpp b/tools/aapt2/format/binary/XmlFlattener.cpp
index d897941..2fe2424 100644
--- a/tools/aapt2/format/binary/XmlFlattener.cpp
+++ b/tools/aapt2/format/binary/XmlFlattener.cpp
@@ -79,23 +79,31 @@
   }
 
   void Visit(const xml::Text* node) override {
-    if (util::TrimWhitespace(node->text).empty()) {
-      // Skip whitespace only text nodes.
+    std::string text = util::TrimWhitespace(node->text).to_string();
+
+    // Skip whitespace only text nodes.
+    if (text.empty()) {
       return;
     }
 
+    // Compact leading and trailing whitespace into a single space
+    if (isspace(node->text[0])) {
+      text = ' ' + text;
+    }
+    if (isspace(node->text[node->text.length() - 1])) {
+      text = text + ' ';
+    }
+
     ChunkWriter writer(buffer_);
     ResXMLTree_node* flat_node = writer.StartChunk<ResXMLTree_node>(RES_XML_CDATA_TYPE);
     flat_node->lineNumber = util::HostToDevice32(node->line_number);
     flat_node->comment.index = util::HostToDevice32(-1);
 
-    ResXMLTree_cdataExt* flat_text = writer.NextBlock<ResXMLTree_cdataExt>();
-
     // Process plain strings to make sure they get properly escaped.
-    StringBuilder builder;
-    builder.AppendText(node->text);
-    AddString(builder.to_string(), kLowPriority, &flat_text->data);
+    text = StringBuilder(true /*preserve_spaces*/).AppendText(text).to_string();
 
+    ResXMLTree_cdataExt* flat_text = writer.NextBlock<ResXMLTree_cdataExt>();
+    AddString(text, kLowPriority, &flat_text->data);
     writer.Finish();
   }
 
diff --git a/tools/aapt2/format/binary/XmlFlattener_test.cpp b/tools/aapt2/format/binary/XmlFlattener_test.cpp
index 08243fe..25786b1 100644
--- a/tools/aapt2/format/binary/XmlFlattener_test.cpp
+++ b/tools/aapt2/format/binary/XmlFlattener_test.cpp
@@ -286,6 +286,165 @@
   EXPECT_THAT(tree.getText(&len), StrEq(u"\\d{5}"));
 }
 
+TEST_F(XmlFlattenerTest, ProcessQuotes) {
+  std::unique_ptr<xml::XmlResource> doc = test::BuildXmlDom(
+      R"(<root>
+          <item>Regular text</item>
+          <item>"Text in double quotes"</item>
+          <item>'Text in single quotes'</item>
+          <item>Text containing "double quotes"</item>
+          <item>Text containing 'single quotes'</item>
+      </root>)");
+
+  size_t len;
+  android::ResXMLTree tree;
+
+  XmlFlattenerOptions options;
+  ASSERT_TRUE(Flatten(doc.get(), &tree, options));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"Regular text"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"\"Text in double quotes\""));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementNamespace(&len), IsNull());
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"'Text in single quotes'"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"Text containing \"double quotes\""));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"Text containing 'single quotes'"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_DOCUMENT));
+}
+
+TEST_F(XmlFlattenerTest, ProcessWhitepspace) {
+  std::unique_ptr<xml::XmlResource> doc = test::BuildXmlDom(
+      R"(<root>
+          <item>   Compact   Spaces   </item>
+          <item>
+                 A
+          </item>
+          <item>B   </item>
+          <item>C </item>
+          <item> D  </item>
+          <item>   E</item>
+          <item> F</item>
+          <item>  G </item>
+          <item> H </item>
+<item>
+I
+</item>
+<item>
+
+   J
+
+</item>
+          <item>
+          </item>
+      </root>)");
+
+  size_t len;
+  android::ResXMLTree tree;
+
+  XmlFlattenerOptions options;
+  ASSERT_TRUE(Flatten(doc.get(), &tree, options));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" Compact   Spaces "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" A "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"B "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u"C "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" D "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" E"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" F"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" G "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" H "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" I "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::TEXT));
+  EXPECT_THAT(tree.getText(&len), StrEq(u" J "));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::START_TAG));
+  EXPECT_THAT(tree.getElementName(&len), StrEq(u"item"));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_TAG));
+
+  ASSERT_THAT(tree.next(), Eq(android::ResXMLTree::END_DOCUMENT));
+}
+
 TEST_F(XmlFlattenerTest, FlattenRawValueOnlyMakesCompiledValueToo) {
   std::unique_ptr<xml::XmlResource> doc = test::BuildXmlDom(R"(<element foo="bar" />)");
 
diff --git a/tools/incident_section_gen/main.cpp b/tools/incident_section_gen/main.cpp
index a274a8c..3f9588a 100644
--- a/tools/incident_section_gen/main.cpp
+++ b/tools/incident_section_gen/main.cpp
@@ -413,7 +413,8 @@
             case SECTION_NONE:
                 continue;
             case SECTION_FILE:
-                printf("    new FileSection(%d, \"%s\"),\n", field->number(), s.args().c_str());
+                printf("    new FileSection(%d, \"%s\", %s),\n", field->number(), s.args().c_str(),
+                       s.device_specific() ? "true" : "false");
                 break;
             case SECTION_COMMAND:
                 printf("    new CommandSection(%d,", field->number());
diff --git a/tools/stats_log_api_gen/Android.bp b/tools/stats_log_api_gen/Android.bp
index 73b715a..026b54f 100644
--- a/tools/stats_log_api_gen/Android.bp
+++ b/tools/stats_log_api_gen/Android.bp
@@ -98,9 +98,23 @@
     name: "libstatslog",
     generated_sources: ["statslog.cpp"],
     generated_headers: ["statslog.h"],
+    cflags: [
+        "-Wall",
+        "-Werror",
+    ],
+    export_generated_headers: ["statslog.h"],
+    shared_libs: [
+        "liblog",
+        "libutils",
+    ],
+    static_libs: ["libstatssocket"],
+}
+
+cc_library_static {
+    name: "libstatssocket",
     srcs: [
-        "stats_event_list.cpp",
-        "statsd_writer.cpp",
+        "stats_event_list.c",
+        "statsd_writer.c",
     ],
     cflags: [
         "-Wall",
@@ -109,10 +123,9 @@
         "-DWRITE_TO_STATSD=1",
         "-DWRITE_TO_LOGD=0",
     ],
-    export_generated_headers: ["statslog.h"],
+    export_include_dirs: ["include"],
     shared_libs: [
         "liblog",
-        "libutils",
     ],
 }
 
diff --git a/tools/stats_log_api_gen/stats_event_list.h b/tools/stats_log_api_gen/include/stats_event_list.h
similarity index 68%
rename from tools/stats_log_api_gen/stats_event_list.h
rename to tools/stats_log_api_gen/include/stats_event_list.h
index 66b9918..c198d97 100644
--- a/tools/stats_log_api_gen/stats_event_list.h
+++ b/tools/stats_log_api_gen/include/stats_event_list.h
@@ -19,14 +19,23 @@
 
 #include <log/log_event_list.h>
 
-namespace android {
-namespace util {
+#ifdef __cplusplus
+extern "C" {
+#endif
+void reset_log_context(android_log_context ctx);
+int write_to_logger(android_log_context context, log_id_t id);
 
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef __cplusplus
 /**
  * A copy of android_log_event_list class.
  *
- * android_log_event_list is going to be deprecated soon, so copy it here to avoid creating
- * dependency on upstream code. TODO(b/78304629): Rewrite this code.
+ * android_log_event_list is going to be deprecated soon, so copy it here to
+ * avoid creating dependency on upstream code. TODO(b/78304629): Rewrite this
+ * code.
  */
 class stats_event_list {
 private:
@@ -36,8 +45,6 @@
     stats_event_list(const stats_event_list&) = delete;
     void operator=(const stats_event_list&) = delete;
 
-    int write_to_logger(android_log_context context, log_id_t id);
-
 public:
     explicit stats_event_list(int tag) : ret(0) {
         ctx = create_android_logger(static_cast<uint32_t>(tag));
@@ -46,99 +53,114 @@
         ctx = create_android_log_parser(log_msg.msg() + sizeof(uint32_t),
                                         log_msg.entry.len - sizeof(uint32_t));
     }
-    ~stats_event_list() {
-        android_log_destroy(&ctx);
-    }
+    ~stats_event_list() { android_log_destroy(&ctx); }
 
     int close() {
         int retval = android_log_destroy(&ctx);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return retval;
     }
 
     /* To allow above C calls to use this class as parameter */
-    operator android_log_context() const {
-        return ctx;
-    }
+    operator android_log_context() const { return ctx; }
 
     /* return errors or transmit status */
-    int status() const {
-        return ret;
-    }
+    int status() const { return ret; }
 
     int begin() {
         int retval = android_log_write_list_begin(ctx);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret;
     }
     int end() {
         int retval = android_log_write_list_end(ctx);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret;
     }
 
     stats_event_list& operator<<(int32_t value) {
         int retval = android_log_write_int32(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     stats_event_list& operator<<(uint32_t value) {
         int retval = android_log_write_int32(ctx, static_cast<int32_t>(value));
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     stats_event_list& operator<<(bool value) {
         int retval = android_log_write_int32(ctx, value ? 1 : 0);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     stats_event_list& operator<<(int64_t value) {
         int retval = android_log_write_int64(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     stats_event_list& operator<<(uint64_t value) {
         int retval = android_log_write_int64(ctx, static_cast<int64_t>(value));
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     stats_event_list& operator<<(const char* value) {
         int retval = android_log_write_string8(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
 #if defined(_USING_LIBCXX)
     stats_event_list& operator<<(const std::string& value) {
-        int retval = android_log_write_string8_len(ctx, value.data(), value.length());
-        if (retval < 0) ret = retval;
+        int retval = android_log_write_string8_len(ctx, value.data(),
+                                                   value.length());
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 #endif
 
     stats_event_list& operator<<(float value) {
         int retval = android_log_write_float32(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return *this;
     }
 
     int write(log_id_t id = LOG_ID_EVENTS) {
         /* facilitate -EBUSY retry */
-        if ((ret == -EBUSY) || (ret > 0)) ret = 0;
+        if ((ret == -EBUSY) || (ret > 0)) {
+            ret = 0;
+        }
         int retval = write_to_logger(ctx, id);
         /* existing errors trump transmission errors */
-        if (!ret) ret = retval;
-        return ret;
-    }
-
-    int operator<<(log_id_t id) {
-        write(id);
-        android_log_destroy(&ctx);
+        if (!ret) {
+            ret = retval;
+        }
         return ret;
     }
 
@@ -151,45 +173,61 @@
 
     bool AppendInt(int32_t value) {
         int retval = android_log_write_int32(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
     bool AppendLong(int64_t value) {
         int retval = android_log_write_int64(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
     bool AppendString(const char* value) {
         int retval = android_log_write_string8(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
     bool AppendString(const char* value, size_t len) {
         int retval = android_log_write_string8_len(ctx, value, len);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
 #if defined(_USING_LIBCXX)
     bool AppendString(const std::string& value) {
-        int retval = android_log_write_string8_len(ctx, value.data(), value.length());
-        if (retval < 0) ret = retval;
+        int retval = android_log_write_string8_len(ctx, value.data(),
+                                                   value.length());
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret;
     }
 
     bool Append(const std::string& value) {
-        int retval = android_log_write_string8_len(ctx, value.data(), value.length());
-        if (retval < 0) ret = retval;
+        int retval = android_log_write_string8_len(ctx, value.data(),
+                                                   value.length());
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret;
     }
 #endif
 
     bool AppendFloat(float value) {
         int retval = android_log_write_float32(ctx, value);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
@@ -201,19 +239,15 @@
 
     bool Append(const char* value, size_t len) {
         int retval = android_log_write_string8_len(ctx, value, len);
-        if (retval < 0) ret = retval;
+        if (retval < 0) {
+            ret = retval;
+        }
         return ret >= 0;
     }
 
-    android_log_list_element read() {
-        return android_log_read_next(ctx);
-    }
-    android_log_list_element peek() {
-        return android_log_peek_next(ctx);
-    }
+    android_log_list_element read() { return android_log_read_next(ctx); }
+    android_log_list_element peek() { return android_log_peek_next(ctx); }
 };
 
-}  // namespace util
-}  // namespace android
-
+#endif
 #endif  // ANDROID_STATS_LOG_STATS_EVENT_LIST_H
diff --git a/tools/stats_log_api_gen/stats_event_list.cpp b/tools/stats_log_api_gen/stats_event_list.c
similarity index 77%
rename from tools/stats_log_api_gen/stats_event_list.cpp
rename to tools/stats_log_api_gen/stats_event_list.c
index d456ef0..0a342a8 100644
--- a/tools/stats_log_api_gen/stats_event_list.cpp
+++ b/tools/stats_log_api_gen/stats_event_list.c
@@ -14,17 +14,12 @@
  * limitations under the License.
  */
 
-#include "stats_event_list.h"
+#include "include/stats_event_list.h"
 
+#include <string.h>
 #include "statsd_writer.h"
 
-namespace android {
-namespace util {
-
-enum ReadWriteFlag {
-    kAndroidLoggerRead = 1,
-    kAndroidLoggerWrite = 2,
-};
+#define MAX_EVENT_PAYLOAD (LOGGER_ENTRY_MAX_PAYLOAD - sizeof(int32_t))
 
 typedef struct {
     uint32_t tag;
@@ -35,7 +30,10 @@
     unsigned len; /* Length or raw buffer. */
     bool overflow;
     bool list_stop; /* next call decrement list_nest_depth and issue a stop */
-    ReadWriteFlag read_write_flag;
+    enum {
+        kAndroidLoggerRead = 1,
+        kAndroidLoggerWrite = 2,
+    } read_write_flag;
     uint8_t storage[LOGGER_ENTRY_MAX_PAYLOAD];
 } android_log_context_internal;
 
@@ -45,6 +43,29 @@
 static int (*write_to_statsd)(struct iovec* vec,
                               size_t nr) = __write_to_statsd_init;
 
+// Similar to create_android_logger(), but instead of allocation a new buffer,
+// this function resets the buffer for resuse.
+void reset_log_context(android_log_context ctx) {
+    if (!ctx) {
+        return;
+    }
+    android_log_context_internal* context =
+            (android_log_context_internal*)(ctx);
+    uint32_t tag = context->tag;
+    memset(context, 0, sizeof(android_log_context_internal));
+
+    context->tag = tag;
+    context->read_write_flag = kAndroidLoggerWrite;
+    size_t needed = sizeof(uint8_t) + sizeof(uint8_t);
+    if ((context->pos + needed) > MAX_EVENT_PAYLOAD) {
+        context->overflow = true;
+    }
+    /* Everything is a list */
+    context->storage[context->pos + 0] = EVENT_TYPE_LIST;
+    context->list[0] = context->pos + 1;
+    context->pos += needed;
+}
+
 int stats_write_list(android_log_context ctx) {
     android_log_context_internal* context;
     const char* msg;
@@ -80,7 +101,7 @@
     return write_to_statsd(vec, 2);
 }
 
-int stats_event_list::write_to_logger(android_log_context ctx, log_id_t id) {
+int write_to_logger(android_log_context ctx, log_id_t id) {
     int retValue = 0;
 
     if (WRITE_TO_LOGD) {
@@ -89,9 +110,9 @@
 
     if (WRITE_TO_STATSD) {
         // log_event_list's cast operator is overloaded.
-        int ret = stats_write_list(static_cast<android_log_context>(*this));
-        // In debugging phase, we may write to both logd and statsd. Prefer to return
-        // statsd socket write error code here.
+        int ret = stats_write_list(ctx);
+        // In debugging phase, we may write to both logd and statsd. Prefer to
+        // return statsd socket write error code here.
         if (ret < 0) {
             retValue = ret;
         }
@@ -159,7 +180,4 @@
     ret = write_to_statsd(vec, nr);
     errno = save_errno;
     return ret;
-}
-
-}  // namespace util
-}  // namespace android
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/tools/stats_log_api_gen/statsd_writer.cpp b/tools/stats_log_api_gen/statsd_writer.c
similarity index 97%
rename from tools/stats_log_api_gen/statsd_writer.cpp
rename to tools/stats_log_api_gen/statsd_writer.c
index d736f7e..3e10358 100644
--- a/tools/stats_log_api_gen/statsd_writer.cpp
+++ b/tools/stats_log_api_gen/statsd_writer.c
@@ -37,9 +37,6 @@
 /* branchless on many architectures. */
 #define min(x, y) ((y) ^ (((x) ^ (y)) & -((x) < (y))))
 
-namespace android {
-namespace util {
-
 static pthread_mutex_t log_init_lock = PTHREAD_MUTEX_INITIALIZER;
 
 void statsd_writer_init_lock() {
@@ -65,14 +62,13 @@
 
 struct android_log_transport_write statsdLoggerWrite = {
         .name = "statsd",
+        .sock = -EBADF,
         .available = statsdAvailable,
         .open = statsdOpen,
         .close = statsdClose,
         .write = statsdWrite,
 };
 
-std::atomic_int android_log_transport_write::sock(-EBADF);
-
 /* log_init_lock assumed */
 static int statsdOpen() {
     int i, ret = 0;
@@ -267,6 +263,3 @@
 
     return ret;
 }
-
-}  // namespace util
-}  // namespace android
\ No newline at end of file
diff --git a/tools/stats_log_api_gen/statsd_writer.h b/tools/stats_log_api_gen/statsd_writer.h
index 05ebc6c..1043afb 100644
--- a/tools/stats_log_api_gen/statsd_writer.h
+++ b/tools/stats_log_api_gen/statsd_writer.h
@@ -21,9 +21,6 @@
 #include <stdatomic.h>
 #include <sys/socket.h>
 
-namespace android {
-namespace util {
-
 /**
  * Internal lock should not be exposed. This is bad design.
  * TODO: rewrite it in c++ code and encapsulate the functionality in a
@@ -35,7 +32,7 @@
 
 struct android_log_transport_write {
     const char* name; /* human name to describe the transport */
-    static std::atomic_int sock;
+    atomic_int sock;
     int (*available)(); /* Does not cause resources to be taken */
     int (*open)(); /* can be called multiple times, reusing current resources */
     void (*close)(); /* free up resources */
@@ -43,7 +40,5 @@
     int (*write)(struct timespec* ts, struct iovec* vec, size_t nr);
 };
 
-}  // namespace util
-}  // namespace android
 
 #endif  // ANDROID_STATS_LOG_STATS_WRITER_H
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index 8024bf0..f210b61 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -402,12 +402,14 @@
         public static final int EID_TIM = 5;
         public static final int EID_BSS_LOAD = 11;
         public static final int EID_ERP = 42;
+        public static final int EID_HT_CAPABILITIES = 45;
         public static final int EID_RSN = 48;
         public static final int EID_EXTENDED_SUPPORTED_RATES = 50;
         public static final int EID_HT_OPERATION = 61;
         public static final int EID_INTERWORKING = 107;
         public static final int EID_ROAMING_CONSORTIUM = 111;
         public static final int EID_EXTENDED_CAPS = 127;
+        public static final int EID_VHT_CAPABILITIES = 191;
         public static final int EID_VHT_OPERATION = 192;
         public static final int EID_VSA = 221;
 
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index f6c67c9..01dd898 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -264,7 +264,7 @@
     public int status;
 
     /**
-     * The network's SSID. Can either be an ASCII string,
+     * 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
diff --git a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
index ebf6007..bfb0462 100644
--- a/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
+++ b/wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java
@@ -95,6 +95,10 @@
     /**
      * 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
@@ -122,6 +126,9 @@
      * 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
diff --git a/wifi/java/android/net/wifi/rtt/ResponderConfig.java b/wifi/java/android/net/wifi/rtt/ResponderConfig.java
index fb723c5..166af6c 100644
--- a/wifi/java/android/net/wifi/rtt/ResponderConfig.java
+++ b/wifi/java/android/net/wifi/rtt/ResponderConfig.java
@@ -16,6 +16,9 @@
 
 package android.net.wifi.rtt;
 
+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.SystemApi;
@@ -24,6 +27,7 @@
 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;
@@ -40,6 +44,7 @@
  */
 @SystemApi
 public final class ResponderConfig implements Parcelable {
+    private static final String TAG = "ResponderConfig";
     private static final int AWARE_BAND_2_DISCOVERY_CHANNEL = 2437;
 
     /** @hide */
@@ -297,12 +302,31 @@
         int centerFreq0 = scanResult.centerFreq0;
         int centerFreq1 = scanResult.centerFreq1;
 
-        // TODO: b/68936111 - extract preamble info from IE
         int preamble;
-        if (channelWidth == CHANNEL_WIDTH_80MHZ || channelWidth == CHANNEL_WIDTH_160MHZ) {
-            preamble = PREAMBLE_VHT;
+        if (scanResult.informationElements != null && scanResult.informationElements.length != 0) {
+            boolean htCapabilitiesPresent = false;
+            boolean vhtCapabilitiesPresent = false;
+            for (ScanResult.InformationElement ie : scanResult.informationElements) {
+                if (ie.id == EID_HT_CAPABILITIES) {
+                    htCapabilitiesPresent = true;
+                } else if (ie.id == EID_VHT_CAPABILITIES) {
+                    vhtCapabilitiesPresent = true;
+                }
+            }
+            if (vhtCapabilitiesPresent) {
+                preamble = PREAMBLE_VHT;
+            } else if (htCapabilitiesPresent) {
+                preamble = PREAMBLE_HT;
+            } else {
+                preamble = PREAMBLE_LEGACY;
+            }
         } else {
-            preamble = PREAMBLE_HT;
+            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,
diff --git a/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java b/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
index ddddde9..ccb9031 100644
--- a/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
+++ b/wifi/tests/src/android/net/wifi/rtt/WifiRttManagerTest.java
@@ -295,4 +295,96 @@
 
         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);
+    }
 }