Most visited

Recently visited

Added in API level 24

SystemHealthManager

public class SystemHealthManager
extends Object

java.lang.Object
   ↳ android.os.health.SystemHealthManager


提供有关应用程序如何使用各种系统资源的数据的访问权限。

Summary

Public methods

HealthStats takeMyUidSnapshot()

返回包含调用此API的应用程序的系统健康度量标准快照的 HealthStats对象。

HealthStats takeUidSnapshot(int uid)

返回包含给定uid(user-id,通常对应于应用程序)的系统运行状况度量快照的 HealthStats对象。

HealthStats[] takeUidSnapshots(int[] uids)

返回包含给定uid(user-id,通常对应于应用程序)的系统健康度量标准快照的 HealthStats对象。

Inherited methods

From class java.lang.Object

Public methods

takeMyUidSnapshot

Added in API level 24
HealthStats takeMyUidSnapshot ()

返回包含调用此API的应用程序的系统健康度量标准快照的HealthStats对象。 该方法与调用takeUidSnapshot(Process.myUid())相同。

Returns
HealthStats A HealthStats object containing the metrics for this application. The keys for this HealthStats object will be from the UidHealthStats class.

takeUidSnapshot

Added in API level 24
HealthStats takeUidSnapshot (int uid)

返回包含给定uid(user-id,通常对应于应用程序)的系统运行状况度量快照的 HealthStats对象。

Parameters
uid int: User ID for a given application.
Returns
HealthStats A HealthStats object containing the metrics for the requested application. The keys for this HealthStats object will be from the UidHealthStats class.

也可以看看:

takeUidSnapshots

Added in API level 24
HealthStats[] takeUidSnapshots (int[] uids)

返回包含给定uid(user-id,通常对应于应用程序)的系统运行状况度量快照的 HealthStats对象。

Parameters
uids int: An array of User IDs to retrieve.
Returns
HealthStats[] An array of HealthStats objects containing the metrics for each of the requested uids. The keys for this HealthStats object will be from the UidHealthStats class.

Hooray!