@Implements(value=android.net.wifi.aware.WifiAwareManager.class, minSdk=26) public class ShadowWifiAwareManager extends Object
WifiAwareManager
Constructor | Description |
---|---|
ShadowWifiAwareManager() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
attach(AttachCallback callback,
Handler handler) |
|
protected boolean |
isAvailable() |
|
static PublishDiscoverySession |
newPublishDiscoverySession(WifiAwareManager manager,
int clientId,
int sessionId) |
Returns a new instance of PublishDiscoverySession.
|
static SubscribeDiscoverySession |
newSubscribeDiscoverySession(WifiAwareManager manager,
int clientId,
int sessionId) |
Returns a new instance of SubscribeDiscoverySession.
|
static WifiAwareSession |
newWifiAwareSession(WifiAwareManager manager,
Binder binder,
int clientId) |
Returns a new instance of WifiAwareSession.
|
protected void |
publish(int clientId,
Looper looper,
PublishConfig publishConfig,
DiscoverySessionCallback callback) |
|
void |
setAvailable(boolean available) |
Sets the availability of the wifiAwareManager.
|
void |
setDiscoverySessionToPublish(PublishDiscoverySession publishDiscoverySession) |
Sets parameter to pass to DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)
|
void |
setDiscoverySessionToSubscribe(SubscribeDiscoverySession subscribeDiscoverySession) |
Sets param to pass to DiscoverySessionCallback#onSubscribeStarted(SubscribeDiscoverySession)
|
void |
setSessionDetached(boolean sessionDetached) |
Sets the boolean value indicating if a wifiAwareSession has been detached.
|
void |
setWifiAwareSession(WifiAwareSession session) |
Sets parameter to pass to AttachCallback#onAttach(WifiAwareSession session)
|
protected void |
subscribe(int clientId,
Looper looper,
SubscribeConfig subscribeConfig,
DiscoverySessionCallback callback) |
@Implementation protected boolean isAvailable()
@Implementation protected void attach(AttachCallback callback, Handler handler)
@Implementation protected void publish(int clientId, Looper looper, PublishConfig publishConfig, DiscoverySessionCallback callback)
@Implementation protected void subscribe(int clientId, Looper looper, SubscribeConfig subscribeConfig, DiscoverySessionCallback callback)
public static PublishDiscoverySession newPublishDiscoverySession(WifiAwareManager manager, int clientId, int sessionId)
public static SubscribeDiscoverySession newSubscribeDiscoverySession(WifiAwareManager manager, int clientId, int sessionId)
public static WifiAwareSession newWifiAwareSession(WifiAwareManager manager, Binder binder, int clientId)
public void setAvailable(boolean available)
public void setWifiAwareSession(WifiAwareSession session)
public void setSessionDetached(boolean sessionDetached)
public void setDiscoverySessionToPublish(PublishDiscoverySession publishDiscoverySession)
public void setDiscoverySessionToSubscribe(SubscribeDiscoverySession subscribeDiscoverySession)