public class SystemHealthManager
extends Object
java.lang.Object | |
↳ | android.os.health.SystemHealthManager |
Provides access to data about how various system resources are used by applications.
Public methods |
|
---|---|
HealthStats |
takeMyUidSnapshot() Return a |
HealthStats |
takeUidSnapshot(int uid) Return a |
HealthStats[] |
takeUidSnapshots(int[] uids) Return a |
Inherited methods |
|
---|---|
![]() java.lang.Object
|
HealthStats takeMyUidSnapshot ()
Return a HealthStats
object containing a snapshot of system health metrics for the application calling this API. This method is the same as calling 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. |
HealthStats takeUidSnapshot (int uid)
Return a HealthStats
object containing a snapshot of system health metrics for the given uid (user-id, which in usually corresponds to application).
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. |
See also:
HealthStats[] takeUidSnapshots (int[] uids)
Return a HealthStats
object containing a snapshot of system health metrics for the given uids (user-id, which in usually corresponds to application).
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. |