Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.37.1 #588

Merged
merged 7 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Adjust/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ subprojects {
ext {
// Android config.
coreMinSdkVersion = 9
coreCompileSdkVersion = 33
coreTargetSdkVersion = 33
coreVersionName = '4.37.0'
coreCompileSdkVersion = 34
coreTargetSdkVersion = 34
coreVersionName = '4.37.1'
defaultVersionCode = 1
webbridgeMinSdkVersion = 17
samsungReferrerMinSdkVersion = 18
Expand All @@ -27,7 +27,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'com.android.tools.build:gradle:8.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files.
Expand Down
4 changes: 2 additions & 2 deletions Adjust/example-app-fbpixel/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 33
compileSdk 34

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 17
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/example-app-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdkVersion 33
compileSdk 34

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 14
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/example-app-keyboard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdkVersion 33
compileSdk 34

defaultConfig {
applicationId "com.adjust.examples.keyboard"
minSdkVersion 14
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
6 changes: 2 additions & 4 deletions Adjust/example-app-kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 33


compileSdk 34

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 14
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"

Expand Down
4 changes: 2 additions & 2 deletions Adjust/example-app-tv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ repositories {
}

android {
compileSdkVersion 33
compileSdk 34

defaultConfig {
applicationId "com.adjust.examples"
minSdkVersion 21
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
4 changes: 2 additions & 2 deletions Adjust/example-app-webbridge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 33
compileSdk 34

defaultConfig {
applicationId "com.example.examples"
minSdkVersion 17
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'maven-publish'
apply plugin: 'signing'

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion

publishing {
multipleVariants {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2593,6 +2593,7 @@ private void readAttributionI(Context context) {
}
}

@SuppressWarnings("unchecked")
private void readSessionCallbackParametersI(Context context) {
try {
sessionParameters.callbackParameters = Util.readObject(context,
Expand All @@ -2605,6 +2606,7 @@ private void readSessionCallbackParametersI(Context context) {
}
}

@SuppressWarnings("unchecked")
private void readSessionPartnerParametersI(Context context) {
try {
sessionParameters.partnerParameters = Util.readObject(context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
public class ActivityPackage implements Serializable {
private static final long serialVersionUID = -35935556512024097L;

@SuppressWarnings("unchecked")
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("path", String.class),
new ObjectStreamField("clientSdk", String.class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class ActivityState implements Serializable, Cloneable {
private static final long serialVersionUID = 9039439291143138148L;
private static final int ORDER_ID_MAXCOUNT = 10;
private transient ILogger logger;
@SuppressWarnings("unchecked")
private static final ObjectStreamField[] serialPersistentFields = {
new ObjectStreamField("uuid", String.class),
new ObjectStreamField("enabled", boolean.class),
Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Adjust.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private Adjust() {
*/
public static synchronized AdjustInstance getDefaultInstance() {
@SuppressWarnings("unused")
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.37.0";
String VERSION = "!SDK-VERSION-STRING!:com.adjust.sdk:adjust-android:4.37.1";

if (defaultInstance == null) {
defaultInstance = new AdjustInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface Constants {

String SCHEME = "https";
String AUTHORITY = "app.adjust.com";
String CLIENT_SDK = "android4.37.0";
String CLIENT_SDK = "android4.37.1";
String LOGTAG = "Adjust";
String REFTAG = "reftag";
String INSTALL_REFERRER = "install_referrer";
Expand Down
23 changes: 18 additions & 5 deletions Adjust/sdk-core/src/main/java/com/adjust/sdk/DeviceInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.content.pm.SigningInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
Expand Down Expand Up @@ -408,12 +408,24 @@ private String getClientSdk(String sdkPrefix) {
}
}

@SuppressWarnings("deprecation")
private String getFacebookAttributionId(final Context context) {
try {
@SuppressLint("PackageManagerGetSignatures")
Signature[] signatures = context.getPackageManager().getPackageInfo(
"com.facebook.katana",
PackageManager.GET_SIGNATURES).signatures;
Signature[] signatures = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
SigningInfo signingInfo = context.getPackageManager().getPackageInfo(
"com.facebook.katana",
PackageManager.GET_SIGNING_CERTIFICATES).signingInfo;
if (signingInfo != null) {
signatures = signingInfo.getApkContentsSigners();
}
} else {
signatures = context.getPackageManager().getPackageInfo(
"com.facebook.katana",
PackageManager.GET_SIGNATURES).signatures;
}

if (signatures == null || signatures.length != 1) {
// Unable to find the correct signatures for this APK
return null;
Expand Down Expand Up @@ -528,6 +540,7 @@ private static Boolean getFireTrackingEnabled(final ContentResolver contentResol
}
return null;
}
@SuppressWarnings("deprecation")
private static int getConnectivityType(final Context context, final ILogger logger) {
try {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
Expand All @@ -538,7 +551,7 @@ private static int getConnectivityType(final Context context, final ILogger logg

// for api 22 or lower, still need to get raw type
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
android.net.NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
return activeNetwork.getType();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ private void flushI() {
writePackageQueueI();
}

@SuppressWarnings("unchecked")
private void readPackageQueueI() {
try {
packageQueue = Util.readObject(context,
Expand Down
5 changes: 4 additions & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Reflection.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public static Object getAdvertisingInfoObject(Context context) throws Exception
return invokeStaticMethod("com.google.android.gms.ads.identifier.AdvertisingIdClient", "getAdvertisingIdInfo", new Class[]{Context.class}, context);
}

@SuppressWarnings("unchecked")
static Map<String, String> getImeiParameters(Context context, ILogger logger) {
Object nonPlayParameters = null;
try {
Expand All @@ -26,6 +27,7 @@ static Map<String, String> getImeiParameters(Context context, ILogger logger) {
return null;
}

@SuppressWarnings("unchecked")
static Map<String, String> getOaidParameters(Context context, ILogger logger) {
Object oaidParameters = null;
try {
Expand Down Expand Up @@ -140,9 +142,10 @@ public static Object createDefaultInstance(String className) {
return instance;
}

@SuppressWarnings("unchecked")
public static Object createDefaultInstance(Class classObject) {
try {
Object instance = classObject.newInstance();
Object instance = classObject.getDeclaredConstructor().newInstance();
return instance;
} catch (Throwable t) {
return null;
Expand Down
7 changes: 6 additions & 1 deletion Adjust/sdk-core/src/main/java/com/adjust/sdk/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ protected String doInBackground(Context... params) {

@Override
protected void onPostExecute(String playAdiId) {
onDeviceIdRead.onGoogleAdIdRead(playAdiId);
if (onDeviceIdRead != null) {
onDeviceIdRead.onGoogleAdIdRead(playAdiId);
}
}
}.execute(context);
}
Expand Down Expand Up @@ -281,6 +283,7 @@ public static String readStringField(ObjectInputStream.GetField fields, String n
return readObjectField(fields, name, defaultValue);
}

@SuppressWarnings("unchecked")
public static <T> T readObjectField(ObjectInputStream.GetField fields, String name, T defaultValue) {
try {
return (T) fields.get(name, defaultValue);
Expand Down Expand Up @@ -423,6 +426,7 @@ public static String[] getSupportedAbis() {
return null;
}

@SuppressWarnings("deprecation")
public static String getCpuAbi() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return Build.CPU_ABI;
Expand Down Expand Up @@ -508,6 +512,7 @@ public static Map<String, String> mergeParameters(Map<String, String> target,
return mergedParameters;
}

@SuppressWarnings("deprecation")
public static Locale getLocale(Configuration configuration) {
// Configuration.getLocales() added as of API 24.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Expand Down
4 changes: 2 additions & 2 deletions Adjust/sdk-plugin-criteo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion

publishing {
multipleVariants {
Expand All @@ -30,7 +30,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.37.0'
// implementation 'com.adjust.sdk:adjust-android:4.37.1'
}

// read local properties
Expand Down
4 changes: 2 additions & 2 deletions Adjust/sdk-plugin-imei/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion

publishing {
multipleVariants {
Expand All @@ -30,7 +30,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.37.0'
// implementation 'com.adjust.sdk:adjust-android:4.37.1'
}

// read local properties
Expand Down
4 changes: 2 additions & 2 deletions Adjust/sdk-plugin-oaid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion

publishing {
multipleVariants {
Expand All @@ -33,7 +33,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.37.0'
// implementation 'com.adjust.sdk:adjust-android:4.37.1'
implementation 'com.huawei.hms:ads-identifier:3.4.56.300'
}

Expand Down
2 changes: 1 addition & 1 deletion Adjust/sdk-plugin-samsung-referrer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.37.0'
// implementation 'com.adjust.sdk:adjust-android:4.37.1'

// Add Samsung referrer lib via Maven.
implementation 'store.galaxy.samsung.installreferrer:samsung_galaxystore_install_referrer:3.0.1'
Expand Down
4 changes: 2 additions & 2 deletions Adjust/sdk-plugin-sociomantic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion rootProject.ext.coreCompileSdkVersion
compileSdk rootProject.ext.coreCompileSdkVersion
publishing {
multipleVariants {
allVariants()
Expand All @@ -28,7 +28,7 @@ dependencies {
// Add SDK via module.
compileOnly project(':sdk-core')
// Add SDK via Maven.
// implementation 'com.adjust.sdk:adjust-android:4.37.0'
// implementation 'com.adjust.sdk:adjust-android:4.37.1'
}

// read local properties
Expand Down
Loading