调整关闭屏幕和电源按钮的功能实现
安卓targetsdk更新到29
This commit is contained in:
Barry 2019-06-19 20:34:27 +08:00
commit 299cbb5c28
9 changed files with 38 additions and 25 deletions

View file

@ -22,11 +22,11 @@ allprojects {
}
android {
compileSdkVersion 27
compileSdkVersion 29
defaultConfig {
applicationId "com.genymobile.scrcpy"
minSdkVersion 21
targetSdkVersion 27
targetSdkVersion 29
versionCode 5
versionName "1.4"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

View file

@ -204,7 +204,7 @@ public final class Device {
public void setScreenPowerMode(int mode) {
IBinder d = SurfaceControl.getBuiltInDisplay(0);
SurfaceControl.setDisplayPowerMode(d, mode);
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off" : "on"));
Ln.i("Device screen turned " + (mode == Device.POWER_MODE_OFF ? "off " : "on ") + mode);
}
static Rect flipRect(Rect crop) {