mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-12 10:01:54 +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) {
|
public static WebView getorInitWebView(Context context, GBDevice device, UUID uuid) {
|
||||||
if (context instanceof Activity) {
|
if (context instanceof Activity) {
|
||||||
final MutableContextWrapper _contextWrapper = new MutableContextWrapper(context);
|
|
||||||
if (contextWrapper != null) {
|
if (contextWrapper != null) {
|
||||||
contextWrapper.setBaseContext(context);
|
contextWrapper.setBaseContext(context);
|
||||||
} else {
|
} 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
|
//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