From 4ef0ec0c63f290369b93bbf183cea5f5b278912d Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Mon, 1 Jul 2024 15:00:05 +0200 Subject: [PATCH 1/4] fix: changes to avoid accessing null callback object --- .../src/main/java/com/adjust/sdk/ActivityHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java index 486dab873..72ad1adb0 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java @@ -1549,14 +1549,15 @@ private void launchSdkClickResponseTasksI(SdkClickResponseData sdkClickResponseD if (!TextUtils.isEmpty(sdkClickResponseData.resolvedDeeplink)) { if (cachedDeeplinkResolutionCallback != null) { + OnDeeplinkResolvedListener onDeeplinkResolvedListener = cachedDeeplinkResolutionCallback; Runnable runnable = new Runnable() { @Override public void run() { - cachedDeeplinkResolutionCallback.onDeeplinkResolved(sdkClickResponseData.resolvedDeeplink); - cachedDeeplinkResolutionCallback = null; + onDeeplinkResolvedListener.onDeeplinkResolved(sdkClickResponseData.resolvedDeeplink); } }; handler.post(runnable); + cachedDeeplinkResolutionCallback = null; } } } From f6b90932d0cb9d917c000457eed999eb3a9ebc91 Mon Sep 17 00:00:00 2001 From: nonelse Date: Tue, 2 Jul 2024 11:35:24 +0200 Subject: [PATCH 2/4] Change order of null check --- .../src/main/java/com/adjust/sdk/ActivityHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java index 72ad1adb0..79ba99be8 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/ActivityHandler.java @@ -1548,8 +1548,9 @@ private void launchSdkClickResponseTasksI(SdkClickResponseData sdkClickResponseD } if (!TextUtils.isEmpty(sdkClickResponseData.resolvedDeeplink)) { - if (cachedDeeplinkResolutionCallback != null) { - OnDeeplinkResolvedListener onDeeplinkResolvedListener = cachedDeeplinkResolutionCallback; + OnDeeplinkResolvedListener onDeeplinkResolvedListener = cachedDeeplinkResolutionCallback; + cachedDeeplinkResolutionCallback = null; + if (onDeeplinkResolvedListener != null) { Runnable runnable = new Runnable() { @Override public void run() { @@ -1557,7 +1558,6 @@ public void run() { } }; handler.post(runnable); - cachedDeeplinkResolutionCallback = null; } } } From 95e4f71300838bcfa2bd429bc54f83d376666a34 Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Tue, 2 Jul 2024 13:31:30 +0200 Subject: [PATCH 3/4] feat: update version number to 4.38.5 --- Adjust/build.gradle | 2 +- Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java | 2 +- Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java | 2 +- Adjust/sdk-plugin-criteo/build.gradle | 2 +- Adjust/sdk-plugin-imei/build.gradle | 2 +- Adjust/sdk-plugin-oaid/build.gradle | 2 +- Adjust/sdk-plugin-samsung-clouddev/build.gradle | 2 +- Adjust/sdk-plugin-samsung-referrer/build.gradle | 2 +- Adjust/sdk-plugin-sociomantic/build.gradle | 2 +- Adjust/sdk-plugin-trademob/build.gradle | 2 +- Adjust/sdk-plugin-vivo-referrer/build.gradle | 2 +- Adjust/sdk-plugin-webbridge/build.gradle | 2 +- Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js | 2 +- Adjust/sdk-plugin-xiaomi-referrer/build.gradle | 2 +- .../androidTest/java/com/adjust/sdk/TestActivityPackage.java | 2 +- VERSION | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Adjust/build.gradle b/Adjust/build.gradle index 09f504660..e81755ce2 100644 --- a/Adjust/build.gradle +++ b/Adjust/build.gradle @@ -9,7 +9,7 @@ ext { coreMinSdkVersion = 9 coreCompileSdkVersion = 34 coreTargetSdkVersion = 34 - coreVersionName = '4.38.4' + coreVersionName = '4.38.5' defaultVersionCode = 1 webbridgeMinSdkVersion = 17 samsungReferrerMinSdkVersion = 18 diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java index 421595f4f..2df015494 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java @@ -34,7 +34,7 @@ private Adjust() { */ public static synchronized AdjustInstance getDefaultInstance() { @SuppressWarnings("unused") - String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.38.4"; + String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.38.5"; if (defaultInstance == null) { defaultInstance = new AdjustInstance(); diff --git a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java index f3ef952ed..9edad21fe 100644 --- a/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java +++ b/Adjust/sdk-core/src/main/java/com/adjust/sdk/Constants.java @@ -30,7 +30,7 @@ public interface Constants { String SCHEME = "https"; String AUTHORITY = "app.adjust.com"; - String CLIENT_SDK = "android4.38.4"; + String CLIENT_SDK = "android4.38.5"; String LOGTAG = "Adjust"; String REFTAG = "reftag"; String INSTALL_REFERRER = "install_referrer"; diff --git a/Adjust/sdk-plugin-criteo/build.gradle b/Adjust/sdk-plugin-criteo/build.gradle index 206b8159b..96e65fca8 100644 --- a/Adjust/sdk-plugin-criteo/build.gradle +++ b/Adjust/sdk-plugin-criteo/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-imei/build.gradle b/Adjust/sdk-plugin-imei/build.gradle index a6e5a9792..328af7e38 100644 --- a/Adjust/sdk-plugin-imei/build.gradle +++ b/Adjust/sdk-plugin-imei/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-oaid/build.gradle b/Adjust/sdk-plugin-oaid/build.gradle index 0d8e5e329..b24bc4e08 100644 --- a/Adjust/sdk-plugin-oaid/build.gradle +++ b/Adjust/sdk-plugin-oaid/build.gradle @@ -33,7 +33,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' implementation 'com.huawei.hms:ads-identifier:3.4.56.300' } diff --git a/Adjust/sdk-plugin-samsung-clouddev/build.gradle b/Adjust/sdk-plugin-samsung-clouddev/build.gradle index 09079fff5..addc30e9a 100644 --- a/Adjust/sdk-plugin-samsung-clouddev/build.gradle +++ b/Adjust/sdk-plugin-samsung-clouddev/build.gradle @@ -27,7 +27,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' // Add Samsung clouddev lib. compileOnly fileTree(include: ['*.aar'], dir: 'libs') diff --git a/Adjust/sdk-plugin-samsung-referrer/build.gradle b/Adjust/sdk-plugin-samsung-referrer/build.gradle index 71437f6e7..952dc66b2 100644 --- a/Adjust/sdk-plugin-samsung-referrer/build.gradle +++ b/Adjust/sdk-plugin-samsung-referrer/build.gradle @@ -27,7 +27,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' // Add Samsung referrer lib via Maven. implementation 'store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:3.0.1' diff --git a/Adjust/sdk-plugin-sociomantic/build.gradle b/Adjust/sdk-plugin-sociomantic/build.gradle index d9b8212f2..e7ed6a45b 100644 --- a/Adjust/sdk-plugin-sociomantic/build.gradle +++ b/Adjust/sdk-plugin-sociomantic/build.gradle @@ -28,7 +28,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-trademob/build.gradle b/Adjust/sdk-plugin-trademob/build.gradle index a557f5e1c..e8b223ec2 100644 --- a/Adjust/sdk-plugin-trademob/build.gradle +++ b/Adjust/sdk-plugin-trademob/build.gradle @@ -28,7 +28,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-vivo-referrer/build.gradle b/Adjust/sdk-plugin-vivo-referrer/build.gradle index df26ecfbf..ce1de2e67 100644 --- a/Adjust/sdk-plugin-vivo-referrer/build.gradle +++ b/Adjust/sdk-plugin-vivo-referrer/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-webbridge/build.gradle b/Adjust/sdk-plugin-webbridge/build.gradle index 32e03699d..7724169e5 100644 --- a/Adjust/sdk-plugin-webbridge/build.gradle +++ b/Adjust/sdk-plugin-webbridge/build.gradle @@ -30,7 +30,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' } // read local properties diff --git a/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js b/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js index 2cd8b3478..ca9c7ae4d 100644 --- a/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js +++ b/Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js @@ -211,7 +211,7 @@ var Adjust = { if (this.adjustConfig) { return this.adjustConfig.getSdkPrefix(); } else { - return 'web-bridge4.38.4'; + return 'web-bridge4.38.5'; } }, diff --git a/Adjust/sdk-plugin-xiaomi-referrer/build.gradle b/Adjust/sdk-plugin-xiaomi-referrer/build.gradle index ee9a24fc0..a3e925c03 100644 --- a/Adjust/sdk-plugin-xiaomi-referrer/build.gradle +++ b/Adjust/sdk-plugin-xiaomi-referrer/build.gradle @@ -31,7 +31,7 @@ dependencies { // Add SDK via module. compileOnly project(':sdk-core') // Add SDK via Maven. - // implementation 'com.adjust.sdk:adjust-android:4.38.4' + // implementation 'com.adjust.sdk:adjust-android:4.38.5' // Add xiaomi referrer lib via Maven. implementation 'com.miui.referrer:homereferrer:1.0.0.6' diff --git a/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java b/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java index 1149a2e10..349c547b5 100644 --- a/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java +++ b/Adjust/test-unit/src/androidTest/java/com/adjust/sdk/TestActivityPackage.java @@ -53,7 +53,7 @@ public TestActivityPackage(ActivityPackage activityPackage) { // default values appToken = "123456789012"; environment = "sandbox"; - clientSdk = "android4.38.4"; + clientSdk = "android4.38.5"; suffix = ""; attribution = new AdjustAttribution(); playServices = true; diff --git a/VERSION b/VERSION index 608c5ec8d..8f4005428 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.38.4 +4.38.5 From 3f8b3b6a05f623100fc43436b593820da7b3bd1b Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Tue, 2 Jul 2024 13:37:18 +0200 Subject: [PATCH 4/4] doc: update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e10e13f53..0827cfb8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +### Version 4.38.5 (2nd July 2024) +#### Fixed +- Fixed occasional crash while invoking deeplink resolution callback. + +--- + ### Version 4.38.4 (14th May 2024) #### Added - Added sending of the additional SDK observability parameters for debugging purposes.