Merge "Make StorageVolume#getOwner a system API." into sc-dev

This commit is contained in:
Martijn Coenen
2021-03-23 17:22:39 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 2 deletions

View File

@@ -312,6 +312,10 @@ package android.os.storage {
field public static final int APP_IO_BLOCKED_REASON_TRANSCODING = 0; // 0x0
}
public final class StorageVolume implements android.os.Parcelable {
method @NonNull public android.os.UserHandle getOwner();
}
}
package android.provider {

View File

@@ -16,6 +16,8 @@
package android.os.storage;
import static android.annotation.SystemApi.Client.MODULE_LIBRARIES;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -289,9 +291,14 @@ public final class StorageVolume implements Parcelable {
return mMaxFileSize;
}
/** {@hide} */
/**
* Returns the user that owns this volume
*
* {@hide}
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public UserHandle getOwner() {
@SystemApi(client = MODULE_LIBRARIES)
public @NonNull UserHandle getOwner() {
return mOwner;
}