Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4015,6 +4015,7 @@ package android.os { method public void onError(int); method public void onFinished(); method public void onProgress(float); field public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS = 5; // 0x5 field public static final int BUGREPORT_ERROR_INVALID_INPUT = 1; // 0x1 field public static final int BUGREPORT_ERROR_RUNTIME = 2; // 0x2 field public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = 4; // 0x4 Loading core/java/android/os/BugreportManager.java +9 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ public class BugreportManager { BUGREPORT_ERROR_INVALID_INPUT, BUGREPORT_ERROR_RUNTIME, BUGREPORT_ERROR_USER_DENIED_CONSENT, BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT, BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS }) /** Possible error codes taking a bugreport can encounter */ Loading @@ -81,6 +82,10 @@ public class BugreportManager { public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = IDumpstateListener.BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT; /** There is currently a bugreport running. The caller should try again later. */ public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS = IDumpstateListener.BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS; /** * Called when there is a progress update. * @param progress the progress in [0.0, 100.0] Loading @@ -96,6 +101,9 @@ public class BugreportManager { * <p>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. * * <p> If {@code BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS} is passed, then the * caller should try later, as only one bugreport can be in progress at a time. */ public void onError(@BugreportErrorCode int errorCode) {} Loading services/core/java/com/android/server/os/BugreportManagerServiceImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,8 @@ class BugreportManagerServiceImpl extends IDumpstate.Stub { if (isDumpstateBinderServiceRunningLocked()) { Slog.w(TAG, "'dumpstate' is already running. Cannot start a new bugreport" + " while another one is currently in progress."); // TODO(b/111441001): Use a new error code; add this to the documentation of the API. reportError(listener, IDumpstateListener.BUGREPORT_ERROR_RUNTIME_ERROR); reportError(listener, IDumpstateListener.BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS); return; } Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -4015,6 +4015,7 @@ package android.os { method public void onError(int); method public void onFinished(); method public void onProgress(float); field public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS = 5; // 0x5 field public static final int BUGREPORT_ERROR_INVALID_INPUT = 1; // 0x1 field public static final int BUGREPORT_ERROR_RUNTIME = 2; // 0x2 field public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = 4; // 0x4 Loading
core/java/android/os/BugreportManager.java +9 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ public class BugreportManager { BUGREPORT_ERROR_INVALID_INPUT, BUGREPORT_ERROR_RUNTIME, BUGREPORT_ERROR_USER_DENIED_CONSENT, BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT, BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS }) /** Possible error codes taking a bugreport can encounter */ Loading @@ -81,6 +82,10 @@ public class BugreportManager { public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = IDumpstateListener.BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT; /** There is currently a bugreport running. The caller should try again later. */ public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS = IDumpstateListener.BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS; /** * Called when there is a progress update. * @param progress the progress in [0.0, 100.0] Loading @@ -96,6 +101,9 @@ public class BugreportManager { * <p>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. * * <p> If {@code BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS} is passed, then the * caller should try later, as only one bugreport can be in progress at a time. */ public void onError(@BugreportErrorCode int errorCode) {} Loading
services/core/java/com/android/server/os/BugreportManagerServiceImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -146,8 +146,8 @@ class BugreportManagerServiceImpl extends IDumpstate.Stub { if (isDumpstateBinderServiceRunningLocked()) { Slog.w(TAG, "'dumpstate' is already running. Cannot start a new bugreport" + " while another one is currently in progress."); // TODO(b/111441001): Use a new error code; add this to the documentation of the API. reportError(listener, IDumpstateListener.BUGREPORT_ERROR_RUNTIME_ERROR); reportError(listener, IDumpstateListener.BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS); return; } Loading