File tree Expand file tree Collapse file tree 3 files changed +6
-23
lines changed
Branch-SDK/src/main/java/io/branch/referral Expand file tree Collapse file tree 3 files changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -511,7 +511,7 @@ public void disableAdNetworkCallouts(boolean disabled) {
511511 */
512512 public static void expectDelayedSessionInitialization (boolean expectDelayedInit ) {
513513 disableAutoSessionInitialization = expectDelayedInit ;
514- if (expectDelayedInit && Branch .getInstance () != null ) {
514+ if (Branch .getInstance () != null && expectDelayedInit ) {
515515 Branch .getInstance ().branchConfigurationController_ .setDelayedSessionInitUsed (true );
516516 }
517517 }
Original file line number Diff line number Diff line change @@ -33,18 +33,6 @@ class BranchConfigurationController {
3333 return Branch .getInstance().prefHelper_.delayedSessionInitUsed
3434 }
3535
36- /* *
37- * Sets whether test mode is enabled.
38- * This flag is used to track if the app is running in test mode.
39- */
40- fun setTestModeEnabled (enabled : Boolean ) {
41- if (enabled) {
42- Branch .enableTestMode()
43- } else {
44- Branch .disableTestMode()
45- }
46- }
47-
4836 /* *
4937 * Gets whether test mode is enabled.
5038 *
@@ -71,14 +59,6 @@ class BranchConfigurationController {
7159 return Branch .getInstance().prefHelper_.getBool(" bnc_tracking_disabled" )
7260 }
7361
74- /* *
75- * Sets whether instant deep linking is enabled.
76- * This flag is used to track if the app has enabled instant deep linking.
77- */
78- fun setInstantDeepLinkingEnabled (enabled : Boolean ) {
79- Branch .getInstance().prefHelper_.setBool(" bnc_instant_deep_linking_enabled" , enabled)
80- }
81-
8262 /* *
8363 * Gets whether instant deep linking is enabled.
8464 *
Original file line number Diff line number Diff line change @@ -62,8 +62,11 @@ public void onPreExecute() {
6262 getPost ().put (Defines .Jsonkey .InstallBeginServerTimeStamp .getKey (), installReferrerServerTS );
6363 }
6464
65- JSONObject configurations = Branch .getInstance ().getConfigurationController ().serializeConfiguration ();
66- getPost ().put ("operational_metrics" , configurations );
65+ if (Branch .getInstance () != null ) {
66+ JSONObject configurations = Branch .getInstance ().getConfigurationController ().serializeConfiguration ();
67+ getPost ().put ("operational_metrics" , configurations );
68+ }
69+
6770 } catch (JSONException e ) {
6871 BranchLogger .w ("Caught JSONException " + e .getMessage ());
6972 }
You can’t perform that action at this time.
0 commit comments