public class HardwarePropertiesManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
HardwarePropertiesManager.DeviceTemperatureType |
static interface |
HardwarePropertiesManager.TemperatureSource |
Modifier and Type | Field and Description |
---|---|
static int |
DEVICE_TEMPERATURE_BATTERY
Temperature of battery in Celsius.
|
static int |
DEVICE_TEMPERATURE_CPU
Temperature of CPUs in Celsius.
|
static int |
DEVICE_TEMPERATURE_GPU
Temperature of GPUs in Celsius.
|
static int |
DEVICE_TEMPERATURE_SKIN
Temperature of device skin in Celsius.
|
static int |
TEMPERATURE_CURRENT
Get current temperature.
|
static int |
TEMPERATURE_SHUTDOWN
Get shutdown temperature threshold.
|
static int |
TEMPERATURE_THROTTLING
Get throttling temperature threshold.
|
static int |
TEMPERATURE_THROTTLING_BELOW_VR_MIN
Get throttling temperature threshold above which minimum clockrates for VR mode will not be
met.
|
static float |
UNDEFINED_TEMPERATURE
Undefined temperature constant.
|
Constructor and Description |
---|
HardwarePropertiesManager(Context context,
IHardwarePropertiesManager service) |
Modifier and Type | Method and Description |
---|---|
CpuUsageInfo[] |
getCpuUsages()
Return an array of CPU usage info for each core.
|
float[] |
getDeviceTemperatures(int type,
int source)
Return an array of device temperatures in Celsius.
|
float[] |
getFanSpeeds()
Return an array of fan speeds in RPM.
|
public static final int DEVICE_TEMPERATURE_CPU
public static final int DEVICE_TEMPERATURE_GPU
public static final int DEVICE_TEMPERATURE_BATTERY
public static final int DEVICE_TEMPERATURE_SKIN
public static final int TEMPERATURE_CURRENT
public static final int TEMPERATURE_THROTTLING
public static final int TEMPERATURE_SHUTDOWN
public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN
public static final float UNDEFINED_TEMPERATURE
public HardwarePropertiesManager(Context context, IHardwarePropertiesManager service)
public float[] getDeviceTemperatures(int type, int source)
type
- type of requested device temperature, one of DEVICE_TEMPERATURE_CPU
,
DEVICE_TEMPERATURE_GPU
, DEVICE_TEMPERATURE_BATTERY
or DEVICE_TEMPERATURE_SKIN
.source
- source of requested device temperature, one of TEMPERATURE_CURRENT
,
TEMPERATURE_THROTTLING
, TEMPERATURE_THROTTLING_BELOW_VR_MIN
or
TEMPERATURE_SHUTDOWN
.UNDEFINED_TEMPERATURE
if undefined.
Empty if platform doesn't provide the queried temperature.SecurityException
- if something other than the profile or device owner, or the
current VR service tries to retrieve information provided by this service.public CpuUsageInfo[] getCpuUsages()
CpuUsageInfo
for each core. Return null
for
each unplugged core.
Empty if CPU usage is not supported on this system.SecurityException
- if something other than the profile or device owner, or the
current VR service tries to retrieve information provided by this service.public float[] getFanSpeeds()
SecurityException
- if something other than the profile or device owner, or the
current VR service tries to retrieve information provided by this service.