Rename function to "power on"

This will reduce confusion between "power on" when the device is off and
"turn device screen off" while mirroring.
This commit is contained in:
Romain Vimont 2019-06-02 15:46:34 +02:00
parent 41225c3e41
commit e572d81fa2

View file

@ -54,8 +54,8 @@ public class Controller {
} }
public void control() throws IOException { public void control() throws IOException {
// on start, turn screen on // on start, power on the device
turnScreenOn(); powerOn();
while (true) { while (true) {
handleEvent(); handleEvent();
@ -182,7 +182,7 @@ public class Controller {
return device.injectInputEvent(event, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC); return device.injectInputEvent(event, InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
} }
private boolean turnScreenOn() { private boolean powerOn() {
return device.isScreenOn() || injectKeycode(KeyEvent.KEYCODE_POWER); return device.isScreenOn() || injectKeycode(KeyEvent.KEYCODE_POWER);
} }