public static String getUserAgent ( String serviceName , boolean allowTelemetry ) { String macAddress = "Not Collected" ; if ( allowTelemetry ) { macAddress = GetHashMac . getHashMac ( ) ; } return String . format ( serviceName + " MacAddressHash:%s" , macAddress ) ; }
Generate UserAgent string for given service .