summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-21 20:46:11 +0100
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-01-21 20:46:11 +0100
commitb892a6b788af552640c3f43e83901b0f2cd7c598 (patch)
tree636861d895515568450341b4fdaa99f5db2f2672
parent[automerger skipped] DO NOT MERGE - Empty merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master am: 777a1965f3 am: 0be5110df4 -s ours (diff)
parentMerge "Retire the Tron metrics reporting for non-A/B update" am: 6bdacc40ef am: fed0b90045 (diff)
downloadandroid_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar.gz
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar.bz2
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar.lz
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar.xz
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.tar.zst
android_bootable_recovery-b892a6b788af552640c3f43e83901b0f2cd7c598.zip
-rw-r--r--Android.bp1
-rw-r--r--recovery-persist.cpp18
2 files changed, 0 insertions, 19 deletions
diff --git a/Android.bp b/Android.bp
index 8b7c4b82d..c5225cc8b 100644
--- a/Android.bp
+++ b/Android.bp
@@ -158,7 +158,6 @@ cc_binary {
shared_libs: [
"libbase",
"liblog",
- "libmetricslogger",
],
static_libs: [
diff --git a/recovery-persist.cpp b/recovery-persist.cpp
index 6dbf86253..ad101ede2 100644
--- a/recovery-persist.cpp
+++ b/recovery-persist.cpp
@@ -35,12 +35,10 @@
#include <string.h>
#include <unistd.h>
-#include <limits>
#include <string>
#include <android-base/file.h>
#include <android-base/logging.h>
-#include <metricslogger/metrics_logger.h>
#include <private/android_logger.h> /* private pmsg functions */
#include "recovery_utils/logging.h"
@@ -112,20 +110,6 @@ ssize_t logsave(
return android::base::WriteStringToFile(buffer, destination.c_str());
}
-// Parses the LAST_INSTALL file and reports the update metrics saved under recovery mode.
-static void report_metrics_from_last_install(const std::string& file_name) {
- auto metrics = ParseLastInstall(file_name);
- // TODO(xunchang) report the installation result.
- for (const auto& [event, value] : metrics) {
- if (value > std::numeric_limits<int>::max()) {
- LOG(WARNING) << event << " (" << value << ") exceeds integer max.";
- } else {
- LOG(INFO) << "Uploading " << value << " to " << event;
- android::metricslogger::LogHistogram(event, value);
- }
- }
-}
-
int main(int argc, char **argv) {
/* Is /cache a mount?, we have been delivered where we are not wanted */
@@ -157,7 +141,6 @@ int main(int argc, char **argv) {
if (has_cache) {
// Collects and reports the non-a/b update metrics from last_install; and removes the file
// to avoid duplicate report.
- report_metrics_from_last_install(LAST_INSTALL_FILE_IN_CACHE);
if (access(LAST_INSTALL_FILE_IN_CACHE, F_OK) && unlink(LAST_INSTALL_FILE_IN_CACHE) == -1) {
PLOG(ERROR) << "Failed to unlink " << LAST_INSTALL_FILE_IN_CACHE;
}
@@ -181,7 +164,6 @@ int main(int argc, char **argv) {
// For those device without /cache, the last_install file has been copied to
// /data/misc/recovery from pmsg. Looks for the sideload history only.
if (!has_cache) {
- report_metrics_from_last_install(LAST_INSTALL_FILE);
if (access(LAST_INSTALL_FILE, F_OK) && unlink(LAST_INSTALL_FILE) == -1) {
PLOG(ERROR) << "Failed to unlink " << LAST_INSTALL_FILE;
}