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

Commit 3e9c1278 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Aware] Add support utility for PeerHandle to MAC translation"

parents 721c108d 3d33d749
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -548,9 +548,10 @@ LOCAL_SRC_FILES += \
	telephony/java/com/android/internal/telephony/IWapPushManager.aidl \
	telephony/java/com/android/internal/telephony/euicc/IEuiccController.aidl \
	wifi/java/android/net/wifi/IWifiManager.aidl \
	wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl \
	wifi/java/android/net/wifi/aware/IWifiAwareEventCallback.aidl \
	wifi/java/android/net/wifi/aware/IWifiAwareMacAddressProvider.aidl \
	wifi/java/android/net/wifi/aware/IWifiAwareManager.aidl \
	wifi/java/android/net/wifi/aware/IWifiAwareDiscoverySessionCallback.aidl \
	wifi/java/android/net/wifi/p2p/IWifiP2pManager.aidl \
	wifi/java/android/net/wifi/rtt/IRttCallback.aidl \
	wifi/java/android/net/wifi/rtt/IWifiRttManager.aidl \
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.net.wifi.aware;

/**
 * Callback for IWifiAwareManager.getMacAddressFromPeerHandle
 *
 * @hide
 */
oneway interface IWifiAwareMacAddressProvider
{
    void macAddress(in Map peerIdToMacMap);
}
+4 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.PendingIntent;
import android.net.wifi.aware.ConfigRequest;
import android.net.wifi.aware.IWifiAwareDiscoverySessionCallback;
import android.net.wifi.aware.IWifiAwareEventCallback;
import android.net.wifi.aware.IWifiAwareMacAddressProvider;
import android.net.wifi.aware.PublishConfig;
import android.net.wifi.aware.SubscribeConfig;
import android.net.wifi.aware.Characteristics;
@@ -52,4 +53,7 @@ interface IWifiAwareManager
    void sendMessage(int clientId, int discoverySessionId, int peerId, in byte[] message,
        int messageId, int retryCount);
    void terminateSession(int clientId, int discoverySessionId);

    // internal APIs: intended to be used between System Services (restricted permissions)
    void requestMacAddresses(int uid, in List peerIds, in IWifiAwareMacAddressProvider callback);
}
+20 −0
Original line number Diff line number Diff line
@@ -32,4 +32,24 @@ public class PeerHandle {

    /** @hide */
    public int peerId;

    /** @hide RTT_API */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof PeerHandle)) {
            return false;
        }

        return peerId == ((PeerHandle) o).peerId;
    }

    /** @hide RTT_API */
    @Override
    public int hashCode() {
        return peerId;
    }
}