Skip to content

Commit 83d97da

Browse files
revert E2-9593 changes for background send
(cherry picked from commit cdc49be)
1 parent f8749d0 commit 83d97da

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

AndroidSDKCore/src/main/java/com/leanplum/internal/RequestOld.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -699,14 +699,7 @@ public void sendEventually() {
699699
if (!sent) {
700700
sent = true;
701701
Map<String, Object> args = createArgsDictionary();
702-
Util.executeAsyncTask(true, new AsyncTask<Void, Void, Void>() {
703-
@Override
704-
protected Void doInBackground(Void... params) {
705-
Map<String, Object> args = createArgsDictionary();
706-
saveRequestForLater(args);
707-
return null;
708-
}
709-
});
702+
saveRequestForLater(args);
710703
}
711704
Leanplum.countAggregator().incrementCount("send_eventually");
712705
}

AndroidSDKTests/src/test/java/com/leanplum/internal/RequestOldTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import com.leanplum.Leanplum;
2626
import com.leanplum.__setup.LeanplumTestApp;
27-
import com.leanplum._whitebox.utilities.SynchronousExecutor;
2827

2928
import junit.framework.TestCase;
3029

@@ -35,7 +34,6 @@
3534
import org.robolectric.RobolectricTestRunner;
3635
import org.robolectric.RuntimeEnvironment;
3736
import org.robolectric.annotation.Config;
38-
import org.robolectric.util.ReflectionHelpers;
3937

4038
import java.lang.reflect.InvocationTargetException;
4139
import java.lang.reflect.Method;
@@ -71,9 +69,6 @@ public void setUp() {
7169
Application context = RuntimeEnvironment.application;
7270
assertNotNull(context);
7371
Leanplum.setApplicationContext(context);
74-
75-
// Mock this so async things run synchronously
76-
ReflectionHelpers.setStaticField(Util.class, "singleThreadExecutor", new SynchronousExecutor());
7772
}
7873

7974
/** Test that request include a generated request id **/

0 commit comments

Comments
 (0)