Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31814,6 +31814,7 @@ package android.net.wifi.aware { method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler); method public android.net.wifi.aware.Characteristics getCharacteristics(); method public boolean isAvailable(); method public boolean isDeviceAttached(); field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED"; field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0 field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1 wifi/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -655,6 +655,7 @@ package android.net.wifi.aware { method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler); method public android.net.wifi.aware.Characteristics getCharacteristics(); method public boolean isAvailable(); method public boolean isDeviceAttached(); field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED"; field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0 field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1 Loading wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ interface IWifiAwareManager // Aware API boolean isUsageEnabled(); Characteristics getCharacteristics(); boolean isDeviceAttached(); // client API void connect(in IBinder binder, in String callingPackage, in String callingFeatureId, Loading wifi/java/android/net/wifi/aware/WifiAwareManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,22 @@ public class WifiAwareManager { } } /** * Return the current status of the Aware service: whether ot not the device is already attached * to an Aware cluster. To attach to an Aware cluster, please use * {@link #attach(AttachCallback, Handler)} or * {@link #attach(AttachCallback, IdentityChangedListener, Handler)}. * @return A boolean indicating whether the device is attached to a cluster at this time (true) * or not (false). */ public boolean isDeviceAttached() { try { return mService.isDeviceAttached(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Returns the characteristics of the Wi-Fi Aware interface: a set of parameters which specify * limitations on configurations, e.g. the maximum service name length. Loading wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,15 @@ public class WifiAwareManagerTest { verify(mockAwareService).getCharacteristics(); } /** * Validate pass-through of isDeviceAttached() API. */ @Test public void testIsAttached() throws Exception { mDut.isDeviceAttached(); verify(mockAwareService).isDeviceAttached(); } /* * WifiAwareEventCallbackProxy Tests */ Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31814,6 +31814,7 @@ package android.net.wifi.aware { method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler); method public android.net.wifi.aware.Characteristics getCharacteristics(); method public boolean isAvailable(); method public boolean isDeviceAttached(); field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED"; field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0 field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1
wifi/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -655,6 +655,7 @@ package android.net.wifi.aware { method public void attach(@NonNull android.net.wifi.aware.AttachCallback, @NonNull android.net.wifi.aware.IdentityChangedListener, @Nullable android.os.Handler); method public android.net.wifi.aware.Characteristics getCharacteristics(); method public boolean isAvailable(); method public boolean isDeviceAttached(); field public static final String ACTION_WIFI_AWARE_STATE_CHANGED = "android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED"; field public static final int WIFI_AWARE_DATA_PATH_ROLE_INITIATOR = 0; // 0x0 field public static final int WIFI_AWARE_DATA_PATH_ROLE_RESPONDER = 1; // 0x1 Loading
wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ interface IWifiAwareManager // Aware API boolean isUsageEnabled(); Characteristics getCharacteristics(); boolean isDeviceAttached(); // client API void connect(in IBinder binder, in String callingPackage, in String callingFeatureId, Loading
wifi/java/android/net/wifi/aware/WifiAwareManager.java +16 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,22 @@ public class WifiAwareManager { } } /** * Return the current status of the Aware service: whether ot not the device is already attached * to an Aware cluster. To attach to an Aware cluster, please use * {@link #attach(AttachCallback, Handler)} or * {@link #attach(AttachCallback, IdentityChangedListener, Handler)}. * @return A boolean indicating whether the device is attached to a cluster at this time (true) * or not (false). */ public boolean isDeviceAttached() { try { return mService.isDeviceAttached(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Returns the characteristics of the Wi-Fi Aware interface: a set of parameters which specify * limitations on configurations, e.g. the maximum service name length. Loading
wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java +9 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,15 @@ public class WifiAwareManagerTest { verify(mockAwareService).getCharacteristics(); } /** * Validate pass-through of isDeviceAttached() API. */ @Test public void testIsAttached() throws Exception { mDut.isDeviceAttached(); verify(mockAwareService).isDeviceAttached(); } /* * WifiAwareEventCallbackProxy Tests */ Loading