API review fixes

- Remove the notion of channel from an application perspective
- Remove the use of DnsSd as part of API and add a protocol type to allow
future extensions
- Use the listener object as a handler for stop and unregister operations. Also,
we now allow multiple active discovery operations.
- Remove init/deinit operations in favour of setting up construction

Bug:6434844
Change-Id: Id15521d571aac9c4053d81184ad66dfc54f636de
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 64a05a8..4943c9a 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -387,7 +387,7 @@
                 public Object createService(ContextImpl ctx) {
                     IBinder b = ServiceManager.getService(NSD_SERVICE);
                     INsdManager service = INsdManager.Stub.asInterface(b);
-                    return new NsdManager(service);
+                    return new NsdManager(ctx.getOuterContext(), service);
                 }});
 
         // Note: this was previously cached in a static variable, but