From 85cd6ea379c2c6cef133e5871bd60ae5c6f9dec0 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Wed, 4 Dec 2024 22:04:21 +0800 Subject: [PATCH] fix: brighten should be executed before unlock --- hrp/internal/version/VERSION | 2 +- hrp/pkg/uixt/android_device.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hrp/internal/version/VERSION b/hrp/internal/version/VERSION index fc4a438a..8d4c3097 100644 --- a/hrp/internal/version/VERSION +++ b/hrp/internal/version/VERSION @@ -1 +1 @@ -v5.0.0+2412041737 +v5.0.0+2412042204 diff --git a/hrp/pkg/uixt/android_device.go b/hrp/pkg/uixt/android_device.go index 255a53f0..571a6060 100644 --- a/hrp/pkg/uixt/android_device.go +++ b/hrp/pkg/uixt/android_device.go @@ -193,10 +193,11 @@ func (dev *AndroidDevice) Options() (deviceOptions []AndroidDeviceOption) { func (dev *AndroidDevice) Init() error { dev.d.RunShellCommand("ime", "enable", "io.appium.settings/.UnicodeIME") dev.d.RunShellCommand("rm", "-r", config.DeviceActionLogFilePath) - // unlock android device screen - dev.d.RunShellCommand("input", "keyevent", "82") + // Notice: brighten should be executed before unlock // brighten android device screen dev.d.RunShellCommand("input", "keyevent", "224") + // unlock android device screen + dev.d.RunShellCommand("input", "keyevent", "82") if dev.UIA2 { // uiautomator2 server must be started before