am ff5ceb0d: am 0b4d73dd: Merge "Introduce RTT Manager" into lmp-dev

* commit 'ff5ceb0d89c549682b498522f052d61c776bff03':
  Introduce RTT Manager
This commit is contained in:
Vinit Deshpande
2014-07-17 18:20:48 +00:00
committed by Android Git Automerger
6 changed files with 392 additions and 3 deletions

View File

@@ -16,8 +16,6 @@
package android.app;
import android.net.wifi.IWifiScanner;
import android.net.wifi.WifiScanner;
import android.os.Build;
import android.service.persistentdata.IPersistentDataBlockService;
@@ -93,6 +91,10 @@ import android.net.wifi.passpoint.IWifiPasspointManager;
import android.net.wifi.passpoint.WifiPasspointManager;
import android.net.wifi.p2p.IWifiP2pManager;
import android.net.wifi.p2p.WifiP2pManager;
import android.net.wifi.IWifiScanner;
import android.net.wifi.WifiScanner;
import android.net.wifi.IRttManager;
import android.net.wifi.RttManager;
import android.nfc.NfcManager;
import android.os.BatteryManager;
import android.os.Binder;
@@ -622,6 +624,13 @@ class ContextImpl extends Context {
return new WifiScanner(ctx.getOuterContext(), service);
}});
registerService(WIFI_RTT_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(WIFI_RTT_SERVICE);
IRttManager service = IRttManager.Stub.asInterface(b);
return new RttManager(ctx.getOuterContext(), service);
}});
registerService(ETHERNET_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(ETHERNET_SERVICE);

View File

@@ -2067,6 +2067,7 @@ public abstract class Context {
WIFI_P2P_SERVICE,
WIFI_SCANNING_SERVICE,
//@hide: ETHERNET_SERVICE,
WIFI_RTT_SERVICE,
NSD_SERVICE,
AUDIO_SERVICE,
MEDIA_ROUTER_SERVICE,
@@ -2461,6 +2462,17 @@ public abstract class Context {
@SystemApi
public static final String WIFI_SCANNING_SERVICE = "wifiscanner";
/**
* Use with {@link #getSystemService} to retrieve a {@link
* android.net.wifi.RttManager} for ranging devices with wifi
*
* @see #getSystemService
* @see android.net.wifi.RttManager
* @hide
*/
@SystemApi
public static final String WIFI_RTT_SERVICE = "rttmanager";
/**
* Use with {@link #getSystemService} to retrieve a {@link
* android.net.ethernet.EthernetManager} for handling management of