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

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

Merge "[RTT2] New (v2) Wi-Fi RTT framework"

parents efed6871 17ba4725
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -552,6 +552,8 @@ LOCAL_SRC_FILES += \
	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 \
	wifi/java/android/net/wifi/IWifiScanner.aidl \
	wifi/java/android/net/wifi/IRttManager.aidl \
	packages/services/PacProcessor/com/android/net/IProxyService.aidl \
@@ -721,6 +723,8 @@ aidl_files := \
	frameworks/base/wifi/java/android/net/wifi/p2p/WifiP2pGroup.aidl \
	frameworks/base/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceRequest.aidl \
	frameworks/base/wifi/java/android/net/wifi/p2p/nsd/WifiP2pServiceInfo.aidl \
	frameworks/base/wifi/java/android/net/wifi/rtt/RangingRequest.aidl \
	frameworks/base/wifi/java/android/net/wifi/rtt/RangingResult.aidl \
	frameworks/base/wifi/java/android/net/wifi/WpsInfo.aidl \
	frameworks/base/wifi/java/android/net/wifi/ScanResult.aidl \
	frameworks/base/wifi/java/android/net/wifi/PasspointManagementObjectDefinition.aidl \
+14 −2
Original line number Diff line number Diff line
@@ -81,10 +81,10 @@ import android.net.INetworkPolicyManager;
import android.net.IpSecManager;
import android.net.NetworkPolicyManager;
import android.net.NetworkScoreManager;
import android.net.nsd.INsdManager;
import android.net.nsd.NsdManager;
import android.net.lowpan.ILowpanManager;
import android.net.lowpan.LowpanManager;
import android.net.nsd.INsdManager;
import android.net.nsd.NsdManager;
import android.net.wifi.IRttManager;
import android.net.wifi.IWifiManager;
import android.net.wifi.IWifiScanner;
@@ -95,6 +95,8 @@ import android.net.wifi.aware.IWifiAwareManager;
import android.net.wifi.aware.WifiAwareManager;
import android.net.wifi.p2p.IWifiP2pManager;
import android.net.wifi.p2p.WifiP2pManager;
import android.net.wifi.rtt.IWifiRttManager;
import android.net.wifi.rtt.WifiRttManager;
import android.nfc.NfcManager;
import android.os.BatteryManager;
import android.os.BatteryStats;
@@ -603,6 +605,16 @@ final class SystemServiceRegistry {
                        ConnectivityThread.getInstanceLooper());
            }});

        registerService(Context.WIFI_RTT2_SERVICE, WifiRttManager.class,
                new CachedServiceFetcher<WifiRttManager>() {
                    @Override
                    public WifiRttManager createService(ContextImpl ctx)
                            throws ServiceNotFoundException {
                        IBinder b = ServiceManager.getServiceOrThrow(Context.WIFI_RTT2_SERVICE);
                        IWifiRttManager service = IWifiRttManager.Stub.asInterface(b);
                        return new WifiRttManager(ctx.getOuterContext(), service);
                    }});

        registerService(Context.ETHERNET_SERVICE, EthernetManager.class,
                new CachedServiceFetcher<EthernetManager>() {
            @Override
+13 −0
Original line number Diff line number Diff line
@@ -3465,6 +3465,19 @@ public abstract class Context {
    @SystemApi
    public static final String WIFI_RTT_SERVICE = "rttmanager";

    /**
     * Use with {@link #getSystemService} to retrieve a {@link
     * android.net.wifi.rtt.WifiRttManager} for ranging devices with wifi
     *
     * Note: this is a replacement for WIFI_RTT_SERVICE above. It will
     * be renamed once final implementation in place.
     *
     * @see #getSystemService
     * @see android.net.wifi.rtt.WifiRttManager
     * @hide
     */
    public static final String WIFI_RTT2_SERVICE = "rttmanager2";

    /**
     * Use with {@link #getSystemService} to retrieve a {@link
     * android.net.lowpan.LowpanManager} for handling management of
+1 −0
Original line number Diff line number Diff line
@@ -1090,6 +1090,7 @@ public final class SystemServer {
                if (!disableRtt) {
                    traceBeginAndSlog("StartWifiRtt");
                    mSystemServiceManager.startService("com.android.server.wifi.RttService");
                    mSystemServiceManager.startService("com.android.server.wifi.rtt.RttService");
                    traceEnd();
                }

+32 −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.rtt;

import android.net.wifi.rtt.RangingResult;

/**
 * Interface for RTT result callback.
 *
 * @hide
 */
oneway interface IRttCallback
{
    /**
     * Service to manager callback providing RTT status and results.
     */
    void onRangingResults(int status, in List<RangingResult> results);
}
Loading