Skip to content

Commit

Permalink
Make setScreenPowerMode() method static
Browse files Browse the repository at this point in the history
Its implementation does not use the instance at all.
  • Loading branch information
rom1v committed Jul 7, 2020
1 parent f7d4b6d commit 334964c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/main/java/com/genymobile/scrcpy/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void handleEvent() throws IOException {
case ControlMessage.TYPE_SET_SCREEN_POWER_MODE:
if (device.supportsInputEvents()) {
int mode = msg.getAction();
boolean setPowerModeOk = device.setScreenPowerMode(mode);
boolean setPowerModeOk = Device.setScreenPowerMode(mode);
if (setPowerModeOk) {
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off" : "on"));
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/com/genymobile/scrcpy/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public boolean setClipboardText(String text) {
/**
* @param mode one of the {@code SCREEN_POWER_MODE_*} constants
*/
public boolean setScreenPowerMode(int mode) {
public static boolean setScreenPowerMode(int mode) {
IBinder d = SurfaceControl.getBuiltInDisplay();
if (d == null) {
Ln.e("Could not get built-in display");
Expand Down

0 comments on commit 334964c

Please sign in to comment.