summaryrefslogtreecommitdiff
path: root/packages/Shell/src
diff options
context:
space:
mode:
author Abhijeet Kaur <abkaur@google.com> 2019-06-02 18:44:31 +0100
committer Abhijeet Kaur <abkaur@google.com> 2019-06-04 15:36:16 +0100
commit97a8f0f5dbf1201d7367d690bef8d69d7057ee0d (patch)
treefaf91331318e6a74c4c358b1588036f116cfe26d /packages/Shell/src
parent79ef51270574571d19fe6ceb2db41dd80384344d (diff)
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
Diffstat (limited to 'packages/Shell/src')
-rw-r--r--packages/Shell/src/com/android/shell/BugreportProgressService.java4
1 files changed, 1 insertions, 3 deletions
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);
}
}