Loading wifi/java/android/net/wifi/IWifiManager.aidl +0 −3 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import android.net.wifi.WifiNetworkSuggestion; import android.os.Messenger; import android.os.ResultReceiver; import android.os.WorkSource; import android.os.connectivity.WifiActivityEnergyInfo; /** * Interface that allows controlling and querying Wi-Fi connectivity. Loading @@ -55,8 +54,6 @@ interface IWifiManager { long getSupportedFeatures(); WifiActivityEnergyInfo reportActivityInfo(); oneway void getWifiActivityEnergyInfoAsync(in IOnWifiActivityEnergyInfoListener listener); ParceledListSlice getConfiguredNetworks(String packageName, String featureId); Loading wifi/java/android/net/wifi/WifiManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -2378,25 +2378,6 @@ public class WifiManager { return isFeatureSupported(WIFI_FEATURE_AP_RAND_MAC); } /** * Return the record of {@link WifiActivityEnergyInfo} object that * has the activity and energy info. This can be used to ascertain what * the controller has been up to, since the last sample. * * @return a record with {@link WifiActivityEnergyInfo} or null if * report is unavailable or unsupported * @hide */ public WifiActivityEnergyInfo getControllerActivityEnergyInfo() { try { synchronized(this) { return mService.reportActivityInfo(); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Interface for Wi-Fi activity energy info listener. Should be implemented by applications and * set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}. Loading wifi/java/com/android/server/wifi/BaseWifiService.java +4 −1 Original line number Diff line number Diff line Loading @@ -76,11 +76,14 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override /** @deprecated use {@link #getWifiActivityEnergyInfoAsync} instead */ @Deprecated public WifiActivityEnergyInfo reportActivityInfo() { throw new UnsupportedOperationException(); } /** @deprecated use {@link #getWifiActivityEnergyInfoAsync} instead */ @Deprecated public void requestActivityInfo(ResultReceiver result) { throw new UnsupportedOperationException(); } Loading wifi/tests/src/android/net/wifi/WifiManagerTest.java +0 −12 Original line number Diff line number Diff line Loading @@ -1707,18 +1707,6 @@ public class WifiManagerTest { assertFalse(mWifiManager.isEnhancedPowerReportingSupported()); } /** * Test behavior of {@link WifiManager#getControllerActivityEnergyInfo()} */ @Test public void testGetControllerActivityEnergyInfo() throws Exception { WifiActivityEnergyInfo activityEnergyInfo = new WifiActivityEnergyInfo(5, 3, 3, 5, 5, 5); when(mWifiService.reportActivityInfo()).thenReturn(activityEnergyInfo); assertEquals(activityEnergyInfo, mWifiManager.getControllerActivityEnergyInfo()); } /** * Tests that passing a null Executor to {@link WifiManager#getWifiActivityEnergyInfoAsync} * throws an exception. Loading Loading
wifi/java/android/net/wifi/IWifiManager.aidl +0 −3 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import android.net.wifi.WifiNetworkSuggestion; import android.os.Messenger; import android.os.ResultReceiver; import android.os.WorkSource; import android.os.connectivity.WifiActivityEnergyInfo; /** * Interface that allows controlling and querying Wi-Fi connectivity. Loading @@ -55,8 +54,6 @@ interface IWifiManager { long getSupportedFeatures(); WifiActivityEnergyInfo reportActivityInfo(); oneway void getWifiActivityEnergyInfoAsync(in IOnWifiActivityEnergyInfoListener listener); ParceledListSlice getConfiguredNetworks(String packageName, String featureId); Loading
wifi/java/android/net/wifi/WifiManager.java +0 −19 Original line number Diff line number Diff line Loading @@ -2378,25 +2378,6 @@ public class WifiManager { return isFeatureSupported(WIFI_FEATURE_AP_RAND_MAC); } /** * Return the record of {@link WifiActivityEnergyInfo} object that * has the activity and energy info. This can be used to ascertain what * the controller has been up to, since the last sample. * * @return a record with {@link WifiActivityEnergyInfo} or null if * report is unavailable or unsupported * @hide */ public WifiActivityEnergyInfo getControllerActivityEnergyInfo() { try { synchronized(this) { return mService.reportActivityInfo(); } } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Interface for Wi-Fi activity energy info listener. Should be implemented by applications and * set when calling {@link WifiManager#getWifiActivityEnergyInfoAsync}. Loading
wifi/java/com/android/server/wifi/BaseWifiService.java +4 −1 Original line number Diff line number Diff line Loading @@ -76,11 +76,14 @@ public class BaseWifiService extends IWifiManager.Stub { throw new UnsupportedOperationException(); } @Override /** @deprecated use {@link #getWifiActivityEnergyInfoAsync} instead */ @Deprecated public WifiActivityEnergyInfo reportActivityInfo() { throw new UnsupportedOperationException(); } /** @deprecated use {@link #getWifiActivityEnergyInfoAsync} instead */ @Deprecated public void requestActivityInfo(ResultReceiver result) { throw new UnsupportedOperationException(); } Loading
wifi/tests/src/android/net/wifi/WifiManagerTest.java +0 −12 Original line number Diff line number Diff line Loading @@ -1707,18 +1707,6 @@ public class WifiManagerTest { assertFalse(mWifiManager.isEnhancedPowerReportingSupported()); } /** * Test behavior of {@link WifiManager#getControllerActivityEnergyInfo()} */ @Test public void testGetControllerActivityEnergyInfo() throws Exception { WifiActivityEnergyInfo activityEnergyInfo = new WifiActivityEnergyInfo(5, 3, 3, 5, 5, 5); when(mWifiService.reportActivityInfo()).thenReturn(activityEnergyInfo); assertEquals(activityEnergyInfo, mWifiManager.getControllerActivityEnergyInfo()); } /** * Tests that passing a null Executor to {@link WifiManager#getWifiActivityEnergyInfoAsync} * throws an exception. Loading