Replace \032 in a service name with " "
Some implementations of mDNS on Android display a space as \\032 and some display it as \032 Attempt to convert both types to a " " before displaying it
This commit is contained in:
@@ -206,8 +206,13 @@ class ServiceInfoWrapper
|
||||
// If there is more than one service on the network, it will
|
||||
// have a number at the end, but will appear as the following:
|
||||
// "ProtectBabyMonitor\\032(number)
|
||||
// Replace \\032 with a ""
|
||||
return _info.getServiceName().replace("\\\\032", " ");
|
||||
// or
|
||||
// "ProtectBabyMonitor\032(number)
|
||||
// Replace \\032 and \032 with a " "
|
||||
String serviceName = _info.getServiceName();
|
||||
serviceName = serviceName.replace("\\\\032", " ");
|
||||
serviceName = serviceName.replace("\\032", " ");
|
||||
return serviceName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user