fix(automator): RootAutomator (x, y) not correct on some devices
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -8,8 +8,8 @@ android {
|
||||
applicationId "org.autojs.autojs"
|
||||
minSdkVersion 17
|
||||
targetSdkVersion 23
|
||||
versionCode 414
|
||||
versionName "4.0.2 Alpha9"
|
||||
versionCode 416
|
||||
versionName "4.0.2 Alpha11"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
|
||||
@@ -192,7 +192,7 @@ public class CodeEditText extends AppCompatEditText {
|
||||
return;
|
||||
}
|
||||
JavaScriptHighlighter.HighlightTokens highlightTokens = mHighlightTokens;
|
||||
Log.d(LOG_TAG, "drawText: tokens = " + highlightTokens);
|
||||
//Log.d(LOG_TAG, "drawText: tokens = " + highlightTokens);
|
||||
Layout layout = getLayout();
|
||||
int lineCount = getLineCount();
|
||||
int textLength = highlightTokens == null ? 0 : highlightTokens.getText().length();
|
||||
|
||||
Binary file not shown.
@@ -13,6 +13,7 @@ import com.stardust.autojs.runtime.exception.ScriptInterruptedException;
|
||||
import com.stardust.util.ScreenMetrics;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import static com.stardust.autojs.core.inputevent.InputEventCodes.*;
|
||||
@@ -281,7 +282,8 @@ public class RootAutomator implements Shell.Callback {
|
||||
String deviceNameOrPath = RootAutomatorEngine.getDeviceNameOrPath(mContext, InputDevices.getTouchDeviceName());
|
||||
Log.d(LOG_TAG, "deviceNameOrPath: " + deviceNameOrPath);
|
||||
mShell.exec("chmod 777 " + path);
|
||||
String command = path + " -d " + deviceNameOrPath;
|
||||
String command = String.format(Locale.getDefault(), "%s -d %s -sw %d -sh %d", path, deviceNameOrPath,
|
||||
ScreenMetrics.getDeviceScreenWidth(), ScreenMetrics.getDeviceScreenHeight());
|
||||
mShell.exec(command);
|
||||
synchronized (mReadyLock) {
|
||||
Log.d(LOG_TAG, "notify ready");
|
||||
|
||||
@@ -62,7 +62,7 @@ public class Shell extends AbstractShell {
|
||||
}
|
||||
}
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final boolean DEBUG = true;
|
||||
private static final String TAG = "Shell";
|
||||
|
||||
private volatile TermSession mTermSession;
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":414},"path":"commonRelease-4.0.2 Alpha9.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":415},"path":"commonRelease-4.0.2 Alpha10.apk","properties":{"packageId":"org.autojs.autojs","split":"","minSdkVersion":"17"}}]
|
||||
Reference in New Issue
Block a user