Loading wifi/java/android/net/wifi/WifiManager.java +7 −6 Original line number Original line Diff line number Diff line Loading @@ -4441,10 +4441,11 @@ public class WifiManager { } } /** /** * Disable an ephemeral network. * Temporarily disable a network. Should always trigger with user disconnect network. * * @param ssid in the format of WifiConfiguration's SSID. * * * @param network Input can be SSID or FQDN. And caller must ensure that the SSID passed thru * this API matched the WifiConfiguration.SSID rules, and thus be surrounded by * quotes. * @hide * @hide */ */ @SystemApi @SystemApi Loading @@ -4452,12 +4453,12 @@ public class WifiManager { android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK android.Manifest.permission.NETWORK_STACK }) }) public void disableEphemeralNetwork(@NonNull String ssid) { public void disableEphemeralNetwork(@NonNull String network) { if (TextUtils.isEmpty(ssid)) { if (TextUtils.isEmpty(network)) { throw new IllegalArgumentException("SSID cannot be null or empty!"); throw new IllegalArgumentException("SSID cannot be null or empty!"); } } try { try { mService.disableEphemeralNetwork(ssid, mContext.getOpPackageName()); mService.disableEphemeralNetwork(network, mContext.getOpPackageName()); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } Loading Loading
wifi/java/android/net/wifi/WifiManager.java +7 −6 Original line number Original line Diff line number Diff line Loading @@ -4441,10 +4441,11 @@ public class WifiManager { } } /** /** * Disable an ephemeral network. * Temporarily disable a network. Should always trigger with user disconnect network. * * @param ssid in the format of WifiConfiguration's SSID. * * * @param network Input can be SSID or FQDN. And caller must ensure that the SSID passed thru * this API matched the WifiConfiguration.SSID rules, and thus be surrounded by * quotes. * @hide * @hide */ */ @SystemApi @SystemApi Loading @@ -4452,12 +4453,12 @@ public class WifiManager { android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK android.Manifest.permission.NETWORK_STACK }) }) public void disableEphemeralNetwork(@NonNull String ssid) { public void disableEphemeralNetwork(@NonNull String network) { if (TextUtils.isEmpty(ssid)) { if (TextUtils.isEmpty(network)) { throw new IllegalArgumentException("SSID cannot be null or empty!"); throw new IllegalArgumentException("SSID cannot be null or empty!"); } } try { try { mService.disableEphemeralNetwork(ssid, mContext.getOpPackageName()); mService.disableEphemeralNetwork(network, mContext.getOpPackageName()); } catch (RemoteException e) { } catch (RemoteException e) { throw e.rethrowFromSystemServer(); throw e.rethrowFromSystemServer(); } } Loading