diff --git a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java index 57e155a04bd70..3601a0aa57461 100644 --- a/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java +++ b/packages/CaptivePortalLogin/src/com/android/captiveportallogin/CaptivePortalLoginActivity.java @@ -58,6 +58,7 @@ import java.util.Random; public class CaptivePortalLoginActivity extends Activity { private static final String TAG = CaptivePortalLoginActivity.class.getSimpleName(); private static final boolean DBG = true; + private static final boolean VDBG = false; private static final int SOCKET_TIMEOUT_MS = 10000; @@ -311,6 +312,7 @@ public class CaptivePortalLoginActivity extends Activity { private class MyWebViewClient extends WebViewClient { private static final String INTERNAL_ASSETS = "file:///android_asset/"; + private final String mBrowserBailOutToken = Long.toString(new Random().nextLong()); // How many Android device-independent-pixels per scaled-pixel // dp/sp = (px/sp) / (px/dp) = (1/sp) / (1/dp) @@ -363,12 +365,6 @@ public class CaptivePortalLoginActivity extends Activity { testForCaptivePortal(); } - // Convert Android device-independent-pixels (dp) to HTML size. - private String dp(int dp) { - // HTML px's are scaled just like dp's, so just add "px" suffix. - return Integer.toString(dp) + "px"; - } - // Convert Android scaled-pixels (sp) to HTML size. private String sp(int sp) { // Convert sp to dp's. @@ -376,25 +372,11 @@ public class CaptivePortalLoginActivity extends Activity { // Apply a scale factor to make things look right. dp *= 1.3; // Convert dp's to HTML size. - return dp((int)dp); + // HTML px's are scaled just like dp's, so just add "px" suffix. + return Integer.toString((int)dp) + "px"; } // A web page consisting of a large broken lock icon to indicate SSL failure. - private final String SSL_ERROR_HTML = "

" +
- "

",
+ "