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

Commit 39a7799

Browse files
authored
Fix loading from intents in noapi (#3009)
1 parent a6ae172 commit 39a7799

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

app/src/noapi/java/org/mozilla/vrbrowser/PlatformActivity.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)