Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bed4c14 authored by Ecco Park's avatar Ecco Park
Browse files

OsuLogin: Do not load the page for local IP address

Currently the OsuLogin Weview shows "web page not available" page when
user clicks getPasspoint Button on the page.
This is because we are trying to load the page for http://127.0.0.1

 on
last moment before we exit the OsuLogin webview as part of HTTP redirect
to local server.

So, it needs to stop loading the page for the local server.

Bug: 121281421
Test: Tested with R2 AP
Change-Id: I37e3aa5985d49d0a58e367ff221d53df371551e0
Signed-off-by: default avatarEcco Park <eccopark@google.com>
parent c60fbd4f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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.