Commit 7af9b970 by sikang

remove GAID

parent 9e8f733f
...@@ -125,12 +125,14 @@ dependencies { ...@@ -125,12 +125,14 @@ dependencies {
// api 'com.google.android.gms:play-services-auth-api-phone:15.0.1' // api 'com.google.android.gms:play-services-auth-api-phone:15.0.1'
// api 'com.google.android.gms:play-services-ads:15.0.1' // api 'com.google.android.gms:play-services-ads:15.0.1'
// api 'com.google.android.gms:play-services-analytics:17.0.0'
//facebook accountKit SDK //facebook accountKit SDK
api 'com.facebook.android:account-kit-sdk:5.+' api 'com.facebook.android:account-kit-sdk:5.+'
api 'com.google.android.gms:play-services-analytics:16.0.0'
//SDK-FACEBOOK-START //SDK-FACEBOOK-START
api 'com.facebook.android:facebook-android-sdk:[4,5)' api 'com.facebook.android:facebook-android-sdk:5.5.1'
//SDK-FACEBOOK-END //SDK-FACEBOOK-END
//AppsFlyer //AppsFlyer
......
...@@ -3,9 +3,6 @@ package tech.starwin.network; ...@@ -3,9 +3,6 @@ package tech.starwin.network;
import android.text.TextUtils; import android.text.TextUtils;
import com.google.android.gms.ads.identifier.AdvertisingIdClient;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import java.io.IOException; import java.io.IOException;
...@@ -72,7 +69,7 @@ class DefaultHeaderAddInterceptor implements Interceptor { ...@@ -72,7 +69,7 @@ class DefaultHeaderAddInterceptor implements Interceptor {
.header("thirdpartyDataFlag", String.valueOf(!TextUtils.isEmpty(LibConfig.TONGDUN_PARENT_KEY))) .header("thirdpartyDataFlag", String.valueOf(!TextUtils.isEmpty(LibConfig.TONGDUN_PARENT_KEY)))
// .header("X-APP-SIM-MOBILE", getSimInfo()) // .header("X-APP-SIM-MOBILE", getSimInfo())
.header("X-AF-ID", LibConfig.APPSFLYER_DEV_KEY == null ? "" : LibConfig.APPSFLYER_DEV_KEY) .header("X-AF-ID", LibConfig.APPSFLYER_DEV_KEY == null ? "" : LibConfig.APPSFLYER_DEV_KEY)
.header("X-GA-ID", getGAId()) // .header("X-GA-ID", getGAId())
.header("X-GP-PKG-FLAG", String.valueOf(!LibConfig.IS_COLLECT_MODE)) .header("X-GP-PKG-FLAG", String.valueOf(!LibConfig.IS_COLLECT_MODE))
.header("X-APP-CODE-VERSION", "ID_V2"); .header("X-APP-CODE-VERSION", "ID_V2");
...@@ -97,24 +94,24 @@ class DefaultHeaderAddInterceptor implements Interceptor { ...@@ -97,24 +94,24 @@ class DefaultHeaderAddInterceptor implements Interceptor {
// return SIM_INFO; // return SIM_INFO;
// } // }
private String getGAId() { // private String getGAId() {
if (!TextUtils.isEmpty(GA_ID)) { // if (!TextUtils.isEmpty(GA_ID)) {
return GA_ID; // return GA_ID;
} // }
AdvertisingIdClient.Info adInfo = null; // AdvertisingIdClient.Info adInfo = null;
try { // try {
adInfo = AdvertisingIdClient.getAdvertisingIdInfo(LibConfig.getContext()); // adInfo = AdvertisingIdClient.getAdvertisingIdInfo(LibConfig.getContext());
GA_ID = adInfo.getId(); // GA_ID = adInfo.getId();
} catch (IOException e) { // } catch (IOException e) {
// Unrecoverable error connecting to Google Play services (e.g., // // Unrecoverable error connecting to Google Play services (e.g.,
// the old version of the service doesn't support getting AdvertisingId). // // the old version of the service doesn't support getting AdvertisingId).
} catch (GooglePlayServicesNotAvailableException e) { // } catch (GooglePlayServicesNotAvailableException e) {
// Google Play services is not available entirely. // // Google Play services is not available entirely.
} catch (GooglePlayServicesRepairableException e) { // } catch (GooglePlayServicesRepairableException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
return GA_ID; // return GA_ID;
} // }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment