diff options
| author | 2018-12-21 15:52:53 +0000 | |
|---|---|---|
| committer | 2018-12-21 15:52:53 +0000 | |
| commit | cae7864d90e3f19763d3fe2ed2942c3c24b96030 (patch) | |
| tree | d82e0d63b50ce7e24a7170845a5c6e4014d1f94b | |
| parent | d5ad1252a3de026f9f57031cce62b9c39f7b3bb5 (diff) | |
| parent | 9bed4c14afbc6d97ac9d655d0d403fd1e7207dde (diff) | |
Merge "OsuLogin: Do not load the page for local IP address"
| -rw-r--r-- | packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java b/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java index 0312b81493be..28b05396acce 100644 --- a/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java +++ b/packages/OsuLogin/src/com/android/hotspot2/osu/OsuLoginActivity.java @@ -39,12 +39,14 @@ import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ProgressBar; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.android.hotspot2.R; import java.net.MalformedURLException; import java.net.URL; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + /** * Online Sign Up Login Web View launched during Provision Process of Hotspot 2.0 rel2. @@ -252,6 +254,10 @@ public class OsuLoginActivity extends Activity { @Override public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) { + if (request.getUrl().toString().startsWith("http://127.0.0.1")) { + view.stopLoading(); + } + if (request.isForMainFrame()) { // This happens right after getting HTTP redirect response from an OSU server // since no more Http request is allowed to send to the OSU server. |