Fix fastdeploy failure in Windows

adb --fastdeploy creates a TemporaryFile to which the stdout for a shell
command is redirected. This happens while the file is still open (the
TemporaryFile object holds the file handle). In Linux this works, but
Windows blocks the operation with an error of "The process cannot access
the file because it is being used by another process".

This change closes the file before the shell tries to write to it.

Test: mm -j 72
Test: adb install --fastdeploy --force-agent --local-agent /mnt/raid/boat-attack-apk/boat-attack-swappy.apk

Bug: 122592986
Change-Id: Iaaaf62cda43e4714d7f979e6a690549b383a7b82
1 file changed