Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daff25a9 authored by Nandana Dutt's avatar Nandana Dutt
Browse files

Make dumpstate listener methods async

onError can race with death recipient and trigger a different error,
so not making it async.

BUG: 147703592
Test: Take an interactive bugreport - observe fewer warnings in logcat
about oneway.

Change-Id: Idad33bf1927ad9573eb1891c9f56c7e606815fa6
parent f835e028
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ interface IDumpstateListener {
     *
     * @param progress the progress in [0, 100]
     */
    void onProgress(int progress);
    oneway void onProgress(int progress);

    // NOTE: If you add to or change these error codes, please also change the corresponding enums
    // in system server, in BugreportManager.java.
@@ -54,16 +54,18 @@ interface IDumpstateListener {

    /**
     * Called on an error condition with one of the error codes listed above.
     * This is not an asynchronous method since it can race with dumpstate exiting, thus triggering
     * death recipient.
     */
    void onError(int errorCode);

    /**
     * Called when taking bugreport finishes successfully.
     */
    void onFinished();
    oneway void onFinished();

    /**
     * Called when screenshot is taken.
     */
    void onScreenshotTaken(boolean success);
    oneway void onScreenshotTaken(boolean success);
}