Merge "[AWARE] Remove enableUsage/disableUsage API"
This commit is contained in:
@@ -34,8 +34,6 @@ import android.net.wifi.RttManager;
|
|||||||
interface IWifiAwareManager
|
interface IWifiAwareManager
|
||||||
{
|
{
|
||||||
// Aware API
|
// Aware API
|
||||||
void enableUsage();
|
|
||||||
void disableUsage();
|
|
||||||
boolean isUsageEnabled();
|
boolean isUsageEnabled();
|
||||||
Characteristics getCharacteristics();
|
Characteristics getCharacteristics();
|
||||||
|
|
||||||
|
|||||||
@@ -252,36 +252,6 @@ public class WifiAwareManager {
|
|||||||
mService = service;
|
mService = service;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable the usage of the Aware API. Doesn't actually turn on Aware cluster formation - that
|
|
||||||
* only happens when an attach is attempted. {@link #ACTION_WIFI_AWARE_STATE_CHANGED} broadcast
|
|
||||||
* will be triggered.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public void enableUsage() {
|
|
||||||
try {
|
|
||||||
mService.enableUsage();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
throw e.rethrowFromSystemServer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disable the usage of the Aware API. All attempts to attach() will be rejected. All open
|
|
||||||
* connections and sessions will be terminated. {@link #ACTION_WIFI_AWARE_STATE_CHANGED}
|
|
||||||
* broadcast will be triggered.
|
|
||||||
*
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public void disableUsage() {
|
|
||||||
try {
|
|
||||||
mService.disableUsage();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
throw e.rethrowFromSystemServer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current status of Aware API: whether or not Aware is available. To track
|
* Returns the current status of Aware API: whether or not Aware is available. To track
|
||||||
* changes in the state of Aware API register for the
|
* changes in the state of Aware API register for the
|
||||||
|
|||||||
@@ -99,26 +99,6 @@ public class WifiAwareManagerTest {
|
|||||||
* Straight pass-through tests
|
* Straight pass-through tests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate pass-through of enableUsage() API.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testEnableUsage() throws Exception {
|
|
||||||
mDut.enableUsage();
|
|
||||||
|
|
||||||
verify(mockAwareService).enableUsage();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Validate pass-through of disableUsage() API.
|
|
||||||
*/
|
|
||||||
@Test
|
|
||||||
public void testDisableUsage() throws Exception {
|
|
||||||
mDut.disableUsage();
|
|
||||||
|
|
||||||
verify(mockAwareService).disableUsage();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate pass-through of isUsageEnabled() API.
|
* Validate pass-through of isUsageEnabled() API.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user