private static void showExifInformation(IImage image, View d, Activity activity) {
    ExifInterface exif = getExif(image);
    if (exif == null) {
      hideExifInformation(d);
      return;
    }

    String value = exif.getAttribute(ExifInterface.TAG_MAKE);
    if (value != null) {
      setDetailsValue(d, value, R.id.details_make_value);
    } else {
      hideDetailsRow(d, R.id.details_make_row);
    }

    value = exif.getAttribute(ExifInterface.TAG_MODEL);
    if (value != null) {
      setDetailsValue(d, value, R.id.details_model_value);
    } else {
      hideDetailsRow(d, R.id.details_model_row);
    }

    value = getWhiteBalanceString(exif);
    if (value != null && !value.equals(EMPTY_STRING)) {
      setDetailsValue(d, value, R.id.details_whitebalance_value);
    } else {
      hideDetailsRow(d, R.id.details_whitebalance_row);
    }

    setLatLngDetails(d, activity, exif);
  }
 private static void hideExifInformation(View d) {
   hideDetailsRow(d, R.id.details_resolution_row);
   hideDetailsRow(d, R.id.details_make_row);
   hideDetailsRow(d, R.id.details_model_row);
   hideDetailsRow(d, R.id.details_whitebalance_row);
   hideDetailsRow(d, R.id.details_latitude_row);
   hideDetailsRow(d, R.id.details_longitude_row);
   hideDetailsRow(d, R.id.details_location_row);
 }
 public void onComplete(String location) {
   // View d is per-thread data, so when setDetailsValue is
   // executed by UI thread, it doesn't matter whether the
   // details dialog is dismissed or not.
   View view = mView.get();
   if (view == null) return;
   if (!location.equals(MenuHelper.EMPTY_STRING)) {
     MenuHelper.setDetailsValue(view, location, R.id.details_location_value);
   } else {
     MenuHelper.hideDetailsRow(view, R.id.details_location_row);
   }
 }
  private static void setLatLngDetails(final View d, Activity context, ExifInterface exif) {
    float[] latlng = new float[2];
    if (exif.getLatLong(latlng)) {
      setDetailsValue(d, String.valueOf(latlng[0]), R.id.details_latitude_value);
      setDetailsValue(d, String.valueOf(latlng[1]), R.id.details_longitude_value);

      if (latlng[0] == INVALID_LATLNG || latlng[1] == INVALID_LATLNG) {
        hideDetailsRow(d, R.id.details_latitude_row);
        hideDetailsRow(d, R.id.details_longitude_row);
        hideDetailsRow(d, R.id.details_location_row);
        return;
      }

      UpdateLocationCallback cb = new UpdateLocationCallback(new WeakReference<View>(d));
      Geocoder geocoder = new Geocoder(context);
      new ReverseGeocoderTask(geocoder, latlng, cb).execute();
    } else {
      hideDetailsRow(d, R.id.details_latitude_row);
      hideDetailsRow(d, R.id.details_longitude_row);
      hideDetailsRow(d, R.id.details_location_row);
    }
  }