diff options
author | 2021-03-01 15:16:18 -0800 | |
---|---|---|
committer | 2021-03-02 01:13:11 +0000 | |
commit | 6b3ae39cac762eb459f609e57463d554b0e14cad (patch) | |
tree | 99b794f60bf0edc9c54e310ba7cc6c1b1569fb9a | |
parent | 652459ddb448493fd7d0ba8753fdc9fd9b0cae37 (diff) |
[Aware] Deprecate OOB data path API
Bug: 143377456
Test: build
Change-Id: I4e1a133333e503889e9256dc9196483999243e43
-rw-r--r-- | framework/api/current.txt | 4 | ||||
-rw-r--r-- | framework/api/system-current.txt | 2 | ||||
-rw-r--r-- | framework/java/android/net/wifi/aware/WifiAwareSession.java | 18 |
3 files changed, 21 insertions, 3 deletions
diff --git a/framework/api/current.txt b/framework/api/current.txt index b075ccf401..b6c7c1feae 100644 --- a/framework/api/current.txt +++ b/framework/api/current.txt @@ -763,8 +763,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) { |