Merge "Revert "WifiManager: expose Local Only Hotspot APIs"" into oc-dev am: ad4c31fecf
am: 0e2ddda971
Change-Id: I96fd38468deb7b86ab3e0a055802aa73e9447c02
diff --git a/api/current.txt b/api/current.txt
index 71e5c91..c0e0a77 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -26569,7 +26569,6 @@
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);
@@ -26620,21 +26619,6 @@
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
- }
-
- public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable {
- method public void close();
- method public android.net.wifi.WifiConfiguration getConfig();
- }
-
public class WifiManager.MulticastLock {
method public void acquire();
method public boolean isHeld();
diff --git a/api/system-current.txt b/api/system-current.txt
index 5081583..5faac78 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -29151,7 +29151,6 @@
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);
@@ -29229,21 +29228,6 @@
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
- }
-
- public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable {
- method public void close();
- method public android.net.wifi.WifiConfiguration getConfig();
- }
-
public class WifiManager.MulticastLock {
method public void acquire();
method public boolean isHeld();
diff --git a/api/test-current.txt b/api/test-current.txt
index 35683bf..bfd722a 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -26677,7 +26677,6 @@
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);
@@ -26728,21 +26727,6 @@
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
- }
-
- public class WifiManager.LocalOnlyHotspotReservation implements java.lang.AutoCloseable {
- method public void close();
- method public android.net.wifi.WifiConfiguration getConfig();
- }
-
public class WifiManager.MulticastLock {
method public void acquire();
method public boolean isHeld();
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 0e1eb15..8fbf472 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1882,6 +1882,8 @@
* 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) {
@@ -2272,6 +2274,8 @@
* 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 {
@@ -2314,6 +2318,8 @@
/**
* Callback class for applications to receive updates about the LocalOnlyHotspot status.
+ *
+ * @hide
*/
public static class LocalOnlyHotspotCallback {
public static final int ERROR_NO_CHANNEL = 1;
@@ -2436,6 +2442,7 @@
public class LocalOnlyHotspotSubscription implements AutoCloseable {
private final CloseGuard mCloseGuard = CloseGuard.get();
+ /** @hide */
@VisibleForTesting
public LocalOnlyHotspotSubscription() {
mCloseGuard.open("close");