15 Commits

Author SHA1 Message Date
Vinit Deshapnde
8ed09e893f Fix an NPE in NsdManager
The NPE happens because NSD Manager doesn't always notify with a 'good'
notification for SERVICE_FOUND. It can get in a situation where a
SERVICE_FOUND is recevied from MDnsDs demon when processing StopDiscovery
on the messaging thread. When that happens, NsdService sends a message
to NsdManager with an invalid index of the listener.

The fix is twofold. First, we fix NsdService to not generate a message if
it doesn't have a good listener index. And second, we also fix NsdManager
to watch for invalid index.

Change-Id: I3d63af10bded13c72e8e437a1ebf74a666760432
2013-06-25 19:45:03 -07:00
Irfan Sheriff
88fe4ebc0b Merge "NsdService: Clear client info after resolution request is serviced." 2012-12-20 14:43:17 -08:00
Jeff Sharkey
625239a054 Migrate more Secure settings to Global.
Migrate networking, storage, battery, DropBox, and PackageManager
related Secure settings to Global table.

Bug: 7232014, 7231331, 7231198
Change-Id: I772c2a9586a2f708c9db95622477f235064b8f4d
2012-09-27 16:22:53 -07:00
Dianne Hackborn
5ac72a2959 Improve multi-user broadcasts.
You can now use ALL and CURRENT when sending broadcasts, to specify
where the broadcast goes.

Sticky broadcasts are now correctly separated per user, and registered
receivers are filtered based on the requested target user.

New Context APIs for more kinds of sending broadcasts as users.

Updating a bunch of system code that sends broadcasts to explicitly
specify which user the broadcast goes to.

Made a single version of the code for interpreting the requested
target user ID that all entries to activity manager (start activity,
send broadcast, start service) use.

Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
2012-08-30 14:33:22 -07:00
Vairavan Srinivasan
6727e7351e NsdService: Clear client info after resolution request is serviced.
Currently, the client requests tracked in mClientIds for resolution
requests isn't cleared at all and causes failues of additional registration
and discovery requests once the number of requests reaches MAX_LIMIT. In
addition, bubble up unhandled native events to default state of nsd state
machine.

Change-Id: Ief14e0fff644aa2698fcddd71f538820f802be58
2012-08-23 20:24:43 -07:00
Wink Saville
095c58b73a Enhance StateMachine Quitting and logging support. DO NOT MERGE
Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging
methods.

bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7

Conflicts:

	services/java/com/android/server/NsdService.java
2012-07-02 10:57:11 -07:00
Irfan Sheriff
a7590f32e0 resolved conflicts for merge of e7884dbb to master
Change-Id: Icb13c37491d3e9f0252198f98d8110740fa1f997
2012-06-05 09:49:24 -07:00
Irfan Sheriff
919aca5663 Add contentobserver for nsd_on setting
Bug: 6606274
Change-Id: I863b9e2a2446d697f3c9c49f24dcdc2b599f091e
2012-06-04 15:54:30 -07:00
Wink Saville
bbf30dfd76 Enhance StateMachine Quitting and logging support.
Make StateMachine#quit non-conditional and remove the need to
process the SM_QUIT_CMD it is now private.

Rename halting to onHalting.

Add onQuitting

Change the message specific logging to be more generic and change
the xxxProcessedMessagesYyy methods to xxxLogRecXyy names. Also add
addLogRec(String) and addLogRec(String, State) as the generic logging
methods.


bug: 5678189
Change-Id: I22f66d11828bfd70498db625fe1be728b90478b7
2012-05-29 12:40:46 -07:00
Irfan Sheriff
22af38c526 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
2012-05-09 11:48:42 -07:00
Irfan Sheriff
54ac7a5102 Fix build
Change-Id: I1968e0d7d25f613fa6cf72f82d79f17224e3d5ab
2012-04-19 10:26:34 -07:00
Irfan Sheriff
3ef889bf56 Add user control to turn on/off nsd
Change-Id: Ide3cc20adb21ac6dffaf6b9b9136d77a129afa3b
2012-04-19 09:52:09 -07:00
Irfan Sheriff
92784670c4 Open network service discovery API
Add support for DNS based network service discovery API. This
allows applications to discover and resolve applications on a
local network such as Wi-Fi

Change-Id: Ie89895edd35d12b7f7a23fb5fed36cb2b2079f7a
2012-04-15 17:09:48 -07:00
Irfan Sheriff
817388e056 Bonjour fixes
Change-Id: I1df1dc470bb42c84abc7e1a46bedf9f206910b65
2012-04-12 12:08:51 -07:00
Irfan Sheriff
7d024d3724 Add initial framework for DNS service discovery
Change-Id: I53c0b7ebfd75e520ebb7553612f1aa8413b6b79b
2012-04-04 12:24:56 -07:00