Skip to content

Commit 6c07ba8

Browse files
committed
Add network service discovery broadcast
Allows apps to know if user has the feature turned off Change-Id: I2d2fecb148eb4e48eb4aea51d1d7643a82df5c52
1 parent 3ef889b commit 6c07ba8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/current.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12439,10 +12439,14 @@ package android.net.nsd {
1243912439
method public void resolveService(android.net.nsd.NsdManager.Channel, java.lang.String, java.lang.String, android.net.nsd.NsdManager.DnsSdResolveListener);
1244012440
method public void stopServiceDiscovery(android.net.nsd.NsdManager.Channel, android.net.nsd.NsdManager.ActionListener);
1244112441
method public void unregisterService(android.net.nsd.NsdManager.Channel, int, android.net.nsd.NsdManager.ActionListener);
12442+
field public static final java.lang.String ACTION_NSD_STATE_CHANGED = "android.net.nsd.STATE_CHANGED";
1244212443
field public static final int ALREADY_ACTIVE = 3; // 0x3
1244312444
field public static final int BUSY = 2; // 0x2
1244412445
field public static final int ERROR = 0; // 0x0
12446+
field public static final java.lang.String EXTRA_NSD_STATE = "nsd_state";
1244512447
field public static final int MAX_REGS_REACHED = 4; // 0x4
12448+
field public static final int NSD_STATE_DISABLED = 1; // 0x1
12449+
field public static final int NSD_STATE_ENABLED = 2; // 0x2
1244612450
field public static final int UNSUPPORTED = 1; // 0x1
1244712451
}
1244812452

core/java/android/net/nsd/NsdManager.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,9 @@ public class NsdManager {
141141
* information as int.
142142
*
143143
* @see #EXTRA_NSD_STATE
144-
* @hide
145144
*/
146145
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
147-
public static final String NSD_STATE_CHANGED_ACTION =
146+
public static final String ACTION_NSD_STATE_CHANGED =
148147
"android.net.nsd.STATE_CHANGED";
149148

150149
/**
@@ -153,23 +152,20 @@ public class NsdManager {
153152
*
154153
* @see #NSD_STATE_DISABLED
155154
* @see #NSD_STATE_ENABLED
156-
* @hide
157155
*/
158156
public static final String EXTRA_NSD_STATE = "nsd_state";
159157

160158
/**
161159
* Network service discovery is disabled
162160
*
163161
* @see #NSD_STATE_CHANGED_ACTION
164-
* @hide
165162
*/
166163
public static final int NSD_STATE_DISABLED = 1;
167164

168165
/**
169166
* Network service discovery is enabled
170167
*
171168
* @see #NSD_STATE_CHANGED_ACTION
172-
* @hide
173169
*/
174170
public static final int NSD_STATE_ENABLED = 2;
175171

0 commit comments

Comments
 (0)