Skip to content

Commit f1ffd1a

Browse files
SDK-1120 Fix getSdkVersionNumber in v/2 events, release new patch (5.0.7) (#898)
* fix * fix getSdkVersionNumber in v2 events too and bump up version code to 5.0.7
1 parent f88cd25 commit f1ffd1a

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ public void testPackageName() {
427427
@Test
428428
public void testSdkVersion() {
429429
Assert.assertNotNull(Branch.getSdkVersionNumber());
430-
Assert.assertEquals(BuildConfig.VERSION_NAME, Branch.getSdkVersionNumber());
430+
Assert.assertEquals(io.branch.referral.BuildConfig.VERSION_NAME, Branch.getSdkVersionNumber());
431431
}
432432

433433
private void getFBUrl(final FBUrl res) throws InterruptedException {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ public static byte[] encode(byte[] input, int offset, int len, int flags) {
534534
encoder.output = new byte[output_len];
535535
encoder.process(input, offset, len, true);
536536

537-
if (BuildConfig.DEBUG && (encoder.op != output_len))
537+
if (io.branch.referral.BuildConfig.DEBUG && (encoder.op != output_len))
538538
throw new AssertionError();
539539

540540
return encoder.output;
@@ -717,7 +717,7 @@ public boolean process(byte[] input, int offset, int len, boolean finish) {
717717
output[op++] = '\n';
718718
}
719719

720-
if (BuildConfig.DEBUG && (tailLen != 0 || p != len))
720+
if (io.branch.referral.BuildConfig.DEBUG && (tailLen != 0 || p != len))
721721
throw new AssertionError();
722722
} else {
723723
// Save the leftovers in tail to be consumed on the next

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import android.text.TextUtils;
2626
import android.view.View;
2727

28-
import io.branch.referral.BuildConfig;
29-
3028
import io.branch.referral.Defines.PreinstallKey;
3129
import io.branch.referral.ServerRequestGetLATD.BranchLastAttributedTouchDataListener;
3230
import org.json.JSONArray;
@@ -2929,7 +2927,7 @@ public static InitSessionBuilder sessionBuilder(Activity activity) {
29292927
* @return String value representing the current SDK version number (e.g. 4.3.2)
29302928
*/
29312929
public static String getSdkVersionNumber() {
2932-
return BuildConfig.VERSION_NAME;
2930+
return io.branch.referral.BuildConfig.VERSION_NAME;
29332931
}
29342932

29352933
//-------------------------- DEPRECATED --------------------------------------//

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import android.util.DisplayMetrics;
99
import android.webkit.WebSettings;
1010

11-
import com.google.firebase.BuildConfig;
12-
1311
import io.branch.referral.Defines.ModuleNameKeys;
1412
import org.json.JSONException;
1513
import org.json.JSONObject;
@@ -203,7 +201,7 @@ void updateRequestWithV2Params(ServerRequest serverRequest, PrefHelper prefHelpe
203201

204202
userDataObj.put(Defines.Jsonkey.AppVersion.getKey(), getAppVersion());
205203
userDataObj.put(Defines.Jsonkey.SDK.getKey(), "android");
206-
userDataObj.put(Defines.Jsonkey.SdkVersion.getKey(), BuildConfig.VERSION_NAME);
204+
userDataObj.put(Defines.Jsonkey.SdkVersion.getKey(), Branch.getSdkVersionNumber());
207205
userDataObj.put(Defines.Jsonkey.UserAgent.getKey(), getDefaultBrowserAgent(context_));
208206

209207
if (serverRequest instanceof ServerRequestGetLATD) {

Branch-SDK/src/main/java/io/branch/referral/network/BranchRemoteInterface.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import io.branch.referral.Branch;
1313
import io.branch.referral.BranchError;
14-
import io.branch.referral.BuildConfig;
1514
import io.branch.referral.Defines;
1615
import io.branch.referral.PrefHelper;
1716
import io.branch.referral.ServerResponse;

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Branch Android SDK change log
2+
- v5.0.7
3+
* _*Master Release*_ - March 1, 2020
4+
* Patch: fix getSdkVersionNumber() API in v2 events as well
5+
26
- v5.0.6
37
* _*Master Release*_ - February 26, 2020
48
* Add INITIATE_STREAM and COMPLETE_STREAM standard events

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
VERSION_NAME=5.0.6
2-
VERSION_CODE=050006
1+
VERSION_NAME=5.0.7
2+
VERSION_CODE=050007
33
GROUP=io.branch.sdk.android
44

55
POM_DESCRIPTION=Use the Branch SDK (branch.io) to create and power the links that point back to your apps for all of these things and more. Branch makes it incredibly simple to create powerful deep links that can pass data across app install and open while handling all edge cases (using on desktop vs. mobile vs. already having the app installed, etc). Best of all, it is really simple to start using the links for your own app: only 2 lines of code to register the deep link router and one more line of code to create the links with custom data.

0 commit comments

Comments
 (0)