Java 类com.google.android.gms.ads.identifier.AdvertisingIdClient 实例源码

项目:openlocate-android    文件:OpenLocate.java   
private void onFetchCurrentLocation(final Location location, final OpenLocateLocationCallback callback) {
    FetchAdvertisingInfoTask task = new FetchAdvertisingInfoTask(context, new FetchAdvertisingInfoTaskCallback() {
        @Override
        public void onAdvertisingInfoTaskExecute(AdvertisingIdClient.Info info) {

            callback.onLocationFetch(
                    OpenLocateLocation.from(
                            location,
                            info,
                            InformationFieldsFactory.collectInformationFields(context, configuration)
                    )
            );
        }
    });
    task.execute();
}
项目:openlocate-android    文件:LocationServiceHelper.java   
@SuppressWarnings("unchecked")
private void setValues(Intent intent) {


    endpoints = intent.getParcelableArrayListExtra(Constants.ENDPOINTS_KEY);

    advertisingInfo = new AdvertisingIdClient.Info(
            intent.getStringExtra(Constants.ADVERTISING_ID_KEY),
            intent.getBooleanExtra(Constants.LIMITED_AD_TRACKING_ENABLED_KEY, false)
    );

    setLocationRequestIntervalInSecs(intent);
    setTransmissionIntervalInSecs(intent);
    setLocationAccuracy(intent);
    setFieldsConfiguration(intent);
}
项目:Leanplum-Android-SDK    文件:Util.java   
/**
 * Retrieves the advertising ID. Requires Google Play Services. Note: This method must not run on
 * the main thread.
 */
