Merge "Proper handle of duplicated BUGREPORT_STARTED." into nyc-dev

This commit is contained in:
Felipe Leme
2016-03-24 22:14:41 +00:00
committed by Android (Google) Code Review

View File

@@ -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);