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 1
1
package com .onesignal .sdktest .application ;
2
2
3
3
import android .annotation .SuppressLint ;
4
- import android .os .Handler ;
5
- import android .os .Looper ;
6
4
import android .os .StrictMode ;
7
5
import android .util .Log ;
8
6
import androidx .annotation .NonNull ;
@@ -63,17 +61,6 @@ public void onCreate() {
63
61
64
62
OneSignal .initWithContext (this , appId );
65
63
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
-
77
64
// Ensure calling requestPermission in a thread right after initWithContext does not crash
78
65
// This will reproduce result similar to Kotlin CouroutineScope.launch{}, which may potentially crash the app
79
66
ExecutorService executor = Executors .newSingleThreadExecutor ();
Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ package com.onesignal.common.modeling
2
2
3
3
import com.onesignal.common.events.EventProducer
4
4
import 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
8
5
import org.json.JSONArray
9
6
import org.json.JSONObject
10
7
import java.math.BigDecimal
@@ -84,11 +81,6 @@ open class Model(
84
81
fun initializeFromJson (jsonObject : JSONObject ) {
85
82
synchronized(data) {
86
83
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
- }
92
84
for (property in jsonObject.keys()) {
93
85
val jsonValue = jsonObject.get(property)
94
86
if (jsonValue is JSONObject ) {
You can’t perform that action at this time.
0 commit comments