diff --git a/src/workers/CommandorPage.js b/src/workers/CommandorPage.js index 1a4a1d2..709be13 100644 --- a/src/workers/CommandorPage.js +++ b/src/workers/CommandorPage.js @@ -1022,13 +1022,17 @@ class CommandorPage { async enableDisableAirPlanMode() { logWithDevice("will enable airplane mode", this.device) - await this.device.shell("cmd connectivity airplane-mode enable") - // await this.device.shell("adb shell settings put global airplane_mode_on 1") - await delay(1000) - // await this.device.shell("adb shell settings put global airplane_mode_on 0") - await this.device.shell("cmd connectivity airplane-mode disable") - await delay(2000) - + try { + await this.device.shell("cmd connectivity airplane-mode enable") + // await this.device.shell("adb shell settings put global airplane_mode_on 1") + await delay(1000) + // await this.device.shell("adb shell settings put global airplane_mode_on 0") + await this.device.shell("cmd connectivity airplane-mode disable") + await delay(2000) + } catch (e) { + await this.device.shell("cmd connectivity airplane-mode disable") + console.log(e) + } } }