From bba7e826967cdd5cea48a0896bf25522770c0c48 Mon Sep 17 00:00:00 2001 From: Nandana Dutt Date: Wed, 23 Jan 2019 19:11:01 +0000 Subject: Add a new bugreport error code Add an error code for consent request timing out. BUG: 111441001 Test: builds Change-Id: I91b947545c3adcb2104759e4d277dd1686de41ee --- core/java/android/os/BugreportManager.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/java/android/os/BugreportManager.java b/core/java/android/os/BugreportManager.java index 518528dd1a5b..d463b4422847 100644 --- a/core/java/android/os/BugreportManager.java +++ b/core/java/android/os/BugreportManager.java @@ -75,13 +75,25 @@ public class BugreportManager { int BUGREPORT_ERROR_USER_DENIED_CONSENT = IDumpstateListener.BUGREPORT_ERROR_USER_DENIED_CONSENT; + /** The request to get user consent timed out. */ + int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = + IDumpstateListener.BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT; + /** * Called when taking bugreport resulted in an error. * * @param errorCode the error that occurred. Possible values are * {@code BUGREPORT_ERROR_INVALID_INPUT}, * {@code BUGREPORT_ERROR_RUNTIME}, - * {@code BUGREPORT_ERROR_USER_DENIED_CONSENT}. + * {@code BUGREPORT_ERROR_USER_DENIED_CONSENT}, + * {@code BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT}. + * + *

If {@code BUGREPORT_ERROR_USER_DENIED_CONSENT} is passed, then the user did not + * consent to sharing the bugreport with the calling app. + * + *

If {@code BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT} is passed, then the consent timed + * out, but the bugreport could be available in the internal directory of dumpstate for + * manual retrieval. */ void onError(@BugreportErrorCode int errorCode); -- cgit v1.2.3-59-g8ed1b