Loading api/current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26525,6 +26525,7 @@ package android.net.wifi { method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public boolean startScan(); method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback); method public int updateNetwork(android.net.wifi.WifiConfiguration); Loading Loading @@ -26575,6 +26576,22 @@ package android.net.wifi { field public static final int WPS_WEP_PROHIBITED = 4; // 0x4 } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld(); api/system-current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -29063,6 +29063,7 @@ package android.net.wifi { method public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); method public boolean setWifiApEnabled(android.net.wifi.WifiConfiguration, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public deprecated boolean startLocationRestrictedScan(android.os.WorkSource); method public boolean startScan(); method public boolean startScan(android.os.WorkSource); Loading Loading @@ -29140,6 +29141,22 @@ package android.net.wifi { method public abstract void onSuccess(); } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld(); api/test-current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26633,6 +26633,7 @@ package android.net.wifi { method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public boolean startScan(); method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback); method public int updateNetwork(android.net.wifi.WifiConfiguration); Loading Loading @@ -26683,6 +26684,22 @@ package android.net.wifi { field public static final int WPS_WEP_PROHIBITED = 4; // 0x4 } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld(); wifi/java/android/net/wifi/IWifiManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ interface IWifiManager boolean stopSoftAp(); WifiConfiguration startLocalOnlyHotspot(in Messenger messenger, in IBinder binder); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder); void stopLocalOnlyHotspot(); Loading wifi/java/android/net/wifi/WifiManager.java +13 −16 Original line number Diff line number Diff line Loading @@ -478,7 +478,6 @@ public class WifiManager { */ public static final int IFACE_IP_MODE_LOCAL_ONLY = 2; /** * Broadcast intent action indicating that a connection to the supplicant has * been established (and it is now possible Loading Loading @@ -1850,8 +1849,9 @@ public class WifiManager { * Tethering to provide an upstream to another device, LocalOnlyHotspot will not start due to * an incompatible mode. The possible error codes include: * {@link LocalOnlyHotspotCallback#ERROR_NO_CHANNEL}, * {@link LocalOnlyHotspotCallback#ERROR_GENERIC} and * {@link LocalOnlyHotspotCallback#ERROR_INCOMPATIBLE_MODE}. * {@link LocalOnlyHotspotCallback#ERROR_GENERIC}, * {@link LocalOnlyHotspotCallback#ERROR_INCOMPATIBLE_MODE} and * {@link LocalOnlyHotspotCallback#ERROR_TETHERING_DISALLOWED}. * <p> * Internally, requests will be tracked to prevent the hotspot from being torn down while apps * are still using it. The {@link LocalOnlyHotspotReservation} object passed in the {@link Loading Loading @@ -1882,8 +1882,6 @@ public class WifiManager { * operating status. * @param handler Handler to be used for callbacks. If the caller passes a null Handler, the * main thread will be used. * * @hide */ public void startLocalOnlyHotspot(LocalOnlyHotspotCallback callback, @Nullable Handler handler) { Loading @@ -1892,12 +1890,10 @@ public class WifiManager { LocalOnlyHotspotCallbackProxy proxy = new LocalOnlyHotspotCallbackProxy(this, looper, callback); try { WifiConfiguration config = mService.startLocalOnlyHotspot( proxy.getMessenger(), new Binder()); if (config == null) { int returnCode = mService.startLocalOnlyHotspot(proxy.getMessenger(), new Binder()); if (returnCode != LocalOnlyHotspotCallback.REQUEST_REGISTERED) { // Send message to the proxy to make sure we call back on the correct thread proxy.notifyFailed( LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE); proxy.notifyFailed(returnCode); return; } mLOHSCallbackProxy = proxy; Loading Loading @@ -2274,8 +2270,6 @@ public class WifiManager { * any further callbacks. If the LocalOnlyHotspot is stopped due to a * user triggered mode change, applications will be notified via the {@link * LocalOnlyHotspotCallback#onStopped()} callback. * * @hide */ public class LocalOnlyHotspotReservation implements AutoCloseable { Loading @@ -2289,7 +2283,7 @@ public class WifiManager { mCloseGuard.open("close"); } public WifiConfiguration getConfig() { public WifiConfiguration getWifiConfiguration() { return mConfig; } Loading Loading @@ -2318,13 +2312,15 @@ public class WifiManager { /** * Callback class for applications to receive updates about the LocalOnlyHotspot status. * * @hide */ public static class LocalOnlyHotspotCallback { /** @hide */ public static final int REQUEST_REGISTERED = 0; public static final int ERROR_NO_CHANNEL = 1; public static final int ERROR_GENERIC = 2; public static final int ERROR_INCOMPATIBLE_MODE = 3; public static final int ERROR_TETHERING_DISALLOWED = 4; /** LocalOnlyHotspot start succeeded. */ public void onStarted(LocalOnlyHotspotReservation reservation) {}; Loading @@ -2345,7 +2341,8 @@ public class WifiManager { * {@link WifiManager#startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)} again at * a later time. * <p> * @param reason The reason for failure could be one of: {@link #ERROR_INCOMPATIBLE_MODE}, * @param reason The reason for failure could be one of: {@link * #ERROR_TETHERING_DISALLOWED}, {@link #ERROR_INCOMPATIBLE_MODE}, * {@link #ERROR_NO_CHANNEL}, or {@link #ERROR_GENERIC}. */ public void onFailed(int reason) { }; Loading Loading
api/current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26525,6 +26525,7 @@ package android.net.wifi { method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public boolean startScan(); method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback); method public int updateNetwork(android.net.wifi.WifiConfiguration); Loading Loading @@ -26575,6 +26576,22 @@ package android.net.wifi { field public static final int WPS_WEP_PROHIBITED = 4; // 0x4 } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld();
api/system-current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -29063,6 +29063,7 @@ package android.net.wifi { method public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); method public boolean setWifiApEnabled(android.net.wifi.WifiConfiguration, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public deprecated boolean startLocationRestrictedScan(android.os.WorkSource); method public boolean startScan(); method public boolean startScan(android.os.WorkSource); Loading Loading @@ -29140,6 +29141,22 @@ package android.net.wifi { method public abstract void onSuccess(); } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld();
api/test-current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -26633,6 +26633,7 @@ package android.net.wifi { method public void setTdlsEnabled(java.net.InetAddress, boolean); method public void setTdlsEnabledWithMacAddress(java.lang.String, boolean); method public boolean setWifiEnabled(boolean); method public void startLocalOnlyHotspot(android.net.wifi.WifiManager.LocalOnlyHotspotCallback, android.os.Handler); method public boolean startScan(); method public void startWps(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback); method public int updateNetwork(android.net.wifi.WifiConfiguration); Loading Loading @@ -26683,6 +26684,22 @@ package android.net.wifi { field public static final int WPS_WEP_PROHIBITED = 4; // 0x4 } public static class WifiManager.LocalOnlyHotspotCallback { ctor public WifiManager.LocalOnlyHotspotCallback(); method public void onFailed(int); method public void onStarted(android.net.wifi.WifiManager.LocalOnlyHotspotReservation); method public void onStopped(); field public static final int ERROR_GENERIC = 2; // 0x2 field public static final int ERROR_INCOMPATIBLE_MODE = 3; // 0x3 field public static final int ERROR_NO_CHANNEL = 1; // 0x1 field public static final int ERROR_TETHERING_DISALLOWED = 4; // 0x4 } public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable { method public void close(); method public android.net.wifi.WifiConfiguration getWifiConfiguration(); } public class WifiManager.MulticastLock { method public void acquire(); method public boolean isHeld();
wifi/java/android/net/wifi/IWifiManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -131,7 +131,7 @@ interface IWifiManager boolean stopSoftAp(); WifiConfiguration startLocalOnlyHotspot(in Messenger messenger, in IBinder binder); int startLocalOnlyHotspot(in Messenger messenger, in IBinder binder); void stopLocalOnlyHotspot(); Loading
wifi/java/android/net/wifi/WifiManager.java +13 −16 Original line number Diff line number Diff line Loading @@ -478,7 +478,6 @@ public class WifiManager { */ public static final int IFACE_IP_MODE_LOCAL_ONLY = 2; /** * Broadcast intent action indicating that a connection to the supplicant has * been established (and it is now possible Loading Loading @@ -1850,8 +1849,9 @@ public class WifiManager { * Tethering to provide an upstream to another device, LocalOnlyHotspot will not start due to * an incompatible mode. The possible error codes include: * {@link LocalOnlyHotspotCallback#ERROR_NO_CHANNEL}, * {@link LocalOnlyHotspotCallback#ERROR_GENERIC} and * {@link LocalOnlyHotspotCallback#ERROR_INCOMPATIBLE_MODE}. * {@link LocalOnlyHotspotCallback#ERROR_GENERIC}, * {@link LocalOnlyHotspotCallback#ERROR_INCOMPATIBLE_MODE} and * {@link LocalOnlyHotspotCallback#ERROR_TETHERING_DISALLOWED}. * <p> * Internally, requests will be tracked to prevent the hotspot from being torn down while apps * are still using it. The {@link LocalOnlyHotspotReservation} object passed in the {@link Loading Loading @@ -1882,8 +1882,6 @@ public class WifiManager { * operating status. * @param handler Handler to be used for callbacks. If the caller passes a null Handler, the * main thread will be used. * * @hide */ public void startLocalOnlyHotspot(LocalOnlyHotspotCallback callback, @Nullable Handler handler) { Loading @@ -1892,12 +1890,10 @@ public class WifiManager { LocalOnlyHotspotCallbackProxy proxy = new LocalOnlyHotspotCallbackProxy(this, looper, callback); try { WifiConfiguration config = mService.startLocalOnlyHotspot( proxy.getMessenger(), new Binder()); if (config == null) { int returnCode = mService.startLocalOnlyHotspot(proxy.getMessenger(), new Binder()); if (returnCode != LocalOnlyHotspotCallback.REQUEST_REGISTERED) { // Send message to the proxy to make sure we call back on the correct thread proxy.notifyFailed( LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE); proxy.notifyFailed(returnCode); return; } mLOHSCallbackProxy = proxy; Loading Loading @@ -2274,8 +2270,6 @@ public class WifiManager { * any further callbacks. If the LocalOnlyHotspot is stopped due to a * user triggered mode change, applications will be notified via the {@link * LocalOnlyHotspotCallback#onStopped()} callback. * * @hide */ public class LocalOnlyHotspotReservation implements AutoCloseable { Loading @@ -2289,7 +2283,7 @@ public class WifiManager { mCloseGuard.open("close"); } public WifiConfiguration getConfig() { public WifiConfiguration getWifiConfiguration() { return mConfig; } Loading Loading @@ -2318,13 +2312,15 @@ public class WifiManager { /** * Callback class for applications to receive updates about the LocalOnlyHotspot status. * * @hide */ public static class LocalOnlyHotspotCallback { /** @hide */ public static final int REQUEST_REGISTERED = 0; public static final int ERROR_NO_CHANNEL = 1; public static final int ERROR_GENERIC = 2; public static final int ERROR_INCOMPATIBLE_MODE = 3; public static final int ERROR_TETHERING_DISALLOWED = 4; /** LocalOnlyHotspot start succeeded. */ public void onStarted(LocalOnlyHotspotReservation reservation) {}; Loading @@ -2345,7 +2341,8 @@ public class WifiManager { * {@link WifiManager#startLocalOnlyHotspot(LocalOnlyHotspotCallback, Handler)} again at * a later time. * <p> * @param reason The reason for failure could be one of: {@link #ERROR_INCOMPATIBLE_MODE}, * @param reason The reason for failure could be one of: {@link * #ERROR_TETHERING_DISALLOWED}, {@link #ERROR_INCOMPATIBLE_MODE}, * {@link #ERROR_NO_CHANNEL}, or {@link #ERROR_GENERIC}. */ public void onFailed(int reason) { }; Loading