1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-14 22:19:29 +01:00

Just a single method rename, to make it more clear

This commit is contained in:
cpfeiffer 2017-09-25 23:00:39 +02:00
parent e8ae47de79
commit 0fd6064ab6
2 changed files with 2 additions and 3 deletions

View File

@ -69,7 +69,7 @@ public class ExternalPebbleJSActivity extends AbstractGBActivity {
if (extras.getBoolean(SHOW_CONFIG, false)) { if (extras.getBoolean(SHOW_CONFIG, false)) {
WebViewSingleton.runJavascriptInterface(currentDevice, currentUUID); WebViewSingleton.runJavascriptInterface(currentDevice, currentUUID);
} else if (extras.getBoolean(START_BG_WEBVIEW, false)) { } else if (extras.getBoolean(START_BG_WEBVIEW, false)) {
WebViewSingleton.getInstance(this); WebViewSingleton.ensureCreated(this);
finish(); finish();
} }
} }

View File

@ -59,7 +59,7 @@ public class WebViewSingleton {
private WebViewSingleton() { private WebViewSingleton() {
} }
public static synchronized WebView getInstance(Activity context) { public static synchronized void ensureCreated(Activity context) {
if (webViewSingleton.instance == null) { if (webViewSingleton.instance == null) {
webViewSingleton.contextWrapper = new MutableContextWrapper(context); webViewSingleton.contextWrapper = new MutableContextWrapper(context);
webViewSingleton.mainLooper = context.getMainLooper(); webViewSingleton.mainLooper = context.getMainLooper();
@ -76,7 +76,6 @@ public class WebViewSingleton {
//needed for localstorage //needed for localstorage
webSettings.setDatabaseEnabled(true); webSettings.setDatabaseEnabled(true);
} }
return webViewSingleton.instance;
} }
//Internet helper outgoing connection //Internet helper outgoing connection