Skip to content

Commit

Permalink
[mobile] don't overide Google redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
fkloft committed Apr 12, 2017
1 parent 6f04ba1 commit dfab0d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mobile/src/com/cradle/iitc_mobile/IITC_WebViewClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,16 @@ public WebResourceResponse shouldInterceptRequest(final WebView view, final Stri
// start non-ingress-intel-urls in another app...
@Override
public boolean shouldOverrideUrlLoading(final WebView view, final String url) {
Uri uri = Uri.parse(url);

if (url.contains("conflogin") || url.contains("ServiceLogin") || url.contains("appengine.google.com")) {
Log.d("Google login");
return false;
}
else if (uri.getHost().contains(".google.") && "/url".equals(uri.getPath()) && uri.getQueryParameter("q") != null) {
Log.d("redirect to: " + uri.getQueryParameter("q"));
return shouldOverrideUrlLoading(view, uri.getQueryParameter("q"));
}
else if (isIntelUrl(url)) {
Log.d("intel link requested, reset app and load " + url);
mIitc.reset();
Expand Down

0 comments on commit dfab0d1

Please sign in to comment.