Merge "Include VR throttling limit in hardware properties." into nyc-dev
am: ee1062e
* commit 'ee1062e4c011578906edf08d340eff5a55ebe085':
Include VR throttling limit in hardware properties.
Change-Id: I5d404f5fe7ad36dfe5269f7acb148146b7c2eabf
This commit is contained in:
@@ -28707,6 +28707,7 @@ package android.os {
|
|||||||
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
||||||
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
||||||
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
||||||
|
field public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN = 3; // 0x3
|
||||||
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30951,6 +30951,7 @@ package android.os {
|
|||||||
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
||||||
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
||||||
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
||||||
|
field public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN = 3; // 0x3
|
||||||
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28772,6 +28772,7 @@ package android.os {
|
|||||||
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
field public static final int TEMPERATURE_CURRENT = 0; // 0x0
|
||||||
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
field public static final int TEMPERATURE_SHUTDOWN = 2; // 0x2
|
||||||
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
field public static final int TEMPERATURE_THROTTLING = 1; // 0x1
|
||||||
|
field public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN = 3; // 0x3
|
||||||
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
field public static final float UNDEFINED_TEMPERATURE = -3.4028235E38f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public class HardwarePropertiesManager {
|
|||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@IntDef({
|
@IntDef({
|
||||||
TEMPERATURE_CURRENT, TEMPERATURE_THROTTLING, TEMPERATURE_SHUTDOWN
|
TEMPERATURE_CURRENT, TEMPERATURE_THROTTLING, TEMPERATURE_SHUTDOWN,
|
||||||
|
TEMPERATURE_THROTTLING_BELOW_VR_MIN
|
||||||
})
|
})
|
||||||
public @interface TemperatureSource {}
|
public @interface TemperatureSource {}
|
||||||
|
|
||||||
@@ -77,6 +78,12 @@ public class HardwarePropertiesManager {
|
|||||||
/** Get shutdown temperature threshold. */
|
/** Get shutdown temperature threshold. */
|
||||||
public static final int TEMPERATURE_SHUTDOWN = 2;
|
public static final int TEMPERATURE_SHUTDOWN = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get throttling temperature threshold above which minimum clockrates for VR mode will not be
|
||||||
|
* met.
|
||||||
|
*/
|
||||||
|
public static final int TEMPERATURE_THROTTLING_BELOW_VR_MIN = 3;
|
||||||
|
|
||||||
/** Undefined temperature constant. */
|
/** Undefined temperature constant. */
|
||||||
public static final float UNDEFINED_TEMPERATURE = -Float.MAX_VALUE;
|
public static final float UNDEFINED_TEMPERATURE = -Float.MAX_VALUE;
|
||||||
|
|
||||||
@@ -96,7 +103,8 @@ public class HardwarePropertiesManager {
|
|||||||
* {@link #DEVICE_TEMPERATURE_GPU}, {@link #DEVICE_TEMPERATURE_BATTERY} or {@link
|
* {@link #DEVICE_TEMPERATURE_GPU}, {@link #DEVICE_TEMPERATURE_BATTERY} or {@link
|
||||||
* #DEVICE_TEMPERATURE_SKIN}.
|
* #DEVICE_TEMPERATURE_SKIN}.
|
||||||
* @param source source of requested device temperature, one of {@link #TEMPERATURE_CURRENT},
|
* @param source source of requested device temperature, one of {@link #TEMPERATURE_CURRENT},
|
||||||
* {@link #TEMPERATURE_THROTTLING} or {@link #TEMPERATURE_SHUTDOWN}.
|
* {@link #TEMPERATURE_THROTTLING}, {@link #TEMPERATURE_THROTTLING_BELOW_VR_MIN} or
|
||||||
|
* {@link #TEMPERATURE_SHUTDOWN}.
|
||||||
* @return an array of requested float device temperatures. Temperature equals to
|
* @return an array of requested float device temperatures. Temperature equals to
|
||||||
* {@link #UNDEFINED_TEMPERATURE} if undefined.
|
* {@link #UNDEFINED_TEMPERATURE} if undefined.
|
||||||
* Empty if platform doesn't provide the queried temperature.
|
* Empty if platform doesn't provide the queried temperature.
|
||||||
@@ -115,6 +123,7 @@ public class HardwarePropertiesManager {
|
|||||||
case TEMPERATURE_CURRENT:
|
case TEMPERATURE_CURRENT:
|
||||||
case TEMPERATURE_THROTTLING:
|
case TEMPERATURE_THROTTLING:
|
||||||
case TEMPERATURE_SHUTDOWN:
|
case TEMPERATURE_SHUTDOWN:
|
||||||
|
case TEMPERATURE_THROTTLING_BELOW_VR_MIN:
|
||||||
try {
|
try {
|
||||||
return mService.getDeviceTemperatures(mContext.getOpPackageName(), type,
|
return mService.getDeviceTemperatures(mContext.getOpPackageName(), type,
|
||||||
source);
|
source);
|
||||||
|
|||||||
@@ -36,7 +36,8 @@ namespace android {
|
|||||||
enum {
|
enum {
|
||||||
TEMPERATURE_CURRENT = 0,
|
TEMPERATURE_CURRENT = 0,
|
||||||
TEMPERATURE_THROTTLING = 1,
|
TEMPERATURE_THROTTLING = 1,
|
||||||
TEMPERATURE_SHUTDOWN = 2
|
TEMPERATURE_SHUTDOWN = 2,
|
||||||
|
TEMPERATURE_THROTTLING_BELOW_VR_MIN = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
@@ -127,6 +128,13 @@ static jfloatArray nativeGetDeviceTemperatures(JNIEnv *env, jclass /* clazz */,
|
|||||||
values[length++] = list[i].shutdown_threshold;
|
values[length++] = list[i].shutdown_threshold;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case TEMPERATURE_THROTTLING_BELOW_VR_MIN:
|
||||||
|
if (list[i].vr_throttling_threshold == UNKNOWN_TEMPERATURE) {
|
||||||
|
values[length++] = gUndefinedTemperature;
|
||||||
|
} else {
|
||||||
|
values[length++] = list[i].vr_throttling_threshold;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user