Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Concurrent Widgets fix (#3910)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored Dec 14, 2020
1 parent 7319b9e commit 3f98edb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;

import static org.mozilla.vrbrowser.ui.widgets.UIWidget.REMOVE_WIDGET;
Expand Down Expand Up @@ -155,7 +156,7 @@ public void run() {
static final long RESET_CRASH_COUNT_DELAY = 5000;

static final String LOGTAG = SystemUtils.createLogtag(VRBrowserActivity.class);
HashMap<Integer, Widget> mWidgets;
ConcurrentHashMap<Integer, Widget> mWidgets;
private int mWidgetHandleIndex = 1;
AudioEngine mAudioEngine;
OffscreenDisplay mOffscreenDisplay;
Expand Down Expand Up @@ -267,7 +268,7 @@ protected void onCreate(Bundle savedInstanceState) {
mBrightnessQueue = new LinkedList<>();
mCurrentBrightness = Pair.create(null, 1.0f);

mWidgets = new HashMap<>();
mWidgets = new ConcurrentHashMap<>();
mWidgetContainer = new FrameLayout(this);

mPermissionDelegate = new PermissionDelegate(this, this);
Expand Down

0 comments on commit 3f98edb

Please sign in to comment.