summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nandana Dutt <nandana@google.com> 2019-03-25 08:43:43 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-03-25 08:43:43 +0000
commit8cf74c36c08c24bd2802d0c31446b12926f25f93 (patch)
tree6f1a8990167a0c5e118fcb93bdc1d6a8c3483da6
parent963136ce56c60ac615cbbba8cc7ec885d5c0b1df (diff)
parent664f6466ec97cfff65bd3ab93286c0b611279afe (diff)
Merge "Stop bugreportd if binder call fails"
-rw-r--r--services/core/java/com/android/server/os/BugreportManagerServiceImpl.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java b/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
index 5c0874d7977a..c98a79ad4ed9 100644
--- a/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
+++ b/services/core/java/com/android/server/os/BugreportManagerServiceImpl.java
@@ -174,7 +174,11 @@ class BugreportManagerServiceImpl extends IDumpstate.Stub {
ds.startBugreport(callingUid, callingPackage,
bugreportFd, screenshotFd, bugreportMode, myListener);
} catch (RemoteException e) {
- reportError(listener, IDumpstateListener.BUGREPORT_ERROR_RUNTIME_ERROR);
+ // bugreportd service is already started now. We need to kill it to manage the
+ // lifecycle correctly. If we don't subsequent callers will get
+ // BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS error.
+ // Note that listener will be notified by the death recipient below.
+ cancelBugreport();
}
}