From 97a8f0f5dbf1201d7367d690bef8d69d7057ee0d Mon Sep 17 00:00:00 2001 From: Abhijeet Kaur Date: Sun, 2 Jun 2019 18:44:31 +0100 Subject: Progress notification for interactive bugreports Send instant progress notification for interactive bugreports (when using bugreport API), starting notification when progress = 0 Bug: 123617758 Test: * Build and flash to the device * Turn on use bugreport API feature flag from Settings * Take interactive bugreport Expectation: Progress notification is shown instantly Change-Id: Icd834c05324108430ee6cb9c3d8539f91059e563 --- packages/Shell/src/com/android/shell/BugreportProgressService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'packages/Shell/src') diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index ea878703f3d3..b90f4a78846d 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -363,8 +363,6 @@ public class BugreportProgressService extends Service { @Override public void onProgress(float progress) { - // TODO: Make dumpstate call onProgress at 0% progress to trigger the - // progress notification instantly. checkProgressUpdated(mInfo, (int) progress); } @@ -2195,7 +2193,7 @@ public class BugreportProgressService extends Service { max = CAPPED_MAX; } - if (newPercentage > oldPercentage) { + if (progress == 0 || newPercentage > oldPercentage) { updateProgressInfo(info, progress, max); } } -- cgit v1.2.3-59-g8ed1b