Loading wifi/java/android/net/wifi/nan/IWifiNanEventCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ oneway interface IWifiNanEventCallback { void onConnectSuccess(); void onConnectFail(int reason); void onIdentityChanged(); void onIdentityChanged(in byte[] mac); void onRangingSuccess(int rangingId, in RttManager.ParcelableRttResults results); void onRangingFailure(int rangingId, int reason, in String description); Loading wifi/java/android/net/wifi/nan/WifiNanEventCallback.java +8 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class WifiNanEventCallback { * Called when NAN connect operation * {@link WifiNanManager#connect(android.os.Looper, WifiNanEventCallback)} * is completed. Doesn't necessarily mean that have joined or started a NAN * cluster. An indication is provided by {@link #onIdentityChanged()}. * cluster. An indication is provided by {@link #onIdentityChanged(byte[])}. */ public void onConnectSuccess() { /* empty */ Loading @@ -81,12 +81,14 @@ public class WifiNanEventCallback { } /** * Called when NAN identity has changed. This may be due to joining a * cluster, starting a cluster, or discovery interface change. The * implication is that peers you've been communicating with may no longer * recognize you and you need to re-establish your identity. * Called when NAN identity has changed and after {@link #onConnectSuccess()}. Call may be * due to joining a cluster, starting a cluster, or discovery interface change. The * implication is that peers you've been communicating with may no longer recognize you and * you need to re-establish your identity. * @param mac The MAC address of the NAN discovery interface. Depending on the permission * model may be all 0's. */ public void onIdentityChanged() { public void onIdentityChanged(byte[] mac) { /* empty */ } } wifi/java/android/net/wifi/nan/WifiNanManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -819,7 +819,7 @@ public class WifiNanManager { originalCallback.onConnectFail(msg.arg1); break; case CALLBACK_IDENTITY_CHANGED: originalCallback.onIdentityChanged(); originalCallback.onIdentityChanged((byte[]) msg.obj); break; case CALLBACK_RANGING_SUCCESS: { RttManager.RttListener listener = getAndRemoveRangingListener(msg.arg1); Loading Loading @@ -875,10 +875,11 @@ public class WifiNanManager { } @Override public void onIdentityChanged() { if (VDBG) Log.v(TAG, "onIdentityChanged"); public void onIdentityChanged(byte[] mac) { if (VDBG) Log.v(TAG, "onIdentityChanged: mac=" + new String(HexEncoding.encode(mac))); Message msg = mHandler.obtainMessage(CALLBACK_IDENTITY_CHANGED); msg.obj = mac; mHandler.sendMessage(msg); } Loading Loading
wifi/java/android/net/wifi/nan/IWifiNanEventCallback.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ oneway interface IWifiNanEventCallback { void onConnectSuccess(); void onConnectFail(int reason); void onIdentityChanged(); void onIdentityChanged(in byte[] mac); void onRangingSuccess(int rangingId, in RttManager.ParcelableRttResults results); void onRangingFailure(int rangingId, int reason, in String description); Loading
wifi/java/android/net/wifi/nan/WifiNanEventCallback.java +8 −6 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ public class WifiNanEventCallback { * Called when NAN connect operation * {@link WifiNanManager#connect(android.os.Looper, WifiNanEventCallback)} * is completed. Doesn't necessarily mean that have joined or started a NAN * cluster. An indication is provided by {@link #onIdentityChanged()}. * cluster. An indication is provided by {@link #onIdentityChanged(byte[])}. */ public void onConnectSuccess() { /* empty */ Loading @@ -81,12 +81,14 @@ public class WifiNanEventCallback { } /** * Called when NAN identity has changed. This may be due to joining a * cluster, starting a cluster, or discovery interface change. The * implication is that peers you've been communicating with may no longer * recognize you and you need to re-establish your identity. * Called when NAN identity has changed and after {@link #onConnectSuccess()}. Call may be * due to joining a cluster, starting a cluster, or discovery interface change. The * implication is that peers you've been communicating with may no longer recognize you and * you need to re-establish your identity. * @param mac The MAC address of the NAN discovery interface. Depending on the permission * model may be all 0's. */ public void onIdentityChanged() { public void onIdentityChanged(byte[] mac) { /* empty */ } }
wifi/java/android/net/wifi/nan/WifiNanManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -819,7 +819,7 @@ public class WifiNanManager { originalCallback.onConnectFail(msg.arg1); break; case CALLBACK_IDENTITY_CHANGED: originalCallback.onIdentityChanged(); originalCallback.onIdentityChanged((byte[]) msg.obj); break; case CALLBACK_RANGING_SUCCESS: { RttManager.RttListener listener = getAndRemoveRangingListener(msg.arg1); Loading Loading @@ -875,10 +875,11 @@ public class WifiNanManager { } @Override public void onIdentityChanged() { if (VDBG) Log.v(TAG, "onIdentityChanged"); public void onIdentityChanged(byte[] mac) { if (VDBG) Log.v(TAG, "onIdentityChanged: mac=" + new String(HexEncoding.encode(mac))); Message msg = mHandler.obtainMessage(CALLBACK_IDENTITY_CHANGED); msg.obj = mac; mHandler.sendMessage(msg); } Loading