public static boolean isGeoHeaderEnabledForUrl(Context context,String url,boolean isIncognito){
  if (isIncognito)   return false;
  if (!UrlUtilities.nativeIsGoogleSearchUrl(url))   return false;
  Uri uri=Uri.parse(url);
  if (!HTTPS_SCHEME.equals(uri.getScheme()))   return false;
  if (isLocationDisabledForUrl(uri))   return false;
  return true;
}

public static boolean isGeoHeaderEnabledForUrl ( Context context , String url , boolean isIncognito ) { if ( isIncognito ) return false ; if ( ! UrlUtilities . nativeIsGoogleSearchUrl ( url ) ) return false ; Uri uri = Uri . parse ( url ) ; if ( ! HTTPS_SCHEME . equals ( uri . getScheme ( ) ) ) return false ; if ( isLocationDisabledForUrl ( uri ) ) return false ; return true ; }
whether the geo header is allowed to be sent for the current url .
