summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/api/current.txt4
-rw-r--r--framework/api/system-current.txt2
-rw-r--r--framework/java/android/net/wifi/aware/WifiAwareSession.java18
3 files changed, 21 insertions, 3 deletions
diff --git a/framework/api/current.txt b/framework/api/current.txt
index 980a89c04e..bc6265c499 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -764,8 +764,8 @@ package android.net.wifi.aware {
public class WifiAwareSession implements java.lang.AutoCloseable {
method public void close();
- method public android.net.NetworkSpecifier createNetworkSpecifierOpen(int, @NonNull byte[]);
- method public android.net.NetworkSpecifier createNetworkSpecifierPassphrase(int, @NonNull byte[], @NonNull String);
+ method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierOpen(int, @NonNull byte[]);
+ method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPassphrase(int, @NonNull byte[], @NonNull String);
method public void publish(@NonNull android.net.wifi.aware.PublishConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
method public void subscribe(@NonNull android.net.wifi.aware.SubscribeConfig, @NonNull android.net.wifi.aware.DiscoverySessionCallback, @Nullable android.os.Handler);
}
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index c860814ab2..0a8867e890 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -901,7 +901,7 @@ package android.net.wifi.aware {
}
public class WifiAwareSession implements java.lang.AutoCloseable {
- method public android.net.NetworkSpecifier createNetworkSpecifierPmk(int, @NonNull byte[], @NonNull byte[]);
+ method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPmk(int, @NonNull byte[], @NonNull byte[]);
}
}
diff --git a/framework/java/android/net/wifi/aware/WifiAwareSession.java b/framework/java/android/net/wifi/aware/WifiAwareSession.java
index 29a426b8d5..d31baa9638 100644
--- a/framework/java/android/net/wifi/aware/WifiAwareSession.java
+++ b/framework/java/android/net/wifi/aware/WifiAwareSession.java
@@ -223,6 +223,11 @@ public class WifiAwareSession implements AutoCloseable {
* To set up an encrypted link use the
* {@link #createNetworkSpecifierPassphrase(int, byte[], String)} API.
*
+ * @deprecated Please use in-band data-path setup, refer to
+ * {@link WifiAwareNetworkSpecifier.Builder},
+ * {@link #publish(PublishConfig, DiscoverySessionCallback, Handler)} and
+ * {@link #subscribe(SubscribeConfig, DiscoverySessionCallback, Handler)}
+ *
* @param role The role of this device:
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
@@ -236,6 +241,7 @@ public class WifiAwareSession implements AutoCloseable {
* android.net.ConnectivityManager.NetworkCallback)}
* [or other varieties of that API].
*/
+ @Deprecated
public NetworkSpecifier createNetworkSpecifierOpen(
@WifiAwareManager.DataPathRole int role, @NonNull byte[] peer) {
WifiAwareManager mgr = mMgr.get();
@@ -261,6 +267,11 @@ public class WifiAwareSession implements AutoCloseable {
* when using Aware discovery use the alternative network specifier method -
* {@link android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder}.
*
+ * @deprecated Please use in-band data-path setup, refer to
+ * {@link WifiAwareNetworkSpecifier.Builder},
+ * {@link #publish(PublishConfig, DiscoverySessionCallback, Handler)} and
+ * {@link #subscribe(SubscribeConfig, DiscoverySessionCallback, Handler)}
+ *
* @param role The role of this device:
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
@@ -277,6 +288,7 @@ public class WifiAwareSession implements AutoCloseable {
* android.net.ConnectivityManager.NetworkCallback)}
* [or other varieties of that API].
*/
+ @Deprecated
public NetworkSpecifier createNetworkSpecifierPassphrase(
@WifiAwareManager.DataPathRole int role, @NonNull byte[] peer,
@NonNull String passphrase) {
@@ -307,6 +319,11 @@ public class WifiAwareSession implements AutoCloseable {
* when using Aware discovery use the alternative network specifier method -
* {@link android.net.wifi.aware.WifiAwareNetworkSpecifier.Builder}.
*
+ * @deprecated Please use in-band data-path setup, refer to
+ * {@link WifiAwareNetworkSpecifier.Builder},
+ * {@link #publish(PublishConfig, DiscoverySessionCallback, Handler)} and
+ * {@link #subscribe(SubscribeConfig, DiscoverySessionCallback, Handler)}
+ *
* @param role The role of this device:
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_INITIATOR} or
* {@link WifiAwareManager#WIFI_AWARE_DATA_PATH_ROLE_RESPONDER}
@@ -327,6 +344,7 @@ public class WifiAwareSession implements AutoCloseable {
*
* @hide
*/
+ @Deprecated
@SystemApi
public NetworkSpecifier createNetworkSpecifierPmk(
@WifiAwareManager.DataPathRole int role, @NonNull byte[] peer, @NonNull byte[] pmk) {