|
|
|
@ -121,12 +121,14 @@ public final class SurfaceControl {
|
|
|
|
return setDisplayPowerModeMethod;
|
|
|
|
return setDisplayPowerModeMethod;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void setDisplayPowerMode(IBinder displayToken, int mode) {
|
|
|
|
public static boolean setDisplayPowerMode(IBinder displayToken, int mode) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Method method = getSetDisplayPowerModeMethod();
|
|
|
|
Method method = getSetDisplayPowerModeMethod();
|
|
|
|
method.invoke(null, displayToken, mode);
|
|
|
|
method.invoke(null, displayToken, mode);
|
|
|
|
|
|
|
|
return true;
|
|
|
|
} catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
|
|
|
|
} catch (InvocationTargetException | IllegalAccessException | NoSuchMethodException e) {
|
|
|
|
Ln.e("Could not invoke method", e);
|
|
|
|
Ln.e("Could not invoke method", e);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|