mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Add logging
This commit is contained in:
parent
658f6da10d
commit
55e6920875
1 changed files with 4 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import android.net.Uri;
|
|||
import android.os.Bundle;
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import android.webkit.WebResourceResponse;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
|
|
@ -33,16 +34,17 @@ public class SignupActivity extends Activity {
|
|||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
if (Uri.parse(url).getHost().equals("https://commons.m.wikimedia.org/w/index.php?title=Main_Page&welcome=yes")) {
|
||||
// This is my web site, so do not override; let my WebView load the page
|
||||
// Signup success, so load LoginActivity again
|
||||
Log.d("SignupActivity", "Overriding URL");
|
||||
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
|
||||
startActivity(intent);
|
||||
return true;
|
||||
} else {
|
||||
Log.d("SignupActivity", "Not overriding URL");
|
||||
Log.d("SignupActivity", "Not overriding URL, URL is: " + Uri.parse(url).getHost());
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue