Reset caches for remote devices at every Connect() call
Py ADB's per-device cache keys each device based on its port path.
For USB devices, these change every time the device disconnects and
reconnects. This means rebooting the device changes its port path.
For TCP devices, that port path is likely just its IP and port, which
doesn't really change if you simply reboot the device.
This means that rebooting a USB device after flashing it would reset
its caches, while does the same for a TCP device wouldn't. This leads
to build properties of TCP devices not being updated after their
devices are flashed.
Force resetting the device cache for every Connect() call of a remote
device should avoid that.
Bug: 436887355
Change-Id: I85c90c9d5f4bb1358831eaaaf05e7fdf083ceddd
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/python-adb/+/6825864
Reviewed-by: Andrew Lamb <[email protected]>
Commit-Queue: Ben Pastene <[email protected]>
1 file changed