mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 17:41:57 +01:00
Pebble: webview, simplify the code since finals are not required anymore
This commit is contained in:
parent
eaaa940637
commit
d22c78e8f7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user