This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
app/src/noapi/java/org/mozilla/vrbrowser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,17 +38,19 @@ public static boolean filterPermission(final String aPermission) {
3838 private int mFrameCount ;
3939 private long mLastFrameTime = System .currentTimeMillis ();
4040
41+ final Object mRenderLock = new Object ();
42+
4143 private final Runnable activityDestroyedRunnable = () -> {
42- synchronized (this ) {
44+ synchronized (mRenderLock ) {
4345 activityDestroyed ();
44- notifyAll ();
46+ mRenderLock . notifyAll ();
4547 }
4648 };
4749
4850 private final Runnable activityPausedRunnable = () -> {
49- synchronized (this ) {
51+ synchronized (mRenderLock ) {
5052 activityPaused ();
51- notifyAll ();
53+ mRenderLock . notifyAll ();
5254 }
5355 };
5456
@@ -145,10 +147,10 @@ public boolean onGenericMotionEvent(MotionEvent aEvent) {
145147 @ Override
146148 protected void onPause () {
147149 Log .d (LOGTAG , "PlatformActivity onPause" );
148- synchronized (activityPausedRunnable ) {
150+ synchronized (mRenderLock ) {
149151 queueRunnable (activityPausedRunnable );
150152 try {
151- activityPausedRunnable .wait ();
153+ mRenderLock .wait ();
152154 } catch (InterruptedException e ) {
153155 Log .e (LOGTAG , "activityPausedRunnable interrupted: " + e .toString ());
154156 }
You can’t perform that action at this time.
0 commit comments