1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-18 04:06:38 +02:00

Pebble: webview, simplify the code since finals are not required anymore

This commit is contained in:
Daniele Gobbetti 2017-01-01 18:37:42 +01:00
parent eaaa940637
commit d22c78e8f7

View File

@ -46,11 +46,10 @@ public class WebViewSingleton extends Activity {
public static WebView getorInitWebView(Context context, GBDevice device, UUID uuid) {
if (context instanceof Activity) {
final MutableContextWrapper _contextWrapper = new MutableContextWrapper(context);
if (contextWrapper != null) {
contextWrapper.setBaseContext(context);
} else {
contextWrapper = _contextWrapper;
contextWrapper = new MutableContextWrapper(context);
}
}
//here we are sure that contextWrapper is either null or an activity, hence we run on the main thread