mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 04:46:51 +01:00
Pebble: Fix background javascript for Pebble2/LE/Emulator
This commit is contained in:
parent
fbef490419
commit
0eb8a0b5e2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user