Loading core/java/android/os/RecoverySystem.java +6 −0 Original line number Diff line number Diff line Loading @@ -695,6 +695,7 @@ public class RecoverySystem { String line = null; int bytesWrittenInMiB = -1, bytesStashedInMiB = -1; int timeTotal = -1; int sourceVersion = -1; while ((line = in.readLine()) != null) { // Here is an example of lines in last_install: // ... Loading Loading @@ -729,6 +730,8 @@ public class RecoverySystem { if (line.startsWith("time")) { timeTotal = scaled; } else if (line.startsWith("source_version")) { sourceVersion = scaled; } else if (line.startsWith("bytes_written")) { bytesWrittenInMiB = (bytesWrittenInMiB == -1) ? scaled : bytesWrittenInMiB + scaled; Loading @@ -742,6 +745,9 @@ public class RecoverySystem { if (timeTotal != -1) { MetricsLogger.histogram(context, "ota_time_total", timeTotal); } if (sourceVersion != -1) { MetricsLogger.histogram(context, "ota_source_version", sourceVersion); } if (bytesWrittenInMiB != -1) { MetricsLogger.histogram(context, "ota_written_in_MiBs", bytesWrittenInMiB); } Loading Loading
core/java/android/os/RecoverySystem.java +6 −0 Original line number Diff line number Diff line Loading @@ -695,6 +695,7 @@ public class RecoverySystem { String line = null; int bytesWrittenInMiB = -1, bytesStashedInMiB = -1; int timeTotal = -1; int sourceVersion = -1; while ((line = in.readLine()) != null) { // Here is an example of lines in last_install: // ... Loading Loading @@ -729,6 +730,8 @@ public class RecoverySystem { if (line.startsWith("time")) { timeTotal = scaled; } else if (line.startsWith("source_version")) { sourceVersion = scaled; } else if (line.startsWith("bytes_written")) { bytesWrittenInMiB = (bytesWrittenInMiB == -1) ? scaled : bytesWrittenInMiB + scaled; Loading @@ -742,6 +745,9 @@ public class RecoverySystem { if (timeTotal != -1) { MetricsLogger.histogram(context, "ota_time_total", timeTotal); } if (sourceVersion != -1) { MetricsLogger.histogram(context, "ota_source_version", sourceVersion); } if (bytesWrittenInMiB != -1) { MetricsLogger.histogram(context, "ota_written_in_MiBs", bytesWrittenInMiB); } Loading