Class ShadowWifiAwareManager

java.lang.Object
org.robolectric.shadows.ShadowWifiAwareManager

@Implements(value=android.net.wifi.aware.WifiAwareManager.class, minSdk=26) public class ShadowWifiAwareManager extends Object
Shadow Implementation of WifiAwareManager
  • Constructor Details

    • ShadowWifiAwareManager

      public ShadowWifiAwareManager()
  • Method Details

    • isAvailable

      @Implementation protected boolean isAvailable()
    • attach

      @Implementation protected void attach(AttachCallback callback, Handler handler)
    • publish

      @Implementation protected void publish(int clientId, Looper looper, PublishConfig publishConfig, DiscoverySessionCallback callback)
    • subscribe

      @Implementation protected void subscribe(int clientId, Looper looper, SubscribeConfig subscribeConfig, DiscoverySessionCallback callback)
    • newPublishDiscoverySession

      public static PublishDiscoverySession newPublishDiscoverySession(WifiAwareManager manager, int clientId, int sessionId)
      Returns a new instance of PublishDiscoverySession.
    • newSubscribeDiscoverySession

      public static SubscribeDiscoverySession newSubscribeDiscoverySession(WifiAwareManager manager, int clientId, int sessionId)
      Returns a new instance of SubscribeDiscoverySession.
    • newWifiAwareSession

      public static WifiAwareSession newWifiAwareSession(WifiAwareManager manager, Binder binder, int clientId)
      Returns a new instance of WifiAwareSession.
    • setAvailable

      public void setAvailable(boolean available)
      Sets the availability of the wifiAwareManager.
    • setWifiAwareSession

      public void setWifiAwareSession(WifiAwareSession session)
      Sets parameter to pass to AttachCallback#onAttach(WifiAwareSession session)
    • setSessionDetached

      public void setSessionDetached(boolean sessionDetached)
      Sets the boolean value indicating if a wifiAwareSession has been detached.
    • setDiscoverySessionToPublish

      public void setDiscoverySessionToPublish(PublishDiscoverySession publishDiscoverySession)
      Sets parameter to pass to DiscoverySessionCallback#onPublishStarted(PublishDiscoverySession)
    • setDiscoverySessionToSubscribe

      public void setDiscoverySessionToSubscribe(SubscribeDiscoverySession subscribeDiscoverySession)
      Sets param to pass to DiscoverySessionCallback#onSubscribeStarted(SubscribeDiscoverySession)