1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 19:45:50 +01:00

Pebble: Fix background javascript for Pebble2/LE/Emulator

This commit is contained in:
Andreas Shimokawa 2017-10-04 23:12:49 +02:00
parent fbef490419
commit 0eb8a0b5e2

View File

@ -162,16 +162,15 @@ class PebbleIoThread extends GBDeviceIoThread {
mBtSocket.connect();
mInStream = mBtSocket.getInputStream();
mOutStream = mBtSocket.getOutputStream();
if (prefs.getBoolean("pebble_enable_background_javascript", false)) {
Intent startIntent = new Intent(getContext(), ExternalPebbleJSActivity.class);
startIntent.putExtra(ExternalPebbleJSActivity.START_BG_WEBVIEW, true);
getContext().startActivity(startIntent);
} else {
LOG.debug("Not enabling background Webview, is disabled in preferences.");
}
}
}
if (prefs.getBoolean("pebble_enable_background_javascript", false)) {
Intent startIntent = new Intent(getContext(), ExternalPebbleJSActivity.class);
startIntent.putExtra(ExternalPebbleJSActivity.START_BG_WEBVIEW, true);
getContext().startActivity(startIntent);
} else {
LOG.debug("Not enabling background Webview, is disabled in preferences.");
}
} catch (IOException e) {
LOG.warn("error while connecting: " + e.getMessage(), e);
gbDevice.setState(originalState);