Skip to content

Commit d937600

Browse files
authored
Merge pull request #521 from adjust/v4288
Version 2.28.8
2 parents 472529f + 855d504 commit d937600

File tree

23 files changed

+61
-37
lines changed

23 files changed

+61
-37
lines changed

Adjust/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ext {
99
coreMinSdkVersion = 9
1010
coreCompileSdkVersion = 31
1111
coreTargetSdkVersion = 31
12-
coreVersionName = '4.28.7'
12+
coreVersionName = '4.28.8'
1313
defaultVersionCode = 1
1414
webbridgeMinSdkVersion = 17
1515

Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private Adjust() {
3232
*/
3333
public static synchronized AdjustInstance getDefaultInstance() {
3434
@SuppressWarnings("unused")
35-
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.28.7";
35+
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.28.8";
3636

3737
if (defaultInstance == null) {
3838
defaultInstance = new AdjustInstance();
@@ -117,7 +117,7 @@ public static void appWillOpenUrl(Uri url) {
117117
*/
118118
public static void appWillOpenUrl(Uri url, Context context) {
119119
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
120-
adjustInstance.appWillOpenUrl(url, context);
120+
adjustInstance.appWillOpenUrl(url, extractApplicationContext(context));
121121
}
122122

123123
/**
@@ -128,7 +128,7 @@ public static void appWillOpenUrl(Uri url, Context context) {
128128
*/
129129
public static void setReferrer(String referrer, Context context) {
130130
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
131-
adjustInstance.sendReferrer(referrer, context);
131+
adjustInstance.sendReferrer(referrer, extractApplicationContext(context));
132132
}
133133

134134
/**
@@ -226,7 +226,7 @@ public static void setPushToken(String token) {
226226
*/
227227
public static void setPushToken(final String token, final Context context) {
228228
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
229-
adjustInstance.setPushToken(token, context);
229+
adjustInstance.setPushToken(token, extractApplicationContext(context));
230230
}
231231

232232
/**
@@ -236,7 +236,7 @@ public static void setPushToken(final String token, final Context context) {
236236
*/
237237
public static void gdprForgetMe(final Context context) {
238238
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
239-
adjustInstance.gdprForgetMe(context);
239+
adjustInstance.gdprForgetMe(extractApplicationContext(context));
240240
}
241241

242242
/**
@@ -246,7 +246,7 @@ public static void gdprForgetMe(final Context context) {
246246
*/
247247
public static void disableThirdPartySharing(final Context context) {
248248
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
249-
adjustInstance.disableThirdPartySharing(context);
249+
adjustInstance.disableThirdPartySharing(extractApplicationContext(context));
250250
}
251251

252252
public static void trackThirdPartySharing(
@@ -299,7 +299,12 @@ public static void trackPlayStoreSubscription(final AdjustPlayStoreSubscription
299299
* @param onDeviceIdRead Callback to get triggered once identifier is obtained
300300
*/
301301
public static void getGoogleAdId(Context context, OnDeviceIdsRead onDeviceIdRead) {
302-
Util.getGoogleAdId(context, onDeviceIdRead);
302+
Context appContext = null;
303+
if (context != null) {
304+
appContext = context.getApplicationContext();
305+
}
306+
307+
Util.getGoogleAdId(appContext, onDeviceIdRead);
303308
}
304309

305310
/**
@@ -309,7 +314,12 @@ public static void getGoogleAdId(Context context, OnDeviceIdsRead onDeviceIdRead
309314
* @return Amazon Advertising Identifier
310315
*/
311316
public static String getAmazonAdId(final Context context) {
312-
return Util.getFireAdvertisingId(context.getContentResolver());
317+
Context appContext = extractApplicationContext(context);
318+
if (appContext != null) {
319+
return Util.getFireAdvertisingId(appContext.getContentResolver());
320+
}
321+
322+
return null;
313323
}
314324

315325
/**
@@ -359,4 +369,12 @@ public static void setTestOptions(AdjustTestOptions testOptions) {
359369
AdjustInstance adjustInstance = Adjust.getDefaultInstance();
360370
adjustInstance.setTestOptions(testOptions);
361371
}
372+
373+
private static Context extractApplicationContext(final Context context) {
374+
if (context == null) {
375+
return null;
376+
}
377+
378+
return context.getApplicationContext();
379+
}
362380
}

Adjust/sdk-core/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

3030
String SCHEME = "https";
3131
String AUTHORITY = "app.adjust.com";
32-
String CLIENT_SDK = "android4.28.7";
32+
String CLIENT_SDK = "android4.28.8";
3333
String LOGTAG = "Adjust";
3434
String REFTAG = "reftag";
3535
String INSTALL_REFERRER = "install_referrer";

Adjust/sdk-plugin-criteo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies {
2525
// Add SDK via module.
2626
compileOnly project(':sdk-core')
2727
// Add SDK via Maven.
28-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
28+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2929
}
3030

3131
task adjustCriteoAndroidAar (type: Copy) {

Adjust/sdk-plugin-imei/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// Add SDK via module.
2525
compileOnly project(':sdk-core')
2626
// Add SDK via Maven.
27-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
27+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2828
}
2929

3030
task adjustImeiAndroidAar (type: Copy) {

Adjust/sdk-plugin-oaid/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// Add SDK via module.
2525
compileOnly project(':sdk-core')
2626
// Add SDK via Maven.
27-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
27+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2828
}
2929

3030
task adjustOaidAndroidAar (type: Copy) {

Adjust/sdk-plugin-sociomantic/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// Add SDK via module.
2525
compileOnly project(':sdk-core')
2626
// Add SDK via Maven.
27-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
27+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2828
}
2929

3030
task adjustSociomanticAndroidAar (type: Copy) {

Adjust/sdk-plugin-trademob/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// Add SDK via module.
2525
compileOnly project(':sdk-core')
2626
// Add SDK via Maven.
27-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
27+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2828
}
2929

3030
task adjustTrademobAndroidAar (type: Copy) {

Adjust/sdk-plugin-webbridge/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
// Add SDK via module.
2525
compileOnly project(':sdk-core')
2626
// Add SDK via Maven.
27-
// implementation 'com.adjust.sdk:adjust-android:4.28.7'
27+
// implementation 'com.adjust.sdk:adjust-android:4.28.8'
2828
}
2929

3030
task adjustWebBridgeAndroidAar (type: Copy) {

Adjust/sdk-plugin-webbridge/src/main/assets/adjust.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var Adjust = {
211211
if (this.adjustConfig) {
212212
return this.adjustConfig.getSdkPrefix();
213213
} else {
214-
return 'web-bridge4.28.7';
214+
return 'web-bridge4.28.8';
215215
}
216216
},
217217

0 commit comments

Comments
 (0)