Simplify adb broadcast command construction in AdbUtils for cleaner and more concise execution logic.
This commit is contained in:
parent
899f4ff6d6
commit
312e0b37dd
@ -375,9 +375,7 @@ bool AdbUtils::inputAdbIMEText(const QString &deviceId, const QString &text) {
|
|||||||
process.setWorkingDirectory(adbDir());
|
process.setWorkingDirectory(adbDir());
|
||||||
process.start(adbPath(), {
|
process.start(adbPath(), {
|
||||||
"-s", deviceId,
|
"-s", deviceId,
|
||||||
"shell", "am", "broadcast",
|
"shell", "am broadcast -a ADB_INPUT_TEXT --es msg '" + text + "'"
|
||||||
"-a", "ADB_INPUT_TEXT",
|
|
||||||
"--es", "msg", text
|
|
||||||
});
|
});
|
||||||
if (!process.waitForStarted(5000)) {
|
if (!process.waitForStarted(5000)) {
|
||||||
qWarning() << "[AdbUtils] Failed to start adb broadcast:" << process.errorString();
|
qWarning() << "[AdbUtils] Failed to start adb broadcast:" << process.errorString();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user