Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31738,6 +31738,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated(); wifi/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated(); Loading wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java +12 −0 Original line number Diff line number Diff line Loading @@ -189,4 +189,16 @@ public class DiscoverySessionCallback { public void onMessageReceived(PeerHandle peerHandle, byte[] message) { /* empty */ } /** * Called when the discovered peer is no longer visible. All further operations on this * discovery session will fail. If the peer is visible again, * {@link #onServiceDiscovered(PeerHandle, byte[], List)} or * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} will be called. * * @param peerHandle An opaque handle to the peer matching our discovery operation. */ public void onServiceLost(@NonNull PeerHandle peerHandle) { /* empty */ } } wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,4 +35,5 @@ oneway interface IWifiAwareDiscoverySessionCallback void onMessageSendSuccess(int messageId); void onMessageSendFail(int messageId, int reason); void onMessageReceived(int peerId, in byte[] message); void onMatchExpired(int peerId); } wifi/java/android/net/wifi/aware/WifiAwareManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,7 @@ public class WifiAwareManager { private static final int CALLBACK_MESSAGE_SEND_FAIL = 6; private static final int CALLBACK_MESSAGE_RECEIVED = 7; private static final int CALLBACK_MATCH_WITH_DISTANCE = 8; private static final int CALLBACK_MATCH_EXPIRED = 9; private static final String MESSAGE_BUNDLE_KEY_MESSAGE = "message"; private static final String MESSAGE_BUNDLE_KEY_MESSAGE2 = "message2"; Loading Loading @@ -676,6 +677,9 @@ public class WifiAwareManager { mOriginalCallback.onMessageReceived(new PeerHandle(msg.arg1), (byte[]) msg.obj); break; case CALLBACK_MATCH_EXPIRED: mOriginalCallback .onServiceLost(new PeerHandle(msg.arg1)); } } }; Loading Loading @@ -746,6 +750,15 @@ public class WifiAwareManager { onMatchCommon(CALLBACK_MATCH_WITH_DISTANCE, peerId, serviceSpecificInfo, matchFilter, distanceMm); } @Override public void onMatchExpired(int peerId) { if (VDBG) { Log.v(TAG, "onMatchExpired: peerId=" + peerId); } Message msg = mHandler.obtainMessage(CALLBACK_MATCH_EXPIRED); msg.arg1 = peerId; mHandler.sendMessage(msg); } @Override public void onMessageSendSuccess(int messageId) { Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -31738,6 +31738,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated();
wifi/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -579,6 +579,7 @@ package android.net.wifi.aware { method public void onPublishStarted(@NonNull android.net.wifi.aware.PublishDiscoverySession); method public void onServiceDiscovered(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>); method public void onServiceDiscoveredWithinRange(android.net.wifi.aware.PeerHandle, byte[], java.util.List<byte[]>, int); method public void onServiceLost(@NonNull android.net.wifi.aware.PeerHandle); method public void onSessionConfigFailed(); method public void onSessionConfigUpdated(); method public void onSessionTerminated(); Loading
wifi/java/android/net/wifi/aware/DiscoverySessionCallback.java +12 −0 Original line number Diff line number Diff line Loading @@ -189,4 +189,16 @@ public class DiscoverySessionCallback { public void onMessageReceived(PeerHandle peerHandle, byte[] message) { /* empty */ } /** * Called when the discovered peer is no longer visible. All further operations on this * discovery session will fail. If the peer is visible again, * {@link #onServiceDiscovered(PeerHandle, byte[], List)} or * {@link #onServiceDiscoveredWithinRange(PeerHandle, byte[], List, int)} will be called. * * @param peerHandle An opaque handle to the peer matching our discovery operation. */ public void onServiceLost(@NonNull PeerHandle peerHandle) { /* empty */ } }
wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -35,4 +35,5 @@ oneway interface IWifiAwareDiscoverySessionCallback void onMessageSendSuccess(int messageId); void onMessageSendFail(int messageId, int reason); void onMessageReceived(int peerId, in byte[] message); void onMatchExpired(int peerId); }
wifi/java/android/net/wifi/aware/WifiAwareManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -587,6 +587,7 @@ public class WifiAwareManager { private static final int CALLBACK_MESSAGE_SEND_FAIL = 6; private static final int CALLBACK_MESSAGE_RECEIVED = 7; private static final int CALLBACK_MATCH_WITH_DISTANCE = 8; private static final int CALLBACK_MATCH_EXPIRED = 9; private static final String MESSAGE_BUNDLE_KEY_MESSAGE = "message"; private static final String MESSAGE_BUNDLE_KEY_MESSAGE2 = "message2"; Loading Loading @@ -676,6 +677,9 @@ public class WifiAwareManager { mOriginalCallback.onMessageReceived(new PeerHandle(msg.arg1), (byte[]) msg.obj); break; case CALLBACK_MATCH_EXPIRED: mOriginalCallback .onServiceLost(new PeerHandle(msg.arg1)); } } }; Loading Loading @@ -746,6 +750,15 @@ public class WifiAwareManager { onMatchCommon(CALLBACK_MATCH_WITH_DISTANCE, peerId, serviceSpecificInfo, matchFilter, distanceMm); } @Override public void onMatchExpired(int peerId) { if (VDBG) { Log.v(TAG, "onMatchExpired: peerId=" + peerId); } Message msg = mHandler.obtainMessage(CALLBACK_MATCH_EXPIRED); msg.arg1 = peerId; mHandler.sendMessage(msg); } @Override public void onMessageSendSuccess(int messageId) { Loading