diff options
author | Felipe Leme <felipeal@google.com> | 2016-03-23 14:57:17 -0700 |
---|---|---|
committer | Felipe Leme <felipeal@google.com> | 2016-03-23 14:57:17 -0700 |
commit | 1ae5a69bc495154d0baf504caa95d7eddbc7177c (patch) | |
tree | f86eb3be31097f5faa95e5ce70d8b472b1bf0a4e /packages/Shell/src | |
parent | 7c891700995276c9f6952d0e1f2a2c1882d66f3d (diff) |
Proper handle of duplicated BUGREPORT_STARTED.
When Shell receives a BUGREPORT_STARTED intent for a process it's
already monitoring, it should completely ignore it, but current it's
taking an extra screenshot.
BUG: 27804637
Change-Id: I733cacfee5e9c82646a3295b50c3856b6e0352c3
Diffstat (limited to 'packages/Shell/src')
-rw-r--r-- | packages/Shell/src/com/android/shell/BugreportProgressService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/Shell/src/com/android/shell/BugreportProgressService.java b/packages/Shell/src/com/android/shell/BugreportProgressService.java index c9582ea1aa51..c131fa5d547c 100644 --- a/packages/Shell/src/com/android/shell/BugreportProgressService.java +++ b/packages/Shell/src/com/android/shell/BugreportProgressService.java @@ -409,10 +409,11 @@ public class BugreportProgressService extends Service { final BugreportInfo info = new BugreportInfo(mContext, id, pid, name, max); if (mProcesses.indexOfKey(id) >= 0) { + // BUGREPORT_STARTED intent was already received; ignore it. Log.w(TAG, "ID " + id + " already watched"); - } else { - mProcesses.put(info.id, info); + return true; } + mProcesses.put(info.id, info); // Take initial screenshot. takeScreenshot(id, false); updateProgress(info); |