Throw an error if a shell command results in an error.
Some services will write to the error stream if there is
an issue with handling the shell command but these error
messages are ignored currently as we are only looking at
output stream. So, update it to also consider messages
in the error stream and if the content in error stream
is not empty, then throw an exception.
Bug: 228117528
Test: atest com.android.cts.net.HostsideRestrictBackgroundNetworkTests
Change-Id: I935a74b4a689825de414226a2108f6a836b212ab
1 file changed