Merge "[NAN] Expose NAN characteristics as an API"
This commit is contained in:
@@ -23,6 +23,7 @@ import android.net.wifi.nan.IWifiNanDiscoverySessionCallback;
|
|||||||
import android.net.wifi.nan.IWifiNanEventCallback;
|
import android.net.wifi.nan.IWifiNanEventCallback;
|
||||||
import android.net.wifi.nan.PublishConfig;
|
import android.net.wifi.nan.PublishConfig;
|
||||||
import android.net.wifi.nan.SubscribeConfig;
|
import android.net.wifi.nan.SubscribeConfig;
|
||||||
|
import android.net.wifi.nan.WifiNanCharacteristics;
|
||||||
import android.net.wifi.RttManager;
|
import android.net.wifi.RttManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,6 +37,7 @@ interface IWifiNanManager
|
|||||||
void enableUsage();
|
void enableUsage();
|
||||||
void disableUsage();
|
void disableUsage();
|
||||||
boolean isUsageEnabled();
|
boolean isUsageEnabled();
|
||||||
|
WifiNanCharacteristics getCharacteristics();
|
||||||
|
|
||||||
// client API
|
// client API
|
||||||
void connect(in IBinder binder, in String callingPackage, in IWifiNanEventCallback callback,
|
void connect(in IBinder binder, in String callingPackage, in IWifiNanEventCallback callback,
|
||||||
|
|||||||
19
wifi/java/android/net/wifi/nan/WifiNanCharacteristics.aidl
Normal file
19
wifi/java/android/net/wifi/nan/WifiNanCharacteristics.aidl
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
* 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.nan;
|
||||||
|
|
||||||
|
parcelable WifiNanCharacteristics;
|
||||||
@@ -23,7 +23,7 @@ import android.os.Parcelable;
|
|||||||
/**
|
/**
|
||||||
* The characteristics of the Wi-Fi NAN implementation.
|
* The characteristics of the Wi-Fi NAN implementation.
|
||||||
*
|
*
|
||||||
* @hide
|
* @hide PROPOSED_NAN_API
|
||||||
*/
|
*/
|
||||||
public class WifiNanCharacteristics implements Parcelable {
|
public class WifiNanCharacteristics implements Parcelable {
|
||||||
/** @hide */
|
/** @hide */
|
||||||
|
|||||||
@@ -292,6 +292,20 @@ public class WifiNanManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the characteristics of the Wi-Fi NAN interface: a set of parameters which specify
|
||||||
|
* limitations on configurations, e.g. the maximum service name length.
|
||||||
|
*
|
||||||
|
* @return An object specifying configuration limitations of NAN.
|
||||||
|
*/
|
||||||
|
public WifiNanCharacteristics getCharacteristics() {
|
||||||
|
try {
|
||||||
|
return mService.getCharacteristics();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attach to the Wi-Fi NAN service - enabling the application to create discovery sessions or
|
* Attach to the Wi-Fi NAN service - enabling the application to create discovery sessions or
|
||||||
* create connections to peers. The device will attach to an existing cluster if it can find
|
* create connections to peers. The device will attach to an existing cluster if it can find
|
||||||
|
|||||||
Reference in New Issue
Block a user