mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Pebble: Fix background javascript for Pebble2/LE/Emulator
This commit is contained in:
+7
-8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user