Skip to content

Commit 369b803

Browse files
authored
Merge pull request #321 from adjust/v4124
Version 4.12.4
2 parents 7ea52e0 + 3b89dce commit 369b803

File tree

19 files changed

+78
-22
lines changed

19 files changed

+78
-22
lines changed

Adjust/adjust/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.library'
22

33
def getVersionName() {
4-
return "4.12.3"
4+
return "4.12.4"
55
}
66

77
android {

Adjust/adjust/src/main/java/com/adjust/sdk/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public interface Constants {
2929
String BASE_URL = "https://app.adjust.com";
3030
String SCHEME = "https";
3131
String AUTHORITY = "app.adjust.com";
32-
String CLIENT_SDK = "android4.12.3";
32+
String CLIENT_SDK = "android4.12.4";
3333
String LOGTAG = "Adjust";
3434
String REFTAG = "reftag";
3535
String INSTALL_REFERRER = "install_referrer";

Adjust/adjust/src/main/java/com/adjust/sdk/EventResponseData.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.adjust.sdk;
22

3+
import org.json.JSONObject;
4+
35
/**
46
* Created by pfms on 09/02/16.
57
*/
@@ -19,7 +21,11 @@ public AdjustEventSuccess getSuccessResponseData() {
1921
successResponseData.message = message;
2022
successResponseData.timestamp = timestamp;
2123
successResponseData.adid = adid;
22-
successResponseData.jsonResponse = jsonResponse;
24+
if (jsonResponse != null) {
25+
successResponseData.jsonResponse = jsonResponse;
26+
} else {
27+
successResponseData.jsonResponse = new JSONObject();
28+
}
2329
successResponseData.eventToken = eventToken;
2430

2531
return successResponseData;
@@ -35,7 +41,11 @@ public AdjustEventFailure getFailureResponseData() {
3541
failureResponseData.timestamp = timestamp;
3642
failureResponseData.adid = adid;
3743
failureResponseData.willRetry = willRetry;
38-
failureResponseData.jsonResponse = jsonResponse;
44+
if (jsonResponse != null) {
45+
failureResponseData.jsonResponse = jsonResponse;
46+
} else {
47+
failureResponseData.jsonResponse = new JSONObject();
48+
}
3949
failureResponseData.eventToken = eventToken;
4050

4151
return failureResponseData;

Adjust/adjust/src/main/java/com/adjust/sdk/InstallReferrer.java

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,47 @@ private void startConnection(final Class listenerClass, final Object listenerPro
245245
* {@inheritDoc}
246246
*/
247247
@Override
248-
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
248+
public Object invoke(final Object proxy, final Method method, Object[] args)
249+
throws Throwable {
250+
if (method == null) {
251+
logger.error("InstallReferrer invoke method null");
252+
return null;
253+
}
249254
String methodName = method.getName();
255+
if (methodName == null) {
256+
logger.error("InstallReferrer invoke method name null");
257+
return null;
258+
}
250259
// Prints the method being invoked
251260
logger.debug("InstallReferrer invoke method name: %s", methodName);
261+
if (args == null) {
262+
logger.warn("InstallReferrer invoke args null");
263+
args = new Object[0];
264+
}
252265
for (Object arg : args) {
253266
logger.debug("InstallReferrer invoke arg: %s", arg);
254267
}
255268

256269
// if the method name equals some method's name then call your method
257270
if (methodName.equals("onInstallReferrerSetupFinished")) {
258-
onInstallReferrerSetupFinishedInt((Integer) args[0]);
271+
if (args.length != 1) {
272+
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished args lenght not 1: %d", args.length);
273+
return null;
274+
}
275+
276+
Object arg = args[0];
277+
if (!(arg instanceof Integer)) {
278+
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished arg not int");
279+
return null;
280+
}
281+
282+
Integer responseCode = (Integer) arg;
283+
if (responseCode == null) {
284+
logger.error("InstallReferrer invoke onInstallReferrerSetupFinished responseCode arg is null");
285+
return null;
286+
}
287+
288+
onInstallReferrerSetupFinishedInt(responseCode);
259289
} else if (methodName.equals("onInstallReferrerServiceDisconnected")) {
260290
logger.debug("InstallReferrer onInstallReferrerServiceDisconnected");
261291
}

Adjust/adjust/src/main/java/com/adjust/sdk/SessionResponseData.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.adjust.sdk;
22

3+
import org.json.JSONObject;
4+
35
/**
46
* Created by pfms on 09/02/16.
57
*/
@@ -13,7 +15,11 @@ public AdjustSessionSuccess getSuccessResponseData() {
1315
successResponseData.message = message;
1416
successResponseData.timestamp = timestamp;
1517
successResponseData.adid = adid;
16-
successResponseData.jsonResponse = jsonResponse;
18+
if (jsonResponse != null) {
19+
successResponseData.jsonResponse = jsonResponse;
20+
} else {
21+
successResponseData.jsonResponse = new JSONObject();
22+
}
1723

1824
return successResponseData;
1925
}
@@ -28,7 +34,11 @@ public AdjustSessionFailure getFailureResponseData() {
2834
failureResponseData.timestamp = timestamp;
2935
failureResponseData.adid = adid;
3036
failureResponseData.willRetry = willRetry;
31-
failureResponseData.jsonResponse = jsonResponse;
37+
if (jsonResponse != null) {
38+
failureResponseData.jsonResponse = jsonResponse;
39+
} else {
40+
failureResponseData.jsonResponse = new JSONObject();
41+
}
3242

3343
return failureResponseData;
3444
}

Adjust/example/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies {
2727
// running mvn package
2828
//compile fileTree(dir: '../target', include: ['*.jar'])
2929
// using maven repository
30-
//compile 'com.adjust.sdk:adjust-android:4.12.3'
30+
//compile 'com.adjust.sdk:adjust-android:4.12.4'
3131

3232
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
3333
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'

Adjust/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>adjust-android</artifactId>
77
<groupId>com.adjust.sdk</groupId>
8-
<version>4.12.3</version>
8+
<version>4.12.4</version>
99
<packaging>jar</packaging>
1010
<name>Adjust Android SDK</name>
1111
<url>https://github.com/adjust/android_sdk</url>

Adjust/pom_criteo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>adjust-android-criteo</artifactId>
77
<groupId>com.adjust.sdk</groupId>
8-
<version>4.12.3</version>
8+
<version>4.12.4</version>
99
<packaging>jar</packaging>
1010
<name>Adjust Android SDK</name>
1111
<url>https://github.com/adjust/android_sdk</url>

Adjust/pom_sociomantic.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>adjust-android-sociomantic</artifactId>
77
<groupId>com.adjust.sdk</groupId>
8-
<version>4.12.3</version>
8+
<version>4.12.4</version>
99
<packaging>jar</packaging>
1010
<name>Adjust Android SDK</name>
1111
<url>https://github.com/adjust/android_sdk</url>

Adjust/pom_trademob.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>adjust-android-trademob</artifactId>
77
<groupId>com.adjust.sdk</groupId>
8-
<version>4.12.3</version>
8+
<version>4.12.4</version>
99
<packaging>jar</packaging>
1010
<name>Adjust Android SDK</name>
1111
<url>https://github.com/adjust/android_sdk</url>

0 commit comments

Comments
 (0)