File tree Expand file tree Collapse file tree 2 files changed +0
-21
lines changed
Examples/OneSignalDemo/app/src/main/java/com/onesignal/sdktest/application
OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/modeling Expand file tree Collapse file tree 2 files changed +0
-21
lines changed Original file line number Diff line number Diff line change 11package com .onesignal .sdktest .application ;
22
33import android .annotation .SuppressLint ;
4- import android .os .Handler ;
5- import android .os .Looper ;
64import android .os .StrictMode ;
75import android .util .Log ;
86import androidx .annotation .NonNull ;
@@ -63,17 +61,6 @@ public void onCreate() {
6361
6462 OneSignal .initWithContext (this , appId );
6563
66-
67- final Handler handler = new Handler (Looper .getMainLooper ());
68- handler .postDelayed (new Runnable () {
69- @ Override
70- public void run () {
71- // addTag after 100 ms to reliably accessing the operation model store AFTER the loading
72- OneSignal .getUser ().removeTag ("tag" );
73- OneSignal .getUser ().addTag ("tag" , "test" );
74- }
75- }, 100 );
76-
7764 // Ensure calling requestPermission in a thread right after initWithContext does not crash
7865 // This will reproduce result similar to Kotlin CouroutineScope.launch{}, which may potentially crash the app
7966 ExecutorService executor = Executors .newSingleThreadExecutor ();
Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ package com.onesignal.common.modeling
22
33import com.onesignal.common.events.EventProducer
44import com.onesignal.common.events.IEventNotifier
5- import com.onesignal.debug.LogLevel
6- import com.onesignal.debug.internal.logging.Logging
7- import com.onesignal.user.internal.operations.LoginUserOperation
85import org.json.JSONArray
96import org.json.JSONObject
107import java.math.BigDecimal
@@ -84,11 +81,6 @@ open class Model(
8481 fun initializeFromJson (jsonObject : JSONObject ) {
8582 synchronized(data) {
8683 data.clear()
87- if (this is LoginUserOperation ) {
88- // loading operationModelStore will get stuck for 15 seconds while locking data
89- Logging .log(LogLevel .DEBUG , " initializeFromJson LoginUserOperation" )
90- Thread .sleep(15000 )
91- }
9284 for (property in jsonObject.keys()) {
9385 val jsonValue = jsonObject.get(property)
9486 if (jsonValue is JSONObject ) {
You can’t perform that action at this time.
0 commit comments