Loading wifi/java/android/net/wifi/IWifiManager.aidl +18 −18 Original line number Diff line number Diff line Loading @@ -66,11 +66,11 @@ interface IWifiManager List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult); int addOrUpdateNetwork(in WifiConfiguration config, String packageName); int addOrUpdateNetwork(in WifiConfiguration config); boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config, String packageName); boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config); boolean removePasspointConfiguration(in String fqdn, String packageName); boolean removePasspointConfiguration(in String fqdn); List<PasspointConfiguration> getPasspointConfigurations(); Loading @@ -80,21 +80,21 @@ interface IWifiManager void deauthenticateNetwork(long holdoff, boolean ess); boolean removeNetwork(int netId, String packageName); boolean removeNetwork(int netId); boolean enableNetwork(int netId, boolean disableOthers, String packageName); boolean enableNetwork(int netId, boolean disableOthers); boolean disableNetwork(int netId, String packageName); boolean disableNetwork(int netId); void startScan(in ScanSettings requested, in WorkSource ws, String packageName); void startScan(in ScanSettings requested, in WorkSource ws, in String packageName); List<ScanResult> getScanResults(String callingPackage); void disconnect(String packageName); void disconnect(); void reconnect(String packageName); void reconnect(); void reassociate(String packageName); void reassociate(); WifiInfo getConnectionInfo(String callingPackage); Loading @@ -108,7 +108,7 @@ interface IWifiManager boolean isDualBandSupported(); boolean saveConfiguration(String packageName); boolean saveConfiguration(); DhcpInfo getDhcpInfo(); Loading @@ -134,9 +134,9 @@ interface IWifiManager boolean stopSoftAp(); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, String packageName); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, in String packageName); void stopLocalOnlyHotspot(String packageName); void stopLocalOnlyHotspot(); void startWatchLocalOnlyHotspot(in Messenger messenger, in IBinder binder); Loading @@ -146,9 +146,9 @@ interface IWifiManager WifiConfiguration getWifiApConfiguration(); void setWifiApConfiguration(in WifiConfiguration wifiConfig, String packageName); void setWifiApConfiguration(in WifiConfiguration wifiConfig); Messenger getWifiServiceMessenger(String packageName); Messenger getWifiServiceMessenger(); void enableTdls(String remoteIPAddress, boolean enable); Loading @@ -166,16 +166,16 @@ interface IWifiManager void setAllowScansWithTraffic(int enabled); int getAllowScansWithTraffic(); boolean setEnableAutoJoinWhenAssociated(boolean enabled, String packageName); boolean setEnableAutoJoinWhenAssociated(boolean enabled); boolean getEnableAutoJoinWhenAssociated(); void enableWifiConnectivityManager(boolean enabled); WifiConnectionStatistics getConnectionStatistics(); void disableEphemeralNetwork(String SSID, String packageName); void disableEphemeralNetwork(String SSID); void factoryReset(String packageName); void factoryReset(); Network getCurrentNetwork(); Loading wifi/java/android/net/wifi/WifiManager.java +16 −16 Original line number Diff line number Diff line Loading @@ -1128,7 +1128,7 @@ public class WifiManager { */ private int addOrUpdateNetwork(WifiConfiguration config) { try { return mService.addOrUpdateNetwork(config, mContext.getOpPackageName()); return mService.addOrUpdateNetwork(config); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1149,7 +1149,7 @@ public class WifiManager { */ public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) { try { if (!mService.addOrUpdatePasspointConfiguration(config, mContext.getOpPackageName())) { if (!mService.addOrUpdatePasspointConfiguration(config)) { throw new IllegalArgumentException(); } } catch (RemoteException e) { Loading @@ -1166,7 +1166,7 @@ public class WifiManager { */ public void removePasspointConfiguration(String fqdn) { try { if (!mService.removePasspointConfiguration(fqdn, mContext.getOpPackageName())) { if (!mService.removePasspointConfiguration(fqdn)) { throw new IllegalArgumentException(); } } catch (RemoteException e) { Loading Loading @@ -1252,7 +1252,7 @@ public class WifiManager { */ public boolean removeNetwork(int netId) { try { return mService.removeNetwork(netId, mContext.getOpPackageName()); return mService.removeNetwork(netId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -1298,7 +1298,7 @@ public class WifiManager { boolean success; try { success = mService.enableNetwork(netId, attemptConnect, mContext.getOpPackageName()); success = mService.enableNetwork(netId, attemptConnect); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1324,7 +1324,7 @@ public class WifiManager { */ public boolean disableNetwork(int netId) { try { return mService.disableNetwork(netId, mContext.getOpPackageName()); return mService.disableNetwork(netId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1337,7 +1337,7 @@ public class WifiManager { */ public boolean disconnect() { try { mService.disconnect(mContext.getOpPackageName()); mService.disconnect(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading @@ -1352,7 +1352,7 @@ public class WifiManager { */ public boolean reconnect() { try { mService.reconnect(mContext.getOpPackageName()); mService.reconnect(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading @@ -1367,7 +1367,7 @@ public class WifiManager { */ public boolean reassociate() { try { mService.reassociate(mContext.getOpPackageName()); mService.reassociate(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -1740,7 +1740,7 @@ public class WifiManager { @Deprecated public boolean saveConfiguration() { try { return mService.saveConfiguration(mContext.getOpPackageName()); return mService.saveConfiguration(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2056,7 +2056,7 @@ public class WifiManager { } mLOHSCallbackProxy = null; try { mService.stopLocalOnlyHotspot(mContext.getOpPackageName()); mService.stopLocalOnlyHotspot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2175,7 +2175,7 @@ public class WifiManager { @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) { try { mService.setWifiApConfiguration(wifiConfig, mContext.getOpPackageName()); mService.setWifiApConfiguration(wifiConfig); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -2947,7 +2947,7 @@ public class WifiManager { public void disableEphemeralNetwork(String SSID) { if (SSID == null) throw new IllegalArgumentException("SSID cannot be null"); try { mService.disableEphemeralNetwork(SSID, mContext.getOpPackageName()); mService.disableEphemeralNetwork(SSID); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2986,7 +2986,7 @@ public class WifiManager { */ public Messenger getWifiServiceMessenger() { try { return mService.getWifiServiceMessenger(mContext.getOpPackageName()); return mService.getWifiServiceMessenger(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -3516,7 +3516,7 @@ public class WifiManager { */ public void factoryReset() { try { mService.factoryReset(mContext.getOpPackageName()); mService.factoryReset(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -3543,7 +3543,7 @@ public class WifiManager { */ public boolean setEnableAutoJoinWhenAssociated(boolean enabled) { try { return mService.setEnableAutoJoinWhenAssociated(enabled, mContext.getOpPackageName()); return mService.setEnableAutoJoinWhenAssociated(enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading wifi/tests/src/android/net/wifi/WifiManagerTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class WifiManagerTest { assertEquals(mApConfig, callback.mRes.getWifiConfiguration()); callback.mRes.close(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading @@ -157,7 +157,7 @@ public class WifiManagerTest { assertEquals(mApConfig, res.getWifiConfiguration()); } verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading Loading @@ -548,7 +548,7 @@ public class WifiManagerTest { anyString())).thenReturn(REQUEST_REGISTERED); mWifiManager.startLocalOnlyHotspot(callback, mHandler); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading @@ -570,7 +570,7 @@ public class WifiManagerTest { anyString())).thenReturn(REQUEST_REGISTERED); mWifiManager.startLocalOnlyHotspot(callback, mHandler); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); mLooper.dispatchAll(); assertEquals(ERROR_NOT_SET, callback.mFailureReason); assertFalse(callback.mOnStartedCalled); Loading @@ -594,7 +594,7 @@ public class WifiManagerTest { assertFalse(callback.mOnStoppedCalled); assertEquals(null, callback.mRes); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService, never()).stopLocalOnlyHotspot(anyString()); verify(mWifiService, never()).stopLocalOnlyHotspot(); } /** Loading Loading
wifi/java/android/net/wifi/IWifiManager.aidl +18 −18 Original line number Diff line number Diff line Loading @@ -66,11 +66,11 @@ interface IWifiManager List<OsuProvider> getMatchingOsuProviders(in ScanResult scanResult); int addOrUpdateNetwork(in WifiConfiguration config, String packageName); int addOrUpdateNetwork(in WifiConfiguration config); boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config, String packageName); boolean addOrUpdatePasspointConfiguration(in PasspointConfiguration config); boolean removePasspointConfiguration(in String fqdn, String packageName); boolean removePasspointConfiguration(in String fqdn); List<PasspointConfiguration> getPasspointConfigurations(); Loading @@ -80,21 +80,21 @@ interface IWifiManager void deauthenticateNetwork(long holdoff, boolean ess); boolean removeNetwork(int netId, String packageName); boolean removeNetwork(int netId); boolean enableNetwork(int netId, boolean disableOthers, String packageName); boolean enableNetwork(int netId, boolean disableOthers); boolean disableNetwork(int netId, String packageName); boolean disableNetwork(int netId); void startScan(in ScanSettings requested, in WorkSource ws, String packageName); void startScan(in ScanSettings requested, in WorkSource ws, in String packageName); List<ScanResult> getScanResults(String callingPackage); void disconnect(String packageName); void disconnect(); void reconnect(String packageName); void reconnect(); void reassociate(String packageName); void reassociate(); WifiInfo getConnectionInfo(String callingPackage); Loading @@ -108,7 +108,7 @@ interface IWifiManager boolean isDualBandSupported(); boolean saveConfiguration(String packageName); boolean saveConfiguration(); DhcpInfo getDhcpInfo(); Loading @@ -134,9 +134,9 @@ interface IWifiManager boolean stopSoftAp(); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, String packageName); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder, in String packageName); void stopLocalOnlyHotspot(String packageName); void stopLocalOnlyHotspot(); void startWatchLocalOnlyHotspot(in Messenger messenger, in IBinder binder); Loading @@ -146,9 +146,9 @@ interface IWifiManager WifiConfiguration getWifiApConfiguration(); void setWifiApConfiguration(in WifiConfiguration wifiConfig, String packageName); void setWifiApConfiguration(in WifiConfiguration wifiConfig); Messenger getWifiServiceMessenger(String packageName); Messenger getWifiServiceMessenger(); void enableTdls(String remoteIPAddress, boolean enable); Loading @@ -166,16 +166,16 @@ interface IWifiManager void setAllowScansWithTraffic(int enabled); int getAllowScansWithTraffic(); boolean setEnableAutoJoinWhenAssociated(boolean enabled, String packageName); boolean setEnableAutoJoinWhenAssociated(boolean enabled); boolean getEnableAutoJoinWhenAssociated(); void enableWifiConnectivityManager(boolean enabled); WifiConnectionStatistics getConnectionStatistics(); void disableEphemeralNetwork(String SSID, String packageName); void disableEphemeralNetwork(String SSID); void factoryReset(String packageName); void factoryReset(); Network getCurrentNetwork(); Loading
wifi/java/android/net/wifi/WifiManager.java +16 −16 Original line number Diff line number Diff line Loading @@ -1128,7 +1128,7 @@ public class WifiManager { */ private int addOrUpdateNetwork(WifiConfiguration config) { try { return mService.addOrUpdateNetwork(config, mContext.getOpPackageName()); return mService.addOrUpdateNetwork(config); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1149,7 +1149,7 @@ public class WifiManager { */ public void addOrUpdatePasspointConfiguration(PasspointConfiguration config) { try { if (!mService.addOrUpdatePasspointConfiguration(config, mContext.getOpPackageName())) { if (!mService.addOrUpdatePasspointConfiguration(config)) { throw new IllegalArgumentException(); } } catch (RemoteException e) { Loading @@ -1166,7 +1166,7 @@ public class WifiManager { */ public void removePasspointConfiguration(String fqdn) { try { if (!mService.removePasspointConfiguration(fqdn, mContext.getOpPackageName())) { if (!mService.removePasspointConfiguration(fqdn)) { throw new IllegalArgumentException(); } } catch (RemoteException e) { Loading Loading @@ -1252,7 +1252,7 @@ public class WifiManager { */ public boolean removeNetwork(int netId) { try { return mService.removeNetwork(netId, mContext.getOpPackageName()); return mService.removeNetwork(netId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -1298,7 +1298,7 @@ public class WifiManager { boolean success; try { success = mService.enableNetwork(netId, attemptConnect, mContext.getOpPackageName()); success = mService.enableNetwork(netId, attemptConnect); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1324,7 +1324,7 @@ public class WifiManager { */ public boolean disableNetwork(int netId) { try { return mService.disableNetwork(netId, mContext.getOpPackageName()); return mService.disableNetwork(netId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -1337,7 +1337,7 @@ public class WifiManager { */ public boolean disconnect() { try { mService.disconnect(mContext.getOpPackageName()); mService.disconnect(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading @@ -1352,7 +1352,7 @@ public class WifiManager { */ public boolean reconnect() { try { mService.reconnect(mContext.getOpPackageName()); mService.reconnect(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading @@ -1367,7 +1367,7 @@ public class WifiManager { */ public boolean reassociate() { try { mService.reassociate(mContext.getOpPackageName()); mService.reassociate(); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -1740,7 +1740,7 @@ public class WifiManager { @Deprecated public boolean saveConfiguration() { try { return mService.saveConfiguration(mContext.getOpPackageName()); return mService.saveConfiguration(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2056,7 +2056,7 @@ public class WifiManager { } mLOHSCallbackProxy = null; try { mService.stopLocalOnlyHotspot(mContext.getOpPackageName()); mService.stopLocalOnlyHotspot(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2175,7 +2175,7 @@ public class WifiManager { @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(WifiConfiguration wifiConfig) { try { mService.setWifiApConfiguration(wifiConfig, mContext.getOpPackageName()); mService.setWifiApConfiguration(wifiConfig); return true; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); Loading Loading @@ -2947,7 +2947,7 @@ public class WifiManager { public void disableEphemeralNetwork(String SSID) { if (SSID == null) throw new IllegalArgumentException("SSID cannot be null"); try { mService.disableEphemeralNetwork(SSID, mContext.getOpPackageName()); mService.disableEphemeralNetwork(SSID); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -2986,7 +2986,7 @@ public class WifiManager { */ public Messenger getWifiServiceMessenger() { try { return mService.getWifiServiceMessenger(mContext.getOpPackageName()); return mService.getWifiServiceMessenger(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading Loading @@ -3516,7 +3516,7 @@ public class WifiManager { */ public void factoryReset() { try { mService.factoryReset(mContext.getOpPackageName()); mService.factoryReset(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -3543,7 +3543,7 @@ public class WifiManager { */ public boolean setEnableAutoJoinWhenAssociated(boolean enabled) { try { return mService.setEnableAutoJoinWhenAssociated(enabled, mContext.getOpPackageName()); return mService.setEnableAutoJoinWhenAssociated(enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
wifi/tests/src/android/net/wifi/WifiManagerTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -137,7 +137,7 @@ public class WifiManagerTest { assertEquals(mApConfig, callback.mRes.getWifiConfiguration()); callback.mRes.close(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading @@ -157,7 +157,7 @@ public class WifiManagerTest { assertEquals(mApConfig, res.getWifiConfiguration()); } verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading Loading @@ -548,7 +548,7 @@ public class WifiManagerTest { anyString())).thenReturn(REQUEST_REGISTERED); mWifiManager.startLocalOnlyHotspot(callback, mHandler); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); } /** Loading @@ -570,7 +570,7 @@ public class WifiManagerTest { anyString())).thenReturn(REQUEST_REGISTERED); mWifiManager.startLocalOnlyHotspot(callback, mHandler); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService).stopLocalOnlyHotspot(TEST_PACKAGE_NAME); verify(mWifiService).stopLocalOnlyHotspot(); mLooper.dispatchAll(); assertEquals(ERROR_NOT_SET, callback.mFailureReason); assertFalse(callback.mOnStartedCalled); Loading @@ -594,7 +594,7 @@ public class WifiManagerTest { assertFalse(callback.mOnStoppedCalled); assertEquals(null, callback.mRes); mWifiManager.cancelLocalOnlyHotspotRequest(); verify(mWifiService, never()).stopLocalOnlyHotspot(anyString()); verify(mWifiService, never()).stopLocalOnlyHotspot(); } /** Loading