private static DeviceIdInfo getAdvertisingId(Context caller) throws Exception {
  try {
    AdvertisingIdClient.Info info = AdvertisingIdClient.getAdvertisingIdInfo(caller);
    if (info != null) {
      String advertisingId = info.getId();
      String deviceId = checkDeviceId("advertising id", advertisingId);
      if (deviceId != null) {
        boolean limitedTracking = info.isLimitAdTrackingEnabled();
        return new DeviceIdInfo(deviceId, limitedTracking);
      }
    }
  } catch (Throwable t) {
    Log.e("Error getting advertising ID. Google Play Services are not available: ", t);
  }
  return null;
}
项目:aptoide-client    文件:Aptoide.java   
private void setAdvertisingIdClient() {
    new Thread(new Runnable() {
        @Override
        public void run() {
            String aaid = "";
            if (AptoideUtils.GoogleServices.checkGooglePlayServices(context)) {
                try {
                    aaid = AdvertisingIdClient.getAdvertisingIdInfo(Aptoide.this).getId();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                byte[] data = new byte[16];
                String deviceId = android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
                SecureRandom secureRandom = new SecureRandom();
                secureRandom.setSeed(deviceId.hashCode());
                secureRandom.nextBytes(data);
                aaid = UUID.nameUUIDFromBytes(data).toString();
            }

            AptoideUtils.getSharedPreferences().edit().putString("advertisingIdClient", aaid).apply();
        }
    }).start();
}
项目:fyber_mobile_offers    文件:AppGoogleAds.java   
@NonNull
private Observable<String> getAdIdFromGoogleObservable() {
    return Observable.create(new Observable.OnSubscribe<String>() {
        @Override
        public void call(Subscriber<? super String> subscriber) {
            try {
                subscriber.onNext(AdvertisingIdClient.getAdvertisingIdInfo(context).getId());
            } catch (Exception e) {
                Timber.e(e, "Error getting google Advertising ID!");

                String diskValue = valueManager.getAdId();
                if (null == diskValue || diskValue.isEmpty())
                    subscriber.onError(e);
                else
                    subscriber.onNext(diskValue);
            }
        }
    })
            .doOnNext(adId -> this.adId = adId)
            .doOnNext(adId -> valueManager.setAdId(adId))
            .subscribeOn(scheduler.backgroundThread())
            .observeOn(scheduler.mainThread());
}
项目:fyber_mobile_offers    文件:AppGoogleAds.java   
@NonNull
private Observable<Boolean> getAdIdEnabledFromGoogleObservable() {
    return Observable.create(new Observable.OnSubscribe<Boolean>() {
        @Override
        public void call(Subscriber<? super Boolean> subscriber) {
            try {
                subscriber.onNext(AdvertisingIdClient.getAdvertisingIdInfo(context).isLimitAdTrackingEnabled());
            } catch (Exception e) {
                Timber.e(e, "Error getting google Tracking Enabled!");

                Boolean diskValue = valueManager.getAdIdEnabled();
                if (null == diskValue)
                    subscriber.onError(e);
                else
                    subscriber.onNext(diskValue);
            }
        }
    })
            .doOnNext(adIdEnabled -> this.adIdEnabled = adIdEnabled)
            .doOnNext(adIdEnabled -> valueManager.setAdIdEnabled(adIdEnabled))
            .subscribeOn(scheduler.backgroundThread())
            .observeOn(scheduler.mainThread());
}
项目:FMTech    文件:zzr.java   
final Pair<String, Boolean> zzCw()
{
  checkOnWorkerThread();
  long l = getClock().elapsedRealtime();
  if ((this.zzbnx != null) && (l < this.zzbnz)) {
    return new Pair(this.zzbnx, Boolean.valueOf(this.zzbny));
  }
  this.zzbnz = (l + zzc.zzBG());
  AdvertisingIdClient.setShouldSkipGmsCoreVersionCheck(true);
  try
  {
    AdvertisingIdClient.Info localInfo = AdvertisingIdClient.getAdvertisingIdInfo(getContext());
    this.zzbnx = localInfo.zzpp;
    this.zzbny = localInfo.zzpq;
    AdvertisingIdClient.setShouldSkipGmsCoreVersionCheck(false);
    return new Pair(this.zzbnx, Boolean.valueOf(this.zzbny));
  }
  catch (Throwable localThrowable)
  {
    for (;;)
    {
      zzBh().zzbnd.zzm("Unable to get advertising id", localThrowable);
      this.zzbnx = "";
    }
  }
}
项目:info-dumper    文件:IdsDumper.java   
@Override
public LinkedHashMap<String, String> getDumpMap(Context context) throws DumpException {
    LinkedHashMap<String, String> dumps = new LinkedHashMap<>();

    dumps.put(Settings.Secure.ANDROID_ID, getAndroidId(context));
    dumps.put("UUID", getUUID());

    String adIdKey = "AdvertisingId";
    String adOptoutKey = "isAdOptout";
    AdvertisingIdClient.Info adInfo = getAdInfo(context);
    if (adInfo == null) {
        dumps.put(adIdKey, "Getting AdvertisingId need a android.permission.INTERNET");
        dumps.put(adOptoutKey, "Getting AdvertisingId need a android.permission.INTERNET");
    } else {
        dumps.put(adIdKey, adInfo.getId());
        dumps.put(adOptoutKey, Boolean.toString(adInfo.isLimitAdTrackingEnabled()));
    }

    return dumps;
}
项目:TweetyHunting    文件:TweetingActivity.java   
public void updateAdvertisingId() {

        new Thread(new Runnable() {
            @Override
            public void run() {
                AdvertisingIdClient.Info adInfo = null;
                try {
                    adInfo = AdvertisingIdClient.getAdvertisingIdInfo(TweetingActivity.this);

                } catch (IOException | GooglePlayServicesRepairableException | GooglePlayServicesNotAvailableException exception) {
                    // Unrecoverable error connecting to Google Play services (e.g.,
                    // the old version of the service doesn't support getting AdvertisingId).

                }
                if (adInfo != null) {
                    mAdversitingId = adInfo.getId();
                }
            }
        });
    }
项目:openlocate-android    文件:OpenLocateLocation.java   
OpenLocateLocation(
        Location location,
        AdvertisingIdClient.Info advertisingInfo, InformationFields informationFields) {
    this.location = new LocationInfo(location);
    this.advertisingInfo = advertisingInfo;
    this.informationFields = informationFields;
    this.created = new Date();
}
项目:openlocate-android    文件:OpenLocate.java   
void onPermissionsGranted() {

        FetchAdvertisingInfoTask task = new FetchAdvertisingInfoTask(context, new FetchAdvertisingInfoTaskCallback() {
            @Override
            public void onAdvertisingInfoTaskExecute(AdvertisingIdClient.Info info) {
                onFetchAdvertisingInfo(info);
            }
        });
        task.execute();
    }
项目:openlocate-android    文件:OpenLocate.java   
private void onFetchAdvertisingInfo(AdvertisingIdClient.Info info) {
    Intent intent = new Intent(context, LocationService.class);

    intent.putParcelableArrayListExtra(Constants.ENDPOINTS_KEY, endpoints);

    updateLocationConfigurationInfo(intent);
    updateFieldsConfigurationInfo(intent);

    if (info != null) {
        updateAdvertisingInfo(intent, info.getId(), info.isLimitAdTrackingEnabled());
    }

    context.startService(intent);
    setStartedPreferences();
}
项目:openlocate-android    文件:FetchAdvertisingInfoTask.java   
@Override
protected Void doInBackground(Void... params) {
    try {
        info = AdvertisingIdClient.getAdvertisingIdInfo(context);
    } catch (IOException
            | GooglePlayServicesNotAvailableException
            | GooglePlayServicesRepairableException e) {
        Log.e(TAG, e.getMessage());
    }

    return null;
}
项目:openlocate-android    文件:FetchAdvertisingInfoTaskTests.java   
@Test
public void testFetchAdvertisingInfoTask() {

    // Given
    final Object syncObject = new Object();

    FetchAdvertisingInfoTaskCallback callback = new FetchAdvertisingInfoTaskCallback() {
        @Override
        public void onAdvertisingInfoTaskExecute(AdvertisingIdClient.Info advertisingInfo) {
            assertNotNull(advertisingInfo);
            synchronized (syncObject) {
                syncObject.notify();
            }
        }
    };

    FetchAdvertisingInfoTask task = new FetchAdvertisingInfoTask(InstrumentationRegistry.getTargetContext(), callback);

    // When
    task.execute();

    // Then
    synchronized (syncObject) {
        try {
            syncObject.wait();
        } catch (InterruptedException e) {
            assertTrue(false);
        }
    }
}
项目:openlocate-android    文件:OpenLocateLocationTests.java   
@Test
public void testOpenLocateConstructor() {
    // Given
    double lat = 10.40;
    double lng = 10.234;
    double accuracy = 40.43;
    boolean adOptOut = true;
    String adId = "1234";

    Location location = new Location("");
    location.setLatitude(lat);
    location.setLongitude(lng);
    location.setAccuracy((float) accuracy);

    AdvertisingIdClient.Info info = new AdvertisingIdClient.Info(adId, adOptOut);

    OpenLocateLocation openLocateLocation = new OpenLocateLocation(location, info, null);

    // When
    JSONObject json = openLocateLocation.getJson();

    // Then
    assertNotNull(openLocateLocation);
    try {
        assertEquals(json.getDouble(OpenLocateLocation.Keys.LATITUDE), lat, 0.0d);
        assertEquals(json.getDouble(OpenLocateLocation.Keys.LONGITUDE), lng, 0.0d);
        assertEquals(json.getDouble(OpenLocateLocation.Keys.HORIZONTAL_ACCURACY), accuracy, 0.1);
        assertEquals(json.getBoolean(OpenLocateLocation.Keys.AD_OPT_OUT), adOptOut);
        assertEquals(json.getString(OpenLocateLocation.Keys.AD_ID), adId);
    } catch (JSONException e) {
        e.printStackTrace();
    }
}
项目:letv    文件:hb.java   
private Info n() {
    Info info = null;
    try {
        info = AdvertisingIdClient.getAdvertisingIdInfo(hn.a().c());
    } catch (Exception e) {
        ib.b(a, "GOOGLE PLAY SERVICES ERROR: " + e.getMessage());
        ib.b(a, "There is a problem with the Google Play Services library, which is required for Android Advertising ID support. The Google Play Services library should be integrated in any app shipping in the Play Store that uses analytics or advertising.");
    }
    return info;
}
项目:aptoide-client    文件:AptoideUtils.java   
private static String replaceAdvertisementId(String clickUrl, Context context) throws IOException, GooglePlayServicesNotAvailableException, GooglePlayServicesRepairableException {

            String aaId = "";
            if (GoogleServices.checkGooglePlayServices(context)) {
                if (AptoideUtils.getSharedPreferences().contains("advertisingIdClient")) {
                    aaId = AptoideUtils.getSharedPreferences().getString("advertisingIdClient", "");
                } else {
                    try {
                        aaId = AdvertisingIdClient.getAdvertisingIdInfo(context).getId();
                    } catch (Exception e) {
                        // In case we try to do this from a Broadcast Receiver, exception will be thrown.
                        Logger.w("AptoideUtils", e.getMessage());
                    }
                }
            } else {
                byte[] data = new byte[16];
                String deviceId = android.provider.Settings.Secure.getString(context.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
                SecureRandom secureRandom = new SecureRandom();
                secureRandom.setSeed(deviceId.hashCode());
                secureRandom.nextBytes(data);
                aaId = UUID.nameUUIDFromBytes(data).toString();
            }

            clickUrl = clickUrl.replace("[USER_AAID]", aaId);

            return clickUrl;
        }
项目:aptoide-client    文件:UpdatesService.java   
private String getAdvertisementId() {
    try {
        return AdvertisingIdClient.getAdvertisingIdInfo(Aptoide.getContext()).getId();
    } catch (IOException | GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
        Logger.printException(e);
    }
    return null;
}
项目:Popdeem-SDK-Android    文件:PDUniqueIdentifierUtils.java   
@Override
protected String doInBackground(Void... params) {
    try {
        AdvertisingIdClient.Info info = AdvertisingIdClient.getAdvertisingIdInfo(mContext);
        success = true;
        return info.getId();
    } catch (IOException | GooglePlayServicesNotAvailableException | GooglePlayServicesRepairableException e) {
        e.printStackTrace();
        success = false;
        return e.getMessage();
    }
}
项目:aptoide-client-v8    文件:IdsRepository.java   
@WorkerThread public synchronized String getGoogleAdvertisingId() {

    String googleAdvertisingId = sharedPreferences.getString(GOOGLE_ADVERTISING_ID_CLIENT, null);
    if (!TextUtils.isEmpty(googleAdvertisingId)) {
      return googleAdvertisingId;
    }

    if (AptoideUtils.ThreadU.isUiThread()) {
      throw new IllegalStateException("You cannot run this method from the main thread");
    }

    if (AdNetworkUtils.isGooglePlayServicesAvailable(context)) {
      try {
        googleAdvertisingId = AdvertisingIdClient.getAdvertisingIdInfo(context)
            .getId();
      } catch (Exception e) {
        CrashReport.getInstance()
            .log(e);
      }
    }

    sharedPreferences.edit()
        .putString(GOOGLE_ADVERTISING_ID_CLIENT, googleAdvertisingId)
        .apply();
    sharedPreferences.edit()
        .putBoolean(GOOGLE_ADVERTISING_ID_CLIENT_SET, true)
        .apply();

    return googleAdvertisingId;
  }
项目:androidnativeadslib    文件:DeviceInfo.java   
/**
 * Provides the <a href="https://support.google.com/googleplay/android-developer/answer/6048248?hl=en">Google Advertising Identifier (GAID)</a>
 * <strong>This method cannot be called in the main thread, as it might block the thread leading to ANRs.
 * An IllegalStateException will be thrown if this is called on the main thread.</strong>
 * @return user identifier as provided by Google Play Services
 */
public String getUserIdentifier() {
    String value = "unknown";
    try {
        String googleAdId = AdvertisingIdClient.getAdvertisingIdInfo(appContext).getId();
        if(googleAdId != null) {
            value = googleAdId;
        }
    }catch(Exception e) {
        Logger.debug(e);
    }
    return value;
}
项目:FMTech    文件:zzan.java   
private zza zzZ()
  throws IOException
{
  try
  {
    if (!zznX.await(2L, TimeUnit.SECONDS))
    {
      zza localzza1 = new zza(null, false);
      return localzza1;
    }
  }
  catch (InterruptedException localInterruptedException)
  {
    return new zza(null, false);
  }
  try
  {
    if (zznW == null)
    {
      zza localzza2 = new zza(null, false);
      return localzza2;
    }
  }
  finally {}
  AdvertisingIdClient.Info localInfo = zznW.getInfo();
  return new zza(zzk(localInfo.zzpp), localInfo.zzpq);
}
项目:QuizUpWinner    文件:g.java   
a f(Context paramContext)
{
  AdvertisingIdClient.Info localInfo;
  try
  {
    localInfo = AdvertisingIdClient.getAdvertisingIdInfo(paramContext);
  }
  catch (GooglePlayServicesRepairableException localGooglePlayServicesRepairableException)
  {
    throw new IOException(localGooglePlayServicesRepairableException);
  }
  String str1 = localInfo.getId();
  String str2 = str1;
  if ((str1 != null) && (str2.matches("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$")))
  {
    byte[] arrayOfByte = new byte[16];
    int i = 0;
    for (int j = 0; j < str2.length(); j += 2)
    {
      if ((j == 8) || (j == 13) || (j == 18) || (j == 23))
        j++;
      arrayOfByte[i] = ((byte)((Character.digit(str2.charAt(j), 16) << 4) + Character.digit(str2.charAt(j + 1), 16)));
      i++;
    }
    str2 = this.dw.a(arrayOfByte, true);
  }
  return new a(str2, localInfo.isLimitAdTrackingEnabled());
}
项目:growthbeat-android    文件:DeviceUtils.java   
public static Future<Boolean> getTrackingEnabled() {
    FutureTask<Boolean> future = new FutureTask<Boolean>(new Callable<Boolean>() {
        public Boolean call() throws Exception {
            try {
                Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(Growthbeat.getInstance().getContext());
                return !adInfo.isLimitAdTrackingEnabled();
            } catch (Throwable e) {
                return null;
            }
        }
    });
    Growthbeat.getInstance().getExecutor().execute(future);
    return future;
}
项目:growthbeat-android    文件:DeviceUtils.java   
public static Future<String> getAdvertisingId() {
    FutureTask<String> future = new FutureTask<String>(new Callable<String>() {
        public String call() throws Exception {
            try {
                Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(Growthbeat.getInstance().getContext());
                return adInfo.getId();
            } catch (Throwable e) {
                return null;
            }
        }
    });
    Growthbeat.getInstance().getExecutor().execute(future);
    return future;
}
项目:dailymotion-player-sdk-android    文件:AdIdTask.java   
@Override
protected String doInBackground(Void... voids) {
    String result = null;

    try {
        result = AdvertisingIdClient.getAdvertisingIdInfo(mContext).getId();
    } catch (Exception e) {
        Timber.e(e);
    }

    return result;
}
项目:openlocate-android    文件:OpenLocateLocation.java   
public AdvertisingIdClient.Info getAdvertisingInfo() {
    return advertisingInfo;
}
项目:openlocate-android    文件:OpenLocateLocation.java   
public void setAdvertisingInfo(AdvertisingIdClient.Info advertisingInfo) {
    this.advertisingInfo = advertisingInfo;
}
项目:openlocate-android    文件:OpenLocateLocation.java   
public static OpenLocateLocation from(Location location,
                                      AdvertisingIdClient.Info advertisingInfo, InformationFields informationFields) {
    return new OpenLocateLocation(location, advertisingInfo, informationFields);
}
项目:openlocate-android    文件:OpenLocateLocation.java   
OpenLocateLocation(Date created, String jsonString) {
    this.created = created;
    try {
        JSONObject json = new JSONObject(jsonString);

        location = new LocationInfo();
        location.setLatitude(json.getDouble(Keys.LATITUDE));
        location.setLongitude(json.getDouble(Keys.LONGITUDE));
        location.setHorizontalAccuracy(Float.parseFloat(json.getString(Keys.HORIZONTAL_ACCURACY)));
        location.setTimeStampSecs(json.getLong(Keys.TIMESTAMP));
        location.setAltitude(json.getDouble(Keys.ALTITUDE));
        location.setCourse(Float.parseFloat(json.getString(Keys.COURSE)));
        location.setSpeed(Float.parseFloat(json.getString(Keys.SPEED)));

        String deviceManufacturer = "";
        if (json.has(Keys.DEVICE_MANUFACTURER)) {
            deviceManufacturer = json.getString(Keys.DEVICE_MANUFACTURER);
        }


        String deviceModel = "";
        if (json.has(Keys.DEVICE_MODEL)) {
            deviceModel = json.getString(Keys.DEVICE_MODEL);
        }

        String chargingState = "";
        if (json.has(Keys.IS_CHARGING)) {
            chargingState = json.getString(Keys.IS_CHARGING);
        }

        String operatingSystem = "";
        if (json.has(Keys.OPERATING_SYSTEM)) {
            operatingSystem = json.getString(Keys.OPERATING_SYSTEM);
        }

        String carrierName = "";
        if (json.has(Keys.CARRIER_NAME)) {
            carrierName = json.getString(Keys.CARRIER_NAME);
        }

        String wifiSSID = "";
        if (json.has(Keys.WIFI_SSID)) {
            wifiSSID = json.getString(Keys.WIFI_SSID);
        }

        String wifiBSSID = "";
        if (json.has(Keys.WIFI_BSSID)) {
            wifiBSSID = json.getString(Keys.WIFI_BSSID);
        }

        String connectionType = "";
        if (json.has(Keys.CONNECTION_TYPE)) {
            connectionType = json.getString(Keys.CONNECTION_TYPE);
        }

        String locationMethod = "";
        if (json.has(Keys.LOCATION_METHOD)) {
            locationMethod = json.getString(Keys.LOCATION_METHOD);
        }

        String locationContext = "";
        if (json.has(Keys.LOCATION_CONTEXT)) {
            locationContext = json.getString(Keys.LOCATION_CONTEXT);
        }

        informationFields = InformationFieldsFactory.getInformationFields(deviceManufacturer, deviceModel, chargingState, operatingSystem, carrierName, wifiSSID, wifiBSSID, connectionType, locationMethod, locationContext);

        advertisingInfo = new AdvertisingIdClient.Info(
                json.getString(Keys.AD_ID),
                json.getBoolean(Keys.AD_OPT_OUT)
        );

    } catch (JSONException exception) {
        exception.printStackTrace();
    }
}
项目:openlocate-android    文件:LocationServiceHelper.java   
AdvertisingIdClient.Info getAdvertisingInfo() {
    return advertisingInfo;
}
项目:Komica    文件:KomicaAccountManager.java   
public KomicaAccountManager(Context context) {
    contextWeakReference = new WeakReference<Context>(context);
    myAccount = new MyAccount();
    sharedPreferences = PreferenceManager.getDefaultSharedPreferences(contextWeakReference.get());
    editor = sharedPreferences.edit();
    myAccount.setAdId(sharedPreferences.getString(KOMICA_ACCOUNT_AD_ID, null));
    myAccount.setFbId(sharedPreferences.getString(KOMICA_ACCOUNT_FB_ID, ""));
    myAccount.setUsername(sharedPreferences.getString(KOMICA_ACCOUNT_USERNAME, "Guest"));
    myAccount.setEmail(sharedPreferences.getString(KOMICA_ACCOUNT_EMAIL, ""));
    myAccount.setHeaderPic(sharedPreferences.getString(KOMICA_ACCOUNT_PHOTO, ""));
    myAccount.setCoverPic(sharedPreferences.getString(KOMICA_ACCOUNT_COVER, ""));

    noClearSharedPreferences = contextWeakReference.get().getSharedPreferences("NO_CLEAR", Context.MODE_PRIVATE);
    KomicaManager.getInstance().enableSwitchLogin(noClearSharedPreferences.getBoolean(PREFERENCE_SWITCH_LOGIN, false));

    handlerThread.start();
    handler = new Handler(handlerThread.getLooper()) {

        @Override
        public void handleMessage(Message msg) {
            try {
                String adId = AdvertisingIdClient.getAdvertisingIdInfo(contextWeakReference.get()).getId();
                adIdTmp = adId;
                if (null != myAccount) {
                    myAccount.setAdId(adId);
                }
                FirebaseManager.getInstance().updateUserPushData();
            } catch (NullPointerException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (GooglePlayServicesNotAvailableException e) {
                e.printStackTrace();
            } catch (GooglePlayServicesRepairableException e) {
                e.printStackTrace();
            } finally {
                handlerThread.quit();
                handlerThread.interrupt();
            }
        }
    };
    if (myAccount.getAdId() != null) {
        KLog.v(TAG, "Ad Id is not null.");
        handlerThread.quit();
        handlerThread.interrupt();
    } else {
        KLog.v(TAG, "Ad Id is null.");
        handler.sendEmptyMessage(0);
    }
}
项目:openlocate-android    文件:FetchAdvertisingInfoTaskCallback.java   
void onAdvertisingInfoTaskExecute(AdvertisingIdClient.Info advertisingInfo);