public class SystemHealthManager extends Object
Constructor and Description |
---|
SystemHealthManager()
Construct a new SystemHealthManager object.
|
Modifier and Type | Method and Description |
---|---|
static SystemHealthManager |
from(Context context)
Obtain a SystemHealthManager object for the supplied context.
|
HealthStats |
takeMyUidSnapshot()
Return a
HealthStats object containing a snapshot of system health
metrics for the application calling this API. |
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). |
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). |
public SystemHealthManager()
public static SystemHealthManager from(Context context)
public HealthStats takeUidSnapshot(int uid)
HealthStats
object containing a snapshot of system health
metrics for the given uid (user-id, which in usually corresponds to application).uid
- User ID for a given application.HealthStats
object containing the metrics for the requested
application. The keys for this HealthStats object will be from the UidHealthStats
class.Process.myUid()
public HealthStats takeMyUidSnapshot()
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())
.HealthStats
object containing the metrics for this application. The keys
for this HealthStats object will be from the UidHealthStats
class.public HealthStats[] takeUidSnapshots(int[] uids)
HealthStats
object containing a snapshot of system health
metrics for the given uids (user-id, which in usually corresponds to application).uids
- An array of User IDs to retrieve.HealthStats
objects containing the metrics for each of
the requested uids. The keys for this HealthStats object will be from the
UidHealthStats
class.