Merge "DSUService: Log verbose installation progress" am: 4463102095

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662401

Change-Id: I948e7c49d857083d6e3aacfd38d992da557d998c
This commit is contained in:
Treehugger Robot
2021-05-12 10:10:37 +00:00
committed by Automerger Merge Worker

View File

@@ -561,7 +561,20 @@ public class DynamicSystemInstallationService extends Service
break;
}
Log.d(TAG, "status=" + statusString + ", cause=" + causeString + ", detail=" + detail);
StringBuilder msg = new StringBuilder();
msg.append("status: " + statusString + ", cause: " + causeString);
if (status == STATUS_IN_PROGRESS) {
msg.append(
String.format(
", partition name: %s, progress: %d/%d",
mCurrentPartitionName,
mCurrentPartitionInstalledSize,
mCurrentPartitionSize));
}
if (detail != null) {
msg.append(", detail: " + detail);
}
Log.d(TAG, msg.toString());
if (notifyOnNotificationBar) {
mNM.notify(NOTIFICATION_ID, buildNotification(status, cause, detail));