Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63a4ce5c authored by Jizheng Chu's avatar Jizheng Chu Committed by Automerger Merge Worker
Browse files

Merge "Catch AdbError during adb port forwarding to trigger retry mechanism in...

Merge "Catch AdbError during adb port forwarding to trigger retry mechanism in gd_device setup" am: 0f399252

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2061858



Change-Id: Ib4c92fd7c022680543475c63ab647d56269459ea
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 2dd0d59b 0f399252
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -127,7 +127,10 @@ class BlueberryAdbProxy(AdbProxy):
            #     device port
            #     device port
            remote_port = self._ssh_connection.find_free_port()
            remote_port = self._ssh_connection.find_free_port()
            host_port = self._ssh_connection.create_ssh_tunnel(remote_port, local_port=host_port)
            host_port = self._ssh_connection.create_ssh_tunnel(remote_port, local_port=host_port)
        try:
            output = self.forward(["tcp:%d" % host_port, "tcp:%d" % device_port])
            output = self.forward(["tcp:%d" % host_port, "tcp:%d" % device_port])
        except AdbError as error:
            return error
        # If hinted_port is 0, the output will be the selected port.
        # If hinted_port is 0, the output will be the selected port.
        # Otherwise, there will be no output upon successfully
        # Otherwise, there will be no output upon successfully
        # forwarding the hinted port.
        # forwarding the hinted port.