Skip to content

Commit d3e1ee1

Browse files
Merge pull request #674 from BranchMetrics/revert-673-INTENG-4632/anr_exception
Revert "INTENG-4632 -- Fix ANR Exception"
2 parents 007da49 + 0f8c85a commit d3e1ee1

File tree

6 files changed

+19
-342
lines changed

6 files changed

+19
-342
lines changed

Branch-SDK/androidTest/io/branch/referral/BranchEventTest.java

Lines changed: 0 additions & 198 deletions
This file was deleted.

Branch-SDK/androidTest/io/branch/referral/BranchTest.java

Lines changed: 0 additions & 72 deletions
This file was deleted.

Branch-SDK/build.gradle

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ dependencies {
1515
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
1616
implementation 'com.android.installreferrer:installreferrer:1.0'
1717

18-
testImplementation 'junit:junit:4.12'
19-
androidTestImplementation 'com.android.support.test:runner:1.0.2'
20-
androidTestImplementation 'com.android.support.test:rules:1.0.2'
21-
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
22-
23-
// Unit tests with Google Ads
24-
androidTestImplementation 'com.google.android.gms:play-services-ads:16.0.0'
2518
}
2619

2720
android {
@@ -33,8 +26,6 @@ android {
3326
versionName project.VERSION_NAME
3427
versionCode Integer.parseInt(project.VERSION_CODE)
3528
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_MINIMUM)
36-
37-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3829
}
3930

4031
sourceSets {
@@ -46,12 +37,11 @@ android {
4637
renderscript.srcDirs = ['src']
4738
res.srcDirs = ['res']
4839
assets.srcDirs = ['assets']
49-
50-
androidTest {
51-
java.srcDirs = ['androidTest']
52-
}
5340
}
5441

42+
// Move the tests to tests/java, tests/res, etc...
43+
androidTest.setRoot('tests')
44+
5545
// Move the build types to build-types/<type>
5646
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
5747
// This moves them out of them default location under src/<type>/... which would

Branch-SDK/src/io/branch/referral/Branch.java

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -774,45 +774,7 @@ public static Branch getAutoTestInstance(@NonNull Context context, boolean isRef
774774
private static Branch initInstance(@NonNull Context context) {
775775
return new Branch(context.getApplicationContext());
776776
}
777-
778-
// Package Private
779-
// For Unit Testing, we need to reset the Branch state
780-
static void shutDown() {
781-
ServerRequestQueue.shutDown();
782-
783-
// BranchStrongMatchHelper.shutDown();
784-
// BranchViewHandler.shutDown();
785-
// DeepLinkRoutingValidator.shutDown();
786-
// DeviceInfo.shutDown();
787-
// InstallListener.shutDown();
788-
// InstantAppUtil.shutDown();
789-
// IntegrationValidator.shutDown();
790-
// PrefHelper.shutDown();
791-
// ShareLinkManager.shutDown();
792-
// UniversalResourceAnalyser.shutDown();
793-
794-
// Release these contexts immediately.
795-
if (branchReferral_ != null) {
796-
branchReferral_.context_ = null;
797-
branchReferral_.currentActivityReference_ = null;
798-
}
799-
800-
// Reset all of the statics.
801-
branchReferral_ = null;
802-
customReferrableSettings_ = CUSTOM_REFERRABLE_SETTINGS.USE_DEFAULT;
803-
bypassCurrentActivityIntentState_ = false;
804-
disableInstantDeepLinking = false;
805-
isActivityLifeCycleCallbackRegistered_ = false;
806-
isAutoSessionMode_ = false;
807-
808-
isLogging_ = null;
809-
isForcedSession_ = false;
810-
isSimulatingInstalls_ = false;
811-
812-
checkInstallReferrer_ = true;
813-
}
814-
815-
777+
816778
/**
817779
* <p>Manually sets the {@link Boolean} value, that indicates that the Branch API connection has
818780
* been initialised, to false - forcing re-initialisation.</p>

0 commit comments

Comments
 (0)