From 72db88e46fba5f2581eb21c042dc79887cda1c10 Mon Sep 17 00:00:00 2001 From: Paul Jensen Date: Tue, 10 Mar 2015 10:54:12 -0400 Subject: Deprecate static ConnectivityManager.get/setProcessDefaultNetwork() functions. These functions risk hitting an unchecked Exception due to ConnectivityManager not being instantiated yet. Also, change Network.openConnection() to throw a checked Exception rather than an unchecked Exception when ConnectivityManager is not yet instantiated. bug:19416463 Change-Id: Ie1e2b3238aec0343d267c76b64927073f2f05f85 --- .../src/com/android/captiveportallogin/CaptivePortalLoginActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/CaptivePortalLogin') diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java index d898555..77765a4 100644 --- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java +++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java @@ -99,7 +99,7 @@ public class CaptivePortalLoginActivity extends Activity { final ConnectivityManager cm = ConnectivityManager.from(this); final Network network = new Network(mNetId); // Also initializes proxy system properties. - cm.setProcessDefaultNetwork(network); + cm.bindProcessToNetwork(network); // Proxy system properties must be initialized before setContentView is called because // setContentView initializes the WebView logic which in turn reads the system properties. -- cgit v1.1