Address onAnrDelayStarted API comments

Test: m
Bug: 183446229
Change-Id: I433096c9fdc003b777f8a280f13f675a2d7ea8bf
This commit is contained in:
Zim
2021-03-25 16:15:36 +00:00
parent 06bca53163
commit 308a048787
3 changed files with 14 additions and 4 deletions

View File

@@ -309,7 +309,8 @@ package android.os.storage {
public class StorageManager {
method public void notifyAppIoBlocked(@NonNull java.util.UUID, int, int, int);
method public void notifyAppIoResumed(@NonNull java.util.UUID, int, int, int);
field public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 0; // 0x0
field public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 1; // 0x1
field public static final int APP_IO_BLOCKED_REASON_UNKNOWN = 0; // 0x0
}
}

View File

@@ -2727,13 +2727,21 @@ public class StorageManager {
}
}
/**
* Reason to provide if app IO is blocked/resumed for unknown reasons
*
* @hide
*/
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public static final int APP_IO_BLOCKED_REASON_UNKNOWN = 0;
/**
* Reason to provide if app IO is blocked/resumed because of transcoding
*
* @hide
*/
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 0;
public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 1;
/**
* Constants for use with
@@ -2744,7 +2752,8 @@ public class StorageManager {
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef(prefix = { "APP_IO_BLOCKED_REASON_" }, value = {
APP_IO_BLOCKED_REASON_TRANSCODING
APP_IO_BLOCKED_REASON_TRANSCODING,
APP_IO_BLOCKED_REASON_UNKNOWN,
})
public @interface AppIoBlockedReason {}

View File

@@ -175,7 +175,7 @@ public abstract class ExternalStorageService extends Service {
*
* @param packageName the package name of the ANR'ing app
* @param uid the uid of the ANR'ing app
* @param tid the tid of the ANR'ing app
* @param tid the thread id of the ANR'ing app
* @param reason the reason the app is ANR'ing
*/
public void onAnrDelayStarted(@NonNull String packageName, int uid, int tid,