Skip to content

Commit

Permalink
[Android] Fix Commissionable Discover Issue (#25645)
Browse files Browse the repository at this point in the history
* Fix Commissionable Discover Issue

* Modify from comment

* Restyle
  • Loading branch information
joonhaengHeo authored and pull[bot] committed Jul 25, 2023
1 parent b16abf1 commit 997d96a
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ public void onResolveFailed(NsdServiceInfo serviceInfo, int errorCode) {
"Failed to resolve service '" + serviceInfo.getServiceName() + "': " + errorCode);
chipMdnsCallback.handleServiceResolve(
serviceInfo.getServiceName(),
serviceInfo.getServiceType(),
// Use the target service info since the resolved service info sometimes appends a
// "." at the front likely because it is trying to strip the service name out of it
// and something is missed.
// The target service info service type should be effectively the same as the
// resolved service info.
NsdServiceFinderAndResolver.this.targetServiceInfo.getServiceType(),
null,
null,
0,
Expand All @@ -157,11 +162,18 @@ public void onServiceResolved(NsdServiceInfo serviceInfo) {
"Resolved service '"
+ serviceInfo.getServiceName()
+ "' to "
+ serviceInfo.getHost());
+ serviceInfo.getHost()
+ ", type : "
+ serviceInfo.getServiceType());
// TODO: Find out if DNS-SD results for Android should contain interface ID
chipMdnsCallback.handleServiceResolve(
serviceInfo.getServiceName(),
serviceInfo.getServiceType(),
// Use the target service info since the resolved service info sometimes appends a
// "." at the front likely because it is trying to strip the service name out of it
// and something is missed.
// The target service info service type should be effectively the same as the
// resolved service info.
NsdServiceFinderAndResolver.this.targetServiceInfo.getServiceType(),
serviceInfo.getHost().getHostName(),
serviceInfo.getHost().getHostAddress(),
serviceInfo.getPort(),
Expand Down

0 comments on commit 997d96a

Please sign in to comment.