Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f5e3d13 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "Fix an NPE in NsdManager"

parents 54d499f6 8ed09e89
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -417,7 +417,15 @@ public class NsdService extends INsdManager.Stub {
                int keyId = clientInfo.mClientIds.indexOfValue(id);
                if (keyId != -1) {
                    clientId = clientInfo.mClientIds.keyAt(keyId);
                } else {
                    // This can happen because of race conditions. For example,
                    // SERVICE_FOUND may race with STOP_SERVICE_DISCOVERY,
                    // and we may get in this situation.
                    Slog.d(TAG, "Notification for a listener that is no longer active: " + id);
                    handled = false;
                    return handled;
                }

                switch (code) {
                    case NativeResponseCode.SERVICE_FOUND:
                        /* NNN uniqueId serviceName regType domain */