diff options
author | Yi-Yo Chiang <yochiang@google.com> | 2021-04-02 03:21:12 +0800 |
---|---|---|
committer | Yi-Yo Chiang <yochiang@google.com> | 2021-05-12 14:32:18 +0800 |
commit | a3f91296ced0e6e3846142e7549ea3581bd15ad3 (patch) | |
tree | 5ee627b84c6b6ecfe4c093834e7fcf2156cf8d88 /packages/DynamicSystemInstallationService | |
parent | 9ef59ac901a87d30920db6aa8541bdaab67f7433 (diff) |
DSUService: Log verbose installation progress
Log the installation progress in logcat if feasible.
Bug: 181043054
Bug: 165471299
Test: Fire a DSU installation and observe logcat
Change-Id: Ib82783f2dfe310335725f39053eaa940d96e7198
Diffstat (limited to 'packages/DynamicSystemInstallationService')
-rw-r--r-- | packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java index 16a946dc7bc6..f8cb5d3d2419 100644 --- a/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +++ b/packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java @@ -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)); |