Sdílet prostřednictvím


StorageStatsManager.QueryStatsForUser(UUID, UserHandle) Method

Definition

Return storage statistics for a specific UserHandle on the requested storage volume.

[Android.Runtime.Register("queryStatsForUser", "(Ljava/util/UUID;Landroid/os/UserHandle;)Landroid/app/usage/StorageStats;", "GetQueryStatsForUser_Ljava_util_UUID_Landroid_os_UserHandle_Handler", ApiSince=26)]
public virtual Android.App.Usage.StorageStats QueryStatsForUser (Java.Util.UUID storageUuid, Android.OS.UserHandle user);
[<Android.Runtime.Register("queryStatsForUser", "(Ljava/util/UUID;Landroid/os/UserHandle;)Landroid/app/usage/StorageStats;", "GetQueryStatsForUser_Ljava_util_UUID_Landroid_os_UserHandle_Handler", ApiSince=26)>]
abstract member QueryStatsForUser : Java.Util.UUID * Android.OS.UserHandle -> Android.App.Usage.StorageStats
override this.QueryStatsForUser : Java.Util.UUID * Android.OS.UserHandle -> Android.App.Usage.StorageStats

Parameters

storageUuid
UUID

the UUID of the storage volume you're interested in, such as StorageManager#UUID_DEFAULT.

user
UserHandle

the user you're interested in.

Returns

Attributes

Remarks

Return storage statistics for a specific UserHandle on the requested storage volume. <p class="note"> Note: this API requires the android.Manifest.permission#PACKAGE_USAGE_STATS permission, which is a system-level permission that will not be granted to normal apps. Declaring that permission expresses your intention to use this API and an end user can then choose to grant this permission through the Settings application. </p>

Java documentation for android.app.usage.StorageStatsManager.queryStatsForUser(java.util.UUID, android.os.UserHandle).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to