mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-10-19 01:39:39 +02:00
Pebble: more debug output for webview singleton, whitelist tagesschau.de for tests
This commit is contained in:
parent
868c0543d5
commit
65835db5cc
@ -79,7 +79,7 @@ public class WebViewSingleton {
|
|||||||
private static boolean internetHelperBound;
|
private static boolean internetHelperBound;
|
||||||
private static CountDownLatch latch;
|
private static CountDownLatch latch;
|
||||||
private static WebResourceResponse internetResponse;
|
private static WebResourceResponse internetResponse;
|
||||||
final static Messenger internetHelperListener = new Messenger(new IncomingHandler());
|
private final static Messenger internetHelperListener = new Messenger(new IncomingHandler());
|
||||||
|
|
||||||
private WebViewSingleton() {
|
private WebViewSingleton() {
|
||||||
}
|
}
|
||||||
@ -110,11 +110,13 @@ public class WebViewSingleton {
|
|||||||
//Internet helper outgoing connection
|
//Internet helper outgoing connection
|
||||||
private static ServiceConnection internetHelperConnection = new ServiceConnection() {
|
private static ServiceConnection internetHelperConnection = new ServiceConnection() {
|
||||||
public void onServiceConnected(ComponentName className, IBinder service) {
|
public void onServiceConnected(ComponentName className, IBinder service) {
|
||||||
|
LOG.info("internet helper service bound");
|
||||||
internetHelperBound = true;
|
internetHelperBound = true;
|
||||||
internetHelper = new Messenger(service);
|
internetHelper = new Messenger(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onServiceDisconnected(ComponentName className) {
|
public void onServiceDisconnected(ComponentName className) {
|
||||||
|
LOG.info("internet helper service unbound");
|
||||||
internetHelper = null;
|
internetHelper = null;
|
||||||
internetHelperBound = false;
|
internetHelperBound = false;
|
||||||
}
|
}
|
||||||
@ -407,7 +409,7 @@ public class WebViewSingleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private WebResourceResponse mimicReply(Uri requestedUri) {
|
private WebResourceResponse mimicReply(Uri requestedUri) {
|
||||||
if (requestedUri.getHost() != null && requestedUri.getHost().contains("openweathermap.org")) {
|
if (requestedUri.getHost() != null && (requestedUri.getHost().contains("openweathermap.org") || requestedUri.getHost().contains("tagesschau.de") )) {
|
||||||
if (internetHelperBound) {
|
if (internetHelperBound) {
|
||||||
LOG.debug("WEBVIEW forwarding request to the internet helper");
|
LOG.debug("WEBVIEW forwarding request to the internet helper");
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
Loading…
Reference in New Issue
Block a user