title: setResultCallback when registering Geofences is not triggered inside AsyncTask
body: <p>I am running a background job to re-register Geofences when they've expired. </p>
  
  <p>The code gets triggered fine. The notification is getting fired in <code>onPostExecute</code>, but the code inside the <code>setResultCallback</code> is never being accessed.</p>
  
  <p>How should I enable that callback so the <code>PlaceBuffer</code> object can be sent to the geofencing class, and therefore, get added and registered?</p>
  
  <pre><code> @Override
      public boolean onStartJob(final JobParameters job)
      {
          mBackgroundTask = new AsyncTask&lt;Object, Void, List&lt;String&gt;&gt;()
          {
              @Override
              protected List&lt;String&gt; doInBackground(Object... params)
              {
                  Context context = GeofenceRegistrationFirebaseJobService.this;
  
                  // get all places in the database
                  Uri uri = PlaceContract.PlaceEntry.CONTENT_URI;
                  Cursor cursor = context.getContentResolver().query(
                          uri,
                          null,
                          null,
                          null,
                          null);
  
                  if (cursor == null || cursor.getCount() == 0) return null;
  
                  List&lt;String&gt; placesIds = new ArrayList&lt;&gt;();
  
                  cursor.moveToPosition(-1);
                  while (cursor.moveToNext())
                  {
                      placesIds.add(cursor.getString(cursor
                              .getColumnIndex(PlaceContract.PlaceEntry.COLUMN_PLACE_ID)));
                  }
                  cursor.close();
                  return placesIds;
              }
  
              @Override
              protected void onPostExecute(List&lt;String&gt; placesIds)
              {
                  Context context = GeofenceRegistrationFirebaseJobService.this;
  
                  // Build up the LocationServices API client
                  googleApiClient= new GoogleApiClient.Builder(context)
                          .addApi(LocationServices.API)
                          .addApi(Places.GEO_DATA_API)
                          .build();
  
                  geofencing = new Geofencing(context, googleApiClient);
  
                  PendingResult&lt;PlaceBuffer&gt; placeResult =
                          Places.GeoDataApi.getPlaceById(googleApiClient,
                                  placesIds.toArray(new String[placesIds.size()]));
  
                  placeResult.setResultCallback(new ResultCallback&lt;PlaceBuffer&gt;()
                  {
                      @Override
                      public void onResult(@NonNull PlaceBuffer places)
                      {    
                          geofencing.addUpdateGeofences(places);
                          geofencing.registerAllGeofences();
                      }
                  });
  
  
  
                  // when the job is finished, issue a notification if is set in preferences
                  SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
                  // does user have notifications enabled?
                  boolean wantNotif =
                          pref.getBoolean(context
                                  .getString(R.string.pref_activate_notification_key), true);
                  if(wantNotif)
                  {
                      BackgroundTasks.executeTask(context,
                              BackgroundTasks.ACTION_NOTIFY_USER_GEOFENCES_REGISTERED);
                  }
  
  
  
                  jobFinished(job, false);
              }
          };
          mBackgroundTask.execute();
          return true; 
      }
  </code></pre>