Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb71c477 authored by Etan Cohen's avatar Etan Cohen Committed by android-build-merger
Browse files

Merge "NAN: for failed configurations - added configuration which failed." into mm-wireless-dev

am: 02033f80

* commit '02033f80':
  NAN: for failed configurations - added configuration which failed.
parents 391df1ac 02033f80
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
/**
 * 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");
 * you may not use this file except in compliance with the License.
@@ -26,7 +26,7 @@ import android.net.wifi.nan.ConfigRequest;
oneway interface IWifiNanEventListener
{
    void onConfigCompleted(in ConfigRequest completedConfig);
    void onConfigFailed(int reason);
    void onConfigFailed(in ConfigRequest failedConfig, int reason);
    void onNanDown(int reason);
    void onIdentityChanged();
}
+3 −3
Original line number Diff line number Diff line
/**
 * 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");
 * you may not use this file except in compliance with the License.
+3 −3
Original line number Diff line number Diff line
/**
 * 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");
 * you may not use this file except in compliance with the License.
+9 −5
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ public class WifiNanEventListener {

    /**
     * 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;

@@ -93,7 +94,7 @@ public class WifiNanEventListener {
                        WifiNanEventListener.this.onConfigCompleted((ConfigRequest) msg.obj);
                        break;
                    case LISTEN_CONFIG_FAILED:
                        WifiNanEventListener.this.onConfigFailed(msg.arg1);
                        WifiNanEventListener.this.onConfigFailed((ConfigRequest) msg.obj, msg.arg1);
                        break;
                    case LISTEN_NAN_DOWN:
                        WifiNanEventListener.this.onNanDown(msg.arg1);
@@ -129,7 +130,7 @@ public class WifiNanEventListener {
     *
     * @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");
    }

@@ -173,11 +174,14 @@ public class WifiNanEventListener {
        }

        @Override
        public void onConfigFailed(int reason) {
            if (VDBG) Log.v(TAG, "onConfigFailed: reason=" + reason);
        public void onConfigFailed(ConfigRequest failedConfig, int reason) {
            if (VDBG) {
                Log.v(TAG, "onConfigFailed: failedConfig=" + failedConfig + ", reason=" + reason);
            }

            Message msg = mHandler.obtainMessage(LISTEN_CONFIG_FAILED);
            msg.arg1 = reason;
            msg.obj = failedConfig;
            mHandler.sendMessage(msg);
        }

+4 −4
Original line number Diff line number Diff line
@@ -303,8 +303,8 @@ public class WifiNanSessionListener {
     * message). Override to implement your custom response.
     * <p>
     * Note that either this callback or
     * {@link WifiNanSessionListener#onMessageSendFail(int)} will be received -
     * never both.
     * {@link WifiNanSessionListener#onMessageSendFail(int, int)} will be
     * received - never both.
     */
    public void onMessageSendSuccess(int messageId) {
        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.
     * <p>
     * Note that either this callback or
     * {@link WifiNanSessionListener#onMessageSendSuccess()} will be received -
     * never both
     * {@link WifiNanSessionListener#onMessageSendSuccess(int)} will be received
     * - never both
     *
     * @param reason The failure reason using {@code NanSessionListener.FAIL_*}
     *            codes.