@@ -49,14 +49,6 @@ static int convertVersionStringToInt(String versionString) {
4949 return instance .convertVersionStringToInt (versionString );
5050 }
5151
52- /**
53- * Gets the advertisingId if available
54- * @return
55- */
56- static String getAdvertisingId (Context context ) {
57- return instance .getAdvertisingId (context );
58- }
59-
6052 static void saveExpirableJsonObject (SharedPreferences preferences , String key , JSONObject object , long expirationInterval ) {
6153 instance .saveExpirableJsonObject (preferences , key , object , expirationInterval );
6254 }
@@ -145,25 +137,6 @@ int convertVersionStringToInt(String versionString) {
145137 return version ;
146138 }
147139
148- String getAdvertisingId (Context context ) {
149- String advertisingId = null ;
150- try {
151- Class adClass = Class .forName ("com.google.android.gms.ads.identifier.AdvertisingIdClient" );
152- if (adClass != null ) {
153- Object advertisingIdInfo = adClass .getMethod ("getAdvertisingIdInfo" , Context .class ).invoke (null , context );
154- if (advertisingIdInfo != null ) {
155- advertisingId = (String ) advertisingIdInfo .getClass ().getMethod ("getId" ).invoke (advertisingIdInfo );
156- }
157- }
158- } catch (ClassNotFoundException e ) {
159- IterableLogger .d (TAG , "ClassNotFoundException: Can't track ADID. " +
160- "Check that play-services-ads is added to the dependencies." , e );
161- } catch (Exception e ) {
162- IterableLogger .w (TAG , "Error while fetching advertising ID" , e );
163- }
164- return advertisingId ;
165- }
166-
167140 void saveExpirableJsonObject (SharedPreferences preferences , String key , JSONObject object , long expirationInterval ) {
168141 saveExpirableValue (preferences , key , object .toString (), expirationInterval );
169142 }
0 commit comments