This repository was archived by the owner on Jul 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/src/noapi/java/org/mozilla/vrbrowser Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,19 @@ public static boolean filterPermission(final String aPermission) {
38
38
private int mFrameCount ;
39
39
private long mLastFrameTime = System .currentTimeMillis ();
40
40
41
+ final Object mRenderLock = new Object ();
42
+
41
43
private final Runnable activityDestroyedRunnable = () -> {
42
- synchronized (this ) {
44
+ synchronized (mRenderLock ) {
43
45
activityDestroyed ();
44
- notifyAll ();
46
+ mRenderLock . notifyAll ();
45
47
}
46
48
};
47
49
48
50
private final Runnable activityPausedRunnable = () -> {
49
- synchronized (this ) {
51
+ synchronized (mRenderLock ) {
50
52
activityPaused ();
51
- notifyAll ();
53
+ mRenderLock . notifyAll ();
52
54
}
53
55
};
54
56
@@ -145,10 +147,10 @@ public boolean onGenericMotionEvent(MotionEvent aEvent) {
145
147
@ Override
146
148
protected void onPause () {
147
149
Log .d (LOGTAG , "PlatformActivity onPause" );
148
- synchronized (activityPausedRunnable ) {
150
+ synchronized (mRenderLock ) {
149
151
queueRunnable (activityPausedRunnable );
150
152
try {
151
- activityPausedRunnable .wait ();
153
+ mRenderLock .wait ();
152
154
} catch (InterruptedException e ) {
153
155
Log .e (LOGTAG , "activityPausedRunnable interrupted: " + e .toString ());
154
156
}
You can’t perform that action at this time.
0 commit comments