improved debugging interface

This commit is contained in:
fkloft
2013-12-30 18:55:26 +01:00
parent 9208552e29
commit 58dc56283a
19 changed files with 528 additions and 98 deletions

View File

@ -15,14 +15,14 @@ public class IITC_WebChromeClient extends WebChromeClient {
public IITC_WebChromeClient(IITC_Mobile iitcm) {
mIitcm = iitcm;
}
/**
* our webchromeclient should share geolocation with the iitc script
*
* allow access by default
*/
@Override
public void onGeolocationPermissionsShowPrompt(String origin,
GeolocationPermissions.Callback callback) {
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
callback.invoke(origin, true, false);
}
@ -42,10 +42,14 @@ public class IITC_WebChromeClient extends WebChromeClient {
* remove splash screen if any JS error occurs
*/
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
if (consoleMessage.messageLevel() == ConsoleMessage.MessageLevel.ERROR) {
public boolean onConsoleMessage(ConsoleMessage message) {
if (message.messageLevel() == ConsoleMessage.MessageLevel.ERROR) {
mIitcm.setLoadingState(false);
}
return super.onConsoleMessage(consoleMessage);
if (Log.log(message))
return true; // message was handled
return super.onConsoleMessage(message);
}
}