You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/src/main/kotlin/io/homeassistant/companion/android/onboarding/serverdiscovery/HomeAssistantSearcher.kt
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,13 @@ internal class HomeAssistantSearcherImpl @Inject constructor(
160
160
if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
161
161
try {
162
162
nsdManager.stopServiceResolution(listener)
163
+
} catch (e:IllegalArgumentException) {
164
+
// On devices with T SDK extension < 22, NsdManager throws when the
165
+
// listener is already unregistered (which happens automatically after
166
+
// onServiceResolved/onResolveFailed fires). The call is still needed
167
+
// for devices where auto-unregistration is not guaranteed, so we keep
168
+
// it and just downgrade the expected case to a warning without a stack.
0 commit comments