diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index 5925b7263cf53..256337dc03731 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -301,7 +301,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 } public final class StorageVolume implements android.os.Parcelable { diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java index 81071682ab7e5..77c794cd17a89 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java @@ -2795,13 +2795,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 @@ -2812,7 +2820,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 {} diff --git a/core/java/android/service/storage/ExternalStorageService.java b/core/java/android/service/storage/ExternalStorageService.java index da1f457df5d92..05f37d73f3f9a 100644 --- a/core/java/android/service/storage/ExternalStorageService.java +++ b/core/java/android/service/storage/ExternalStorageService.java @@ -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,