Fix not handling all exceptions when testing the network connection.

#Summary
Not all the possible exceptions were documented in the google source code, but other exceptions are clearly possible based on the stack trace found here:
https://www.fabric.io/epic-games/android/apps/com.epicgames.fortnite/issues/3bde8d7431602f8e931118dce2d2482a

This changes the code to simply catch all exceptions and treat any exception as a failure to connect to the internet.

#Test-Plan
I can't repro without the specific bluetooth headset, so will send a build to Edouard Dufresne to verify this fixes the issue



#ROBOMERGE-SOURCE: CL 10269972 via CL 10269982 via CL 10269993
#ROBOMERGE-BOT: (v591-10236483)

[CL 10270004 by ben temple in Main branch]
This commit is contained in:
ben temple
2019-11-15 17:31:45 -05:00
parent d4c5db5280
commit 62d4968d91

View File

@@ -232,6 +232,8 @@ public final class NetworkChangedManager implements NetworkConnectivityClient {
Log.error("Malformed URL, this should never happen. Please fix, url: " + HOST_RESOLUTION_ADDRESS);
} catch (IOException e) {
Log.verbose("Unable to connect to: " + HOST_RESOLUTION_ADDRESS);
} catch (Exception e) {
Log.verbose("Unable to connect to: " + HOST_RESOLUTION_ADDRESS + ", exception: " + e.toString());
} finally {
if (urlConnection != null) {
urlConnection.disconnect();