Skip to content

Commit 87f75f4

Browse files
committed
Fixed race condition with OSInAppMessageController
* Added synchronized to OSInAppMessageController.getController() as this could result in more than once instace otherwise.
1 parent 2b46b6a commit 87f75f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OSInAppMessageController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class OSInAppMessageController implements OSDynamicTriggerControllerObserver, OS
7272
@Nullable
7373
private static OSInAppMessageController sharedInstance;
7474

75-
public static OSInAppMessageController getController() {
75+
public static synchronized OSInAppMessageController getController() {
7676
OneSignalDbHelper dbHelper = OneSignal.getDBHelperInstance();
7777

7878
// Make sure only Android 4.4 devices and higher can use IAMs

0 commit comments

Comments
 (0)