Remove double check interface by NetworkInterface

NetworkInterface#getByName can not get the interface without IP addresses.
When setIncludeTestInterfaces(true) is called, the interface will be
placed in client mode, which will delete the link-local address. So calling
NetworkInterface#getByName to get test interface may not work before
switching to server mode.

Bug: 168215721
Test: atest CtsTethering

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440032

Change-Id: Idf1d18261c954e22989774ae97a12261551b31f6
Merged-In: Ice8adcce1c4b2c86bd219c701b2afa9ba2339f24
(cherry picked from commit 155e2a521240b35ae12d15390049c6c62940ecef)
1 file changed
tree: 95bbb3032ed5eb53c45f98c37eb979d52c616f84
  1. Tethering/