Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6925,6 +6925,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes(); api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -7390,6 +7390,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes(); api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6955,6 +6955,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes(); core/java/android/app/usage/ExternalStorageStats.java +14 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ public final class ExternalStorageStats implements Parcelable { /** {@hide} */ public long audioBytes; /** {@hide} */ public long videoBytes; /** {@hide} */ public long imageBytes; /** {@hide} */ public long appBytes; /** * Return the total bytes used by all files in the shared/external storage Loading Loading @@ -64,6 +65,17 @@ public final class ExternalStorageStats implements Parcelable { return imageBytes; } /** * Return the total bytes used by app files in the shared/external storage * hosted on this volume. * <p> * This data is already accounted against individual apps as returned * through {@link StorageStats}. */ public long getAppBytes() { return appBytes; } /** {@hide} */ public ExternalStorageStats() { } Loading @@ -74,6 +86,7 @@ public final class ExternalStorageStats implements Parcelable { this.audioBytes = in.readLong(); this.videoBytes = in.readLong(); this.imageBytes = in.readLong(); this.appBytes = in.readLong(); } @Override Loading @@ -87,6 +100,7 @@ public final class ExternalStorageStats implements Parcelable { dest.writeLong(audioBytes); dest.writeLong(videoBytes); dest.writeLong(imageBytes); dest.writeLong(appBytes); } public static final Creator<ExternalStorageStats> CREATOR = new Creator<ExternalStorageStats>() { Loading core/java/android/app/usage/StorageStats.java +15 −6 Original line number Diff line number Diff line Loading @@ -22,12 +22,8 @@ import android.os.Parcelable; import android.os.UserHandle; /** * Storage statistics for a UID or {@link UserHandle} on a single storage * volume. * <p class="note"> * Note: multiple packages using the same {@code sharedUserId} in their manifest * will be merged into a single UID. * </p> * Storage statistics for a UID, package, or {@link UserHandle} on a single * storage volume. * * @see StorageStatsManager */ Loading @@ -40,6 +36,9 @@ public final class StorageStats implements Parcelable { * Return the size of all code. This includes {@code APK} files and * optimized compiler output. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under {@link Context#getObbDir()}. * <p> * Code is shared between all users on a multiuser device. */ public long getCodeBytes() { Loading @@ -51,6 +50,12 @@ public final class StorageStats implements Parcelable { * {@link Context#getDataDir()}, {@link Context#getCacheDir()}, * {@link Context#getCodeCacheDir()}. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under * {@link Context#getExternalFilesDir(String)}, * {@link Context#getExternalCacheDir()}, and * {@link Context#getExternalMediaDirs()}. * <p> * Data is isolated for each user on a multiuser device. */ public long getDataBytes() { Loading @@ -61,6 +66,10 @@ public final class StorageStats implements Parcelable { * Return the size of all cached data. This includes files stored under * {@link Context#getCacheDir()} and {@link Context#getCodeCacheDir()}. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under * {@link Context#getExternalCacheDir()}. * <p> * Cached data is isolated for each user on a multiuser device. */ public long getCacheBytes() { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6925,6 +6925,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes();
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -7390,6 +7390,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes();
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -6955,6 +6955,7 @@ package android.app.usage { public final class ExternalStorageStats implements android.os.Parcelable { method public int describeContents(); method public long getAppBytes(); method public long getAudioBytes(); method public long getImageBytes(); method public long getTotalBytes();
core/java/android/app/usage/ExternalStorageStats.java +14 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ public final class ExternalStorageStats implements Parcelable { /** {@hide} */ public long audioBytes; /** {@hide} */ public long videoBytes; /** {@hide} */ public long imageBytes; /** {@hide} */ public long appBytes; /** * Return the total bytes used by all files in the shared/external storage Loading Loading @@ -64,6 +65,17 @@ public final class ExternalStorageStats implements Parcelable { return imageBytes; } /** * Return the total bytes used by app files in the shared/external storage * hosted on this volume. * <p> * This data is already accounted against individual apps as returned * through {@link StorageStats}. */ public long getAppBytes() { return appBytes; } /** {@hide} */ public ExternalStorageStats() { } Loading @@ -74,6 +86,7 @@ public final class ExternalStorageStats implements Parcelable { this.audioBytes = in.readLong(); this.videoBytes = in.readLong(); this.imageBytes = in.readLong(); this.appBytes = in.readLong(); } @Override Loading @@ -87,6 +100,7 @@ public final class ExternalStorageStats implements Parcelable { dest.writeLong(audioBytes); dest.writeLong(videoBytes); dest.writeLong(imageBytes); dest.writeLong(appBytes); } public static final Creator<ExternalStorageStats> CREATOR = new Creator<ExternalStorageStats>() { Loading
core/java/android/app/usage/StorageStats.java +15 −6 Original line number Diff line number Diff line Loading @@ -22,12 +22,8 @@ import android.os.Parcelable; import android.os.UserHandle; /** * Storage statistics for a UID or {@link UserHandle} on a single storage * volume. * <p class="note"> * Note: multiple packages using the same {@code sharedUserId} in their manifest * will be merged into a single UID. * </p> * Storage statistics for a UID, package, or {@link UserHandle} on a single * storage volume. * * @see StorageStatsManager */ Loading @@ -40,6 +36,9 @@ public final class StorageStats implements Parcelable { * Return the size of all code. This includes {@code APK} files and * optimized compiler output. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under {@link Context#getObbDir()}. * <p> * Code is shared between all users on a multiuser device. */ public long getCodeBytes() { Loading @@ -51,6 +50,12 @@ public final class StorageStats implements Parcelable { * {@link Context#getDataDir()}, {@link Context#getCacheDir()}, * {@link Context#getCodeCacheDir()}. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under * {@link Context#getExternalFilesDir(String)}, * {@link Context#getExternalCacheDir()}, and * {@link Context#getExternalMediaDirs()}. * <p> * Data is isolated for each user on a multiuser device. */ public long getDataBytes() { Loading @@ -61,6 +66,10 @@ public final class StorageStats implements Parcelable { * Return the size of all cached data. This includes files stored under * {@link Context#getCacheDir()} and {@link Context#getCodeCacheDir()}. * <p> * If the primary external/shared storage is hosted on this storage device, * then this includes files stored under * {@link Context#getExternalCacheDir()}. * <p> * Cached data is isolated for each user on a multiuser device. */ public long getCacheBytes() { Loading