mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +01:00
Pebble: webview ensure the webview works no matter which the order of loading the components is.
This commit is contained in:
parent
7ab74fb11b
commit
0efacfbad5
@ -74,6 +74,11 @@ public class WebViewSingleton extends Activity {
|
||||
webSettings.setDomStorageEnabled(true);
|
||||
//needed for localstorage
|
||||
webSettings.setDatabaseEnabled(true);
|
||||
if (jsInterface != null) {
|
||||
LOG.debug("Attaching the existing jsInterface to the new webview instance");
|
||||
instance.addJavascriptInterface(jsInterface, "GBjs");
|
||||
instance.loadUrl("file:///android_asset/app_config/configure.html");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -95,7 +100,7 @@ public class WebViewSingleton extends Activity {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
LOG.debug("Not reloading the webview " + jsInterface.mUuid.toString());
|
||||
LOG.debug("Not replacing the JS in the webview. JS uuid " + jsInterface.mUuid.toString());
|
||||
}
|
||||
|
||||
return instance;
|
||||
@ -192,7 +197,7 @@ public class WebViewSingleton extends Activity {
|
||||
GBDevice device;
|
||||
|
||||
public JSInterface(GBDevice device, UUID mUuid) {
|
||||
LOG.debug("Creating JS interface");
|
||||
LOG.debug("Creating JS interface for UUID: " + mUuid.toString());
|
||||
this.device = device;
|
||||
this.mUuid = mUuid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user