remove unnecessary switchUser call

If userId doesn't change, no need to do switchuser.or it will
introduce some tweak for gps modules in quick off/on because
they need cost time in off/on.

Change-Id: Ie5e408dc8be69c8a63a18bcb2cfe478cef4d70e6
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
NsdService does not clean up after exiting clients

When a client of the NsdService exits, NsdService should
clean up the requests it has sent to the mDNS daemon:
cancel any pending resource-discovery and resource-resolution
queries, and remove any services registered by this client.

If this isn't done, several bad things happen. The daemon will
continue to run unnecessarily, will report service discoveries
that can't be forwarded on to the client, and will continue to
advertise service ports for an application which is no longer
running until the device is rebooted (mDNS pollution).

Bug: 9801184
Change-Id: I0aa7311480322aefcff16f902fbbf34f50985d38
Merge "NsdService does not clean up after exiting clients"
Fix layoutlib build.

Was using private data structures from libcore.

Change-Id: I5bd43190081891659e18b5c871686e6078efcc81
Merge "Fix layoutlib build."
Merge "remove unnecessary switchUser call"
Move options buffers to top scope

It is important that the char buffers for options do
not go out of scope as the mOptions.add() does not copy
the buffer.  This moves all the buffers to the top
level scope of the function to prevent accidental
overwriting when they go out of scope.

Bug: 13448497
Change-Id: I5a97ddd32ff34f237915927906e1e1f833ff036e
Merge "Move options buffers to top scope"
Merge remote-tracking branch 'aosp/master'