From 497350d61e6e0d09bab8ad570329f4e4a363cfa5 Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Fri, 5 Jan 2018 10:28:11 -0800 Subject: Apply IDumpstateListener changes Bug: 70154685 Test: Take bugreport on phone and verify debug output Change-Id: Icc5b532689c050837f6b4bde93f4655abec4aa0a --- .../Shell/src/com/android/shell/BugreportProgressService.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index a8b184c3f204..73d03c627157 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -1909,7 +1909,7 @@ public class BugreportProgressService extends Service { } final IDumpstate dumpstate = IDumpstate.Stub.asInterface(service); try { - token = dumpstate.setListener("Shell", this); + token = dumpstate.setListener("Shell", this, /* perSectionDetails= */ false); if (token != null) { token.asBinder().linkToDeath(this, 0); } @@ -1978,6 +1978,15 @@ public class BugreportProgressService extends Service { info.realMax = maxProgress; } + @Override + public void onSectionComplete(String title, int status, int size, int durationMs) + throws RemoteException { + if (DEBUG) { + Log.v(TAG, "Title: " + title + " Status: " + status + " Size: " + size + + " Duration: " + durationMs + "ms"); + } + } + public void dump(String prefix, PrintWriter pw) { pw.print(prefix); pw.print("token: "); pw.println(token); } -- cgit v1.2.3-59-g8ed1b