Skip to content

Commit 19ad578

Browse files
committed
2 parents 38fb190 + 406048b commit 19ad578

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

QuestAppVersionSwitcher/Adb/QAVSAdbInteractor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ public static void Initialize()
5050

5151
// Launch the server.
5252
AdbWrapper.StartServer();
53+
this.device = device;
5354
}
5455

5556
// Restore the saved wireless debugging state.
5657
AdbWrapper.AdbWifiState = adbWifiState;
5758
} else {
58-
device = devices[0];
59+
this.device = devices[0];
5960
}
6061

6162
// Grant necessary permissions to all connected devices.

QuestAppVersionSwitcher/WebServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ public void Start()
12501250
else
12511251
{
12521252
// Check if any adb devices are connected
1253-
if (AdbWrapper.GetDevices().Length <= 0)
1253+
if (AdbWrapper.GetDevices().Count <= 0)
12541254
{
12551255
serverRequest.SendString(GotAccess.GetResponse("No adb devices connected", false, true), "application/json", 400);
12561256
return true;
@@ -1531,7 +1531,7 @@ public void Start()
15311531
try
15321532
{
15331533
ExitInfo i = AdbWrapper.RunAdbCommand("connect 127.0.0.1:" + r.port);
1534-
if(i.ExitCode != 0 || AdbWrapper.GetDevices().Length <= 0) throw new Exception("Failed to connect: " + i);
1534+
if(i.ExitCode != 0 || AdbWrapper.GetDevices().Count <= 0) throw new Exception("Failed to connect: " + i);
15351535
request.SendString(GenericResponse.GetResponse("Connected with localhost ", true), "application/json");
15361536
}
15371537
catch (Exception e)

0 commit comments

Comments
 (0)