Merge "NAN: for failed configurations - added configuration which failed." into mm-wireless-dev
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2016, The Android Open Source Project
|
* Copyright (C) 2016 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@@ -26,7 +26,7 @@ import android.net.wifi.nan.ConfigRequest;
|
|||||||
oneway interface IWifiNanEventListener
|
oneway interface IWifiNanEventListener
|
||||||
{
|
{
|
||||||
void onConfigCompleted(in ConfigRequest completedConfig);
|
void onConfigCompleted(in ConfigRequest completedConfig);
|
||||||
void onConfigFailed(int reason);
|
void onConfigFailed(in ConfigRequest failedConfig, int reason);
|
||||||
void onNanDown(int reason);
|
void onNanDown(int reason);
|
||||||
void onIdentityChanged();
|
void onIdentityChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2016, The Android Open Source Project
|
* Copyright (C) 2016 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) 2016, The Android Open Source Project
|
* Copyright (C) 2016 The Android Open Source Project
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ public class WifiNanEventListener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration failed callback event registration flag. Corresponding
|
* Configuration failed callback event registration flag. Corresponding
|
||||||
* callback is {@link WifiNanEventListener#onConfigFailed(int)}.
|
* callback is
|
||||||
|
* {@link WifiNanEventListener#onConfigFailed(ConfigRequest, int)}.
|
||||||
*/
|
*/
|
||||||
public static final int LISTEN_CONFIG_FAILED = 0x1 << 1;
|
public static final int LISTEN_CONFIG_FAILED = 0x1 << 1;
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ public class WifiNanEventListener {
|
|||||||
WifiNanEventListener.this.onConfigCompleted((ConfigRequest) msg.obj);
|
WifiNanEventListener.this.onConfigCompleted((ConfigRequest) msg.obj);
|
||||||
break;
|
break;
|
||||||
case LISTEN_CONFIG_FAILED:
|
case LISTEN_CONFIG_FAILED:
|
||||||
WifiNanEventListener.this.onConfigFailed(msg.arg1);
|
WifiNanEventListener.this.onConfigFailed((ConfigRequest) msg.obj, msg.arg1);
|
||||||
break;
|
break;
|
||||||
case LISTEN_NAN_DOWN:
|
case LISTEN_NAN_DOWN:
|
||||||
WifiNanEventListener.this.onNanDown(msg.arg1);
|
WifiNanEventListener.this.onNanDown(msg.arg1);
|
||||||
@@ -129,7 +130,7 @@ public class WifiNanEventListener {
|
|||||||
*
|
*
|
||||||
* @param reason Failure reason code, see {@code NanSessionListener.FAIL_*}.
|
* @param reason Failure reason code, see {@code NanSessionListener.FAIL_*}.
|
||||||
*/
|
*/
|
||||||
public void onConfigFailed(int reason) {
|
public void onConfigFailed(ConfigRequest failedConfig, int reason) {
|
||||||
Log.w(TAG, "onConfigFailed: called in stub - override if interested or disable");
|
Log.w(TAG, "onConfigFailed: called in stub - override if interested or disable");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,11 +174,14 @@ public class WifiNanEventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConfigFailed(int reason) {
|
public void onConfigFailed(ConfigRequest failedConfig, int reason) {
|
||||||
if (VDBG) Log.v(TAG, "onConfigFailed: reason=" + reason);
|
if (VDBG) {
|
||||||
|
Log.v(TAG, "onConfigFailed: failedConfig=" + failedConfig + ", reason=" + reason);
|
||||||
|
}
|
||||||
|
|
||||||
Message msg = mHandler.obtainMessage(LISTEN_CONFIG_FAILED);
|
Message msg = mHandler.obtainMessage(LISTEN_CONFIG_FAILED);
|
||||||
msg.arg1 = reason;
|
msg.arg1 = reason;
|
||||||
|
msg.obj = failedConfig;
|
||||||
mHandler.sendMessage(msg);
|
mHandler.sendMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ public class WifiNanSessionListener {
|
|||||||
* message). Override to implement your custom response.
|
* message). Override to implement your custom response.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that either this callback or
|
* Note that either this callback or
|
||||||
* {@link WifiNanSessionListener#onMessageSendFail(int)} will be received -
|
* {@link WifiNanSessionListener#onMessageSendFail(int, int)} will be
|
||||||
* never both.
|
* received - never both.
|
||||||
*/
|
*/
|
||||||
public void onMessageSendSuccess(int messageId) {
|
public void onMessageSendSuccess(int messageId) {
|
||||||
if (VDBG) Log.v(TAG, "onMessageSendSuccess: called in stub - override if interested");
|
if (VDBG) Log.v(TAG, "onMessageSendSuccess: called in stub - override if interested");
|
||||||
@@ -319,8 +319,8 @@ public class WifiNanSessionListener {
|
|||||||
* message). Override to implement your custom response.
|
* message). Override to implement your custom response.
|
||||||
* <p>
|
* <p>
|
||||||
* Note that either this callback or
|
* Note that either this callback or
|
||||||
* {@link WifiNanSessionListener#onMessageSendSuccess()} will be received -
|
* {@link WifiNanSessionListener#onMessageSendSuccess(int)} will be received
|
||||||
* never both
|
* - never both
|
||||||
*
|
*
|
||||||
* @param reason The failure reason using {@code NanSessionListener.FAIL_*}
|
* @param reason The failure reason using {@code NanSessionListener.FAIL_*}
|
||||||
* codes.
|
* codes.
|
||||||
|
|||||||
Reference in New Issue
Block a user