From 416d6fba178a5d4745eeba910c2201725fd35d5e Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 16 Feb 2017 14:13:42 -0800 Subject: [AWARE] Remove enableUsage/disableUsage API The APIs (never public) were provided for indirect access to enable or disable Aware usage. No longer necessary. Bug: 35435032 Test: unit tests and integration (sl4a) tests Change-Id: Ia5c2b8aed8dd908f49b5e4f42a77feed3cda946c --- .../android/net/wifi/aware/IWifiAwareManager.aidl | 2 -- .../android/net/wifi/aware/WifiAwareManager.java | 30 ---------------------- .../net/wifi/aware/WifiAwareManagerTest.java | 20 --------------- 3 files changed, 52 deletions(-) diff --git a/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl b/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl index 794c142775f3..0f4910f0c29f 100644 --- a/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl +++ b/wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl @@ -34,8 +34,6 @@ import android.net.wifi.RttManager; interface IWifiAwareManager { // Aware API - void enableUsage(); - void disableUsage(); boolean isUsageEnabled(); Characteristics getCharacteristics(); diff --git a/wifi/java/android/net/wifi/aware/WifiAwareManager.java b/wifi/java/android/net/wifi/aware/WifiAwareManager.java index a9e38cef97e8..0eb6a3d157c3 100644 --- a/wifi/java/android/net/wifi/aware/WifiAwareManager.java +++ b/wifi/java/android/net/wifi/aware/WifiAwareManager.java @@ -252,36 +252,6 @@ public class WifiAwareManager { 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 * changes in the state of Aware API register for the diff --git a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java index a396d8775ab6..3e189ceb1f80 100644 --- a/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java +++ b/wifi/tests/src/android/net/wifi/aware/WifiAwareManagerTest.java @@ -99,26 +99,6 @@ public class WifiAwareManagerTest { * 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. */ -- cgit v1.2.3-59-g8ed1b